Skip to content

Commit 404d1c5

Browse files
committed
Map more stats internals
1 parent e269625 commit 404d1c5

1 file changed

Lines changed: 125 additions & 105 deletions

File tree

  • BG3Extender/GameDefinitions/Stats

‎BG3Extender/GameDefinitions/Stats/Stats.h‎

Lines changed: 125 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,32 @@ struct ModifierList : public Noncopyable<ModifierList>
6565
}
6666
};
6767

68+
struct ItemTypeBoostGroup
69+
{
70+
TrackedCompactSet<FixedString> Boosts;
71+
int32_t field_10;
72+
};
73+
74+
struct ItemTypeLevelGroup
75+
{
76+
int32_t Type;
77+
Array<ItemTypeBoostGroup*> BoostGroups;
78+
};
79+
6880
struct ItemType
6981
{
70-
// UNMAPPED
82+
STDString Color;
83+
FixedString Name2;
84+
float field_1C;
85+
int32_t Index;
86+
FixedString Name3;
87+
FixedString Name4;
88+
Array<ItemTypeLevelGroup*> LevelGroups;
7189
FixedString Name;
7290

7391
inline FixedString const& GetElementName() const
7492
{
75-
return Name;
93+
return Name2;
7694
}
7795
};
7896

@@ -81,35 +99,115 @@ struct ItemTypeManager : public CNamedElementManager<ItemType>
8199
uint64_t Unknown;
82100
};
83101

84-
/*
85-
struct CSkillSet
102+
struct EquipmentGroup
86103
{
87104
FixedString Name;
88-
ObjectSet<FixedString> Skills;
105+
TrackedCompactSet<FixedString> Equipment;
89106
};
90107

91-
struct CSkillSetManager : public CNamedElementManager<CSkillSet>
108+
struct EquipmentSet
92109
{
93-
CSkillSet * ParsedSkillSet;
110+
FixedString Name;
111+
BYTE WeaponSetType;
112+
Vector<EquipmentGroup> EquipmentGroups;
94113
};
95114

96-
struct CEquipmentGroup
115+
struct SpellSet
97116
{
98117
FixedString Name;
99-
ObjectSet<FixedString> Equipment;
118+
AbilityId Ability;
119+
uint32_t LearningStrategy;
120+
TrackedCompactSet<FixedString> Spells;
121+
};
122+
123+
struct NameGroupName
124+
{
125+
int Frequency;
126+
TranslatedString Name;
127+
TranslatedString Name2;
100128
};
101129

102-
struct CEquipmentSet
130+
struct NameGroup
103131
{
104132
FixedString Name;
105-
Vector<CEquipmentGroup*> Groups;
133+
Array<NameGroupName*> Names;
134+
Array<NameGroupName*> NamesCool;
135+
};
136+
137+
struct NameGroupLink
138+
{
139+
int Frequency;
140+
FixedString NameGroup;
141+
int Type;
142+
FixedString ItemName;
106143
};
107144

108-
struct CEquipmentSetManager : public CNamedElementManager<CEquipmentSet>
145+
struct RootGroup
109146
{
110-
CEquipmentSet * ParsedEquipmentSet;
147+
int32_t Frequency;
148+
FixedString RootGroup;
149+
FixedString field_10;
150+
Array<NameGroupLink*> NameGroups;
111151
};
112-
*/
152+
153+
struct LevelGroup
154+
{
155+
int32_t MinLevel;
156+
int32_t MaxLevel;
157+
FixedString Name;
158+
Array<RootGroup*> RootGroups;
159+
};
160+
161+
struct ItemGroup
162+
{
163+
FixedString Name;
164+
int32_t field_4;
165+
Array<LevelGroup*> LevelGroups;
166+
};
167+
168+
169+
struct ItemProgressionManager : ProtectedGameObject<ItemProgressionManager>
170+
{
171+
LegacyMap<FixedString, ItemGroup*> ItemGroups;
172+
LegacyMap<FixedString, NameGroup*> NameGroups;
173+
ItemGroup* CurrentItemGroup;
174+
LevelGroup* CurrentLevelGroup;
175+
RootGroup* CurrentRootGroup;
176+
NameGroup* CurrentNameCool;
177+
};
178+
179+
struct ItemCombinationResultItem
180+
{
181+
FixedString Result;
182+
int32_t Amount;
183+
};
184+
185+
struct ItemCombinationResult
186+
{
187+
Array<ItemCombinationResultItem> Items;
188+
FixedString PreviewStatsID;
189+
FixedString PreviewIcon;
190+
TranslatedString field_18;
191+
FixedString PreviewTooltip;
192+
};
193+
194+
struct ItemCombinationIngredient
195+
{
196+
FixedString Object;
197+
uint32_t IngredientType;
198+
uint32_t TransformType;
199+
uint8_t CombineType;
200+
};
201+
202+
struct ItemCombination
203+
{
204+
FixedString Name;
205+
Array<ItemCombinationIngredient> Ingredients;
206+
Array<ItemCombinationResult> Results;
207+
uint8_t AlchemyCombineType;
208+
Guid DyeColorPresetResource;
209+
};
210+
113211

