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

    Review of haveResources

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    22 Posts 6 Posters 7.1k Views 6 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.
    • VictoryFirstV Offline
      VictoryFirst
      last edited by

      @wc_sumpton @Cernel

      Regarding the name, I would go for "haveResources". Even though it's not a general way of naming it, "resourcesPossession" is unnecessarily longer and still conveys the same meaning. I don't see any advantage in calling it "resourcePossession".

      Optionally, you could even rename it to "hasResources" which would be even shorter and more fitting since more often than not you will check for only one player at a time.

      However, that last argument might be not completely true as the players in this game are often called by a plural form ("Germans", "Americans"), although still, I think it's the most clear and concise description. Those are just my thoughts...

      @wc_sumpton Awesome this will get implemented, amazing work! Will you take a look at "totalTerritoryProduction" too? No rush, just wondering 😀

      wc_sumptonW 1 Reply Last reply Reply Quote 1
      • wc_sumptonW Offline
        wc_sumpton @VictoryFirst
        last edited by

        @victoryfirst said in Review of haveResources:

        Optionally, you could even rename it to "hasResources" which would be even shorter and more fitting since more often than not you will check for only one player at a time.

        Sure "hasResources" if that is what is wanted?

        @victoryfirst said in Review of haveResources:

        @wc_sumpton Awesome this will get implemented, amazing work! Will you take a look at "totalTerritoryProduction" too? No rush, just wondering

        "estimatedResourceProduction" is what I have right now. It only accounts territory that are owned by the player. There will be a discussion opened for that one.

        Cheers...

        VictoryFirstV 1 Reply Last reply Reply Quote 2
        • VictoryFirstV Offline
          VictoryFirst @wc_sumpton
          last edited by

          @wc_sumpton

          Yes, now I have thought more about it, I would go for "hasResources" if everyone agrees.

          "estimatedResourceProduction" sounds good! I am interested to see how that will unfold!

          I'm learning Java now 🙂 It is pretty similar to Python in a lot of areas which is great because I already know how to program in Python.

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

            @wc_sumpton said in Review of haveResources:

            @cernel said in Review of haveResources:

            For consistency, I would have it called "resources" instead of "haveResources". In none of the similar cases, we have anything starting from "have". For example, we have the condition "techs" not "haveTechs". However, if "resources" alone may be confusing, it can be "resourcesPossession" (which is practically an other way to say "have resources")

            "resources" is already used, both in territoryAttachment and triggerAttachment. "resourcesPossession" would be ok, but as you stated, it's just another way of saying "haveResources". As I have not yet submitted the PR, changing the name would be quite easy.

            This is one more reason for having "resources" instead of "haveResources" (I mean the fact that the trigger option is

            <option name="resource" value="PUs"/>
            <option name="resourceCount" value="6"/>
            

            instead of

            <option name="addResource" value="PUs"/>
            <option name="resourceCount" value="6"/>
            

            .)

            (I don't understand why having a "resourceCount" as a separate option instead of the given number being the count for the primary option.)

            There is no problem having a conditions option with the same name as a triggers option, is there? Actually, the triggers option is "resource" (not "resources"). Maybe the conditions option should be "resource" too for consistency.

            To be clear, my primary suggestion was to call it just "resources". "resourcesPossession" was the didascalic alternative.

            Thinking again about it, I guess it should better be named "resource" instead of "resources".

            RogerCooperR 1 Reply Last reply Reply Quote 2
            • RogerCooperR Offline
              RogerCooper @Cernel
              last edited by

              @cernel I would prefer hasResources for clarity.

              wc_sumptonW 1 Reply Last reply Reply Quote 3
              • wc_sumptonW Offline
                wc_sumpton @RogerCooper
                last edited by

                @rogercooper

                Thank you!

                Cheers...

                @cernel said in Review of haveResources:

                (I don't understand why having a "resourceCount" as a separate option instead of the given number being the count for the primary option.)

                Many have complained about this. I have "changeResources" which will look at this. (Yes, I have many modifications done.)

                @cernel said in Review of haveResources:

                There is no problem having a conditions option with the same name as a triggers option, is there? Actually, the triggers option is "resource" (not "resources"). Maybe the conditions option should be "resource" too for consistency.

                Because this adds different resources, and can use the "players" option, I think "resources" with an "s" is still better. Conditions/triggers/objectives at times use the same "library" of files, so I try to stay away names that have already been used.

                @cernel said in Review of haveResources:

                To be clear, my primary suggestion was to call it just "resources". "resourcesPossession" was the didascalic alternative.

                Understood, again thank you for your time and suggestions.

                Cheers...

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

                  @wc_sumpton
                  My 2p I prefer hasResource (no s)

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

                  wc_sumptonW 1 Reply Last reply Reply Quote 1
                  • wc_sumptonW Offline
                    wc_sumpton @TheDog
                    last edited by

                    @thedog said in Review of haveResources:

                    @wc_sumpton
                    My 2p I prefer hasResource (no s)

                    Thank you!

                    Cheers...

                    1 Reply Last reply Reply Quote 1
                    • VictoryFirstV Offline
                      VictoryFirst
                      last edited by VictoryFirst

                      @wc_sumpton

                      I would prefer "hasResources" actually since "hasResource" could also mean just one of a type. If you have one Iron you would have that resource, but "hasResources" would be clearer as you are checking how many resources of a type a player has.

                      1 Reply Last reply Reply Quote 1
                      • wc_sumptonW Offline
                        wc_sumpton
                        last edited by

                        At the present time I have change it to "hasResource"

                        The question the trigger is asking is "Has this player have enough oil/fuel/PUs (not oils/fuels/PUss resource) to do something?".

                        Cheers...

                        VictoryFirstV 1 Reply Last reply Reply Quote 2
                        • VictoryFirstV Offline
                          VictoryFirst @wc_sumpton
                          last edited by

                          @wc_sumpton

                          Hmm, you have convinced me. You can see it as "has(enough of that)Resource". So go with "hasResource". It's also shorter lol 🙂

                          1 Reply Last reply Reply Quote 1
                          • wc_sumptonW Offline
                            wc_sumpton
                            last edited by

                            PR has been submitted for hasResource

                            Cheers...

                            1 Reply Last reply Reply Quote 3
                            • wc_sumptonW Offline
                              wc_sumpton
                              last edited by

                              DOA

                              PR has been pulled.

                              Cheers...

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

                                @wc_sumpton

                                pulled as in merged ? or as in no longer there ?

                                🙂

                                who or what is DOA 🙂

                                wc_sumptonW 1 Reply Last reply Reply Quote 0
                                • wc_sumptonW Offline
                                  wc_sumpton @beelee
                                  last edited by

                                  @beelee said in Review of haveResources:

                                  who or what is DOA

                                  "Dead On Arrival"

                                  @beelee said in Review of haveResources:

                                  pulled as in merged ?

                                  No sorry.

                                  Cheers...

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

                                    @wc_sumpton

                                    oh yea 😞

                                    bummer

                                    kinda doesn't make one want to help Be nice if someone would try and help with your work instead of just saying no.

                                    idk maybe they do and I'm just reading it wrong.

                                    You're good at what you do and more devs are always wanted.

                                    idk not enough time for them to teach I guess 🙂

                                    1 Reply Last reply Reply Quote 2

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