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

    Expand UserActionAttachment & PoliticalActionAttachment To All Resources

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    50 Posts 5 Posters 23.2k 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.
    • C Offline
      Cernel Moderators @redrum
      last edited by

      @redrum As I said in the other thread, I think having an option for testing the presence of the resources (to remove) and a different option for removing resources ("createsResourcesList" with negative values, that is already there) seems better to me, and in line with how everything else works (you don't have a single option for testing relationships and changing them, etc.), instead of a single option that both tests presence and remove the resources, but it seems that not everyone is getting it, not sure why; so I guess this version (a single option both testing you have X resources and removing them) has the benefit of being easier to understand for most, looks like.

      By the way, a thing I didn't specify is that my suggested way, if meant to work for politics too, not only for user action, needs either the addition of the "activateTrigger" support to them too, or a direct support of the "createsResourcesList" in the action, that I would anyway advice (as currently you can give/remove resources with user actions, via the aforementioned trigger option, but not with political actions).

      Side note, while at it, I suggest having a way to specify to remove all in "createsResourcesList", so we don't have to set it at -10000 or something (already a few maps going this way).

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

        @cernel said in Resource System Assessment and Improvements:

        To make a clear example, now you can give 4 PUs from Americans to British by:

        • Having a costPU=4
        • Having a trigger adding 4 PUs to British

        If you would be able to test for resources you could do it by:

        • Having a condition for testing Americans having 4+ PUs
        • Having a trigger removing 4 PUs from Americans
        • Having a trigger adding 4 PUs to British

        All the triggers are already there; it is just needed the condition for testing the presence of any resources, comprising PUs. So, I would go this way, instead of extending the costPU, as this being much more extensive.

        An example may be that you want the Americans being unable to give all their income to the British, and you could do this by giving X and testing Y, where Y may be equal to 2X (the Americans are limited giving at most half their income to the British). Of course, you could use the ability to test for resources for totally different reasons, as well.

        Anyways, I've said this a bunch of times and, as much at it seems obvious to me, it seems to confuse others, so I guess just expanding the costPU is what most are actually requesting.

        redrumR 1 Reply Last reply Reply Quote 0
        • redrumR Offline
          redrum Admin @Cernel
          last edited by

          @cernel While I get what you are saying, I think the majority of folks and convenience of a simple option for user/political actions that does both overruled you. Adding resource check for conditions is still something that would be nice to add but is lower priority as its been much less requested than this.

          TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

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

            @redrum I think most don't think about it at all, but just look at the costPU and think about expanding it to any resources, so I think most are just not getting what I'm saying (not realising that testing resources would fully cover) or overlooking it. Anyways, it is true I don't appear to have convinced anyone, as I already pointed out myself.
            One way or the other, being able to actually use resources is a big step ahead (tho you can currently do it by hacking units into simulating resources in boxes or whatever), just to clarify I'm supportive.

            1 Reply Last reply Reply Quote 0
            • redrumR Offline
              redrum Admin
              last edited by

              Here is the PR: https://github.com/triplea-game/triplea/pull/3459

              XML

                      <attachment name="userActionAttachment_6_Finland_receives_financial_support" attachTo="Germany" javaClass="games.strategy.triplea.attachments.UserActionAttachment" type="player">
                          <option name="conditions" value="conditionAttachment_Finland_receives_financial_support"/>
                          <option name="activateTrigger" value="triggerAttachment_Finland_receives_financial_support-1:1:false:false:false:false"/>
                          <option name="activateTrigger" value="triggerAttachment_Finland_receives_financial_support-2:1:false:false:false:false"/>
                          <option name="text" value="Germany_Finland_10_PUs"/>
                          <option name="costResources" value="10:PUs"/>
                          <option name="costResources" value="2:Iron"/>
                          <option name="costResources" value="1:Fuel"/>
                          <option name="attemptsPerTurn" value="1"/>
                      </attachment>
              

              Result
              0_1528950599157_aa07a5e4-ac7d-4db9-b7a2-b1d0780d0309-image.png

              TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

              C General_ZodG 2 Replies Last reply Reply Quote 2
              • C Offline
                Cernel Moderators @redrum
                last edited by

                @redrum I wouldn't have the display like "[10 PUs, 2 Iron, 1 Fuel]", or anything like that at all. The mapmaker can just add it in the customised description, exactly as it reads now, or differently, so I don't see the point of having any automated description, there, unless maybe only if the button is not customized at all.

                Another difference, and something you may want to consider, is whether the cost resource is paid in any case or only if successful, in all or some cases.
                For example, if Finland have to accept the aid and refuses, do you still pay the cost for nothing?
                For example, you have an user action to hire a Ninja, with a chance to succeed: should you pay the cost in all cases or only if the action is successful?
                For example, you have a political action to Ally a player at some cost for you, if he consents: should you pay the cost no matter if he refuses or only if he accepts?
                Under my suggestion, the cost would have been paid only if the action was successful (as it would remove resources with a trigger that needs to be activated by the action).
                The current behaviour (unless recent changes) is to always pay the cost, no matter if the action is successful.
                I remember this felt dumb back when Napoleonic Empires FFA had costs to upgrade relationships, as you would pay that cost no matter if the other side refused, so you needed to chat to try to be assured the other guy was going to accept it, not to just waste money for nothing (but then Veqryn removed all action costs from that game, so it doesn't matter anymore for that one).
                On this point, my suggestion is supporting both (the mapmaker being able to decide whether the cost is paid always or only for successful actions).

                redrumR 1 Reply Last reply Reply Quote 0
                • alkexrA Offline
                  alkexr @Cernel
                  last edited by

                  @cernel I've noticed a problem with the check-then-remove approach while thinking about it. The conditions only check whether you had enough resources before the user actions phase. If you spend resources for user actions, the conditions won't be reevaluated, and all other user actions will still be available regardless of whether you have enough resources or not. At least this is my understanding of how conditions work.

                  "For the world is changing: I feel it in the water, I feel it in the earth, and I smell it in the air."

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

                    @alkexr As I already said, conditions are tested upon getting the actions panel. Just test it.

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

                      @cernel You can test it with "Napoleonic Empires: FFA 5 Player", if you set Relationships Last Extra Rounds equal to -1.
                      Conditions are tested anew after each time you take an action, and this is intended.

                      General_ZodG 1 Reply Last reply Reply Quote 1
                      • General_ZodG Offline
                        General_Zod Moderators @Cernel
                        last edited by General_Zod

                        @cernel

                        The ability to check any resource quantity for any players in conditions is a cool feature and has much potential. I would love to see it come to fruition someday. I'm not one to hold back progress but it should be a separate feature request.

                        There are overlapping functionality, but as it relates to user/political actions specifically, as I understand it, it will require more xml code to implement the same outcome as compared with this method. Also this assumes you are correct about the conditions being constantly checked and rechecked for multiple user/political actions performed on same players phase (after each individual action).

                        Anyways the 2 methods each have advantages and disadvantages but are not mutually exclusive. Meaning we can still hopefully get your method and all its functionality, down the road. This would also keep in line with existing xml structure as well, as there are currently areas where the same outcome can be achieved by different methods.

                        1 Reply Last reply Reply Quote 0
                        • General_ZodG Offline
                          General_Zod Moderators @redrum
                          last edited by

                          @redrum

                          Cool feature. I look forward to implementing it in Big World 3 once it is merged. Thanks.

                          1 Reply Last reply Reply Quote 1
                          • redrumR Offline
                            redrum Admin @Cernel
                            last edited by

                            @cernel Can't really remove the auto display of the resources amounts as that would pretty much make any existing maps that use them unusable. Unless you are volunteering to find/update all of them 🙂

                            And if something has a chance to succeed then whether it does or doesn't I'd expect the player to pay for it. Similar to tech tokens.

                            TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

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

                              @redrum Ok, but you probably mean similarly to v2 tech, then. Since v3 tech (token based) you keep the tokens if failing, that is effectually closer to paying the cost only with success (the only difference is that the tokens oblige you to try again, instead of using the money for something else).

                              I agree that would be good to update all maps having costPU, especially for, then, removing the costPU from the engine (instead of merely deprecating it), in favour of the new costResources. If @Frostion is good with that for his maps, I can look updating the rest. Agreed?

                              redrumR 1 Reply Last reply Reply Quote 0
                              • redrumR Offline
                                redrum Admin @Cernel
                                last edited by

                                @cernel I'd love to remove costPU instead of just deprecating it as it really isn't needed with costResources so as long as folks can ensure all existing maps are updated then I'm glad to remove it entirely.

                                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                C alkexrA General_ZodG 4 Replies Last reply Reply Quote 0
                                • C Offline
                                  Cernel Moderators @redrum
                                  last edited by

                                  @redrum Let's wait for @Frostion, then. Very few other games use costPU, and they amount to almost 0% of what is played.

                                  1 Reply Last reply Reply Quote 0
                                  • alkexrA Offline
                                    alkexr @redrum
                                    last edited by

                                    @redrum said in Expand UserActionAttachment & PoliticalActionAttachment To All Resources:

                                    so as long as folks can ensure all existing maps are updated

                                    I'd have assumed there was some standardized procedure for such scenarios. The task is just a simple mass replacement across files, isn't it everyone's first thought to just write a script and do it? Don't we have a bot that can do regex replacement across all game xmls? Wouldn't it be awesomely useful?

                                    "For the world is changing: I feel it in the water, I feel it in the earth, and I smell it in the air."

                                    redrumR 1 Reply Last reply Reply Quote 0
                                    • redrumR Offline
                                      redrum Admin @alkexr
                                      last edited by

                                      @alkexr Well we did a ton of mass map XML changes when we fixed a bunch of the spelling issues like attatchment. It ended up being a huge debacle IMO as we ended up missing a lot and it made it so if you upgraded your engine version you had to upgrade all maps and if you didn't upgrade your engine version you were stuck with all the old maps before the change. Though that was because many of the XML changes weren't compatible then.

                                      I'd love it if someone wanted to take more ownership of doing mass map changes but also being more careful on what we change and ensuring we don't miss a lot of maps. The other problem is @RogerCooper keeps are fairly large repository of other maps that aren't in the official repos. So generally, I just don't want to spend the effort doing myself and no one else seems to want to volunteer to do it. What we really need is some 'map admins' which have probably some basic scripting/regex skills that help manage all the map repos. Would be great to have some of them help evaluate/categorize/improve/retire maps as well.

                                      TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

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

                                        @redrum said in Expand UserActionAttachment & PoliticalActionAttachment To All Resources:

                                        And if something has a chance to succeed then whether it does or doesn't I'd expect the player to pay for it. Similar to tech tokens.

                                        There is also the other case in which the action's success is dependent on a player's acceptance.

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

                                          The only games currently using "costPU" are @Frostion's

                                          Age_of_Tribes_Classical.xml
                                          Age_of_Tribes_Cold_War.xml
                                          Age_of_Tribes_Modern.xml
                                          iron_war.xml
                                          iron_war.xml
                                          iron_war_europe.xml

                                          Hoping @Frostion agrees to delete the already deprecated costPU from them all, I would, then update only:

                                          Civil_War.xml
                                          Civil_War_Eastern_Campaigns.xml
                                          Domination_1914-Weltpolitik.xml
                                          Domination_1914_Blood_And_Steel.xml
                                          Empire.xml
                                          FeudalJapanWarlords3Player.xml
                                          FeudalJapanWarlords4Player.xml
                                          FeudalJapanWarlords5Player.xml
                                          Greyhawk_Wars.xml
                                          pact_of_steel_2.xml
                                          Total_World_War_Dec1941.xml
                                          Total_World_War_Dec1941_Beta.xml

                                          and related properties, to tell the resources,

                                          and remove all occurrences from:

                                          another_world.xml
                                          FeudalJapan.xml
                                          Napoleonic_Empires.xml
                                          Napoleonic_Empires_FFA_5player.xml
                                          Napoleonic_Empires_FFA_8player.xml

                                          These last 5 ones have only this useless code:
                                          <option name="costPU" value="0"/>

                                          Since @redrum already agreed with both my suggestions and and I am just waiting for @Frostion, if anyone owning any of the games above don't want me to touch them (preferring to do it himself), please let me know in here.

                                          Also, if someone else, especially @redrum, wants to double check I'm not missing some games, that'd be good too.

                                          p.s.: @Frostion I believe you shouldn't keep an xml outside the games folder, referring to your iron_war map (or I've no clue why you want that).

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

                                            @cernel I think I will first do civil_war only (2 games in 1 map). If I get the feeling that goes decently enough, especially referring to dealing with GitHub, I will do the rest, otherwise nevermind. The more of those games are removed from my list because others want to do it, the better. It would be also good if someone plays a game of Civil War after the changes and see if it appears working fine.

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