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

    Add Ability For Suicide Units to Provide Support

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    53 Posts 4 Posters 15.6k Views 4 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 Online
      Cernel Moderators @redrum
      last edited by

      @redrum Well, having suicide supportable does expand a bit on the artillery - shell field, maybe for 1 combat round games, and might be bearable for defence if one could combine the always suicide with the suicide on hit, meaning having a unit that always suicide in attack and is suicide on hit on defence. Anyways I personally always considered that the TripleA engine is not good enough for modern warfare, so generally thought only pre modern (meaning medieval or before) was viable.

      Anyways this feature is surely going to add, if it becomes a thing, anyways.

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

        @redrum said in suicide/munitions unit with support?:

        @Cernel said in suicide/munitions unit with support?:

        Are they supportable (the current isSuicide is not)?

        If they roll alongside the normal units (non-firststrike) then yes, if they roll with firststrike then depends if other firststrike can receive support (not sure whether that's currently possible and TWW has tried this for subs but it either isn't supported right now or there is some bug).

        If you exactly say what you were trying to give support to, I may test that, but I recall it worked for me.

        I also just made a simple test, right now, having this unit:

                        <attachment name="unitAttachment" attachTo="archer" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                 <option name="movement" value="1"/>
                                 <option name="transportCost" value="2"/>
                                 <option name="attack" value="1"/>
                                 <option name="defense" value="3"/>
                                 <option name="isFirstStrike" value="true"/>
                                 <option name="Artillery" value="true"/>
                                 <option name="artillerySupportable" value="true"/>
                                 <option name="requiresUnits" value="metropolis"/>
                        </attachment>
        

        And it works just fine. So I've really no idea what your issues with supports and sub strikes are.

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

          @Cernel Are you sure it works? I just tested it and while the BC shows the correct total strength and the battle window shows it in the correct column, it appears the actual dice roll isn't including the added support. So in your example the archer would appear to be rolling @ 2 with support but actually roll @ 1.

          Which unless I'm doing something wrong, that behavior is definitely pretty bad.

          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 Online
            Cernel Moderators @redrum
            last edited by

            @redrum said in suicide/munitions unit with support?:

            @Cernel Are you sure it works? I just tested it and while the BC shows the correct total strength and the battle window shows it in the correct column, it appears the actual dice roll isn't including the added support. So in your example the archer would appear to be rolling @ 2 with support but actually roll @ 1.

            Which unless I'm doing something wrong, that behavior is definitely pretty bad.

            Works fine for me. The archer is hitting at 2.

            Maybe you have some properties that are colliding in some ways, since my game has very few properties (mostly a mix of v1 and v2).

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

              @Cernel Ah, I see. I think its whether the support unit is also a first strike unit. So if you make the artillery a separate unit and non-first strike then you should see the problem.

              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 Online
                Cernel Moderators @redrum
                last edited by

                @redrum said in suicide/munitions unit with support?:

                @Cernel Ah, I see. I think its whether the support unit is also a first strike unit. So if you make the artillery a separate unit and non-first strike then you should see the problem.

                Tested and confirmed: you cannot give support from non-subs to subs, and it has the display issues you mentioned.

                However, I also confirm it is fine sub-to-sub (in a map of mine all ships were submarines).

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

                  @Cernel Yeah, the issue is that the engine appears to calculate total power and the display by considering all units at the same time but when actually doing the battle it is taking just the units that fight together within a single roll phase when calculating support. I think even the inverse of subs giving to non-subs would also have the same issue. The only one I think that does work properly is AA can receive support from non-AA as this was something I added fairly recently and I believe coded that one correctly to consider all units for potential support not just the AA.

                  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 Online
                    Cernel Moderators @redrum
                    last edited by Cernel

                    @redrum said in suicide/munitions unit with support?:

                    @Cernel Yeah, the issue is that the engine appears to calculate total power and the display by considering all units at the same time but when actually doing the battle it is taking just the units that fight together within a single roll phase when calculating support. I think even the inverse of subs giving to non-subs would also have the same issue. The only one I think that does work properly is AA can receive support from non-AA as this was something I added fairly recently and I believe coded that one correctly to consider all units for potential support not just the AA.

                    Off topic, but I tested your AA support, and all seemed fine.

                    By the way, AA attacks and first strike are strongly related matters. It is even surprising they are different matters at all as, looking at the standard games, they could have been the same thing (and, actually, the aaGun traditionally is indeed considered a defence 1 unit, like the submarine is considered an attack 2 unit).

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

                      @Cernel Yeah, they are closely related but one key aspect is that AA rolls happen before v3+ units can hide/submerge where first strike happens after. Eventually it would be good to merge these concepts together and have some sort of battlePhaseOrder where you could specify in what order and which units roll together/separately. So right now you really have something like this:

                      • AA - battlePhaseOrder=1
                      • v3 canHide - battlePhaseOrder=2
                      • firstStrike - battlePhaseOrder=3
                      • normal - battlePhaseOrder=4

                      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 2
                      • C Online
                        Cernel Moderators @redrum
                        last edited by

                        @redrum said in suicide/munitions unit with support?:

                        @Cernel Yeah, they are closely related but one key aspect is that AA rolls happen before v3+ units can hide/submerge where first strike happens after. Eventually it would be good to merge these concepts together and have some sort of battlePhaseOrder where you could specify in what order and which units roll together/separately. So right now you really have something like this:

                        • AA - battlePhaseOrder=1
                        • v3 canHide - battlePhaseOrder=2
                        • firstStrike - battlePhaseOrder=3
                        • normal - battlePhaseOrder=4

                        That seems like something it would be good having written in pos2...

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

                          So I have an initial PR up to tackle this: https://github.com/triplea-game/triplea/pull/5871

                          I still need to test this a lot. Are there any specific maps that would be good to test that have isSuicide units? I plan to test at least NML as that is the one map I know uses them and is popular.

                          Beyond the initial design and updates I also tackled the following:

                          • Suicide units will now fire either during first strike phase (subs) or normal phase rather than a separate hacked phase before first strike
                          • Fix bug where first strike units weren't actually receiving support even though the battle window showed it: https://forums.triplea-game.org/topic/1181/total-world-war-december-1941-3-0-0-6/456
                          • Implement remaining target limiting properties canNotTarget and canNotBeTargetBy: https://forums.triplea-game.org/topic/1603/cannottarget-not-working

                          Also once this is merged into the pre-release, I would greatly appreciate lots of testing especially around sub/destroyers and suicide units.

                          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 4
                          • C Online
                            Cernel Moderators @redrum
                            last edited by

                            @redrum Then it might be opportune to refactor D1914NML removing the suicide trench hack, doing it properly with a "canNotTarget" on the gas, instead.

                            redrumR 1 Reply Last reply Reply Quote 2
                            • FrostionF Offline
                              Frostion Admin
                              last edited by Frostion

                              Well, I can test the pre-release with Age of Tribes. There are some isSuicide units (ammunition units like mortars and rockets) and submarines. I guess you want me to test out if the build is making trouble for existing maps and current XMLs?

                              Or are there special experiments and situations that should be tested out? If I did not play a few Age of Tribes games, then I would work on Warcraft: War Heroes. I always do this with the newest pre-release.

                              Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

                                @Cernel Yeah, though I'll probably test NML both ways as it sits and with the updates it should have.

                                @Frostion Both. Existing maps are probably most important as I don't want to break things but also testing out the new properties and how you'd like to use them or even update existing maps would be helpful as well.

                                Besides NML and Age of Tribes are there any other maps that use isSuicide units (especially anything in High or Good quality)?

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

                                FrostionF 1 Reply Last reply Reply Quote 0
                                • FrostionF Offline
                                  Frostion Admin @redrum
                                  last edited by

                                  @redrum I would guess that the Japanese kamikaze planes in Iron War uses isSuicide 😉 But it is probably a not so complex usage. But I will take a look at them also.

                                  Map maker of: Star Wars: Galactic War + Star Wars: Tatooine War + Caribbean Trade War + Dragon War + Age of Tribes + Star Trek: Dilithium War + Iron War + Iron War: Europe + Warcraft: War Heroes

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

                                    I tested NML and Iron War isSuicide units and things look good so hopefully can get this into the pre-release soon.

                                    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 4
                                    • C Online
                                      Cernel Moderators @redrum
                                      last edited by

                                      @redrum said in Add Ability For Suicide Units to Provide Support:

                                      • Implement remaining target limiting properties canNotTarget and canNotBeTargetBy: https://forums.triplea-game.org/topic/1603/cannottarget-not-working

                                      This is very interesting especially for having things like "infantry" unable to hit things like "bombers" or things like "battleships" unable to hit things like "submarines". However, will those options generally work now, or still only for "first strike" attacks?

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

                                        @Cernel both first strike and standard.

                                        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 1
                                        • C Online
                                          Cernel Moderators
                                          last edited by Cernel

                                          Quite closely related to the changes at:
                                          https://github.com/triplea-game/triplea/pull/5871

                                          in the moment I can easily think many suicide units are going to be infrastructures, if you want them to suicide on attack only and not provide hitpoints in defence.

                                          A thing I just considered is the case of Rockets and ICBM and Gas. According to this bug report:
                                          https://github.com/triplea-game/triplea/issues/5834

                                          AA shots, as well as any first strikes and regular fire happen before any infrastructure units getting captured.

                                          So, for example in the case of D1914NML gas, it is substantially a bug that you need to send 1 non-infrastructure unit in attack, to have the gas actually attacking. What should happen is that the gas attacks alone, and, then, it doesn't matter that it would get captured, as it is already gone, because of being suicide.

                                          If the behaviour of not being able to send gas alone is wanted, a property or something should be added, to make it possible on a consistent way (as now the behaviour is just the byproduct of a wrong general implementation for infrastructure capture, as the moment in which they get captured).

                                          For CW1965, I think that the ICBM can be better represented by removing this thing of them firing on defence, making them defence 0 infrastructure units that suicides on attack only (again, for this to work, it is necessary that infrastructures fire before being captured, that means never being captured if they suicide).

                                          Of course, this would be a huge game change in favour of the Americans, as it removes the Russians first strike on the Americans ICBM (also making the game a lot less random, as that battle has a huge impact and can totally fail on a 1/6 AA shot).

                                          I would also completely remove from the AA guns the ability to hit any ICBM, anyways.

                                          CC: @Panther

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

                                            @Cernel While this is somewhat related, it would be better to start a different feature request around isInfra to discuss things like that to avoid cluttering up this thread. My general opinion is that isInfra should be broken into attack/defense just like isSuicide which I think would solve all those issues and allow things like missles gas to attack alone but make it so they do nothing on defense and would be destroyed or captured.

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