Ammunition Question



  • Hello, all. I am trying to create a unit which functions like artillery ammunition. My aim is to create a work around which allows an artillery unit to attack a province without having to move into it. I plan to have two units, FootArtillery and 12lbrShot. FootArtillery would be unit with poor attack and defense stats which is capable of carrying 12lbrShot. 12lbrShot would be a unit which can move during the combat move phase from FootArtillery into combat. It would have a high attack stat and no defense.

    I already plan on using "isSuicide" for 12lbrShotbut I am having difficulty conceiving how the unit might be able to attack within a specific range. Ideally, I'd like the unit to only be able to move into combat, but I have considered using "requiresUnitsToMove" to prevent the ammunition from moving around the map on its own. Any ideas on how to actualize this concept? Any help is much appreciated.


  • Admin

    @oda have a look @Frostion 's "Age Of Tribes" mortar amo


  • Moderators

    @oda I believe the main problem about such tactical system is that there is no straight or simple way to have the cannon not moving if the ammunition is sent in combat. It is strange if the ammunition goes in a direction and the cannon goes in the opposite direction (you would think that a cannon that fired should not move), on the same turn. Aside from this, as per Age of Tribes: Reinassance, you can have the cannon producing 1 ammunition each turn, and triggers removing it each end turn, but this is of no help to you if you actually want to represent ammunition purchase.



  • Thanks all for the help. I've made significant progress with creating ammo using "isSuicide" and "createsUnitsList." Is there any way to make a munitions unit which will not be active in defense? Right now, when an attacker targets a province that contains munitions belonging to the defender, the defender's munitions are nullified after the first round of combat, preventing the defender from firing on their turn.

    I'd be happy to upload the xml that I'm working on if that'd be of help.

    Thanks again!


  • Admin

    @oda Not sure exactly what you are looking for but there is a property so that isSuicide units don't participate in defense so that attackers can't just use 1 unit to blow them all up:

        <!-- if suicide units act like normal units on defense, except that they can not die to attacks by other suicide units -->
        <property name="Defending Suicide and Munition Units Do Not Fire" value="false" editable="false">
          <boolean/>
        </property>
    


  • @redrum Thank you so much, that's exactly what I needed!