• 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.
Showing developer posts only. Show all posts in this thread.
Update:

- Added remove_nickname effect
 
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?)
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.
E.G., "FROM = e_roman_empire".
 
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"?
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.
 
  • 1
Reactions:
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.

I figured White Walkers had something to do with that request... ;)
 
So, uh, about that bug with female succession in republics. It'd be really nice for modders if that was fixed.

Please link me to such a bug report so I can have all details needed.
 
All of the additions & fixes posted in this thread so far will be in the next patch. And with that I will return to EU4 for a couple of weeks.
 
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.
Works already as long as you make sure to name your localisation file something earlier in the alphabet than vanilla's localisation file.
Still would be nice to have mod localisation always override rather than based on lexical order though, but no copying of localisation files has ever been necessary.
 
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 } 
					}
				}
			}
		}
	 }
}
You can just use NOT = { martial = x } though, that doesn't exactly take long to do.
 
You can just use NOT = { martial = x } though, that doesn't exactly take long to do.
Except when you've got complicated if conditions. Then you end up duplicating a huge amount of code.
 
  • 1
Reactions:
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.
Yeah that and fixing existing issues with modding are more important than simplifying already existing and very easy script functions.
 
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...
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 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

See your bug report for an answer.

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

Unfortunately that wouldn't work. The trigger system is built so one trigger knows nothing about what comes before or after it.
 
Update:

- Fixed problems with the variable triggers check_variable and is_variable_equal
- Variable triggers and effects can compare variables between types of scopes (country/province)
 
Captain, can you take a look at this bug? Should be an easy fix.

I'm not officially back on CK for a while - I'm doing EU4 this week and then I have to look at some upcoming games for the next 3-4 weeks. But I will have some time to work on CK stuff before the next big patch, so make sure this is listed in the Suggestions thread and I will look at it.
 
so make sure this is listed in the Suggestions thread and I will look at it.
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.
 
Update:

- Added save_event_target_as effect
- Added save_global_event_target_as effect
- Added clear_global_event_target effect
- Added clear_global_event_targets effect
- Saved event targets possible to use as right-side arguments
- Saved event targets possible to use in localization

This update is a rather big one so I've created a separate thread to describe what it means in detail:

http://forum.paradoxplaza.com/forum/showthread.php?800491-New-effect-for-saving-event-targets
 
Since you're back on CK2 now, could you check on the status of this bug which I referred to above?

I'm not really "back" but I found the problem with this and since it was such a quick fix it will be in the Charlemagne release.
 
Thank you. I thought it would be an easy fix all along.

Yeah, but so does every other modder about every other request... ;)
 
Update:

- Exported MAX_CROWN_LAW_CHANGES to defines