Ahli / sc2xml

11 stars 1 forks source link

Mothership target/attack resets on movement/target designation (Phoenix similar) #142

Open Joshua-Leibold opened 7 months ago

Joshua-Leibold commented 7 months ago

Like the phoenix, the mothership attack target is recalculated based on distance every time it is issued a command, including a move command. The attack is also configured to fire while moving. This is a very bad combination for unit control as it makes designating a target and move commanding the unit (especially the mothership!) mutually exclusive. If one wishes to maintain a target lock, the mothership cannot be issued move commands without resetting the target. If one wishes to move the mothership, one cannot set a target that will be maintained without the mothership stopping movement. Other units can sometimes get around this by "stutter stepping", since the player dictates when a unit's attack first starts and can briefly stop the unit to target when the attack period is about to finish before resuming movement. However, because the attack fires itself and especially because the mothership cannot set a target for its new attack without pre-emptively cancelling the current attack's damage, this is very unreliable

Example of issue: https://gyazo.com/031b1e09753f1efc02ac31fe3ed7dc3f

Enable target-tracking on the weapon (designated target does not change upon move command):

<CWeaponLegacy id="MothershipBeam">
     <AcquirePrioritization value="ByDistanceFromTarget"/>
</CWeaponLegacy>

Adjust effects to allow current attack on current target to complete after a new target has been designated:

<CEffectCreatePersistent id="MothershipBeamPersistent">
     <Flags index="Channeled" value="0"/>
</CEffectCreatePersistent>

<CEffectCreatePersistent id="MothershipSecondaryBeamPersistent">
     <Flags index="Channeled" value="0"/>
</CEffectCreatePersistent>

Fix: https://gyazo.com/c670f5ed1d9fee5749f6adc87b344a68

While the attack cancelling portion is not an issue on the Phoenix, it is still unable to designate a target that will be maintained while moving. This is extremely unintuitive, to the point that when talking to players they will state that they believe the Phoenix already has target-designation

Example of issue: https://twitter.com/i/status/1694402388977668171

Allow designated target on Phoenix:

<CWeaponLegacy id="IonCannons">
        <AcquirePrioritization value="ByDistanceFromTarget"/>
    </CWeaponLegacy>

Fix: https://twitter.com/i/status/1694402392194695363