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

QuarryTypes: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Starkku (talk | contribs)
Add mention about script action 57 in RA2/YR using quarry type parameter
E1 Elite (talk | contribs)
m About target selection.
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
Quarry types are used as a parameter in at least three places:
Quarry types are used as a parameter in at least three places:
* [[TeamMissionTypes|Team mission]] (RA1) or [[ScriptActions|script action]] (TS to YR) type 0 ("Attack...") to instruct the team to attack specific kind of targets
* [[TeamMissionTypes|Team mission]] (RA1) or [[ScriptActions|script action]] (TS to YR) type 0 ("Attack...") to instruct the team to attack specific kind of targets
* [[ScriptActions|script action]] (RA2/ YR only) type 57 ("Chronoshift Task Force to a target type...") to have the team Chronoshifted to a specific kind of target if appropriate Superweapon is ready and charged.
* [[ScriptActions|Script action]] (RA2/ YR only) type 57 ("Chronoshift Task Force to a target type...") to have the team Chronoshifted to a specific kind of target if appropriate Superweapon is ready and charged.
* [[Actions_(maps)|Trigger action]] type 35 for special/super weapon targeting
* [[Actions_(maps)|Trigger action]] type 35 for special/super weapon targeting


Line 81: Line 81:
|1
|1
|QUARRY_ANYTHING
|QUARRY_ANYTHING
|Any enemy (vehicle/aircraft/infantry/building)
|Enemy object (vehicle/aircraft/infantry/building)
|-
|-
|2
|2
|QUARRY_BUILDINGS
|QUARRY_BUILDINGS
|Any enemy [[BuildingTypes|building]]
|Enemy [[BuildingTypes|building]]
|-
|-
|3
|3
|QUARRY_HARVESTERS
|QUARRY_HARVESTERS
|Any enemy [[Harvester|Harvester or Ore Miner]]
|Enemy [[Harvester|Harvester or Ore Miner]]
|-
|-
|4
|4
|QUARRY_INFANTRY
|QUARRY_INFANTRY
|Any enemy [[InfantryTypes|infantry]]
|Enemy [[InfantryTypes|infantry]]
|-
|-
|5
|5
|QUARRY_VEHICLES
|QUARRY_VEHICLES
|Any enemy [[VehicleTypes|ground vehicle]]
|Enemy [[VehicleTypes|ground vehicle]]
|-
|-
|6
|6
|QUARRY_FACTORIES
|QUARRY_FACTORIES
|Any enemy [[Factory|factory]]
|Enemy [[Factory|factory]]
|-
|-
|7
|7
|QUARRY_DEFENSE
|QUARRY_DEFENSE
|Any enemy [[IsBaseDefense|defense]] [[BuildingTypes|building]]
|Enemy [[IsBaseDefense|defense]] [[BuildingTypes|building]]
|-
|-
|8
|8
|QUARRY_THREAT
|QUARRY_THREAT
|Any enemy objects approaching (or already in) its base and which are in an attack mission
|Enemy objects approaching (or already in) its base and which are in an attack mission
|-
|-
|9
|9
|QUARRY_POWER
|QUARRY_POWER
|Any enemy [[Power|power facility]]
|Enemy [[Power|power facility]]
|-
|-
!colspan="3"|{{Ra2}} additions
!colspan="3"|{{Ra2}} additions
Line 119: Line 119:
|10
|10
|QUARRY_OCCUPIABLE{{fnl|2}}
|QUARRY_OCCUPIABLE{{fnl|2}}
|Any [[BuildingTypes|building]] that [[CanBeOccupied|can be occupied]]
|[[BuildingTypes|Building]] that [[CanBeOccupied|can be occupied]]
|-
|-
|11
|11
|QUARRY_TECH{{fnl|2}}
|QUARRY_TECH{{fnl|2}}
|Any [[NeedsEngineer|tech building]]
|[[NeedsEngineer|Tech building]]
|}
|}
Target selection is based on the scan range defined by [[TargetDistanceCoefficientDefault]] or its [[TechnoTypes|technotype]] override of [[TargetDistanceCoefficient]]. If targets are available within that range, then closest of those is selected. If no targets are available within that range, then first built by that enemy is selected.


== Notes ==
== Notes ==

Latest revision as of 15:26, 17 June 2023

There are various target types that teams and special weapons can be assigned to attack. These are general target categories since the actual disposition of potential targets cannot be precisely predicted -- thus these serve as guidelines for the computer AI.
Red Alert source

Quarry1 types is a feature first introduced in Red Alert. As explained by the above comment in the game's source code, they are used to specify general target categories for AI teams and special weapons (super weapons in later games).

Usage

Quarry types are used as a parameter in at least three places:

  • Team mission (RA1) or script action (TS to YR) type 0 ("Attack...") to instruct the team to attack specific kind of targets
  • Script action (RA2/ YR only) type 57 ("Chronoshift Task Force to a target type...") to have the team Chronoshifted to a specific kind of target if appropriate Superweapon is ready and charged.
  • Trigger action type 35 for special/super weapon targeting

Available QuarryTypes

Red Alert

Index QuarryType Description
0 QUARRY_NONE None or invalid, cancels attack mission
1 QUARRY_ANYTHING Any enemy building or unit (same as "hunt")
2 QUARRY_BUILDINGS Any enemy building
3 QUARRY_HARVESTERS Any enemy Ore Miner
4 QUARRY_INFANTRY Any enemy infantry
5 QUARRY_VEHICLES Any enemy ground vehicle
6 QUARRY_VESSELS Any enemy ship
7 QUARRY_FACTORIES Any enemy factory
8 QUARRY_DEFENSE Any enemy defense building
9 QUARRY_THREAT Any enemy objects approaching (or already in) its base and which are in an attack mission
10 QUARRY_POWER Any enemy power facility
11 QUARRY_FAKES Any enemy fake building

Tiberian Sun to Yuri's Revenge

Index QuarryType Description
0 QUARRY_NONE None or invalid, cancels attack mission
1 QUARRY_ANYTHING Enemy object (vehicle/aircraft/infantry/building)
2 QUARRY_BUILDINGS Enemy building
3 QUARRY_HARVESTERS Enemy Harvester or Ore Miner
4 QUARRY_INFANTRY Enemy infantry
5 QUARRY_VEHICLES Enemy ground vehicle
6 QUARRY_FACTORIES Enemy factory
7 QUARRY_DEFENSE Enemy defense building
8 QUARRY_THREAT Enemy objects approaching (or already in) its base and which are in an attack mission
9 QUARRY_POWER Enemy power facility
Red Alert 2 additions
10 QUARRY_OCCUPIABLE2 Building that can be occupied
11 QUARRY_TECH2 Tech building

Target selection is based on the scan range defined by TargetDistanceCoefficientDefault or its technotype override of TargetDistanceCoefficient. If targets are available within that range, then closest of those is selected. If no targets are available within that range, then first built by that enemy is selected.

Notes

  • 1 In this context, quarry means prey, not a mine.

  • 2 Presumed internal name.