Air battles not working
-
As said, air battles are not working for my scenario, despite having them enabled and having given airAttack/airDefense values to all my air units.
I have all of the following properties:
<property name="Air Battle Rounds" value="1" editable="false"> <number min="-1" max="100"/> </property> <property name="Air Battle Attackers Can Retreat" value="false" editable="false"> <boolean/> </property> <property name="Air Battle Defenders Can Retreat" value="false" editable="false"> <boolean/> </property> <property name="Battles May Be Preceeded By Air Battles" value="true" editable="false"> <boolean/> </property> <property name="Raids May Be Preceeded By Air Battles" value="true" editable="false"> <boolean/> </property>
And here is one of my air units:
<attachment name="unitAttachment" attachTo="fighter" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="movement" value="4"/> <option name="attack" value="3"/> <option name="defense" value="4"/> <option name="carrierCost" value="2"/> <option name="isAir" value="true"/> <option name="canAirBattle" value="true"/> <option name="canIntercept" value="true"/> <option name="canEscort" value="true"/> <option name="airAttack" value="2"/> <option name="airDefense" value="2"/> <option name="createsResourcesList" value="-1:PUs"/> <option name="fuelFlatCost" value="oil" count="1"/> </attachment>
What am I doing wrong? I've looked through POS2 and I cannot find what I am missing.
-
@elreigh Might be a conflict with some other Global property.
-
@Hepps Do you have any idea which one might cause a conflict?
Here's my entire property list:
<propertyList> <property name="Use Bombing Max Dice Sides And Bonus" value="true" editable="false"> <boolean/> </property> <property name="Selectable Zero Movement Units" value="false" editable="false"> <boolean/> </property> <property name="Units May Give Bonus Movement" value="true" editable="false"> <boolean/> </property> <property name="Unit Placement Restrictions" value="true" editable="false"> <boolean/> </property> <property name="Use Triggers" value="true" editable="false"> <boolean/> </property> <property name="Unplaced units live when not placed" value="true" editable="false"> <boolean/> </property> <property name="Use Fuel Cost" value="true" editable="false"> <boolean/> </property> <property name="Paratroopers Can Move During Non Combat" value="true" editable="false"> <boolean/> </property> <property name="Damage From Bombing Done To Units Instead Of Territories" value="true" editable="false"> <boolean/> </property> <property name="Suicide and Munition Casualties Restricted" value="true" editable="true"> <boolean/> </property> <property name="Defending Suicide and Munition Units Do Not Fire" value="true" editable="false"> <boolean/> </property> <property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false"> <boolean/> </property> <property name="whenCapturedByGoesTo" value="true" editable="false"> <boolean/> </property> <property name="Movement By Territory Restricted" value="true" editable="false"> <boolean/> </property> <property name="Honorable Surrender" value="true" editable="true"> <boolean/> </property> <property name="Low Luck" value="false" editable="true"> <boolean/> </property> <property name="Tech Development" value="true" editable="true"> <boolean/> </property> <property name="LHTR Heavy Bombers" value="false" editable="true"> <boolean/> </property> <property name="Heavy Bomber Dice Rolls" value="2" editable="true"> <number min="2" max="3"/> </property> <property name="Always on AA" value="false" editable="true"> <boolean/> </property> <property name="Kamikaze Airplanes" value="false" editable="true"> <boolean/> </property> <property name="Display Sea Names" value="false" editable="true"> <boolean/> </property> <property name="WW2V3" value="true" editable="false"> <boolean/> </property> <property name="WW2V3 Tech Model" value="true" editable="false"> <boolean/> </property> <property name="Use Shipyards" value="false" editable="false"> <boolean/> </property> <property name="All Rockets Attack" value="true" editable="false"> <boolean/> </property> <property name="Rockets Can Fly Over Impassables" value="false" editable="false"> <boolean/> </property> <property name="Blitz Through Factories And AA Restricted" value="false" editable="false"> <boolean/> </property> <property name="Roll AA Individually" value="true" editable="false"> <boolean/> </property> <property name="Choose AA Casualties" value="false" editable="false"> <boolean/> </property> <property name="AA Territory Restricted" value="true" editable="false"> <boolean/> </property> <property name="Multiple AA Per Territory" value="true" editable="false"> <boolean/> </property> <property name="Partial Amphibious Retreat" value="true" editable="false"> <boolean/> </property> <property name="Shore Bombard Per Ground Unit Restricted" value="true" editable="false"> <boolean/> </property> <property name="Naval Bombard Casualties Return Fire Restricted" value="true" editable="false"> <boolean/> </property> <property name="Allied Air Dependents" value="true" editable="false"> <boolean/> </property> <property name="Surviving Air Move To Land" value="true" editable="false"> <boolean/> </property> <property name="Air Attack Sub Restricted" value="true" editable="false"> <boolean/> </property> <property name="Air Battle Rounds" value="1" editable="false"> <number min="-1" max="100"/> </property> <property name="Air Battle Attackers Can Retreat" value="false" editable="false"> <boolean/> </property> <property name="Air Battle Defenders Can Retreat" value="false" editable="false"> <boolean/> </property> <property name="Battles May Be Preceeded By Air Battles" value="true" editable="false"> <boolean/> </property> <property name="Raids May Be Preceeded By Air Battles" value="true" editable="false"> <boolean/> </property> <property name="Ignore Transport In Movement" value="true" editable="false"> <boolean/> </property> <property name="Transport Casualties Restricted" value="true" editable="false"> <boolean/> </property> <property name="Unescorted Transport Dies" value="false" editable="false"> <boolean/> </property> <property name="Ignore Sub In Movement" value="false" editable="false"> <boolean/> </property> <property name="Defending Subs Sneak Attack" value="true" editable="false"> <boolean/> </property> <property name="Sub Retreat Before Battle" value="true" editable="false"> <boolean/> </property> <property name="Submersible Subs" value="true" editable="false"> <boolean/> </property> <property name="Sub Control Sea Zone Restricted" value="false" editable="false"> <boolean/> </property> <property name="Previous Units Fight" value="true" editable="false"> <boolean/> </property> <property name="Two hit battleship" value="true" editable="false"> <boolean/> </property> <property name="Units Repair Hits Start Turn" value="true" editable="false"> <boolean/> </property> <property name="Produce fighters on carriers" value="true" editable="false"> <boolean/> </property> <property name="Produce new fighters on old carriers" value="true" editable="false"> <boolean/> </property> <property name="Move existing fighters to new carriers" value="false" editable="false"> <boolean/> </property> <property name="Land existing fighters on new carriers" value="true" editable="false"> <boolean/> </property> <property name="Unit Placement In Enemy Seas" value="true" editable="false"> <boolean/> </property> <property name="Territory Turn Limit" value="false" editable="false"> <boolean/> </property> <property name="maxFactoriesPerTerritory" value="1" editable="false"> <number min="1" max="100"/> </property> <property name="Placement Restricted By Factory" value="true" editable="false"> <boolean/> </property> <property name="SBR Affects Unit Production" value="true" editable="false"> <boolean/> </property> <property name="neutralCharge" value="9999999" editable="false"> <number min="0" max="9999999"/> </property> <property name="Neutrals Are Impassable" value="true" editable="false"> <boolean/> </property> <property name="Neutrals Are Blitzable" value="false" editable="false"> <boolean/> </property> <property name="Mazdak bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="China bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="EuroForce bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="Russia bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="India bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="Arcadia bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="Korea bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="Hoshida bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="Meijou bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="Grands bid" value="0" editable="true"> <number min="0" max="1000"/> </property> <property name="mapName" value="the_grand_war" editable="false"> <string/> </property> </propertyList>
-
@elreigh only thing I have different in unit attachment is:
<option name="canScramble" value="true"/>
Idk if it matters or not but would be easy to test
-
@beelee I tried it out, that didn't work. Thanks though.
-
@elreigh what does "Allied Air Dependents" do ? Haven't seen it before. All your other stuff looked ok to me
-
@beelee It determines whether or not allied air units parked on your carriers will help to defend it in an attack. I used the map maker bundled with the Triplea engine to generate this property list, so this wasn't something I added in myself. It is called "Allied Air Independent" in POS2, so I guess there was a name change that the map maker didn't keep up with..
-
@elreigh hmm...so doesn't air battle at all ? Maybe try bumping it to two rounds ? Should work at 1 though.
Sure someone will diagnose it for you : )
-
@beelee I tried making it two rounds, still didn't work.
I've also removed my entire property list and added in the one from POS2, since the POS2 list says to keep your properties in the order they are shown there, and I figured that might be the problem. Or, maybe it was conflicting with some other property that I had which POS2 doesn't. Yet, even still, air battles are not occurring in my game.
-
-
@beelee If you have a game that is operating with Air Battles... why not just attach your functioning property list to a post?
-
@hepps well I don't currently have one. I could make some changes and add it. arleighs stuff looked good to me though. I'll see what i can do
-
@beelee said in Air battles not working:
@elreigh only thing I have different in unit attachment is:
<option name="canScramble" value="true"/>
Idk if it matters or not but would be easy to test
Sorry, I misunderstood your above comment. The way you posed the response implied that you had a game that used air battles and the only difference was that you had an added feature.
-
@hepps No worries. If I turn on " Battles may Be Preceeded ( misspelled btw ) By Air battles" it works for me:
<!-- End of Victory Conditions, rest of typical changed properties below -->
<property name="Low Luck" value="false" editable="true">
<boolean/>
</property>
<property name="Low Luck for AntiAircraft" value="false" editable="true">
<boolean/>
</property>
<property name="Low Luck for Technology" value="false" editable="true">
<boolean/>
</property>
<property name="Low Luck for Bombing and Territory Damage" value="false" editable="true">
<boolean/>
</property>
<property name="Use Politics" value="true" editable="false">
<boolean/>
</property>
<property name="National Objectives" value="true" editable="false">
<boolean/>
</property>
<property name="Use Triggers" value="true" editable="false">
<boolean/>
</property>
<property name="Tech Development" value="true" editable="true">
<boolean/>
</property>
<property name="Remove All Tech Tokens At End Of Turn" value="true" editable="true">
<boolean/>
</property>
<property name="Super Sub Defence Bonus" value="0" editable="true">
<number min="0" max="1"/>
</property>
<property name="LHTR Heavy Bombers" value="true" editable="true">
<boolean/>
</property>
<property name="Heavy Bomber Dice Rolls" value="2" editable="false">
<number min="2" max="3"/>
</property>
<property name="Paratroopers Can Move During Non Combat" value="true" editable="false">
<boolean/>
</property>
<property name="Paratroopers Can Attack Deep Into Enemy Territory" value="true" editable="true">
<boolean/>
</property>
<property name="Always on AA" value="true" editable="true">
<boolean/>
</property>
<property name="Kamikaze Airplanes" value="false" editable="true">
<boolean/>
</property>
<property name="Use Kamikaze Suicide Attacks" value="true" editable="true">
<boolean/>
</property>
<property name="Kamikaze Suicide Attacks Done By Current Territory Owner" value="false" editable="false">
<boolean/>
</property>
<property name="Kamikaze Suicide Attacks Only Where Battles Are" value="true" editable="false">
<boolean/>
</property>
<property name="Units Repair Hits End Turn" value="false" editable="false">
<boolean/>
</property>
<property name="Units Repair Hits Start Turn" value="true" editable="false">
<boolean/>
</property>
<property name="Two HitPoint Units Require Repair Facilities" value="true" editable="true">
<boolean/>
</property>
<!-- Display Options -->
<property name="Multiply PUs" value="1" editable="false">
<number min="1" max="10"/>
</property>
<property name="Display Units as Counters" value="0" editable="false">
<number min="0" max="10"/>
</property>
<property name="Display Sea Names" value="false" editable="false">
<boolean/>
</property>
<property name="Selectable Zero Movement Units" value="false" editable="false">
<boolean/>
</property>
<!-- END OF TYPICAL OPTIONAL PROPERTIES -->
<!-- rules and tech -->
<property name="WW2V3" value="true" editable="false">
<boolean/>
</property>
<property name="WW2V3 Tech Model" value="true" editable="false">
<boolean/>
</property>
<property name="Selectable Tech Roll" value="false" editable="false">
<boolean/>
</property>
<property name="Use Shipyards" value="false" editable="false">
<boolean/>
</property>
<property name="Scramble Rules In Effect" value="true" editable="true">
<boolean/>
</property>
<property name="Scrambled Units Return To Base" value="true" editable="true">
<boolean/>
</property>
<property name="Scramble To Sea Only" value="true" editable="true">
<boolean/>
</property>
<property name="Scramble From Island Only" value="false" editable="true">
<boolean/>
</property>
<property name="Scramble To Any Amphibious Assault" value="true" editable="true">
<boolean/>
</property>
<property name="Airborne Attacks Only In Existing Battles" value="true" editable="false">
<boolean/>
</property>
<property name="Airborne Attacks Only In Enemy Territories" value="false" editable="false">
<boolean/>
</property>
<property name="All Rockets Attack" value="true" editable="false">
<boolean/>
</property>
<property name="Rocket Attacks Per Factory Infinite" value="true" editable="false">
<boolean/>
</property>
<property name="Rockets Can Fly Over Impassables" value="false" editable="false">
<boolean/>
</property>
<!-- These require an associated value in the attachments section above-->
<property name="Movement By Territory Restricted" value="true" editable="false">
<boolean/>
</property>
<property name="Production Per X Territories Restricted" value="true" editable="false">
<boolean/>
</property>
<property name="Production Per Valued Territory Restricted" value="false" editable="false">
<boolean/>
</property>
<property name="Unit Placement Per Territory Restricted" value="true" editable="false">
<boolean/>
</property>
<property name="Place in Any Territory" value="true" editable="false">
<boolean/>
</property>
<property name="Unplaced units live when not placed" value="true" editable="false">
<boolean/>
</property>
<property name="Occupied Territories" value="true" editable="false">
<boolean/>
</property>
<property name="Give Units By Territory" value="true" editable="false">
<boolean/>
</property>
<property name="Capture Units On Entering Territory" value="true" editable="false">
<boolean/>
</property>
<property name="On Entering Units Destroyed Instead Of Captured" value="false" editable="false">
<boolean/>
</property>
<!-- specific rules -->
<!-- land related -->
<property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false">
<boolean/>
</property>
<property name="Units Can Be Changed On Capture" value="true" editable="true">
<boolean/>
</property>
<property name="More Constructions with Factory" value="true" editable="true">
<boolean/>
</property>
<property name="More Constructions without Factory" value="true" editable="true">
<boolean/>
</property>
<property name="Unlimited Constructions" value="false" editable="true">
<boolean/>
</property>
<property name="Blitz Through Factories And AA Restricted" value="true" editable="false">
<boolean/>
</property>
<property name="Roll AA Individually" value="true" editable="false">
<boolean/>
</property>
<property name="Choose AA Casualties" value="true" editable="true">
<boolean/>
</property>
<property name="AA Territory Restricted" value="false" editable="false">
<boolean/>
</property>
<property name="Force AA Attacks For Last Step Of Fly Over" value="true" editable="false">
<boolean/>
</property>
<property name="Multiple AA Per Territory" value="true" editable="false">
<boolean/>
</property>
<property name="Suicide and Munition Casualties Restricted" value="false" editable="false">
<boolean/>
</property>
<property name="Defending Suicide and Munition Units Do Not Fire" value="false" editable="false">
<boolean/>
</property>
<property name="Units May Give Bonus Movement" value="true" editable="true">
<boolean/>
</property>
<!-- sea related -->
<property name="Partial Amphibious Retreat" value="true" editable="false">
<boolean/>
</property>
<property name="Attacker Retreat Planes" value="true" editable="false">
<boolean/>
</property>
<property name="Shore Bombard Per Ground Unit Restricted" value="true" editable="false">
<boolean/>
</property>
<property name="Naval Bombard Casualties Return Fire" value="true" editable="false">
<boolean/>
</property>
<property name="Hari-Kari Units" value="true" editable="false">
<boolean/>
</property>
<property name="Allied Air Dependents" value="true" editable="false">
<boolean/>
</property>
<property name="Surviving Air Move To Land" value="true" editable="false">
<boolean/>
</property>
<property name="Air Attack Sub Restricted" value="true" editable="true">
<boolean/>
</property>
<property name="Transport Restricted Unload" value="true" editable="false">
<boolean/>
</property>
<property name="Ignore Transport In Movement" value="true" editable="false">
<boolean/>
</property>
<property name="Transport Casualties Restricted" value="true" editable="false">
<boolean/>
</property>
<property name="Unescorted Transport Dies" value="true" editable="false">
<boolean/>
</property>
<property name="Transport Control Sea Zone" value="false" editable="false">
<boolean/>
</property>
<property name="Submarines Prevent Unescorted Amphibious Assaults" value="true" editable="false">
<boolean/>
</property>
<property name="Ignore Sub In Movement" value="true" editable="false">
<boolean/>
</property>
<property name="Defending Subs Sneak Attack" value="true" editable="false">
<boolean/>
</property>
<property name="Sub Retreat Before Battle" value="true" editable="false">
<boolean/>
</property>
<property name="Submersible Subs" value="true" editable="false">
<boolean/>
</property>
<property name="Sub Control Sea Zone Restricted" value="false" editable="false">
<boolean/>
</property>
<property name="Subs Can End NonCombat Move With Enemies" value="true" editable="false">
<boolean/>
</property>
<property name="Naval Units May Not NonCombat Move Into Controlled Sea Zones" value="false" editable="false">
<boolean/>
</property>
<property name="Previous Units Fight" value="true" editable="false">
<boolean/>
</property>
<property name="Two hit battleship" value="true" editable="false">
<boolean/>
</property>
<property name="Convoy Blockades Roll Dice For Cost" value="true" editable="true">
<boolean/>
</property>
<!-- production related -->
<property name="Produce fighters on carriers" value="true" editable="false">
<boolean/>
</property>
<property name="Produce new fighters on old carriers" value="true" editable="false">
<boolean/>
</property>
<property name="Move existing fighters to new carriers" value="false" editable="false">
<boolean/>
</property>
<property name="Land existing fighters on new carriers" value="true" editable="false">
<boolean/>
</property>
<property name="LHTR Carrier production rules" value="true" editable="false">
<boolean/>
</property>
<property name="Unit Placement In Enemy Seas" value="true" editable="false">
<boolean/>
</property>
<property name="Territory Turn Limit" value="false" editable="false">
<boolean/>
</property>
<property name="Limit SBR Damage Per Turn" value="false" editable="false">
<boolean/>
</property>
<property name="Limit Rocket Damage Per Turn" value="false" editable="false">
<boolean/>
</property>
<property name="maxFactoriesPerTerritory" value="2" editable="false">
<number min="1" max="100"/>
</property>
<property name="Placement Restricted By Factory" value="true" editable="false">
<boolean/>
</property>
<property name="Unit Placement Restrictions" value="true" editable="true">
<boolean/>
</property>
<property name="Air Battle Rounds" value="1" editable="true">
<number min="-1" max="100"/>
</property>
<property name="Air Battle Attackers Can Retreat" value="false" editable="true">
<boolean/>
</property>
<property name="Air Battle Defenders Can Retreat" value="false" editable="true">
<boolean/>
</property>
<property name="Battles May Be Preceeded By Air Battles" value="false" editable="true">
<boolean/>
</property>
<property name="Raids May Be Preceeded By Air Battles" value="true" editable="true">
<boolean/>
</property>
<property name="Damage From Bombing Done To Units Instead Of Territories" value="true" editable="false">
<boolean/>
</property>
<property name="Use Bombing Max Dice Sides And Bonus" value="true" editable="false">
<boolean/>
</property>
<property name="Limit SBR Damage To Factory Production" value="false" editable="false">
<boolean/>
</property> -
I've tried everything and I'm only discovering even more bugs that I cannot figure out. Like an AA unit with "offensiveAttackAA" value="4" that is rolling on a 3, not a 4. Can't figure out why; the xml very clearly says 4, and there are no properties I can find that would change that.
And then one of my air units with "airDefense" value="4" and "airAttack" value="2" has its mouse-over tooltip display that its airDefense is 2, not 4. For some reason airDefense is defaulting to whatever the airAttack value is.
Maybe all of these problems are related? I have no idea. They're all air units, so maybe.
If anyone who knows what might be wrong wants to take a look at my xml, I've attached it to this post.
-
@elreigh Can you upload your entire map zip so I can test it?
-
@redrum I decided to test it one more time before zipping it up and sending it to you. Inexplicably, it works. I haven't changed anything at all since the last time I checked, it just works now. I don't know why. Anyway, thanks for your help.
Additionally, I have discovered what is definitely a bug: air units show their airAttack and airDefense values as the same number in the mouse-over tooltip, even when they are different. This has no effect on air battles, as my interceptor with 4 defense still defends on a 4, even if the tooltip says it defends on a 2. You can see what I mean in this picture:
-
@elreigh My guess is you were editing/loading the wrong XML or something
I think most maps set air defense and defense to the same value so there could be a bug there. I'll have to take a look.
-
I had the same problem; Probably need this one;
<property name="Damage From Bombing Done To Units Instead Of Territories" value="true" editable="false">
<boolean/>
</property>