Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
List of all members
dp88_AI_Turret Class Reference

Turret AI. More...

#include <dp88_customAI.h>

Additional Inherited Members

- Public Member Functions inherited from dp88_customAI
virtual void ResetAllActions (GameObject *obj)
 

Detailed Description

Author
Daniel Paul (danpa.nosp@m.ul88.nosp@m.@yaho.nosp@m.o.co.nosp@m..uk)

A custom designed turret AI code designed to allow maximum flexibility in implementation without needing multiple versions of effectively the same code to target different enemies (ie: VTOL vs. non-VTOL).

The turret AI uses a priority based system to 'intelligently' pick targets based upon a range of criteria such as the type of target, how far away it is, if it's already taken damage and how valuable it is. All of these criteria can be fine tuned in the script parameters to give you a high degree of control over which of several targets a turret will choose to shoot at. This also has the effect of making multiple, closely placed, turrets with the same targetting parameters concentrate their fire on a single target for maximum impact.

Parameters
Priority_InfantryBase targetting priority for infantry targets, or 0 to ignore infantry
Weapon_InfantryWeapon to use against infantry targets: 1 for primary fire, 2 for secondary fire
Splash_InfantryDetermines if we should try to damage infantry with splash instead of hitting them directly. This is useful for slow / inaccurate weapons which do splash damage: 1 to enable, 0 to disable
Priority_Light_VehicleBase targetting priority for light vehicle targets, or 0 to ignore light vehicles
Weapon_Light_VehicleWeapon to use against light vehicle targets: 1 for primary fire, 2 for secondary fire
Priority_Heavy_VehicleBase targetting priority for heavy vehicle targets, or 0 to ignore heavy vehicles
Weapon_Heavy_VehicleWeapon to use against heavy vehicle targets: 1 for primary fire, 2 for secondary fire
Priority_VTOLBase targetting priority for flying targets, or 0 to ignore flying targets
Weapon_VTOLWeapon to use against flying targets: 1 for primary fire, 2 for secondary fire
Min_Attack_RangeMinimum distance at which the turret can engage enemies when using primary fire
Max_Attack_RangeMaximum distance at which the turret can engage enemies when using primary fire
Min_Attack_Range_SecondaryMinimum distance at which the turret can engage enemies when using secondary fire
Max_Attack_Range_SecondaryMaximum distance at which the turret can engage enemies when using secondary fire
Modifier_DistancePriority modification to apply based on distance to target. Higher values will favour targets which are closer to the turret, good for less accurate weapons
Modifier_Target_DamagePriority modification to apply based on damage a target has already sustained. Higher values will favour targets which have already been damaged in combat, picking them off first
Modifier_Target_ValuePriority modification to apply based on the value of the target. Higher values will favour targets with a higher purchase cost, good for hard hitting weapons
Requires_PowerSpecify whether this turret requires base power to operate: 1 to require power, 0 to ignore
DebugSpecify whether to produce a debug logfile about the turrets targetting decisions, this is useful for fine tuning your base priorities and modifiers: 1 to enable, 0 to disable
Detects_StealthDetermine whether this turret can detect stealthed enemies or not: 1 to enable, 0 to disable
Note
Vehicles are always classified as light vehicles unless they have the dp88_AI_heavyVehicleMarker script attached to them

The turret can be disabled using custom messages, see the note about this in dp88_customAI
Warning
Never leave the Debug parameter enabled when releasing your mod, it will clog up everyones machines with useless text files everywhere... people usually don't like that :D