• 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.
Something I want to confirm:
For scopes, I noticed if I use %trait_name% as my scope, even though according to the Wiki it has an "any" label for FROM, it seems to actually be "random."
I noticed the same a while back. Could've sworn that it used to be 'any' like in the wiki, but now it definitely only scopes to a single random character.

...maybe it got changed at some point. In any case, it's currently kind of useless. I'm only using it for election voting in my own mod.

Does anybody know something about it? I've tried just for testing purposes adding prison_reason yes on the
Code:
opinion_heretic = {
    opinion = -25
    prison_reason = yes
    revoke_reason = yes
}
but no results.

Thanks again!
Maybe I'm wrong about this, but as far as I know, 'prison_reason' only works if set between two characters. So that opinion modifier needs to be set from the liege to the heretic to allow imprisonment.
 
  • 1
Reactions:
Maybe I'm wrong about this, but as far as I know, 'prison_reason' only works if set between two characters. So that opinion modifier needs to be set from the liege to the heretic to allow imprisonment.

But as far as I know, these opinion_modifiers are set between each character in the game by default. So by just adding that line would mean every liege should be able to imprison every heretic, right?
 
I noticed the same a while back. Could've sworn that it used to be 'any' like in the wiki, but now it definitely only scopes to a single random character.

...maybe it got changed at some point. In any case, it's currently kind of useless. I'm only using it for election voting in my own mod.


Maybe I'm wrong about this, but as far as I know, 'prison_reason' only works if set between two characters. So that opinion modifier needs to be set from the liege to the heretic to allow imprisonment.

Thank you, glad to know I'm not going crazy. I'm putting a big fat question mark on the wiki next to the "any" entry.
 
I'm trying to set up a bunch of random events, but my random_list isn't working properly. I don't want an event in it to fire more than once every 2 years, so I use a had_character_flag condition with a factor = 0 to make that happen, but it keeps firing again and again. This is the code for the random_list:
Code:
 random_list = {
   5 = {                                                                         ### Ambushed by brigands 
      modifier = {
         factor = 0                       
         had_character_flag = {
            flag = ambushed_by_brigands
            days = 730                        # same event shouldn't fire for 2 yrs
         }                   
       }
       character_event = { id = adventuring.2  days = 7 random = 30 }
   }                                                                           
   1 = { character_event = { id = adventuring.1  days = 30 random = 10 } }        ### Cycle back to same event
}
I have set up the bit with adding and clearing flags properly, so that shouldn't be the issue. Or do character_flags have to be in effect for a certain length of time (I add them and then clear them in events that fire right after one another)?

Any help would be appreciated.
 
I'm trying to set up a bunch of random events, but my random_list isn't working properly. I don't want an event in it to fire more than once every 2 years, so I use a had_character_flag condition with a factor = 0 to make that happen, but it keeps firing again and again. This is the code for the random_list:
Code:
 random_list = {
   5 = {                                                                         ### Ambushed by brigands
      modifier = {
         factor = 0                     
         had_character_flag = {
            flag = ambushed_by_brigands
            days = 730                        # same event shouldn't fire for 2 yrs
         }                 
       }
       character_event = { id = adventuring.2  days = 7 random = 30 }
   }                                                                         
   1 = { character_event = { id = adventuring.1  days = 30 random = 10 } }        ### Cycle back to same event
}
I have set up the bit with adding and clearing flags properly, so that shouldn't be the issue. Or do character_flags have to be in effect for a certain length of time (I add them and then clear them in events that fire right after one another)?

Any help would be appreciated.
had_character_flag trigger only returns true if you've actually had the character flag for 730 days.
Code:
modifier = {
    factor = 0
    has_character_flag = ambushed_by_brigands # If you have the flag
    NOT = {
        had_character_flag = { # AND you haven't had it for 2 years.
            flag = ambushed_by_brigands
            days = 730
        }
    }    # Then this complete trigger will return true giving this
         # random_list entry a weight of 0.
}
Another way to handle it is just to use the trigger has_character_flag and let your ambush event fire a hidden delayed event 2 years later that clears the character flag.
 
Ohhh, I thought the had_flag checked if the flag had been in effect during the 730 days. As for clearing the flag after two years, that's how I usually do it, but I thought I'd do something more clever this time (since I plan to have like 20 random event in the list).

Thanks a bunch for the help!
 
Utterly confused: In modding plots, what is the difference between the "target_potential" - block and the "allow" - block? I can't figure it out in the WIKI, perhaps someone knows more ...

Code:
  # Target scope
    target_potential = {
              is_rival = FROM
    }

        allow = {
               is_rival = FROM
    }

Have you put cached = yes inside the trait definitions you want to use this way?

The "character" trigger ought to accept numerals for character ID.

