Sub XML Properties


  • Admin

    So there are 10 sub related XML properties and many of them have little or no explanation. I'm hoping that all of our map maker experts out there can help me clearly define what each property means and also if there is an example map to see the functionality of each (otherwise I have to read through a lot of code). I'm hoping to at a minimum at better explanations to the POS2 XML but really I'm preparing to rework sub properties to allow them to be on individual unit attachments and want to clean up the existing properties as much as possible.

    Here is the list of properties with any description provided by POS2 XML:

    1. Super Sub Defence Bonus - If "true" adds 0-1 to the submarines defensive value if and when SuperSubs tech is activated.

    2. Air Attack Sub Restricted - If set to "true" a destroyer (isDestroyer) is required in the seazone in order for an air unit (isAir) to be able to hit an enemy submarine (isSub). Furthermore if air unit is the attacker, the destroyer must be owned by the attackers nation. If air unit is a defender, the destroyer can be owned by a allied nation as long as it is also at war with enemy submarines nations. This will also determine if the air unit rolls together or rolls seperately or rolls nothing, depending on the makeup of other allied units in the seazone when a submarine unit is present.

    3. Submarines Prevent Unescorted Amphibious Assaults - Submarines stop transports from doing amphibious assault unless there is at least 1 owned warship in the sea zone. If "true" submarine units are being counted as escorts. Combat transports are unaffected by this property.

    4. Ignore Sub In Movement - Allows naval units to bypass subs during movement phase (both combat and non combat). Also allows units ending moves in a SZ occupied by an enemy sub with the choice to either attack or ignore enemy sub.
      a. If set to "true". During CM or NCM, the enemy submarine units ("isSub") can be bypassed (move through) if desired, by all naval units ("isSea"). If any combat sea unit stops in submarines sea zone on CM , they get a "yes or no" prompt asking if they want to attack the submarines.
      b. If set to "false". During CM or NCM, the enemy submarine units ("isSub") stop movement (block) of all naval units ("isSea"). The "yes or no" prompt does not popup anymore if stopping in the submarines sea zone on CM. I guess attacking is implied now. Can't move into battle during NCM. The only exception is for other submarine units which do not block each other on CM or NCM. I don't recall if submarines ever block each other and if so what property controls it.

    5. Defending Subs Sneak Attack - They have first strike when defending as well unless a destroyer is present.

    6. Sub Retreat Before Battle - Allows option for subs to withdraw from battle prior to the combat rolls.

    7. Submarines Defending May Submerge Or Retreat - Submarines Defending May Submerge Or Retreat will allow defending submarines to retreat to friendly sea zones or submerge

    8. Submersible Subs - Subs can travel through enemy sea zones except if enemy destroyer is present. Subs have the option to submerge rather than withdraw.

    9. Sub Control Sea Zone Restricted - Sub Control Sea Zone Restricted should be FALSE if there are any convoy zones! If true, subs will not be able to capture convoy zones. Determines whether or not a sub can controls a sea zone. Determines if transports can't unload if a sub is present

    10. Subs Can End NonCombat Move With Enemies - Subs Can End NonCombat Move With Enemies allows submarines to end their noncombat movement in a sea zone containing any enemy units, including enemy subs

    Basic Sub Abilities (No Properties Needed)

    • First strike only on attack
    • Can't attack air units
    • Attacking subs can withdraw at end of each round to where naval units attacked from
    • Defending subs can withdraw at end of each round to adjacent friendly or empty sea zone

    Map References

    • WW2 Classic: none
    • WW2 Revised: 8 (should have 5 but code directly checks if ww2v2)
    • WW2v3: 2,4,5,6,8,10
    • WW2 Global 40: 2,3,4,5,6,8,10
    • TWW: 2,4,5,6,8,9

  • Donators

    @redrum If you are going to be reworking sub properties, you may want to generalize some of them so they can be applied to land or air units. Guerillas, stealth fighters, long-range artillery (firing first in combat), forts (can be bypassed in movement) would be empowered.This require some alternate property names e.g. "Can Hide","Sneak Attack","isStealth","Anti-Stealth","Can Retreat".

    Subs have always been problematic in Axis & Allies, as in WW2 they were basically strategic weapons, but on occasion got a lucky hit on a warship.


  • Admin

    @rogercooper Yeah, the hope is to first clean up and understand everything we have around subs. Then I want to move most of the properties to individual unit attachments and allow them to apply to land/air units as well. I'm most likely going to start with "submerge/hide/stealth" ability as a unit attribute that works for land/sea/air units which will address both of these feature requests:
    https://forums.triplea-game.org/topic/353/add-cansubmerge-unit-attribute
    https://forums.triplea-game.org/topic/328/unit-option-can-submerge-hide-for-land-units-partisan-guerrilla


  • Donators

    @rogercooper One thing to think about is that stealth requires 3 properties to define the unit involved "isStealth","Anti-Stealth" and "RequiresAnti-Stealth". For example, subs would have isStealth, destroyers and "Anti-Stealth" and air units "RequiresAnti-Stealth".


  • Donators Moderators Admin

    1. Super Sub Defence Bonus - If "true" adds 0-1 to the submarines defensive value if and when SuperSubs tech is activated.

    2. Air Attack Sub Restricted -

    If set to "true" a destroyer (isDestroyer) is required in the seazone in order for an air unit (isAir) to be able to hit an enemy submarine (isSub).

    Furthermore if air unit is the attacker, the destroyer must be owned by the attackers nation. If air unit is a defender, the destroyer can be owned by a allied nation as long as it is also at war with enemy submarines nations.

    This will also determine if the air unit rolls together or rolls seperately or rolls nothing, depending on the makeup of other allied units in the seazone when a submarine unit is present.

    Fig.1- Battle sequence: Air without Destroyer vs Sub
    0_1509288147653_SC_Fig.1_Air attack sub restricted_air.vs.sub_ without.dd.png
    "Submerge subs against only air units" and "Air attack non subs" is added to battle sequence if "Air Attack Sub Restricted" is "true" and removed if "false".

    Fig.2 - Battle sequence: Air with Destroyer vs Sub
    0_1509288612555_SC_Fig.2_Air attack sub restricted_air.vs.sub_ with.dd.png
    Battle sequence is unchanged when a destroyer is with the air unit.


  • Admin

    @general_zod Good explanations! I've added them to the original post.


  • Donators Moderators Admin

    @redrum said in Sub XML Properties:

    1. Ignore Sub In Movement - Allows naval units to bypass subs during movement phase (both combat and non combat). Also allows units ending moves in a SZ occupied by an enemy sub with the choice to either attack or ignore enemy sub.
    1. Sub Retreat Before Battle - Allows option for subs to withdraw from battle prior to the combat rolls.

  • Admin

    @hepps - Regarding #4, does that also make 'isDestroyer' units stop sub movement? And if units with 'isDestroyer' end in SZ with sub do they still have the choice not to attack the sub? Or is that all controlled with a different property?

    Regarding #6, if its 'false' then subs get withdraw option at the end of each combat round instead of beginning?


  • Donators Moderators Admin

    Defending Subs Sneak Attack = They have first strike when defending as well unless a destroyer is present.

    Submersible Subs = The same as number seven. Except seven adds the ability to withdraw


  • Donators Moderators Admin

    @redrum said in Sub XML Properties:

    @hepps - Regarding #4, does that also make 'isDestroyer' units stop sub movement? And if units with 'isDestroyer' end in SZ with sub do they still have the choice not to attack the sub? Or is that all controlled with a different property?

    I don't think #4 governs any part of the "isDestroyer" capabilities. And yes... even if a unit has "isDestroyer" they still have the option as to whether they want to attack the sub or ignore it.

    Regarding #6, if its 'false' then subs get withdraw option at the end of each combat round instead of beginning?

    Yes I believe without it they retreat normally as per all other units. *** It is also important to note that WITH it a sub is given the opportunity to retreat prior to as well as with all the other units.


  • Donators Moderators Admin

    @redrum said in Sub XML Properties:

    1. Sub Control Sea Zone Restricted - Sub Control Sea Zone Restricted should be FALSE if there are any convoy zones! If true, subs will not be able to capture convoy zones.

    I do believe that this property also needs to note that it governs (quite literally) whether or not a sub controls a SZ.

    And as a reference for you Red.... TWW utilizes: 2,4,5,6,8,9.


  • Donators Moderators Admin

    @hepps Another important thing about nine is that it also means transports cant unload if a sub is present I believe. Which you covered with your Sub controlling a sz. point. Perhaps that should be stated in there as well.


  • Donators Moderators Admin

    @redrum

    Should probably also add a couple points for thoroughness. I'm using .3635 to test these items.

    1. Submarines Prevent Unescorted Amphibious Assault -

    a. If "true" submarine units are being counted as escorts. (not sure if this was intended)

    b. Combat transports are unaffected by this property, which is good.

    1. Ignore Sub In Movement -

    a. If set to "true". During CM or NCM, the enemy submarine units ("isSub") can be bypassed (move through) if desired, by all naval units ("isSea"). If any combat sea unit stops in submarines sea zone on CM , they get a "yes or no" prompt asking if they want to attack the submarines. But if no destroyer is present, the submarine can simply submerge.

    b. If set to "false". During CM or NCM, the enemy submarine units ("isSub") stop movement (block) of all naval units ("isSea"). The "yes or no" prompt does not popup anymore if stopping in the submarines sea zone on CM. I guess attacking is implied now. Can't move into battle during NCM.

    Message Center would say "Enemy units on path" while trying to move a naval unit past a submarine, if set to "false".

    The only exception is for other submarine units which do not block each other on CM or NCM. I don't recall if submarines ever block each other and if so what property controls it. I'll check it out.

    c. Destroyers ("isDestroyer") + (isSea) units are also blocked by submarines (isSub) if above is set to "false". The "yes or no" prompt does not popup anymore if stopping in the submarines sea zone on CM. Can't move into battle during NCM


  • Donators Moderators Admin

    @general_zod Great explanation 🙂


  • Donators Moderators Admin

    @general_zod said in Sub XML Properties:

    @redrum

    Should probably also add a couple points for thoroughness. I'm using .3635 to test these items.

    1. Submarines Prevent Unescorted Amphibious Assault -

    a. If "true" submarine units are being counted as escorts. (not sure if this was intended)

    As far as your point about a. I believe this property is simply being used to verify that an "escorting" unit with an attacking combat value is present. Regardless of what type of "isSea" unit it is.

    Some of the other things that might be worth examining in this investigation are how certain of these properties interact... and which are not compatible at all.


  • Donators Moderators Admin

    @hepps
    Yes as point 3.a) goes, I agree. Most likely the logic behind it was, if it's "isSea", and has an attack value. Then it can potentially be killed, or if no destroyer present, at a minimum can force the sub to make a choice. Fight to stop the amphibious landing, or submerge.

    Just at first glance submarines don't fit the traditional escort mold, for amphibious landings.

    I'm not sure, what exactly you mean on second part of reply.



  • @redrum hey if these changes/updates effect the subs for the WWIIClassic map then please let me know when you change it so I can do a test match ... it's been awhile!


  • Donators Moderators Admin

    @captain-crunch The change's aren't meant to affect any map.... the purpose of this exercise is to potentially make some sub behaviors available independently of the all encompassing property of "isSub".


  • Donators Moderators Admin

    @hepps

    Let me try again, hehe. I missed a key part.

    Yes as point 3.a) goes, I agree. Most likely the logic behind it was, if it's "isSea", and has an attack value. Then it can potentially be killed (the preventing sub) , or if no destroyer present, at a minimum can force the preventing sub to make a choice. Fight the escort(s) to stop the amphibious landing, or submerge. Even if the escort is a sub itself.

    So I guess a sub can be an escort, against another sub.

    Just at first glance submarines don't fit the traditional escort mold, for amphibious landings.

    I'm not sure, what exactly you mean on second part of reply.


  • Donators Moderators Admin

    @general_zod What I meant by that is that it would be a worth while endeavour for us while we are examining these properties... to look at which of all these properties are compatible and which cause interference which each other.