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

Difference between revisions of "Movement"

From ModEnc
Jump to: navigation, search
m (Some cosmetic changes (ph33r the invincible mobile wall!))
(Rewrite in a more technically-correct wording style.)
Line 5: Line 5:
 
=== MovementZone ===
 
=== MovementZone ===
  
MovementZone says where is the unit allowed to go and helps the [[AI]]:
+
MovementZone says where is the unit allowed to go and helps the [[AI]] pathfinding routines:
  
Amphibious - ground and water. <br>
+
Amphibious - when pathfinding, the unit will consider both ground and water as passable. <br>
AmphibiousDestroyer - can go into water as well as ground. Can destroy infantry obstacles via weaponry. In RA2 this is tied to being an amphibious infantry while in TS it was for the ampibious APC.<br>
+
AmphibiousDestroyer - Same as above, additionally can destroy terrain obstacles. In RA2 this is tied to being an amphibious infantry while in TS it was for the ampibious APC.<br>
Crusher - ground only, can crush infantry, but not armed. <br>
+
Crusher - when pathfinding, only clear ground is considered passable. Also assumes that it can crush infantry, but is not armed.<sup>1</sup><br>
CrusherAll - ground only. Can crush any mobile object, as well as walls. <br>
+
CrusherAll - Same as above, additionally assumes that it can crush any mobile object, as well as walls. <sup>2</sup> <br>
Destroyer - ground, no water. Can destroy building obstacles and crush infantry. <br>
+
Destroyer - when pathfinding, considers ground passable. Can destroy terrain obstacles and crush infantry obstacles. <br>
Fly - fly anywhere. <br>
+
Fly - when pathfinding, it assumes everything passable.<br>
 
None - same as Fly. <br>
 
None - same as Fly. <br>
Infantry - only clear ground, no water. <br>
+
Infantry - when pathfinding, only clear ground is considered passable. <br>
InfantryDestroyer - only clear ground, no water. Can destroy obstacles. <br>
+
InfantryDestroyer - Same as above, but can destroy terrain obstacles such as trees. <br>
Normal - clear ground, no water. Can destroy trees and such obstacles. Can crush infantry. <br>
+
Normal - when pathfinding, considers clear ground passable. Assumes it can destroy terrain obstacles and crush infantry.<br>
Water - water only. <br>
+
Water - when pathfinding, considers only water as passable. <br>
 +
 
 +
Notes:<br>
 +
<sup>1</sup>: To actually crush infantry, it needs to be [[Crusher]]=yes. Infantry which has [[Crusher]]=no or [[DeployedCrushable]]=no (YR only, only works when deployed, obviously) set will not be crushable.<br>
 +
<sup>2</sup>: In order to actually crush vehicles, it needs to be [[OmniCrusher]]=yes. Objects which have [[OmniCrushResistant]]=yes will not be crushable.
  
 
=== SpeedType ===
 
=== SpeedType ===
Line 34: Line 38:
 
</tt>
 
</tt>
  
The numbers indicate at what percent of it's Speed= can the unit with a certain <tt>SpeedType=</tt> move over this [[terrain]]. You see that units with <tt>SpeedType=Hover</tt>, for instance, can move only up to half their normal <tt>Speed=</tt> over this [[terrain]]. You can use percent over 100, it'll work fine.
+
The numbers indicate at what percent of it's Speed= can the unit with a certain <tt>SpeedType=</tt> move over this [[terrain]]. You see that units with <tt>SpeedType=Hover</tt>, for instance, can move only up to half their normal <tt>Speed=</tt> over this [[terrain]]. You can use percent over 100, it'll work fine.<br>
 +
(The terrain type of a certain tile is set in the tile [[Tools#Terrain_editing|.tmp file]].)<br>
 
The [[terrain]] types are as follows:  
 
The [[terrain]] types are as follows:  
  
Line 50: Line 55:
 
Wall - duh, non-firestorm/non-laserfence walls.
 
Wall - duh, non-firestorm/non-laserfence walls.
  
 +
Notes:<br>
 
<sup>1</sup>
 
<sup>1</sup>
<tt>SpeedType=Track</tt> is not used by any object ingame. So you can either restore it for it's original purpose (tracked vehicles) to  provide certain variation against standard vehicles (the vehicle locomotor defaults to SpeedType=Wheel) (see also below), or use it for something entirely unrelated, like a class of vehicles that can't go over [[tiberium]] for whatever reason.
+
<tt>SpeedType=Track</tt> is not used by any object ingame. So you can either restore it for it's original purpose (tracked vehicles) to  provide certain variation against standard vehicles (the vehicle locomotor defaults to SpeedType=Wheel) (see also below), or use it for something entirely unrelated, like a class of vehicles that can't go over [[tiberium]] for whatever reason.<br>
 
 
 
<sup>2</sup>
 
<sup>2</sup>
 
You can make overlays which, when placed, transform the ground (technically) to any type mentioned above. To do that, use the Land=<terrain type name> tag on the overlay rules coding.
 
You can make overlays which, when placed, transform the ground (technically) to any type mentioned above. To do that, use the Land=<terrain type name> tag on the overlay rules coding.

Revision as of 16:26, 3 September 2005

Controlling Unit Movement Abilities

For example, Tanya can go into the water, so can seals. Other infantry can't. Some vehicles can also go over water, while other can't. It is not dependant on the locomotor, the MovementZone and SpeedType control this.

MovementZone

MovementZone says where is the unit allowed to go and helps the AI pathfinding routines:

Amphibious - when pathfinding, the unit will consider both ground and water as passable.
AmphibiousDestroyer - Same as above, additionally can destroy terrain obstacles. In RA2 this is tied to being an amphibious infantry while in TS it was for the ampibious APC.
Crusher - when pathfinding, only clear ground is considered passable. Also assumes that it can crush infantry, but is not armed.1
CrusherAll - Same as above, additionally assumes that it can crush any mobile object, as well as walls. 2
Destroyer - when pathfinding, considers ground passable. Can destroy terrain obstacles and crush infantry obstacles.
Fly - when pathfinding, it assumes everything passable.
None - same as Fly.
Infantry - when pathfinding, only clear ground is considered passable.
InfantryDestroyer - Same as above, but can destroy terrain obstacles such as trees.
Normal - when pathfinding, considers clear ground passable. Assumes it can destroy terrain obstacles and crush infantry.
Water - when pathfinding, considers only water as passable.

Notes:
1: To actually crush infantry, it needs to be Crusher=yes. Infantry which has Crusher=no or DeployedCrushable=no (YR only, only works when deployed, obviously) set will not be crushable.
2: In order to actually crush vehicles, it needs to be OmniCrusher=yes. Objects which have OmniCrushResistant=yes will not be crushable.

SpeedType

SpeedType defines the way units move over certain terrain types. Looking at the rules, we see that each terrain type (Clear, Rough, Road, Tiberium, Water, etc.) has it's own section. Let's look at one:
[Clear]
Foot=100%
Track=100%
Wheel=100% 1
Float=0%
Hover=50%
Amphibious=80%
FloatBeach=0%
Buildable=yes

The numbers indicate at what percent of it's Speed= can the unit with a certain SpeedType= move over this terrain. You see that units with SpeedType=Hover, for instance, can move only up to half their normal Speed= over this terrain. You can use percent over 100, it'll work fine.
(The terrain type of a certain tile is set in the tile .tmp file.)
The terrain types are as follows:

Clear - Clear ground, no obstacles.
Road - Dirt or paved roads.
Rough - Rougher terrain such as rocky areas or thick grass. In RA2, this defaults to the same settings as Clear
Rock - rocks, trees, cliffs, anything impassable.
Tiberium - areas covered in Ore/Gems/Tiberium.
Water - Water as in rivers or ocean areas.
Railroad - Train tracks (Works in TS, in RA2 requires Terrain Expansion (aka TX)).
Tunnel - Tunnel Entrance/Exit (Works in TS, in RA2 requires Terrain Expansion (aka TX)).
Beach - The line where water and ground join.
Weeds - Tiberium Veins (Works in TS, in RA2 it is not assigned to anything and can be used for new movement rules)
Ice - Water gone cold (Works in TS, in RA2 it is not assigned to anything and can be used for new movement rules)
Wall - duh, non-firestorm/non-laserfence walls.

Notes:
1 SpeedType=Track is not used by any object ingame. So you can either restore it for it's original purpose (tracked vehicles) to provide certain variation against standard vehicles (the vehicle locomotor defaults to SpeedType=Wheel) (see also below), or use it for something entirely unrelated, like a class of vehicles that can't go over tiberium for whatever reason.
2 You can make overlays which, when placed, transform the ground (technically) to any type mentioned above. To do that, use the Land=<terrain type name> tag on the overlay rules coding.

According to Allied General, Track was originally used for trains.

MovementRestrictedTo

Some units also are restricted to certain terrains, say trains are restricted to railroad, ships are restricted to water, and some spawned aircraft are restricted to water(it affects only their landing). You can restrict other units to some kind of terrain, say to roads only if you so desired. To do so, use MovementRestrictedTo= with one of terrain types described above - Clear, Rough, Road, Water, Tiberium, Rock, Beach...

Tracked vs Wheeled

[General]
TrackedUphill=1.0
TrackedDownhill=1.2
WheeledUphill=1.0
WheeledDownhill=1.2

These are multipliers to units' speed when climbing up/down hill.