ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Locomotor

From ModEnc
(Redirected from Locomotors)
Jump to navigation Jump to search
Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: Locomotor
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: CLSID, see below)
Default: teleport
Applicable to: TechnoTypes:

AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes, Warheads



Locomotors handle the unit's movement and ensure the correct images are displayed in correct situations(walking, turning, firing, ...).

If you give the unit an invalid locomotor value or omit the Locomotor tag entirely, the unit will default to using the Teleport (Chrono) locomotor.


This flag on warheads with IsLocomotor=yes indicates the Locomotor that will be assigned to target units. For details, refer to the IsLocomotor entry.

Available Locomotor CLSIDs

There are the following available types:
Alias CLSID
#Levitate {3DC0B295-6546-11D3-80B0-00902792494C}
#Drive {4A582741-9839-11d1-B709-00A024DDAFD1}
#Hover {4A582742-9839-11d1-B709-00A024DDAFD1}
#Tunnel {4A582743-9839-11d1-B709-00A024DDAFD1}
#Walk {4A582744-9839-11d1-B709-00A024DDAFD1}
#DropPod {4A582745-9839-11d1-B709-00A024DDAFD1}
#Fly {4A582746-9839-11d1-B709-00A024DDAFD1}
#Teleport {4A582747-9839-11d1-B709-00A024DDAFD1}
#Mech {55D141B8-DB94-11d1-AC98-006008055BB5}
#Ship {2BEA74E1-7CCA-11d3-BE14-00104B62A16C}
#Jumpjet {92612C46-F71F-11d1-AC9F-006008055BB5}
#Rocket {B7B49766-E576-11d3-9BD9-00104B972FE8}
A list of all locomotors and their purposes follows:
Alias CLSID default SpeedType value[1]
Levitate {3DC0B295-6546-11D3-80B0-00902792494C} Hover(?)
Levitate locomotor. Only available in Firestorm.
  • Used by VehicleTypes, has several hardcoded features:
    • The unit will periodically move in a random direction unless given a specific movement or attack command, similar to Visceroids.
    • The unit will move like a jellyfish[2] or squid, propelling itself forward while expelling gas in the form of a particle system of the type[GasPuffSys].
    • ROF, Speed and Range of the unit's weapon(s) are ignored. The unit will attempt to hug the target and if successful, deals the weapon's Damage every few seconds. It will also attack any enemies that happen on its path while simultaneously moving towards the main target.
Drive {4A582741-9839-11d1-B709-00A024DDAFD1} if Crusher=yesTrack, else → Wheel.
Drive locomotor. Used by ground-based VehicleTypes.
  • If used by InfantryTypes and with a very low Speed set, they will stop directly upon approaching the target cell for the first time and will never complete the movement action, nor can this action be overridden with new commands.
Hover {4A582742-9839-11d1-B709-00A024DDAFD1} Hover
Hover locomotor. Used by hovering VehicleTypes (e.g. Hover MLRS, Robot Tank).
  • The relevant parameters are defined in the hover vehicle characteristics section under the global [General] settings.
  • In Red Alert 2, this Locomotor should not be used for fast (Speed=31 or higher) vehicles, as the movement trajectory will become highly erratic, making it difficult to reach the destination and also challenging to be hit by incoming Arcing type projectiles.
  • This Locomotor should also not be used on IsTrain=yes vehicles; Hover Train locomotives can't crush Hover Train compartments, and they can't turn properly on corners without stopping and breaking the illusion of train-like behavior.
  • Can be disabled by PoweredUnit/EMP/ion storm in Tiberian Sun and forced to the ground.
    • If over water, they will sink.
  • If SpeedType≠Hover then although passengers can be normally released by pressing the D key, the cursor will always display the NoDeploy style.
    • Unless you use statements like IsSimpleDeployer=yes to play hardcode overriding hardcode, but this will also introduce other features.
  • Unit Speed is approximately 35% slower on hover locomotor than on drive locomotor.
Bugs/Side-Effects/Unexpected Limitations

  • Ares introduced a bug where units in this movement mode sometimes get stuck in deployment and continuously play movement sound effects when IsSimpleDeployer=yes and DeployToLand=yes.
    • Starting from Phobos Build#44 this bug has been fixed.
Tunnel {4A582743-9839-11d1-B709-00A024DDAFD1} same to Drive, not Underground![3]
Tunnel locomotor. Used by burrowing VehicleTypes.
  • The relevant parameters are defined in the subterrainean vehicle characteristics section under the global [General] settings. (Only one TunnelSpeed=int)
  • When the number of cells between the unit and the farthest AllowBurrowing=no cell before the target cell exceeds 11, the unit will switch to burrowing mode. Otherwise, its behavior is basically the same as Locomotor=Drive.
