OpenEnroth 2a41f3e
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ItemTable Struct Reference

#include <ItemTable.h>

Public Member Functions

void Initialize (GameResourceManager *resourceManager)
 
void LoadPotions (const Blob &potions)
 
void LoadPotionNotes (const Blob &potionNotes)
 
void LoadItemSizes ()
 
void generateItem (ItemTreasureLevel treasureLevel, RandomItemType uTreasureType, Item *pItem)
 

Public Attributes

IndexedArray< ItemData, ITEM_FIRST_VALID, ITEM_LAST_VALIDitems
 
IndexedArray< Sizei, ITEM_FIRST_VALID, ITEM_LAST_VALIDitemSizes
 
IndexedArray< StandardEnchantmentData, ATTRIBUTE_FIRST_ENCHANTABLE, ATTRIBUTE_LAST_ENCHANTABLEstandardEnchantments
 
IndexedArray< SpecialEnchantmentData, ITEM_ENCHANTMENT_FIRST_VALID, ITEM_ENCHANTMENT_LAST_VALIDspecialEnchantments
 
char field_9FC4 [5000]
 
char field_B348 [5000]
 
char field_C6D0 [5000]
 
char field_DA58 [5000]
 
char field_EDE0 [384]
 
IndexedArray< IndexedArray< ItemId, ITEM_FIRST_REAL_POTION, ITEM_LAST_REAL_POTION >, ITEM_FIRST_REAL_POTION, ITEM_LAST_REAL_POTIONpotionCombination
 
IndexedArray< IndexedArray< uint16_t, ITEM_FIRST_REAL_POTION, ITEM_LAST_REAL_POTION >, ITEM_FIRST_REAL_POTION, ITEM_LAST_REAL_POTIONpotionNotes
 
IndexedArray< unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOMitemChanceSumByTreasureLevel
 
IndexedArray< unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOMstandardEnchantmentChanceForEquipment
 
IndexedArray< unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOMspecialEnchantmentChanceForEquipment
 
IndexedArray< unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOMspecialEnchantmentChanceForWeapons
 
IndexedArray< unsigned int, ITEM_TYPE_FIRST_NORMAL_ENCHANTABLE, ITEM_TYPE_LAST_NORMAL_ENCHANTABLEstandardEnchantmentChanceSumByItemType
 
IndexedArray< Segment< int >, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOMstandardEnchantmentRangeByTreasureLevel
 

Member Function Documentation

◆ generateItem()

void ItemTable::generateItem ( ItemTreasureLevel  treasureLevel,
RandomItemType  uTreasureType,
Item pItem 
)
Original binary offset:
0x456620

◆ Initialize()

void ItemTable::Initialize ( GameResourceManager resourceManager)

◆ LoadItemSizes()

void ItemTable::LoadItemSizes ( )

◆ LoadPotionNotes()

void ItemTable::LoadPotionNotes ( const Blob potionNotes)

◆ LoadPotions()

void ItemTable::LoadPotions ( const Blob potions)

Member Data Documentation

◆ field_9FC4

char ItemTable::field_9FC4[5000]

◆ field_B348

char ItemTable::field_B348[5000]

◆ field_C6D0

char ItemTable::field_C6D0[5000]

◆ field_DA58

char ItemTable::field_DA58[5000]

◆ field_EDE0

char ItemTable::field_EDE0[384]

◆ itemChanceSumByTreasureLevel

IndexedArray<unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOM> ItemTable::itemChanceSumByTreasureLevel

Items have a per-treasure level chances to be randomly generated. This array is a per-treasure level sum of these chances for all items. Effectively used for weighted random sampling in item generation.

◆ items

Item data for all items in the game.

◆ itemSizes

Item sizes in inventory slots for all items in the game.

◆ potionCombination

Mapping potion1 x potion2 => potion3. Alchemy recipes, basically.

ITEM_NULL means "can't mix even if you try", and is set for cases when potion1 == potion2. Item ids in [1, 4] denote damage level from mixing.

◆ potionNotes

Index of autonote bit (Party::_autonoteBits) for the potion recipe.

Can be zero for valid potion combination when resulting potion is of lower grade than it's components, e.g. Cure Paralysis (white) + Cure Wounds (red) = Cure Wounds (red).

◆ specialEnchantmentChanceForEquipment

IndexedArray<unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOM> ItemTable::specialEnchantmentChanceForEquipment

Chance to get an attribute enchantment OR a special enchantment on a non-weapon item, by treasure level. Number in [0, 100]. This basically a cumulative chance to get some enchantment.

◆ specialEnchantmentChanceForWeapons

IndexedArray<unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOM> ItemTable::specialEnchantmentChanceForWeapons

Chance to get a special enchantment on a weapon, by treasure level. Number in [0, 100].

◆ specialEnchantments

Data for special item enchantments.

◆ standardEnchantmentChanceForEquipment

IndexedArray<unsigned int, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOM> ItemTable::standardEnchantmentChanceForEquipment

Chance to get a standard enchantment on a non-weapon item, by treasure level. Number in [0, 100].

◆ standardEnchantmentChanceSumByItemType

IndexedArray<unsigned int, ITEM_TYPE_FIRST_NORMAL_ENCHANTABLE, ITEM_TYPE_LAST_NORMAL_ENCHANTABLE> ItemTable::standardEnchantmentChanceSumByItemType

Standard enchantments have a per-item type chance to be randomly generated. This array is a per-item type sum of these chances for all standard enchantments. Effectively used for weighted random sampling in standard enchantment generation.

◆ standardEnchantmentRangeByTreasureLevel

IndexedArray<Segment<int>, ITEM_TREASURE_LEVEL_FIRST_RANDOM, ITEM_TREASURE_LEVEL_LAST_RANDOM> ItemTable::standardEnchantmentRangeByTreasureLevel

Ranges of standard enchantment strength by item treasure level.

◆ standardEnchantments

Data for standard item enchantments.


The documentation for this struct was generated from the following files: