IAISystem

C++
struct IAISystem {
  enum EGroupFlags {
    GROUP_ALL = 0x01,
    GROUP_ENABLED = 0x02,
    GROUP_MAX = 0x04
  };
  enum ENavigationType {
    NAV_UNSET = 1<<0,
    NAV_TRIANGULAR = 1<<1,
    NAV_WAYPOINT_HUMAN = 1<<2,
    NAV_WAYPOINT_3DSURFACE = 1<<3,
    NAV_FLIGHT = 1<<4,
    NAV_VOLUME = 1<<5,
    NAV_ROAD = 1<<6,
    NAV_SMARTOBJECT = 1<<7,
    NAV_FREE_2D = 1<<8,
    NAV_CUSTOM_NAVIGATION = 1<<9,
    NAV_MAX_VALUE = NAV_CUSTOM_NAVIGATION
  };
  enum {
    NAV_TYPE_COUNT = 10
  };
  enum {
    NAVMASK_SURFACE = NAV_TRIANGULAR|NAV_WAYPOINT_HUMAN|NAV_ROAD|NAV_SMARTOBJECT,
    NAVMASK_AIR = NAV_FLIGHT|NAV_VOLUME|NAV_SMARTOBJECT,
    NAVMASK_ALL = NAV_TRIANGULAR|NAV_WAYPOINT_HUMAN|NAV_WAYPOINT_3DSURFACE|NAV_ROAD|NAV_FLIGHT|NAV_VOLUME|NAV_SMARTOBJECT|NAV_FREE_2D|NAV_CUSTOM_NAVIGATION
  };
  enum EResetReason {
    RESET_INTERNAL,
    RESET_ENTER_GAME,
    RESET_EXIT_GAME,
    RESET_INTERNAL_LOAD,
    RESET_LOAD_LEVEL,
    RESET_UNLOAD_LEVEL
  };
  class NavCapMask;
  struct SBuildingInfo {
    EWaypointConnections waypointConnections;
    float fNodeAutoConnectDistance;
  };
};
File

IAISystem.h

Description

Interface to AI system. Defines functions to control the ai system.

IAISystem::EGroupFlags Enumeration
C++
enum EGroupFlags {
  GROUP_ALL = 0x01,
  GROUP_ENABLED = 0x02,
  GROUP_MAX = 0x04
};
File

IAISystem.h

Members
Members
Description
GROUP_ALL = 0x01
Returns all agents in the group (default).
GROUP_ENABLED = 0x02
Returns only the count of enabled agents (exclusive with all).
GROUP_MAX = 0x04
Returns the maximum number of agents during the game (can be combined with all or enabled).
Description

Flags used by the GetGroupCount.

IAISystem::ENavigationType Enumeration
C++
enum ENavigationType {
  NAV_UNSET = 1<<0,
  NAV_TRIANGULAR = 1<<1,
  NAV_WAYPOINT_HUMAN = 1<<2,
  NAV_WAYPOINT_3DSURFACE = 1<<3,
  NAV_FLIGHT = 1<<4,
  NAV_VOLUME = 1<<5,
  NAV_ROAD = 1<<6,
  NAV_SMARTOBJECT = 1<<7,
  NAV_FREE_2D = 1<<8,
  NAV_CUSTOM_NAVIGATION = 1<<9,
  NAV_MAX_VALUE = NAV_CUSTOM_NAVIGATION
};
File

IAISystem.h

Description

Indication of (a) what a graph node represents and (b) what kind of graph node an AI entity can navigate. In the latter case it can be used as a bit mask.

IAISystem::EResetReason Enumeration
C++
enum EResetReason {
  RESET_INTERNAL,
  RESET_ENTER_GAME,
  RESET_EXIT_GAME,
  RESET_INTERNAL_LOAD,
  RESET_LOAD_LEVEL,
  RESET_UNLOAD_LEVEL
};
File

IAISystem.h

Members
Members
Description
RESET_INTERNAL
Called by the AI system itself
RESET_INTERNAL_LOAD
Called by the AI system itself
IAISystem::NavCapMask Class
Class Hierarchy
C++
class NavCapMask;
File

IAISystem.h

Description

Bit mask using ENavigationType NOTE Aug 14, 2009:

IAISystem::NavCapMask::&= Operator
C++
NavCapMask & operator &=(unsigned rhs);
IAISystem::NavCapMask::|= Operator
C++
NavCapMask & operator |=(unsigned rhs);
IAISystem::NavCapMask::GetFullMask Method
C++
unsigned GetFullMask() const;
Description

NOTE Oct 21, 2009:

IAISystem::NavCapMask::GetLnmCaps Method
C++
unsigned GetLnmCaps() const;
IAISystem::NavCapMask::NavCapMask Constructor ()
C++
NavCapMask();
IAISystem::NavCapMask::NavCapMask Constructor (unsigned)
C++
NavCapMask(unsigned caps);
IAISystem::NavCapMask::Serialize Method
C++
void Serialize(TSerialize ser);
IAISystem::NavCapMask::SetLnmCaps Method
C++
void SetLnmCaps(unsigned lnmData);
IAISystem::NavCapMask::unsigned Operator
C++
operator unsigned() const;
Description

NOTE Oct 21, 2009:

IAISystem::SBuildingInfo Structure
C++
struct SBuildingInfo {
  EWaypointConnections waypointConnections;
  float fNodeAutoConnectDistance;
};
File

IAISystem.h

IAISystem::~IAISystem Destructor
C++
virtual ~IAISystem();
IAISystem::AddDebugLine Method
C++
virtual void AddDebugLine(const Vec3& start, const Vec3& end, uint8 r, uint8 g, uint8 b, float time) = 0;
IAISystem::AddDebugSphere Method
C++
virtual void AddDebugSphere(const Vec3& pos, float radius, uint8 r, uint8 g, uint8 b, float time) = 0;
IAISystem::AddFrameTicks Method
C++
virtual void AddFrameTicks(uint64 nTicks) = 0;
Description

Light frame profiler for AI support Add nTicks to the number of Ticks spend this frame in particle functions

IAISystem::AdjustDirectionalCoverPosition Method
C++
virtual void AdjustDirectionalCoverPosition(Vec3& pos, const Vec3& dir, float agentRadius, float testHeight) = 0;
Description

Returns a point which is a valid distance away from a wall in front of the point.

IAISystem::AllocGoalPipeId Method
C++
virtual int AllocGoalPipeId() const = 0;
Description

Goal Pipes

Todo

get rid of this; => it too many confusing uses to remove just yet

IAISystem::AssignPFPropertiesToPathType Method
C++
virtual void AssignPFPropertiesToPathType(const string& sPathType, const AgentPathfindingProperties& properties) = 0;
Description

Pathfinding properties

IAISystem::CompleteInit Method
C++
virtual bool CompleteInit() = 0;
IAISystem::CreateNavigationShape Method
C++
virtual bool CreateNavigationShape(const SNavigationShapeParams & params) = 0;
Description

Navigation / Pathfinding

IAISystem::CreateSignalExtraData Method
C++
virtual IAISignalExtraData* CreateSignalExtraData() const = 0;
IAISystem::DebugDraw Method
C++
virtual void DebugDraw() = 0;
Description

debug members ============= DO NOT USE

IAISystem::DebugDrawFakeTracer Method
C++
virtual void DebugDrawFakeTracer(const Vec3& pos, const Vec3& dir) = 0;
Description

Draws a fake tracer around the player.

IAISystem::DebugReportDeath Method
C++
virtual void DebugReportDeath(IAIObject* pVictim) = 0;
IAISystem::DebugReportHitDamage Method
C++
virtual void DebugReportHitDamage(IEntity* pVictim, IEntity* pShooter, float damage, const char* material) = 0;
IAISystem::DeleteNavigationShape Method
C++
virtual void DeleteNavigationShape(const char * szPathName) = 0;
IAISystem::DisableGlobalPerceptionScaling Method
C++
virtual void DisableGlobalPerceptionScaling() = 0;
IAISystem::DoesNavigationShapeExists Method
C++
virtual bool DoesNavigationShapeExists(const char * szName, EnumAreaType areaType, bool road = false) = 0;
IAISystem::DummyFunctionNumberOne Method
C++
virtual void DummyFunctionNumberOne() = 0;
Description

Navigation / Pathfinding

IAISystem::DynOmniLightEvent Method
C++
virtual void DynOmniLightEvent(const Vec3& pos, float radius, EAILightEventType type, EntityId shooterId, float time = 5.0f) = 0;
IAISystem::DynSpotLightEvent Method
C++
virtual void DynSpotLightEvent(const Vec3& pos, const Vec3& dir, float radius, float fov, EAILightEventType type, EntityId shooterId, float time = 5.0f) = 0;
IAISystem::Enable Method
C++
virtual void Enable(bool enable = true) = 0;
Description

If disabled most things early out

IAISystem::EnableGenericShape Method
C++
virtual void EnableGenericShape(const char* shapeName, bool state) = 0;
IAISystem::EnumerateFormationNames Method
C++
virtual void EnumerateFormationNames(unsigned int maxNames, const char** names, unsigned int* nameCount) const = 0;
Description

Leader/Formations

IAISystem::Error Method
C++
virtual void Error(const char * id, const char * format, ...);
IAISystem::Event Method
C++
virtual void Event(int eventT, const char *) = 0;
IAISystem::FlushSystem Method
C++
virtual void FlushSystem(bool bDeleteAll = false) = 0;
Description

this called before loading (level load/serialization)

IAISystem::FlushSystemNavigation Method
C++
virtual void FlushSystemNavigation(bool bDeleteAll = false) = 0;
IAISystem::FreeSignalExtraData Method
C++
virtual void FreeSignalExtraData(IAISignalExtraData* pData) const = 0;
IAISystem::GetActorProxyFactory Method
C++
virtual IAIActorProxyFactory* GetActorProxyFactory() const = 0;
IAISystem::GetAIActionManager Method
C++
virtual IAIActionManager* GetAIActionManager() = 0;
Description

AI Actions

IAISystem::GetAIDebugRenderer Method
C++
virtual IAIDebugRenderer* GetAIDebugRenderer() = 0;
Description
IAISystem::GetAIGroupProxy Method
C++
virtual IAIGroupProxy* GetAIGroupProxy(int groupID) = 0;
IAISystem::GetAINetworkDebugRenderer Method
C++
virtual IAIDebugRenderer* GetAINetworkDebugRenderer() = 0;
IAISystem::GetAIObjectManager Method
C++
virtual IAIObjectManager* GetAIObjectManager() = 0;
Description

Get Subsystems

IAISystem::GetAITickCount Method
C++
virtual int GetAITickCount() = 0;
Description

profiling

IAISystem::GetAlertness Method ()
C++
virtual int GetAlertness() const = 0;
Description

