diff --git a/_data/file_formats/item_types.yml b/_data/file_formats/item_types.yml
new file mode 100644
index 00000000..0ba53307
--- /dev/null
+++ b/_data/file_formats/item_types.yml
@@ -0,0 +1,148 @@
+- code: '0x00'
+ type: Books/misc
+- code: '0x01'
+ type: Amulets and necklaces
+- code: '0x02'
+ type: Armor
+- code: '0x03'
+ type: Belts and girdles
+- code: '0x04'
+ type: Boots
+- code: '0x05'
+ type: Arrows
+- code: '0x06'
+ type: Bracers and gauntlets
+- code: '0x07'
+ type: Headgear (Helms, hats, and other head-wear)
+- code: '0x08'
+ type: Keys (not in Icewind Dale?)
+- code: '0x09'
+ type: Potions
+- code: '0x0a'
+ type: Rings
+- code: '0x0b'
+ type: Scrolls
+- code: '0x0c'
+ type: Shields (not in IWD)
+- code: '0x0d'
+ type: Food
+- code: '0x0e'
+ type: Bullets (for a sling)
+- code: '0x0f'
+ type: Bows
+- code: '0x10'
+ type: Daggers
+- code: '0x11'
+ type: Maces (in BG, this includes clubs)
+- code: '0x12'
+ type: Slings
+- code: '0x13'
+ type: Small swords
+- code: '0x14'
+ type: Large swords
+- code: '0x15'
+ type: Hammers
+- code: '0x16'
+ type: Morning stars
+- code: '0x17'
+ type: Flails
+- code: '0x18'
+ type: Darts
+- code: '0x19'
+ type: Axes (specifically, 1-handed axes -- halberds and 2-handed polearms not included)
+- code: '0x1a'
+ type: Quarterstaff
+- code: '0x1b'
+ type: Crossbow
+- code: '0x1c'
+ type: Hand-to-hand weapons (fist, fist irons, punch daggers, etc)
+- code: '0x1d'
+ type: Spears
+- code: '0x1e'
+ type: Halberds (2-handed polearms)
+- code: '0x1f'
+ type: Crossbow bolts
+- code: '0x20'
+ type: Cloaks and robes
+- code: '0x21'
+ type: Gold pieces (not an inventory item, but can appear as "monster dropped" treasure)
+- code: '0x22'
+ type: Gems
+- code: '0x23'
+ type: Wands
+- code: '0x24'
+ type: Containers/eye/broken armor
+- code: '0x25'
+ type: Books/Broken shields/bracelets
+- code: '0x26'
+ type: Familiars/Broken swords/earrings
+- code: '0x27'
+ type: Tattoos (PST)
+- code: '0x28'
+ type: Lenses (PST)
+- code: '0x29'
+ type: Bucklers/teeth
+- code: '0x2a'
+ type: Candles
+- code: '0x2b'
+ type: Unknown
+- code: '0x2c'
+ type: Clubs (IWD)
+- code: '0x2d'
+ type: Unknown
+- code: '0x2e'
+ type: Unknown
+- code: '0x2f'
+ type: Large Shields (IWD)
+- code: '0x30'
+ type: Unknown
+- code: '0x31'
+ type: Medium Shields (IWD)
+- code: '0x32'
+ type: Notes
+- code: '0x33'
+ type: Unknown
+- code: '0x34'
+ type: Unknown
+- code: '0x35'
+ type: Small Shields (IWD)
+- code: '0x36'
+ type: Unknown
+- code: '0x37'
+ type: Telescopes (IWD)
+- code: '0x38'
+ type: Drinks (IWD)
+- code: '0x39'
+ type: Great Swords (IWD)
+- code: '0x3a'
+ type: Container
+- code: '0x3b'
+ type: Fur/pelt
+- code: '0x3c'
+ type: Leather Armor
+- code: '0x3d'
+ type: Studded Leather Armor
+- code: '0x3e'
+ type: Chain Mail
+- code: '0x3f'
+ type: Splint Mail
+- code: '0x40'
+ type: Half Plate
+- code: '0x41'
+ type: Full Plate
+- code: '0x42'
+ type: Hide Armor
+- code: '0x43'
+ type: Robe
+- code: '0x44'
+ type: Unknown
+- code: '0x45'
+ type: Bastard Sword
+- code: '0x46'
+ type: Scarf
+- code: '0x47'
+ type: Food (IWD2)
+- code: '0x48'
+ type: Hat
+- code: '0x49'
+ type: Gauntlet
diff --git a/_data/file_formats/sto_v1/cure.yml b/_data/file_formats/sto_v1/cure.yml
new file mode 100644
index 00000000..cf8d5f02
--- /dev/null
+++ b/_data/file_formats/sto_v1/cure.yml
@@ -0,0 +1,5 @@
+- desc: Filename of SPL
+ type: resref
+- desc: Spell price
+ type: dword
+ offset: 0x8
diff --git a/_data/file_formats/sto_v1/drink.yml b/_data/file_formats/sto_v1/drink.yml
new file mode 100644
index 00000000..20103337
--- /dev/null
+++ b/_data/file_formats/sto_v1/drink.yml
@@ -0,0 +1,9 @@
+- desc: Rumour resource
+ type: resref
+- desc: Drink name strref
+ type: strref
+- desc: Drink price
+ type: dword
+- desc: Alcoholic strength
+ type: dword
+ offset: 0x10
diff --git a/_data/file_formats/sto_v1/header.yml b/_data/file_formats/sto_v1/header.yml
new file mode 100644
index 00000000..9b38ecdf
--- /dev/null
+++ b/_data/file_formats/sto_v1/header.yml
@@ -0,0 +1,106 @@
+- desc: Signature ('STOR')
+ type: char array
+ length: 4
+
+- desc: Version ('V1.0')
+ type: char array
+ length: 4
+
+- desc: Type (0=Store, 1=Tavern, 2=Inn, 3=Temple, 5=Container)
+ type: dword
+
+- desc: name
+ type: strref
+
+- desc: |
+ Flags
+ - bit 0: User allowed to buy
+ - bit 1: User allowed to sell
+ - bit 2: User allowed to identify items
+ - bit 3: User allowed to steal
+ - bit 4: User allowed to donate money
+ - bit 5: User allowed to purchase cures
+ - bit 6: User allowed to purchase drinks
+ - bit 7: Unknown
+ - bit 8: Unknown
+ - bit 9: Quality 1 (tvrnqul0-3)
+ - bit 10: Quality 2 (tvrnqul0-3)
+ - bit 11: Unknown
+ - bit 12: Buy Fenced Goods
+ - bit 13: Reputation doesn't affect prices (BGEE)
+ - bit 14: Toggle item recharge (TobEx)
+ - bit 15: **User allowed to sell [critical]({{ "/file_formats/ie_formats/itm_v1.htm#Header_Flags_BIT0" | prepend: relurl }}) items** (BGEE)
+ type: dword
+
+- desc: Store "sell price markup" (percentage of base price store charges for items)
+ type: dword
+
+- desc: Store "buy price markup" (percentage of base price store is willing to pay)
+ type: dword
+
+- desc: Depreciation rate
+ type: dword
+
+- desc: "% chance of steal failure"
+ type: word
+
+- desc: Capacity (0=unlimited)
+ type: word
+
+- desc: Unknown
+ type: byte array
+ length: 8
+
+- desc: Offset to [items purchased](#storv1_0_Buy) section
+ type: dword
+- desc: Count of items in [items purchased](#storv1_0_Buy) section
+ type: dword
+
+- desc: Offset to [items for sale](#storv1_0_Sale) section
+ type: dword
+- desc: Count of [items for sale](#storv1_0_Sale)
+ type: dword
+
+- desc: Lore
+ type: dword
+
+- desc: ID Price
+ type: dword
+
+- desc: Rumours (Tavern)
+ type: resref
+
+- desc: Offset to [drinks](#storv1_0_Drink) section
+ type: dword
+- desc: Count of [drinks](#storv1_0_Drink)
+ type: dword
+
+- desc: Rumours (Temple)
+ type: resref
+
+- desc: |
+ Room flags
+ - bit 0: Peasant
+ - bit 1: Merchant
+ - bit 2: Noble
+ - bit 3: Royal
+ type: dword
+
+- desc: Price of a peasant room
+ type: dword
+- desc: Price of a merchant room
+ type: dword
+- desc: Price of a noble room
+ type: dword
+- desc: Price of a royal room
+ type: dword
+
+- desc: Offset to [cures](#storv1_0_Cure) section
+ type: dword
+- desc: Count of [cures](#storv1_0_Cure)
+ type: dword
+
+- desc: Unknown
+ type: byte array
+ length: 36
+ offset: 0x78
diff --git a/_data/file_formats/sto_v1/item.yml b/_data/file_formats/sto_v1/item.yml
new file mode 100644
index 00000000..a88e957f
--- /dev/null
+++ b/_data/file_formats/sto_v1/item.yml
@@ -0,0 +1,25 @@
+- desc: Filename of ITM
+ type: resref
+- desc: Item expiration time (replace with drained item)
+ type: word
+- desc: Quantity/Charges 1
+ type: word
+- desc: Quantity/Charges 2
+ type: word
+- desc: Quantity/Charges 3
+ type: word
+- desc: |
+ Flags
+ - bit 0: Identified
+ - bit 1: Unstealable
+ - bit 2: Stolen
+ - bit 3: **Undroppable**
+ type: dword
+- desc: Amount of this item in stock
+ type: dword
+- desc: |
+ Infinite supply flag (0=limited stock, 1=infinite stock)
+
+ Items with this flag set are automatically shown as identified
+ type: dword
+ offset: 0x18
diff --git a/_includes/item_types.html b/_includes/item_types.html
new file mode 100644
index 00000000..4ad80db0
--- /dev/null
+++ b/_includes/item_types.html
@@ -0,0 +1,37 @@
+
+
Code | +Item type | +
---|---|
{{ item.code }} | + + {% if item.type == "Unknown" %} + {% assign type = '{{ type }} | +
Offset | -Size (data type) | -Description | -|
---|---|---|---|
0x0000 | -4 (char array) | -Signature ('STOR') | -|
0x0004 | -4 (char array) | -Version ('V1.0') | -|
0x0008 | -4 (dword) | -Type (0=Store, 1=Tavern, 2=Inn, 3=Temple, 5=Container) | -|
0x000c | -4 (strref) | -Name | -|
0x0010 | -4 (dword) | -Flags
-
|
- |
0x0014 | -4 (dword) | -Store "sell price markup" (percentage of base price store charges for items) | -|
0x0018 | -4 (dword) | -Store "buy price markup" (percentage of base price store is willing to pay) | -|
0x001c | -4 (dword) | -Depreciation rate | -|
0x0020 | -2 (word) | -% chance of steal failure | -|
0x0022 | -2 (word) | -Capacity (0=unlimited) | -|
0x0024 | -8 (bytes) | -Unknown |
- |
0x002c | -4 (dword) | -Offset to items purchased section | -|
0x0030 | -4 (dword) | -Count of items in items purchased section | -|
0x0034 | -4 (dword) | -Offset to items for sale section | -|
0x0038 | -4 (dword) | -Count of items for sale | -|
0x003c | -4 (dword) | -Lore | -|
0x0040 | -4 (dword) | -ID Price | -|
0x0044 | -8 (resref) | -Rumours (Tavern) | -|
0x004c | -4 (dword) | -Offset to drinks section | -|
0x0050 | -4 (dword) | -Count of drinks | -|
0x0054 | -8 (resref) | -Rumours (Temple) | -|
0x005c | -4 (dword) | -Room flags
-
|
- |
0x0060 | -4 (dword) | -Price of a peasant room | -|
0x0064 | -4 (dword) | -Price of a merchant room | -|
0x0068 | -4 (dword) | -Price of a noble room | - |
0x006c | -4 (dword) | -Price of a royal room | -|
0x0070 | -4 (dword) | -Offset to cures section | -|
0x0074 | -4 (dword) | -Count of cures | -|
0x0078 | -36 (bytes) | -Unknown |
-
Offset | -Size (data type) | -Description | -
---|---|---|
0x0000 | -8 (resref) | -Filename of ITM | -
0x0008 | -2 (word) | -Item expiration time (replace with drained item) | -
0x000a | -2 (word) | -Quantity/Charges 1 | -
0x000c | -2 (word) | -Quantity/Charges 2 | -
0x000e | -2 (word) | -Quantity/Charges 3 | -
0x0010 | -4 (dword) | -Flags
-
|
-
0x0014 | -4 (dword) | -Amount of this item in stock | -
0x0018 | -4 (dword) | -Infinite supply flag (0=limited stock, 1=infinite stock) - Note: Items with this flag set are automatically shown as identified - |
-
Offset | -Size (data type) | -Description | -
---|---|---|
0x0000 | -8 (resref) | -Rumour resource | -
0x0008 | -4 (strref) | -Drink name strref | -
0x000c | -4 (dword) | -Drink price | -
0x0010 | -4 (dword) | -Alcoholic strength | -
Offset | -Size (data type) | -Description | -
---|---|---|
0x0000 | -8 (resref) | -Filename of SPL | -
0x0008 | -4 (dword) | -Spell price | -
Code | -Item type | -
---|---|
0x0000 | -Books/misc | -
0x0001 | -Amulets and necklaces | -
0x0002 | -Armor | -
0x0003 | -Belts and girdles | -
0x0004 | -Boots | -
0x0005 | -Arrows | -
0x0006 | -Bracers and gauntlets | -
0x0007 | -Helms, hats, and other head-wear | -
0x0008 | -Keys (not in Icewind Dale?) | -
0x0009 | -Potions | -
0x000a | -Rings | -
0x000b | -Scrolls | -
0x000c | -Shields (not in IWD) | -
0x000d | -Food | -
0x000e | -Bullets (for a sling) | -
0x000f | -Bows | -
0x0010 | -Daggers | -
0x0011 | -Maces (in BG, this includes clubs) | -
0x0012 | -Slings | -
0x0013 | -Short swords | -
0x0014 | -Long swords (in BG, this includes 2-handed and bastard swords) | -
0x0015 | -Hammers | -
0x0016 | -Morning stars | -
0x0017 | -Flails | -
0x0018 | -Darts | -
0x0019 | -Axes (specifically, 1-handed axes -- halberds and 2-handed polearms - not included) | -
0x001a | -Quarterstaff | -
0x001b | -Crossbow | -
0x001c | -Hand-to-hand weapons (fist, fist irons, punch daggers, etc) | -
0x001d | -Spears | -
0x001e | -Halberds (2-handed polearms) | -
0x001f | -Crossbow bolts | -
0x0020 | -Cloaks and robes | -
0x0021 | -Gold pieces (not an inventory item, but can appear as "monster - dropped" treasure) | -
0x0022 | -Gems | -
0x0023 | -Wands | -
0x0024 | -Bag/eye/broken armor | -
0x0025 | -Broken shield/bracelet | -
0x0026 | -Broken sword/earring | -
0x0027 | -Tattoos (PST) | -
0x0028 | -Lenses(PST) | -
0x0029 | -Buckler/teeth | -
0x002a | -Candle | -
0x002b | -Unknown |
-
0x002c | -Clubs(IWD) | -
0x002d | -Unknown |
-
0x002e | -Unknown |
-
0x002f | -Large Shield(IWD) | -
0x0030 | -Unknown |
-
0x0031 | -Medium Shield(IWD) | -
0x0032 | -Notes | -
0x0033 | -Unknown |
-
0x0034 | -Unknown |
-
0x0035 | -Small Shield(IWD) | -
0x0036 | -Unknown |
-
0x0037 | -Telescope(IWD) | -
0x0038 | -Drink(IWD) | -
0x0039 | -Great Sword(IWD) | -
0x003a | -Container | -
0x003b | -Fur/pelt | -
0x003c | -Leather Armor | -
0x003d | -Studded Leather Armor | -
0x003e | -Chain Mail | -
0x003f | -Splint Mail | -
0x0040 | -Half Plate | -
0x0041 | -Full Plate | -
0x0042 | -Hide Armor | -
0x0043 | -Robe | -
0x0044 | -Unknown |
-
0x0045 | -Bastard Sword | -
0x0046 | -Scarf | -
0x0047 | -Food(IWD2) | -
0x0048 | -Hat | -
0x0049 | -Gauntlet | -