moretrim / ccHFM

Community Curated HFM
14 stars 3 forks source link

Occupation of the Congo becomes spammy and cannot complete #26

Closed rogerburks closed 4 years ago

rogerburks commented 5 years ago

Under certain circumstances, the Occupation of the Congo decision occupation_of_the_congo in FlavourMod_Africa.txt does nothing and does not clear from the decisions list. This may have consequences for other Congo decisions, and prevents the country from committing other decisions below it on the list. The problem seems to be due to the potential not being strict enough. Testing seems to hold up after equalizing the potential and allow criteria.

rogerburks commented 5 years ago

I determined that this decision is actually supposed to be spammed to "step up" from Gabon through Chad to occupy the Congo Basin. It was being spammed by the ai (and may have blocked other ai decisions) up until the invention of the Dark Continent. Therefore, I changed it to require that invention before it would be enabled.

rogerburks commented 4 years ago

Updating and modernizing this thread--also I recently discovered that it is not yet completely fixed. This decision becomes spammy by the ai when the allow being activated during times when the effect cannot do anything. This is a somewhat complex, iterative decision, and therefore has an increased tendency towards spamminess when unexpected situations occur.

Originally, the decision became spammy because the allow was relatively permissive, most specifically not requiring invention = the_dark_continent when the effect requires it:

https://github.com/moretrim/PFH/blob/da920080c45dff63385abc016dbfe353c1ccc898/PFH/decisions/FlavourMod_Africa.txt#L658-L686

while the effect was relatively strict:

https://github.com/moretrim/PFH/blob/da920080c45dff63385abc016dbfe353c1ccc898/PFH/decisions/FlavourMod_Africa.txt#L688-L755

I changed specific portions of the allow to be more strict, because I wished for the decision to be visible but not be spammed pointlessly by the ai, with hopefully some indication of what would be needed to allow it. These are therefore relatively simple changes once the correct sections of the allow are found:

https://github.com/moretrim/PFH/blob/a13678f702d9c24596b3dc3da71fcd2d59f5e32b/PFH/decisions/FlavourMod_Africa.txt#L675-L679

Please see below for the parts that I missed (which are probably fairly obvious now that I have explained things like this).

rogerburks commented 4 years ago

The newly discovered problem looks like this, with correct initial colonies formed from the first click of the decision and prior events: colonized provinces 1972 = Libreville in Gabon, 1977 = Brazzaville in Congo, 1980 = Djambala in Congo, 1981 = Impfondo in Congo, 1962 = Bertoua in Cameroon), but the button is still allowed without a valid effect:

post1880spammy

The problem concerns colonization of 1981 = Nola in Ubangi-Shari. The effect requires invention = the_dark_continent :

https://github.com/moretrim/PFH/blob/da920080c45dff63385abc016dbfe353c1ccc898/PFH/decisions/FlavourMod_Africa.txt#L720-L738

but the allow does not:

https://github.com/moretrim/PFH/blob/da920080c45dff63385abc016dbfe353c1ccc898/PFH/decisions/FlavourMod_Africa.txt#L676-L679

Therefore I wish to change this part of the allow to

AND = {           invention = the_dark_continent           owns = 1981           1966 = { empty = yes } #Ubangi-Shari }

Additionally, at this stage I wish to revert a previous change, and make the decision visible to those who have not yet discovered the_dark_continent, and therefore I have made the potential more visible. This is for those who may be frustrated when discovery of the_dark_continent is taking longer than usual, when the player may want to see what the decision does and why it is not enabled yet. The change in the potential is from this:

https://github.com/moretrim/PFH/blob/a13678f702d9c24596b3dc3da71fcd2d59f5e32b/PFH/decisions/FlavourMod_Africa.txt#L644-L648

back to this:

https://github.com/moretrim/PFH/blob/da920080c45dff63385abc016dbfe353c1ccc898/PFH/decisions/FlavourMod_Africa.txt#L651-L654

rogerburks commented 4 years ago

Additionally, I noticed that the effect requires invention = colonial_negotiations for the first click, which I now want to enforce in the allow:

AND = {           invention = colonial_negotiations           owns = 1972           1976 = { empty = yes } #Gabon } AND = {           OR = {                     has_global_flag = called_congo_conference                     1962 = { empty = no }           }           invention = colonial_negotiations           owns = 1977           1976 = { empty = no } #Gabon           1980 = { empty = yes } #Congo }

rogerburks commented 4 years ago

Additionally, there is a section in the my changed version's allow that I am reverting, because it seems to do nothing and because it is not appropriate for the decision, since some of this is supposed to happen before 1890, it should not have invention = the_dark_continent in the beginning of the allow:

https://github.com/moretrim/PFH/blob/a13678f702d9c24596b3dc3da71fcd2d59f5e32b/PFH/decisions/FlavourMod_Africa.txt#L652-L656

I am reverting to:

https://github.com/moretrim/PFH/blob/da920080c45dff63385abc016dbfe353c1ccc898/PFH/decisions/FlavourMod_Africa.txt#L658-L661

rogerburks commented 4 years ago

Test with the new settings worked (1890 version):

newCongoOccupationWorks

rogerburks commented 4 years ago

Test post-1880 pre-1890 with these settings also seems to be fine (unless I missed something):

image

image

rogerburks commented 4 years ago

Here is a post 1890 screenshot from the same run as the previous post, just to indicate that the Congo to Chad area was properly colonized once the_dark_continent was discovered.

image

rogerburks commented 4 years ago

Here is a save with the 1880-1890 issue, especially vexing since I had France set as interesting.

https://drive.google.com/file/d/139zDXb9sYBHEWyritcNKFaAdMCuFL3iI/view?usp=sharing