You'd either stick something in gain_title (works rather well if you want something for a single specific title), or you'd make an event and stick it in the on_create_title on_action, and give it triggers so that it only triggers for the title(s) you want.So it could be used in the trigger section or not? That is one could create "The Roman Empire" using the normal title interface (or Tamriel or the Iron Throne or or "The United Kingdoms of Gondor and Arnor" or whatever) and after an event could fire for this and do the normal stuff of "The Roman Empire"? I'd see this more elegant that doing this as a decision...
(is it possible to use the "gain_effect" in landed_titles to emulate this or there are performance reasons because Paradox is not using this?)
The difference between gain_title and on_title_creation is that gain_title is title specific. On_title_creation could use a single event for multiple titles, or even entire cultures, religions, etc. Every event in the on_title_creation on_action will be called whenever a title is created, causing all the events that have their trigger fulfilled to happen.But then they are not using it? Why "The Roman Empire" creation has "always=no" and is createable only via decisions? It is a violation of their same interface!
The only motivation I could imagine that all that "completely_controls" would have needed a scroll bar to be shown (and no scroll bar is previsted in the title creation screen).
I imagine that the "on_action" thing is more efficient right that use "gain_title"?
I presume it's going to work exactly like it sounds: you can define the cultural ethnicity of a character, most likely when you're spawning a character via "create_character" events or generated via history entry.
Normally, it wouldn't make sense for this to be an event effect (i.e. change someone from African tribesman to a blonde Northman), but I suppose there's no harm in allowing it to happen in fantasy/magical contexts.
So, uh, about that bug with female succession in republics. It'd be really nice for modders if that was fixed.
Works already as long as you make sure to name your localisation file something earlier in the alphabet than vanilla's localisation file.Are you porting whatever you do in Eu4 to Ck2 if possible? For example that thing about localisation from mods replacing vanilla localisation without the need to copy localisation files.
You can just use NOT = { martial = x } though, that doesn't exactly take long to do.We have "if = { limit = ..." but there is no "else" (that this do this if the condition of "if" is false") and "else if = { limit = ..." (that is if the first condition is false and this is true...).
For example this code could be written more naturally using if / else if / else:
Code:#A Fight, A Random list with many possibilities, determined based off martial score, triggers the following character_event = { id = gladiators.13 picture = GFX_evt_colosseum trigger = { trait = gladiator } mean_time_to_happen = { years = 5 modifier = { factor = 1.5 trait = humble } modifier = { factor = 1.5 trait = gregarious } modifier = { factor = 0.6 trait = brave } modifier = { factor = 0.5 trait = wroth } modifier = { factor = 0.2 trait = duelist } modifier = { factor = 0.6 martial = 15 } modifier = { factor = 1.8 trait = scholar } modifier = { factor = 0.8 trait = proud } modifier = { factor = 0.5 trait = tough_soldier } } option = { name = "EVTOPTAgladiators.13" if = { limit = { martial = 8 } random_list = { 60 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 20 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 10 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 5 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } else if = { limit = { martial = 10 } random_list = { 50 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 30 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 15 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 5 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } if = { limit = { martial = 12 } random_list = { 40 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 30 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 20 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 10 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } else if = { limit = { martial = 14 } random_list = { 25 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 15 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 10 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 30 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } else if = { limit = { martial = 16 } random_list = { 20 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 10 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 5 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 40 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } else if = { limit = { martial = 18 } random_list = { 15 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 10 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 5 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 60 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } else = { #limit = { # martial = 20 # No useful is implicit! #} random_list = { 10 = { death = { death_reason = death_duel } liege = { character_event = { id = gladiators.16 } } } 10 = { add_trait = maimed liege = { character_event = { id = gladiators.15 } } } 10 = { add_trait = wounded liege = { character_event = { id = gladiators.15 } } } 70 = { prestige = 100 liege = { character_event = { id = gladiators.14 } } } } } } }
Except when you've got complicated if conditions. Then you end up duplicating a huge amount of code.You can just use NOT = { martial = x } though, that doesn't exactly take long to do.
True, regardless more coding features is always niceExcept when you've got complicated if conditions. Then you end up duplicating a huge amount of code.
Yeah that and fixing existing issues with modding are more important than simplifying already existing and very easy script functions.No offense, but I think it's worth a slightly higher priority to make command changes that can't actually be done currently, as opposed to implementing commands which can currently be done but which would make code easier to read.
It is already quite easy to understand man like it is not difficult for one extra line of code also it doesn't help with processor usage much as it is like one line less of code...I could admit that this idea could be at lower priority but please note that an "else if" is not only easier to understand for the humans but it uses less processor power too because, as already said, only one a branch could be valid the others are simply skipped! So in the end could be seen as an optimization...
I think that comparing two variables does not work as intended. I have open a bug report here:
http://forum.paradoxplaza.com/forum...er-is-malfunctioning.&p=17731639#post17731639
Please, take a look at it and confirn/disconfirm it.
Thanks
We have "if = { limit = ..." but there is no "else" (that this do this if the condition of "if" is false") and "else if = { limit = ..." (that is if the first condition is false and this is true...).
Captain, can you take a look at this bug? Should be an easy fix.
I've had as a policy that bugs aren't listed in the suggestions thread; it seems far more logical to me that the bug forum should be used for that purpose, as bug fixing should have higher priority than adding new stuff.so make sure this is listed in the Suggestions thread and I will look at it.
Since you're back on CK2 now, could you check on the status of this bug which I referred to above?
Thank you. I thought it would be an easy fix all along.