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

MovementZone: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Nighthawk200 (talk | contribs)
Subterranean was missing from this list.
DeathFish (talk | contribs)
mNo edit summary
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{flag|name=MovementZone|files=rules(md).ini|values=special strings|default=<tt>Normal</tt>|types=[[InfantryTypes]], [[VehicleTypes]], [[AircraftTypes]], [[BuildingTypes]] (to the same extent as [[Locomotor]]s do) |ts=yes|fs=yes|ets=yes|ra2=yes|yr=yes|rp=yes}}
{{flag|name=MovementZone|files=rules(md).ini|values=special strings|default=<tt>Normal</tt>|types=[[InfantryTypes]], [[VehicleTypes]], [[AircraftTypes]], [[BuildingTypes]] (to the same extent as [[Locomotor]]s do) |ts=yes|fs=yes|ets=yes|ra2=yes|yr=yes|rp=yes}}
MovementZone says where the unit is allowed to go and helps the [[AI]] pathfinding routines. The possible values it takes are:
{| align="center" cellpadding="6" class="wikitable table_descrowdesccol"
!''MovementZone''
!''Description''
|-
!Amphibious
|When pathfinding, the unit will consider both ground and water as passable.
This is the only MovementZone that allows amphibious units, like Hover Craft and Robot Tanks or even the TS GDI APC, to dock with all {{f|UnitRepair|yes|link}} buildings for repairs, regardless if it's land-based Service Depot or a water-based Naval Yard.


MovementZone says where is the unit allowed to go and helps the [[AI]] pathfinding routines. The possible values it takes are:
Otherwise the unit will stick with land-based OR water-based, never both.
|-
!AmphibiousCrusher
|When pathfinding, the unit will consider both ground and water as passable. In addition, it will assume that it is capable of crushing infantry, but is unarmed.<sup>[[#Notes|1]]</sup>
|-
!AmphibiousDestroyer
|Same as '''AmphibiousCrusher''', additionally can destroy terrain obstacles. In RA2 this is tied to being an amphibious infantry.
|-
!Crusher
|When pathfinding, only clear ground is considered passable. Also assumes that it can crush infantry, but is not armed.<sup>[[#Notes|1]]</sup>
Units with Subterranean [[Locomotor]] and Crusher MovementZone will only dig in if there are 11 tiles between unit destination. Those tiles were Clear tiles.
|-
!CrusherAll{{yro}}
|Same as '''Crusher''', additionally assumes that it can crush any mobile object, as well as walls.<sup>[[#Notes|2]]</sup>
|-
!Destroyer
|When pathfinding, considers ground passable. Can destroy terrain obstacles and crush infantry obstacles.
|-
!Fly
|When pathfinding, it assumes everything passable.
|-
!Infantry
|When pathfinding, only clear ground is considered passable.
|-
!InfantryDestroyer
|Same as '''Infantry''', but can destroy terrain obstacles such as trees.
|-
!Normal
|When pathfinding, considers clear ground passable. Assumes it can destroy terrain obstacles and crush infantry.
|-
!Subterannean<sup>[[#Notes|3]]</sup>
|When pathfinding, considers clear ground passable. When destination is too far away for surface travel, or there is an obstacle in the way, unit will dig underground. In other cases, when subterranean travel is not possible, or surface travel is quicker, acts like a unit with {{f|MovementZone|Crusher}} or {{f|MovementZone|Destroyer}}.
This MovementZone is what allows units with Subterranean [[Locomotor]] to dig in if target location and/or origin location can't be dug into courtesy of {{f|AllowBurrowing|no|link}} on the [[TileSets]] and make unit look for the closest cells to dig into and/or out of.
If a different {{f|MovementZone}} is set the unit will only dig if both origin and target locations can be dug into; else it'll drive and only re-consider digging after a complete and absolute stop and ''then'' giving a new order manually. If persuaded to get underground then given a new order it'll try going to new target location, and if it can't dig out of it it'll look for closest exit only after it reaches/gets directly below the target.
|-
!Water
|When pathfinding, considers only water as passable.
|-
!WaterBeach
| ???
|-
|}


* <tt>Amphibious</tt> - when pathfinding, the unit will consider both ground and water as passable.
=== Notes ===
* <tt>AmphibiousDestroyer</tt> - 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.
[[SpeedType]] is what actually allows or disallows a unit to move over [[LandTypes|specific terrain]].
* <tt>Crusher</tt> - when pathfinding, only clear ground is considered passable. Also assumes that it can crush infantry, but is not armed.<sup>[[#Notes|1]]</sup>
 
* <tt>CrusherAll</tt> - Same as above, additionally assumes that it can crush any mobile object, as well as walls. <sup>[[#Notes|2]]</sup>
<sup>1</sup>: To actually crush infantry, it needs to be {{f|Crusher|yes|link}}. Infantry which has {{f|Crushable|no|link}} or {{f|DeployedCrushable|no|link}} ([[YR]] only, only works when deployed, obviously) set will not be crushable.
* <tt>Destroyer</tt> - when pathfinding, considers ground passable. Can destroy terrain obstacles and crush infantry obstacles.
 
* <tt>Fly</tt> - when pathfinding, it assumes everything passable.
<sup>2</sup>: In order to actually crush vehicles, it needs to be {{f|OmniCrusher|yes|link}}. Objects which have {{f|OmniCrushResistant|yes|link}} will not be crushable.
* <tt>Infantry</tt> - when pathfinding, only clear ground is considered passable.
* <tt>InfantryDestroyer</tt> - Same as above, but can destroy terrain obstacles such as trees.
* <tt>Normal</tt> - when pathfinding, considers clear ground passable. Assumes it can destroy terrain obstacles and crush infantry.
* <tt>Subterranean</tt> - when pathfinding, considers clear ground passable. When destination is too far away for surface travel, or there is an obstacle in the way, unit will dig underground. Unit cannot dig on pavement. In other cases, when subterranean travel is not possible, or surface travel is quicker, acts like a unit with MovementZone=Crusher or MovementZone=Destroyer.
* <tt>Water</tt> - when pathfinding, considers only water as passable.


=== Notes ===
<sup>3</sup>: With a typo, no less. ''Subter'''r'''annean'' will '''not''' work.
<sup>1</sup>: To actually crush infantry, it needs to be [[Crusher]]=yes. Infantry which has [[Crushable]]=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.


[[Category:INI Flags]]
[[Category:INI Flags]]

Latest revision as of 05:51, 2 January 2023

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: MovementZone
File(s): rules(md).ini
Values: special strings
Default: Normal
Applicable to: InfantryTypes, VehicleTypes, AircraftTypes, BuildingTypes (to the same extent as Locomotors do)


MovementZone says where the unit is allowed to go and helps the AI pathfinding routines. The possible values it takes are:

MovementZone Description
Amphibious When pathfinding, the unit will consider both ground and water as passable.

This is the only MovementZone that allows amphibious units, like Hover Craft and Robot Tanks or even the TS GDI APC, to dock with all UnitRepair=yes buildings for repairs, regardless if it's land-based Service Depot or a water-based Naval Yard.

Otherwise the unit will stick with land-based OR water-based, never both.

AmphibiousCrusher When pathfinding, the unit will consider both ground and water as passable. In addition, it will assume that it is capable of crushing infantry, but is unarmed.1
AmphibiousDestroyer Same as AmphibiousCrusher, additionally can destroy terrain obstacles. In RA2 this is tied to being an amphibious infantry.
Crusher When pathfinding, only clear ground is considered passable. Also assumes that it can crush infantry, but is not armed.1

Units with Subterranean Locomotor and Crusher MovementZone will only dig in if there are 11 tiles between unit destination. Those tiles were Clear tiles.

CrusherAll Same as Crusher, 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.
Infantry When pathfinding, only clear ground is considered passable.
InfantryDestroyer Same as Infantry, but can destroy terrain obstacles such as trees.
Normal When pathfinding, considers clear ground passable. Assumes it can destroy terrain obstacles and crush infantry.
Subterannean3 When pathfinding, considers clear ground passable. When destination is too far away for surface travel, or there is an obstacle in the way, unit will dig underground. In other cases, when subterranean travel is not possible, or surface travel is quicker, acts like a unit with MovementZone=Crusher or MovementZone=Destroyer.

This MovementZone is what allows units with Subterranean Locomotor to dig in if target location and/or origin location can't be dug into courtesy of AllowBurrowing=no on the TileSets and make unit look for the closest cells to dig into and/or out of. If a different MovementZone is set the unit will only dig if both origin and target locations can be dug into; else it'll drive and only re-consider digging after a complete and absolute stop and then giving a new order manually. If persuaded to get underground then given a new order it'll try going to new target location, and if it can't dig out of it it'll look for closest exit only after it reaches/gets directly below the target.

Water When pathfinding, considers only water as passable.
WaterBeach ???

Notes

SpeedType is what actually allows or disallows a unit to move over specific terrain.

1: To actually crush infantry, it needs to be Crusher=yes. Infantry which has Crushable=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.

3: With a typo, no less. Subterrannean will not work.