Jump to content

[mod] Regula Magistri 2


Recommended Posts

Posted
1 hour ago, ban10 said:

Hmmm, that actually looks like a bug, what it really means is that the contract thought it found a valid target house/lord for the contract to create, but then when the contract was created it could not find  valid target and whiffed.
Ideally this should never happen, it should never be possible for the game to think its valid to create this contract but then fail to make it. I was hoping I had fixed this, I haven't seen it in my own playthroughs yet (every time I see this pop up its god a valid house name)

Are you using the latest version of the mod? I think I fixed this a couple of versions back

In their defense, I have also gotten this bug, weirdly especially while Adventuring in the Middle-East/Byzantium areas. Also, the target has typically been one of the few major powers (Byzantium, Egypt, Persia, Arabia), leading to more repetitive events that have little to no impact. I also have used the most recent version when getting these bugs. 
 

2 hours ago, sexlabextra said:

So is there supposed to be a name here? or was this left blank on purpose? 

Capture.PNG.844478a383eb7eabd91939481c846422.PNG

 

Several events have this happening to it. An actor not spawning or not being chosen. I can never tell if its Carnalitas, PAD, or RM2 causing the problem, but it happens with events from all 3 (So I assume it's Carnalitas)

 

Is it a name problem or something else?

Just so you're aware as well, you can remove this contract from the map by going to accept it and then selecting the "I cannot take this contract" option. There's no penalties, and the only cost is just traveling a bit. Temporary stopgap for the moment that I utilize. 

Posted
1 hour ago, ban10 said:

Hmmm, that actually looks like a bug, what it really means is that the contract thought it found a valid target house/lord for the contract to create, but then when the contract was created it could not find  valid target and whiffed.
Ideally this should never happen, it should never be possible for the game to think its valid to create this contract but then fail to make it. I was hoping I had fixed this, I haven't seen it in my own playthroughs yet (every time I see this pop up its god a valid house name)

Are you using the latest version of the mod? I think I fixed this a couple of versions back

I am currently using mod version 5.5.1.

Also, I'm reordering the mod list to see if it's the reason

Posted

Hey abosfruitly adore this mod thanks for all the effort its genuinely appreciated!. I was  just wondering if there's a way to stop or turn off having characters automatically depose there male spouses the world outside of my kingdom/faction seems to be incredibly unstable due to all the male rulers getting deposed relatively fast without my intervention. I enjoy having the feature/interaction to do it manually.

Posted
1 hour ago, OkayDookley said:

Hey abosfruitly adore this mod thanks for all the effort its genuinely appreciated!. I was  just wondering if there's a way to stop or turn off having characters automatically depose there male spouses the world outside of my kingdom/faction seems to be incredibly unstable due to all the male rulers getting deposed relatively fast without my intervention. I enjoy having the feature/interaction to do it manually.

Not as far as I've seen. So don't give any of your sons land. Their wives will make them monks.

Posted

Something to think about in a leisurely moment, I would like for the Tropaeum to provide prestige and renown bonuses and in turn drain those from the rulers of their dynasty. I'm not sure if you're familiar with the Court Whores mod but in there when you made a member of a prestigious dynasty a Court Whore it started a house feud and I kinda would dig that for this mod.

Posted
11 hours ago, ban10 said:


Damn this sounds very bugged, make sure you reinstall both mods from scratch? 
Like, no idea how either of those things are possible.
 

 

I did a full reinstall of everything and it seems like the issue is gone now, maybe some leftover file left somewhere? thanks anyway ;D

Posted

Title: Possible script issues found while investigating a crash (unset scopes and outdated trait checks)

Hello, and thank you for maintaining Regula Magistri.

I recently experienced a CK3 crash and inspected the error.log while trying to determine what had happened. I cannot say that the following errors caused the crash, and some of them may only be tooltip-related. However, they appeared very frequently, so I thought it might be useful to report them for review.

My game version is CK3 1.19.0.6. The observations below are based on my currently installed copy of Regula Magistri.

1. primary_heir may be accessed without first checking that it exists

File:

common/script_values/regula_interaction_values.txt

Inside regula_famuli_retire_cost_discount_cost, around line 398:

primary_heir = {
    is_adult = yes
    is_healthy = yes
}

This appears to be evaluated without an preceding exists = primary_heir check. In my log, it repeatedly produced errors similar to:

Event target link 'primary_heir' returned an unset scope
primary_heir trigger [ Failed context switch ]

There is already an existence check in the can_send section of regula_retire_paelex_interaction, but my understanding is that CK3 may calculate interaction costs and tooltips even for recipients who cannot currently receive the interaction. If that understanding is correct, the guard in can_send would not protect the scripted cost calculation.

In this session, the error location around line 398 appeared approximately 19,752 times.

A possible fix might be:

limit = {
    exists = primary_heir
    primary_heir = {
        is_adult = yes
        is_healthy = yes
    }
}

There may also be value in guarding the scope:recipient.primary_heir access in the interaction's on_accept/effect-preview section, although the existing can_send condition should normally protect actual execution.

2. regula_fascinare_success_effect may refer to an undefined scope:target

File:

common/scripted_effects/regula_fascinare_effects.txt

The comments for regula_fascinare_success_effect state that its current scope is the charmed target. Near the end of the effect, it switches to $CHARACTER$ and then performs this check:

$CHARACTER$ = {
    if = {
        limit = {
            scope:target = { is_landed = yes }
        }
        regula_grant_magister_xp_effect = { TRACK = domination AMOUNT = major }
    }
    else = {
        regula_grant_magister_xp_effect = { TRACK = domination AMOUNT = medium }
    }
}

Many callers seem to invoke the effect while scoped to the charmed character, but do not first create a saved scope named target. This generated:

Undefined event target 'target'
Event target link 'scope' returned an unset scope
scope:target trigger [ Failed context switch ]

The location around line 227 appeared approximately 19,266 times. Almost all of these entries occurred while CK3 was building tooltips or event descriptions, though I also saw a small number during normal effect execution.

If I have understood the intended scopes correctly, this may cause landed targets to fall through to the medium domination XP branch instead of receiving major XP.

One possible approach would be to save the incoming scope before switching to $CHARACTER$:

regula_fascinare_success_effect = {
    save_scope_as = regula_fascinare_target

    # Existing effect...

Then use:

scope:regula_fascinare_target = { is_landed = yes }

I used a prefixed scope name here only to reduce the chance of colliding with another generic target scope.

3. Some fertility-surge events appear to use identifiers that are not character traits

Several files under:

events/activities/regula_orgy_activity/main_events/fertility_surge/

contain checks such as:

has_trait = regula_devoted
has_trait = knight
has_trait = regula_knight

I could not find character-trait definitions for these identifiers in the current mod or vanilla trait database.

In particular, regula_devoted appears to be the name of a vassal stance in:

common/vassal_stances/regula_vassal_stances.txt

rather than a character trait. The log consequently contained messages such as:

Cannot find regula_devoted in trait database
Cannot find knight in trait database

The affected references occur across these six files:

orgy_fertility_regula_one.txt
orgy_fertility_regula_few.txt
orgy_fertility_regula_many.txt
orgy_fertility_nonregula_one.txt
orgy_fertility_nonregula_few.txt
orgy_fertility_nonregula_many.txt

Depending on the intended meaning, possible current equivalents might be:

regula_is_devoted_trigger = yes
regula_is_devoted_trigger = no
is_knight = yes

However, I am less certain about the original design intention here, especially regarding regula_knight, so this probably deserves confirmation rather than a blind replacement.

Overall impact

The first two locations alone accounted for roughly 39,000 root error entries in this session. Because the same error entry can also list several caller locations, I did not add the caller counts to this total.

The complete error.log reached its 100,000-entry limit less than an hour after launch. These Regula errors therefore seem capable of causing substantial log spam and possibly some unnecessary tooltip/script-processing overhead.

That said, I do not currently have evidence that any of these errors directly caused the crash. The same log also contained unrelated portrait errors and a large number of Value out of bounds messages whose source could not be attributed to Regula from the available location information.

I tested the suggested changes only with static checks so far: brace balance, identifier searches, encoding preservation, and comparison of the modified files. I have not yet completed a clean runtime session that would prove the errors are gone in actual gameplay.

I may have misunderstood part of CK3's scope or tooltip evaluation behavior, so please treat this as a diagnostic report rather than a definite bug claim. I would be grateful if you could take a look and confirm whether these behaviors are expected. I can also provide relevant portions of the log or a small diff if that would help.

Thank you again for your work on the mod.

Posted

For the people that want the levies and knight regula images + the new army gfx you can do it by using pdx unlimiter and changing the gfx to "famuli_unit_gfx"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...