• 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.
Regarding ai_chance, would I be correct in the commented out code if I were to do this?:

Code:
option = {
       name = amareturn.13a
       ai_chance = {
           factor = 95
           modifier = {
               factor = 73               # If mother's stubborn, there's 73% chance she agrees, and 27% refuses.
               trait = stubborn
           }
           modifier = {
               factor = 8               # If mother's cynical or kind, there's 92% she agrees, and 8% chance refuses.
               OR = {
                   trait = cynical
                   trait = kind
               }
           }
       }
   }

   option = {
       name = amareturn.13b
       ai_chance = {
           factor = 5
           modifier = {
               factor = 27               # If mother's stubborn, there's just a 73% chance she agrees, and 27% refuses.
               trait = stubborn
           }
           modifier = {
               factor = 92               # If mother's cynical or kind, there's a 92% chance she declines and 8% refuses.
               OR = {
                   trait = cynical
                   trait = kind
               }
           }
       }
   }

Do the numbers work out to the percentage math that I laid out, or is that not how ai_chance works?
 
Regarding ai_chance, would I be correct in the commented out code if I were to do this?:

Code:
option = {
       name = amareturn.13a
       ai_chance = {
           factor = 95
           modifier = {
               factor = 73               # If mother's stubborn, there's 73% chance she agrees, and 27% refuses.
               trait = stubborn
           }
           modifier = {
               factor = 8               # If mother's cynical or kind, there's 92% she agrees, and 8% chance refuses.
               OR = {
                   trait = cynical
                   trait = kind
               }
           }
       }
   }

   option = {
       name = amareturn.13b
       ai_chance = {
           factor = 5
           modifier = {
               factor = 27               # If mother's stubborn, there's just a 73% chance she agrees, and 27% refuses.
               trait = stubborn
           }
           modifier = {
               factor = 92               # If mother's cynical or kind, there's a 92% chance she declines and 8% refuses.
               OR = {
                   trait = cynical
                   trait = kind
               }
           }
       }
   }

Do the numbers work out to the percentage math that I laid out, or is that not how ai_chance works?
You can't have options within options like you've got unless that is just a copy and paste error.
Other than that your script is right but your calculations are wrong. The way it works is all the factors from the ai aoptions have any applicable modifiers for that option applied to them, then the chance of one specific option happening is the modified weight of that option divided by the total modified weights of all options. So in your case if the character is stubborn then the chance they pick option A is (95*73)/((95*73)+(5*27) = 0.98 so it is 98%.
 
What I am trying to do is add a decision on any recently deceased character (date of death less than 12 months before the present) that allows the player to give them a proper funeral. The effect would be to put an opaque overlay over the character's portrait of various funeral plots (eg grave, tomb, mausoleum, monument) and give the plot builder some sort of Piety or Prestige boost in return for some fixed Gold cost.
You need to use *_even_if_dead to scope to dead characters, and you can't set new flags for them.

So the easiest way to handle the overlays would be to add new (hidden) traits to the dead characters during the burial. Then you can simply set the portrait_properties to check for those.

No need to define a new layer either. The vanilla layer 6 is good for modded overlays. It's the prison one, which won't conflict for dead people (since they can't be prisoners). Adding new frames is easy:

interface\portrait_properties\00_portrait_properties.txt:
Code:
# p6 imprisoned
6 = {
    ...
    2 = { # Frame 2 - buried in tomb
       factor = 100
       modifier = { factor = 0   NOT = { trait = buried_in_tomb } } #No trait, no overlay
   }
   ...

(Also add modifier = { factor = 0 trait = buried_in_tomb } to frame 0, otherwise that frame will be used instead.)
 
Last edited:
Can I declare my love for Paradox? Allowing us to mod and play those mods for free?
Not really a question for this thread, but I will nonetheless give you an answer: yes. :)
 
So I'm trying to make a small little mod to disable martial headgear for women (fuck norse helmets) because reasons and I thought I'd do this by copying the properties file over to a new mod and then in said mod properties file add a modifier to the martial headgear with the description is_female = yes and a factor of 0, now when I loaded the save for which I intended to make this mod and unpaused it to let the AI figure out what to wear, the person who I'd like to have the helmet removed of continues to wear the helmet for the entire time I've tested it, namely more than a year. What gives?
 
Has someone been able to

- show variable values as part of the localisation of a a province modifier?

Because it doesn't work in my first test, but I really hope I am doing something wrong because I really need this for my new mod.
So, does someone know if this works at all?
 
Is it possible to change key bindings? I want to make WASD move the camera instead of the arrow keys
 
Is it possible to have completely unconnected parts of the map? For example, with impassable mountains and no sea link.
 
Hello everyone.

I created my own christian religion in India, and tried to give it a religious head à la norse_pagan_reformed, meaning that it can be held by a secular ruler.
So I created the religion, gave it a religious head (d_myreligion) that is basically a copy paste of d_norse_pagan_reformed with a few tweaks to make it christian-like.
And at first it seemed that I succeded, with even the description of my new religion stating that the custom title controling my new religion could be held by a secular ruler.
However, each time I reload my save, the religious head's government turns to theocracy, and each time I gain or lose titles, my government turns from feudal to "no government".

Does anyone know what I did wrong ?
 
Hello everyone.

I created my own christian religion in India, and tried to give it a religious head à la norse_pagan_reformed, meaning that it can be held by a secular ruler.
So I created the religion, gave it a religious head (d_myreligion) that is basically a copy paste of d_norse_pagan_reformed with a few tweaks to make it christian-like.
And at first it seemed that I succeded, with even the description of my new religion stating that the custom title controling my new religion could be held by a secular ruler.
However, each time I reload my save, the religious head's government turns to theocracy, and each time I gain or lose titles, my government turns from feudal to "no government".

Does anyone know what I did wrong ?

You have to edit governments. Find the reference to norse_pagan_reformed in those files and make a similar exclusion for your religio(n|us head).
 
Is there a way to change which titles have what icon around their flag? For example I wanted to make it so that the Byzantine and Roman Empires had the same Eagle as the Holy Roman Empire.
F05834393081BAC7751441C496E87314D23F31DA
 
You have to edit governments. Find the reference to norse_pagan_reformed in those files and make a similar exclusion for your religio(n|us head).

Thanks a lot, that worked !
In the feudal_governments file there is an exclusion concerning the muslims and the pagan_group regarding the control of a religion. I simply added my custom religion to the list.
 
Is there a way to change which titles have what icon around their flag? For example I wanted to make it so that the Byzantine and Roman Empires had the same Eagle as the Holy Roman Empire.

The actual models are in gfx\models\Shields\.

If you go to intergace, find "mapitems" and you will see this part:

### Special shields ######################################################

EMFXActorType = {
name = "e_hre"
actorfile = "gfx\models\Shields\holy_roman.xac"
scale = 0.5f
use_animation = no
}


Just add more replacing e_hre with whatever you want
 
I believe there are commands to set a character's rank in a society, shouldn't that do the trick?
To set the rank, yes, but I have not found a command to set a new leader/substitute the current one. Remember, many societies can have multiple members of the highest rank.
 
Last edited: