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

    How do you make a unit autodestroyed if alone without being an infrastructure or a transport

    Scheduled Pinned Locked Moved Map Making
    33 Posts 4 Posters 3.7k 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.
    • HeppsH Offline
      Hepps Moderators @Cernel
      last edited by

      @Cernel Seems they actually are...

      <attachment name="unitAttachment" attachTo="aaGun" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
        <option name="isAAforCombatOnly" value="true"/>
        <option name="isRocket" value="true"/>
        <option name="canNotMoveDuringCombatMove" value="true"/>
        <option name="isInfrastructure" value="true"/>
        <option name="canBeDamaged" value="false"/>
        <option name="movement" value="1"/>
        <option name="transportCost" value="3"/>
        <option name="canBeGivenByTerritoryTo" value="British"/>
      

      "A joyous heart sours with the burden of expectation"
      Hepster

      HeppsH 1 Reply Last reply Reply Quote 0
      • HeppsH Offline
        Hepps Moderators @Hepps
        last edited by

        @Hepps Seems that was Global... not 2nd edition. Might have to do with what the term aaGun controls.

        "A joyous heart sours with the burden of expectation"
        Hepster

        HeppsH 1 Reply Last reply Reply Quote 0
        • HeppsH Offline
          Hepps Moderators @Hepps
          last edited by

          @Hepps Also take a look at @CrazyG House of Habsburg... if I remember correctly his cannon unit functions the same way.

          "A joyous heart sours with the burden of expectation"
          Hepster

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

            @Hepps said in How do you make a unit autodestroyed if alone:

            @Hepps Also take a look at @CrazyG House of Habsburg... if I remember correctly his cannon unit functions the same way.

            Yes, but that is because those cannons are infrastructures, thus captured if alone, then destroyed instead of captured.

            I should have been more specific, as I agree making the unit an infrastructure that is destroyed on captured answer my question, but this is not what I was searching for.

            I'll change the title from:

            How do you make a unit autodestroyed if alone

            to:

            How do you make a unit autodestroyed if alone without being an infrastructure or a transport

            This is an example of a unit that is not an infrastructure, nor a transport, but it is autodestroyed if alone, from the "World War II v5 1942 Second Edition" game:

                <attachment name="unitAttachment" attachTo="aaGun" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                  <option name="movement" value="1"/>
                  <option name="attack" value="0"/>
                  <option name="defense" value="0"/>
                  <option name="transportCost" value="3"/>
                  <option name="canNotMoveDuringCombatMove" value="true"/>
                  <option name="isAAforCombatOnly" value="true"/>
                  <option name="maxAAattacks" value="3"/>
                  <option name="isRocket" value="true"/>
                </attachment>
            
            HeppsH 1 Reply Last reply Reply Quote 0
            • HeppsH Offline
              Hepps Moderators @Cernel
              last edited by

              @Cernel Yes so if you look at POS then I believe naming a unit specifically "aaGun"... automatically adds certain attributes to it. If I remember correctly it had something to do with backwards compatibility from when the engine was first created. Your answer is likely in that paragraph.

              "A joyous heart sours with the burden of expectation"
              Hepster

              1 Reply Last reply Reply Quote 0
              • HeppsH Offline
                Hepps Moderators
                last edited by

                @Cernel It also could be something that is dictated by the Global property.

                "A joyous heart sours with the burden of expectation"
                Hepster

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

                  I found the answer, but, not being a developer, I cannot be sure this is all (but I think it is).

                  In order to have Defence 0 non-infrastructure land units automatically destroyed if defending alone, the "Transport Casualties Restricted" property must be true.

                  Because if transports are restricted from taking hits, then defenceless land units die. Otherwise, not.

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

                    @Cernel That seems correct. Should be able to do a quick test to validate it.

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

                      I've also tested the offence 0 case.

                      In "Lord of the Rings: Middle Earth", if I send hobbits only in attack, they will not automatically die.

                      In the same map, if I add this property (and remove all transport capacity options):

                                      <property name="Transport Casualties Restricted" value="true" editable="false">
                                              <boolean/>
                                      </property>
                      

                      They still not automatically die.

                      So, I've tried giving hobbits both attack and defence value of 0 (previously they have attack 0 and defence 1).

                      They still not automatically die.

                      So, I've removed from the hobbits the artillery supportable option (even though I was sending hobbits alone, so that didn't matter).

                      They still not automatically die.

                      So, I've removed all options from the hobbits (this way they are attack, defence and movement all 0), and edited them into the enemy territory to attack. So now the hobbits are this:

                          <attachment name="unitAttachment" attachTo="hobbits" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                          </attachment>
                      

                      The program is not accepting that I want all default. So I have to have at least 1 option, it seems. So this:

                          <attachment name="unitAttachment" attachTo="hobbits" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                            <option name="attack" value="0"/>
                          </attachment>
                      

                      Now the hobbits are all destroyed automatically while attacking.

                      So, wondering this was maybe because of having no retreat zones, I've changed the hobbits to this:

                          <attachment name="unitAttachment" attachTo="hobbits" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                            <option name="movement" value="1"/>
                            <option name="attack" value="0"/>
                            <option name="defense" value="0"/>
                          </attachment>
                      

                      But, instead of moving anything, I edited all the hobbits in the enemy territory to attack, so to have no retreat choices (the hobbits all attacking without using their movement 1).

                      Now the hobbits are all destroyed automatically while attacking, as well.

                      So, with the same coded game (xml) file, I, again, attacked by moving into, thus having the retreat option.

                      Again, in this case, they don't automatically die.

                      So now I've set the "Transport Casualties Restricted" option false, and edited all the hobbits inside the enemy territory to attack, so to have no retreat choices.

                      Now, instead, the hobbits don't automatically die (I have no choices, having no retreat abilities, but I must make all combat rounds needed for the enemy to kills all my hobbits).

                      So, it seems that the program behaves the following way:

                      Non infrastructure land units are automatically destroyed in attack, against defending units, only if all these conditions are verified:

                      • The "Transport Casualties Restricted" property is true.
                      • All attacking land units have "attack" value 0.
                      • The attacking land units have no retreat options.

                      However, to be sure about this matter, I would need a developer to tell exactly how the attack case work, and under what conditions non-infrastructure and non-transport attacking units are automatically destroyed.

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

                        @Cernel So I'm assuming this works different for attacking transports?

                        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 intend to test the same scenario with "World War II Revised" transports instead of "Lord of the Rings: Middle Earth" hobbitses, making the same steps.

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

                            In "World War II Revised", if I send transports only in attack, they will not automatically die.

                            In the same map, if I add this property:

                                            <property name="Transport Casualties Restricted" value="true" editable="false">
                                                    <boolean/>
                                            </property>
                            

                            and remove all transport capacity options, also setting movement equal to 1, so that now transports are not actually able to transport anything, this being its new attachment:

                                <attachment name="unitAttachment" attachTo="transport" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                  <option name="movement" value="1"/>
                                  <option name="isSea" value="true"/>
                                  <option name="attack" value="0"/>
                                  <option name="defense" value="1"/>
                                </attachment>
                            

                            They still not automatically die.

                            So, I've tried giving transports both attack and defence value of 0, this being the new attachment:

                                <attachment name="unitAttachment" attachTo="transport" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                  <option name="movement" value="1"/>
                                  <option name="isSea" value="true"/>
                                  <option name="attack" value="0"/>
                                  <option name="defense" value="0"/>
                                </attachment>
                            

                            They still not automatically die.

                            So, I've removed all options from the transports but only the "is sea" one, set at true, and edited them into the hostile sea zone to attack:

                                <attachment name="unitAttachment" attachTo="transport" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                  <option name="isSea" value="true"/>
                                </attachment>
                            

                            Now the transports are all destroyed automatically while attacking.

                            So, wondering this was maybe because of having no retreat zones, I've changed the transports to this:

                                <attachment name="unitAttachment" attachTo="transport" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                  <option name="movement" value="1"/>
                                  <option name="isSea" value="true"/>
                                  <option name="attack" value="0"/>
                                  <option name="defense" value="0"/>
                                </attachment>
                            

                            But, instead of moving anything, I edited all the transports in the hostile sea zone to attack, so to have no retreat choices (the transports all attacking without using their movement 1).

                            Now the transports are all destroyed automatically while attacking, as well.

                            So, with the same coded game (xml) file, I, again, attacked by moving into, thus having the retreat option.

                            Again, in this case, they don't automatically die.

                            So now I've set the "Transport Casualties Restricted" option false, and edited all the transports inside the enemy territory to attack, so to have no retreat choices.

                            Now, instead, the transports don't automatically die (I have no choices, having no retreat abilities, but I must make all combat rounds needed for the enemy to kills all my transports).

                            So, it seems that the program behaves the following way:

                            Non infrastructure and non transport (I've used the unit called "transport", but without transport capacity assigned, thus they are transports in name only) sea units are automatically destroyed in attack, against defending units, only if all these conditions are verified:

                            • The "Transport Casualties Restricted" property is true.
                            • All attacking land units have "attack" value 0.
                            • The attacking land units have no retreat options.

                            This means that, as long as they are both non transports, offenceless land and sea units appear behaving the same way.

                            Of course, actual sea transports under the "Transport Casualties Restricted" property should, instead, behave like "transport" units currently do in "World War II v3 1941".

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

                              I've tested "World War II v3 1941" transports (no changes made to the game (xml) file), editing 99 Germans transports in 3 Sea Zone and sending them all alone to attack 2 Sea Zone.

                              The offenceless (actual) transports are never automatically destroyed, but you are kept being presented with the option of retreating or press the attack.

                              Gameplay wise, this behaviour allows you to "strafe" with only (offenceless) transports, by sending transports from different sea zones, retreating them all into one of them.

                              I believe this is a rules consistent behaviour, as far as v3 goes, as the only ruleset in which you cannot send transports only in attack is Classic, while from Revised onwards you can do it. And in all rulesets, from Classic to v5, offenceless transports alone are never automatically destroyed, if they can retreat.

                              @Panther for confirmation.

                              From the testing, therefore, it seems that offenceless sea units behave the same way, in attack, regardless of having transport capacity or not (and, in turn, they behave the same way as offenceless land units).

                              Basically here TripleA, with the autodestruction of offenceless, appears doing nothing but saving you time, in the case in which you have no retreat ability, thus you would eventually lose all transports anyways. What is strange (and makes no sense to me), however, is that this autodestruction behaviour is apparently related to a v3 only property, while, per correct intended rules, transports alone and unable to retreat were autodestroyed already back in Classic (and would make sense just to do it in any case, if only since it's just a time saving feature, apparently (I guess one should also test the case of offenceless units having offensive AA attacks)).

                              PantherP 1 Reply Last reply Reply Quote 0
                              • PantherP Offline
                                Panther Admin Moderators @Cernel
                                last edited by Panther

                                @Cernel
                                In Anniversary and later rulesets you can't send only transports to a sea battle. By the rules "Transports may not attack in a sea battle without being accompanied by at least one unit with an attack value."

                                Don't always trust TripleA when it comes to rules questions. Know the rules before you start … and better check what TripleA has done.

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

                                  @Panther Ah, didn't remember that. I thought that transports were just regular combat units except for taken last and defenceless autoremoval.

                                  So, is it Revised the only ruleset in which you can send transports alone in attack?

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

                                    @Panther said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                    @Cernel
                                    In Anniversary and later rulesets you can't send only transports to a sea battle. By the rules "Transports may not attack in a sea battle without being accompanied by at least one unit with an attack value."

                                    Anyways, aside from the fact that you cannot send them alone, I believe all the rest is consistent. I mean, once they are alone in offence and they can retreat, you are free to keep having them killed or retreat any time you want right, without any autoremoval? Only Classic you are obliged to retreat them as soon as you can.

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

                                      @Panther said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                      @Cernel
                                      In Anniversary and later rulesets you can't send only transports to a sea battle. By the rules "Transports may not attack in a sea battle without being accompanied by at least one unit with an attack value."

                                      Can you give the page? I'm not finding it in the Anniversary rulebook hosted at https://www.axisandallies.org/

                                      PantherP 1 Reply Last reply Reply Quote 0
                                      • PantherP Offline
                                        Panther Admin Moderators @Cernel
                                        last edited by Panther

                                        @Cernel said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                        @Panther Ah, didn't remember that. I thought that transports were just regular combat units except for taken last and defenceless autoremoval.

                                        So, is it Revised the only ruleset in which you can send transports alone in attack?

                                        In Revised you can combat move a transport into a hostile space but it can't attack. If it survives the defensive fire step, it can retreat,

                                        From the FAQ:

                                        Q. What happens when two opposing transports are in the same sea zone with no other units?
                                        By itself, a transport may not attack. Is there combat?
                                        A. The moving transport can’t attack. That doesn’t mean it can’t make a combat move by itself into a
                                        hostile space. When it does, if it survives the defensive fire step, then it can retreat. If for some
                                        reason the transport isn’t willing to retreat, then it’s doomed, because eventually the opponent will roll a 1.

                                        Don't always trust TripleA when it comes to rules questions. Know the rules before you start … and better check what TripleA has done.

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

                                          @Panther said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                          @Cernel said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                          @Panther Ah, didn't remember that. I thought that transports were just regular combat units except for taken last and defenceless autoremoval.

                                          So, is it Revised the only ruleset in which you can send transports alone in attack?

                                          In Revised you can combat move a transport into a hostile space but it can't attack. If it survives the defensive fire step, it can retreat,

                                          From the FAQ:

                                          Q. What happens when two opposing transports are in the same sea zone with no other units?
                                          By itself, a transport may not attack. Is there combat?
                                          A. The moving transport can’t attack. That doesn’t mean it can’t make a combat move by itself into a
                                          hostile space. When it does, if it survives the defensive fire step, then it can retreat. If for some
                                          reason the transport isn’t willing to retreat, then it’s doomed, because eventually the opponent will roll a 1.

                                          Yes, that's what I said. So, only Revised, both OOB and LHTR, and not Classic nor Anniversary and later, confirmed (I'm still not finding it in the Anniversary rulebook, but I trust you, just curious to read it)?

                                          1 Reply Last reply Reply Quote 0
                                          • PantherP Offline
                                            Panther Admin Moderators @Cernel
                                            last edited by

                                            @Cernel said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                            @Panther said in How do you make a unit autodestroyed if alone without being an infrastructure or a transport:

                                            @Cernel
                                            In Anniversary and later rulesets you can't send only transports to a sea battle. By the rules "Transports may not attack in a sea battle without being accompanied by at least one unit with an attack value."

                                            Can you give the page? I'm not finding it in the Anniversary rulebook hosted at https://www.axisandallies.org/

                                            Page 31, download the latest version including the clarification here:
                                            https://avalonhill.wizards.com/rules

                                            It is a clarification only, no new rule.

                                            Don't always trust TripleA when it comes to rules questions. Know the rules before you start … and better check what TripleA has done.

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