Difference between revisions of "Messages"

From Elite Wiki
m (Links: fixed link)
(Game defined states and messages: more detail on how AI's process messages)
Line 1: Line 1:
 
== Game defined states and messages ==
 
== Game defined states and messages ==
When an AI [[state machine]] is started it is always put into the state GLOBAL, and the ENTER message will be sent.
+
When an AI [[state machine]] is started it is always put into the state GLOBAL, and it will be sent an ''ENTER'' message.
   
The following table describes each '''message''' the game engine may send to an AI state machine.
+
The following table describes some of the '''message'''s the game engine might send to an AI state machine.
  +
  +
AI's might be passed these message as a matter of routine, in which case the AI will wait until its next cycle before reacting, or it might be asked to react to the given message immediately.
  +
  +
When an AI reacts to a message it examines the state it is currently in: if the state has an entry for a given message it responds by performing the corresponding list of actions, if it has no corresponding entry the message is discarded and ignored.
   
These '''messages''' may be sent while processing commands executed by the AI state machine, or while the AI's controlled entity is performing it's current task.
 
   
 
ACCEPT_DISTRESS_CALL
 
ACCEPT_DISTRESS_CALL
Line 88: Line 87:
 
WAYPOINT_SET
 
WAYPOINT_SET
 
YELLOW_ALERT
 
YELLOW_ALERT
// Hostile craft in scannerrange.
+
// Hostile craft in scannerrange.
   
 
== Notes ==
 
== Notes ==

Revision as of 18:26, 23 January 2006

Game defined states and messages

When an AI state machine is started it is always put into the state GLOBAL, and it will be sent an ENTER message.

The following table describes some of the messages the game engine might send to an AI state machine.

AI's might be passed these message as a matter of routine, in which case the AI will wait until its next cycle before reacting, or it might be asked to react to the given message immediately.

When an AI reacts to a message it examines the state it is currently in: if the state has an entry for a given message it responds by performing the corresponding list of actions, if it has no corresponding entry the message is discarded and ignored.


ACCEPT_DISTRESS_CALL 
AEGIS_CLOSE_TO_PLANET
AEGIS_IN_DOCKING_RANGE
AEGIS_LEAVING_DOCKING_RANGE
AEGIS_NONE
APPROACH_COORDINATES
APPROACH_START
APPROACH_STATION
ATTACKED
CARGO_SCOOPED
COLLISION
CONDITION_GREEN 
//  Lowest alert status of station entity, next level: Condition_Yellow.
CONDITION_YELLOW
//  Second level of station entity alert status, next level: Red_Alert.
COURSE_OK
DEPLOYING_ESCORTS
DESIRED_RANGE_ACHIEVED
DOCKED
DOCKING_ABORTED
DOCKING_COMPLETE
DOCKING_REFUSED
DOCKING_REQUESTED
ECM
ENERGY_FULL
ENERGY_LOW
ENTER  
//  Always sent to the new (now current) state of the AI state machine 
//  after switching to a new state.
ENTERED_WITCHSPACE
ESCORTING
EXIT
//  Always sent to the current state of the AI state machine before switching to a new state.
EXITED_WITCHSPACE
FACING_DESTINATION
FIGHTING
FLEEING
FRUSTRATED
GONE_BEYOND_RANGE
GROUP_ATTACK_TARGET
HOLD_FULL
HOLD_POSITION
INCOMING_MISSILE
LANDED_ON_PLANET
LAUNCHED
MOTHER_LOST
//  sent if an escorting ship, or a group of ships loses it's Leader.
NO_STATION_FOUND
NO_TARGET
NOT_ESCORTING
NOTHING_FOUND
ODDS_BAD
ODDS_GOOD
ODDS_LEVEL
// Odds determined by CheckGroupOdds method.
REACHED_SAFETY
//  Sent when the ship controlled by the AI is fleeing it's primary_target 
//  and is at least desired_range kms from it. 
RED_ALERT
//  Entity attacked.
RESTARTED
//  Sent when an AI state machine is made the current AI state machine by 
//  becoming the top of the AI state machine stack for a particular entity.
STATION_FOUND
TARGET_CLEAN
TARGET_DESTROYED
TARGET_FOUND
//  Sent when searching for a target and something suitable is found. 
//  The found_target can be made the primary target by calling setTargetToFoundTarget 
//  in response to this message.
TARGET_FUGITIVE
TARGET_LOST
TARGET_MARKED
TARGET_MINOR_OFFENDER
TARGET_OFFENDER
THARGOID_DESTROYED
TRY_AGAIN_LATER
UPDATE
//  This message is sent to the current state each time the AI gets a chance to "think".
WAIT_FOR_SUN
WAYPOINT_SET
YELLOW_ALERT
//  Hostile craft in scannerrange.

Notes


This article is a stub. You can help EliteWiki by expanding it.

Links

OXP_howto_AI