STF

From OHRRPGCE-Wiki

Jump to: navigation, search

.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.

If a record is stored but not used, it is likely to be uninitialised.

Offsets are in INTs from the start of the record.

About Formal Specs

Offset Data Meaning
0-16VSTR(1i+16i=34b) Thing name
17INTThing type (0 = item, 1 = hero)
18INTNumber
19INTIn stock
20INTBuy require tag.. (0 = n/a, -n = tag n must be off +n = tag n must be on)
21INTSell require tag.. (see Buy)
22INTBuy set tag
23INTSell set tag
24INTBuy price
25INTMust trade in item 1 type (item ID + 1 or 0 for none)
26INTIf this is an item, Sell type:

0 = Normal (selling to store does not affect its inventory)
1 = Aquire Inventory (store aquires infinite inventory)
2 = Increment Inventory (store gains 1 item if it already has some)
3 = Refuse to Buy
If this is a hero, Level:
-1 = Default
0-99 = Level

27INTSell price
28INTTrade in for type (item ID + 1 or 0 for none)
29INTTrade in for amount - 1
30INTMust trade in item 1 number - 1
31INTMust trade in item 2 type (item ID + 1 or 0 for none)
32INTMust trade in item 2 number - 1
33INTMust trade in item 3 type (item ID + 1 or 0 for none)
34INTMust trade in item 3 number - 1
35INTMust trade in item 4 type (item ID + 1 or 0 for none)
36INTMust trade in item 4 number - 1
37INTBuy Price defaulter: (This is a WIP feature)

0 is No default
>=1 is percentage of default value
100 is full default value

38INTSell Price defaulter: (This is a WIP feature)

0 is No default
>=1 is percentage of default value
100 is full default value

39-41INT * 13unused


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 . GEN . BAM . Map Format . T . P . E . D . L . N . DOR . DOX . DT0 . DT1 . DT6 . EFS . FOR . FNT . HSP . HSZ . ITM . MAP . MAS . MN . MXS . PAL . PT0 . PT1 . PT2 . PT3 . PT4 . PT5 . PT6 . SAY . SHO . SNG . STF . STT . TAP . TIL . TMN . VEH

Personal tools