• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
In 2.1.5.6 "local_speed_modifier" was added. I tried using this as a province modifier
Code:
stone_road = {
    local_speed_modifier = 0.1
    icon = 1
}
This has no effect, as it displays as NONE: +0.10 and doesn't affect the movement speed what-so-ever. I also tried just "local_speed_modifier" in a building to the same effect just for the sake of testing.

How does one make use of this modifier? I tried searching the string on the forum, but literally only the release thread that it came out with can be found on this subject.

Perhaps I am only misunderstanding its use and it's not a bug, my apologies if that's the case
 
Last edited:
Now that we've cleared up most of the other bugs introduced by merging the HL changes into After the End, I've been banging my head against the wall trying to fix this crash. As Zhangku mentioned, we've gotten some saves from players in our thread and one of our devs reproduced the crash in his own game. Many of the crashes can be avoided by disabling HL, so at least some portion of the problem is caused by HL, an interaction between HL and our custom stuff, or a merge error from when we brought Horse Lords changes into our files.

I attached Visual Studio to CK2 and reproduced the crash with Celt's save game. Here's a save game that should reproduce the crash in about a year, playing as the Duke of Tuskegee. When the crash occurred, the debugger reported a stack overflow exception. Without source code or PDBs, I have very little ability to actually get the the bottom of this issue. I'm not sure if this is the appropriate venue to get help with this, but I'm running out of troubleshooting ideas.

Well, a Stack Overflow Exception means too many nested method calls. Do you have any extremely long event chains or elaborate nested conditionals triggered on or around that date?
 
Captain Gars, I'm hoping you can help with something.

With the 'debugscripts' mode on, we get a lot of helpful info in the error log. CK2Plus gets a load of asserts that look like this, however:

Code:
[effectimplementation.cpp:8549]: Assert failed for 'change_variable': false && "Invalid scope for variable effect"

Which seemed like we were getting asserts for our uses of change_variable, anything which wasn't a positive integer. In trying to track it down, however, we removed every single change_variable command (and set_variable, for good measure) in the mod...and we're still getting these asserts, now for events which don't actually use the change_variable command.

For instance we get this:

Code:
[effectimplementation.cpp:8549]: Assert failed for 'change_variable': false && "Invalid scope for variable effect"
[event.cpp:499]: Previous assert occured in Event '6060'.

For an event that looks like this:
Code:
#Ill
character_event = {
   id = 6060
   desc = EVTDESC6060
   picture = GFX_evt_illness
   border = GFX_event_normal_frame_religion

   trigger = {
     NOT = { trait = immortal }
     health = 3.0
     is_ill = no
   }

   mean_time_to_happen = {
     months = 480

     modifier = {
       factor = 0.35
       NOT = { age = 1 }
     }
     modifier = {
       factor = 0.35
       NOT = { age = 3 }
     }
     modifier = {
       factor = 0.35
       NOT = { age = 6 }
     }
     modifier = {
       factor = 0.5
       trait = depressed
     }
     modifier = {
       factor = 0.75
       trait = stressed
     }
     modifier = {
       factor = 0.5
       trait = maimed
     }
     modifier = {
       factor = 0.1
       has_character_modifier = the_oubliette
     }
     modifier = {
       factor = 0.25
       has_character_modifier = the_dungeon
     }
     modifier = {
       factor = 1.5
       base_health = 6
     }
     modifier = {
       factor = 2.0
       base_health = 7
     }
     modifier = {
       factor = 2.0
       base_health = 8
     }
   }

   option = {
     name = EVTOPTA6060
     add_trait = ill
   }
}

That's a vanilla event, with the main difference being the "NOT = { trait = immortal }" in the trigger and the age checks.

Or we get this:

Code:
[effectimplementation.cpp:8549]: Assert failed for 'change_variable': false && "Invalid scope for variable effect"
[event.cpp:499]: Previous assert occured in Event '2504002'.

Which is for WoL.4002, an unchanged vanilla event:

Code:
# Host receives negative answer to invitation
letter_event = {
   id = WoL.4002
   desc = EVTDESC_WoL_4002

   is_triggered_only = yes
  
   option = {
     name = EVTOPTA_WoL_4002
     prestige = -3
   }
}

So...I'm a bit confused. Am I just reading that wrong? Is that a generic assert which uses that text, regardless of the issue?
 
Last edited:
I don't think the "previous assert" event actually identifies the event where the problematic assert occurs, but the previous successful assert.
 
I don't think the "previous assert" event actually identifies the event where the problematic assert occurs, but the previous successful assert.

I'm not sure I follow your meaning.
 
What I'm saying is that "previous assert" seems to have no connection whatsoever with the event where the failed assert occurs. Inserting log statements before and after suspected variable clauses would seem to be more useful, not that I've tried it yet.
 
What I'm saying is that "previous assert" seems to have no connection whatsoever with the event where the failed assert occurs. Inserting log statements before and after suspected variable clauses would seem to be more useful, not that I've tried it yet.

Possibly -- although, at the moment, there are no variable commands in the mod whatsoever. I guess I could also try removing check_variables as well, and see if that's it.

You're probably right about "previous assert" not really connecting to the event it's mentioning...although that makes it disappointingly useless. Hopefully Captain Gars can verify.

