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.
    • FrostionF Offline
      Frostion Admin
      last edited by redrum

      Is there a way to have a suicide/munitions unit with a support attachment be able to give that support in the first round of combat, even when dying?

      It seems that the suicide unit dies before combat and therefore does not give support to anything …. ever.

      It could be relevant in situations where fore sample kamikaze units would give a morale boost to other units as it sacrifices itself?


      Design

      So after thinking about this a little bit, I'm thinking the following options:

      isSuicideOnAttack - if true then unit suicides after it attempts its attack roll in a regular battle or SBR
      isSuicideOnDefense - if true then unit suicides after it attempts its defense roll in a regular battle
      isSuicideOnHit - if unit gets a hit in combat (attack or defense) then it instantly dies
      

      These can be combined isFirstStrike to determine when the roll and suicide occurs and whether it can receive support:

      isFirstStrike		values: whether to roll dice and take casualties before regular units
      

      This means that isSuicide will just be a deprecated shortcut that sets:
      isSuicideOnAttack=true
      isSuicideOnDefense=true unless property Defending Suicide and Munition Units Do Not Fire is true
      isFirstStrike=true

      This would then deprecate isSuicide, Defending Suicide and Munition Units Do Not Fire, and Suicide and Munition Casualties Restricted. Whether suicide casualties return fire will be based on the firstStrike or standard fire rules.


      Examples

      Attack Suicide Support Unit
      Can provide support for the first round of battle and then suicides. It would act as just a regular unit with no attack/defense values on defense (wouldn't suicide).

                      <attachment name="unitAttachment" attachTo="suicideSupportUnit" javaClass="UnitAttachment" type="unitType">
                               <option name="movement" value="1"/>
                               <option name="attack" value="0"/>
                               <option name="defense" value="0"/>
                               <option name="isSuicideOnAttack" value="true"/>
                      </attachment>
      		<attachment name="supportAttachmentSuicideSupportUnit" attachTo="suicideSupportUnit" javaClass="UnitSupportAttachment" type="unitType">
      			<option name="unitType" value="infantry"/>
      			<option name="faction" value="allied"/>
      			<option name="side" value="offence"/>
      			<option name="dice" value="strength"/>
      			<option name="bonus" value="1"/>
      			<option name="number" value="10"/>
      			<option name="bonusType" value="magic"/>
      		</attachment>
      

      Iron War Nuke with Updated Properties
      Suicide on attack unit which fires during first strike but can't attack other nukes.

              <attachment name="unitAttachment" attachTo="Nuclear-Bomb" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                  <option name="attack" value="5"/>
                  <option name="attackRolls" value="10"/>
                  <option name="movement" value="6"/>
                  <option name="fuelFlatCost" value="Fuel" count="3"/>
                  <option name="carrierCost" value="2"/>
                  <option name="isAir" value="true"/>
                  <option name="canAirBattle" value="true"/>
                  <option name="airAttack" value="0"/>
                  <option name="airDefense" value="0"/>
                  <option name="isSuicideOnAttack" value="true"/>
                  <option name="isFirstStrike" value="true"/>
                  <option name="canNotTarget" value="Nuclear-Bomb"/>
                  <option name="isStrategicBomber" value="true"/>
                  <option name="bombingMaxDieSides" value="10"/>
              </attachment>
      

      PR: https://github.com/triplea-game/triplea/pull/5871
      POS2 XML PR: https://github.com/triplea-maps/the_pact_of_steel/pull/42

      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

      redrumR C 2 Replies Last reply Reply Quote 0
      • redrumR Offline
        redrum Admin @Frostion
        last edited by redrum

        @Frostion I believe the only way to do it currently is use isSuicideOnHit instead of isSuicide so that the unit actually fights in round 1 so it can provide its support. For example, I'm planning to do this for a WW1 gas unit so it always gets 1 hit round 1 and dies but also provides its negative support round 1:

                <attachment foreach="$UnitPrefixes$:$UnitPlayers$" name="unitAttachment" attachTo="@UnitPrefixes@Gas" javaClass="UnitAttachment" type="unitType">
                    <option name="movement" value="1"/>
                    <option name="attack" value="12"/>
                    <option name="defense" value="0"/>
                    <option name="isSuicideOnHit" value="true"/>
                </attachment>
                <attachment foreach="$UnitPrefixes$:$UnitPlayers$" name="supportAttachment@UnitPrefixes@Gas" attachTo="@UnitPrefixes@Gas" javaClass="UnitSupportAttachment" type="unitType">
                    <option name="unitType" value="$InfantryAndCavalryUnits$"/>
                    <option name="faction" value="enemy"/>
                    <option name="side" value="offence"/>
                    <option name="dice" value="strength"/>
                    <option name="bonus" value="-2"/>
                    <option name="number" value="12"/>
                    <option name="bonusType" value="GasBonus"/>
                    <option name="players" value="@UnitPlayers@"/>
                </attachment>
        

        The limitation of this is that if you want it to always die round 1 then you have to set its attack equal to dice sides so it actually gets a hit and suicides.

        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 1
        • FrostionF Offline
          Frostion Admin
          last edited by

          @redrum hmmm. I see what you mean.

          But maybe, instead, there could be made a supportAttachment called “supportsDuringSuicide” true/false? Or something. I would certainly make use of it, and you could too. 😉

          Or maybe the engine code could just be made to have this behavior be default?

          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

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

            @Frostion Yeah, I've thought about it a little bit. I saw a couple different approaches:

            1. Add some boolean support property like “supportsDuringSuicide” which probably is the most flexible option but of course adds another field to set
            2. Tie it to the existing global property "Suicide and Munition Casualties Restricted" so that if casualties can return fire then the suicide unit should be able to provide its support as essentially that means all the first round of battle is occurring simultaneously rather than suicide units going first and removing any casualties.
            3. Make it default provide support round 1 but I hesitate to do this as it would seem kind of inconsistent with how sub/AA fire casualties usually die before the main round 1 combat so don't provide their support just like suicide units die before the main round 1 combat. Though in the end if you are adding a support attachment to a suicide unit then having it never provide its support also doesn't really make sense 🙂

            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
            • FrostionF Offline
              Frostion Admin
              last edited by

              Yea I can see the dilemmas and complications.

              1. I am all in for that as it can be used by in many cases and maps in the future, even if it is a small niche setting. You can use it for gas, I would use it for like when hero units battle in Warcraft, they can bring “spells” that attack/defend, support and are gone after battle.

              2. I am not sure that every time "Suicide and Munition Casualties Restricted" is used to have casualties return fire, that that the intent is also to have the Suicide and Munition give its support or not during the attack. Like if the support/boost is given to a viking army by a bunch of viking berserkers charging alone across the battle field and attacking the enemy army, before the rest of the viking army even moves. The viking army would look, cheer and be boosted by seeing their berserkers commit suicide and go to Valhalla ⚔ 🍺 🍖 😄 But the enemy would not get to kill anyone but the suiciders. In the case of my use of spell-units that give support and/or attack during first round and then dissolve into thin air, it would also not be the idea that any casualties should return fire.

              3. I see how default is inconsistent with how sub/AA fire. Good point.

              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
              • C Offline
                Cernel Moderators @Frostion
                last edited by

                @Frostion Actually, time ago I wanted to have (attack 0) suicide shells receiving (not giving) support from (not suicide) artillery, so the have a decent representation of ammunition consumption, and I found out that suicide units cannot even receive support. So that's also something that could be allowed, as that would not require any map coding additions.

                1 Reply Last reply Reply Quote 2
                • alkexrA Offline
                  alkexr
                  last edited by

                  Just change the unit on taking 1 HP damage into an infrastructure that gives support, that is then removed at the end of combat / end of turn.

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

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

                    @Cernel I totally agree, it would be nice to be able to also give support to Ammo/Munitions units if this is something that cannot be done atm.

                    @alkexr Your sollution gives the munition unit a HP and seems to complex a workaround. I would like something more clean I think.

                    @Everyone We need some backup here ... We need to persuade a dev to let Suicide and Munition units also be able to receive/give support! 🤘 😄

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

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

                      @Frostion I believe the only way to do it currently is use isSuicideOnHit instead of isSuicide so that the unit actually fights in round 1 so it can provide its support. For example, I'm planning to do this for a WW1 gas unit so it always gets 1 hit round 1 and dies but also provides its negative support round 1:

                              <attachment foreach="$UnitPrefixes$:$UnitPlayers$" name="unitAttachment" attachTo="@UnitPrefixes@Gas" javaClass="UnitAttachment" type="unitType">
                                  <option name="movement" value="1"/>
                                  <option name="attack" value="12"/>
                                  <option name="defense" value="0"/>
                                  <option name="isSuicideOnHit" value="true"/>
                              </attachment>
                              <attachment foreach="$UnitPrefixes$:$UnitPlayers$" name="supportAttachment@UnitPrefixes@Gas" attachTo="@UnitPrefixes@Gas" javaClass="UnitSupportAttachment" type="unitType">
                                  <option name="unitType" value="$InfantryAndCavalryUnits$"/>
                                  <option name="faction" value="enemy"/>
                                  <option name="side" value="offence"/>
                                  <option name="dice" value="strength"/>
                                  <option name="bonus" value="-2"/>
                                  <option name="number" value="12"/>
                                  <option name="bonusType" value="GasBonus"/>
                                  <option name="players" value="@UnitPlayers@"/>
                              </attachment>
                      

                      The limitation of this is that if you want it to always die round 1 then you have to set its attack equal to dice sides so it actually gets a hit and suicides.

                      Haven't tested, so I wonder if you can hack a pure support behaviour (without killing anything) by using the isSub sub-options, so to give the unit no valid targets, while automatically hitting (nothing), while re-entering the pure suicide dynamic of possibly hitting something, while always suiciding regardless, by adding an AA offensive attack on top of what I said. I believe it should work fine, and I understand this way all that @Frostion wants would be covered, albeit in a convoluted manner.

                      In the past, I've considered mostly the other side of the coin, that is supporting munitions, as it has always been a major issue for me that TripleA didn't have any ammunition consumption dynamic, as that is actually maybe the most important cost of war (or at least you usually spend much more money in ammunitions, overtime, than in the guns firing those ammunitions; easily over 10 times as much). The ideal would be having a dynamic by which 1 artillery can give 1 roll to 1 otherwise useless ammunition, that suicides only upon rolling (so, for example, if you would have 1 artillery and 3 ammunitions in a battle, you would use 1 ammunition each in the first 3 rounds of combat). Other ways to represent that may be with the land transport ability, in that the ammunition could be combat moved only by the artillery, so that you need 1 artillery to send a number of suicide ammunition into combat, or, to fire from zone to zone, have 1 artillery producing 1 target unit each round, the target unit land transporting 1 ammunition into combat, then removing all target units at the start of combat (practically like the mortars of AoT, but you need to produce and stockpile the actual ammunitions; just the utility unit to fire (land transport) them into battle is given for free).

                      Anyways, all solutions I could come up with are workarounds with serious limitations; so I don't believe that ammunition consumption can currently be very well represented in TripleA.

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

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

                        @Frostion I believe the only way to do it currently is use isSuicideOnHit instead of isSuicide so that the unit actually fights in round 1 so it can provide its support. For example, I'm planning to do this for a WW1 gas unit so it always gets 1 hit round 1 and dies but also provides its negative support round 1:

                                <attachment foreach="$UnitPrefixes$:$UnitPlayers$" name="unitAttachment" attachTo="@UnitPrefixes@Gas" javaClass="UnitAttachment" type="unitType">
                                    <option name="movement" value="1"/>
                                    <option name="attack" value="12"/>
                                    <option name="defense" value="0"/>
                                    <option name="isSuicideOnHit" value="true"/>
                                </attachment>
                                <attachment foreach="$UnitPrefixes$:$UnitPlayers$" name="supportAttachment@UnitPrefixes@Gas" attachTo="@UnitPrefixes@Gas" javaClass="UnitSupportAttachment" type="unitType">
                                    <option name="unitType" value="$InfantryAndCavalryUnits$"/>
                                    <option name="faction" value="enemy"/>
                                    <option name="side" value="offence"/>
                                    <option name="dice" value="strength"/>
                                    <option name="bonus" value="-2"/>
                                    <option name="number" value="12"/>
                                    <option name="bonusType" value="GasBonus"/>
                                    <option name="players" value="@UnitPlayers@"/>
                                </attachment>
                        

                        The limitation of this is that if you want it to always die round 1 then you have to set its attack equal to dice sides so it actually gets a hit and suicides.

                        By the way, I believe autohitting 1 unit is lame. While I'm not against something killing something for sure, there should always be a dynamic by which the damage may vary. For example, if something kills or damages something for sure, then it should work like roll 1d6 and kill as many units.

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

                          So thinking about this a little more, I'm starting to wonder if isSuicide should be reworked now that isSub was broken into separate options. As really isSuicide is currently doing 2 separate things which is having the unit roll first (essentially isFirstStrike) and dieing after its attempted roll. We also now have isSuicideOnHit that can be used for many scenarios.

                          This would also seem to align with what @Cernel mentions here: https://forums.triplea-game.org/topic/323/unit-option-which-suicides-only-when-it-registers-a-hit-mines/28. Where you have some sort of isSuicideOnRolling instead where if you want the unit to always die then it would just be set to the dice sides but you could then have 3 outcomes for suicide-like units:

                          1. It hits and suicides
                          2. It misses and suicides
                          3. It misses and survives

                          So what does all that mean in relation to suicide units giving support? It makes the whole thing a lot cleaner as you could have the suicide unit roll with the rest of the units (like isSuicideOnHit does) rather than before all units so it gives its support before dying.

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

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

                            @redrum It has been a while since I tested, but I believe that, for the old "isSuicide", supporting is not really a matter of when it dies. I remember I tested it and I couldn't have a "isSuicide" unit receiving (not giving) support from a normal unit, despite that, of course, the normal unit is still there when the suicidal one attacks and dies.
                            I was trying to have a normal "artillery" unit giving support to an attack 0 "isSuicide" "ammunition" unit, and it didn't work, the "ammunition" not receiving support at all (I guess I could test it again).
                            Yeah, I agree there is no reason why a suicide unit must also be "isFirstStrike" too, but mind you currently there is a property that determines that for suicidal units (well, it actually determines if the casualties can fire back, similarly to naval bombard).
                            And, yes, with a "isSuicideOnRolling" the old "isSuicide" would become redundant, as you could set it at the dice sides, and also the new "isSuicideOnHit" would become mostly redundant, as you could set it at the same attack or defence value, except not for units both attacking and defending at different values (tho, in case of support, here you would need the support to change this value as well).

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

                              The other matter that is not covered about suicidal units is having something like a V2 or an ICBM that doesn't die or fight if the territory gets attacked. Currently the only way to do this is making the unit an infrastructure with defence 0 that doesn't suicide on defence (like done for the "gas" of Domination NML), but that comes with the limit that you can only attack with at least 1 non infrastructure unit (so that would not be acceptable for a V2, an ICBM, or any rockets, really).

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

                                @Cernel I think isSuicide units are essentially handled completely separately in the engine and don't receive/give any support. But I don't believe that is the case for isSuicideOnHit which I think can receive/give support. Assuming that is the case, my thought is to essentially get rid of isSuicide and make them act like isSuicideOnHit so they can properly give/receive support.

                                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 You mean "isSuicide" would become a shortcut to generate the new option, with proper values, or updating all games having "isSuicide" (it might be feasible; I don't think there are too many).

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

                                    @Cernel Either way. It would depend on how many maps need updated but would probably deprecate it and just make it set the new properties to be safe.

                                    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 0
                                    • FrostionF Offline
                                      Frostion Admin @redrum
                                      last edited by

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

                                      So thinking about this a little more, I'm starting to wonder if isSuicide should be reworked now that isSub was broken into separate options. As really isSuicide is currently doing 2 separate things which is having the unit roll first (essentially isFirstStrike) and dieing after its attempted roll. We also now have isSuicideOnHit that can be used for many scenarios.
                                      This would also seem to align with what @Cernel mentions here: https://forums.triplea-game.org/topic/323/unit-option-which-suicides-only-when-it-registers-a-hit-mines/28. Where you have some sort of isSuicideOnRolling instead where if you want the unit to always die then it would just be set to the dice sides but you could then have 3 outcomes for suicide-like units:

                                      It hits and suicides
                                      It misses and suicides
                                      It misses and survives

                                      So what does all that mean in relation to suicide units giving support? It makes the whole thing a lot cleaner as you could have the suicide unit roll with the rest of the units (like isSuicideOnHit does) rather than before all units so it gives its support before dying

                                      Any chance on realizing this? I could really need these expanded options in regards to the suicide units? I hope a feature like this could also be to the benefit of several other maps in development. @Cernel ? @Hepps ? Maybe I am not the only one who wants to be able to "customize" the suicidal units behavior. 😉

                                      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

                                      redrumR C 2 Replies Last reply Reply Quote 0
                                      • redrumR Offline
                                        redrum Admin @Frostion
                                        last edited by

                                        @Frostion Anything is possible mostly comes down to time and willingness 🙂

                                        Power of Politics could probably take advantage of this to avoid having to use isSuicideOnHit and 12/12 so that it always hits in order to provide the support like I posted above.

                                        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 0
                                        • C Offline
                                          Cernel Moderators @Frostion
                                          last edited by

                                          @Frostion I always wanted using suicide to simulate artillery consumption, using a suicide unit at roll 0 and an artillery unit that gives 1 roll support to the suicide unit, but, for that, one would need all the following:

                                          • The suicide unit able to receive support.
                                          • The suicide unit not suiciding if it currently has 0 rolls.
                                          • The suicide unit suiciding if it currently has 1 or more rolls, regardless of hitting.

                                          That way, for example, if you have 1 artillery unit at support roll 1 and 3 shell unit at roll 0, you would be able to fire 1 shell per combat round, on the first 3 combat rounds. Then you could manage the shell and artillery ratio.

                                          But in the moment a system like this is not supported, nobody can really consider starting anything.

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

                                            So if isSuicide/isSuicideOnHit could be reworked to allow more flexibility and unit options, could we be looking for these unit features (here with some made up names):

                                            isSuicideAfterFirstStrike (first strike hit or mis = dies)

                                            isSuicideAfterFirstStrikeHit (first strike hit = dies / first strike mis = survives and enters 1. combat round)

                                            isSuicideAfterCombatRoll *† (combat roll hit or mis = dies)

                                            isSuicideAfterCombatRollHit * (combat roll hit = dies / combat roll mis = survives and enters 2. combat round)

                                            *Units with this feature can give/recive support during 1. combat round, and after if it survives.
                                            †This unit could have have 0 att/def during 1. combat round, give or get support and then die

                                            Have I understood this correctly?

                                            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

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