Looking at vanilla examples, target_potential is used to exclude characters that would be targets of other, similar plots, and allow to cover other conditions, but perhaps @Divine will be able to explain better (and perhaps explain the differences between the various plot types and flags, as I don't think we've been able to figure those out completely on our own.)
First off iirc they have different scopes. target_potential : ROOT = target, FROM = plotter, allow : ROOT = plotter, FROM = target.
Also if the potential trigger fails the plot will not show in the interface, however if the potential trigger succeeds then the plot would either be grayed out if it's not allowed or be click-able if the allow also succeeds.

About the different types of plots. It's kind of a combination of the targeted_decisions filters and defining the target and in extension also having a different scope in the various triggers and effects.
 
First off iirc they have different scopes. target_potential : ROOT = target, FROM = plotter, allow : ROOT = plotter, FROM = target.
Also if the potential trigger fails the plot will not show in the interface, however if the potential trigger succeeds then the plot would either be grayed out if it's not allowed or be click-able if the allow also succeeds.

About the different types of plots. It's kind of a combination of the targeted_decisions filters and defining the target and in extension also having a different scope in the various triggers and effects.

Could you confirm wether the behaviour of cached traits has changed? cached traits used to scope to all its holders, but now it seem to scope to a random one.
(Also, is it intended that it can scope to dead holders of the trait?)
 
I have a couple of hopefully quick questions...

1) I'm modifying Trade Routes to create a 'Province Centric' trade route. It all works, but in the Tradezones view, a few sea Provinces are showing up 'red', others are blue, and some are white. Any idea why this would be? IT does not seem to be obviously tied to conflict/wars/et cetera...

2) Are Concubines hard-coded? I want to modify who can become a Concubine, but it seems like I cannot find where these are defined.

Thanks for any info.
 
1) You're probably seeing merchant republic trade zones.
2) The diplomatic action to get a concubine is hard-coded. If you want to customize who can become one, you'll have to disable the diplomatic action in defines and write a replacement targeted decision.
 
1) You're probably seeing merchant republic trade zones.
2) The diplomatic action to get a concubine is hard-coded. If you want to customize who can become one, you'll have to disable the diplomatic action in defines and write a replacement targeted decision.

And even then, there are some hardcoded-ness to them: only men can have concubines, only women can be concubines, and only the man's goernment and/or religion allows it.
 
I ended up using two custom tooltips in a single event option problem is it prints the second one out right at the end of the first one, no new line or space in between. Any way to force a new line?
 
Could you confirm wether the behaviour of cached traits has changed? cached traits used to scope to all its holders, but now it seem to scope to a random one.
(Also, is it intended that it can scope to dead holders of the trait?)
There doesn't seem to have been any recent changes to it.
I think it might be some confusion due to the interesting thing that the trigger "<trait> = { }" will go through all of the characters and return true if any trait holder fulfills the conditions. So the trigger is functionally a "any_" trigger. While the effect "<trait> = { } will pick out a random trait holder and run the effects.

I ended up using two custom tooltips in a single event option problem is it prints the second one out right at the end of the first one, no new line or space in between. Any way to force a new line?
Try to use backslash + n, "\n", where you want a newline.
 
  • 1
Reactions:
1) You're probably seeing merchant republic trade zones.
2) The diplomatic action to get a concubine is hard-coded. If you want to customize who can become one, you'll have to disable the diplomatic action in defines and write a replacement targeted decision.
Ah, I am! Silly me! :/

And even then, there are some hardcoded-ness to them: only men can have concubines, only women can be concubines, and only the man's goernment and/or religion allows it.

Hmm, so this might end up being bigger than I hoped... Thanks for the info! :D
 
There doesn't seem to have been any recent changes to it.
I think it might be some confusion due to the interesting thing that the trigger "<trait> = { }" will go through all of the characters and return true if any trait holder fulfills the conditions. So the trigger is functionally a "any_" trigger. While the effect "<trait> = { } will pick out a random trait holder and run the effects.
That explains it. The wiki page should be clarified then. Thank you!
 
2) Are Concubines hard-coded? I want to modify who can become a Concubine, but it seems like I cannot find where these are defined.
Yep, like others said. It's a major pain, especially for fantasy mods. For the longest time, I had the problem of rulers taking monsters as concubines, etc.

But you can kind of work around it by immediately undoing those. By using the 'on_forced_consort' on_action, and the 'gain_effect' for the minor title 'title_courtesan' (in 00_minor_titles.txt).
 
  • 1
Reactions:
Just wondering if someone could look at this screenshot and tell me where I'm going wrong? I have the province named 'Madeira' in the localisation, and also localised as 'Al-Madir' for Arabic characters in landed_titles. When I load up the game on the choose a character screen it shows up like this. However if you choose a character and load up the game it only shows the correct province name.

20160923182925_1.jpg
 
Last edited:
Is there someone here that have mastered the pre-triggers yet? I would like to optimize the following decision and events as much as possible, but Im uncertain of what really can be done and how it should be done. For one thing, what is the code for a pre-trigger? Is it is_triggered_only and where would it fit?

