• 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.
Can somebody tell me please where I did mistake? I am getting all 3 custom slavic holy orders without character and cant create them + vanilla "Warriors of Perun" dont appear.
PS: Slavic religion is ofc reformed and I am controlling 4 faith control points.
 

Attachments

  • test.png
    test.png
    3,4 MB · Views: 8
I've created the following traits:
Code:
fertile = {
    potential = {
        is_female = yes
    }
    
    birth = 100
    inherit_chance = 15
    
    fertility = 1.5
    
    opposites = { barren }
}
barren = {
    potential = {
        is_female = yes
    }

    birth = 100
    inherit_chance = 25
    
    fertility = -10
    
    opposites = { fertile }
}
virile = {
    potential = {
        is_female = no
    }

    birth = 100
    inherit_chance = 15
    
    fertility = 1.5
    
    opposites = { impotent }
}
impotent = {
    potential = {
        is_female = no
    }

    birth = 100
    inherit_chance = 25
    
    fertility = -10
    
    opposites = { virile }
}

They're meant to be sex-specific, as indicated by the potentials, but I'm still finding virile/impotent women and fertile/barren men. Any suggestions on how to prevent this?
 
Is there a way to buff Harold Godwinson somewhat in the September 1066 start? IRL, he outnumbered and whupped the Norwegians pretty handily, and stood a fair chance against William, but in game, he's just too badly outnumbered. I'd like to buff his starting army to something more competitive, so I can get on to the Anglo-Saxon High Middle Ages. Could anyone write a set of code that would give me an army that's reasonable but not totally ridiculous?
 
I've created the following traits:
Code:
fertile = {
    potential = {
        is_female = yes
    }
   
    birth = 100
    inherit_chance = 15
   
    fertility = 1.5
   
    opposites = { barren }
}
barren = {
    potential = {
        is_female = yes
    }

    birth = 100
    inherit_chance = 25
   
    fertility = -10
   
    opposites = { fertile }
}
virile = {
    potential = {
        is_female = no
    }

    birth = 100
    inherit_chance = 15
   
    fertility = 1.5
   
    opposites = { impotent }
}
impotent = {
    potential = {
        is_female = no
    }

    birth = 100
    inherit_chance = 25
   
    fertility = -10
   
    opposites = { virile }
}

They're meant to be sex-specific, as indicated by the potentials, but I'm still finding virile/impotent women and fertile/barren men. Any suggestions on how to prevent this?

The only way that could be happening is through inheritance. Off the top of my head, I would say a on_birth maintenance event to swap the wrong gender trait. Or, better, use custom localizations to change the trait name and description instead of making separate traits :p
 
Is there a way to buff Harold Godwinson somewhat in the September 1066 start? IRL, he outnumbered and whupped the Norwegians pretty handily, and stood a fair chance against William, but in game, he's just too badly outnumbered. I'd like to buff his starting army to something more competitive, so I can get on to the Anglo-Saxon High Middle Ages. Could anyone write a set of code that would give me an army that's reasonable but not totally ridiculous?

Character ID 122 in the history\characters\saxon.txt
Increase force_mult to 1.0 for example, you can also edit his bonus troops or add to them in the effect = {} block.
 
1. For war, run it from the scope of the attacker (from the defender, use reverse_war) and it should look like this:
Code:
war = {
    target = <scope of the defender>
    cassus_belli = <cb used from the war>
}
There are also a few other options available, like thirdparty_title, which I think is used for claim wars, infamy, which can override how much threat the war generates, and tier, which I don't know the effect of

diplomacy_penalty will never cause an actual increase in the stat. Possitive values are instead used to negate other diplomacy_penalty modifiers. As an example, this is used for illness and treatment in Reaper's Due. Your physician's treatment can only offset the penalties for a disease; it can't make you better than if you were actually healthy
 
I am having trouble getting this event to fire although it was working before when I was using IF/limits for my requirements.

