Stack Unit Support


  • Admin

    Let’s say I have a Fort like the one below. It has wall archers shooting 10 times 2/10 hit chance every turn, potentially killing up to 10 units.

    If it is attacked by a force bringing along a Siege-Tower, like the one below, the wall archers are disadvantaged and now only have 10 times 1/10 hit chance every turn.

    Is it possible to somehow let 2 such Siege-Towers suppress the wall archers completely, like make Siege-Tower effect stack? When I try to make this happen, there is always only one Siege-Tower giving negative bonus.

        <attachment name="unitAttachment" attachTo="Fort" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="isFactory" value="true"/>
            <option name="isInfrastructure" value="true"/>
            <option name="canProduceXUnits" value="2"/>
                <option name="attackAA" value="2"/>
                <option name="attackAAmaxDieSides" value="10"/>
                <option name="maxAAattacks" value="10"/>
                <option name="maxRoundsAA" value="-1"/>
                <option name="isAAforCombatOnly" value="true"/>
                <option name="typeAA" value="Wall Archers"/>
                <option name="mayOverStackAA" value="true"/>
                <option name="damageableAA" value="true"/>
                <option name="targetsAA" value="$AllLandUnits$"/>
        </attachment>
    
        <attachment name="supportAttachmentSiege-Tower" attachTo="Siege-Tower" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
            <option name="unitType" value="$AllFortifications$"/>
            <option name="faction" value="enemy"/>
            <option name="side" value="offence"/>
            <option name="dice" value="AAstrength"/>
            <option name="bonus" value="-1"/>
            <option name="number" value="1"/>
            <option name="bonusType" value="Cover"/>
            <option name="players" value="$AllPlayers$"/>
        </attachment>
    

    Implementation

    A count can now be specified for a supportAttachment bonusType which specifies how many units can stack support onto the given support target (previously it was always just 1). The count can be any numerical value with 1 being the default but anything less than 1 will represent infinite stacking (0, -1, etc). Infinite stacking for strength support is not advised because you still have the dice sides limit it but infinite stacking for roll modifiers can make sense.

    New bonusType optional count parameter

    <option name="bonusType" value="Cover" count="3"/>
    

    Infantry receives support from up to 2 artillery

            <attachment name="supportAttachmentArtillerygerman" attachTo="germanArtillery" javaClass="UnitSupportAttachment" type="unitType">
                <option name="unitType" value="germanInfantry:germanMarine:germanCombatEngineer:germanAlpineInfantry:germanParatrooper"/>
                <option name="faction" value="allied"/>
                <option name="side" value="offence"/>
                <option name="dice" value="strength"/>
                <option name="bonus" value="1"/>
                <option name="number" value="1"/>
                <option name="bonusType" value="ArtilleryBonus" count="2"/>
                <option name="impArtTech" value="false"/>
                <option name="players" value="Germany"/>
            </attachment>
    

    Infantry receives support from up to 3 static defenses (entrenchment, fortification)

            <attachment name="supportAttachmentEntrenchmentgerman" attachTo="germanEntrenchment" javaClass="UnitSupportAttachment" type="unitType">
                <option name="unitType" value="germanInfantry:germanMarine:germanCombatEngineer:germanAlpineInfantry:germanParatrooper:italianInfantry:italianMarine:italianCombatEngineer:italianAlpineInfantry:italianParatrooper:japaneseInfantry:japaneseMarine:japaneseCombatEngineer:japaneseAlpineInfantry:japaneseParatrooper"/>
                <option name="faction" value="allied"/>
                <option name="side" value="defence"/>
                <option name="dice" value="strength"/>
                <option name="bonus" value="1"/>
                <option name="number" value="2"/>
                <option name="bonusType" value="FortBonus" count="3"/>
                <option name="impArtTech" value="false"/>
                <option name="players" value="Germany"/>
            </attachment>
            <attachment name="supportAttachmentFortificationgerman" attachTo="germanFortification" javaClass="UnitSupportAttachment" type="unitType">
                <option name="unitType" value="germanInfantry:germanMarine:germanCombatEngineer:germanAlpineInfantry:germanParatrooper:italianInfantry:italianMarine:italianCombatEngineer:italianAlpineInfantry:italianParatrooper:japaneseInfantry:japaneseMarine:japaneseCombatEngineer:japaneseAlpineInfantry:japaneseParatrooper"/>
                <option name="faction" value="allied"/>
                <option name="side" value="defence"/>
                <option name="dice" value="strength"/>
                <option name="bonus" value="2"/>
                <option name="number" value="3"/>
                <option name="bonusType" value="FortBonus" count="3"/>
                <option name="impArtTech" value="false"/>
                <option name="players" value="Germany"/>
            </attachment>
    

    PR: https://github.com/triplea-game/triplea/pull/5309
    POS2 PR: https://github.com/triplea-maps/the_pact_of_steel/pull/35


  • Admin

    @Frostion Yes and no. I believe "stacking" any kind of support modifier is solely controlled by the bonusType. Each unit can only receive support from 1 of each bonusType. So 2 of the same unit support never stack but you could create say "Siege Tower 2" or "Battering Ram" or something which has the same support attachment except has say a bonusType of "Cover2".


  • Moderators

    @Frostion Why not just having the belfry removing 5 rolls? unless I'm missing something, this would obtain almost exactly what you want, just with some less variability on dice.

    Gameplay wise, however, in the moment there is not any kind of decremental advantage, I'm pretty sure this would just end in plain micromanagement, as if you would have convenience having a belfry, then you would have more convenience having two of them; so you would still send them either in pairs or not at all, virtually every time.

    Also, it likely makes sense that you cannot completely neutralize the fort, but rather just soften it.

    Btw, is there a stack limit for the number of Forts per territory?


  • Admin

    There are fortifications smallere than forts and larger than forts. So it would be nice if you could bring more siege towers to neutralize larger fortifications.
    My idea was to have 1 siege tower to counter the smallest. 2 to counter the fort size. 3 to counter the larger and so on.
    So I really hoped it was possible to have the negative support stack 😞

    And yes. One fortification per territory, but you can upgrade the size with upgraded larger versions.


  • Moderators

    @Frostion I'm quite sure that will result only in you virtually always maxing out the number of towers you send (so virtually always sending 1 on small, 2 on medium and 3 on large), if sending any, as when you remove power from your opponent, each additional power removal is more advantageous than the previous one.

    However, sorry forget what I said on removing rolls. The stack limit is per unit, so you cannot remove rolls from a same unit with a same type of support more than once, anyways.

    I see what you are getting at is that more advanced defences should require increasingly huge besieging efforts, but yeah you cannot have it the way you are going.


  • Admin

    @Frostion This is probably a reasonable feature request.

    That said I think the 2 ways to potentially get around the limitation are:

    1. Create different siege units with different bonusTypes so they can both impact the fort.
    2. Instead of having an upgrade system for defensive structures and only allowing 1 instead build a new unit for each upgrade and keep the previous. This would then end up with having say "wall" and "fort" in the territory each with half the original fort bonus so that you could have 2 siege towers (1 impacting each of them).

  • Moderators

    @redrum Maybe the most feasible way would be a support option for applying the support per roll, instead of per unit. Then, we could have something like:
    10 rolls at 2 -> 5 rolls at 2 -> no rolls
    that is very similar to the wanted:
    10 rolls at 2 -> 10 rolls at 1 -> 10 rolls at 0 (no rolls)
    Also, it feels more logical to remove rolls than to lower the strength of those rolls to 0.


  • Admin

    @Cernel It probably makes more sense to just have a "canStack" option where all support for a given bonusType is allowed to stack. No reason to only allow it for rolls and not strength.


  • Moderators

    @redrum In that case, I'd go for a stack number (I guess 0 may mean infinite).


  • Donators

    @redrum
    Instead of adding a new 'canStack' property, why not just add the 'count' value to the 'bonusType' property. So for @Frostion's Siege-Tower:

    <option name="bonusType" value="Cover" count="3"/>
    

    would allow 3 Siege-Towers to stack the support together.

    The absent of count would equal 1. So if @Frostion had a Battering-Ram and its supportAttachment:

    <option name="bonusType" value="Cover"/>
    

    Then the Battering-Ram could not stack support with itself, but it would still stack with the Siege-Tower so that:
    2 Siege-Towers would equal -2 support for enemy fortifications
    1 Siege-Tower and 1 Battering-Ram would equal -2 support for enemy fortifications
    2 Battering-Rams would equal just a -1 support for enemy fortifications.
    1 Siege-Tower (count="3") with two Battering-Rams would still gain the -3 support.

    Just some thoughts.

    Cheers...


  • Admin

    @wc_sumpton I like that idea.

    @Frostion @wc_sumpton @Cernel I think my only question here is would a map maker ever want to set a different bonusType count for different units with the same bonusType string? So for example if I had 2 different unit types that provide "cover" support would I ever want them to have different counts (or should they always set the same count) and if I'm not sure exactly how that would work?

    So is something like this useful or should the counts always be the same for a given bonusType?

        <attachment name="supportAttachmentSiege-Tower" attachTo="Siege-Tower" javaClass="UnitSupportAttachment" type="unitType">
            <option name="bonusType" value="Cover" count="2"/>
        </attachment>
        <attachment name="supportAttachmentSomeOtherSiege" attachTo="SomeOtherSiege" javaClass="UnitSupportAttachment" type="unitType">
            <option name="bonusType" value="Cover" count="1"/>
        </attachment>
    

  • Admin

    So I don't see any reason to support different counts for the same bonusType. Here are some initial examples of this feature.

    Infantry receives support from up to 2 artillery

            <attachment name="supportAttachmentArtillerygerman" attachTo="germanArtillery" javaClass="UnitSupportAttachment" type="unitType">
                <option name="unitType" value="germanInfantry:germanMarine:germanCombatEngineer:germanAlpineInfantry:germanParatrooper"/>
                <option name="faction" value="allied"/>
                <option name="side" value="offence"/>
                <option name="dice" value="strength"/>
                <option name="bonus" value="1"/>
                <option name="number" value="1"/>
                <option name="bonusType" value="ArtilleryBonus" count="2"/>
                <option name="impArtTech" value="false"/>
                <option name="players" value="Germany"/>
            </attachment>
    

    Infantry receives support from up to 3 static defenses (entrenchment, fortification)

            <attachment name="supportAttachmentEntrenchmentgerman" attachTo="germanEntrenchment" javaClass="UnitSupportAttachment" type="unitType">
                <option name="unitType" value="germanInfantry:germanMarine:germanCombatEngineer:germanAlpineInfantry:germanParatrooper:italianInfantry:italianMarine:italianCombatEngineer:italianAlpineInfantry:italianParatrooper:japaneseInfantry:japaneseMarine:japaneseCombatEngineer:japaneseAlpineInfantry:japaneseParatrooper"/>
                <option name="faction" value="allied"/>
                <option name="side" value="defence"/>
                <option name="dice" value="strength"/>
                <option name="bonus" value="1"/>
                <option name="number" value="2"/>
                <option name="bonusType" value="FortBonus" count="3"/>
                <option name="impArtTech" value="false"/>
                <option name="players" value="Germany"/>
            </attachment>
            <attachment name="supportAttachmentFortificationgerman" attachTo="germanFortification" javaClass="UnitSupportAttachment" type="unitType">
                <option name="unitType" value="germanInfantry:germanMarine:germanCombatEngineer:germanAlpineInfantry:germanParatrooper:italianInfantry:italianMarine:italianCombatEngineer:italianAlpineInfantry:italianParatrooper:japaneseInfantry:japaneseMarine:japaneseCombatEngineer:japaneseAlpineInfantry:japaneseParatrooper"/>
                <option name="faction" value="allied"/>
                <option name="side" value="defence"/>
                <option name="dice" value="strength"/>
                <option name="bonus" value="2"/>
                <option name="number" value="3"/>
                <option name="bonusType" value="FortBonus" count="3"/>
                <option name="impArtTech" value="false"/>
                <option name="players" value="Germany"/>
            </attachment>
    

  • Moderators

    @redrum I don't think I've a particular interest in any matters at this thread, so whatever @Frostion so @wc_sumpton prefer don't mind me, but I think the main argument for supporting different support counts is that, for the way it is coded, you have to support them, unless you address the situation some other ways, like making the game crash if the mapmaker set a same "bonusType" having different counts. So, I would definitely support them, even only for this.


  • Admin

    @Cernel Well they will work but the engine will just select the first one it finds as it will assume they are all the same for a given bonusType. I don't think it makes sense to have different counts for the same bonusType as really at that point you should probably be using different bonusTypes.


  • Moderators

    @redrum said in Is it possible to make this unit's negative AA support stack?:

    @Cernel Well they will work but the engine will just select the first one it finds as it will assume they are all the same for a given bonusType. I don't think it makes sense to have different counts for the same bonusType as really at that point you should probably be using different bonusTypes.

    Meh. I think this is really unpolished. I'd rather crash, really, or at least giving an exception, telling that something is wrong.


  • Moderators

    The other question is how the multiple support should work? Should we first down a same unit as much as we can, or should be first down as many units as we can, then go back downing again what we already downed.

    For example, if I have 2 artilleries that each can support 1 enemy infantry at -1, but stack up to 2 supports per infantry, if I'm attacking 2 infantries should they be both downed by 1, or only 1 downed by 2, and the other one unaffected?


  • Donators

    @redrum
    I see what you are saying, and I think you are right. Different units can provide support to the same unit. If the supportType is different then the supports stack to the count of each supportType.

    This was @Frostion's request so would like to hear from him.

    Cheers...


  • Admin

    @Cernel It will try to stack as many support as allowed to each unit 1 by 1. So if you had an artillery that has count=2 and you have 2 inf and 2 art then both art would support the same inf. I think you can debate this either way but its much easier to code using as much support as possible to each unit 1 by 1.


  • Moderators

    @redrum said in Is it possible to make this unit's negative AA support stack?:

    @Cernel It will try to stack as many support as allowed to each unit 1 by 1. So if you had an artillery that has count=2 and you have 2 inf and 2 art then both art would support the same inf. I think you can debate this either way but its much easier to code using as much support as possible to each unit 1 by 1.

    Ok, I don't have a definite opinion on this, at the moment, but that would be important to document in pos2, and it is good to know, for further reasoning on cases of same type and different counts.

    I'm curious about @Frostion too, and, again, whatever @Frostion or @wc_sumpton are thinking go with it, I don't mind, but, if I must try to see a way to justify different support counts, I can see the case of "light_artillery" and "heavy_artillery".

    Both artilleries have a support reducing the defensive strength of enemy infantries, but the light artillery is more superficial, so it can reduce it only up to 1, while the heavy artillery can bring it down by up to 2. Beside this only, both artilleries have exactly the same kind of support, for 1 enemy infantry at -1 (so, the heavy artillery doesn't have a heavier support, just one that, let's say, "goes deeper").

    So, against, say, two infantries, you could have the dynamic that you could send, for example:

    • 2 light artilleries, to down both infantries by 1.
    • 2 heavy artilleries, to down only 1 infantry by 2 (if we go this way).
    • 3 heavy artilleries, to down 1 infantry by 2 and 1 infantry by 1.
    • 4 heavy artilleries (or more), to down both infantries by 2.
    • 2 light artilleries and 2 heavy artilleries, to down both infantries by 2.

    Here, then, the dynamic would likely be that, for some reasons, it would be more efficient having 2 light artilleries and 2 heavy artilleries, instead of 4 heavy artilleries. This may represent the heavy artillery focusing on doing what the light artillery cannot achieve, while the heavy artillery being overkill (thus inefficient) for what can be covered by the light artillery. A similar example could be done if you would have howitzers and cannons, where the howitzers would be as good as cannons, but having shorter range and being cheaper (so, it would be more efficient to use howitzers at the distances they can cover, and cannons only for covering beyond that, but you could use only cannons, instead).

    To consistently support this, it should be assured that, for the same type of supports, either the ones with the lowest count are applied first, or somehow the program backtracking the matter, so to apply support in the most efficient way (meaning that, for example, in the case we have 3 heavy artilleries and 1 light artillery downing 2 infantries, if we first apply the 3 heavy artilleries supports, to down 1 infantry by 2 and 1 infantry by 1, then we can still down the last infantry by an additional 1, with the light artillery, like we could have done if we applied the light artillery support first).

    Again, I'm just considering the matter now that it is coming out. I've no plans to use any of this, at the moment, but you never know.


  • Admin

    @Cernel Yeah, its an interesting example though fairly complex. I think I'm not going to go that far with this initial feature since as you point out it adds some complexity to the ordering that you would need to ensure applying supports of a bonusType that had different counts (in your example applying all light artillery before heavy artillery). I'd rather keep it simpler and address the original request around just allowing some mechanism for stacking and for now it will work at the bonusType level in terms of the count.


Log in to reply