Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Numerous fixes to the dismantlement system #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rogerburks
Copy link
Collaborator

@rogerburks rogerburks commented Feb 13, 2022

References #138 and part of #16.

These changes were attempted once I noticed that dismantlement was having unexpected results in my playthroughs, such as:

  • Dismantlement of Portugal did not distribute most of its colonies to the war victors.
  • Dismantlement of the UK did not award several different colonies to war victors, including Pakistan, many islands, and the Suez Canal.
  • Dismantlement of Russia did not have expected random releases.
  • Landlocked colonies were not being awarded to war victors.

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, and 96017 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.

Fix generic dismantlement to work for unorganized colonies.

Releases unorganized colonies as puppets for transfer during dismantlement. This is to fix an apparent broken scope, which prevented release of such colonies.

Dismantlement will now award landlocked countries.

Fixes to Russian dismantlement to make random releases work. Proposed fixes to make Colonies without cores, and overseas states distribute again.

Reduced infamy for events 96011, 96016, and 96017, the repeating events that give a 50% chance of distributing some overseas states and core-less colonies separately to player and ai great power victors. It appears that previous fixes could have fixed other reported issues with these events.

Prevents the United Kingdom from releasing Aotearoa upon being dismantled, when they are instead intended to release New Zealand.
@rogerburks rogerburks self-assigned this Feb 13, 2022
@rogerburks rogerburks requested a review from moretrim February 13, 2022 20:12
@rogerburks rogerburks added the bug Something isn't working label Feb 14, 2022
@rogerburks rogerburks linked an issue Feb 16, 2022 that may be closed by this pull request
@rogerburks
Copy link
Collaborator Author

After a number of dismantlements, I see that rarely both an ai tag and the player get an offer for the same puppet. I notice this because the ai had the puppet and I got an event for it. Therefore, this should not be merged until I find and fix the problem.

@rogerburks rogerburks added WIP Ready for discussion but not merging help wanted Extra attention is needed labels Apr 18, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working help wanted Extra attention is needed WIP Ready for discussion but not merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debugging errors in dismantlement
1 participant