TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Allow user to specifically choose amphibious offloaded units in battle chooser

    Scheduled Pinned Locked Moved Development
    85 Posts 6 Posters 41.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      Trevan @LaFayette
      last edited by

      @lafayette said in Allow user to specifically choose amphibious offloaded units in battle chooser:

      @trevan I likely could help, post a draft PR when ready and I can try to jump in with some commits.

      Here's a draft PR - https://github.com/triplea-game/triplea/pull/8947

      1 Reply Last reply Reply Quote 1
      • T Offline
        Trevan @Cernel
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • R Offline
          RaiNova @Trevan
          last edited by

          @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...

          R C 2 Replies Last reply Reply Quote 0
          • R Offline
            RaiNova @RaiNova
            last edited by

            @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
            WithdrawalSignInFront.png

            Version with withdrawal sign behind unit image
            WithdrawalSignInRear.png

            Real screenshots 😁

            LaFayetteL 1 Reply Last reply Reply Quote 1
            • C Offline
              Cernel Moderators @RaiNova
              last edited by

              @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).

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                Cernel Moderators @Cernel
                last edited by

                @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.

                1 Reply Last reply Reply Quote 1
                • LaFayetteL Offline
                  LaFayette Admin @RaiNova
                  last edited by

                  @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.

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    RaiNova @LaFayette
                    last edited by

                    @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
                    WithdrawalSignInFrontScaled.png

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

                    @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 🙂

                    R C 2 Replies Last reply Reply Quote 0
                    • R Offline
                      RaiNova @RaiNova
                      last edited by

                      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.
                      T 1 Reply Last reply Reply Quote 0
                      • T Offline
                        Trevan @RaiNova
                        last edited by

                        @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).

                        C 1 Reply Last reply Reply Quote 1
                        • C Offline
                          Cernel Moderators @RaiNova
                          last edited by

                          @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.

                          R 1 Reply Last reply Reply Quote 0
                          • C Offline
                            Cernel Moderators @Trevan
                            last edited by

                            @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).

                            T R 2 Replies Last reply Reply Quote 0
                            • T Offline
                              Trevan @Cernel
                              last edited by

                              @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.

                              C 1 Reply Last reply Reply Quote 0
                              • R Offline
                                RaiNova @Cernel
                                last edited by

                                @cernel How can I find out which rules version a game has?

                                T 1 Reply Last reply Reply Quote 0
                                • C Offline
                                  Cernel Moderators @Trevan
                                  last edited by

                                  @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.

                                  1 Reply Last reply Reply Quote 1
                                  • T Offline
                                    Trevan @RaiNova
                                    last edited by

                                    @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.

                                    C 1 Reply Last reply Reply Quote 2
                                    • C Offline
                                      Cernel Moderators @Trevan
                                      last edited by Cernel

                                      @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".

                                      1 Reply Last reply Reply Quote 1
                                      • R Offline
                                        RaiNova @Cernel
                                        last edited by

                                        @cernel Maybe take a look at my "270BC Wars" game. That one has 64x64 unscaled unit images
                                        Carthage.png

                                        Pretty unit images 🙂

                                        C 2 Replies Last reply Reply Quote 0
                                        • C Offline
                                          Cernel Moderators @RaiNova
                                          last edited by

                                          @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.

                                          1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            Cernel Moderators @RaiNova
                                            last edited by Cernel

                                            @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
                                            Carthage.png

                                            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/4442

                                            I 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).

                                            R 1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 1 / 5
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums