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 }
}
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?
war = {
target = <scope of the defender>
cassus_belli = <cb used from the war>
}
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
}
}
check_variable = { which = "bob_saget" value = 4.5 }
Same or more, to check if it is exactly 4.5 use is_variable_equal instead of check_variableDoes the condition "check_variable" checks only the number or "same or more"?
E.g.:
With this, does 5 also is true?Code:check_variable = { which = "bob_saget" value = 4.5 }
Good idea!Why not use set_variable in place of change_variable in the first instance you're using your new variable?
OK, can I use "change_variable" to increase a non existing variable? I presume it starts with zero, right?
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.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?
Wow wait... that's brilliant!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.
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.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.
Right. Kinda obvious now. Guess I should not do modding while tired ^^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.
1001 = {
any_neighbor_province = {
owner = ROOT
NOT = { has_province_modifier = marauding_pirates }
}
}
1002 = {
any_neighbor_province = {
owner = ROOT
NOT = { has_province_modifier = marauding_pirates }
}
}