AmphSpeed

Current Method

On unit creation, AmphSpeed() (of amphspeed.h) notes the unit's base MAX_SPEED. It set the unit's MAX_SPEED to twice the base if it sees the unit is underwater, every 30ms, to counteract the engine's hard-coded behavior, and to the base speed if the unit is on land. Applying the script to a unit takes the header plus two lines in the unit's script. See the comments in amphspeed.h for details.

Previous Method

The previous method was to use !SetSFXOccupy() to set the speed of the unit to [1] while on land, and [maxVelocity] while in the water. 1 Scriptor unit, using the default conversion, is equal to 2.5 elmos, the elmo being the distance unit used in the maxVelocity tags. Thus, this method really resulted in all amphibious units' land speeds effectively being set to 2.5, regardless of their maxVelocity tag, and their underwater speed being set to 25% faster than their maxVelocity (times 2.5 due to the default Scriptor conversion, and divided by 2 from the engine's hard-coded underwater behavior). In terms of balance:

  • Formerly slow amphs got an effective speed boost to 2.5.
  • Amphs moved faster in water than they did on land before the change.