Bugs/Side-Effects/Unexpected Limitations

  • Tunnel Locomotor units had incorrect shadow rendering positions.
    • Starting from Phobos Build#44 this bug has been fixed.
  • Subterranean horizontal movement altitude is hard-coded at -256.
    • Customizable in Phobos Build#44.
  • Infantry and aircraft will directly use the Tunnel method to move regardless of distance, and ignore the AllowBurrowing=no restriction.
    • Due to the operational mechanism here, coupled with the side effect introduced by the Phobos extension in DevBuild#44 which causes an infantry burrowing bug, InfantryTypes with Locomotor=Tunnel will crash immediately upon moving - they have no choice..
  • Subterranean horizontal movement speed is hard-coded at 19.
    • Customizable in Phobos Build#45.
Walk {4A582744-9839-11d1-B709-00A024DDAFD1} same to Drive
Walk locomotor. Used by ground-based InfantryTypes.
  • Only when the distance between the current location and the target location is less than 17 leptons, it is considered as arrived, this Locomotor should not be used for fast (Speed=14 or higher) infantry.[4]
  • The image in water is determined by the Sequence parameter.
  • Infantry in mid-air always use infshdw.shp to render shadows directly below them.
  • If deployed via DropPod, pod.shp will be attached to the unit's image while airborne.
  • Infantry using this movement pattern tend to intermittently attempt moving two steps due south/north before readjusting direction when moving southwest/northeast at insufficient Speed.
DropPod {4A582745-9839-11d1-B709-00A024DDAFD1} Hover(?)(indifferent)
Drop Pod locomotor (referred to as ballistic locomotor in locos.tlb). Used by falling objects and Drop Pods.
  • The relevant parameters are defined in the droppod flight characteristics section under the global [General] settings.
  • DropPod is actually a temporary movement mode.
    • For example, units deployed by super weapons with Type=DropPod will use this movement mode before landing, but will clear it after landing and switch back to their original movement mode.
      • Therefore, in Yuri's Revenge, it is completely feasible to assign the DropPod Locomotor to targets through IsLocomotor=yes warheads.
        • However, Phobos Build#? broke this functionality, causing guaranteed Fatal Errors when used.
    • Correspondingly, if a unit directly writes Locomotor=DropPod, it will immediately lose the basic attribute of movement mode when on the ground, and then enjoy the "delight" of Internal Errors.
Fly[5] {4A582746-9839-11d1-B709-00A024DDAFD1} Winged
Fly locomotor. Used by AircraftTypes.
  • If used by VehicleTypes
    • If produced by a War Factory with WeaponsFactory=yes, it will get stuck at the entrance.
    • Even for voxel-based vehicles, their shadows will render on the unit itself rather than the ground directly below.
    • Cannot properly use deployment functions and cannot serve as an ore hauler.
    • When attacking targets beyond the [Weapon]Range=float setting while currently airborne, it will not approach the target.
  • On the other hand, such vehicles also have some unique functions that can potentially be turned to an advantage over AircraftTypes:
    • They are not forced to return to a docking structure after finishing a move or attack order and can circle an area indefinitely.
    • Combined with their ability to passively engage enemy units in the same manner as ground units (but contrary to aircraft, which only attack targets explicitly given to them), they can thus be used as "patrols".
    • Flying VehicleTypes are also able to engage other aerial targets, making them useful to simulate fighter aircraft, although this feature has lost its relative advantage through the addition of air-to-air combat by AircraftTypes in Ares.
    • Since the body of a aircraft is a turret, if TurretSpins=yes is added, the body of the vehicle will rotate like the turret.
  • Although such objects are always in the air and are not affected by the terrain on the ground, the program is hard-coded to pathfind as if they had SpeedType=Track and MovementZone=Normal.
    • This is the reason that affects their movement when you select a fighter jet and click on the water in the original game.
  • Sling-loading behavior can only be performed when the aircraft is in this Locomotor, and ince sling-load statements are limited to AircraftType, the original [HIND]} in the game cannot be used.
  • This Locomotor is not recommended for infantry types and is highly unstable.
  • Units will be instantly destroyed when encountering ion storm from Tiberian Sun while airborne.
  • The climb rate of fly locomotor is hard-coded; refer to FlightLevel.
  • Units using this Locomotor without IsDropship=yes set have a hard-coded bobbing effect during movement.