Code:
    organize_legio_x_gemina = {
        is_high_prio = yes
        potential = {
            has_romance_culture_trigger = yes
            prisoner = no
            age = 16
            has_landed_title = k_pannonia
            NOT = { is_title_active = c_legio_x_gemina }
            only_ruler = yes
        }
        allow = {
            wealth = 2000
            completely_controls = d_pannonia_superior
        }
        effect = {
            wealth = -2000
            activate_title = { title = c_legio_x_gemina status = yes }
            hidden_tooltip = {
                create_legion_commander_effect = yes
                new_character = {
                    c_legio_x_gemina = {
                        grant_title = PREV
                    }
                    set_defacto_liege = ROOT
                    character_event = { id = LEG.1 }
                }
            }
        }
      
        ai_will_do = {
            factor = 1
        }
    }

Code:
# Ping to set legion commander as FROM
character_event = {
    id = LEG.1
  
    hide_window = yes
    is_triggered_only = yes
  
    option = {
        name = OK
      
        liege = {
            narrative_event = { id = LEG.2 }
        }
    }
}

# Legion created
# FROM is the legion commander
# ROOT is the decision taker and liege
narrative_event = {
    id = LEG.2
    title = EVTNAMELEG.2
    desc = EVTDESCLEG.2
    picture = GFX_evt_battle_roman
      
    is_triggered_only = yes
  
    immediate = {
        # Workaround for grant_title in decision giving a strong claim...
        FROM = {
            primary_title = {
                remove_claim = ROOT
            }
        }
    }
  
    option = {
        name = EVTOPTALEG.2
      
        prestige = 100
    }
}

# Notify the owner that the legion is disbanding
# FROM is the legion commander
# ROOT is the liege
narrative_event = {
    id = LEG.3
    title = EVTNAMELEG.3
    desc = EVTDESCLEG.3
    picture = GFX_evt_battle_roman
      
    is_triggered_only = yes
  
    option = {
        name= {
            text = EVTOPTALEG.3
            trigger = {
                has_romance_culture_trigger = yes
            }
        }
        name= {
            text = EVTOPTBLEG.3
            trigger = {
                NOT = { has_romance_culture_trigger = yes }
            }
        }
      
        FROM = {
            # any_demesne_title mercenary = yes doesn't work
            any_mercenary_band = {
                limit = {
                    holder_scope = {
                        character = FROM
                    }
                }

                activate_title = { title = THIS status = no }
                unsafe_destroy_landed_title = THIS
              
                # Workaround a bug with count tier titles that don't dissolve automatically.
                # Attempting to grant the title will effectively destroy it.
                create_legion_commander_effect = yes
                new_character = {
                    grant_title = PREV
                }
            }
        }
      
        if = {
            limit = {
                has_romance_culture_trigger = yes
            }
            prestige = -100
        }
    }
  
}

# Pannonian legions without Pannonia
character_event = {
    id = LEG.10
  
    hide_window = yes
    only_rulers = yes

    trigger = {
        has_landed_title = c_legio_x_gemina
        k_pannonia = {
            OR = {
                has_holder = no
                holder_scope = {
                    has_romance_culture_trigger = no
                }
            }
        }
    }

    mean_time_to_happen = {
        days = 1
    }
  
    option = {
        name = OK
        liege = {
            narrative_event = { id = LEG.3 }
        }
    }
}
 
Is there someone here that have mastered the pre-triggers yet? I would like to optimize the following decision and events as much as possible, but Im uncertain of what really can be done and how it should be done. For one thing, what is the code for a pre-trigger? Is it is_triggered_only and where would it fit?


Code:
    organize_legio_x_gemina = {
        is_high_prio = yes
        only_playable = yes #more restrictive than only_rulers
        potential = {
            has_romance_culture_trigger = yes
            prisoner = no
            age = 16
            has_landed_title = k_pannonia
            NOT = { is_title_active = c_legio_x_gemina }
#            only_ruler = yes #Not a valid keyword. Pretrigger form is "only_rulers", trigger form is "is_ruler".
        }
        allow = {
            wealth = 2000
            completely_controls = d_pannonia_superior
        }
        effect = {
            wealth = -2000
            activate_title = { title = c_legio_x_gemina status = yes }
            hidden_tooltip = {
                create_legion_commander_effect = yes
                new_character = {
                    c_legio_x_gemina = {
                        grant_title = PREV
                    }
                    set_defacto_liege = ROOT
                    character_event = { id = LEG.1 }
                }
            }
        }
     
        ai_will_do = {
            factor = 1
        }
    }
I do not see any improvements possible in the events, with the possible exception of using only_playable = yes (which I am not sure will trigger on the mercenary title, but Meneth's explanation seems to imply it would) in place of only_rulers = yes in LEG.10. prisoner = no is a valid pretrigger in events, but I can find no example of its being used in this way in decisions and Meneth didn't discuss decisions so I left it in the potential block.
 
Are we allowed to modify the 3d models? such as the ones in the dlc folders, since those are the only ones with the .mesh format. Making a sub for Warhammer: Geheimnisnacht that puts in new 3d models for the units. Currently only have an orc model in but want to modify the existing models and use them if possible.
 
Last edited: