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:
I want to add that, as far as I know, the only current case (beside multiple hitpoints) in which you are prompted to select different same-named units is when the two or more same-named transports (surely sea and maybe air too) have different units assigned. In this case, the transports will display the units on board beside the transport's image (or nothing if none). So this should be done in a way similar to that and also taking into account that in the future more additional images might be added for other cases in which it is not irrelevant chosing any one amongst two or more same-named units.
There are other cases as well. When putting a unit on a transport, if transports have different amount of movement left, it will separate them. When putting a unit on an air transport, if the units have different transport cost, it will separate them.
-
@trevan, @Cernel I am preparing my first screenshot to get your feedback.
But it turns out the units are displayed so small that the non-withdrawal add on icon is eiter too big or - when I scale it down - becomes very pixeled, and the whole thing is hard to read.DEFAULT_UNIT_ICON_SIZE is 48, which would probably result in a nice display.
But PROPERTY_UNITS_SCALE is 0.5625, which results in unit icon size 27.Why is that? Would anybody mind if we display units with 48 pixels in the casualty selection dialog in 2.6?
If you agree: Shall I only do that in the casualty selection dialog?
(I would probably add a flag unscaled to UnitImageFactory.getImage.)If you don't agree: Suggestions please, how to display the fact, that units can't retreat.
I can't imagine a pretty graphical solution. But then - I am no designer... -
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@trevan, @Cernel I am preparing my first screenshot to get your feedback.
But it turns out the units are displayed so small that the non-withdrawal add on icon is eiter too big or - when I scale it down - becomes very pixeled, and the whole thing is hard to read.DEFAULT_UNIT_ICON_SIZE is 48, which would probably result in a nice display.
But PROPERTY_UNITS_SCALE is 0.5625, which results in unit icon size 27.Why is that? Would anybody mind if we display units with 48 pixels in the casualty selection dialog in 2.6?
If you agree: Shall I only do that in the casualty selection dialog?
(I would probably add a flag unscaled to UnitImageFactory.getImage.)If you don't agree: Suggestions please, how to display the fact, that units can't retreat.
I can't imagine a pretty graphical solution. But then - I am no designer...Version with withdrawal sign in front of unit image

Version with withdrawal sign behind unit image

Real screenshots

-
@rainova I have to assume you are either looking at a skin (that is, at a map, if you are using the original skin for the same) whose "units.scale", as defined in "map.praperties", is equal to 0.5625 or you have set such a "Unit Size" via the "View" menu.
Whatever the reason, TripleA supports any kind of unit dimensions (look at "Conquest of the World" if you want to see a map with units sized 256 per 192), so you can have a map whose icon size is 24 or even less before applying any scaling.
My suggestion is just to have a default image which you feel good for most maps (I suggest you taylor it for "Pact of Steel 2".) and allow map-makers to customize the icon (by optionally adding in the skin (maybe inside the "misc" folder of the map) an image which will be used for the matter at hand).
This said, I would agree with always setting the units scale at 1 when displaying unit images while selecting casualties. I don't think that the current program behaviour of applying the scaling there is preferable anyway.
If you want to have an arguably perfectly sized image for the matter at hand, you would need having a vectorial image and assuring it displaying at a given ratio with respect to the size at which the units are being displayed, but I'm not helping you there (as I'm not able to create vectorial images).
-
@cernel Long story short, just use the "24 pixels on both axis" image I provided, without ever scaling it, and don't care if it is sometimes too big or too small, depending on the map.
-
@rainova Thanks for picking this up. I like the version with the no-retreat symbol behind the unit. i don't think I've any objection to changing the casualty picker unit size, before/after screenshots may help.
-
@LaFayette i don't think I've any objection to changing the casualty picker unit size, before/after screenshots may help.
Map is Big_World_1942_v3rules.xml
Screenshot with scaled unit and non-withdrawal icons

Screenshot with scaled unit icons and 24x24 non-withdrawal icon

@Cernel I suggest you taylor it for "Pact of Steel 2"
The pact of steel variations I can download have no marine units. Neither does pact_of_steel_2_test.xml.I'm happy to try with other maps - please provide

-
Let's define the precise logic:
How about:
In games with units with marine bonus or malus the casualty selection dialog groups units by whether they are attacking from sea and adds a non-withdrawal icon to units attacking from sea.This means:
- The casualty selection dialog groups units by attacking from sea even if they have no marine bonus/malus
(for the sake of traceability by the user) - ... even if the respective player has no units with marine bonus/malus at all,
- but only in games wher some player has units with marine bonus/malus.
- The casualty selection dialog groups units by attacking from sea even if they have no marine bonus/malus
-
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
Let's define the precise logic:
How about:
In games with units with marine bonus or malus the casualty selection dialog groups units by whether they are attacking from sea and adds a non-withdrawal icon to units attacking from sea.This means:
- The casualty selection dialog groups units by attacking from sea even if they have no marine bonus/malus
(for the sake of traceability by the user) - ... even if the respective player has no units with marine bonus/malus at all,
- but only in games wher some player has units with marine bonus/malus.
This shouldn't have anything to do with the "marine bonus". It only affects units that can't retreat. And right now, the only units that can not retreat are land units that are attacking from the sea (amphibious units).
- The casualty selection dialog groups units by attacking from sea even if they have no marine bonus/malus
-
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
I'm happy to try with other maps - please provide

Maybe take a look at my "270BC Wars" game. That one has 64x64 unscaled unit images.
-
@trevan said in Allow user to specifically choose amphibious offloaded units in battle chooser:
@rainova said in Allow user to specifically choose amphibious offloaded units in battle chooser:
Let's define the precise logic:
How about:
In games with units with marine bonus or malus the casualty selection dialog groups units by whether they are attacking from sea and adds a non-withdrawal icon to units attacking from sea.This means:
- The casualty selection dialog groups units by attacking from sea even if they have no marine bonus/malus
(for the sake of traceability by the user) - ... even if the respective player has no units with marine bonus/malus at all,
- but only in games wher some player has units with marine bonus/malus.
This shouldn't have anything to do with the "marine bonus". It only affects units that can't retreat. And right now, the only units that can not retreat are land units that are attacking from the sea (amphibious units).
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 casualty selection dialog groups units by attacking from sea even if they have no marine bonus/malus
-
@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
marineswithnormal attack 2andmarine bonus +2and alsoimproved infantrywithnormal attack 3and nomarine bonus, and bothmarinesandimproved infantryare 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, thenattackorunitType, then non-withdrawable, thenattack)Thanks in advance for your input
- withdrawable
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login