Numerous fixes to the dismantlement system #139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References #138 and part of #16.
These changes were attempted once I noticed that dismantlement was having unexpected results in my playthroughs, such as:
Several changes were made to address these problems, since it appeared that some code passages were not working at all. Establishment of puppets for dismantlement now uses
civilized = no
to scope the non-existing tags instead of referencing their tech school. This is because referencing the tech school often did not work.This slightly changed some dynamics, which led to a change to specify that the UK should release New Zealand instead of Aotearoa when dismantled. Release of Russian tags was also adjusted to not release the tags through this route, which would scramble the provinces because of possibly the multiple-cores bug.
Some code was uncommented, and changes were made to address problematic behavior of the coin-flip code in
96011
,96016
, and96017
that awards colonies that do not have cores and overseas states. It seems that these events do not repeat infinitely anymore, and that this problem was likely fixed by the above change to releases.The problem with random release of tags in Russian dismantlement seemed to be
any_core = { owned_by = THIS }
, which was removed and which does not seem to have been necessary in the code since it is covered by the event that this code triggers.After considerable testing, I do not see any remaining problems.However, dismantlement code is complex, it is very possible that I have overlooked issues. Given that I do not see any current problems, I decided to make a pull request.