• 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.
Update:

- Added remove_guardian effect
- Added friend filter to targeted decisions
 
Last edited:
  • 2
Reactions:
Just to clarify, each did_something_to_999 will be a unique flag, correct? So I couldn't do:
Code:
random_character = {
   limit = {
     has_character_flag = did_something_to_ # affect anybody who has the flag in relation to any other body
   }
   ...
}

I'm not sure what you mean by unique. If you're using my example above while playing character 999, the random character will get the flag did_something_to_999. Had you targeted more character instead of just one random, all of them would have gotten did_something_to_999.

Had you used this code, you as a character would have gotten a number of individual flags appended by the character ids of you courtiers:

Code:
any_courtier = {
   ROOT = {
     set_character_flag = has_courtier_@PREV
   }
}
 
Just to clarify, each did_something_to_999 will be a unique flag, correct? So I couldn't do:
Code:
random_character = {
   limit = {
     has_character_flag = did_something_to_ # affect anybody who has the flag in relation to any other body
   }
   ...
}

If you play character 999 and set the flag did_something_to_@ROOT on a number of characters, then all of them will have the flag did_something_to_999, and thus can all be reached with:

Code:
any_realm_character = {
   limit = {
     has_character_flag = did_something_to_999
   }
   ...
}

or, if character 999 is in the ROOT scope:

Code:
any_realm_character = {
   limit = {
     has_character_flag = did_something_to_@ROOT
   }
   ...
}
 
  • 1
Reactions:
What I mean is, is it possible to have some events set character flags of the form some_flag_@ROOT (or other scope, that's not the important part), such that multiple people have the flag with multiple people's IDs, and then in some other trigger, be able to test if a character has *any* some_flag_<any ID>? Or is that something we're best sticking with the dummy opinion modifiers for?

No. But again, I don't understand what you're after. If the id appended at the end doesn't matter when you want to find those characters, why have them?
 
Captain, what about characters outside of your realm? Will that still require the heavy resource task of scoping to all realms and then working back?

I'm guessing what you're after are scopes like any_character/random_character etc. I'm thinking of adding them but such triggers are very performance heavy and should not be used without great care.
 
Update:

- Added any_character trigger scope
- Added any_province trigger scope
- Added any_landed_title trigger scope
- Added any_character effect scope
- Added any_province effect scope
- Added any_landed_title effect scope
- Added random_character effect scope
- Added random_province effect scope
- Added random_landed_title effect scope

"With great power comes great responsibility"

These triggers and effects should be used with extreme care - especially the triggers, and especially the trigger any_character. If you run into performance issues, you are on your own...
 
  • 5
  • 4
Reactions:
All of those would be important. Always use the smallest scope that will accomplish what you want.

The problem with any_independent_ruler & any_realm_character is that they apparently ignore the ruler whose scope they starts in. This can be very annoying.

This is mostly standard in our games though, to not include the scope your in.

Also, unless it's been addressed recently, any_independent_ruler doesn't catch some people who are in revolt, but they don't show up as a any_realm_character of their original liege either. Thus they can't be scoped in this way at all.

This has been fixed.
 
Update:

- Added ai_will_do to minor titles
- Added ai_will_do to religious titles
 
  • 3
Reactions:
What those do exactly do? I mean, are they evaluated on a possible candidate by possible candidate, so it ends up being a weight of who receives the title, or is it "global" for the title, meaning willingness of the granter to grant it at all?

On a character that is eligible by the hard-coded definition, the ai_will_do weight is calculated. 1 or above means he is eligible, 0 or below means he is not eligible. Any value in between is the chance of being eligible. But it's not a weight compared to other characters. So it basically works like other decisions.
 
Update:

- Possible to append or overwrite info in bookmarks from several files
- Now possible to mod the pick era interface

Changes to bookmarks:

Now have a token name (bm_charlemagne) and three additional properties, era, picture and custom_start.

era = yes means that it should be used in the era screen
picture = NAME is the picture that should be used in the era screen
custom_start = yes means that it is the bookmark that should be used if the player clicks directly on custom start in the era screen

The era screen use those bookmarks flagged with era = yes (but no more than 5 - and it picks them chronological). If no one is found it will just use the first bookmark. For the title it will look for a localization key based on name (BM_CHARLEMAGNE) plus _ERA. Tor the text it looks for (BM_CHARLEMAGNE) plus _ERA_INFO.

Example:

Code:
bm_charlemagne = {
   name = "BM_CHARLEMAGNE"
   desc = "BM_BM_CHARLEMAGNE_DESC"
   date = 769.1.1
   
   era = yes
   picture = GFX_pick_era_image_1
   
   selectable_character = {
     id = 6392 # Charlemagne
     age = 26
     name = ERA_CHAR_NAME_6392
     title = k_france
     title_name = WEST_FRANCIA
     
     character = {
       dna = bcedirmbfcy
       properties = aj00bc00000
       religion="catholic"
       culture="old_frankish"
       government = feudal_government
       dynasty=25061
     }
   }
}

Bookmarks can now be appended/partly overwritten by including parts of the same bookmark in another file.

Example:

Code:
bm_charlemagne = {
   name = "BM_GARS"
   desc = "BM_GARS_DESC"
   date = 769.4.30
   
   era = no
   picture = GFX_some_other_picture
}

All properties above can be changed this way. (Selected character can however only be appended and not removed/overwritten - in that case you must overwrite the original file instead as before).
 
  • 6
Reactions:
But character history is already loaded, and the prior/existing code already does this without issue...

How do you know it does it "without issue"? ;)
 
- Added a define if faction membership is blocked by having a non-aggression pact with your liege: NON_AGGRESSION_PACT_BLOCKS_FACTIONS.
 
  • 5
  • 4
Reactions:
- The text command "GetID" now also work on titles and provinces which will return the title tag (eg "k_france") and the province ID respectively.
 
  • 2
  • 1
Reactions:
Could you give an example of how this is used? It sounds interesting. Is it for localisation or for scripting code?
It is a localisation command.
Example usage would be inside a localisation string or a log effect.
Code:
primary_title = {
    log = "The primary title's ID is: [This.GetID]."
}
or
Code:
EVTDESC_50553;The province ID for [Root.GetFirstName]'s Capital is: [Root.Capital.GetID].;;;;;;;;;;;;x
 
  • 1
Reactions:
- Added a define if titular duchy titles should count towards duchy limit for vassal opinion: TITULAR_TITLES_COUNT_TOWARDS_DUCHY_LIMIT.
- Added Scope: real_father_even_if_dead.
- Added effects: any_child_even_if_dead, random_child_even_if_dead, any_dynasty_member_even_if_dead, random_dynasty_member_even_if_dead, any_sibling_even_if_dead, random_sibling_even_if_dead, any_spouse_even_if_dead, random_spouse_even_if_dead.
- Added triggers: any_child_even_if_dead, any_dynasty_member_even_if_dead, any_sibling_even_if_dead.
CAUTION ADVISED: While it should be harmless to use scope changes from _even_if_dead scopes or effects, executing effects inside _even_if_dead scopes or effects might have adverse effects.
 
  • 6
Reactions: