ITM: Difference between revisions

From OHRRPGCE-Wiki
Jump to navigation Jump to search
(guess what? handle positions were backwards all along!)
(remove wip tag for fufluns release)
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
.ITM holds item definitions.
.ITM holds item definitions.
Records are 200 bytes long.
The record length is stored in [[BINSIZE.BIN]].
 
This lump will eventually be replaced with [[items.reld]] {{Future|inline}}


== Formal Specs ==
== Formal Specs ==
Line 9: Line 11:
|0||VSTR(1i+8i= 18b)||Name
|0||VSTR(1i+8i= 18b)||Name
|-
|-
|9||VSTR(1i+35i = 72b)||Info
|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)
|46||INT||Value (does nothing except provide default buy + sell values in stores)
|-
|-
|47||INT||Attack when used in battle (attack num+1)
|47||INT||[[DT6|Attack]] when used in battle (attack num+1)
|-
|-
|48||INT||Attack when used as weapon (attack num+1)
|48||INT||[[DT6|Attack]] when used as weapon (attack num+1)
|-
|-
|49||INT||Equippable as<br>
|49||INT||Old Equippable as (obsoleted in [[fufluns]] read bitsets in INT 239 instead)<br>
0 = NEVER EQUIPPED<br>
0 = NEVER EQUIPPED<br>
1 = Weapon<br>
1 = Weapon<br>
Line 25: Line 27:
5 = armor 4<br>
5 = armor 4<br>
|-
|-
|50||INT||Teach Spell (attack num+1)
|50||INT||Teach Spell ([[DT6|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)
|51||INT||When used out of battle: > 0 is [[PT5|attack]] num+1, < 0 is -1 * textbox number (box 0 can't be triggered)
|-
|-
|52||INT||Weapon Picture
|52||INT||Weapon [[PT5|Picture]]
|-
|-
|53||INT||Weapon Palette
|53||INT||Weapon [[PAL|Palette]], or -1 for default
|-
|-
|54||INT||HP bonus
|54||INT||HP bonus
Line 57: Line 59:
|65||INT||Hits bonus
|65||INT||Hits bonus
|-
|-
|66||INT * 4||Equippable by (41 bits, rest wasted)
|66-69||INT * 4||Equippable by (first 64 bits, rest are separate, in INTs 211-238)
|-
|-
|70||INT * 3||Bitsets<br>
|70-72||INT * 3||Bitsets<br>
0-7 Weakness to elem 1,2,3,4,5,6,7,8<br>
0-7 Weakness to elem 1-8 (Obsolete, see [[#Note 1]])<br>
8-15 Strength to elem 1,2,3,4,5,6,7,8<br>
8-15 Strength to elem 1-8 (Obsolete, see [[#Note 1]])<br>
16-23 Absorbs elem 1,2,3,4,5,6,7,8<br>
16-23 Absorbs elem 1-8 (Obsolete, see [[#Note 1]])<br>
24-42 Undefined
24-47 Undefined
|-
|-
|73||INT||Consumability<br>
|73||INT||Consumability<br>
Line 86: Line 88:
|81||INT||Frame 1 "Handle" point Y coordinate
|81||INT||Frame 1 "Handle" point Y coordinate
|-
|-
|82-99||INT||Undefined
|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. <sup>[[#Note 1]]</sup>
|-
|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]])<br>
0 = Weapon<br>
1 = armor 1<br>
2 = armor 2<br>
3 = armor 3<br>
4 = armor 4<br>
5-14 = unused<br>
15 = equip bits initialized. If this is off, read obsolete int 49 instead
|}
|}


[[Category : Unfinished Articles]]
==Note 1==
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.
 
{{LumpSpec}}
{{LumpSpec}}

Latest revision as of 12:28, 12 January 2020

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