Space Plunder
Loading...
Searching...
No Matches
AIDataTypes.h File Reference
#include "CoreMinimal.h"
#include "Engine/DataTable.h"
#include "Interfaces/StealthInterface.h"
#include "AIDataTypes.generated.h"

Go to the source code of this file.

Classes

struct  FStealthData
 
struct  FFactionRelationship
 
struct  FCharacterEmotions
 
struct  FHostileActorInfo
 
struct  FFactionRelationshipTotal
 
struct  FFactionData
 
struct  FFactionStats
 
struct  FAISpawnLocationData
 

Namespaces

namespace  AIRelationShipVars
 

Enumerations

enum class  EAIResponse : uint8 { Dialogue , Command , Trade }
 
enum class  EAISense : uint8 {
  Sight , Hearing , Damage , Team ,
  Prediction , Touch , Action , Custom
}
 
enum class  ECharacterType : uint8 {
  Human , Alien , Robot , Zombie ,
  Raider , Defence
}
 
enum class  EAIMovementSpeed : uint8 { Walking , Jogging , Running , Sprinting }
 
enum class  EAIMovementType : uint8 { Normal , Injured , Responsive , Sluggish }
 
enum class  EFactionType : uint8 {
  Default , Alliance , Militia , Vipers ,
  Jackals , TheBrotherhood , Robots , ChurchOfTheMachine ,
  Zombies , None
}
 
enum class  EAIStateType : uint8 {
  Default , Patrol , Searching , Protect ,
  Hostile , Working , Sleeping , Relaxed ,
  Mingle , Investigate , Alert , Scavenging ,
  Training , Evading
}
 
enum class  ERelationshipStatus : uint8 {
  Enemy , Hostile , UnFriendly , Neutral ,
  Default , Allied , Friendly
}
 
enum class  EAlignment : uint8 {
  Lawful , Chaotic , Neutral , Good ,
  Evil
}
 

Functions

 DECLARE_LOG_CATEGORY_EXTERN (LogAIToolKit, Display, All)
 
static ERelationshipStatus GetRelationship (const float TrustLevel, const float HostilityLevel)
 

Variables

float AIRelationShipVars::TrustLevelFriendly = 100.0f
 
float AIRelationShipVars::HostilityLevelFriendly = 0.0f
 
float AIRelationShipVars::TrustLevelAllied = 40.0f
 
float AIRelationShipVars::HostilityLevelAllied = HostilityLevelFriendly
 
float AIRelationShipVars::TrustLevelNeutral = 0.0f
 
float AIRelationShipVars::HostilityLevelNeutral = 20.0f
 
float AIRelationShipVars::TrustLevelHostile = -40.0f
 
float AIRelationShipVars::HostilityLevelHostile = 100.0f
 
float AIRelationShipVars::TrustLevelEnemy = -100.0f
 
float AIRelationShipVars::HostilityLevelEnemy = 200.0f
 

Enumeration Type Documentation

◆ EAIMovementSpeed

enum class EAIMovementSpeed : uint8
strong
Enumerator
Walking 
Jogging 
Running 
Sprinting 

◆ EAIMovementType

enum class EAIMovementType : uint8
strong
Enumerator
Normal 
Injured 
Responsive 
Sluggish 

◆ EAIResponse

enum class EAIResponse : uint8
strong
Enumerator
Dialogue 
Command 
Trade 
47{
49 Command,
50 Trade,
51
52 // Combat,
53 // Fetch,
54};

◆ EAISense

enum class EAISense : uint8
strong
Enumerator
Sight 
Hearing 
Damage 
Team 
Prediction 
Touch 
Action 
Custom 
60{
61 Sight,
62 Hearing,
63 Damage,
64 Team,
66 Touch,
67 Action,
68 Custom
69};

◆ EAIStateType

enum class EAIStateType : uint8
strong
Enumerator
Default 
Patrol 
Searching 
Protect 
Hostile 
Working 
Sleeping 
Relaxed 
Mingle 
Investigate 
Alert 
Scavenging 
Training 
Evading 
121{
122 Default,
123 Patrol, //- the AI character follows a designated route or area, keeping a vigilant eye for any unusual activities or intruders. They maintain a sense of alertness while monitoring their surroundings and ensuring the designated area remains secure
124 Searching, //- This state occurs when the AI character is actively searching for something specific, such as a missing item, a hidden passage, or a particular individual. They meticulously investigate the surroundings, perform thorough searches, and employ various techniques to locate the desired target or object
125 Protect, //- When in the Protect state, the AI character focuses on safeguarding a specific target or area. This could involve escorting a VIP, defending a valuable asset, or securing a critical location. They actively respond to threats, engage in combat if necessary, and prioritize the protection of the assigned target or area.
126 Hostile, //- the AI character is actively aggressive and ready to engage in combat. They pursue and attack any perceived threats or targets, using their skills and weapons to eliminate adversaries and defend their territory
127 Working, //- character focuses on performing their assigned tasks or duties. This could involve operating ship systems, managing resources, or fulfilling maintenance responsibilities. They carry out their duties efficiently, ensuring the smooth functioning of the ship and its operations.
128 Sleeping, //- character rests and recharges. They find a designated sleeping area, such as crew quarters or sleeping pods, and go through a period of inactivity to restore their energy and stamina.
129 Relaxed, //- character takes a break from their regular duties. They engage in leisure activities, such as reading, listening to music, or enjoying recreational areas on the ship. This state allows them to unwind and rejuvenate before returning to their assigned tasks.
130 Mingle, //- socialize with other crew members, fostering connections and building relationships. They engage in conversations, share stories, and participate in communal activities, contributing to a sense of camaraderie and cohesion among the crew.
131 Investigate, //- This state would be triggered when the AI detects something suspicious or unusual. It would involve the AI moving to the location, examining the area, and potentially alerting others if necessary
132 Alert, //- This state would occur when the AI becomes aware of a potential threat or danger. They would take defensive positions, call for backup, or actively search for the source of the threat.
133 Scavenging, //- In this state, the AI would actively search for resources or valuable items within their environment
134 Training, //- AI characters in this state would be engaged in physical or mental training activities, honing their combat skills, or improving their knowledge and abilities
135 Evading, //- when the AI character is trying to escape or avoid being detected by enemies or pursuing threats
136};

