• 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.
I noticed while playing arround with static_modifiers this evening that it seems special troops do not work in the basic garrison/ levy setup in that file, it'd be great if it did (or if someone point out what i could have screwed up on)
 
Hello, fellow modders and PDS stuff.

Lately I am experiencing serious problem with my mod: the game CTDs at resign and, even more importantly, it fails to load saved games. I have tried my best, but failed to find the source of this problem. There certainly are some minor inconsistencies (some baronies in province history files may not correspond with baronies in landed_titles.txt, some rulers are missing etc.), but according to my previous modding experience this doesn't seem to be the cause.
I am slowly eliminating all these minor bugs one by one and it seems to confirm my fear that the source of the CTD is somewhere else, somewhere where neither I nor way more experienced modders have ever experienced such a serious bug.

The mod is in my signature, the latest dev version is here:
https://www.dropbox.com/s/x3g69noha5vwtdu/IBL-dev0.903.zip?dl=0

the bug can be reproduced simply by saving any game and then reloading.
All logs except system and exceptions are empty.
If there is anything else I should provide for easier finding of the problem, I will do that.

Thanks in advance.
 
Hello, fellow modders and PDS stuff.

Lately I am experiencing serious problem with my mod: the game CTDs at resign and, even more importantly, it fails to load saved games. I have tried my best, but failed to find the source of this problem. There certainly are some minor inconsistencies (some baronies in province history files may not correspond with baronies in landed_titles.txt, some rulers are missing etc.), but according to my previous modding experience this doesn't seem to be the cause.
I am slowly eliminating all these minor bugs one by one and it seems to confirm my fear that the source of the CTD is somewhere else, somewhere where neither I nor way more experienced modders have ever experienced such a serious bug.

The mod is in my signature, the latest dev version is here:
https://www.dropbox.com/s/x3g69noha5vwtdu/IBL-dev0.903.zip?dl=0

the bug can be reproduced simply by saving any game and then reloading.
All logs except system and exceptions are empty.
If there is anything else I should provide for easier finding of the problem, I will do that.

Thanks in advance.

Don't forget to add "-debug -debugscripts" in the launch options to have more errors logged in error.log.
The exception log can be very useful if the timestamp is matching your CTD.

Using validator, I'd fix first the following errors:

--- Error 1 of 3 ---
At <mod>\history\characters\swmh_africa_flavour.txt [IBL.1000144656] (Line 18, column 1):
Invalid node "IBL.1000144656" in scope CharacterFile (value is: <a complex type>)
--- Error 2 of 3 ---
At <mod>\history\characters\swmh_africa_flavour.txt [IBL.1000144657] (Line 42, column 1):
Invalid node "IBL.1000144657" in scope CharacterFile (value is: <a complex type>)
--- Error 3 of 3 ---
At <mod>\history\characters\swmh_africa_flavour.txt [IBL.1000144658] (Line 57, column 1):
Invalid node "IBL.1000144658" in scope CharacterFile (value is: <a complex type>)

Also the duplicate IDs in landed_titles are bad:

--- Error 348 of 454 ---
Duplicate ID: b_badin
[1]: <mod>\common\landed_titles\landed_titles.txt (31143, 5)
[2]: <mod>\common\landed_titles\landed_titles.txt (18675, 5)
--- Error 335 of 454 ---
Duplicate ID: b_mansura
[1]: <mod>\common\landed_titles\landed_titles.txt (31150, 5)
[2]: <mod>\common\landed_titles\landed_titles.txt (24014, 5)
--- Error 281 of 454 ---
Duplicate ID: b_gaya
[1]: <mod>\common\landed_titles\landed_titles.txt (34034, 5)
[2]: <mod>\common\landed_titles\landed_titles.txt (29094, 5)

Errors of bad province history should also be fixed as well (they can really confuse the engine, having weird side effects), like the following:
--- Error 1 of 2 ---
Duplicate IDs in file names: <mod>\history\provinces\885 - Kano.txt and history\provinces\885 - Matamma.txt
--- Error 2 of 2 ---
Duplicate ID: c_kano
[1]: <mod>\history\provinces\1328 - Kano.txt (4, 1)
[2]: <mod>\history\provinces\885 - Kano.txt (4, 1)

These ones I've never seen them, not sure what's the problem:
--- Error 1 of 4 ---
Incorrect Literal
At <mod>\map\adjacencies.csv [Entry\3] (Line 245, column 10):
Expected value:
Actual value: 908
--- Error 2 of 4 ---
Incorrect Literal
At <mod>\map\adjacencies.csv [Entry\3] (Line 246, column 10):
Expected value:
Actual value: 1467
--- Error 3 of 4 ---
Incorrect Literal
At <mod>\map\adjacencies.csv [Entry\3] (Line 247, column 10):
Expected value:
Actual value: 1467
--- Error 4 of 4 ---
Incorrect Literal
At <mod>\map\adjacencies.csv [Entry\3] (Line 248, column 10):
Expected value:
Actual value: 1467

