Add Ability For Suicide Units to Provide Support


  • Admin

    So I have an initial PR up to tackle this: https://github.com/triplea-game/triplea/pull/5871

    I still need to test this a lot. Are there any specific maps that would be good to test that have isSuicide units? I plan to test at least NML as that is the one map I know uses them and is popular.

    Beyond the initial design and updates I also tackled the following:

    Also once this is merged into the pre-release, I would greatly appreciate lots of testing especially around sub/destroyers and suicide units.


  • Moderators

    @redrum Then it might be opportune to refactor D1914NML removing the suicide trench hack, doing it properly with a "canNotTarget" on the gas, instead.


  • Admin

    Well, I can test the pre-release with Age of Tribes. There are some isSuicide units (ammunition units like mortars and rockets) and submarines. I guess you want me to test out if the build is making trouble for existing maps and current XMLs?

    Or are there special experiments and situations that should be tested out? If I did not play a few Age of Tribes games, then I would work on Warcraft: War Heroes. I always do this with the newest pre-release.


  • Admin

    @Cernel Yeah, though I'll probably test NML both ways as it sits and with the updates it should have.

    @Frostion Both. Existing maps are probably most important as I don't want to break things but also testing out the new properties and how you'd like to use them or even update existing maps would be helpful as well.

    Besides NML and Age of Tribes are there any other maps that use isSuicide units (especially anything in High or Good quality)?


  • Admin

    @redrum I would guess that the Japanese kamikaze planes in Iron War uses isSuicide 😉 But it is probably a not so complex usage. But I will take a look at them also.


  • Admin

    I tested NML and Iron War isSuicide units and things look good so hopefully can get this into the pre-release soon.


  • Moderators

    @redrum said in Add Ability For Suicide Units to Provide Support:

    This is very interesting especially for having things like "infantry" unable to hit things like "bombers" or things like "battleships" unable to hit things like "submarines". However, will those options generally work now, or still only for "first strike" attacks?


  • Admin

    @Cernel both first strike and standard.


  • Moderators

    Quite closely related to the changes at:
    https://github.com/triplea-game/triplea/pull/5871

    in the moment I can easily think many suicide units are going to be infrastructures, if you want them to suicide on attack only and not provide hitpoints in defence.

    A thing I just considered is the case of Rockets and ICBM and Gas. According to this bug report:
    https://github.com/triplea-game/triplea/issues/5834

    AA shots, as well as any first strikes and regular fire happen before any infrastructure units getting captured.

    So, for example in the case of D1914NML gas, it is substantially a bug that you need to send 1 non-infrastructure unit in attack, to have the gas actually attacking. What should happen is that the gas attacks alone, and, then, it doesn't matter that it would get captured, as it is already gone, because of being suicide.

    If the behaviour of not being able to send gas alone is wanted, a property or something should be added, to make it possible on a consistent way (as now the behaviour is just the byproduct of a wrong general implementation for infrastructure capture, as the moment in which they get captured).

    For CW1965, I think that the ICBM can be better represented by removing this thing of them firing on defence, making them defence 0 infrastructure units that suicides on attack only (again, for this to work, it is necessary that infrastructures fire before being captured, that means never being captured if they suicide).

    Of course, this would be a huge game change in favour of the Americans, as it removes the Russians first strike on the Americans ICBM (also making the game a lot less random, as that battle has a huge impact and can totally fail on a 1/6 AA shot).

    I would also completely remove from the AA guns the ability to hit any ICBM, anyways.

    CC: @Panther


  • Admin

    @Cernel While this is somewhat related, it would be better to start a different feature request around isInfra to discuss things like that to avoid cluttering up this thread. My general opinion is that isInfra should be broken into attack/defense just like isSuicide which I think would solve all those issues and allow things like missles gas to attack alone but make it so they do nothing on defense and would be destroyed or captured.


  • Admin

    @redrum is this feature now in the pre-release? If so, can you write a quick guide about what new unit options are available and how they work? Maybe give examples?

    I guess if it is to be implemented in a stable that some sort of description shall be made ready for the pact of steel 2 xml?

    I see in the GitHub issue that you mention isSuicideOnDefense, isSuicideOnAttack, canNotTarget and canNotBeTargetBy.


  • Admin

    @Frostion Yeah, its now in the pre-release. I added some of the descriptions in the first post of this thread but will add some additional detail and examples here in the next few days.


  • Admin

    @Frostion Here are some examples:

    Attack Suicide Support Unit
    Can provide support for the first round of battle and then suicides. It would act as just a regular unit with no attack/defense values on defense (wouldn't suicide).

                    <attachment name="unitAttachment" attachTo="suicideSupportUnit" javaClass="UnitAttachment" type="unitType">
                             <option name="movement" value="1"/>
                             <option name="attack" value="0"/>
                             <option name="defense" value="0"/>
                             <option name="isSuicideOnAttack" value="true"/>
                    </attachment>
    		<attachment name="supportAttachmentSuicideSupportUnit" attachTo="suicideSupportUnit" javaClass="UnitSupportAttachment" type="unitType">
    			<option name="unitType" value="infantry"/>
    			<option name="faction" value="allied"/>
    			<option name="side" value="offence"/>
    			<option name="dice" value="strength"/>
    			<option name="bonus" value="1"/>
    			<option name="number" value="10"/>
    			<option name="bonusType" value="magic"/>
    		</attachment>
    

    Iron War Nuke with Updated Properties
    Suicide on attack unit which fires during first strike but can't attack other nukes.

            <attachment name="unitAttachment" attachTo="Nuclear-Bomb" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                <option name="attack" value="5"/>
                <option name="attackRolls" value="10"/>
                <option name="movement" value="6"/>
                <option name="fuelFlatCost" value="Fuel" count="3"/>
                <option name="carrierCost" value="2"/>
                <option name="isAir" value="true"/>
                <option name="canAirBattle" value="true"/>
                <option name="airAttack" value="0"/>
                <option name="airDefense" value="0"/>
                <option name="isSuicideOnAttack" value="true"/>
                <option name="isFirstStrike" value="true"/>
                <option name="canNotTarget" value="Nuclear-Bomb"/>
                <option name="isStrategicBomber" value="true"/>
                <option name="bombingMaxDieSides" value="10"/>
            </attachment>
    

    POS2 XML PR: https://github.com/triplea-maps/the_pact_of_steel/pull/42


Log in to reply