[Fixed] battle calc not accounting for limited bombards


  • Moderators

    The battle calc doesn't seem to account for the thing some maps have of limiting to one bombarding ship per landing infantry. you can put extra ships in the battle calc (i.e. 1 inf and 5 bbs atttacking with amphibious attack checked) and it counts them all for determining casualties. tested in NML and ww2v3, bug present for both of them

    (I didn't post in github cuz I don't remember my password for it)



  • @zlefin looks like you are correct sir:

    Screen Shot 2019-07-06 at 6.45.24 AM.png Screen Shot 2019-07-06 at 6.45.34 AM.png


  • Moderators

    @zlefin Well, but, first of all, you just cannot define at all in the (so called) battlecalculator what are the offloaded units. For example, if in a battle you have 5 infantries, but only 2 of them have been offloaded into battle, you have no way to define this, in the first place. Really, though, this is truly a potentially unworkable issue only for the "marine" bonus (as you can only give it to all or none, regardless of what was offloaded or not).


  • Moderators

    @ubernaut said in battle calc not accounting for limited bombards:

    @zlefin looks like you are correct sir:

    Screen Shot 2019-07-06 at 6.45.24 AM.png Screen Shot 2019-07-06 at 6.45.34 AM.png

    @redrum @LaFayette @RoiEX @ssoloff More generally, we would need a developer to delve into the code and check what the "Battle is Amphibious" check-box is for (full list). The only thing I'm aware of is adding the "marine" bonus to all marine units (in this regard, an incomplete feature, as you cannot calculate for cases of only part of the marine units being actually sea borne (say, in a map like Napoleonic Empires)), but I don't know what else that is for.

    As there are no "marine" units in a game like "World War II v3 1941", I don't understand what that "Battle is Amphibious" check-box is for, and, if the answer is nothing, then I believe it should be either not present or at least having the function of not showing and setting to 0 all the naval bombard units when unchecked (personally not a strong preference for either solutions, in case).

    Also, it doesn't appear to be needed for adding up the naval bombard at all, so I'm not sure why you checked that box @ubernaut.



  • @Cernel it allows for bombards calc adjustments in other games does it not?

    "Also, it doesn't appear to be needed for adding up the naval bombard at all, so I'm not sure why you checked that box @ubernaut."

    not quite sure what you are saying here. 🙂


  • Moderators

    @ubernaut As I said, the one and only thing I'm aware of is adding the "marine" modifier (to all marine units), when checked. For being sure of what that is actually doing, or could do, we need someone to look into the program.



  • @Cernel any amphibious assault gets a 1 round corresponding bombard, 1 for each unloading unit, if you uncheck the box it doesn't do anything to add additional naval units in that dialog as far as i am aware.


  • Moderators

    @ubernaut said in battle calc not accounting for limited bombards:

    @Cernel it allows for bombards calc adjustments in other games does it not?

    "Also, it doesn't appear to be needed for adding up the naval bombard at all, so I'm not sure why you checked that box @ubernaut."

    not quite sure what you are saying here. 🙂

    You don't need to check it to add up any units for naval bombard. I never check it, when I play games without marines.



  • @Cernel i dont think it matters with marines unless they are unloading, anyway it's separate from the bombard calc.


  • Moderators

    @ubernaut What I'm saying is that, as far as I know, that check box is doing nothing at all related to naval bombard, and I'm not understanding what you mean when you say "if you uncheck the box it doesn't do anything to add additional naval units in that dialog", so I cannot try to reproduce it.



  • @Cernel it def affects calcs in the game i play. fwiw, i think the way it works now is fine except that it assumes all added naval units have a valid corresponding amphibious unit.



  • @Cernel correction, i just checked, it's def NOT effecting calcs in at least some situations. sorry for any additional confusion added. 🙂



  • Screen Shot 2019-07-11 at 9.28.00 PM.png Screen Shot 2019-07-11 at 9.28.07 PM.png Screen Shot 2019-07-11 at 9.28.12 PM.png



  • different maps different results 😕
    Screen Shot 2019-07-11 at 9.32.24 PM.png Screen Shot 2019-07-11 at 9.32.44 PM.png Screen Shot 2019-07-11 at 9.33.05 PM.png


  • Admin

    @zlefin Correct, the battle calc doesn't consider the bombard limited by landing unit currently.

    @Cernel @ubernaut So it appears "Battle is Amphibious" controls 2 things currently:

    1. Whether isMarine bonus is applied to all attackers that have it set.
    2. Whether any bombard units use their bombard value rather than attack value (this is why you only see a difference on maps like TWW where units have bombard values different from attack values). This really shouldn't be the case as if they are bombarding they should always use their bombard value.

  • Moderators

    @redrum Wow, I wrapped my head around, didn't even guess that. That's definitely a dumb bug there. In games without marines, would you think it would be better just not to have the "Battle is Amphibious" option or needing it for adding the bombard units to the battlecalculator?

    Also, in the moment that thing should have one job, I would rename it to something like "Add marine bonus" or "Add sea borne modifiers to any units". I also really dislike the use of the term "amphibious", as that, biologically, would mean something that can fully live in and outside water. For example, a duck can swim in water and go on earth, but it is not an amphibious.


  • Admin

    @Cernel Yeah, quite a strange bug indeed. Probably due to all standard A&A maps having bombard equal to attack for units.

    For now I've fixed that logic so bombard units always use their bombard value and added a tooltip for "Battle Is Amphibious" to say "Determines if isMarine bonus is applied for all attacking land units". PR: https://github.com/triplea-game/triplea/pull/4917

    But yes for maps that don't have marines, its completely meaningless and could now just be hidden. You could take it the other direction as well where is shows/hides potential bombarding units in the attacking unit list. I'll think about this a bit but at least the bug is fixed now.


  • Moderators

    @redrum Ok, minor note, as it is implied in my renaming suggestion, TripleA supports also negative marine bonuses, so "Determines if isMarine bonus is applied for all attacking land units" would be more correct as "Determines if the isMarine modifier applies for all attacking land units", but I also see the use of the term "bonus" as clearer and totally fitting to all standard cases (actually, I think only WWII Classic 3rd Edition Iron Blitz matters), so it just depends if one wants to focus on the typical case, or be more generally correct. Also, I definitely suggest not using "isMarine" in any descriptions, as that is just xml coding, that should not directly matter for the users. It should be rather communicated in actual gaming terminology, for example "the marine bonus" or "the sea borne bonus for marine units" or just generally "the sea borne modifiers" (you could have a map in which all or most land units have negative isMarine bonuses, and none is really a marine unit).


  • Admin

    @Cernel Alright. I changed the parameter name to "Add amphibious attack modifiers" and the tooltip to "Applies amphibious attack modifiers to all attacking land units" as that aligns with the unit tooltip which calls it "Amphibious attack modifier" for any unit with IsMarine not 0.


  • Admin

    @zlefin I've now added logic to handle "Shore Bombard Per Ground Unit Restricted" in the PR as well. So should be fixed in the pre-release once that's merged.


Log in to reply