Good luck !
 
  • 2
Reactions:
Don't forget to add "-debug -debugscripts" in the launch options to have more errors logged in error.log.
The exception log can be very useful if the timestamp is matching your CTD.

Using validator, I'd fix first the following errors:



Also the duplicate IDs in landed_titles are bad:



Errors of bad province history should also be fixed as well (they can really confuse the engine, having weird side effects), like the following:


These ones I've never seen them, not sure what's the problem:


Good luck !
thanks.
Fixing those led me to another important problem, which @zijistark warned me about and it was inconsistency of one province history file and province_setup.txt and it seems to solve the problem, at least the loading one, which was critical.

Thanks!
 
Hi again, @Divine. Sorry, but I've another issue to report:

We were having some strange activity in HIP which seemed to be related to the using_cb trigger not working inside the any_war scope...which is strange, since that seems to have been working for a long time. If it's broken, it must have been something recent.

As to what's specifically not working about it: I suppose I should mention that the trigger seems to fail when a mod's cb's aren't all in a single file (like the single 00_cb_types.txt file in vanilla), so the issue is likely related to the folderization of the casus bellis...something which allows the cb code itself to work just fine, but which breaks the using_cb trigger.

Some evidence:

HIP has (or had, prior to the version we put out today) each of its cb's split into a separate file. When investigating a bug, I put this bit of code in a decision:

Code:
      any_war = {
         defender = { character = ROOT }
         using_cb = liberation_revolt
       }

Simple enough, right? If ROOT isn't involved in a liberation_revolt war, it should return false.

Yet upon starting a peasant revolt, this was the tooltip I saw:

View attachment 183667

It's reporting the cb as claim - incidentally the first file in HIP's cb_types folder - rather than as peasant revolt.

Deleting HIP's cb_types folder, so the mod used the vanilla file instead, I got this tooltip instead:

View attachment 183668

So now it worked fine.

Determining something amiss, I hopped over to the CK2Plus mod -- which has a 00_cb_types.txt file for all vanilla cb's, but different files for all its custom ones. The above code worked fine (since it's a vanilla cb), but when I changed the code to look for one of CK2Plus's custom cb's (decadence_revolt) it failed...and displayed "embargo" in the tooltip, which is the 19th cb in its 00_cb_types.txt file and coincidentally also the 19th cb in the file where decadence_revolt appears.

In both cases, putting all the cb's into a single file made everything work properly and using_cb worked as expected once again. Which is what we've now done in HIP to get around this issue, but I thought I would report it as I doubt that's expected behavior -- and undoubtedly other mods which use the using_cb trigger are being affected without being aware.
Yes, this seems a bit problematic. My guess is that it's a dependency load issue and the CB referenced needs to exists already when you define the trigger. That behavior is not very flexible if it's supposed to be used inside CB definitions because things like cross-dependencies can easily arise. I'll set up a task to see if it's possible to add a post-load step for this but I'm glad to hear that you managed to work around it in the meantime.

thanks.
Fixing those led me to another important problem, which @zijistark warned me about and it was inconsistency of one province history file and province_setup.txt and it seems to solve the problem, at least the loading one, which was critical.

Thanks!
I'm happy to see that @Romulien managed to help you with some great info.
 
