CommonLibVR
Loading...
Searching...
No Matches
AIProcess.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/A/ActorPackage.h"
4#include "RE/A/ActorValues.h"
6#include "RE/B/BSTArray.h"
7#include "RE/B/BSTList.h"
9
10namespace RE
11{
12 enum class RESET_3D_FLAGS;
13 class Actor;
14 class bhkCharacterController;
15 class BipedAnim;
16 class NiAVObject;
17 class NiPoint3;
18 class TESForm;
19 class TESShout;
20 struct HighProcessData;
21 struct MiddleHighProcessData;
22
23 enum class PROCESS_TYPE
24 {
25 kNone = static_cast<std::underlying_type_t<PROCESS_TYPE>>(-1),
26 kHigh = 0,
27 kMiddleHigh = 1,
28 kMiddleLow = 2,
29 kLow = 3
30 };
31
33 {
34 public:
35 // members
36 std::int32_t hourPackageEvaluated; // 0
37 };
38 static_assert(sizeof(MiddleLowProcessData) == 0x4);
39
41 {
42 public:
43 // members
44 float value; // 0
45 bool invalid; // 4
46 std::uint8_t pad5; // 5
47 std::uint16_t pad6; // 6
48 };
49 static_assert(sizeof(CachedValueData) == 0x8);
50
52 {
53 public:
54 enum class Flags
55 {
56 kNone = 0,
57 kRadius = 1 << 0,
58 kWidth = 1 << 1,
59 kLength = 1 << 2,
60 kDPS = 1 << 3,
62 kEyeLevel = 1 << 9,
63 kConditionPreventsRun = 1 << 10,
64 kForwardLength = 1 << 11,
65 kActorIsGhost = 1 << 20,
66 kHealthDamaged = 1 << 21,
67 kMagickaPointsDamaged = 1 << 22,
68 kStaminaDamaged = 1 << 23,
69 kOwnerIsNPC = 1 << 25,
70 kOwnerIsUndead = 1 << 26,
72 };
73
74 enum class BooleanValue
75 {
76 kNone = 0,
77 kConditionPreventsRun = 1 << 0,
78 kOwnerIsNPC = 1 << 1,
79 kOwnerIsUndead = 1 << 2,
81 };
82
83 float cachedRadius; // 00
84 float cachedWidth; // 04
85 float cachedLength; // 08
87 float cachedDPS; // 10
88 float cachedEyeLevel; // 14
89 float cachedWalkSpeed; // 18
90 float cachedRunSpeed; // 1C
91 float cachedJogSpeed; // 20
97 };
98 static_assert(sizeof(CachedValues) == 0x60);
99
101 {
102 public:
103 // members
104 std::uint64_t unk00; // 00
105 std::uint64_t unk08; // 08
106 std::uint64_t unk10; // 10
107 std::uint64_t unk18; // 18
108 std::uint64_t unk20; // 20
109 };
110 static_assert(sizeof(ObjectstoAcquire) == 0x28);
111
113 {
114 public:
115 enum class LowProcessFlags : std::uint8_t
116 {
117 kNone = 0,
118 kTargetActivated = 1 << 0,
119 kCurrentActionComplete = 1 << 1,
120 kAlert = 1 << 3,
121 kFollower = 1 << 4,
122 kPackageDoneOnce = 1 << 5,
123 kPackageIdleDone = 1 << 6
124 };
125
126 struct Hands
127 {
128 enum Hand : std::uint32_t
129 {
132 kTotal
133 };
134 };
136
138 {
141 };
142 static_assert(sizeof(EquippedObject) == 0x10);
143
144 struct Data0B8
145 {
146 public:
147 // members
148 void* unk00; // 00
150 void* unk10; // 10
151 void* unk18; // 18
152 std::uint64_t unk20; // 20
153 void* unk28; // 28
154 std::uint32_t unk30; // 30
155 std::uint32_t pad34; // 34
156 };
157 static_assert(sizeof(Data0B8) == 0x38);
158
159 void AddToProcedureIndexRunning(Actor* a_actor, std::uint32_t a_num);
160 void ClearActionHeadtrackTarget(bool a_defaultHold);
163 float GetCachedHeight() const;
170 [[nodiscard]] bool GetIsSummonedCreature() const noexcept;
173 float GetRegenDelay(ActorValue a_actorvalue) const;
176 float GetVoiceRecoveryTime() const;
178 bool InHighProcess() const;
180 bool InMiddleLowProcess() const;
181 bool InLowProcess() const;
182 bool IsArrested() const;
183 bool IsGhost() const;
184 bool IsInCommandState() const;
185 void SetActorRefraction(float a_refraction);
186 void KnockExplosion(Actor* a_actor, const NiPoint3& a_location, float a_magnitude);
187 bool PlayIdle(Actor* a_actor, TESIdleForm* a_idle, TESObjectREFR* a_target);
189 void SetActorsDetectionEvent(Actor* a_actor, const NiPoint3& a_location, std::int32_t a_soundLevel, TESObjectREFR* a_ref);
190 void SetArrested(bool a_arrested);
191 void SetCachedHeight(float a_height);
192 void SetRefraction(float a_refraction);
193 void SetHeadtrackTarget(Actor* a_owner, NiPoint3& a_targetPosition);
195 void SetRunOncePackage(TESPackage* a_package, Actor* a_actor);
196 bool SetupSpecialIdle(Actor* a_actor, DEFAULT_OBJECT a_action, TESIdleForm* a_idle, bool a_arg5, bool a_arg6, TESObjectREFR* a_target);
197 void StopCurrentIdle(Actor* a_actor, bool a_forceIdleStop);
198 void Update3DModel(Actor* a_actor);
199 void UpdateRegenDelay(ActorValue a_actorValue, float a_regenDelay);
200
201 // members
206 float hourLastProcessed; // 048
207 float dateLastProcessed; // 04C
209 std::int32_t numberItemsActivate; // 058
210 std::uint32_t pad05C; // 05C
215 float essentialDownTimer; // 090
216 float deathTime; // 094
217 float trackedDamage; // 098
218 std::uint32_t pad09C; // 09C
222 std::uint64_t unk100; // 100
223 std::uint64_t unk108; // 108
227 std::uint64_t unk120; // 120
228 std::uint64_t unk128; // 128
229 std::uint32_t unk130; // 130
230 std::uint16_t unk134; // 134
231 REX::EnumSet<LowProcessFlags, std::uint8_t> lowProcessFlags; // 136
232 REX::EnumSet<PROCESS_TYPE, std::uint8_t> processLevel; // 137
234 bool ignoringCombat; // 139
235 bool endAlarmOnActor; // 13A
236 bool escortingPlayer; // 13B
237 std::uint32_t pad13C; // 13C
238
239 protected:
240 void Update3DModel_Impl(Actor* a_actor);
241
242 private:
244 };
245 static_assert(sizeof(AIProcess) == 0x140);
246}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition EnumSet.h:9
Definition AIProcess.h:113
CachedValues * cachedValues
Definition AIProcess.h:208
float deathTime
Definition AIProcess.h:216
std::uint32_t pad09C
Definition AIProcess.h:218
float GetCachedHeight() const
bool endAlarmOnActor
Definition AIProcess.h:235
std::int32_t numberItemsActivate
Definition AIProcess.h:209
float hourLastProcessed
Definition AIProcess.h:206
void KnockExplosion(Actor *a_actor, const NiPoint3 &a_location, float a_magnitude)
void AddToProcedureIndexRunning(Actor *a_actor, std::uint32_t a_num)
void SetCachedHeight(float a_height)
std::uint32_t unk130
Definition AIProcess.h:229
TESForm * equippedObjects[Hand::kTotal]
Definition AIProcess.h:221
MiddleLowProcessData * middleLow
Definition AIProcess.h:202
NiAVObject * GetMagicNode(const BSTSmartPointer< BipedAnim > &a_biped) const
bool ignoringCombat
Definition AIProcess.h:234
bool GetIsSummonedCreature() const noexcept
RefHandle followTarget
Definition AIProcess.h:224
bool InMiddleHighProcess() const
ObjectRefHandle GetHeadtrackTarget() const
float GetRegenDelay(ActorValue a_actorvalue) const
ObjectstoAcquire * savedAcquireObject
Definition AIProcess.h:214
Data0B8 unk0B8
Definition AIProcess.h:220
bool skippedTimeStampForPathing
Definition AIProcess.h:233
BSSimpleList< TESObjectREFR * > genericLocations
Definition AIProcess.h:212
bool InLowProcess() const
void SetRunOncePackage(TESPackage *a_package, Actor *a_actor)
REX::EnumSet< PROCESS_TYPE, std::uint8_t > processLevel
Definition AIProcess.h:232
bool escortingPlayer
Definition AIProcess.h:236
ActorPackage currentPackage
Definition AIProcess.h:205
void SetRefraction(float a_refraction)
bool IsInCommandState() const
bool InMiddleLowProcess() const
ObjectstoAcquire * acquireObject
Definition AIProcess.h:213
TESShout * GetCurrentShout()
void Update3DModel_Impl(Actor *a_actor)
Actor * GetUserData() const
bhkCharacterController * GetCharController()
float GetVoiceRecoveryTime() const
std::uint64_t unk128
Definition AIProcess.h:228
BSSimpleList< ObjectstoAcquire * > objects
Definition AIProcess.h:211
void ClearActionHeadtrackTarget(bool a_defaultHold)
void ComputeLastTimeProcessed()
TESForm * GetEquippedRightHand()
bool PlayIdle(Actor *a_actor, TESIdleForm *a_idle, TESObjectREFR *a_target)
void ClearMuzzleFlashes()
void SetActorsDetectionEvent(Actor *a_actor, const NiPoint3 &a_location, std::int32_t a_soundLevel, TESObjectREFR *a_ref)
bool IsGhost() const
RefHandle arrestTarget
Definition AIProcess.h:226
TESForm * GetEquippedLeftHand()
std::uint64_t unk108
Definition AIProcess.h:223
ObjectRefHandle GetOccupiedFurniture() const
void SetHeadtrackTarget(Actor *a_owner, NiPoint3 &a_targetPosition)
RefHandle target
Definition AIProcess.h:225
std::uint16_t unk134
Definition AIProcess.h:230
TESPackage * GetRunningPackage() const
bool SetupSpecialIdle(Actor *a_actor, DEFAULT_OBJECT a_action, TESIdleForm *a_idle, bool a_arg5, bool a_arg6, TESObjectREFR *a_target)
float trackedDamage
Definition AIProcess.h:217
bool InHighProcess() const
std::uint64_t unk120
Definition AIProcess.h:227
MiddleHighProcessData * middleHigh
Definition AIProcess.h:203
std::uint32_t pad05C
Definition AIProcess.h:210
std::uint32_t pad13C
Definition AIProcess.h:237
void StopCurrentIdle(Actor *a_actor, bool a_forceIdleStop)
LowProcessFlags
Definition AIProcess.h:116
void RandomlyPlaySpecialIdles(Actor *a_actor)
void Set3DUpdateFlag(RESET_3D_FLAGS a_flags)
float dateLastProcessed
Definition AIProcess.h:207
NiAVObject * GetWeaponNode(const BSTSmartPointer< BipedAnim > &a_biped) const
float essentialDownTimer
Definition AIProcess.h:215
void SetActorRefraction(float a_refraction)
std::uint64_t unk100
Definition AIProcess.h:222
HighProcessData * high
Definition AIProcess.h:204
void Update3DModel(Actor *a_actor)
ActorHandle GetCommandingActor() const
bool IsArrested() const
void SetArrested(bool a_arrested)
void UpdateRegenDelay(ActorValue a_actorValue, float a_regenDelay)
BSTArray< EquippedObject > equippedForms
Definition AIProcess.h:219
REX::EnumSet< LowProcessFlags, std::uint8_t > lowProcessFlags
Definition AIProcess.h:231
Definition ActorPackage.h:12
Definition Actor.h:133
Definition BGSEquipSlot.h:10
Definition BSTList.h:10
Definition BSTArray.h:378
Definition BSTSmartPointer.h:37
Definition BipedAnim.h:42
Definition AIProcess.h:33
std::int32_t hourPackageEvaluated
Definition AIProcess.h:36
Definition NiAVObject.h:57
Definition NiPoint3.h:6
Definition TESForm.h:40
Definition TESIdleForm.h:37
Definition TESObjectREFR.h:114
Definition TESPackage.h:316
Definition TESShout.h:18
Definition bhkCharacterController.h:73
Definition BSDirectInputManager.h:8
Definition AbsorbEffect.h:6
RESET_3D_FLAGS
Definition MiddleHighProcessData.h:41
ActorValue
Definition ActorValues.h:6
@ kNone
Definition PlayerCharacter.h:85
PROCESS_TYPE
Definition AIProcess.h:24
std::uint32_t RefHandle
Definition BSCoreTypes.h:6
Definition EffectArchetypes.h:65
Definition AIProcess.h:145
void * unk28
Definition AIProcess.h:153
std::uint32_t unk30
Definition AIProcess.h:154
std::uint64_t unk20
Definition AIProcess.h:152
void * unk00
Definition AIProcess.h:148
std::uint32_t pad34
Definition AIProcess.h:155
void * unk18
Definition AIProcess.h:151
Data0B8 * unk08
Definition AIProcess.h:149
void * unk10
Definition AIProcess.h:150
Definition AIProcess.h:138
BGSEquipSlot * slot
Definition AIProcess.h:140
TESForm * object
Definition AIProcess.h:139
Definition AIProcess.h:127
Hand
Definition AIProcess.h:129
@ kRight
Definition AIProcess.h:131
@ kLeft
Definition AIProcess.h:130
@ kTotal
Definition AIProcess.h:132
Definition AIProcess.h:41
float value
Definition AIProcess.h:44
std::uint16_t pad6
Definition AIProcess.h:47
std::uint8_t pad5
Definition AIProcess.h:46
bool invalid
Definition AIProcess.h:45
Definition AIProcess.h:52
float cachedDPS
Definition AIProcess.h:87
float cachedRunSpeed
Definition AIProcess.h:90
BooleanValue
Definition AIProcess.h:75
float cachedLength
Definition AIProcess.h:85
REX::EnumSet< BooleanValue, std::uint32_t > booleanValues
Definition AIProcess.h:93
BSTArray< CachedValueData > actorValueCache
Definition AIProcess.h:95
float cachedJogSpeed
Definition AIProcess.h:91
Flags
Definition AIProcess.h:55
REX::EnumSet< Flags, std::uint32_t > flags
Definition AIProcess.h:94
float cachedEyeLevel
Definition AIProcess.h:88
float cachedFastWalkSpeed
Definition AIProcess.h:92
float cachedForwardLength
Definition AIProcess.h:86
float cachedWidth
Definition AIProcess.h:84
float cachedRadius
Definition AIProcess.h:83
BSTArray< CachedValueData > maxActorValueCache
Definition AIProcess.h:96
float cachedWalkSpeed
Definition AIProcess.h:89
DEFAULT_OBJECT
Definition BGSDefaultObjectManager.h:12
Definition HighProcessData.h:61
Definition MiddleHighProcessData.h:135
Definition AIProcess.h:101
std::uint64_t unk20
Definition AIProcess.h:108
std::uint64_t unk00
Definition AIProcess.h:104
std::uint64_t unk18
Definition AIProcess.h:107
std::uint64_t unk10
Definition AIProcess.h:106
std::uint64_t unk08
Definition AIProcess.h:105