Unit Option Can Submerge/Hide for Land Units (Partisan/Guerrilla/Spy/Diplomat/Munition)


  • Admin

    @Hepps Agree. I'm actually looking to do both ways but going to start with cantTarget and cantBeTargetedBy. The inverse of those 2 will set the same internal field in the engine of a list that a unit can't hit or be hit by but take all units then remove from it.

    cantTarget = all unit types - canTarget
    cantBeTargetedBy = all unit types - canBeTargetedBy


  • Admin

    Properties with 'isSub' that set new unit options
    2. Air Attack Sub Restricted - if unit has isSub and this is true then set cantBeTargetedBy to all air unit types
    4. Ignore Sub In Movement - if unit has isSub and this is true then set canBeMovedThroughEnemies to true
    8. Submersible Subs - if unit has isSub and this is true then set canMoveThroughEnemies to true


  • Admin

    PR to divide isSub into attributes: https://github.com/triplea-game/triplea/pull/4831


  • Moderators

    @redrum said in Unit Option Can Submerge/Hide for Land Units (Partisan/Guerrilla/Spy/Diplomat/Munition):

    I'm looking to move forward with these bolded unit option names for isSub functionality:

    1. canEvade/canHide/canDisengage/canEscape - submerge
    2. isFirstStrike/surpriseStrike/preemptiveStrike - roll and take casualties before regular units
    3. cantTarget (or canTarget) - can't target specific units like air units
    4. cantBeTargetedBy (or canBeTargetedBy) - can't be targeted by specific units like air units
    5. canMoveThroughEnemies - unblockable, Treat Hostile Territories as Friendly
    6. canBeMovedThroughByEnemies/doesntBlockEnemies - enemies can move through territories if only these types of units are present (would also need blitz for enemy land territories)

    Sub Properties
    The sub properties outlined here will then be tied to the following unit attributes: https://forums.triplea-game.org/topic/355/sub-xml-properties

    canEvade
    6. Sub Retreat Before Battle
    7. Submarines Defending May Submerge Or Retreat

    isFirstStrike
    _1. Super Sub Defence Bonus - If "true" adds 0-1 to the submarines defensive value if and when SuperSubs tech is activated.
    5. Defending Subs Sneak Attack

    cantTarget
    NONE

    cantBeTargetedBy
    2. Air Attack Sub Restricted

    canMoveThroughEnemies
    8. Submersible Subs
    10. Subs Can End NonCombat Move With Enemies

    canBeMovedThroughByEnemies
    3. Submarines Prevent Unescorted Amphibious Assaults
    4. Ignore Sub In Movement
    9. Sub Control Sea Zone Restricted

    It's not the property that it is redundant, it is the addition of the option, related to that property, via the "isSub" option that is redundant, if I understand that would be created once for all, upon generating the game.

    Properties allow easy user customization, also intercourse, if editable, that cannot be achieved otherwise (say, you have a game in which the mapmaker wants to allow the user to decide whether air can always hit submarines, also changing the behaviour mid game), which I don't believe its a very important item (here I'm talking from a consistency standpoint).

    On top of that, this would introduce a new process, in that something is created in the unit attachments depending either on the defaults of some properties or on their settings at start game. Am I understanding this point correctly and, if so, what is the case?

    If I'm getting it correctly that such unit options creation is going to be made, one way or the other, at start game, once and for all, I think that it is wrong it being dependent on properties, liable to be changed at any point in the game.

    Generally speaking, I think that fluid/editable (and currently not even validated!) xml elements, like the properties are, should never be taken as pseudostatic references to define what is ultimately burned into the savegame (if this is the case here).

    Again, I want to point out that, not being a developer, if I'm understanding some process wrong, please let me know, as I will have probably to change my views.

    So, in keeping close to the proposed method, and as much as it feels rather unpolished to have an option creating a bunch of options, if some of them are active as default and some others are in the opposite condition (but I realize that the only alternative, that would be to have "isSub" creating only the active-as-default options, while updating all v3 Rules games to add the other ones in the attachments is not feasible), I, instead, suggest having the "isSub" option always creating all the other wanted options, also those that are going to be ineffective, for not being activated by the needed (v3 Rules) properties.

    Meaning I'm suggesting (amongst other possible things) the following:

    1. Air Attack Sub Restricted - if unit has isSub and this is true then set cantBeTargetedBy to all air unit types
    2. Ignore Sub In Movement - if unit has isSub and this is true then set canBeMovedThroughEnemies to true
    3. Submersible Subs - if unit has isSub and this is true then set canMoveThroughEnemies to true

    to be rather just set always true when "isSub" is true (not the cleanest solution, but possibly the cleanest of the feasible ones, at this point).

    On the listing:
    I have to call out what I fear might be a major oversight here. I see that the "Submersible Subs" property is missing in relation to the "canEvade" option. That is actually a very important (arguably the most important) case of "submerging submarines". The number 6 is the different behaviour of it for v3, while the number 7 is the previous behaviour for the third edition of v1. Meaning that if "Submersible Subs" is false, as well as point 6 and 7 are too, you should still be able to "evade", but only by moving to a friendly adjacent sea zone (as per v1 basic rules).

    I want also to point out that submarines, under some rulesets, are able to impede offload of unescorted transports. I see that the intention (I assume owning to its very scarce importance) is to bundle it as an exception of the option that may impede this unit to block other units, but I believe doing it this way is wrong, and likely confusing, as this is an additional and substantially unrelated rule, that should get its own option (the seventh one).

    Furthemore, also "Sub Control Sea Zone Restricted" should get its own option, as it really has nothing to do with what is being bundled with (not even related to other units!), that generally makes this unit unable to conquere or liberate territories (not only sea ones), just the same way as it is supposed to currently work for sea units with regard to convoy zones (that are just sea territories).

    Going back to the "Submersible Subs", it should be clarified that property also allows submarines to move through hostile sea zones. On this matter, one might even want to split this property in two, as well (the submerge and the move-through abilities).

    Finally, since I see no mention about it, I wonder if it is aknowledged that the "Subs Can End NonCombat Move With Enemies" property is v3 only. Moreover, I want to point out that the substantial reason of this property is related to the v3 submersible behaviour, being before each combat round; so this keeps the ability in line with the combat resolution dynamics (in v3, if you would not be able to end non combat move with enemies, you could just send them in battle and submerge them before the first combat round; while in v2 not being able to do that is to oblige you to make at least 1 round of combat, to move into a hostile sea zone).

    On the namings:
    I don't like "isFirstStrike". The only thing positive about First Strike is that it is sometimes used in other games (Magic the Gathering comes to mind), to mean about the same thing as the rules at hand. However, I feel like that is very unclear, especially in a game like TripleA, in which there is already a "first strike" dynamic, in that the attacker hits first and the defende chooses casualties before getting to roll its own dice (which is a mild advantage for the attacker, as it will get to choose casualties with full informations on the regular rolls and knowing what the defender took as casualties, as well). "preemptiveStrike" has the problem that I think that would fit much better to AA attacks, actually; so not well defining. However, here I don't have any good ideas, at the moment.

    I definitely suggest changing all "cant" to "canNot", as that is both clearer and in line with the common option of "canNotMoveDuringCombatMove"; thus "canNotTarget" and "canNotBeTargetedBy".

    "canMoveThroughEnemies" makes me think my units are piercing though the live flesh of the enemy units, rather than actially moving through the territories in which such units are being ignored, so I would rather call it "canNotBeBlockedByUnits". Also, I want to point out that, if (I understand correctly that) this option allows to treat hostile territories as friendly, meaning you move past them without capturing them, it is also needed to clarify that I assume this will not happen if the unit has this option and it is able to blitz and the territory is blitzable. Moreover, you need to decide and clearly define (in pos2) what is going to happen when a unit with this option is not able to blitz a territory itself, and tries to move past that same territory, in the case this may be due to the unit itself being always unable to blitz or to the territory housing a hostile infrastructure under v2 or following rules (as, for example, you can blitz through factories in v1, but not in v2 and v3).

    Similarly, "canBeMovedThroughByEnemies" makes me think that something nasty is happening to my unit, rather than it being just ignored, so I would go with "canNotBlockUnits".

    p.s.: I want to say that I'm so hyped about this thing, and the various arguments I'm putting forward are to try to have it as neat as possible.


  • Donators Moderators Admin

    @redrum slightly off topic but about the subs can retreat part can we get a new stable enforcing that before the next toc of v2 poke poke 😉 🙂


  • Admin

    @Cernel I'm keeping the first post of this thread updated with changes as I go and have already addressed a few of your points there.

    Properties
    I understand what you are getting at but its much simpler to minimize the usage of some of these properties in the engine and have them influence setting the new unit options then setting all new unit options to true and then also check the property. You really wouldn't ever be changing these type of sub properties part way through a game anyways. There are just too many confusing sub properties that very very few people understand so doing whatever I can to minimize them helps.

    Listing

    • Yeah, already had realized that "Submersible Subs" also influences "canEvade" for submerging vs retreating. Its a terrible property as it controls 2 completely different functions.
    • "Submarines Prevent Unescorted Amphibious Assaults" and "Sub Control Sea Zone Restricted" are kind of a weird properties that aren't used that much so decided they weren't worth separate unit options. If you feel strongly that they should be tied to a different new unit option then I'm open to it.

    Naming

    • Updated to use "canNot" instead of "cant"
    • I'll think about "moveThrough" vs "block", I don't really have a strong preference either way

  • Donators

    @redrum I am thinking about implementing Axis & Allies & Zombies. Many of these properties would be useful for zombies.


  • Moderators

    @Hepps said in Unit Option Can Submerge/Hide for Land Units (Partisan/Guerrilla/Spy/Diplomat/Munition):

    "Is Stealth" (ie. a submerge or hide ability) available for land units.


    Phases

    1. Allowing the existing system to work for land/air units
    2. Breaking isSub and isDestroyer into smaller attributes so more fine grained control can be achieved (canHide, firstStrike, canTarget, canBeTargetedBy, etc)
    3. Rework some of the global XML sub properties so that they make more sense and for some be specified at the unit level: https://forums.triplea-game.org/topic/355/sub-xml-properties

    Separate isSub Functions

    1. canEvade/canHide/canDisengage/canEscape - submerge
    2. isFirstStrike/surpriseStrike/preemptiveStrike - roll and take casualties before regular units
    3. canNotTarget (or canTarget) - can't target specific units like air units
    4. canNotBeTargetedBy (or canBeTargetedBy) - can't be targeted by specific units like air units
    5. canMoveThroughEnemies - unblockable, Treat Hostile Territories as Friendly
    6. canBeMovedThroughByEnemies/doesntBlockEnemies - enemies can move through territories if only these types of units are present (would also need blitz for enemy land territories)

    Sub Properties
    The sub properties outlined here will then be tied to the following unit attributes: https://forums.triplea-game.org/topic/355/sub-xml-properties

    canEvade
    6. Sub Retreat Before Battle
    7. Submarines Defending May Submerge Or Retreat
    8. Submersible Subs (determines if withdraws to same territory or neighboring territories)

    isFirstStrike
    _1. Super Sub Defence Bonus - If "true" adds 0-1 to the submarines defensive value if and when SuperSubs tech is activated.
    5. Defending Subs Sneak Attack

    canNotTarget
    NONE

    canNotBeTargetedBy
    2. Air Attack Sub Restricted

    canMoveThroughEnemies
    8. Submersible Subs
    10. Subs Can End NonCombat Move With Enemies

    canBeMovedThroughByEnemies
    3. Submarines Prevent Unescorted Amphibious Assaults
    4. Ignore Sub In Movement
    9. Sub Control Sea Zone Restricted

    Properties with 'isSub' that set new unit options
    2. Air Attack Sub Restricted - if unit has isSub and this is true then set canNotBeTargetedBy to all air unit types
    4. Ignore Sub In Movement - if unit has isSub and this is true then set canBeMovedThroughEnemies to true
    8. Submersible Subs - if unit has isSub and this is true then set canMoveThroughEnemies to true


    PRs

    I think this is one of the best advancement in the program, and I cannot say how many years I wish the "isSub" option was atomized, but I cannot find this documented in pos2. I believe this should be documented, obviously, and I can do it myself, if a developer will be available for reviewing it.


  • Admin

    @Cernel Good catch. At a minimum, should probably document the new unit options. I'll try to take a look at this.


  • Moderators

    @redrum I suggest doing it by copying the AA things, and changing a minimum.


  • Admin

    @Cernel Here is the PR: https://github.com/triplea-maps/the_pact_of_steel/pull/36

    Feel free to add feedback. I'd like to try to keep the explanations pretty concise while providing the necessary info.


  • Moderators

    @redrum I suggest providing full info, and I'll see to review that, but, if you refer to v3 anywhere, then there is also the issue that it is not known what the general v3 property is actually doing, as I understand that is somehow marginal, differently from the v2 one, that is actually intended to fully convert the game to v2 rules, from the v1 default.


  • Moderators

    I have this unit:

                    <attachment name="unitAttachment" attachTo="horsearcher" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                             <option name="movement" value="3"/>
                             <option name="transportCost" value="3"/>
                             <option name="canBlitz" value="true"/>
                             <option name="canMoveThroughEnemies" value="true"/>
                             <option name="attack" value="3"/>
                             <option name="defense" value="2"/>
                             <option name="isAAforCombatOnly" value="true"/>
                             <option name="AttackAA" value="1"/>
                             <option name="AttackAAmaxDieSides" value="1"/>
                             <option name="offensiveAttackAA" value="1"/>
                             <option name="offensiveAttackAAmaxDieSides" value="1"/>
                             <option name="maxAAattacks" value="-1"/>
                             <option name="maxRoundsAA" value="-1"/>
                             <option name="damageableAA" value="false"/>
                             <option name="typeAA" value="besiege"/>
                             <option name="targetsAA" value="fort:wall"/>
                             <option name="willNotFireIfPresent" value="archer:axeman:ballista:cataphract:chariot:horsearcher:horseman:legionary:levis:onager:phalangite:psilos:spearman:swordman:warelephant"/>
                             <option name="requiresUnits" value="city"/>
                    </attachment>
    

    And these properties:

                    <property name="WW2V2" value="true" editable="false">
                            <boolean/>
                    </property>
                    
                    <property name="Submersible Subs" value="true" editable="false">
                            <boolean/>
                    </property>
                    
                    <property name="Defending Subs Sneak Attack" value="true" editable="false">
                            <boolean/>
                    </property>
    

    But it is not working: the "horsarcher" units are not moving through any enemies. Am I missing something?


  • Moderators

    @Hepps said in Unit Option Can Submerge/Hide for Land Units (Partisan/Guerrilla/Spy/Diplomat/Munition):

    canMoveThroughEnemies
    8. Submersible Subs
    10. Subs Can End NonCombat Move With Enemies

    There is a problem this property. It doesn't work if the unit is a sea transport with regular cargo (apparently, if the cargo cannot end combat move with enemies, the transporting ship cannot too).

    I'm generally testing this new feature, hoping that whatever issues I might find may be fixed.


  • Moderators

    @Cernel A similar problem also exists in case of setting "canBeMovedThroughByEnemies" true for a sea transport. If the sea transport has normal cargo loaded, other ships cannot enter its sea zone during Non Combat Movement.

    I suggest generally to review all such matters, assuring that the presence of any cargo will just never influence of any such options. I assume such issues would be the same for land transports.


  • Moderators

    @Hepps said in Unit Option Can Submerge/Hide for Land Units (Partisan/Guerrilla/Spy/Diplomat/Munition):

    1. canBeMovedThroughByEnemies - enemies can move through territories if only these types of units are present (would also need blitz for enemy land territories)

    I highly suggest changing the name of this option from "canBeMovedThroughByEnemies" to something like "canBeIgnored" (which would also clearly hint a relation with "Ignore Sub In Movement"), as its function is not only to allow the opted ships to be moved through (that is, make them unable to block enemy units), but also giving the enemy the option of not creating a battle against them (something that can also be generally set, for all ships, by the property "Sea Battles May Be Ignored" (I've tested that there is no redundancy of asking it twice)) and allowing enemy ships ending non combat move with them. This is also opportune on the account that this property is not really the opposite of "canMoveThroughEnemies", since that one, instead, grants nothing about avoiding battle and doesn't allow ending non combat move with enemies as default (but as an additional ability granted by a specific property), so I think the current name (I'm suggesting changing) is going to be very confusing, as inexperienced mapmakers will likely expect something called "canBeMovedThroughByEnemies" to be just the opposite of "canMoveThroughEnemies" (for example, expecting the same results if giving one or the other option to all sea units in the game, which is not the case).

    Also the pos2 description, namely:
    canBeMovedThroughByEnemies values: whether enemies can move through territories if only these types of units are present (would also need blitz for enemy land territories)

    Should be updated, as to mention the other two behaviours I detailed (I can do it, if you prefer).


  • Moderators

    @Cernel Actually, there is also a fourth behaviour set by this option, namely the fact that such sea units are unable to impede enemy ships from loading land units (this one also generally achieved by the property "Units Can Load In Hostile Sea Zone").

    So, yeah, the option "canBeMovedThroughByEnemies" is doing 4 different things, namely:

    • disabling the ability to block moving through;
    • disabling the ability to impede loading;
    • disabling the ability to impede entering during Non Combat Movement;
    • allowing the enemy not to create a battle, and, in this case, completely ignoring the ships (also for offloading).

    So, yeah, I strongly suggest renaming this option, if not splitting it into its 4 components.


Log in to reply