Teleport {4A582747-9839-11d1-B709-00A024DDAFD1} same to Drive
Teleport locomotor. Used by teleporting TechnoTypes, and it is used as the default value.
  • The relevant parameters are defined in the Reinforcement/Chrono Stuff section under the global [General] settings.
    • The animation during movement is defined by [General]WarpOut=Animation.
      • [General]WarpIn=Animation was originally intended to define the "warping in" animation for chrono movement, but was eventually deprecated. Both arrival and departure animations now use the above setting.
        • As of Phobos Build#12, this feature has been restored. However, since an animation with an incorrect palette was previously used here, you may need to manually set it to WARPOUT.
    • [General]ChronoSparkle1=Animation defines the immobilized animation after chrono movement.
  • If a vehicle has Teleporter=yes, it will normally use Drive Locomotor, and only use Teleport movement mode when moving to buildings specified in its Dock=List of BuildingTypes. (e.g. original [CMIN])
    • Parasitic units will be kicked during Teleport movement.
  • Vehicles produced from War Factories will first use Drive Locomotor to reach rally points before initiating Teleport movement.
    • Vehicles produced from Naval=yes War Factories will chronoshift directly to rally points.
  • The chrono movement mode originally had a blue version of the movement cursor, but it was ultimately unused and abandoned in mouse.sha. Ares repurposed it as the carryall cursor.
Mech {55D141B8-DB94-11d1-AC98-006008055BB5} same to Drive
Mech locomotor. Used by walker-like VehicleTypes, such as Mammoth Mk.II in Tiberian Sun.
  • Only when the distance between the current location and the target location is less than 16 leptons, this Locomotor should not be used for fast (Speed=14 or higher) vehicles.[4]
  • The program hard-codes units to change their facing direction once after passing a fixed [distance/speed] threshold, originally used in Tiberian Sun for the Mammoth MK.II's walking shake effect. (In many cases, simply using Drive is more practical, like Terror Drone.)
    • There's a minor visual bug related to the wobble, in that it changes the movement trajectory of the unit when moving in certain directions. See this example. This bug is more pronounced on very low unit speeds.In addition, this is a hard coded behavior. Even if it uses voxels, it will be displayed See this example. In other words, if the number of SHP vehicle surfaces is small enough, this problem is completely invisible.
  • Ignores acceleration. The unit will accelerate and decelerate instantly.
  • Units with this locomotor are hardcoded not to tilt, even include sink.
    • So you can use this Locomotor to make the ship sink vertically when sinking instead of having a tilting process first.
      • For large ships, since they cannot break into two sections, vertical sinking might be more reasonable.
  • Unit Speed is approximately 40% slower on mech locomotor than on drive locomotor.
Ship {2BEA74E1-7CCA-11d3-BE14-00104B62A16C} Float
Used by ships. Just same to Drive, but AI recognition requires this.
  • Once thought to cause them to "tilt" when destroyed, but that is false. Any VehicleType can be made to sink if it weighs more than [General]ShipSinkingWeight=float, no matter what Locomotor it uses. Even the Amphibious Transports using Hover Locomotor will "tilt"/sink if they weigh enough.
Bugs/Side-Effects/Unexpected Limitations

Jumpjet {92612C46-F71F-11d1-AC9F-006008055BB5} Hover
Jump jet locomotor. Used by Jumpjet VehicleTypes and InfantryTypes.
  • For InfantryTypes, movement grid checks are hard-coded to treat them as SpeedType=Hover. Therefore, infantry with Locomotor=Jumpjet cannot stay on buildings or cliffs.
  • If applied to a vehicle,
    • In Tiberian Sun, this makes such a vehicle immune to direct-hit damage when in the air (although line damage from railguns still seems to damage such vehicles).
  • If applied to an aircraft,
    • When such an aircraft is destroyed, it will not explode or crash, but instead slowly drift to the ground and "land". In this state, it can be selected, whereupon its HP bar will show one remaining red pip, and issued orders by its owner (both of which will be acknowledged with the normal audio responses), but the colored line drawn between a unit and the target of a command (green for movement, red for attack) will not be drawn, and it will not act upon any commands given to it. It can be moved through by other units and while it can be targeted, units given attack orders on it will never move into range, or attack it.
      • If only considering death by attack, simply using [TechnoType]Crashable=no can resolve the issue. Ares 0.4 has extended this to AircraftTypes.
        • However, there is hard-coded logic that ignores this setting in ammunition depletion scenarios. This can only be avoided by setting Ammo=-1 or ensuring destruction (NoAmmoWeapon=2 .etc} before firing the last round.
  • In some original game files, the second "J" in Jumpjet... flags may have incorrect capitalization, causing them to read global default values instead. However, if you change the flag to the correct spelling, you will find that those original values will introduce various functional issues~~
  • Units will immediately attempt to ascend upon spawning without waiting for orders, but only when at least one of Jumpjet or BalloonHover is set to yes.
    • This feature can be combined with Teleporter=yes to create Drive Locomotor units that move slightly after spawning.
      • For example, using Ares' Deliver super weapon with a drop pod landing animation to simulate orbital deployment could leverage this feature to make internal vehicle units immediately exit the drop zone after landing.
Notes

If an InfantryType with Locomotor=Jumpjet has JumpJet=yes, and does not have HoverAttack=yes[6], then it will behave like the Jumpjet Infantry in Tiberian Sun, using Walk as Locomotor to move on the ground when the distance to the target point is less than or equal to 3 cells.

Bugs/Side-Effects/Unexpected Limitations

  • For harvester units, this causes them to not automatically mine after leaving the Factory. Additionally, while one harvester is docking to a Refinery, another Harvester can still be manually ordered to dock, resulting in both units overlapping on the Refinery's docking cell and causing a crash.
    • Starting from Phobos Build#48 this bug has been fixed.
Rocket {B7B49766-E576-11d3-9BD9-00104B972FE8} Winged
Used by Spawned Missiles (V3, Dreadnought, Boomer).
  • Giving this to a buildable item from AircraftTypes will turn it into such a missile, and once targeted, it won't accept other orders, and hit the target kamikaze-style.
  • Vehicles can of course be used, but the result of movement is that it will kiss the ground with its face.
    • Ares has corrupted this behavior, causing the vehicle class to immediately trigger a Fatal Error whenever this movement mode is used.
Bugs/Side-Effects/Unexpected Limitations

Notes

Although the rules' comment about Locomotors specifically uses "objects" instead of "units", and there is a default of "statue" that probably applies to BuildingTypes, setting a Locomotor on buildings does not seem to have any effect (positive or negative) whatsoever. Furthermore, the Guide's first sentence about Locomotors is "Should not be used on BuildingTypes". This, however, suggests something does happen. Either way it is assumed that Locomotors are parsed and valid on BuildingTypes, but simply do not have any effect. For the sake of the game's sanity, one should not set them.

For units with Locomotor=Teleport|Tunnel|Fly, their inability to tilt properly has been fixed in the Phobos engine.

Units registered under the name [COW] will always move randomly regardless of their Locomotor mode, with no type restrictions.

  • Ares 0.1 has allowed free customization of this effect.

Units registered under the name [DESO] are forced to determine weapon deployment based on the radiation residue level beneath them.

  • Ares... Ares attempted to allow free customization.

Footnotes

  1. InfantryType always defaults to SpeedType=Foot regardless of what Locomotor=CLSID is set to.
  2. This locomotor works in conjunction with the flag Jellyfish; the unit must have this flag enabled for some of these features to work properly. In addition, movement and behavior controls found in the section [LEVITATION] apply.
  3. In some old tutorials, there was a misleading default setting of SpeedType=Underground, which originated from an error in DeeZire's The Guide. But there is never an available value for SpeedType called Underground, this was likely caused when he reverse-engineered the program code and mistakenly took the available values from the nearby Layer statement as belonging to SpeedType.
  4. 4.0 4.1 Indeed, values such as 20 and 21 are also available, but the vast majority of larger numbers starting from 14 are not available or can only be moved in a "continuous multiple teleportation" manner in a specific direction.
    • Only a very few number of values are work as normal as 1 to 13. However, when testing 8 directions performance every Speed=1 to 100 one by one, their arrangement is almost random.
      • Therefore, unless you are willing to waste time testing and summarizing the algorithm one by one, you only need to remember that Speed13 is normal.
    • Has been dehardcoded in Phobos Build #44.
  5. AircraftTypes has a 10% chance per frame when at yellow health and an 80% chance per frame when at red health to generate an animation named SGRYSMK1 as a damaged smoke effect, independent of the Locomotor.
  6. Which would cause the InfantryType to always use Jumpjet as Locomotor, even when it is not attempting to Attack. Also, it is best not to add BalloonHover=yes, otherwise this infantry, once it takes off, will be unable to return to the ground except by falling

References

In Yuri's Revenge, using Phobos, it is now possible to write locomotor aliases instead of their CLSIDs in the Locomotor flag value.

Ares Documentation/Dig Animation and Sound

See Also