• 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.
would it be possible to add a way to override vanilla targetted_decisions WITHOUT using replace_path?

I guess this relates somewhat to
  • Make Grant Title, and Grant Viceroyality, fully moddable targeted decisions.
Maybe override by name(handler, whatever you call it), and put a list of names on wiki. i.e. if a mod uses take_concubine, that overrides vanilla take_concubine.
You already *can* override specific decisions without replace_path by modding the the actual file the decision is in. In fact, you almost never need to use replace_path, unless you're doing a very *major* mod.

For what it's worth, vanilla doesn't have a take_concubine decision in any scriptable file. If you don't wish use the hardcoded vanilla "Take Concubine" interaction, turn it off in defines.lua (MAKE_CONSORT_INTERACTION_ENABLED = 0), then define your own decision.
 
  • 1
Reactions:
You already *can* override specific decisions without replace_path by modding the the actual file the decision is in. In fact, you almost never need to use replace_path, unless you're doing a very *major* mod.

For what it's worth, vanilla doesn't have a take_concubine decision in any scriptable file. If you don't wish use the hardcoded vanilla "Take Concubine" interaction, turn it off in defines.lua (MAKE_CONSORT_INTERACTION_ENABLED = 0), then define your own decision.

what about marriage actions, banish, grant landed title, award honorary title, basically everything in diplomatic action?

i know there is no take_concubine decision. that was an example of how an override handler for vanilla could look like. devs could implent that and provide a list to modders. i don't know how hooks look like in their code, but actual choice between handler and hardcoded decision is an if-else matter.

EDIT: holy crap, it can all be disabled in defines. a bit of a workaround, but this is still a huge revelation for me. thanks!
 
what about marriage actions, banish, grant landed title, award honorary title, basically everything in diplomatic action?

i know there is no take_concubine decision. that was an example of how an override handler for vanilla could look like. devs could implent that and provide a list to modders. i don't know how hooks look like in their code, but actual choice between handler and hardcoded decision is an if-else matter.

EDIT: holy crap, it can all be disabled in defines. a bit of a workaround, but this is still a huge revelation for me. thanks!
Yup, as you see there, there are disables for all the hardcoded diplomatic interactions. Disable any you want to replace, and create your own decision.

There *is* a problem here tho: our scripted decisions don't have access to the character selection window, like the marriage & tutor ones. So where you can right-click a ruler, pick marriage, pick one of his courtiers & one of yours, you would have to create a work-around to do that in your own decision. :(
 
Yup, as you see there, there are disables for all the hardcoded diplomatic interactions. Disable any you want to replace, and create your own decision.

There *is* a problem here tho: our scripted decisions don't have access to the character selection window, like the marriage & tutor ones. So where you can right-click a ruler, pick marriage, pick one of his courtiers & one of yours, you would have to create a work-around to do that in your own decision. :(

that can be achieved with checks that opinion of vassal is high enough, ruler tier, and succession line. a lot of checks, but it's doable.
 
that can be achieved with checks that opinion of vassal is high enough, ruler tier, and succession line. a lot of checks, but it's doable.
But to replace the marriage action, you would have to use 1 decision to choose the husband, and another decision to choose the wife, with an event going to the other ruler to let him decide. Similarly for the tutor action, 1 decision to choose a kid, 1 to choose a tutor, and an event to the kid's liege. Would be much easier if decisions supported the 4-party window, with chosen characters as something like saved event targets.
 
  • 2
Reactions:
I've added two things to the list
  • an on_natural_death on action which fires whenever somebody is about to die from age, illness trait or lack of health with them just being ROOT
  • a cancel_death command which stops any death from age, illness trait or lack of health
The latter might be difficult to implement but we have the immortal = yes for traits which does the same thing but cannot stop a death in progress.
 
  • 2
  • 1
Reactions:
I've added two things to the list
  • an on_natural_death on action which fires whenever somebody is about to die from age, illness trait or lack of health with them just being ROOT
  • a cancel_death command which stops any death from age, illness trait or lack of health
The latter might be difficult to implement but we have the immortal = yes for traits which does the same thing but cannot stop a death in progress.

+1. The cancel_deathcouldalso be useful to simulate laat-minute commutation of capital death, after a character has been ordered to be executed.
 
Ability to activate AI for baron-tier characters and unlanded characters. This would be for mods with fewer provinces that needs important baron-tier characters to act like count-tier. e.g. have more children, play the marriage game and marry well, and participate in wars.
 
child_gender = male/female

