• 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.
You are missing a border for your window - I'm not sure the event will run without one.
Have you run it through the validator? It should warn you about things like that.

It validates, tests, and fires via console without any issues. But I do see that it looks like my picture should actually be the portrait value. I wonder why it would fire with these issues via console but not normally. Odd. I'll fix and see if it works.

Edit: Modified the code and added this. It still won't pop up when the game starts after customizing your character and assigning the appropriate trait. It fires just fine when forced through console.
Code:
    picture = GFX_evt_battle
    border = GFX_event_normal_frame_intrigue
 
Last edited:
So I fire my mod event from on chronicle start using the following:
Code:
#character
on_chronicle_start = {
    events = {
        #Refresh traits chosen in character designer to fix immortal age bug
        twoimmortal.1
    }
}

For whatever reason this won't launch the event. If I use testevent, it evaluates as I would expect. If I run it using the event command, it pops up and works exactly as I expected.

Here is my event code:
Code:
namespace = twoimmortal
character_event = {
    #Remove and re-add immortal firstimmortal and secondimmortal traits on startup
    #    allows the character to be age locked to whatever was selected
    #    in ruler designer.
    id = twoimmortal.1
    title = EVTTITLVNL2
    desc = EVTDESCAtwoimmortal.2
 
    #desc = {
    #    trigger = { trait = firstimmortal }
    #    text = EVTDESCAtwoimmortal.2
    #}
 
    #desc = {
    #    trigger = { trait = secondimmortal }
    #    text = EVTDESCBtwoimmortal.2
    #}
 
    picture = GFX_event_normal_frame_intrigue
    is_triggered_only = yes
    ai = no
 
    trigger = {
        OR = {
            trait = secondimmortal
            trait = firstimmortal
        }
    }
 
    option = {
        trigger = { trait = firstimmortal }
        name = EVTOPTAtwoimmortal.2
        random_playable_ruler = { add_trait = secondimmortal }
    }
 
    option = {
        trigger = { trait = secondimmortal }
        name = EVTOPTBtwoimmortal.2
        random_playable_ruler = { add_trait = firstimmortal }
    }
 
    option = {
        name = EVTOPTCtwoimmortal.2
    }
 
    after = {
        if = {
            limit = { trait = firstimmortal }
            remove_trait = firstimmortal
            add_trait = firstimmortal
            add_trait = brave
        }
     
        if = {
            limit = { trait = secondimmortal }
            remove_trait = secondimmortal
            add_trait = secondimmortal
            add_trait = brave
        }
    }
}

Any ideas on why this would be? Is there something I need to set to make this work as expected? Do events fired from on_chronicle_start get displayed or are they always hidden?

Edit: My mod asks the user if they want to give the opposite of their trait to a random playable ruler. This is for RP purposes. After that, it refreshes the trait so that your portrait won't age. This is only important for characters designed in the ruler designer. For characters not done this way, I'll have another way to gain the traits within the game.

On_chronicle_start will only give you weird behaviour if playing as a ruler designed character, but still you should be seeeing the event in that case.
 
On_chronicle_start will only give you weird behaviour if playing as a ruler designed character, but still you should be seeeing the event in that case.

I thought On_chronicle_start was designed for ruler designed characters specifically?

Edit: Well, I guess not designed for it. It's just supposed to only fire the once. Perhaps I could just fire it after a day has passed or something?

Quote from: https://ck2.paradoxwikis.com/Event_modding
Fires for the player character, when the game starts (but not when loading from saves). Also works when Charlemagne DLC is not active.

Note: for ruler designed characters, fires twice (for the historical character and player ruler designed character).
 
I thought On_chronicle_start was designed for ruler designed characters specifically?

Edit: Well, I guess not designed for it. It's just supposed to only fire the once. Perhaps I could just fire it after a day has passed or something?

Quote from: https://ck2.paradoxwikis.com/Event_modding

There is a bug where it currently fies twice: once for the historical character you're replacing and another for the custom character. if the event is not hidden, the player receives both events and can choose option for both.

You can do this: fire a hidden event on_chronicle_start that fires a second event with a delay of one day. Put ai = no in this second event. That should do.
 
I know this is basically heresy, but how hard would it be to mod out Glitterhoof? Is it enough to go into the events, find the one that spawns Glitterhoof, and comment it out? Or will that cause problems somewhere else?
 
Hey guys,

Does anybody know the DIGNITY values of Count/Duke/King/Emperor tier titles?

I can't find that info anywhere.

I want to give my courtiers some custom created titles but I want to make sure they make the new titles their primary titles if they already have a title of the same tier. I need to do this by ensuring the new title has a higher dignity, correct?

Thanks
 
I know this is basically heresy, but how hard would it be to mod out Glitterhoof? Is it enough to go into the events, find the one that spawns Glitterhoof, and comment it out? Or will that cause problems somewhere else?
Easier than that - in the event that spawns Glitterhoof, there should be an "if = { limit = { dlc = "Zeus" }" part that spawns Glitterhoof in your court. In your mod, just repalce dlc = "Zeus" with always = no (or delete that if block entirely)
 
There is a bug where it currently fies twice: once for the historical character you're replacing and another for the custom character. if the event is not hidden, the player receives both events and can choose option for both.

You can do this: fire a hidden event on_chronicle_start that fires a second event with a delay of one day. Put ai = no in this second event. That should do.

That sounds like it could work but I'm not seeing how I would put a single day delay on an event call. Is this achieved with a timer of some kind?
 
You would call an event with hide_window = yes, and in its immediate block, have character_event = { id = twoimmortal.1 days = 1}

