-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging errors in dismantlement #138
Comments
I intend to expand this to examination of dismantlement in other forms. it looks like the above issue also takes place when dismantling the UK, which is a separate process. I plan to make the above change to all the separate dismantlements. In addition, the following issues occur with UK dismantlement:
It seems that some or all of these bugs could be due to syntax errors such as that described for Portugal above. Correcting this error for UK dismantlement allowed Burundi, Ceylon, Malaysia, and Pakistan to dismantle correctly. Further fixes may allow the others to dismantle correctly. The proposed mechanism for these bugs is that when a scope is used in a way that the engine cannot parse, it may jump ahead until it starts parsing code correctly again. This may cause the event to not function as intended. Additionally, the dismantlement process cannot award a landlocked satellite. This is why Nyasaland cannot be awarded in the UK test save that I have. If I am awaiting dismantlement of Kenya, Uganda, Burundi, and Rwanda, and I release Kenya before the others are awarded, the others will never be awarded to anyone who does not border the satellite. |
Since this is complex, it seems like a great idea to make a map, so that I don't keep checking the same things repeatedly:
Trying to explain it in a more lucid way here, using the definitions above:
|
So what is happening with Nyasaland in this? It turns out to be multiple things:
ccHFM/ccHFM/events/OnAction.txt Lines 373 to 383 in 47becfb
I don't know why I had In ccHFM/ccHFM/events/GreatWar_Events.txt Lines 11440 to 11452 in 47becfb
Removing that requirement allows Nyasaland to be distributed to the dismantling country, but its provinces are blockaded. For this reason, this could be intentional. My general preference is to have the colony be distributed, and then the receiving country can decide what to do with it later. |
Progress so far:
To investigate
|
Well, enabling awarding of overseas states and colonies without cores was easy enough, uncommenting code, but some issues remain with that code. Some others are referenced in #16, and seem like reasons why the code was commented out. Additionally:
So what remains to me, is to work out these and the issues stated in #16. Addressing topics from #16:
This seems to be partially fixed already. However, I suggest that the possibility of having to pay 2 infamy multiple times through repetition of event When compared with the 0.05 infamy that one expects to pay for Comoros, or the 0.5 infamy for Cambodia, for instance, it does not seem balanced. Therefore, I suggest making the cost 0.05 and removing the middle option ("Our only interest is limiting..."). This value is of course subject to debate, but I would not recommend anything above 0.5. In tests after the other fixes already attempted, I am seeing the event repeat fewer times, and definitely not in an infinite loop. Another alternative could be to change the entire system that the coin flip events use, but this seems to be a possible separate issue. For instance, the infamy could be applied upon awarding the state instead, although ideally this should include an option to say no.
I can no longer replicate this issue, and so I think it may have already been fixed before I tackled all this.
I have attempted to give each of these the same method of handing out territory.
I suggest that this could be a separate issue from what I am dealing with, or at least I think it is worth tackling entirely separately.
I am not sure of the exact nature of these issues, and so it is probably best if I leave them to others to tackle. |
With the latest fixes, things are at a point where they need to be further tested. Given that the pre-fix dismantlement is acceptable if not perfect, I want to do some testing to make sure that game-breaking bugs are not being introduced. Noticed details and issues:
|
The problem: In dismantlement of Portugal, non-organized territories do not seem to be handled properly.
Evidence: The event happens repeatedly as shown in this screenshot, although colonies such as Guinea-Bissau and Mozambique are not released and are not further dealt with:
Debugging process: Since I am mostly unfamiliar with exactly what will happen in this particular dismantlement, I want to be very cautious before making assumptions. For this reason, I wanted to track down the exact dismantlement event that will be triggered. In this case, I guessed that it would be
96010
, since that seems to be potentially generic dismantlement for non-great powers as well, and this seems to be correct:Looking through that event, I think this section should have released the Portuguese colonies that were not released:
ccHFM/ccHFM/events/GreatWar_Events.txt
Lines 978 to 990 in 47becfb
For some reason, the following does not seem to be working as expected for Guinea-Bissau and Mozambique, but it works for Angola. This suggests that either the code cannot release these tags, or the above trigger does not work for Guinea-Bissau and Mozambique (more likely in my estimation).
ccHFM/ccHFM/events/GreatWar_Events.txt
Lines 11349 to 11356 in 47becfb
I think
any_core = {owned_by = THIS }
andexists = no
are satisfied. Looking atcultures.txt
, I see no evidence of a cultural union involving either. Therefore, I am left wondering ifcapital_scope
is not working.The involved tags and capitals:
2061
is the capital ofAGC
, Angoche, owned byPOR
.1878
is the capital ofGBU
, Gabu/Guinea-Bissau, owned byPOR
.2058
is the capital ofGAZ
, Gaza, owned byPOR
.2070
is the capital ofSHO
Shona, is not owned byPOR
, and therefore is potentially not involved. It is not clear what would happen with provinces that only haveSHO
cores. It is also possible that I misunderstand the role of this.The next question is this: do
AGC
,GAZ
, andGBU
haveunciv_tech_school
?After a while of testing, I am not so sure how
capital_scope
is working here. For instance, an event withtrigger = { capital_scope = { owner = { tech_school = unciv_tech_school } } }
does not work. Likewise, a decision with similar wording does not work.
I will keep testing to see if I can get it to work the way that it looks like it should work.
Further tests:
capital_scope
that is indicated as a potential issue above, does dismantlement work? Yes.post_colonial_country
. It need only havecapital_scope = { owned_by = THIS }
function, without the added requirement of checking the tech school.civilized = no
for the potentially broken scope? Yes.capital_scope = { owned_by = THIS }
to it again after the above test? Partially. Angoche and Gaza work. Shona and Guinea-Bissau do not work, presumably because their capitals are not owned by Portugal (despite what I posted aboutGBU
above).The text was updated successfully, but these errors were encountered: