• 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.
My understanding (from a prior dev comment) is that the ordering (and to a lesser degree, redundancy) of pre-triggers doesn't matter, because the game automatically optimizes that. The order of evaluation is not determined by the order they're written.

This isn't true of pre-triggers, you need to choose an optimal ordering yourself.
 
The event would fire roughly ten years later if you use had_global_flag = { flag = Z days = 3650 }, yes (the event offset would make it miss the mark by a few days). However, keep in mind that if you want to fire the event yet again (e.g, if you don't find enough provinces with the modifier) with a delay you will need to clear and reset the flag, as using set_<scope>_flag when it already is set for the scope does not reset the time the scope has had the flag, meaning the Pope would get the event 20-ish days later as ten years have passed since the flag originally was set.

As for firing a province event from on_actions, you could always fire an event for some character (e.g. the Pope) and then fire an event from that event for a certain province (e.g. capital_scope = { province_event = { id = X days = Y} }, if you don't care about which province) if you aren't already in the province scope in on_actions.
I assume you are using the on_decade_pulse, and that 'is_pope = yes' is a custom scripted_trigger. That means it is still having to check each character to decide who is the pope. Granted, it's only once every 10 years, but there's still a more efficient way.

Use an on_chronicle_start hidden event (only fires for the player anyway, so no need for pope check). That event immediately calls a hidden event on province 1. This is your province modifier checking event. At the end of that event, call a repeat_event of the same event to the same province, delay of 3650 days. This will keep repeating the same check every 10 years exactly, with no pope check and no worries about the target changing.
Ah okay, I see...
While I know now how to code mods so they work, I am still learning how to do it efficiently. I screwed up performance before, so I will listen to your advice and use such a different approach. Kudos for the detailed explanation :)
 
I have a quick question about flag modding. So I added/changed the .TGA file for the Kingdom of Rum in the flags folder, on both the base game and a mod, however when I went into the game, the kingdom of Rum still had it's basic flag, or the mod's red banner. Any ideas why this happened?
 
I have a quick question about flag modding. So I added/changed the .TGA file for the Kingdom of Rum in the flags folder, on both the base game and a mod, however when I went into the game, the kingdom of Rum still had it's basic flag, or the mod's red banner. Any ideas why this happened?

Pretty sure you have to delete the content of the gfx folder (cache) in Documents, respectively in a potentially existing subfolder of the mod.
 
Pretty sure you have to delete the content of the gfx folder (cache) in Documents, respectively in a potentially existing subfolder of the mod.
There is no cache folder in Documents, when I search through the computer the only cache folders come up are from other Paradox games.
 
So I have to delete the whole GFX folder? Wouldn't that break the game?

The content.
It's a cache folder. Files get rebuild after start.
Just in case, i said in Documents (.../Paradox Interactive/Crusader Kings 2), not in the game file folder.
 
The content.
It's a cache folder. Files get rebuild after start.
Just in case, i said in Documents (.../Paradox Interactive/Crusader Kings 2), not in the game file folder.
Well, I changed it in the base game and it looks right. However the mod that I have active (Patrum Scuta) still looks the same, a bland red banner. I also reloaded the game without Patrum Scuta, and it reloaded the flags, so no worries there.

EDIT:
MMMMMMMM figured out the problem. I was editing Lux Invicta, not Patrum Scuta. DAMN IT ALL! -_-'
 
Last edited:
The Validator says this "Char IDs 10 digits or longer can cause problems"
What kind of problems, if any, can this cause?
All characters born or otherwise created during gameplay are assigned a 10-digit ID. I assume the game checks if an ID is already in use before assigning it (although I'm not certain). But imagine what happens if you activate a mod halfway in a playthrough?
 
  • 1
Reactions:
The Validator says this "Char IDs 10 digits or longer can cause problems"
What kind of problems, if any, can this cause?

It probably is because the largest value for a 32-bit signed integer is 2,147,483,647 and the largest value for a 32-bit unsigned integer is 4,294,967,295, and exceeding this limit would cause the integer to "start over" from -2,147,483,648 (signed) or 0 (unsigned) when moving beyond this valie, which be problematic. In practice, though, if you ned to use ids in the billions you probably will have problems long before you hit the breaking point, provided you started sufficiently far from the dangerous value.
 
  • 1
Reactions:
I've granted a second family palace to a patrician, and gameplay-wise it seems to work alright. It doesn't get removed, and it can be inherited by the patrician's heir along with the normal family palace.

The name shows as "House [name]", and doesn't seem changeable, at least by normal means. short_name doesn't work, and setting title prefix doesn't either. Changing the cultural name of the family palace works only partially; it displays the new name when hovering the character's portrait, but not when hovering the palace's icon.

Does anyone know if this is fixable?
 
It probably is because the largest value for a 32-bit signed integer is 2,147,483,647 and the largest value for a 32-bit unsigned integer is 4,294,967,295, and exceeding this limit would cause the integer to "start over" from -2,147,483,648 (signed) or 0 (unsigned) when moving beyond this valie, which be problematic. In practice, though, if you ned to use ids in the billions you probably will have problems long before you hit the breaking point, provided you started sufficiently far from the dangerous value.
Had that in AGOT temporarily in a dev build, all newly generated character ids become negative and break many many many things such as trying to target any character for anything. It is because the game starts generating character ids from the highest one in the history and does not fill in the gaps so it is best practice to make sure you do not leave any gaps with the character ids you use in the history files like we had in AGOT as it causes major problems.
 
  • 2
Reactions:
Hi,

Is there a way to add rank limits to concubines? I would like to make sure that only emperors of appropriate culture/religion can employ them to avoid a population boom

Thanks
DO
 
Last edited:
I almost have my mod loading(I think)

I can get the map to load . But it crashes on character select.
The reason for this, I think is that the county title has not been assigned

However if I go to the history\titles folder and add
1060.1.1={holder=1} to the county file
To assign the county to that character, it crashes on loading flags.

It is kind of odd , as if I assign the dutchy, kingdom and empire titles using the same "1060.1.1={holder=1}" in the appropriate k_ , e_ and d_ title files those are acceptable to the game.


I have a stripped down version of the mod attached(1 county and 1 sea region).

Also should the map filler tool be generating barony files as well? (In my attached files I manually created a barony file just in case the lack was causing the crash)
Or are they only required if you want to add a bit of history flavor.

I am sure I have missed one small thing somewhere, but after hours of crashes and forum trawling and cannot for the life of me work out what is wrong, my brain is fried :(

Any pointers would be appreciated
Thanks in advance
 

Attachments

  • L5R.zip
    1.003,8 KB · Views: 0
Hi,

Is there a way to add rank limits to concubines? I would like to make sure that only emperors of appropriate culture/religion can employ them to avoid a population boom

Thanks
DO

You could remove them from the religions that use them and set up a custom government that allows concubines but that only is available for emperors of the cultures that you want to have concubines. Of course, that would in practice make nomad khans unable to have concubines (as well as all Dharmic and pagan kings), and things might get messed up when someone revolts and gets a temporary emperor title (and anyone who loses their emperor title would also lose their concubines but they would still exist in the game). You'd also effectively remove one of the options that pagans have to convert (using a spouse or concubine), though the AI doesn't use that at all and you'd only affect the player's ability to use it.
 
I'm trying to make a mod that does two things. Add a few government flavors, and make it so that those give you a certain amount of vassals when converting. However the government flavors aren;t working. Anyone know what's wrong with them?

government_flavor = (
name = centralized_state
graphics = GFX_evt_found_hre
priority = 10
trigger = {
government = feudal_government
NOT = {has_law = succ_feudal_elective} AND = {has_law = centralization_2} AND = {religion_group = christian}
}
)

government_flavor = (
name = decentralized_state_1
graphics = GFX_evt_found_hre
priority = 10
trigger = {
government = feudal_government
NOT = {has_law = succ_feudal_elective} AND = {has_law = centralization_1} AND = {religion_group = christian}
}
)

government_flavor = (
name = decentralized_state_0
graphics = GFX_evt_found_hre
priority = 10
trigger = {
government = feudal_government
NOT = {has_law = succ_feudal_elective} AND = {has_law = centralization_0} AND = {religion_group = christian}
}
)
 
Had that in AGOT temporarily in a dev build, all newly generated character ids become negative and break many many many things such as trying to target any character for anything. It is because the game starts generating character ids from the highest one in the history and does not fill in the gaps so it is best practice to make sure you do not leave any gaps with the character ids you use in the history files like we had in AGOT as it causes major problems.

Thank you for the answers they were all helpful and this answered my question perfectly. Looks like I'm fine, as I'm writing a sub-mod for CK2+ and started at the end of their ids. Thanks a lot!

Edit: No problems, of the sort that you mentioned, so all must be well.
 
Last edited: