• 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.
I'm editing the culture file to create a custom culture and am creating my own name list. What i'm wondering is where you have two names joined by an _ will both names have a chance of showing up?

So for instance if I had "Robert_Bob" would both Robert and Bob have an equal chance of being used?

I haven't tested it, but think that it would generate someone with a double name called Robert Bob. Not just Robert, nor Bob.

No, what names with underscores do is connect different language version of the same name. So, the English culture has Robert_Robert, while Italian culture has Roberto_Robert & Occitan has Robèrt_Robert. This lets the game know that Robert and Roberto are really the same name. So King Robert III can be followed be King Roberto IV.

Putting 2 names separated by a space within quotes is how you make a double name like "Sarah Jane".

These are both actually discussed right there in the link Salciano put up. :)
 
Better to define a region in map/geographical_region.txt, including all the provinces you like. Then simply check any_realm_province = { region = your_region }. This should be *much* more efficient.

Possibly, though I expect the computational cost is roughly the same as you still compare all realm provinces to a list of provinces (though it definitely will look prettier in the events/decisions).
 
I have a few provinces which will not accept Straits, not sure why. They're new Provinces in Vanilla Sea-provinces, I've defined the strait just like I've defined all the rest, but these few just randomly do not register at all. The other ones I've added do, and even other ones to these Provinces individually work, just not to each other. Even trying to connect them to vanilla Provinces does not appear to be working.
What could cause that?
 
I have a few provinces which will not accept Straits, not sure why.
Make sure the province IDs are correct, and that the strait goes through a seazone they both actually border. Straits cannot cross more than one seazone.
Also make sure you correctly define it as sea, not major_river or portage.

If that still doesn't work, check your provinces.bmp and make sure there are no stray pixels of either province directly bordering the other one, the game won't create a strait if it thinks a province is already adjacent.
 
(TL;DR there is no "day" condition, for reasons beyond my comprehension, so you need to do crazy workarounds.)
Because it is a mostly useless condition, only good if you want a decision to be specifically available only one day of the week for a player. Events are not checked daily so it has no use there. Hence no remote vanilla need so it never got added in.
 
Because it is a mostly useless condition, only good if you want a decision to be specifically available only one day of the week for a player. Events are not checked daily so it has no use there. Hence no remote vanilla need so it never got added in.
Well, that might be true.
But the want to fire Christmas on a specific day must sound logical, does it not? I mean, why are days there when they can't be accessed via code - we could just have the month defined in the interface and have it randomly switch to another month at some point.
No offense really, I understand this is not needed in vanilla, but imo it would greatly destroy immersion if a hypothetical Christmas event fires on the 3rd of December.
It would be a valuable modding addition, of which you have added many for the community lately. So why not consider this one as well? :)
 
Cool! So, how did you save the day and month into variables? :O
I did not. idk if this even is possible tbh, and anyway it wouldn't help much.
What I did was fire a repeat_event that fires each day, until it finds a new month.
e.g.:
Fires at gamestart - I currently don't know the date, but I can check which month it is.
Let's say it's March "the X-th". Then I fire a repeat_event every day, and have it check whether it's still March when it fires.
Day X+1 : Still March
Day X+2 : Still March
Day X+3 : It's April
Then I know that day X+3 must be the 1st of April, because every previous day was March.
From that on, I can fire delayed events to any point of the year.
In my code, I fire another event that is delayed so much that from any 1st of Month I might land with this method, it fires on the 1st of January of the next year. From there on, it repeats itself every year, and allows me to e.g. fire another event from it with whatever delay is needed to address a specific day.
For example, the delay from there on until Christmas Eve (December 24th) would be 347 days delay from the 1st of January.

