STOR files

Description

These files contain a description of the types of items and services available for sale in a given store, inn, tavern, or temple.

STOR file versions

STOR V1.0

Overall structure

STOR V1.0 Header

OffsetSize (datatype)Description
0x00004 (char array)Signature ('STOR')
0x00044 (char array)Version ('V1.0')
0x00084 (dword)Type? (0=store, 1=tavern, 2=inn, 3=temple)
0x000c4 (strref)Name
0x00104 (dword)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 purchase cures
  • bit 5: User allowed to donate money
  • bit 6: User allowed to purchase drinks
0x00144 (dword)Store "sell price markup" (percentage of base price store charges for items)
0x00184 (dword)Store "buy price markup" (percentage of base price store is willing to pay)
0x001c4 (dword)Unknown
0x00204 (dword)Unknown
0x00248 (bytes)Unknown
0x002c4 (dword)Offset to Items purchased here section
0x00304 (dword)Count of items in Items purchased here section.
0x00344 (dword)Offset to Items for sale section.
0x00384 (dword)Count of Items for sale
0x003c4 (dword)Unknown (usually 0x64).
0x00404 (dword)Unknown (usually 0x64).
0x00448 (resref)Dialog resource for rumors.
0x004c4 (dword)Offset to Drinks section.
0x00504 (dword)Count of Drinks.
0x00548 (resref)Dialog resource for ???.
0x005c4 (dword)Bitmapped flags indicating room types available for rent:
  • bit 0: peasant
  • bit 1: merchant
  • bit 2: noble
  • bit 3: royal
.
0x00604 (dword)Price of a peasant room.
0x00644 (dword)Price of a merchant room.
0x00684 (dword)Price of a noble room.
0x006c4 (dword)Price of a royal room.
0x00704 (dword)Offset to Cures section.
0x00744 (dword)Count of Cures.
0x007836 (bytes)Unknown

STOR V1.0 Items for Sale

OffsetSize (datatype)Description
0x00008 (resref)Resource name of the item in question
0x00082 (word)Unknown
0x000a2 (word)Usage 1. This is the first parameter passed when CreateItem is called from a script, for instance. This value probably means "the number of 'primary' uses of this item". For quantity items, this is a quantity. For some magical items, this is a number of charges. (Some items may have more than one usable magical aspect -- for instance, cast fireball 5 times and aganazzar's scorcher 10 times. In a case like that, this would be 5.)
0x000c2 (word)Usage 2. This is the second parameter passed when CreateItem is called from a script, for instance. This value probably means "the number of 'secondary' uses of this item". (For items which have more than one usable aspect -- for instance, cast fireball 5 times and aganazzar's scorcher 10 times. In a case like that, this would be 10.)
0x000e2 (word)Usage 3. This is the third parameter passed when CreateItem is called from a script, for instance. This value probably means "the number of 'tertiary' uses of this item".
0x00104 (dword)Flags. To be filled in later.
0x00144 (dword)Number of this item in stock.
0x00184 (dword)Infinite supply flag (?)

STOR V1.0 Drinks for Sale

OffsetSize (datatype)Description
0x00008 (bytes)Unknown
0x00084 (strref)Drink name
0x000c4 (dword)Drink price
0x00104 (dword)Unknown. Maybe "percentage chance of hearing a rumor if you buy this", or may indicate the strength of the alcohol's intoxicative facility.

STOR V1.0 Cures for Sale

OffsetSize (datatype)Description
0x00008 (resref)Resource name of the spell to be cast on the selected person
0x00084 (dword)Price of this cure

STOR V1.0 Items Purchased Here

This is an array of dwords. These dwords indicate categories of items from the Item category codes table. The category code can also be found inside the ITM file for an itm.

[ back to index ]