I'm not sure if this is a bug, working as intended or some kind of user error (I suspect its a bug): using title_prefix = "string" to change the name of a title (say from "kingdom" to "grand duchy") seems to work fine for empire and kingdom level titles but I can't seem to get it to work for duchies or counties. (I haven't tried baronies.) To be clear, I'm talking about using it in landed_titles rather than governments.

Just to be sure nothing else in my mod was screwing things up I created a new mod from scratch just to test this, and placed title_prefix = "test_" within several different titles; k_england, k_france and e_france all worked fine, but d_dioclea, d_upper_lorraine, d_lower_lorraine, c_lorraine, c_vannes, c_kleve, c_parma and c_lucca did not. (Incidentally, the reason I picked these was that some were independent and other were not, just in case that had any effect.)

P.S. I never did find a solution to the issue I was having with name = "string" in title history files (posted at the end of page 14 of this thread) so if anyone has any ideas on that front they would be most appreciated too.
 
I'm not sure if this is a bug, working as intended or some kind of user error (I suspect its a bug): using title_prefix = "string" to change the name of a title (say from "kingdom" to "grand duchy") seems to work fine for empire and kingdom level titles but I can't seem to get it to work for duchies or counties. (I haven't tried baronies.) To be clear, I'm talking about using it in landed_titles rather than governments.

Just to be sure nothing else in my mod was screwing things up I created a new mod from scratch just to test this, and placed title_prefix = "test_" within several different titles; k_england, k_france and e_france all worked fine, but d_dioclea, d_upper_lorraine, d_lower_lorraine, c_lorraine, c_vannes, c_kleve, c_parma and c_lucca did not. (Incidentally, the reason I picked these was that some were independent and other were not, just in case that had any effect.)

P.S. I never did find a solution to the issue I was having with name = "string" in title history files (posted at the end of page 14 of this thread) so if anyone has any ideas on that front they would be most appreciated too.
Did some small investigations. Apparently the title_prefix defined in landed_titles only works for titles that has a culture set as well. I didn't have time to investigate if there's a good reason for that so I've not changed something in that regard but a work-around would be to add cultures to all of the titles that should receive title_prefix.
About the set_name, reset_name issue I didn't see anything blatantly wrong with it at first sight but I'll take a closer look on it when I have more time.
 
Did some small investigations. Apparently the title_prefix defined in landed_titles only works for titles that has a culture set as well. I didn't have time to investigate if there's a good reason for that so I've not changed something in that regard but a work-around would be to add cultures to all of the titles that should receive title_prefix.
That seems to work, thanks. :) Seems like a bit of an odd restriction though. I'd be interested to hear the logic behind it.
 
Not sure if it's the right place, but do you have any idea as to why the game/a mod might run more slowly on terrain or political map mode as opposed to any of the other ones?
Amount of things to display, there are probably less religions or cultures than there are countries to show or terrain to render
 
Not sure if it's the right place, but do you have any idea as to why the game/a mod might run more slowly on terrain or political map mode as opposed to any of the other ones?

For terrain mode check the tree map, it can be a major culprit on big maps with lots of trees.
 
Does it affect the political map as well though? That's what got me confused, there's little difference between the two.

No it would just be the terrain map mode. I haven't personally ran into issues with the political map, even with 2500 provinces each with their own independent ruler. Validator pull anything up?
 
Guys - not to be a hall monitor, but is this a specific question for Divine, or maybe something which should go into the "Modding - Quick Questions" thread?
 
  • 1
Reactions:
Kingdoms that are not de jure part of empires in landed_titles continue to be removed from empires they have become part of on reload. Ref: this thread
 
@Divine you mentioned before that it is possible to save random_army as a saved event target, is there anyway to compare if two random_army scopes resolve to the same army? Essentially I want to do something like the following.

Code:
random_army = {
save_event_target_as = army_1
}

random_army = {
limit = {
not = {
event_target:army_1
}
}
save_event_target_as = army_2
}

This would more easily let me do a scaling effect that increases in potency with the number of armies in a province, without using any_army.

Also, using any_army scope outside of a trigger appears to always crash the game. Is this a bug in using this scope as a scope in an effect?
 
Kingdoms that are not de jure part of empires in landed_titles continue to be removed from empires they have become part of on reload. Ref: this thread
Interesting problem. I probably won't have time to look into it for a couple of weeks. I'll see if someone else on the team can look into it.

@Divine you mentioned before that it is possible to save random_army as a saved event target, is there anyway to compare if two random_army scopes resolve to the same army? Essentially I want to do something like the following.

Code:
random_army = {
save_event_target_as = army_1
}

random_army = {
limit = {
not = {
event_target:army_1
}
}
save_event_target_as = army_2
}

This would more easily let me do a scaling effect that increases in potency with the number of armies in a province, without using any_army.

Also, using any_army scope outside of a trigger appears to always crash the game. Is this a bug in using this scope as a scope in an effect?
Should be useful to have a trigger along the following:
Code:
NOT = {
    army = event_target:army_1
}
I'll try to fix something like that in between the other things I'm trying to get in for CK.
 
Interesting problem. I probably won't have time to look into it for a couple of weeks. I'll see if someone else on the team can look into it.


Should be useful to have a trigger along the following:
Code:
NOT = {
    army = event_target:army_1
}
I'll try to fix something like that in between the other things I'm trying to get in for CK.
Or possibly unit instead of army, depending on how easy/useful it is to distinguish armies from fleets.
 
I'm not sure if this is the right place to ask about this (my apologies if it is not) but I am running into a fairly serious problem with modding EK for Conclave compatibility and I can't quite get to the root of what's wrong. As I detail in this thread, I get some messages in the error logs about the following:

Code:
[messagehandler.cpp:423]: Failed to find message type: ASK_TO_DECLARE_WAR_INTERACTION_ACCEPT

I'm also getting a CTD on every session, usually less than 150 years in. When I remove the 00_cb_types file (and remove all CBs) the game does not run into any crashes as far as my tests indicate (an overnight test brought the game to nearly 600 years before I had to exit; there was no crash). What I'm wondering is, how do the CB types relate to the other files in-game? Do you know of any way the message error could be created, and/or what file dependencies could be involved with this crash?