◆ EAlignment

enum class EAlignment : uint8
strong
Enumerator
Lawful 
Chaotic 
Neutral 
Good 
Evil 
152{
153 Lawful,
154 Chaotic,
155 Neutral,
156 Good,
157 Evil
158};

◆ ECharacterType

enum class ECharacterType : uint8
strong
Enumerator
Human 
Alien 
Robot 
Zombie 
Raider 
Defence 

◆ EFactionType

enum class EFactionType : uint8
strong
Enumerator
Default 
Alliance 
Militia 
Vipers 
Jackals 
TheBrotherhood 
Robots 
ChurchOfTheMachine 
Zombies 
None 
103{
104 Default,
105 Alliance, //- Space cops, Trying to bring peace
106 Militia, //- Military who will forcefully bring peace
107 Vipers, //- Free Roaming Humans who don't obey the law of the alliance, but are not hostile, //
108 Jackals, //- Raiders who will kill anyone
109 TheBrotherhood, //- Kidnap and Sacrifice people to become zombies, keep zombies as weapons have slaves //
110 Robots, //- AI Machines who think humans are destroying themselves, willing to destroy some for the good of all
111 ChurchOfTheMachine, //- Humans who worship Robots and agree, even when the robots don't agree with them //
112 Zombies, //- eat brain //
113 None, //- Vehicle, etc. //
114};

◆ ERelationshipStatus

enum class ERelationshipStatus : uint8
strong
Enumerator
Enemy 
Hostile 
UnFriendly 
Neutral 
Default 
Allied 
Friendly 

Function Documentation

◆ DECLARE_LOG_CATEGORY_EXTERN()

DECLARE_LOG_CATEGORY_EXTERN ( LogAIToolKit ,
Display ,
All  )

◆ GetRelationship()

static ERelationshipStatus GetRelationship ( const float TrustLevel,
const float HostilityLevel )
static

Returns RelationShip Based off Trust and Hostility, See AIDataTypes for Conversion

170{
171 //- Hostility is higher or equal than 200.0f OR if Trust is below or equal -100.f //
173 {
175 }
176 //- Hostility is higher or equal than 100.0f OR if Trust is below or equal -40.f //
178 {
180 }
181
182 //- If they have MAX Trust, & No Hostility //
184 {
186 }
187 //- If above 40 Trust, & No Hostility //
189 {
191 }
192 //- If Trust is above or equal 0 & Hostility is Lower or equal than 20 //
194 {
196 }
197 //- Should cover everything else? //
198 //- If Trust is above Hostile (-40.f) & Hostility is Lower than Hostile (100.0f) //
200 {
202 }
204 // //- if Trust is above -40 & Hostility is higher than 100.0f //
205 // if(TrustLevel >= AIRelationShipVars::TrustLevelHostile && HostilityLevel >= AIRelationShipVars::HostilityLevelHostile)
206 // {
207 // return ERelationshipStatus::Hostile;
208 // }
209 // //- if Trust is above -100.0f & Hostility is Higher than 200.0f //
210 // if(TrustLevel >= AIRelationShipVars::TrustLevelEnemy && HostilityLevel >= AIRelationShipVars::HostilityLevelEnemy)
211 // {
212 // return ERelationshipStatus::Enemy;
213 // }
214 // Handle any other case, possibly setting to Default or another status
215}
float HostilityLevelFriendly
Definition AIDataTypes.h:20
float HostilityLevelAllied
Definition AIDataTypes.h:25
float TrustLevelFriendly
Definition AIDataTypes.h:18
float HostilityLevelHostile
Definition AIDataTypes.h:35
float HostilityLevelNeutral
Definition AIDataTypes.h:30
float TrustLevelHostile
Definition AIDataTypes.h:33
float TrustLevelEnemy
Definition AIDataTypes.h:38
float HostilityLevelEnemy
Definition AIDataTypes.h:40
float TrustLevelAllied
Definition AIDataTypes.h:23
float TrustLevelNeutral
Definition AIDataTypes.h:28