How to make a AA Tank?

  • Hi.This is my problem.How i can create a AATank?I want him to behave like a tank(Attack,Defense ,Movement and CanBlitz),but when engaging in combat with air units, run as an AA for them.How can I do this(in XML)?

  • Admin

    @corsairbr Look at the AT Guns in TWW.

    Everything you need is in there.

  • Sorry, I'm new here, where can I find it? Sorry if I'm typing wrong, my English is not so good

  • Admin

    @corsairbr You're english is is better than some englishmen I know.... (looks at @prastle ). 🤣

    If you download Total World War: December 1941... you will find what you need by looking at the AT Guns in the unit roster.

  • @hepps Thanks for the help, I really liked the game and wanted to create more units for some maps, some I managed without problems, but in that I failed. I'll take a look at this, thanks again

  • Admin

    @hepps = DONKEY!

  • Admin

    @corsairbr GL Cor 🙂

  • Admin

    @corsairbr As @Hepps mentioned TWW has a good example. Here is the XML snippet:

        <attachment name="unitAttachment" attachTo="germanAntiTankGun" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="attack" value="1"/>
          <option name="defense" value="1"/>
          <option name="isAAforCombatOnly" value="true"/>
          <option name="typeAA" value="AntiTankGun"/>
          <option name="targetsAA" value="russianMech.Infantry:russianTank:britishMech.Infantry:britishTank:americanMech.Infantry:americanTank:chineseMech.Infantry:chineseTank:spanishTank:swedishTank:turkishTank:brazilianTank"/>
          <option name="maxAAattacks" value="1"/>
          <option name="maxRoundsAA" value="-1"/>	  
          <option name="transportCost" value="2"/>
          <option name="mayOverStackAA" value="true"/>
          <option name="movement" value="1"/>
          <option name="attackAA" value="2"/>
          <option name="isLandTransportable" value="true"/>
          <option name="requiresUnits" value="germanFactory"/>
          <option name="canBeGivenByTerritoryTo" value="Germany"/>
          <option name="damageableAA" value="true"/>
          <option name="canInvadeOnlyFrom" value="none"/>

    Also make sure you read through POS2 XML and use that as a reference since it describes all of these unit options:

  • @redrum said in How to make a AA Tank?:

    mentioned TWW has a good example. Here is the XML snippet:

    Thank you, I'll try to create it now for my case. Any other question, is there any parameter to restrict units to be transported? For example, I made an aircraft carrier, and I want it to carry only one type of helicopter. Is that possible?

  • Admin

    @corsairbr Yes. If you do not attach a "Carrier cost" to an air unit then it will not be eligible to land on an ACC. There is an example of that as well in the TWW XML as the Naval Fighters land on ACC but the normal Fighters cannot.

  • Very nice,thanks for help,Im playing Cold War 1965,And I have many ideas of new units.


Looks like your connection to TripleA Forum was lost, please wait while we try to reconnect.