is_possible_vassal shortcomings #114
moretrim
started this conversation in
Show and tell
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Background
The wiki documents the
is_possible_vassal
trigger as follows:Worryingly this trigger does not appear to be used at all in the unmodded game. In HPM/HFM it is used sparingly in decisions and events, e.g. in the independence events of, well,
events/Independence.txt
.The short of it
I have real trouble using the trigger dynamically. As an example, if you send a request for a diagnostic to every non-existing country of which you hold a core:
(Note the use of
any_core = { owned_by = THIS }
overhave_core_in = THIS
, but that’s a story for another time.) Upon receiving the request, these countries perform:(Do not forget
allow_multiple_instances = yes
for the answer events, as we are expecting many responses at once!)As an aside, the fact that the code needs to perform a two-event jig before sending an answer illustrates a first shortcoming of the trigger: the lack of a swapped form. That is, at the start of this we cannot open a scope for all the non-existing countries for which
<country that asks> = { is_possible_vassal = <candidate country> }
holds.When performed as 1836 Austria, the outcome is that every non-existing candidate answers no. But try the following in a decision trigger:
and watch the results:
(The lack of a localisation fragment is expected, though emblematic.)
Which is right: the event or the decision triggers? Hard to say, keeping in mind that
TST
is unreleasable.Workarounds
In practice, what makes a country able to be released from the Politics screen? It all seems to hang on (with example checks):
exists = no
any_core = { owned_by = <releaser> }
is_releasable = yes
Note in particular that there is only one requirement(ish) when it comes to capitals: the releaser never hands its capital province (not state) away. This leads to the following:
Code that still wants to play nice with historical capitals can use
capital_scope
to select the province, e.g. putting it all together:Except that is not quite it! Because the release event will need to be performing either
release_vassal
orrelease
(secede_province
is also possible), but that on itself does not quite work like releasing through the Politics screen. But that’s a topic for another discussion…Code that wants or needs to hand out the releaser’s capital could consider moving it first.
Beta Was this translation helpful? Give feedback.
All reactions