From cbdb57ad5c1e93ac4e57fcf133de54b94577d103 Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Thu, 23 Nov 2023 22:12:37 +0530 Subject: [PATCH] feat: `BGSCraftableForm` classes --- .../include/RE/B/BGSConstructibleObject.h | 47 +++++++++++++++++++ CommonLibSF/include/RE/B/BGSCraftableForm.h | 40 ++++++++++++++++ .../include/RE/B/BGSResearchProjectForm.h | 20 ++++++++ 3 files changed, 107 insertions(+) create mode 100644 CommonLibSF/include/RE/B/BGSConstructibleObject.h create mode 100644 CommonLibSF/include/RE/B/BGSCraftableForm.h create mode 100644 CommonLibSF/include/RE/B/BGSResearchProjectForm.h diff --git a/CommonLibSF/include/RE/B/BGSConstructibleObject.h b/CommonLibSF/include/RE/B/BGSConstructibleObject.h new file mode 100644 index 00000000..561daf46 --- /dev/null +++ b/CommonLibSF/include/RE/B/BGSConstructibleObject.h @@ -0,0 +1,47 @@ +#pragma once + +#include "RE/B/BGSCraftableForm.h" +#include "RE/B/BGSCraftingUseSound.h" +#include "RE/B/BGSPickupPutdownSounds.h" +#include "RE/B/BSTList.h" +#include "RE/T/TESValueForm.h" + +namespace RE +{ + class TESBoundObject; + class TESGlobal; + + class BGSConstructibleObject : + public BGSCraftableForm, // 000 + public BGSPickupPutdownSounds, // 098 + public TESValueForm, // 100 + public BGSCraftingUseSound // 110 + { + public: + SF_RTTI_VTABLE(BGSConstructibleObject); + SF_FORMTYPE(COBJ); + + enum class LEARN_METHOD + { + kPickupOrScript, + kScrapping, + kIngestion, + kDefaultOrConditionsMet, + kPlan + }; + + ~BGSConstructibleObject() override; // 00 + + // members + std::vector category; // 148 - std::vector + TESBoundObject* unk160; // 160 + BGSCurveForm* unk168; // 168 + TESGlobal* buildLimit; // 170 + BSTArray>* unk178; // 178 + stl::enumeration learnMethod; // 180 + TESGlobal* unk188; // 188 + BGSKeyword* unk190; // 190 + std::uint32_t unk198; // 198 + }; + static_assert(sizeof(BGSConstructibleObject) == 0x1A0); +} diff --git a/CommonLibSF/include/RE/B/BGSCraftableForm.h b/CommonLibSF/include/RE/B/BGSCraftableForm.h new file mode 100644 index 00000000..4848c340 --- /dev/null +++ b/CommonLibSF/include/RE/B/BGSCraftableForm.h @@ -0,0 +1,40 @@ +#pragma once + +#include "RE/B/BGSTypedFormValuePair.h" +#include "RE/B/BSTArray.h" +#include "RE/B/BSTTuple3.h" +#include "RE/T/TESCondition.h" +#include "RE/T/TESDescription.h" +#include "RE/T/TESForm.h" +#include "RE/T/TESFullName.h" + +namespace RE +{ + class BGSCurveForm; + class BGSKeyword; + + class BGSCraftableForm : + public TESForm, // 00 + public TESDescription, // 30 + public TESFullName // 48 + { + public: + SF_RTTI_VTABLE(BGSCraftableForm); + + ~BGSCraftableForm() override; // 00 + + // add + virtual void Unk_62(); // 62 + + // members + BGSKeyword* benchKeyword; // 58 + TESCondition conditions; // 60 + BSTArray>* components; // 70 + BSTArray>* requiredPerks; // 78 + TESForm* createdObject; // 80 + std::uint8_t unk88; // 88 + float menuSortOrder; // 8C + std::uint8_t unk90; // 90 + }; + static_assert(sizeof(BGSCraftableForm) == 0x98); +} diff --git a/CommonLibSF/include/RE/B/BGSResearchProjectForm.h b/CommonLibSF/include/RE/B/BGSResearchProjectForm.h new file mode 100644 index 00000000..789d8045 --- /dev/null +++ b/CommonLibSF/include/RE/B/BGSResearchProjectForm.h @@ -0,0 +1,20 @@ +#pragma once + +#include "RE/B/BGSCraftableForm.h" + +namespace RE +{ + class BGSResearchProjectForm : public BGSCraftableForm + { + public: + SF_RTTI_VTABLE(BGSResearchProjectForm); + SF_FORMTYPE(RSPJ); + + ~BGSResearchProjectForm() override; // 00 + + // members + BGSKeyword* category; // 98 + BSTArray requiredProjects; // A0 + }; + static_assert(sizeof(BGSResearchProjectForm) == 0xB0); +}