current global AI alertness value (what's the most alerted puppet)

IAISystem::GetAlertness Method (IAIAlertnessPredicate&)
C++
virtual int GetAlertness(const IAIAlertnessPredicate& alertnessPredicate) = 0;
IAISystem::GetBeacon Method
C++
virtual IAIObject* GetBeacon(unsigned short nGroupID) = 0;
Description

WTF are these?

IAISystem::GetCentralInterestManager Method
C++
virtual ICentralInterestManager* GetCentralInterestManager() = 0;
IAISystem::GetClusterDetector Method
C++
virtual IClusterDetector* GetClusterDetector() const = 0;
IAISystem::GetCommunicationManager Method
C++
virtual ICommunicationManager* GetCommunicationManager() const = 0;
IAISystem::GetCoverSystem Method
C++
virtual ICoverSystem* GetCoverSystem() const = 0;
IAISystem::GetDangerSpots Method
C++
virtual unsigned int GetDangerSpots(const IAIObject* requester, float range, Vec3* positions, unsigned int* types, unsigned int n, unsigned int flags) = 0;
Description

Fills the array with possible dangers, returns number of dangers.

IAISystem::GetFactionMap Method
C++
virtual IFactionMap& GetFactionMap() = 0;
IAISystem::GetFrameStartTimeSecondsVirtual Method
C++
virtual float GetFrameStartTimeSecondsVirtual() const = 0;
Description

!!! added to resolve merge conflict: to be removed in dev/c2 !!!

IAISystem::GetGlobalAudioScale Method
C++
virtual float GetGlobalAudioScale(const IAIObject* pAIObject) const = 0;
IAISystem::GetGlobalVisualScale Method
C++
virtual float GetGlobalVisualScale(const IAIObject* pAIObject) const = 0;
IAISystem::GetGroupCount Method
C++
virtual int GetGroupCount(int nGroupID, int flags = GROUP_ALL, int type = 0) = 0;
IAISystem::GetGroupMember Method
C++
virtual IAIObject* GetGroupMember(int groupID, int index, int flags = GROUP_ALL, int type = 0) = 0;
IAISystem::GetGroupProxyFactory Method
C++
virtual IAIGroupProxyFactory* GetGroupProxyFactory() const = 0;
IAISystem::GetHideSpotsInRange Method
C++
virtual unsigned int GetHideSpotsInRange(IAIObject* requester, const Vec3& reqPos, const Vec3& hideFrom, float minRange, float maxRange, bool collidableOnly, bool validatedOnly, unsigned int maxPts, Vec3* coverPos, Vec3* coverObjPos, Vec3* coverObjDir, float* coverRad, bool* coverCollidable) = 0;
Description

Returns specified number of nearest hidespots. It considers the hidespots in graph and anchors. Any of the pointers to return values can be null. Returns number of hidespots found.

IAISystem::GetIAIPathFinder Method
C++
virtual IAIPathFinder * GetIAIPathFinder() = 0;
IAISystem::GetIAIRecorder Method
C++
virtual IAIRecorder * GetIAIRecorder() = 0;
IAISystem::GetIBehaviorTreeManager Method
C++
virtual BehaviorTree::IBehaviorTreeManager* GetIBehaviorTreeManager() const = 0;
IAISystem::GetINavigation Method
C++
virtual INavigation * GetINavigation() = 0;
IAISystem::GetMemoryStatistics Method
C++
virtual void GetMemoryStatistics(ICrySizer * pSizer) = 0;
IAISystem::GetMNMPathfinder Method
C++
virtual IMNMPathfinder* GetMNMPathfinder() const = 0;
IAISystem::GetMovementSystem Method
C++
virtual struct IMovementSystem* GetMovementSystem() const = 0;
IAISystem::GetNavigationSystem Method
C++
virtual INavigationSystem* GetNavigationSystem() const = 0;
IAISystem::GetPathTypeNames Method
C++
virtual string GetPathTypeNames() = 0;
IAISystem::GetPFPropertiesOfPathType Method
C++
virtual const AgentPathfindingProperties* GetPFPropertiesOfPathType(const string& sPathType) = 0;
IAISystem::GetRecorderDebugContext Method
C++
virtual void GetRecorderDebugContext(SAIRecorderDebugContext* & pContext) = 0;
IAISystem::GetSelectionTreeManager Method
C++
virtual ISelectionTreeManager* GetSelectionTreeManager() const = 0;
IAISystem::GetSequenceManager Method
C++
virtual AIActionSequence::ISequenceManager* GetSequenceManager() const = 0;
IAISystem::GetSmartObjectManager Method
C++
virtual ISmartObjectManager* GetSmartObjectManager() = 0;
IAISystem::GetTacticalPointSystem Method
C++
virtual ITacticalPointSystem* GetTacticalPointSystem() = 0;
IAISystem::GetTargetTrackManager Method
C++
virtual ITargetTrackManager* GetTargetTrackManager() const = 0;
IAISystem::GetUpdateAllAlways Method
C++
virtual bool GetUpdateAllAlways() const = 0;
Description

Over-ride auto-disable for distant AIs

IAISystem::GetUpdateInterval Method
C++
virtual float GetUpdateInterval() const = 0;
Description

returns the basic AI system update interval

IAISystem::GetVisionMap Method
C++
virtual IVisionMap* GetVisionMap() = 0;
IAISystem::IAISystem Constructor
C++
IAISystem();
Description

Basic

IAISystem::IgnoreStimulusFrom Method
C++
virtual void IgnoreStimulusFrom(EntityId sourceId, EAIStimulusType type, float time) = 0;
IAISystem::Init Method
C++
virtual bool Init() = 0;
IAISystem::IsAIInDevMode Method
C++
virtual bool IsAIInDevMode() = 0;
IAISystem::IsEnabled Method
C++
virtual bool IsEnabled() const = 0;
IAISystem::IsRecording Method
C++
virtual bool IsRecording(const IAIObject* pTarget, IAIRecordable::e_AIDbgEvent event) const = 0;
Description

debug recorder

IAISystem::LayerEnabled Method
C++
virtual void LayerEnabled(const char* layerName, bool enabled, bool serialized) = 0;
IAISystem::LoadCover Method
C++
virtual void LoadCover(const char * szLevel, const char * szMission) = 0;
IAISystem::LoadLevelData Method
C++
virtual void LoadLevelData(const char * szLevel, const char * szMission, const bool bRequiredQuickLoading = false) = 0;
IAISystem::LoadNavigationData Method
C++
virtual void LoadNavigationData(const char * szLevel, const char * szMission, const bool bRequiredQuickLoading = false, bool bAfterExporting = false) = 0;
IAISystem::LogComment Method
C++
virtual void LogComment(const char * id, const char * format, ...);
IAISystem::LogEvent Method
C++
virtual void LogEvent(const char * id, const char * format, ...);
IAISystem::LogProgress Method
C++
virtual void LogProgress(const char * id, const char * format, ...);
IAISystem::NotifyTargetDead Method
C++
virtual void NotifyTargetDead(IAIObject* pDeadObject) = 0;
IAISystem::NumFrameTicks Method
C++
virtual uint64 NumFrameTicks() const = 0;
Description

Get number of Ticks accumulated over this frame

IAISystem::OnMissionLoaded Method
C++
virtual void OnMissionLoaded() = 0;
IAISystem::ParseTables Method
C++
virtual bool ParseTables(int firstTable, bool parseMovementAbility, IFunctionHandler* pH, AIObjectParams& aiParams, bool& updateAlways) = 0;
IAISystem::ReadAreasFromFile Method
C++
virtual void ReadAreasFromFile(const char * fileNameAreas) = 0;
Description

reads areas from file. clears the existing areas

IAISystem::Record Method
C++
virtual void Record(const IAIObject* pTarget, IAIRecordable::e_AIDbgEvent event, const char* pString) const = 0;
IAISystem::RegisterAIEventListener Method
C++
virtual void RegisterAIEventListener(IAIEventListener* pListener, const Vec3& pos, float rad, int flags) = 0;
Description

Registers AI event listener. Only events overlapping the sphere will be sent. Register can be called again to update the listener position, radius and flags. If pointer to the listener is specified it will be used instead of the pointer to entity.

IAISystem::RegisterDamageRegion Method
C++
virtual void RegisterDamageRegion(const void * pID, const Sphere & sphere) = 0;
Description

Register a spherical region that causes damage (so should be avoided in pathfinding). pID is just a unique identifying - so if this is called multiple times with the same pID then the damage region will simply be moved. If radius <= 0 then the region is disabled.

IAISystem::RegisterGlobalPerceptionListener Method
C++
virtual void RegisterGlobalPerceptionListener(IAIGlobalPerceptionListener* pListner) = 0;
IAISystem::RegisterListener Method
C++
virtual bool RegisterListener(IAISystemListener* pListener) = 0;
IAISystem::RegisterStimulus Method
C++
virtual void RegisterStimulus(const SAIStimulus& stim) = 0;
IAISystem::Release Method
C++
virtual void Release() = 0;
IAISystem::Reload Method
C++
virtual void Reload();
IAISystem::Reset Method
C++
virtual void Reset(EResetReason reason) = 0;
IAISystem::ResetFrameTicks Method
C++
virtual void ResetFrameTicks() = 0;
Description

Reset Ticks Counter

IAISystem::SendAnonymousSignal Method
C++
virtual void SendAnonymousSignal(int nSignalId, const char * szText, const Vec3 & pos, float fRadius, IAIObject * pSenderObject, IAISignalExtraData* pData = NULL) = 0;
IAISystem::SendSignal Method
C++
virtual void SendSignal(unsigned char cFilter, int nSignalId, const char * szText, IAIObject * pSenderObject, IAISignalExtraData* pData = NULL, uint32 crcCode = 0) = 0;
IAISystem::Serialize Method
C++
virtual void Serialize(TSerialize ser) = 0;
IAISystem::SerializeObjectIDs Method
C++
virtual void SerializeObjectIDs(TSerialize ser) = 0;
Description

save/load

IAISystem::SetActorProxyFactory Method
C++
virtual void SetActorProxyFactory(IAIActorProxyFactory* pFactory) = 0;
IAISystem::SetAIDebugRenderer Method
C++
virtual void SetAIDebugRenderer(IAIDebugRenderer* pAIDebugRenderer) = 0;
IAISystem::SetAINetworkDebugRenderer Method
C++
virtual void SetAINetworkDebugRenderer(IAIDebugRenderer* pAINetworkDebugRenderer) = 0;
IAISystem::SetAssesmentMultiplier Method
C++
virtual void SetAssesmentMultiplier(unsigned short type, float fMultiplier) = 0;
IAISystem::SetFactionThreatMultiplier Method
C++
virtual void SetFactionThreatMultiplier(uint8 factionID, float fMultiplier) = 0;
IAISystem::SetGroupProxyFactory Method
C++
virtual void SetGroupProxyFactory(IAIGroupProxyFactory* pFactory) = 0;
IAISystem::SetLevelPath Method
C++
virtual void SetLevelPath(const char * sPath) = 0;
Description

! Set a path for the current level as working folder for level-specific metadata

IAISystem::SetPerceptionDistLookUp Method
C++
virtual void SetPerceptionDistLookUp(float* pLookUpTable, int tableSize) = 0;
Description

look up table to be used when calculating visual time-out increment Global perception functionalities

IAISystem::UnregisterAIEventListener Method
C++
virtual void UnregisterAIEventListener(IAIEventListener* pListener) = 0;
IAISystem::UnregisterGlobalPerceptionlistener Method
C++
virtual void UnregisterGlobalPerceptionlistener(IAIGlobalPerceptionListener* pListner) = 0;
IAISystem::UnregisterListener Method
C++
virtual bool UnregisterListener(IAISystemListener* pListener) = 0;
IAISystem::Update Method
C++
virtual void Update(CTimeValue currentTime, float frameTime) = 0;
Description

Every frame (multiple time steps per frame possible?) //TODO find out currentTime - AI time since game start in seconds (GetCurrentTime) frameTime - since last update (GetFrameTime)

IAISystem::UpdateBeacon Method
C++
virtual void UpdateBeacon(unsigned short nGroupID, const Vec3 & vPos, IAIObject * pOwner = 0) = 0;
IAISystem::UpdateGlobalPerceptionScale Method
C++
virtual void UpdateGlobalPerceptionScale(const float visualScale, const float audioScale, EAIFilterType filterTypeName = eAIFT_All, const char* factionName = NULL) = 0;
IAISystem::Warning Method
C++
virtual void Warning(const char * id, const char * format, ...) const;
Description

functions to let external systems (e.g. lua) access the AI logging functions. the external system should pass in an identifier (e.g. "

IAISystem::tNavCapMask Nested Type
C++
typedef NavCapMask tNavCapMask;