When I was handling with this trigger I met some problems,so I wrote this script to test about it with the console command "run".
Here is my script.
When you start with England and execute this script,the decision "Designate Calais as The Staple Port" is gone as designed since there's a trigger
in the potential of the decision and we just add the province modifier to Calais, whose province ID is 87.
However,if you execute the script once again,you will surprisingly find that you gain one ducat still,even though that is impossbile because of the limit of the effect.
Then you can try to remove the province modifier,and you still gain one ducat,while at the same time the decision is back, too.
And you can still try to modify the limit of the effect to make it executed with the province modifier,but you'll never gain the ducat then with or without the modifier.
All these tests seem to prove that the trigger "has_province_modifier" is actually not working properly,at least in this case.
So it is quite confusing that it is the trigger's problem or just my code's problem?Can you give me some suggestions?
Here is my script.
Code:
if = {
limit = {
NOT = { 87 = { has_province_modifier = the_staple_port } }
# 87 = { has_province_modifier = the_staple_port
}
ROOT = {
add_treasury = 1
}
}
87 = {
add_province_modifier = {
name = the_staple_port
duration = -1
}
}
# 87 = {
# remove_province_modifier = the_staple_port
# }
When you start with England and execute this script,the decision "Designate Calais as The Staple Port" is gone as designed since there's a trigger
Code:
NOT = { 87 = { has_province_modifier = the_staple_port } }
However,if you execute the script once again,you will surprisingly find that you gain one ducat still,even though that is impossbile because of the limit of the effect.
Then you can try to remove the province modifier,and you still gain one ducat,while at the same time the decision is back, too.
And you can still try to modify the limit of the effect to make it executed with the province modifier,but you'll never gain the ducat then with or without the modifier.
All these tests seem to prove that the trigger "has_province_modifier" is actually not working properly,at least in this case.
So it is quite confusing that it is the trigger's problem or just my code's problem?Can you give me some suggestions?