Skip to content

Commit 01d7eee

Browse files
authored
Merge pull request #26 from FalloutCascadia/master
feat: Misc. updates.
2 parents 90312ad + 631b286 commit 01d7eee

88 files changed

Lines changed: 2944 additions & 1371 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CommonLibF4/cmake/sourcelist.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(SOURCES
1010
include/RE/Bethesda/AITimeStamp.h
1111
include/RE/Bethesda/ActiveEffect.h
1212
include/RE/Bethesda/Actor.h
13+
include/RE/Bethesda/ActorUtils.h
1314
include/RE/Bethesda/ActorValueInfo.h
1415
include/RE/Bethesda/Archive2.h
1516
include/RE/Bethesda/Atomic.h
@@ -197,10 +198,25 @@ set(SOURCES
197198
include/RE/Bethesda/Movement.h
198199
include/RE/Bethesda/NavMesh.h
199200
include/RE/Bethesda/NavMeshInfoMap.h
201+
include/RE/Bethesda/PipboyArray.h
200202
include/RE/Bethesda/PipboyDataGroup.h
203+
include/RE/Bethesda/PipboyDataManager.h
204+
include/RE/Bethesda/PipboyInventoryData.h
201205
include/RE/Bethesda/PipboyInventoryUtils.h
206+
include/RE/Bethesda/PipboyLogData.h
202207
include/RE/Bethesda/PipboyManager.h
208+
include/RE/Bethesda/PipboyMapData.h
209+
include/RE/Bethesda/PipboyPerksData.h
210+
include/RE/Bethesda/PipboyPlayerInfoData.h
211+
include/RE/Bethesda/PipboyPrimitiveValue.h
212+
include/RE/Bethesda/PipboyQuestData.h
213+
include/RE/Bethesda/PipboyRadioData.h
214+
include/RE/Bethesda/PipboySpecialData.h
215+
include/RE/Bethesda/PipboyStatsData.h
216+
include/RE/Bethesda/PipboyStatusData.h
217+
include/RE/Bethesda/PipboyThrottleManager.h
203218
include/RE/Bethesda/PipboyValue.h
219+
include/RE/Bethesda/PipboyWorkshopData.h
204220
include/RE/Bethesda/PlayerCharacter.h
205221
include/RE/Bethesda/PlayerControls.h
206222
include/RE/Bethesda/PowerArmor.h

CommonLibF4/include/RE/Bethesda/Actor.h

Lines changed: 141 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
namespace RE
2222
{
23-
enum class ACTOR_CRITICAL_STAGE;
24-
enum class ACTOR_LIFE_STATE;
25-
enum class ACTOR_LOS_LOCATION;
2623
enum class ATTACK_STATE_ENUM;
2724
enum class COMMAND_TYPE;
2825
enum class DEFAULT_OBJECT;
@@ -112,53 +109,89 @@ namespace RE
112109
struct PerkEntryUpdatedEvent;
113110
}
114111

112+
enum class ACTOR_CRITICAL_STAGE : std::int32_t
113+
{
114+
kNone = 0x0,
115+
kGooStart = 0x1,
116+
kGooEnd = 0x2,
117+
kDisintegrateStart = 0x3,
118+
kDisintegrateEnd = 0x4,
119+
kFreezeStart = 0x5,
120+
kFreezeEnd = 0x6,
121+
kCount = 0x7
122+
};
123+
124+
enum class ACTOR_LIFE_STATE : std::int32_t
125+
{
126+
kAlive = 0x0,
127+
kDying = 0x1,
128+
kDead = 0x2,
129+
kUnconscious = 0x3,
130+
kReanimate = 0x4,
131+
kRecycle = 0x5,
132+
kRestrained = 0x6,
133+
kEssentialDown = 0x7,
134+
kBleedout = 0x8
135+
};
136+
137+
enum class ACTOR_LOS_LOCATION : std::int32_t
138+
{
139+
kNone = 0x0,
140+
kEye = 0x1,
141+
kHead = 0x2,
142+
kTorse = 0x3,
143+
kFeet = 0x4,
144+
kCount = 0x5
145+
};
146+
115147
enum class PTYPE : std::int32_t
116148
{
117-
kExplore = 0,
118-
kFollow = 1,
119-
kEscore = 2,
120-
kEat = 3,
121-
kSleep = 4,
122-
kWander = 5,
123-
kTravel = 6,
124-
kAccompany = 7,
125-
kUseItemAt = 8,
126-
kAmbush = 9,
127-
kFleeNonCombat = 10,
128-
kCastMagic = 11,
129-
kSandbox = 12,
130-
kPatrol = 13,
131-
kGuard = 14,
132-
kDialogue = 15,
133-
kUseWeapon = 16,
134-
kFind = 17,
135-
kCustom = 18,
136-
kTemplate = 19,
137-
kActivate = 20,
138-
kAlarm = 21,
139-
kFlee = 22,
140-
kTrespass = 23,
141-
kSpectator = 24,
142-
kGreet = 25,
143-
kGetUp = 26,
144-
kDoNothing = 27,
145-
kInGameDialogue = 28,
146-
kSurface = 29,
147-
kSearchForAttacker = 30,
148-
kAvoidReference = 31,
149-
kBumpReaction = 32,
150-
kGrenadeMineReaction = 33,
151-
kStealWarning = 34,
152-
kPickpocketWarning = 35,
153-
kMovementBlocked = 36,
154-
kVampireFeed = 37,
155-
kCannibal = 38,
156-
kLand = 39,
157-
kUnused = 40,
158-
kMountActor = 41,
159-
kDismountActor = 42,
160-
kClearMountPosition = 43,
161-
kClearPowerArmorExit = 44,
149+
kExplore = 0x0,
150+
kFollow = 0x1,
151+
kEscore = 0x2,
152+
kEat = 0x3,
153+
kSleep = 0x4,
154+
kWander = 0x5,
155+
kTravel = 0x6,
156+
kAccompany = 0x7,
157+
kUseItemAt = 0x8,
158+
kAmbush = 0x9,
159+
kFleeNonCombat = 0xA,
160+
kCastMagic = 0xB,
161+
kSandbox = 0xC,
162+
kPatrol = 0xD,
163+
kGuard = 0xE,
164+
kDialogue = 0xF,
165+
kUseWeapon = 0x10,
166+
kFind = 0x11,
167+
kCustom = 0x12,
168+
kTemplate = 0x13,
169+
kActivate = 0x14,
170+
kAlarm = 0x15,
171+
kFlee = 0x16,
172+
kTrespass = 0x17,
173+
kSpectator = 0x18,
174+
kGreet = 0x19,
175+
kGetUp = 0x1A,
176+
kDoNothing = 0x1B,
177+
kInGameDialogue = 0x1C,
178+
kSurface = 0x1D,
179+
kSearchForAttacker = 0x1E,
180+
kAvoidReference = 0x1F,
181+
kBumpReaction = 0x20,
182+
kGrenadeMineReaction = 0x21,
183+
kStealWarning = 0x22,
184+
kPickpocketWarning = 0x23,
185+
kMovementBlocked = 0x24,
186+
kVampireFeed = 0x25,
187+
kCannibal = 0x26,
188+
kLand = 0x27,
189+
kUnused = 0x28,
190+
kMountActor = 0x29,
191+
kDismountActor = 0x2A,
192+
kClearMountPosition = 0x2B,
193+
kClearPowerArmorExit = 0x2C,
194+
kCount = 0x2D
162195
};
163196

164197
struct MiddleLowProcessData
@@ -490,9 +523,9 @@ namespace RE
490523

491524
enum class WEAPON_CULL_TYPE
492525
{
493-
kGeneral,
494-
kAnimation,
495-
kWeaponSwitch,
526+
kGeneral = 0x0,
527+
kAnimation = 0x1,
528+
kWeaponSwitch = 0x2,
496529
};
497530

498531
class AITimer
@@ -537,7 +570,7 @@ namespace RE
537570
void KnockExplosion(Actor* a_actor, const NiPoint3& a_location, float a_magnitude)
538571
{
539572
using func_t = decltype(&AIProcess::KnockExplosion);
540-
static REL::Relocation<func_t> func{ REL::ID(533106) };
573+
static REL::Relocation<func_t> func{ REL::ID(2232384) };
541574
return func(this, a_actor, a_location, a_magnitude);
542575
}
543576

@@ -556,7 +589,7 @@ namespace RE
556589
bool RequestLoadAnimationsForWeaponChange(Actor& a_actor)
557590
{
558591
using func_t = decltype(&AIProcess::RequestLoadAnimationsForWeaponChange);
559-
static REL::Relocation<func_t> func{ REL::ID(666002) };
592+
static REL::Relocation<func_t> func{ REL::ID(2231758) };
560593
return func(this, a_actor);
561594
}
562595

@@ -697,46 +730,46 @@ namespace RE
697730

698731
enum class LIFE_STATE : std::uint32_t
699732
{
700-
kAlive,
701-
kDying,
702-
kDead,
703-
kUnconscious,
704-
kReanimate,
705-
kRecycle,
706-
kRestrained,
707-
kEssentialDown,
708-
kBleedout
733+
kAlive = 0x0,
734+
kDying = 0x1,
735+
kDead = 0x2,
736+
kUnconscious = 0x3,
737+
kReanimate = 0x4,
738+
kRecycle = 0x5,
739+
kRestrained = 0x6,
740+
kEssentialDown = 0x7,
741+
kBleedout = 0x8
709742
};
710743

711744
enum class WEAPON_STATE : std::uint32_t
712745
{
713-
kSheathed,
714-
kWantToDraw,
715-
kDrawing,
716-
kDrawn,
717-
kWantToSheathe,
718-
kSheathing
746+
kSheathed = 0x0,
747+
kWantToDraw = 0x1,
748+
kDrawing = 0x2,
749+
kDrawn = 0x3,
750+
kWantToSheathe = 0x4,
751+
kSheathing = 0x5
719752
};
720753

721754
enum class GUN_STATE : std::uint32_t
722755
{
723-
kDrawn,
724-
kRelaxed,
725-
kBlocked,
726-
kAlert,
727-
kReloading,
728-
kThrowing,
729-
kSighted,
730-
kFire,
731-
kFireSighted
756+
kDrawn = 0x0,
757+
kRelaxed = 0x1,
758+
kBlocked = 0x2,
759+
kAlert = 0x3,
760+
kReloading = 0x4,
761+
kThrowing = 0x5,
762+
kSighted = 0x6,
763+
kFire = 0x7,
764+
kFireSighted = 0x8
732765
};
733766

734767
enum class INTERACTING_STATE : std::uint32_t
735768
{
736-
kNotInteracting,
737-
kWaitingToInteract,
738-
kInteracting,
739-
kWaitingToStopInteracting
769+
kNotInteracting = 0x0,
770+
kWaitingToInteract = 0x1,
771+
kInteracting = 0x2,
772+
kWaitingToStopInteracting = 0x3
740773
};
741774

742775
class __declspec(novtable) ActorState :
@@ -881,12 +914,12 @@ namespace RE
881914

882915
enum class DETECTION_PRIORITY
883916
{
884-
kNone = 0,
885-
kVeryLow = 1,
886-
kLow = 2,
887-
kNormal = 3,
888-
kHigh = 4,
889-
kCritical = 5,
917+
kNone = 0x0,
918+
kVeryLow = 0x1,
919+
kLow = 0x2,
920+
kNormal = 0x3,
921+
kHigh = 0x4,
922+
kCritical = 0x5,
890923
};
891924

892925
// add
@@ -1265,6 +1298,20 @@ namespace RE
12651298
return func(this, a_refr, a_owner, a_crime);
12661299
}
12671300

1301+
void UpdateVoiceTimer(bool a_force)
1302+
{
1303+
using func_t = decltype(&Actor::UpdateVoiceTimer);
1304+
static REL::Relocation<func_t> func{ REL::ID(2230178) };
1305+
return func(this, a_force);
1306+
}
1307+
1308+
BGSBodyPartData* GetBodyPartData()
1309+
{
1310+
using func_t = decltype(&Actor::GetBodyPartData);
1311+
static REL::Relocation<func_t> func{ REL::ID(2229571) };
1312+
return func(this);
1313+
}
1314+
12681315
// members
12691316
NiTFlags<std::uint32_t, Actor> niFlags; // 2D0
12701317
float updateTargetTimer; // 2D4
@@ -1366,6 +1413,13 @@ namespace RE
13661413
static REL::Relocation<func_t> func{ REL::ID(2231395) };
13671414
return func(this, a_actor, a_object, a_number, a_slot, a_stackID, a_queueEquip, a_forceEquip, a_playSounds, a_applyNow, a_slotBeingReplaced);
13681415
}
1416+
1417+
void UnequipItem(Actor* a_actor, const EquippedItem* a_equippedItem, bool a_queueEquip)
1418+
{
1419+
using func_t = decltype(&ActorEquipManager::UnequipItem);
1420+
static REL::Relocation<func_t> func{ REL::ID(2231399) };
1421+
return func(this, a_actor, a_equippedItem, a_queueEquip);
1422+
}
13691423
};
13701424
static_assert(sizeof(ActorEquipManager) == 0x60);
13711425
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#pragma once
2+
3+
#include "RE/Bethesda/TESBoundObjects.h"
4+
5+
namespace RE
6+
{
7+
namespace ActorUtils
8+
{
9+
class __declspec(novtable) ArmorRatingVisitorBase
10+
{
11+
public:
12+
static constexpr auto RTTI{ RTTI::ActorUtils__ArmorRatingVisitorBase };
13+
static constexpr auto VTABLE{ VTABLE::ActorUtils__ArmorRatingVisitorBase };
14+
15+
ArmorRatingVisitorBase()
16+
{
17+
stl::emplace_vtable(this);
18+
}
19+
20+
virtual bool ShouldProcess(TESBoundObject*) { return 1; }; // 00
21+
virtual void PostPRocess(TESBoundObject*){}; // 01
22+
23+
Actor* actor; // 08
24+
float rating; // 10
25+
float armorPerks; // 14
26+
bool checkEquipped; // 18
27+
28+
void ctor(const Actor* a_actor, bool a_checkEquipped)
29+
{
30+
using func_t = decltype(&ArmorRatingVisitorBase::ctor);
31+
REL::Relocation<func_t> func{ REL::ID(2227205) };
32+
return func(this, a_actor, a_checkEquipped);
33+
}
34+
35+
ArmorRatingVisitorBase(const Actor* a_actor, bool a_checkEquipped)
36+
{
37+
ctor(a_actor, a_checkEquipped);
38+
}
39+
40+
std::int64_t operator()(const BGSInventoryItem* a_item, std::uint32_t a_stackID)
41+
{
42+
using func_t = decltype(&ArmorRatingVisitorBase::operator());
43+
REL::Relocation<func_t> func{ REL::ID(2227206) };
44+
return func(this, a_item, a_stackID);
45+
}
46+
};
47+
static_assert(offsetof(ArmorRatingVisitorBase, rating) == 0x10);
48+
static_assert(sizeof(ArmorRatingVisitorBase) == 0x20);
49+
50+
class __declspec(novtable) ArmorRatingVisitor :
51+
public ArmorRatingVisitorBase // 00
52+
{
53+
static constexpr auto RTTI{ RTTI::ActorUtils__ArmorRatingVisitor };
54+
static constexpr auto VTABLE{ VTABLE::ActorUtils__ArmorRatingVisitor };
55+
56+
BSScrapArray<TESBoundObject*> foundArmor; // 20
57+
};
58+
static_assert(sizeof(ArmorRatingVisitor) == 0x40);
59+
}
60+
}

0 commit comments

Comments
 (0)