Help me get my AA to retreat.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Help me get my AA to retreat.

panguitch
This post was updated on .
In Greyhawk Wars I have bowmen, which are basically AA guns. But they can move during combat move, so they can join in an assault and shoot down defending dragons at the start of battle.

All this works great.

But if you decide to retreat, the bowmen can't retreat and are destroyed. I'd rather they be able to retreat. Anyone have ideas on how to make this happen?

Here's the current code for the bowmen:

                        <attatchment name="unitAttatchment" attatchTo="bowman" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                                         <option name="movement" value="2"/>
                                         <option name="transportCost" value="1"/>
                                         <option name="isAA" value="true"/>
                                         <option name="offensiveAttackAA" value="1"/>
                                         <option name="maxAAattacks" value="1"/>
                                         <option name="typeAA" value="bowman"/>
                                         <option name="canNotMoveDuringCombatMove" value="false"/>
                                         <option name="canBlitz" value="true"/>
                                         <option name="destroyedWhenCapturedBy" value="Iuz:Furyondy:Great_Kingdom:Nyrond:Scarlet_Brotherhood:Keoland:Ket:Iron_League:Pomarj:Suel:Neutral"/>
                        </attatchment>

Example save game from Greyhawk Wars 1.0: bomancantretreat.tsvg

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

ZjelcoP

                                         <option name="isAA" value="true"/>

isAA values: just sets isAAmovement, isAAforCombatOnly, isAAforBombingThisUnitOnly, isAAforFlyOverOnly, isInfrastructure, and isRocket to true. (allows a unit to shoot at air units before combat starts and not participate in the rest of combat, have certain movement restrictions, and be capturable)

Perhaps removing that option name and setting the values seperately will solve it. You already have some set i see.
Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

panguitch
To double-check I broke out the isAA stuff:

                        <attatchment name="unitAttatchment" attatchTo="bowman" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                                         <option name="movement" value="2"/>
                                         <option name="transportCost" value="1"/>
                                         <option name="isAAforCombatOnly" value="true"/>
                                         <option name="isAAforBombingThisUnitOnly" value="true"/>
                                         <option name="isAAforFlyOverOnly" value="false"/>
                                         <option name="isRocket" value="false"/>
                                         <option name="isInfrastructure" value="true"/>
                                         <option name="attackAA" value="1"/>
                                         <option name="targetsAA" value="dragon"/>                                         
                                         <option name="offensiveAttackAA" value="1"/>
                                         <option name="maxAAattacks" value="1"/>
                                         <option name="typeAA" value="aa_bowmen"/>
                                         <option name="canNotMoveDuringCombatMove" value="false"/>
                                         <option name="canBlitz" value="true"/>
                                         <option name="destroyedWhenCapturedBy" value="Iuz:Furyondy:Great_Kingdom:Nyrond:Scarlet_Brotherhood:Keoland:Ket:Iron_League:Pomarj:Suel:Neutral"/>
                        </attatchment>

Bowmen still get left behind and destroyed if their army retreats.

In contrast, giants, which also have AA attributes, can retreat normally:

                        <attatchment name="unitAttatchment" attatchTo="giant" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                                         <option name="movement" value="2"/>
                                         <option name="transportCost" value="2"/>
                                         <option name="attack" value="4"/>
                                         <option name="defense" value="5"/>
                                         <option name="hitPoints" value="2"/>
                                         <option name="canBlitz" value="true"/>
                                         <option name="isMarine" value="-1"/>                                         
                                         <option name="offensiveAttackAA" value="2"/>
                                         <option name="attackAA" value="2"/>
                                         <option name="maxAAattacks" value="1"/>
                                         <option name="isAAforCombatOnly" value="true"/>
                                         <option name="isAAforBombingThisUnitOnly" value="true"/>
                                         <option name="typeAA" value="aa_giants"/>
                                         <option name="targetsAA" value="dragon"/>                                 
                                         <option name="unitPlacementRestrictions" value="Eru-Tovar:Plains of the Paynims:Vesve Forest:Kron Hills:Flen:Wild Coast:Celadon Forest:Tangles:Grandwood Forest:Thelly:Hestmark Highlands:Hepmonaland:Bone March"/>
                        </attatchment>

So I'm still at a loss.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

eurofabio
Try remove isInfrastructure or change to value=false
Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

Cernel
In reply to this post by panguitch
This is a bug and I seem to remember (not sure) that infrastructures were able to retreat in previous TA versions (in Feudal Japan), while I tested now they can't.

So my guess is that some late changes made them unable to do so.

I confirm this bug exists and it is influential for at least the Feudal Japan map, where "Horse" can't retreat (while it should be able to).

I'm almost sure that infrastructures are meant to be possibly sent or used in normal combat, and there are maps that do it (for example, the Fort of Rome Total War).

So, this is a bug that it is bugging off at least 1 existent repository map.

I suggest you make a bug report about it, preferably with a savegame of Feudal Japan showing the bug off.

p.s.: I also believe that "air" "infrastructure" should not be captured nor destroyed in a failed attack (because they are not really in the attacked territory, but flying over it).

p.p.s.: Up until the bug gets saned, you can easily get around it by hacking. The reason why they don't retreat is that infrastructures not anymore relevant for combat after an eventual first round only AA shot are removed as active participants in the battle. So, you can have them able to retreat by giving them anything that will make the engine keep them for the whole duration of the battle; for example, giving a 0 or whatever negative support attachment to itself (you don't need to give an attack value, as just having a support ability will keep the infrastructure in the battle). Of course, as this being a hack, it would be preferable that some developer sanes the bug, instead (and if the bug gets saned, you should remove this hack, if you decide to use it, meanwhile).
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

panguitch
Ahhhh. I was positive isInfrastructure wasn't the problem, because I have other units that are isInfrastructure or isFactory and they have no problem retreating. But they also have support attachments (not as a hack, but because they're actually support units).

So Cernel's explanation jives.

I'll file a report.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

Cernel
Anyway, if no developers bother to sane this bug, just use the support hack. Not a big deal.
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Help me get my AA to retreat.

redrum
Administrator
Interesting. This is definitely a bug though affects very few maps. Must be something weird with the selection of available units to retreat logic.