The downside with this method is that you have period at gamestart until you know the first day, and then have to fire a global event (hint: use a province event, those don't die) every year to be able to scope to any specific date. Not terrible on performance, but not efficient either.
I can post you my code if you really want to see it, but I have more things inter-weaved in it so tbh I think it would just confuse you.
Better to figure this out on your own if you really want to use this method.
 
Well, that might be true.
But the want to fire Christmas on a specific day must sound logical, does it not? I mean, why are days there when they can't be accessed via code - we could just have the month defined in the interface and have it randomly switch to another month at some point.
No offense really, I understand this is not needed in vanilla, but imo it would greatly destroy immersion if a hypothetical Christmas event fires on the 3rd of December.
It would be a valuable modding addition, of which you have added many for the community lately. So why not consider this one as well? :)
Because events and decisions are not checked daily so there is no need for a daily condition outside of the player decision to have Christmas. Of which is odd as well as time frames in the game are inflated as well as people being incredibly likely to miss the time slot to take said decision unless they are constantly on the look out for a specific date.
The date can be accessed by the code, just not the script. Saying it could just all be months is ridiculous, there are things that do get updated daily. It would stupid for the AI to only do their updates every month so you the player can declare war on 30 people and they won't have responded in any form during that time.
It is on my to do list but it is by no means an important or particular useful condition to even have.
 
@blackninja9939: I understand.
Sorry if I sounded impolite, I tend to over-dramatize. I really appreciate Paradox' modding improvement, and I'm delighted it is on your list.
I'm aware you're still a company at the end of the day, and have to make decisions about what's important. That you ponder it is all I ask.
And again, sorry if I sounded bitchy, not intended :oops:
 
