• 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.
So I imagine this would be done through on_actions, but I can't find an appropriate on_action in on_actions.log; I want an event to fire which adds one trait out of some options when another trait reaches a certain amount of xp (just one track), i.e.

Trait A reaches 10 xp in Track;
Event fires, gives options between Traits W, X, Y, Z, the player chooses e.g. W;
Trait A reaches 50 xp in Track;
Event fires, gives options between Traits X Y Z, the player chooses e.g. X;
Trait A reaches 100 xp in Track
Event fires, gives options between Traits Y Z, the player chooses e.g. Y.

If there is an appropriate on_action could someone point it out, otherwise if there is a better way to do this (completely new to CK3 modding), please let me know!

Semi-Solved: story cycles seem to be a better fit for this case, although I'd still be curious if the above can be done through on_actions.
 
Last edited:
Hi! How do I use "comparing" triggers like attacker_war_score or domain_limit_percentage as value for script_value / variable / directly in events? I dont want to compare it to anything, i just want to write their value (attacker war score or domain limit percent) to my script value / variable / event.
 
I'm trying to change the starting Court chaplain / Archbishop of Castile in 1178 from a random guy to a pre-set character. How can I do it?
Code:
    1178.6.28 = {
        employer = 212740 #Geneva
        give_council_position = councillor_court_chaplain #Bishop of Geneva
    }

Do this in the character you want to be chaplain/bishop. The employer is the court where he should be bishop.
 
  • 1
Reactions:
Hi everyone !

After many hours poured into the game, been trying to learn a couple of modding things the way I did with CK2. Everything going smoothly but I got myself stuck with something that seemed simple initially :
  • I have a custom culture "my_culture"
  • I'm trying to give children a trait if one of their parent is the culture head
  • And trying to give the culture head a trait
Here are the three code pieces I've done, one is in a txt in my mod /common/on_action

Code:
random_yearly_playable_pulse ={
    events ={
        event_my_culture.1
    }
}

on_birth_child = {
    events = {
        event_my_culture_birth.1
    }
}

Then I have the event for the culture head in a file in /events/

Code:
namespace = event_my_culture

 event_my_culture.1 = {
    type = character_event
    hidden = yes

    trigger = {
        culture.culture_head = root
        culture = my_culture
    }

    immediate = {
        add_trait = my_culture_head_trait
    }
}

and one with the child event in the same folder

Code:
namespace = event_my_culture_birth

event_my_culture_birth.1 = {
    type = character_event
    hidden = yes
    
    trigger = {
        any_parent = {
            culture = my_culture
            culture.culture_head = this
        }
    }

    immediate = {
        add_trait = my_culture_baby_trait
    }
}

The traits do work if added with the console command, and the events if triggered through the console do add the traits, even though it seems they do not check for the triggers. I'd love any pointers towards a solution !
Thanks :)
 
I'd love any pointers towards a solution !
Try these:
Code:
    trigger = {
        culture = culture:my_culture
        culture.culture_head ?= this
    }
Code:
    trigger = {
        any_parent = {
            culture = culture:my_culture
            culture.culture_head ?= this
        }
    }
 
  • 1Like
Reactions: