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

    maxBuiltPerPlayer error resets Purchase UI (was How to limit the number of units purchased)

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    13 Posts 4 Posters 3.4k Views 3 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.
    • RogerCooperR Offline
      RogerCooper @butterw
      last edited by

      @butterw You could create a specialized factory type, with a capacity of 1 that can only build carriers and don't let regular factories build carriers.

      B 1 Reply Last reply Reply Quote 1
      • B Offline
        butterw @RogerCooper
        last edited by butterw

        @rogercooper
        Sounds correct: a custom Factory can be used.
        The extra complexity is maybe not warranted in this example, given the high cost of purchasing an aircraft carrier.

        My main issue is that maxBuiltPerPlayer piece limits aren't applied in the Purchase interface (the purchase is reset if you have gone beyond the limit) and there doesn't seem to be any way to get info on the current number of pieces used.
        By contrast, when you buy more units than you can place you get the following warning after the purchase (the purchase info is not reset):

        End Purchase:
        You have purchased 13 units, and can only place 8 of them. Continue with Purchase ?
        
        RogerCooperR 1 Reply Last reply Reply Quote 3
        • RogerCooperR Offline
          RogerCooper @butterw
          last edited by

          @butterw I agree that a better interface would be good, but build limits work and are even supported by the AI. The original 1981 edition of A&A limited players to the counter mix.

          1 Reply Last reply Reply Quote 1
          • B Offline
            butterw @butterw
            last edited by

            @butterw said in How to limit the number of units purchased in a turn ?:

            1. Is there a way to display the summary of a players unit count per unit type ?

            Per player Unit type count history is available in the export game stats csv file. This info doesn't seem to be available anywhere else.

            1 Reply Last reply Reply Quote 0
            • B Offline
              butterw
              last edited by butterw

              A fix to the User Interface for purchases with maxBuiltPerPlayer limits is needed

              Issue:

              • Attempting to buy above the maxBuiltPerPlayer piece-limits, results in an error and a complete reset of the planned purchases: you have to start over which is very frustrating.
              • This is made worse by the fact that the current number of piece is not known beforehand by the player (the only way to know is by getting the error).
              • At the end of the game it is expected multiple limits (ex: infantry because it is cheapest unit, armour because the japanese piece limit is low, fighters) will be hit every turn. This will result in a purchase reset for each limit.
              • Currently the player has to test each limit, get errors and remember the values to know what he can actually purchase for the turn.

              Current Code:
              PurchaseDelegate.java "May only build "

              ui/PurchasePanel.java

              Suggested Fix:

              • Planned purchase should not be completely reset if a limit is hit.
              • The error message should provide status on all the player's maxBuiltPerPlayer limits.
              • Instead of a final error it should be a warning tested each time the Purchase interface is validated with Done (like when you attempt to purchase beyond production capacity).

              **EDIT: ** As suggested by @TheDog displaying the max which can be purchased for each unit type in the purchase interface might be an easier/better fix
              ex: Infantry (7)

              TheDogT 1 Reply Last reply Reply Quote 1
              • TheDogT Offline
                TheDog @butterw
                last edited by

                @butterw
                Another suggestion, show how many can be bought, as in the image below;

                8542b084-51a9-45fc-a0d1-f886ca186d71-image.png

                So a maximum of 2 Wizards and 3 Sorcerers can be can be purchased, the rest are unlimited, to the PU available.
                If the red numbers were 0 then, 0 can be purchased.

                https://forums.triplea-game.org/tags/thedog
                https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                RogerCooperR 1 Reply Last reply Reply Quote 4
                • RogerCooperR Offline
                  RogerCooper @TheDog
                  last edited by

                  @thedog Why not show the total number of pieces you already have of each type regardless of the maxBuilt property? That can be useful for planning purposes.

                  B 1 Reply Last reply Reply Quote 1
                  • B Offline
                    butterw @RogerCooper
                    last edited by

                    https://github.com/triplea-game/triplea/issues/9231

                    Using the max button would be the best way to prevent going above maxBuiltPerPlayer-currentlyBuilt.
                    To display the players currentlyBuilt units the produce tooltip or an extra value could be could be added to the unit name or info label.

                    B 1 Reply Last reply Reply Quote 2
                    • B Offline
                      butterw @butterw
                      last edited by butterw

                      The unit count gets redone everytime the production panel is opened (in fact it gets redone twice, probably because of the tabs), but otherwise my mod seems to be working ok.

                      I'm struggling to find a word to describe the maxBuiltPerPlayer-unitCount value in the UI.
                      I've used "Left" or "Available", but maybe "to piece-Limit" or just "limit" would be preferable (producing beyond the piece-limit isn't allowed) ?

                      EDIT:
                      I would also like to feature the Production Capacity (ex: 13 units), I've modified the bottom label to display:
                      0/13 total units purchased.

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        butterw
                        last edited by butterw

                        The improved Production Panel is available in my test build v3.5.1-bu:
                        https://forums.triplea-game.org/post/50714

                        see also: https://github.com/triplea-game/triplea/issues/9231

                        1 Reply Last reply Reply Quote 1

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