• 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.
Thank you!


An other question:
Is there an easy way to check a variable which I set or changed (change_variable)? Can I see ingame if my event has change a character variable?
Do you mean check as in use it as a condition or check as in display it as text?
For the former use the check_variable = { which = "x" value = x } command and its variations.
For the latter use a localisation string like [Root.variable_name.GetName] and [Root.variable_name.GetValue] to get the name of the variable and its value, the name must be localised as well to be:
variable_name;My Variable Name;;;;;;;;;;;;;x
 
Thank, i have a following question:

What if i want to display the variable of a specific character? I made event_target:duelist_1 and event_target:duelist_2, what should i use if i want to show the variable_name of duelist_1, something like: [event_target:duelist_1.variable_name.GetValue] ??
Just [duelist_1.variable_name.GetValue] is needed
 
  • 1
Reactions:
@Divine is there anyway to directly call a combat tactic from an event? For instance, I want a morale boost combat pulse event, that when it triggers forces the army lead by the character to go into a specific courageous advance tactic.
No such effect exists at the moment, made a note on my todo list about it. I did have a quick check on the combat modifiers for character modifiers also. My primary concern is the performance concern by having to check for more things when we update the modifiers so I can't really promise anything.
 
  • 1
Reactions:
@Divine Is there any resource about the specifics of character generation (especially courtiers)? I'd like to influence their culture (and from what I understand their usually end up with their liege's, which I don't want)
I don't think there is anything at all, the best you can do is a 0 mtth event to change their culture or for better performance do a yearly pulse event
 
I'm creating a bloodline mod and I was wondering if there's any way to tell my event to add trait anybody belonging to my dynasty?
I tried dynasty = ROOT but it got nasty and everybody got the trait.
any_dynasty_member = { add_trait = bloodline }
 
Is it possible to mod in a way for characters to be revived upon death, whether by random chance or otherwise? And can one change what things are called in-game, like calling the currency something other than 'gold'?
Yes and no for reviving characters. You cannot revive an already dead character but you can stop them from being killed to simulate reviving them without them ever actually dying in game. You would have to make a trait and give it the immortal = yes line which prevents death by disease or age but it does not prevent event scripted death. To stop that for every time in any event or decision etc your character can die you must ad an if clause before that checking for your immortal trait and if it is present doing a break = yes before the line that kills the character.
 
I've looked a bit at the scripted files in Stellaris, and I sure hope some of their goodies come our way. They have If/Else and While constructs!
I believe that is one of their perks for being on an updated version of the Clausewitz engine which we do not have, hopefully they can be retroactively added into CK2 though!
 
  • 1
Reactions:
The modified localization is in file v2.50b.csv in the respective mod folder path, but still no localization change for Heritage...

And since today, my mod no longer works - no child gets focus automatically. The event is in on_actions/startup, but nada. See event below.

character_event = {
id = focus.startup

max_age = 12

is_triggered_only = yes

hide_window = yes

trigger = {
has_dlc = "Zeus"
NOT = { age = 12 }
NOT = { has_character_modifier = focus_ch_pride }
NOT = { has_character_modifier = focus_ch_struggle }
NOT = { has_character_modifier = focus_ch_duty }
NOT = { has_character_modifier = focus_ch_thrift }
NOT = { has_character_modifier = focus_ch_humility }
NOT = { has_character_modifier = focus_ch_etiquette }
NOT = { has_character_modifier = focus_ch_faith }
NOT = { has_character_modifier = focus_ch_heritage }
}

option = {
name = OK
random_list = {
10 = { set_focus = focus_ch_pride }
10 = { set_focus = focus_ch_struggle }
10 = { set_focus = focus_ch_duty }
10 = { set_focus = focus_ch_thrift }
10 = { set_focus = focus_ch_humility }
10 = { set_focus = focus_ch_etiquette }
10 = { set_focus = focus_ch_faith }
10 = { set_focus = focus_ch_heritage }
}
}
}

NOTE that it worked before, just like intended.
Your event ID seems a bit off. You can use a namespace before the dot but after the dot you need a number unless I'm mistaken. Try to change the ID for the event and the on_action file and see if that works.
 
You learn something new every day I guess. I didn't think you could do that. I'll have to dig into how it will evaluate. Good thing that you found the problem. :)
For the localisation it should replace the file. This entry might be relevant however 'focus_ch_heritage_title'?
 
IIRC the father/mother = <scope> in character generation just doesn't work, you have to do it in a new_character clause. I think it has been this way for quite a while
 
Is it possible to make it so that a holding (castle, city, etc) is unbuildable without a special decision, I know you can build holdings with a decision/event chain.
Sort of. You can set the cost pf creating holding into the millions, and then make the decision usable under whatever circumstamces you wish.
Or make it so no governments can build any holdings then use the decisions to make them
 
Any number of reasons. Seems like they're rewritten pretty much everything.
I don't think I can salvage my own mod at all, not without hundreds of hours of work. WinMerge is of absolutely no use when the files are over 80% different from the previous version. For instance, 00_scripted_triggers.txt is so different that WinMerge can't find good matches and ends up matching everything incorrectly.
They haven't rewritten that much to be honest, most things are in new folders completely or a new event/decision files. The changes to scripted triggers is mostly a giant block of trait checking scripted triggers paradox added.
 
  • 1
  • 1
Reactions:
Is there a way to add an alliance via an event?
add_alliance = { who = <scope> years = x }
I can't remember if you need a pre-existing nap for it to work but if you do then you can just in a hidden tooltip this before you make the alliance
Code:
opinion = {
    modifier = in_non_aggression_pact
    years = x
    who = <scope>
}
reverse_opinion = {
    modifier = in_non_aggression_pact
    years = x
    who = <scope>
}