Allow user to specifically choose amphibious offloaded units in battle chooser
-
@cernel said in Allow user to specifically choose amphibious offloaded units in battle chooser:
Correct, and I believe the consensus was to apply this matter only to v3+ rules games, since previous to that either all units in the battle or all land units in the battle would be unable to retreat if one or more land units were offloaded into the embattled zone, so there is no actual need to display it. I understood that nothing would visually change for v1 and v2 rules games (not that I'm against if something does).
The engine doesn't know anything about "v3+ rule games". It is the "Partial Amphibious Retreat" property. If that is enabled, then non-amphibious land units can retreat while the amphibious land units can not. If that property is disabled, then no land units would be able to retreat so there isn't a difference.
-
@cernel How can I find out which rules version a game has?
-
@trevan said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@cernel said in Allow user to specifically choose amphibious offloaded units in battle chooser:
Correct, and I believe the consensus was to apply this matter only to v3+ rules games, since previous to that either all units in the battle or all land units in the battle would be unable to retreat if one or more land units were offloaded into the embattled zone, so there is no actual need to display it. I understood that nothing would visually change for v1 and v2 rules games (not that I'm against if something does).
The engine doesn't know anything about "v3+ rule games". It is the "Partial Amphibious Retreat" property. If that is enabled, then non-amphibious land units can retreat while the amphibious land units can not. If that property is disabled, then no land units would be able to retreat so there isn't a difference.
I, of course, agree it should be related only to that specific rule, not to the whole v3+ rules-sets. I meant to every game working by v3+ rules for the matter at hand, which means having the "Partial Amphibious Retreat" property set to true.
I reiterate I hate the term "amphibious" in this context and suggest changing it with something else (like "sea-borne") whenever feasible. A unit being "amphibious" is a unit which can be both land and sea (which is not currently possible in TripleA), so the current usage of the term "amphibious" is really wrong.
-
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@cernel How can I find out which rules version a game has?
You really can't. Rule versions don't map to anything in the game engine or the XML game data. But the "Partial Amphibious Retreat" is the property that you'd check. My PR https://github.com/triplea-game/triplea/pull/8947 already does all of that.
-
@trevan said in Allow user to specifically choose amphibious offloaded units in battle chooser:
the "Partial Amphibious Retreat" is the property that you'd check.
I agree. As usual, I believe the property name is bad and very unclear: it makes me think that this rule allows me partially to retreat the "amphibious" units themselves (whatever they are). Even if I would understand it as partially retreating something from a territory where an "amphibious" assalt took place, that would be true in Revised too, since there I can retreat all air units (only) from such a territory. The property name should have been something like "All Other Units May Retreat From Any Zone Invaded By Land Units Offloaded From The Sea".
-
@cernel Maybe take a look at my "270BC Wars" game. That one has 64x64 unscaled unit images
Pretty unit images
-
@rainova I think that the "no retreat possible" thing should be its own thing beside the unit image, not overlapping with it. We can expect TripleA having more of such images per unit type in the future (as it is a "status" of the unit).
The images are mostly modified versions of the ones of 270BC. A significant difference is that I've standardized them all to 64x64 pixels, while the originals have many different dimensions across the images.
-
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@cernel Maybe take a look at my "270BC Wars" game. That one has 64x64 unscaled unit images
Pretty unit images
Now that I give a minimum of attention to it, your screenshot clearly has enlarged (so, being raster ones, qualitatively degraded) units: those images you are displaying are certainly in excess of the 64 pixels on both axis they are supposed to be. I believe you are affected by this problem or something similar:
https://github.com/triplea-game/triplea/issues/4442I suggest you check whether or not that issue was unwarrantedly closed. Whatever the reason, I believe what you are experiencing is a problem because a raster images based program like TripleA should be supposed never to be generally zoomed as its own default (assuming this is what's happening to you).
-
@cernel Now that I give a minimum of attention to it, your screenshot clearly has enlarged (so, being raster ones, qualitatively degraded) units: those images you are displaying are certainly in excess of the 64 pixels on both axis they are supposed to be.
That's just because I have set my Windows system settings to scaling 150% (on my 4k screen; even with glasses, my vision is not that sharp). Here are the screenshots with 100% scaling:
Marines with non-withdrawal icon separate
Marines with non-withdrawal icon separate and vertically centered
Marines with non-withdrawal icon undercut
Carthage units with non-withdrawal icon separate
Carthage units with non-withdrawal icon separate and vertically centered
Carthage units with non-withdrawal icon undercut
@Cernel - and everybody who likes to contribute: What's your preference?
Next question - marine bonus: Currently - since I have included @Trevan's code (thank you very much ) - non-withdrawable units are shown first, because they are (a little) less valuable.
How would you like it with Marines and any other units with marine bonus: Shall non-withdrawable units with marine bonus be shown after their withdrawable equivalents,
because having an attack bonus is more significant than being non-withdrawable?If so: Let's imagine we have
marines
withnormal attack 2
andmarine bonus +2
and alsoimproved infantry
withnormal attack 3
and nomarine bonus
, and bothmarines
andimproved infantry
are attacking from land and from sea. What unit order would you like?A)
- withdrawable
marines
(attack 2+0) - non-withdrawable
improved infantry
(attack 3+0) - withdrawable
improved infantry
(attack 3+0) - non-withdrawable
marines
(attack 2+2)
(sort first by attack including bonus, then by non-withdrawable)
B )
- withdrawable
marines
(attack 2+0) - non-withdrawable
marines
(attack 2+2) - non-withdrawable
improved infantry
(attack 3+0) - withdrawable
improved infantry
(attack 3+0)
(sort first by attack without bonus, then by bonus, then by non-withdrawable)
If you prefer A) - let's assume we now have the some
horseman
(attack 4
,marine malus -2
) and somesellsword
(attack 2
, nomarine bonus/malus
) attacking. What would you prefer:A1)
- non-withdrawable
horseman
(attack 4-2) - non-withdrawable
sellsword
(attack 2+0) - withdrawable
sellsword
(attack 2+0) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus/malus
, then non-withdrawable, thenattack
)A2)
- non-withdrawable
sellsword
(attack 2+0) - withdrawable
sellsword
(attack 2+0) - non-withdrawable
horseman
(attack 4-2) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus/malus
, thenattack
orunitType
, then non-withdrawable, thenattack
)Thanks in advance for your input
- withdrawable
-
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@cernel Now that I give a minimum of attention to it, your screenshot clearly has enlarged (so, being raster ones, qualitatively degraded) units: those images you are displaying are certainly in excess of the 64 pixels on both axis they are supposed to be.
That's just because I have set my Windows system settings to scaling 150% (on my 4k screen; even with glasses, my vision is not that sharp).
Do you believe that is a correct or else advisable behaviour for TripleA? I would say a raster-images-based program should always work at 100% scaling default, no matter if the general (Windows or whatever) zoom is set otherwise. Having a more than 100% scaling display for raster images means displaying much worse looking images: inexperienced users may believe that the map itself really looks that bad and not even consider resetting their zoom at 100%.
At the very least, every user should be asked whether or not to apply the system zoom to TripleA too upon installing the program (and also having a way to change such setting thereafter).
I've detailed this issue here:
https://github.com/triplea-game/triplea/issues/746Here are the screenshots with 100% scaling:
Don't you think they look much better, especially the "270BC Wars" ones? If you agree they do, why is TripleA worsening the quality of its own maps? Would you agree that at least my "270BC Wars" map is well visible on 4k monitors without any zoom? You can also take a look at the "Conquest of the World" map, which was specifically made primarily for 4k monitors.
Marines with non-withdrawal icon separate
Marines with non-withdrawal icon separate and vertically centered
Marines with non-withdrawal icon undercut
Carthage units with non-withdrawal icon separate
Carthage units with non-withdrawal icon separate and vertically centered
Carthage units with non-withdrawal icon undercut
@Cernel - and everybody who likes to contribute: What's your preference?
I prefer the ones with the non-withdrawal icon separated and vertically centred. You have to think that TripleA may have, in the future, many of such "status" icons, which would have to display for the same group of units.
Next question - marine bonus: Currently - since I have included @Trevan's code (thank you very much ) - non-withdrawable units are shown first, because they are (a little) less valuable.
How would you like it with Marines and any other units with marine bonus: Shall non-withdrawable units with marine bonus be shown after their withdrawable equivalents,
because having an attack bonus is more significant than being non-withdrawable?If so: Let's imagine we have
marines
withnormal attack 2
andmarine bonus +2
and alsoimproved infantry
withnormal attack 3
and nomarine bonus
, and bothmarines
andimproved infantry
are attacking from land and from sea. What unit order would you like?A)
- withdrawable
marines
(attack 2+0) - non-withdrawable
improved infantry
(attack 3+0) - withdrawable
improved infantry
(attack 3+0) - non-withdrawable
marines
(attack 2+2)
(sort first by attack including bonus, then by non-withdrawable)
B )
- withdrawable
marines
(attack 2+0) - non-withdrawable
marines
(attack 2+2) - non-withdrawable
improved infantry
(attack 3+0) - withdrawable
improved infantry
(attack 3+0)
(sort first by attack without bonus, then by bonus, then by non-withdrawable)
If you prefer A) - let's assume we now have the some
horseman
(attack 4
,marine malus -2
) and somesellsword
(attack 2
, nomarine bonus/malus
) attacking. What would you prefer:A1)
- non-withdrawable
horseman
(attack 4-2) - non-withdrawable
sellsword
(attack 2+0) - withdrawable
sellsword
(attack 2+0) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus/malus
, then non-withdrawable, thenattack
)A2)
- non-withdrawable
sellsword
(attack 2+0) - withdrawable
sellsword
(attack 2+0) - non-withdrawable
horseman
(attack 4-2) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus/malus
, thenattack
orunitType
, then non-withdrawable, thenattack
)First of all, your last description doesn't make sense to me, since you call "attack", on its own, potentially twice (first in an "or" relation with "unitType" and subsequently alone) and I'm not clear what you mean by "then
attack
orunitType
" and what you mean by "unitType
".Moreover, as a matter of listing, I believe you have made the wrong listing for A1 (Please edit your post or clarify what I'm missing.), acconding to your own description: the correct one (based on my reading of your description) should have been
A1)- non-withdrawable
sellsword
(attack 2+0) - non-withdrawable
horseman
(attack 4-2) - withdrawable
sellsword
(attack 2+0) - withdrawable
horseman
(attack 4+0)
All that said, I would order the units primarily based on their own power (the dice at which they hit multiplied by the number of dice they roll), then, lacking better tie-breakers, I would give a higher value to units having a higher basic (before applying any marine bonuses) power, then based on the status (so to assure that units which are dinstinguished soley by that remain one next to the other). Therefore, I certainly prefer "A", but, regarding the second choice, I prefer "A2" as a matter of listing.
However, I believe that other elements, for example the cost of the unit, are more important than the basic attack value. Thus, if the "sellsword" costs more than the "horseman", I would have the listing as (which happens to be the same as your A1)
- non- withdrawable
horseman
(attack 4-2) - non-withdrawable
sellsword
(attack 2+0) - withdrawable
sellsword
(attack 2+0) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus
both multiplied byattackRolls
, thencost
, thenattack
multiplied byattackRolls
, then non-withdrawable)Side note, for the very last tie-breaker (which would not matter in the examples), I would go with the order the units are presented in the game file (sorting by
attack
+marine bonus
both multiplied byattackRolls
, thencost
, thenattack
multiplied byattackRolls
, then non-withdrawable, thenunitType
order in the "unitList" of the game (XML) file). - withdrawable
-
@cernel pointed out mistakes in my question, thanks. Since it is already 1h old, I cannot change it any more and post the correction here:
Let's imagine we have
marines
withnormal attack 2
andmarine bonus +2
and alsoimproved infantry
withnormal attack 3
and nomarine bonus
, and bothmarines
andimproved infantry
are attacking from land and from sea. What unit order would you like?A)
- withdrawable
marines
(attack 2+0) - non-withdrawable
improved infantry
(attack 3+0) - withdrawable
improved infantry
(attack 3+0) - non-withdrawable
marines
(attack 2+2)
(sort first by attack including bonus, then by non-withdrawable)
B )
- withdrawable
marines
(attack 2+0) - non-withdrawable
marines
(attack 2+2) - non-withdrawable
improved infantry
(attack 3+0) - withdrawable
improved infantry
(attack 3+0)
(sort first by attack without bonus, then by bonus, then by non-withdrawable)
If you prefer A) - let's assume we now have the some
horseman
(attack 4
,marine malus -2
) and somesellsword
(attack 2
, nomarine bonus/malus
) attacking. What would you prefer:A1)
- non-withdrawable
sellsword
(attack 2+0) - non-withdrawable
horseman
(attack 4-2) - withdrawable
sellsword
(attack 2+0) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus/malus
, then non-withdrawable, thenattack
)A2)
- non-withdrawable
sellsword
(attack 2+0) - withdrawable
sellsword
(attack 2+0) - non-withdrawable
horseman
(attack 4-2) - withdrawable
horseman
(attack 4+0)
(sort by
attack
+marine bonus/malus
, thenattack
orunitType
, then non-withdrawable)Thanks in advance for your input
- withdrawable
-
This post is deleted! -
How about this order of sort criteria:
-
own power
-
cost (for a transport, cost includes the units that go down with it)
-
defense
-
movement of unit type
-
base attack
-
everything above being equal air units are less valuable than land or sea units
-
air units are more valuable the more movement points they have left
-
everything above being equal non-withdrawable units are less valuable than withdrawable units
-
allied units are less valuable than own units
-
respective allies according to their order in the game file
-
unit types in their order in the game file
As far as I know, the casualty selection dialog puts units that are already damaged before casualty selection, in their own categories. If so, I`d add
- units with more damage are less valuable
Technology advancements can change some of the above attributes. It take it that should also be considered.
-
-
@rainova Especially since by now we have added so much information to this topic to make it almost unreadable to anyone who didn't follow it so far, I think generally reworking how casualties are assigned as default should rather be its own topic (especially since it is higly impactful on virtually every TripleA user).
Nevertheless, let me just point out that, usually, the mobility of a unit is scarcely a positive item, casualties wise: fast units are usually worth less than their fighting value, to account for the strategic advantage of having a higher movement, which is mostly given by being able to reach the frontline faster (For example, in World At War, you usually want to take out armoredCar before elite, even though the armoredCar is more expensive, so there you see that, while having a higher mobility is still a positive thing, you don't really want to be too keen to give a positive value to mobility when you are selecting casualties because often most of the benefit of that mobility has already been used on a strategic level to reach the frontline faster.).
For the matter at hand, I rather suggest you furnish the current exact list of how the engine auto-selects casualties, and we merely sort out where to add the non-withdrawable status within it.
-
@rainova I don't think the UI causualty selection should be this advanced. Just split the non-retreatable units from the retreatable units and keep them together. I don't think the UI should worry about power, bonus, etc.
@Cernel you seem to be talking about the default casualty selection which isn't the same thing that @RaiNova is talking about. He is just talking about how to display the UI where the user can pick which casualties to select.
-
@trevan said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@Cernel you seem to be talking about the default casualty selection which isn't the same thing that @RaiNova is talking about. He is just talking about how to display the UI where the user can pick which casualties to select.
Do we possibly want not to list units' groups by the same order as pre-selected casualties?
-
@cernel said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@trevan said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@Cernel you seem to be talking about the default casualty selection which isn't the same thing that @RaiNova is talking about. He is just talking about how to display the UI where the user can pick which casualties to select.
Do we possibly want not to list units' groups by the same order as pre-selected casualties?
TripleA has never done that before so I'm not sure why it should do it now. It doesn't seem to give any value. The order of units in the selection dialog should be similar to all other selection dialogs. That's how the user sees the units being sorted. Whether the user internally sorts them different is something the UI shouldn't attempt to guess.
-
@cernel said in Allow user to specifically choose amphibious offloaded units in battle chooser:
I would say a raster-images-based program should always work at 100% scaling default, no matter if the general (Windows or whatever) zoom is set otherwise.
Start java.exe with the additional command line argument
-Dsun.java2d.uiScale.enabled=false
, see https://news.kynosarges.org/2019/03/24/swing-high-dpi-properties/
@LaFayette you may want to do thisIt does look better.
I've detailed this issue here:
https://github.com/triplea-game/triplea/issues/746
The issue was closed. For overall brevity, I added the info here. -
@rainova So, can that be made so that is the default everyone gets when installing TripleA and maybe adding a line to "vmoptions" or something to set it true if preferred?
-
@cernel said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@rainova So, can that be made so that is the default everyone gets when installing TripleA and maybe adding a line to "vmoptions" or something to set it true if preferred?
@LaFayette May I relay that to you?