ITM

From OHRRPGCE-Wiki
Jump to navigation Jump to search

.ITM holds item definitions. The record length is stored in BINSIZE.BIN.

This lump will eventually be replaced with items.reld (This incomplete feature is not in nightlies)

Formal Specs[edit]

About Formal Specs

Offset Data Meaning
0 VSTR(1i+8i= 18b) Name
9 VSTR(1i+36i = 74b) Info (in zenzizenzic and older, length was 35, with INT at 45 unused)
46 INT Value (does nothing except provide default buy + sell values in stores)
47 INT Attack when used in battle (attack num+1)
48 INT Attack when used as weapon (attack num+1)
49 INT Old Equippable as (obsoleted in fufluns read bitsets in INT 239 instead)

0 = NEVER EQUIPPED
1 = Weapon
2 = armor 1
3 = armor 2
4 = armor 3
5 = armor 4

50 INT Teach Spell (attack num+1)
51 INT When used out of battle: > 0 is attack num+1, < 0 is -1 * textbox number (box 0 can't be triggered)
52 INT Weapon Picture
53 INT Weapon Palette, or -1 for default
54 INT HP bonus
55 INT MP bonus
56 INT Attack bonus
57 INT Aim bonus
58 INT Defense bonus
59 INT Dodge bonus
60 INT Magic bonus
61 INT Will bonus
62 INT Speed bonus
63 INT Counter bonus
64 INT MP~ bonus
65 INT Hits bonus
66-69 INT * 4 Equippable by (first 64 bits, rest are separate, in INTs 211-238)
70-72 INT * 3 Bitsets

0-7 Weakness to elem 1-8 (Obsolete, see #Note 1)
8-15 Strength to elem 1-8 (Obsolete, see #Note 1)
16-23 Absorbs elem 1-8 (Obsolete, see #Note 1)
24-47 Undefined

73 INT Consumability

0 = Unlimited use
1 = Consumed by use
2 = Cannot be sold/dropped

74 INT OWN ITEM tag #
75 INT ITEM IN INVENTORY tag #
76 INT IS EQUIPPED tag #
77 INT EQUIPPED BY ACTIVE HERO tag #
78 INT Frame 2 "Handle" point X coordinate
79 INT Frame 2 "Handle" point Y coordinate
80 INT Frame 1 "Handle" point X coordinate
81 INT Frame 1 "Handle" point Y coordinate
82-209 FLOAT * 64 Elemental resistances. 1.0 is 100%, which is the default value, meaning 'no change'. These are "merged" into the elemental resistances of heroes which equip the item according to one of several possible formulae. #Note 1
210 INT Maximum inventory stack size, or 0 to use the default, gen(genItemStackSize)
211-238 INT * 28 Equippable by (bits 64-511) - rest in INT 66-69
239 INT Equip slot bits (starting in fufluns)

0 = Weapon
1 = armor 1
2 = armor 2
3 = armor 3
4 = armor 4
5-14 = unused
15 = equip bits initialized. If this is off, read obsolete int 49 instead

Note 1[edit]

If fixItemElementals is OFF, then elemental resistances should be loaded from the absorb/weak/strong bits (default to 1.0, multiply by -1.0 for absorb, 2.0 for weak, 0.12 for strong).

If fixItemElementals is ON then elemental resistances should be loaded from the array of 64 FLOATs, and the old bits are garbage.