Not too sure I am doing it the right way now. Looking for some advice on to proceed.
Code:
character_event = {
      
        id = CHIV.002
        desc = EVTDESC002CHIV
        #DISBAND SOCIETY IF GRANDMASTER REQ NOT MET

        is_in_society = yes

        trigger = { #GRANDMASTER OF ORDER DOES NOT HAVE REQS
            is_society_grandmaster = yes
            society_member_of = order_of_the_garter
            NOR = {
                landed_title = k_england
                primary_title = { title = k_england }
                culture = english
                religion_group = christian
                is_feudal = yes
            }     
        }

        immediate = { #DISMISSES ALL MEMBERS
            any_society member = {
                limit = {
                    society_member_of = order_of_the_garter
                }
                leave_society = yes
            }
            leave_society = yes 
        }

        option = {
            name = EVTOPTA002CHIV
        }
}
 
Does the condition "check_variable" checks only the number or "same or more"?

E.g.:
Code:
check_variable = { which = "bob_saget" value = 4.5 }
With this, does 5 also is true?
Same or more, to check if it is exactly 4.5 use is_variable_equal instead of check_variable
 
OK, can I use "change_variable" to increase a non existing variable? I presume it starts with zero, right?

IIRC yes, the variable is assumed to be 0 in that case. But I could be misremembering.
 
Great!

OK, can I use "change_variable" to increase a non existing variable? I presume it starts with zero, right?

And how many options can I use in an event?
You can but if you are directly setting the value of a variable then just using set_variable as said above works. And yes it does get assumed to be 0.
You can have 4 options displayed in an event at any one time but an event can have more than 4 options but you will only see the first 4. A common trick to have scrolling list is to have the first option change a value on a variable or change a flag then re-call the event, have the first 3 options after that one require the value/flag to be 1, the next 3 options have the value/flag be 2 and so on. So when you click the first option it changes the value/flag and re-call the event to display the next set of options.
The AI is not bound to this limit and evaluates all options regardless of if they would be displayed in the event window to a player.
 
You can but if you are directly setting the value of a variable then just using set_variable as said above works. And yes it does get assumed to be 0.
You can have 4 options displayed in an event at any one time but an event can have more than 4 options but you will only see the first 4. A common trick to have scrolling list is to have the first option change a value on a variable or change a flag then re-call the event, have the first 3 options after that one require the value/flag to be 1, the next 3 options have the value/flag be 2 and so on. So when you click the first option it changes the value/flag and re-call the event to display the next set of options.
The AI is not bound to this limit and evaluates all options regardless of if they would be displayed in the event window to a player.
Wow wait... that's brilliant!
I always thought I had to make multiple events, with the last option opening the next event etc., but then I ran into issues with the AI chosing properly. If the ai, however, would be seeing all of them, and only the humans be cycling, that would solve it.
Just to be sure, you mean the flag is checked in the trigger section of the options? And the ai does ignore that part?! Confuses me a bit... or I did understand wrong.
 
Wow wait... that's brilliant!
I always thought I had to make multiple events, with the last option opening the next event etc., but then I ran into issues with the AI chosing properly. If the ai, however, would be seeing all of them, and only the humans be cycling, that would solve it.
Just to be sure, you mean the flag is checked in the trigger section of the options? And the ai does ignore that part?! Confuses me a bit... or I did understand wrong.
The AI does not ignore the triggers, but you can just make the flag changing option player only and in all the others have an OR to check for either the flag or being an AI.
 
The AI does not ignore the triggers, but you can just make the flag changing option player only and in all the others have an OR to check for either the flag or being an AI.
Right. Kinda obvious now. Guess I should not do modding while tired ^^
Well, thanks for clearing that up, this approach will save me a lot of headaches with the ai.
 
I want check all coastal provinces in specific gulfs. I made this code, but game see here endless OR. Anybody have idea to repair or rework? If I will remove this fragment of all event - option shows up.

Code
Code:
       1001 = {
           any_neighbor_province = {
               owner = ROOT
               NOT = { has_province_modifier = marauding_pirates }
           }
       }
       1002 = {
           any_neighbor_province = {
               owner = ROOT
               NOT = { has_province_modifier = marauding_pirates }
           }
       }

Resoult
1F23F15C94F63878341DE85E94EDE03699EFE07E
 
Last edited: