STF
.STF holds shop stuff. The length of each record is stored in BINSIZE.BIN and is currently 84 bytes. 50 records per shop corresponding to 50 items.
There are always at least 1 more record in the .STF lump then the last store needs. The reason why, it is a secret to everyone.
If you have more than one shop, there should be at least this many records..:
( ( num_shops - 1 ) * 50 ) + num_things_in_last_shop.
When the file size is smaller than this, the last N shops are empty (and hence no data ever got stored for them.)
The last shop having <50 records as shown above, is caused by OHRRPGCE's use of random-access I/O.
If a record is stored but not used, it is likely to be uninitialised.
Offsets are in INTs from the start of the record.
| Offset | Data | Meaning |
|---|---|---|
| 0-16 | VSTR(1i+16i=34b) | Thing name |
| 17 | INT | Thing type (0 = item, 1 = hero) |
| 18 | INT | Number |
| 19 | INT | In stock |
| 20 | INT | Buy require tag.. (0 = n/a, -n = tag n must be off +n = tag n must be on) |
| 21 | INT | Sell require tag.. (see Buy) |
| 22 | INT | Buy set tag |
| 23 | INT | Sell set tag |
| 24 | INT | Buy price |
| 25 | INT | Must trade in item 1 type (item ID + 1 or 0 for none) |
| 26 | INT | If this is an item, Sell type: 0 = Normal (selling to store does not affect its inventory) |
| 27 | INT | Sell price |
| 28 | INT | Trade in for type (item ID + 1 or 0 for none) |
| 29 | INT | Trade in for amount - 1 |
| 30 | INT | Must trade in item 1 number - 1 |
| 31 | INT | Must trade in item 2 type (item ID + 1 or 0 for none) |
| 32 | INT | Must trade in item 2 number - 1 |
| 33 | INT | Must trade in item 3 type (item ID + 1 or 0 for none) |
| 34 | INT | Must trade in item 3 number - 1 |
| 35 | INT | Must trade in item 4 type (item ID + 1 or 0 for none) |
| 36 | INT | Must trade in item 4 number - 1 |
| 37-41 | INT * 3 | unused |
[edit] Price defaulter proposal
Never implemented
I started implementing this last June, but never checked it in because I thought we were only a week or two away from a stable release at the time :) --Bob the Hamster
| Offset | Data | Meaning |
|---|---|---|
| 37 | INT | Buy Price defaulter: 0 is No default |
| 38 | INT | Sell Price defaulter: 0 is No default |
ARCHINYM.LMP . BROWSE.TXT . ATTACK.BIN . BINSIZE.BIN . DEFPAL#.BIN . DEFPASS.BIN . FIXBITS.BIN . LOOKUP.BIN . MENUS.BIN . MENUITEM.BIN . PALETTES.BIN . PLOTSCR.LST . SFXDATA.BIN . SONGDATA.BIN . UICOLORS.BIN . slicetree_#_#.reld . GEN . BAM . Map Format . T . P . E . D . L . N . Z . DOR . DOX . DT0 . DT1 . DT6 . EFS . FOR . FNT . HSP . HSZ . ITM . MAP . MAS . MN . MXS . PAL . PT0 . PT1 . PT2 . PT3 . PT4 . PT5 . PT6 . PT7 . PT8 . SAY . SHO . SNG . STF . STT . TAP . TIL . TMN . VEH