@blackninja9939: I understand.
Sorry if I sounded impolite, I tend to over-dramatize. I really appreciate Paradox' modding improvement, and I'm delighted it is on your list.
I'm aware you're still a company at the end of the day, and have to make decisions about what's important. That you ponder it is all I ask.
And again, sorry if I sounded bitchy, not intended :oops:
No worries :) it is on my to do list but as I said I cannot really see many use cases where it is important to do something on an exact date unless you lower event checks to daily which is not gonna be fun for performance :( so it is down on the list compared to some other things in the modding suggestion wiki page which is already out of date compared to what has been requested on the forums and is actually in :eek:
 
Thanks for the reply it was really helpful! Can't see any link though? Could you therefore have two alternative names? So if you had "Robert_Bob_Robby" would it recognise that Robert was a variation of Bob and Robby or is it only one for one?
A name can only be one global name, so you would use this:

Robert_Robert
Bob_Robert
Robby_Robert

The effect will be that Robert I can be followed by Bob II and by Robby III as the game will treat all of these as variants of 'Robert'.
 
Does anyone know if modifiers short circuit, similarly to conditionals/triggers when encountering a valid factor = 0 term? Example
Code:
modifier = {
    factor = 0
    CONDITION_A = yes
}
modifier = {
    factor = 100
    CONDITION_B = yes
}
If CONDITION_A is true, will CONDITION_B or any later modifiers in that block be evaluated? I intend to have some fairly cumbersome random logic stashed away in scripted effects, and whether or not this behavior exists will impact some design choices. Thanks
 
Is it possible to determine the location of an army that has no commanders, or to determine the owner of a sieging army with no commanders (without waiting for a siege success on_action to fire)?

From the wiki (particularly the scope flowchart) it seems that is possible to scope to all existing armies by any_ruler = { any_army =, but there is no means of determining that army's location without first scoping to one of their commanders; thus the difficulty with commander-less forces.

On the siege side, given a siege defender I can scope into the enemy flank via siege = { enemy =, but I cannot determine the owner of that flank without first scoping into one of the commanders. I've been scratching the ole noggin for a few on this one, any ideas?
 
looking at doing some things evolving duchies and changing dejure land of counties into different duchies. is it possible to do on the creation of a titular duchy through normal means? adding effect or creation_effect into landed_titles doesn't seem to work or at least work with this type of thing.

Code:
d_amalfi = {
    color={ 140 200 230 }
    capital = 935 # Amalfi
    
    dignity = 10
    
    allow = {
        is_republic = yes
    }
    effect = {
        c_amalfi = {
            de_jure_liege = d_amalfi
        }
    }
}

when using creation_effect instead it just changed the dejure instantly upon game start/load and results in no king or empire dejure ties

also on a similar note how would I go about using title_decisions (right click interact menu on title flags directly) to make it so i can flag a duchy and then right click interact with a county to make it under dejure for that selected duchy?

this is what i have so far on the matter but it doesn't work on changing the county dejure duchy to flaged one nor does it work so i can only allow it to only work on your realm

Code:
    set_duchy_for_swap_original = {
        filter = realm_owned
        only_playable = yes
        
        from_potential = {
            ai = no
            is_playable = yes
            #tier = DUKE
            #war = no
            #wealth = 600
        }
        
        potential = {
            tier = DUKE
        }
        
        allow = {
            always = yes
            #war = no
        }
        
        ai_will_do = {
            factor = 0
        }
        
        effect = {
            set_title_flag = SWAP_TO_ME
        }
    }

    canclel_duchy_for_swap = {
        only_playable = yes
        
        from_potential = {
            ai = no
            is_playable = yes
            #tier = DUKE
            #war = no
            #wealth = 600
        }
        
        potential = {
            tier = DUKE
            has_title_flag = SWAP_TO_ME
        }
        
        allow = {
            always = yes
            #war = no
        }
        
        ai_will_do = {
            factor = 0
        }
        
        effect = {
            clr_title_flag = SWAP_TO_ME
        }
    }
    
    swap_county_dejure_to_duchy = {
        only_playable = yes
        
        from_potential = {
            ai = no
            is_playable = yes
            #tier = DUKE
            #war = no
            #wealth = 600
            any_realm_title = {
                has_title_flag = SWAP_TO_ME
            }
        }
        
        potential = {
            tier = COUNT
        }
        
        allow = {
            always = yes
            #war = no
        }
        
        ai_will_do = {
            factor = 0
        }
        
        effect = {
            THIS = {
                de_jure_liege = {
                    any_realm_title = {
                        has_title_flag = SWAP_TO_ME
                    }
                }
            }
        }
    }
 
Also wondering another thing that i also cant seem to figure out, would it be possible to make it so a custom created title (via charlemagne) uses the coat of arms from your dynasty or from another title instead of inheriting from the original target? Like how the patricians manor has the dynastic flag. because you can adapt the intrigue decision into a title_decisions and create new titles of any tier (at the least duke and up that i have tested) from any title

this is what i have to do that but i dont know how to change or add to it to do that this also dosent give you the title unless you are the owner of the title that you are making a duke clone of

Code:
    create_new_titular_dutchy_from_title = {
        only_playable = yes
        
        from_potential = {
            ai = no
            is_playable = yes
            #tier = DUKE
            #war = no
            #wealth = 600
        }
        
        potential = {
            OR = {
                tier = BARON
                tier = COUNT
                tier = DUKE
                tier = KING
                tier = EMPEROR
            }
        }
        
        allow = {
            always = yes
            #war = no
        }
        
        ai_will_do = {
            factor = 0
        }
        
        effect = {
            create_title = {
                tier = DUKE
                landless = no
                temporary = no
                custom_created = yes
                culture = ROOT
                holder = ROOT
                base_title = THIS
                copy_title_laws = yes
            }
        }
    }


EDIT: after doing a quick test baron titles can be duped into a duchy but the flag will result in the black and red null rebel flag. is it possible to have it so that created titles can use the dynamic house flags like the patrician palace or no?
 
Random question about errors.

Is there anything bad that could happen if I reference things like traits that does not exist in the code? It create an error in the log, but nothing bad seem to happen in game.
 
Question about event modding

I would like to know how I can avoid character's portraits from appearing in event options. I found how to avoid that in the event itself but not in the option