114212
struct TreasureSubTableCategory
115213
{
@@ -191,88 +289,6 @@ struct RPGStats_Treasure_Object_Info
191289
int Amount;
192290
};
193291

194-
/*
195-
struct CNameGroupName
196-
{
197-
int field_0;
198-
TranslatedString Name;
199-
TranslatedString Name2;
200-
};
201-
202-
203-
struct CNameGroup
204-
{
205-
FixedString Name;
206-
ObjectSet<CNameGroupName*> Names;
207-
ObjectSet<CNameGroupName*> NamesCool;
208-
};
209-
210-
211-
struct CNameGroupLink
212-
{
213-
int field_0;
214-
FixedString NameGroup;
215-
int NoneCoolSuffix;
216-
FixedString ItemName;
217-
};
218-
219-
220-
struct CRootGroup
221-
{
222-
int MinLevel;
223-
int MaxLevel;
224-
FixedString RootGroup;
225-
FixedString field_10;
226-
ObjectSet<CNameGroupLink*> NameGroupLinks;
227-
};
228-
229-
230-
struct CLevelGroup
231-
{
232-
int MinLevel;
233-
int MaxLevel;
234-
FixedString Name;
235-
ObjectSet<CRootGroup*> RootGroups;
236-
};
237-
238-
239-
struct CItemGroup
240-
{
241-
FixedString Name;
242-
ObjectSet<CLevelGroup*> LevelGroups;
243-
};
244-
245-
246-
struct CItemProgressionManager : public ProtectedGameObject<CItemProgressionManager>
247-
{
248-
LegacyMap<FixedString, CItemGroup*> ItemGroups;
249-
LegacyMap<FixedString, CNameGroup*> NameGroups;
250-
CItemGroup* CurrentItemGroup;
251-
CLevelGroup* CurrentLevelGroup;
252-
CRootGroup* CurrentRootGroup;
253-
CNameGroup* CurrentNameGroup;
254-
};
255-
256-
257-
MARK_ALLOCATABLE(CSkillSet);
258-
MARK_ALLOCATABLE(CEquipmentGroup);
259-
MARK_ALLOCATABLE(CEquipmentSet);*/
260-
MARK_ALLOCATABLE(TreasureSubTable);
261-
MARK_ALLOCATABLE(TreasureSubTableCategory);
262-
MARK_ALLOCATABLE(TreasureTable);
263-
MARK_ALLOCATABLE(TreasureCategory);
264-
MARK_ALLOCATABLE(TreasureCategoryItem);
265-
/*MARK_ALLOCATABLE(CNameGroupName);
266-
MARK_ALLOCATABLE(CNameGroup);
267-
MARK_ALLOCATABLE(CNameGroupLink);
268-
MARK_ALLOCATABLE(CRootGroup);
269-
MARK_ALLOCATABLE(CLevelGroup);
270-
MARK_ALLOCATABLE(CItemGroup);
271-
272-
273-
extern CRPGStatsVMTMappings gCRPGStatsVMTMappings;
274-
*/
275-
276292
struct RNG
277293
{
278294
uint32_t* Numbers;
@@ -325,23 +341,27 @@ struct RPGStats : public ProtectedGameObject<RPGStats>
325341
CNamedElementManager<TreasureTable> TreasureTables;
326342
ItemTypeManager ItemTypes;
327343
LegacyMap<FixedString, Functors*> StatsFunctors;
328-
uint64_t Unkn1[9];
344+
RPGEnumeration* CurrentParsedValueList;
345+
Modifier* CurrentParsedType;
346+
TreasureTable* CurrentTreasureTable;
347+
TreasureCategory* CurrentTreasureCategory;
348+
uint64_t RNG[5];
329349
HashMap<FixedString, float>* ExtraData;
330-
LegacyMap<FixedString, FixedString> field_290;
331-
LegacyMap<FixedString, void*> field_2A8;
332-
LegacyMap<FixedString, void*> field_2C0;
333-
LegacyMap<FixedString, void*> field_2D8;
350+
LegacyMap<FixedString, FixedString> CategoryMappings;
351+
LegacyMap<FixedString, int32_t> WeaponCounters;
352+
LegacyMap<FixedString, int32_t> SpellbookCounters;
353+
LegacyMap<FixedString, int32_t> ArmorCounters;
334354
LegacyRefMap<FixedString, void*> field_2F0;
335355
FixedString TreasureRarities[7];
336356
TrackedCompactSet<FixedString> FixedStrings;
337357
Array<int64_t*> Int64s;
338358
Array<Guid> GUIDs;
339359
Array<float> Floats;
340360
Array<TranslatedString> TranslatedStrings;
341-
void* EquipmentSetManager;
342-
void* SpellSetManager;
343-
void* ItemProgressionManager;
344-
void* ItemCombinationManager;
361+
CNamedElementManager<EquipmentSet>* EquipmentSetManager;
362+
CNamedElementManager<SpellSet>* SpellSetManager;
363+
ItemProgressionManager* ItemProgressionManager;
364+
CNamedElementManager<ItemCombination>* ItemCombinationManager;
345365
void* CurrentDataBuffer;
346366
FixedString CurrentDataBufferPath;
347367
LegacyMap<FixedString, int32_t> PreParsedDataBufferMap;

0 commit comments

Comments
 (0)