Well, same problem apparently. If I try to fire the parent event, that sets the 1 day delay, it still doesn't fire it. Fires if I call the first event from the console, waits the day, then brings up the message.

I also just tried changing to on_startup instead of on_chronicle_start. It still doesn't launch the event. I feel like if this was broken I wouldn't be the only one having a problem. There would have to be more mods running into issues here. Everything validates fine, tests, and runs when called from console.

Any other ideas on what I could try guys?
 
Well, same problem apparently. If I try to fire the parent event, that sets the 1 day delay, it still doesn't fire it. Fires if I call the first event from the console, waits the day, then brings up the message.

I also just tried changing to on_startup instead of on_chronicle_start. It still doesn't launch the event. I feel like if this was broken I wouldn't be the only one having a problem. There would have to be more mods running into issues here. Everything validates fine, tests, and runs when called from console.

Any other ideas on what I could try guys?
How exactly are you adding it to on_chronicle_start?
 
How does the Coptic Pope usurp his capital barony? As it stands, it looks like he takes b_alexandria whenever it is held by someone of his religion and becomes a vassal of the top liege of the barony. I couldn't find where this behavior is dictated in the game files.

I'm hoping to use that same function for some other titular titles I'm making.
 
The only thing I can think of is that your on_actions file being on the wrong folder or having the wrong extension (should be /common/on_actions and .txt.

Nothing, the only thing I can see is when I put in the on_action file that calls that event, it gives the following in the validator:
At <unkown location>;
There were no setters for this event target demander


What does this mean? If I remove the on action call, it doesn't show this so that has to be it.

Edit: I was wrong, it seems to show for my event regardless of on_action being there or not. Perhaps it's not firing because it's confused on who to target on start?
 
Last edited:
Nothing, the only thing I can see is when I put in the on_action file that calls that event, it gives the following in the validator:
At <unkown location>;
There were no setters for this event target demander


What does this mean? If I remove the on action call, it doesn't show this so that has to be it.

Edit: I was wrong, it seems to show for my event regardless of on_action being there or not. Perhaps it's not firing because it's confused on who to target on start?

That shouldn't be a problem. That errors it's supossed to mean that you are using event_target:xxx without a save_event_target = xxx but it might just as well be that the file in whixh you've set the target is not xureently being validated so that usually is a false positive.

The only other thing that could be happening here is that the namespace = myimmortaltraitmod line is misspelled. Other than that I'm totally perplexed.

Wait, are you running any other mod? Maybe another mod has an on_actions file with the same name as yours and is overriding it.
 
That shouldn't be a problem. That errors it's supossed to mean that you are using event_target:xxx without a save_event_target = xxx but it might just as well be that the file in whixh you've set the target is not xureently being validated so that usually is a false positive.

The only other thing that could be happening here is that the namespace = myimmortaltraitmod line is misspelled. Other than that I'm totally perplexed.

Wait, are you running any other mod? Maybe another mod has an on_actions file with the same name as yours and is overriding it.

I hate my life, but I love you.

I must have been reading about complete overhaul mods or something when I made my file. I named it 00_on_actions. Which of course, is the default of the base game file...

Edit: Works exactly as it should now.
 
Hey guys, while testing my mod I noticed that the random_playable_ruler seems to always pick and add a trait to the same ruler. Am I doing something wrong? Is there an additional value I need to add in order to make sure it's fully random?

My Option Code:
Code:
option = {
        trigger = { trait = immortalB}
        name = EVTOPTAvnltbchtmds.1
        random_playable_ruler = {
            add_trait = immortalB
         }
    }

Edit: If it's done when the game starts, it will always pick Alfr of Alfheimr when using the 769 start date. Always picks High Cheif Tyueykezhut of Merya when starting in 867. If I fire the event in game later, from console, it will pick someone new every time.
 
Last edited:
Hey guys, while testing my mod I noticed that the random_playable_ruler seems to always pick and add a trait to the same ruler. Am I doing something wrong? Is there an additional value I need to add in order to make sure it's fully random?

My Option Code:
Code:
option = {
        trigger = { trait = immortalB}
        name = EVTOPTAvnltbchtmds.1
        random_playable_ruler = {
            add_trait = immortalB
         }
    }

Edit: If it's done when the game starts, it will always pick Alfr of Alfheimr when using the 769 start date. Always picks High Cheif Tyueykezhut of Merya when starting in 867. If I fire the event in game later, from console, it will pick someone new every time.
Well, that's probably another problem with funky "randomness".
As with all PC games, or programs really, there is no such thing as true randomness: A random result is only simulated via a generated random seed. Problem is that because this seed is generated by some sort of algorithm, it's not really random and can be the same if the generation is the same.
In CK2 specifically, there used to be an oversight that made a random_list always give the same result, if it was called multiple times within the same event. For example, if you wanted to give every province in the game one of three modifiers, let's say "rich", "normal" and "poor", and at some point (maybe gamestart) you would call an event that scopes to every province, and fires a random_list with those three options for every province, it would result in all provinces getting the same modifier, e.g. all "rich" or all "poor", but no combination! That error was fixed a while ago, but
TL;DR: Maybe there is a similar problem with randomness related to random scopes in general, or this scope only? So that instead of true randomness, it always picks the same random result at a given time?

This should really be fixed by vanilla if that is true; but to circumvent it, maybe you could try some things: Fire another event first and have it call one of three events, which all basically do the same and apply your trait via a random_playable_ruler scope. But because they are called via a (now actually working) random thing, maybe the scope will also actually be random in the second event.
Maybe that would work, maybe not, I am not sure. But you could try it out.