Skip to content

Commit

Permalink
feat: BGSCraftableForm classes (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored Nov 23, 2023
1 parent ab77fb8 commit 6fcf120
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
47 changes: 47 additions & 0 deletions CommonLibSF/include/RE/B/BGSConstructibleObject.h
Original file line number Diff line number Diff line change
@@ -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<BGSKeyword*> category; // 148 - std::vector<BGSKeyword*, BSTHeapSTLAllocator<BGSKeyword, 2>
TESBoundObject* unk160; // 160
BGSCurveForm* unk168; // 168
TESGlobal* buildLimit; // 170
BSTArray<BSTTuple3<TESForm*, BGSCurveForm*, BGSTypedFormValuePair::SharedVal>>* unk178; // 178
stl::enumeration<LEARN_METHOD, std::uint8_t> learnMethod; // 180
TESGlobal* unk188; // 188
BGSKeyword* unk190; // 190
std::uint32_t unk198; // 198
};
static_assert(sizeof(BGSConstructibleObject) == 0x1A0);
}
40 changes: 40 additions & 0 deletions CommonLibSF/include/RE/B/BGSCraftableForm.h
Original file line number Diff line number Diff line change
@@ -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<BSTTuple3<TESForm*, BGSCurveForm*, BGSTypedFormValuePair::SharedVal>>* components; // 70
BSTArray<BSTTuple3<TESForm*, BGSCurveForm*, BGSTypedFormValuePair::SharedVal>>* requiredPerks; // 78
TESForm* createdObject; // 80
std::uint8_t unk88; // 88
float menuSortOrder; // 8C
std::uint8_t unk90; // 90
};
static_assert(sizeof(BGSCraftableForm) == 0x98);
}
20 changes: 20 additions & 0 deletions CommonLibSF/include/RE/B/BGSResearchProjectForm.h
Original file line number Diff line number Diff line change
@@ -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<BGSResearchProjectForm*> requiredProjects; // A0
};
static_assert(sizeof(BGSResearchProjectForm) == 0xB0);
}

0 comments on commit 6fcf120

Please sign in to comment.