• 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.

ModsNewbie

Sergeant
14 Badges
Jun 13, 2019
64
2
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
I was playing with this file to make a mod that will give me a commander with specific skillsets instead of random, but for some reason, it sometimes generate extra leadership traits that I never wanted.
The usual "random_traits = no" does not seem to work so I have been looking for a solution and then I found these two scripts:

The first one is this:

add_random_commander_trait_effect = {
random_list = {
1 = {
trigger = {
NOT = {
trait = aggressive_leader
}
}
add_trait = aggressive_leader
}


and right underneath the first script was this one:

add_same_commander_trait_as_FROM = {
# random_list = {
if = {
limit = {
NOT = {
trait = aggressive_leader
}
FROM = { trait = aggressive_leader }
}
add_trait = aggressive_leader
}

So I am thinking maybe these two are the reason that my commanders keep appearing with unwanted extra leadership trait.

Can anyone tell me exactly what these scripts do and what would happen if I complete remove them?

Would getting rid of these two scripts completely finally allow me to generate commanders in the way I wanted?

or would it just use the original script file in the game folder instead and completly nullify my mod?
 
The first one is only used in the reconquista event file, and second only in warrior lodge events file.

They just add a random trait to a commander generated, and second one gives a random trait the char teaching the target char has.

I think you should just be able to make your own scripted effect and put it in its own file. You can try commenting out/removing those effects, but I don't know if you need to or if it would break something else.

tl;dr, its not an effect used much at all, so making your own should be fine and removing them is probably a viable option too.