• 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.
Is it possible to scope to a random daughter?

I tried:

Code:
random_child = {
    if = {
        limit = {
            is_female = yes
        }
    }
}

But if I use this, any code I put after the limit will sometimes not get executed. I guess it scopes to a random child who is male, fails the limit and because of this doesn't execute anything after that. Is it in any way possible to scope to a random daughter?

Thank you in advance
Your code means, take one random child, nd if that picked child happens to be a girl, then do stuff.

The proper way is any_child = { limit = { is_female = yes } <do stuff }. The limit irectly under the random_* instruxts the game that ensure that the randomly picked object fullfils the restrctions you script in.
 
For some reason some of these replacements happen, but others don't, k_sapmi, k_mesopotamia, and d_sjaelland for an example do not seem to replace as they should.
 

Attachments

  • aa_replacenfile.csv
    1,4 KB · Views: 5
Is there a way to find out how old an immortal character was when they gained their immortality?
As far as I know, the only way is to look at the character's stat block in the save file.



Question: Say you run Mod X and Mod Y, and both have a trait with the same name. Each mod's version of that trait has different stats; which one does the game use?

If I set Mod Y to be a dependency of Mod X, does that guarantee Mod Y's version of the trait will be used?
 
Decided to resume work on an old mod but its crashing after choosing a character and loading the game. It's a completely custom map and to get it working in the past I had to replace a bunch of the directories.

I'm wondering if there's a definitive list of folders which should use the replace_path for in order for total conversion mods to load up? I seem to remember someone uploading a blank slate mod with the necessary replacements but I can't find it now
 
Decided to resume work on an old mod but its crashing after choosing a character and loading the game. It's a completely custom map and to get it working in the past I had to replace a bunch of the directories.

I'm wondering if there's a definitive list of folders which should use the replace_path for in order for total conversion mods to load up? I seem to remember someone uploading a blank slate mod with the necessary replacements but I can't find it now

In my experience, crashing after selecting a character and hitting Play is often due to erroneous/outdated/missing gui files in tge interface folder.
 
I am not aware of anything about custom localisation changing with regards to province modifiers, what exactly are you doing that no longer works?
Yes some changes happenedin this area.
F.e. when we used to have From.Location.GetName to bring province name in province event, we now have From.GetName (or Root or THIS i guess).
The old From.Location.GetName returns "Location" instead.
 
Is it possible to define an own scope like "lovers"?

Not to my knowledge. However, you could get a similar effect by using any/random_opinion_modifier_target

Code:
any_opinion_modifier_target = {
   limit = {
       has_opinion_modifier = {
           who = ROOT
           modifier = opinion_myscopemodifier
       }
   }
}

and setting/removing the relevant opinion modifiers whenever you become that scope (assuming it would be triggered by an event/decision/etc.)
 
In my experience, crashing after selecting a character and hitting Play is often due to erroneous/outdated/missing gui files in tge interface folder.

Thanks, I did have an old gui file so I coped the latest version and made the required changes (just for the minimap) but now it's crashing at the initial load screen instead. Even tried removing the custom minimap and the interface files from the mod completely but it still crashes. Think it'll be easier to start from scratch since it's only a few days work anyway.
 
Hi,

In the on_action file if i have 100 = event id and 1500 = 0 and the end how do i calucate what the changes are that event fires
in this case, the chance will generally be: 100/(100+1500) = 6.25%

Any event with a weight_multiplier block will adjust the weight for that event. so if the event in question has a weight_multiplier block that resolves to a multiplier of 5, for example, the chances change as follows: 500/(500+1500) = 25%

Be aware that each mod can also add events to the list of random events for an on_action trigger, so these chances can change depending on which mods are loaded and what you're doing with your own mod. With on_actions that have a lot of random events with a variety of weight multipliers the chances are influenced by all possible events, so it gets a bit tricky, but the best estimate is always the event's weight divided by the sum of all weights for that on_action trigger, including those that do not trigger an event.
 
pentarch = barony is not valid in a title.
You need to specify pentarchy = yes/religion in the barony's definition itself.
ok let' assume this is correct how do I get a kingdom to belong to a certain patriarchy instead of just becoming one on their own? It's not really the original issue but it's beginning to bug me. I assume k_thracia did end up under constantinople because constantinople is actually in the kingdom (after my history files place it there), hence why it alone of all my custom made subkingdoms of the ERE end up under the right patriarch.
 
How do I check if the spouse of the event reciever has the same religion?

Spouse = { religion = THIS }
Or
Spouse = { religion = ROOT }

I have never understood the difference between THIS and ROOT... :)

You need spouse = { religion = ROOT }. THIS checks for the current scope, so spouse = { religion = THIS } will just check if your spouse has the same religion as the current scope (which is the spouse him/herself), which is obviously not what you want.
 
ok let' assume this is correct how do I get a kingdom to belong to a certain patriarchy instead of just becoming one on their own? It's not really the original issue but it's beginning to bug me. I assume k_thracia did end up under constantinople because constantinople is actually in the kingdom (after my history files place it there), hence why it alone of all my custom made subkingdoms of the ERE end up under the right patriarch.

You define it in the history files. See e.g. k_england's history for an example.
 
I made the king of bulgaria in 867 into an emperor (because he was) but now the war with the magyar doesn't show up when I start the game, I can't really find why, the war in the history files only refer to their character IDs so it should work.

Edit: Never mind it seems bugged even without my mod.
 
Last edited: