Triplea: TripleA illegally allows placement of newly built air units on friendly carriers

Created on 2 Jan 2019  路  22Comments  路  Source: triplea-game/triplea

Engine version

Tested with 1.9.0.0.13066 (but likely an old issue)

Map name

At least v2(LHTR), v3-v6, Europe 1940, Pacific 1940, Global 1940 and all their variants.

Can you describe how to trigger the error? (eg: what sequence of actions will recreate it?)

Purchase a fighter. During placement phase TripleA will allow you to place it on a friendly carrier.

Instead of this error, what should have happened?

TripleA should prevent newly built air units from being placeable on friendly carriers.
The air unit must be placed "on an aircraft carrier owned by your power in a sea zone (even a hostile one) adjacent to a territory with such an industrial complex."

Any additional information that may help

By the rules "You can鈥檛 place a new fighter or tactical bomber on a carrier owned by a friendly power."

The attached savegames show examples for v3, v5 and Global.
savedGames.zip

Thank you to "farmboy" for pointing out this issue on
https://www.axisandallies.org/forums/post/1245254

Bad Game Rules Problem

Most helpful comment

@panther2 You are really good a breaking things sometimes :)

But yeah, the engine would need to consider remaining fighter capacity of owned vs allied carriers separately in ordered to handle the situation where you have both types of carriers in the same SZ and trying to purchase new fighters.

I'll try to take a look at how easy or hard that would be to add in.

All 22 comments

Yeah this is a long unsupported item (bug?).

It should be checked if this behaviour matters positively for any minors, in any games, tho.

Regardless, I suggest having a property (default false) or a relationship option for being able to place air on carriers of a player in an archetype "Allied" relationship with you, also since it arguably makes sense (tho, right now, I don't have a game that is using this). Tho, this also has the problem the program doesn't allow you to choose the carrier (but this matters also for owned ones, in case you can have more than 1 type of carriers).

@panther2 One question: In Global 40, can UK Pacific place a newly built fighter on a UK carrier? My assumption is yes which complicates things a little bit but wanted to double check.

@Cernelius I can't think of any maps that this would negatively impact besides the above question for global 40.

Me neither, nor I have games coming out using this right now. I was just saying that, in the moment the carriers are there and you can land normally on them, it doesn't make any good sense that you can place only on your own and not on any other ones, that are in the exact same place. So if I would be making a map with v3 rules, I'm fairly sure I would allow placing on any (but I would also make carriers work differently on many other aspects, if I were to write the rulebook).

Maybe ask in forum if Total World War player, and such, use to autolimit themselves not placing on allied, since this behaviour has been there forever, I think.

So, was just saying.

A curious off-topic, just to digress a bit, is that while v2 LHTR and following have this problem, v2 OOB has the opposite issue, in that you should be able to redeploy allied too, but you cannot (in that one is only for newly built).

@ron-murhammer

One question: In Global 40, can UK Pacific place a newly built fighter on a UK carrier? My assumption is yes which complicates things a little bit but wanted to double check.

Yes, you can. As it is the Industrial Complex belonging to either economy that is relevant for placement.
Air-, Sea- and Land-Units are treated as the "power鈥檚 single, united force".

@panther2 Thanks for the clarification.

Here is the engine and Global 40 2nd PRs to fix the issue:
https://github.com/triplea-game/triplea/pull/4508
https://github.com/triplea-maps/world_war_ii_global/pull/35

v2-LHTR, v3, and v5 shouldn't need any XML changes. If any of the other global variants have a combined UK Pacific player then those will need updated as well.

Awesome, thank you, @ron-murhammer .

Some questions, though:

When we update the map-xml(s) - how will that affect gameplay when current 1.9-stable-release players download them?
Will current games work with the map-update?
Should the engine-update result in a new 1.9-stable (If yes, can we include #4415 ?) ?

@RoiEXLab please see my above comment/questions. Thank you.

@panther2 Unfortunately I can't really answer your questions, I only briefly followed the conversation here 馃槄
The closing of this PR was done automatically as a result of the merge (thus the ...this in #4508 suffix in the message)

@panther2 The updated map XML will still work fine with 1.9.x as we are just adding 'combinedTurns' parameter to UK Pacific place phase and it will just be ignored in 1.9.x (this bug will still exist in any games played with 1.9.x using existing or new map XML).

Players can update to the new global XML with the change and continue their games as the save games store the XML that the game was started with so as long as maps don't change any of the image assets (units, map, etc) then it works fine (map XML only updates should never break existing save games).

I'm not planning to release another version of 1.9 stable unless we find more serious issues so players will have to wait til 1.10 is released for this to be fixed. But you can download the latest pre-release to verify the fix.

I went ahead and incremented the map yaml version so that players are eventually prompted to download the new global version so that when 1.10 does come out they have the fix already.

@ron-murhammer That's comprehensible.

For the other xml-files of the map-repo, I have opened
https://github.com/triplea-maps/world_war_ii_global/issues/36

I'm going to test the release/map fix now...

@ron-murhammer Unfortunately we still have an issue with the fix (1.10.13537) and the new Map-version:

With the attached savegame you can reproduce that placement on friendly carriers is prohibited, provided the friendly carrier does not share the seazone with an own carrier.

On G1 you see that Germany is correctly not allowed to place newly built fighters on the Italian carrier in SZ 112. But it incorrectly is allowed to place its fighters on the Italian Carrier in SZ 113, that shares the SZ with a German carrier.

Britain and UK-Pacific placement is correctly handled as regards to where the economies can place their units geographically.
But here we experience the same situation as with Germany, too (see SZ 109, 110 and 39).

CarrierPlace_0a_placed.zip

@panther2 You are really good a breaking things sometimes :)

But yeah, the engine would need to consider remaining fighter capacity of owned vs allied carriers separately in ordered to handle the situation where you have both types of carriers in the same SZ and trying to purchase new fighters.

I'll try to take a look at how easy or hard that would be to add in.

What is going to happen if I have a carrier and a carrier of an ally in a sea zone I want to both land and place fighters? For example, if I have a carrier of mine and an allied one, then I land 2 fighters (during non combat movement), will I be able also to place 2 fighters, as I should be (and currently can)?

This is not currently possible to be tested, due to the bug @panther2 reported.

@Cernelius The engine would need to first consider as many of the existing fighters onto allied carriers so that it sees the maximum amount of remaining capacity for new fighters to place. This starts to get into the related issue which has been discussed around needing a way to be able to select which carrier to land on.

Isn't this problem fixed now?

@simon33-2 Only map-wise. The engine related problem as mentioned here still persists.
I don't know whether @ron-murhammer has looked further into it.

@ron-murhammer are you actively working on this, is there anything left to do?

No. I fixed about 90% of this but unfortunately not completely. This case is still technically an issue: https://github.com/triplea-game/triplea/issues/4480#issuecomment-451641700

Would you mind re-casting the remaining tasks as a new issue @ron-murhammer ?
This seems to have fallen into the "impossible/never ending ticket" trap where it just can never quite be closed and always has something more to do. The length of it now makes it prohibitive to know what exactly the definition of complete is here.

Or if not re-cast into a new ticket, a last comment stating exactly what needs to be done would be useful otherwise.

Used 'reference in a new issue' to cut an issue from the one comment that states the remaining problem: https://github.com/triplea-game/triplea/issues/6238

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZjelcoP picture ZjelcoP  路  5Comments

DanVanAtta picture DanVanAtta  路  5Comments

DanVanAtta picture DanVanAtta  路  4Comments

FrostionAAA picture FrostionAAA  路  7Comments

ron-murhammer picture ron-murhammer  路  5Comments