Assigns the gender that a pregnant mothers child will be on birth, if not used the gender is random as usual but if assigned the child they have will be the selected gender, if they lose the pregnant trait ( Through miscarriage etc. ) then the flag is flushed.
 
  • 2
Reactions:
Could trigger_switch be extended to support culture, culture_group, and religion triggers?

It currently only seems to support on_trigger = religion_group and nothing else. I am making a mod and a culture trigger switch would have been super-helpful compared to a labyrinth of if statements.

One for province_id would be good convenient too.
 
Could trigger_switch be extended to support culture, culture_group, and religion triggers?

It currently only seems to support on_trigger = religion_group and nothing else. I am making a mod and a culture trigger switch would have been super-helpful compared to a labyrinth of if statements.

One for province_id would be good convenient too.
It definitively supports culture, and I think the othet two too at the moment.


But in general extending it to seitches that takes discrete values would be super useful (e.g. stats, realm stats, and complexes confition like counts on any scopes - for a possible syntax, see below).

Also, a similar extension taking intervala as values would be very interesting.

Examples:

trigger_switch = {
switch = martial

1 = {}
2 = {}
...
}

An example with intervals:


trigger_switch = {
switch = prestige

100 , 200 = {} # fires if has between 100 nd 200 prestige
200 , 300 = {}
...
}

Lastly, and example counting on scopes:


trigger_switch = {
switch_count = {
any_courtier = {
limit = { <consition to be verified> }
}
}

1 = {}
2 = {}
...
}
 
  • 1
Reactions:
It definitively supports culture, and I think the othet two too at the moment.
Ach! Thanks for correcting me; that's going to make things a lot easier.

I've been fooled by the fact that Audax Validator doesn't seem to recognize trigger_switch at all when directly inside an immediate block of a province event (possibly other places, but that's what's relevant to my interests). According to the Validator, it's invalid, but I've quickly tested it in the game, and it seems to work fine.
 
Just spotted this in the 'implemented' section:

- Allow effects/conditions to use variables instead of only pure numbers (E.G:, wealth = var)

Is this actually in? I cant find any reference to it in the Captain's Log. If it is, does anyone know how it works?
 
Just spotted this in the 'implemented' section:

- Allow effects/conditions to use variables instead of only pure numbers (E.G:, wealth = var)

Is this actually in? I cant find any reference to it in the Captain's Log. If it is, does anyone know how it works?
Looking at the edit history, that's been there since the page was created last March. Pretty sure a lot of the things in there are not actually implemented.
 
Looking at the edit history, that's been there since the page was created last March. Pretty sure a lot of the things in there are not actually implemented.

Indeed it doesn't work, I've just moved it back to "misc scripting" suggestions.
Seems it was in-between 2 suggestions about variables that have actually been implemented, so I'd guess it was a bad copy/paste.

Checking the list, I don't believe the following are implemented either:
Ability to specifically modify sea to land movement times and vice versa - how ?
Allow localising nicknames based on culture/religion/gender
Make it possible to check the culture/religion of a title as defined in landed_titles - not sure but if think it checks the culture/religion of the owner instead ?
 
Indeed it doesn't work, I've just moved it back to "misc scripting" suggestions.
Seems it was in-between 2 suggestions about variables that have actually been implemented, so I'd guess it was a bad copy/paste.

Checking the list, I don't believe the following are implemented either:

Other implemented suggestions about variables work? Like multiplying and dividing them? Or setting a variable as the sum of other two? If so, what is the correct syntax for these things?
 
Other implemented suggestions about variables work? Like multiplying and dividing them? Or setting a variable as the sum of other two? If so, what is the correct syntax for these things?

Yes, if you want to get the result in a 3rd variable, you'll need to copy it first:
Code:
# Multiply var1 and var2 and store the result in var3:
set_variable = { which = var3 which = var1 } # Copy var1 to var3
multiply_variable = { which = var3 which = var2 } # Multiply var2 with var3, saved in var3
It's similar with change_variable for the sum or divide_variable.
 
Yes, if you want to get the result in a 3rd variable, you'll need to copy it first:
Code:
# Multiply var1 and var2 and store the result in var3:
set_variable = { which = var3 which = var1 } # Copy var1 to var3
multiply_variable = { which = var3 which = var2 } # Multiply var2 with var3, saved in var3
It's similar with change_variable for the sum or divide_variable.

Great! So, the syntax for division is like multiplication, but with divide_variable? Can we also, e.g. multiply_variable = { which = var3 value = 2 }

Also, I suppose we can use change_variable = { which = var3 which = var2 } to add two variable together?

If so, an entire realm of oportunities has just opened to me....
So Thanks!