EDIT: That seemed to do it. Removed all check_variable commands as well, and now there are no asserts showing whatsoever.
 
Last edited:
Event targets don't seem to be working as I would expect them to in CBs:
[gamestate.cpp:4452]: Undefined event target: target_taker
[gamestate.cpp:4452]: Undefined event target: target_taker
[gamestate.cpp:4452]: Undefined event target: target_taker
Code:
  on_success_title = {
     holder_scope = {
       save_event_target_as = target_taker
     }
     
     any_direct_de_jure_vassal_title = {
       limit = {
         holder_scope = {
           OR = {
             character = FROM
             is_liege_or_above = FROM
           }
           NOR = {
             character = event_target:target_taker
             is_liege_or_above = event_target:target_taker
             is_liege_or_above = ROOT
           }
         }
       }
       usurp_title_plus_barony_if_unlanded = { target = event_target:target_taker type = claim }
     }
 
Just noticed a problem with the spawn_unit effect. It seems that any unit spawned this way now continuously reinforces by default. In the change log there is the following line:

- Added flags reinforcing [yes/no] and reinforce_rate_multiplier to the spawn unit effect.

These flags appear to not work however, event putting reinforcing = no and reinforce_rate_multiplier = 0 in the spawn_unit effect still produces a unit that reinforces.

I think this may have a detrimental effect on the vanilla game as well. If all spawned units are reinforcing by default there may eventually be many armies present on the map.
 
@Captain Gars

It would seem that mods, like AGOT, are missing major functionality due to the need for your upcoming fixes. Any chance that we will see a hotfix or small patch in the next month so we don't need to wait for the next expansion to get updates for mods?
 
Using that code I get no long distance crusades - in fact I get no crusades at all in my game. So again, unless there is some reproduction case I can't do much about this.

Just to back up what richvh was suggesting about the ai_will_do in casus bellis, I recently added this to the tributary_cb's ai_will_do:

Code:
    modifier = {
       factor = 0
       ROOT = {
         is_nomadic = no
         NOT = { religion_group = FROM }
       }
     }

Mainly because we kept having non-nomadic Christian realms trying to make tributes out of Muslim realms (like Lombardy targeting the Ummayads)...but, even with this code in the ai_will_do, it still lhappened. I had to put a version of it in the can_use section instead in order to make it stop.
 
I'm getting wierd results with a not of a scope again in this case


Code:
        NOT = {
            any_independent_ruler = {
                any_realm_province = {
                    culture = ROOT
                }
            }
        }

Unless I understand it wrong this should scope every province in the game and then evaluate to false if there are none of the culture.

PECwBrxT7PUxwdgt-otUV7xXpcdLsiV5Zcd1nc_Pyrtf=w330-h262-no

Instead I get one of those "not localised not get baked into the scope" things (as the last screen i showed) and it seems it moves the not into the first scope. Thus evaluting to true if there exists such an independent ruler that does not have provinces of the culture.
 
Fixed title localisation for custom government type not working
 
  • 1
Reactions:
In addition, here are the relevant quotes from the governments modding discussion

I just tested and it is possible to set a government from a character history file with effect = { set_government_type = custom_government }. However, since it's an effect it won't be executed until start and thus not shown in the front end menu.
 
This sounds like the same problem is was reporting. Here is my modification.

You can build an abbey holding by calling event abbey.2, and then choosing the first option in the next event. This will make a new temple holding in the capital, which should have the new government type.

You use has_holding_modifier in your potential trigger. There is no such trigger. If you correct this, the government works.

I could even set it from a title file.
 
Last edited:
Pretty minor but if you use set_special_character_title on a character it doesn't show in the lobby.

That's because you set it inside an effect block and those aren't executed until the game starts.
 
  • 1
Reactions:
I've recently tried to increase the number of children someone can educate by setting MAX_WARDS_PER_GUARDIAN in defines.lua to 10 instead of 2.

However, I'm only able to educate the stock 2, so either I'm missing something or the defines isn't working.


Can anyone please confirm this?
 
The random seed is messed up

If for instance you create_character for every province in your realm in one event, then all the characters have the same name

This wasn't technically a bug (but a problem never the less as our own scripts used the effect outside of character scope as well). It had nothing to do with the random seed but with missing culture. As there were no character in the scope the effect couldn't get a culture to generate a name from, and when that function fails it always returns Adam or Eve...

Anyway, I've fixed it now, so you can use the effect in character/title/province scope.
 
Now that we've cleared up most of the other bugs introduced by merging the HL changes into After the End, I've been banging my head against the wall trying to fix this crash. As Zhangku mentioned, we've gotten some saves from players in our thread and one of our devs reproduced the crash in his own game. Many of the crashes can be avoided by disabling HL, so at least some portion of the problem is caused by HL, an interaction between HL and our custom stuff, or a merge error from when we brought Horse Lords changes into our files.

I attached Visual Studio to CK2 and reproduced the crash with Celt's save game. Here's a save game that should reproduce the crash in about a year, playing as the Duke of Tuskegee. When the crash occurred, the debugger reported a stack overflow exception. Without source code or PDBs, I have very little ability to actually get the the bottom of this issue. I'm not sure if this is the appropriate venue to get help with this, but I'm running out of troubleshooting ideas.

What version of CK2 is this supposed to be tested with? Running the latest released version crashes on loading the defines.