1 **********************************************************************
\r
3 **********************************************************************
\r
5 There are 467 items in Lufia 2. Most of their properties are stored in
\r
6 what I call the "Item Compendium".
\r
8 -----------------------------------------------------------------------
\r
10 -----------------------------------------------------------------------
\r
12 [$0F49E8 -> $0F5FCB]: item names
\r
14 Item names are 12 bytes long. They are stored one after the other,
\r
15 without any separation byte.
\r
17 -----------------------------------------------------------------------
\r
18 Item data - the "Item Compendium"
\r
19 -----------------------------------------------------------------------
\r
21 [$0B5169 -> $0B550E]: pointers to data at [$0B550F]
\r
22 (2 bytes, little-endian (i.e. "least significant
\r
25 934 bytes => 467 pointers.
\r
26 Add $0B5169 to the pointers to find the offsets
\r
27 of the Item Compendium "entries".
\r
30 [$0B5169 -> $0B516A]: $A6 03
\r
32 => offset: $03A6 + $0B5169 = $0B550F
\r
33 => The first Item Compendium entry starts
\r
36 [$0B550F -> $0B7CDC]: "Item Compendium"
\r
39 [$0B550F]: No equip
\r
40 [$0B551C]: Charred newt
\r
42 [$0B7CBD]: Tag candy
\r
45 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
46 Format of the Item Compendium entries:
\r
47 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
49 13 "common properties bytes"
\r
50 + a variable number of "additional properties bytes"
\r
51 + a variable number of "effect bytes"
\r
54 Start offset of the Monster Compendium entry = offset [+$0000]
\r
56 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
57 "Common properties bytes":
\r
58 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
62 Byte 2: Targetting mode
\r
65 Bytes 5 and 6: GP cost
\r
66 Byte 7: "Equipability"
\r
67 Byte 8: Who can be equipped with the item
\r
68 Bytes 9 and 10: "additional properties" flags
\r
69 Bytes 11 and 12: $00 00 for all items
\r
74 Each bit of this byte is a flag. These flags define some of the
\r
75 most important properties of items, hence defining their type and
\r
76 usability. The state of the flags for a given item also determines
\r
77 its "rank" (position) in the inventory after the use of the Sort
\r
78 option of the Party Status screen Item menu.
\r
80 bit 0: 1 => Is one of the "most useful items".
\r
81 For items that should stay at the top of the inventory
\r
82 (HP/MP recovery potions, ...)
\r
84 bit 1: 1 => Equipable item.
\r
85 This flag MUST be set for an item to be equipable:
\r
86 if it's not set, the item name doesn't appear
\r
87 in the Equip menu. See also: byte 7.
\r
88 Also set for dungeon items ('Hook', ...).
\r
90 bit 2: (not used - always 0.
\r
91 If set, places the item between "equipable" and
\r
92 "fruit" items when the inventory is sorted.)
\r
94 bit 3: 1 => Cursed item.
\r
95 Only used for equipable items. Once equipped, cursed
\r
96 equipable items can't be removed and their name appears
\r
97 in red (instead of white) in the Equip menu.
\r
99 bit 4: 1 => "fruit item"
\r
100 Fruits occupy the lowest places in the inventory.
\r
102 bit 5: 1 => Can't be dropped/sold. Set for:
\r
104 - dungeon items ('Hook', ...)
\r
110 bit 6: 1 => Usable at Party Status screen.
\r
111 The name appears in black (instead of gray) in the
\r
112 Party Status screen Item menu).
\r
113 Ex.: 'Potion', 'Spell potion'
\r
116 bit 7: 1 => Usable as an item (not as a weapon) during battle.
\r
117 The name appears in white (instead of blue) in the
\r
118 Battle screen Item menu.
\r
119 Ex.: 'Potion', 'Shriek'
\r
121 Here's the list of the values of byte 0 actually used in the game:
\r
123 $00 (b0000 0000) => (no flag set)
\r
126 - coins ('1 coin', '10 coin set', ...)
\r
128 $02 (b0000 0010) => Equipable item.
\r
129 For all non-cursed equipable items
\r
130 except the 'Dual blade'.
\r
132 $0A (b0000 1010) => Cursed equipable item.
\r
134 $10 (b0001 0000) => Fruit.
\r
136 $20 (b0010 0000) => Can't be dropped/sold.
\r
141 $22 (b0010 0010) => Equipable item, can't be dropped/sold.
\r
143 - dungeon items ('Hook', ...)
\r
145 $40 (b0100 0000) => Usable as an item at Party Status screen.
\r
150 $41 (b0100 0001) => Usable at Party Status screen,
\r
152 - 'Life potion', 'Spell potion', 'Brave'
\r
155 $60 (b0110 0000) => Usable at Party Status screen,
\r
156 can't be dropped/sold.
\r
159 $80 (b1000 0000) => Usable as an item (not as a weapon)
\r
161 - 'Awake', 'Shriek', 'Mystery pin'
\r
162 - 'Power gourd', 'Mind gourd', 'Magic guard'
\r
163 - balls ('Sleep ball', ...)
\r
164 - boomerangs ('Boomerang', ..., 'Dragon tooth')
\r
165 - 'Flame charm', 'Zap charm', 'Magic lamp'
\r
168 $C1 (b1100 0001) => Usable as an item at Party Status screen
\r
169 as well as during battle,
\r
171 - HP/MP recovery items
\r
172 ('Charred newt', 'Ex-Magic', 'Statue', ...)
\r
173 - 'Regain', 'Miracle'
\r
175 - ciders ('Pear cider', ...)
\r
178 The position an item will occupy in the inventory after the use
\r
179 of the Sort option depends of several flags of byte 0. It also
\r
180 depends of other bytes. The following "rank" list is not 100 %
\r
183 Top of the inventory "most useful items"
\r
184 items usable at Party Status screen
\r
185 items usable during battle
\r
186 items that cannot be dropped
\r
190 - - - - - - - - - - -
\r
195 The use of this byte is unkown.
\r
196 Here's a list of all encountered values:
\r
204 Note: to invert the values of two dungeon items inverts
\r
205 their positions in the "dungeon item ring".
\r
207 $20 for S-fire ring,
\r
212 $40 for a lot of "good" equipment items
\r
213 (items that have an IP, an "elemental power", ...)
\r
215 $60 for a lot of "good" equipment items, including (but not
\r
216 limited to) all the blue chest items.
\r
217 Also for 'Curselifter', 'Providence' and 'Tag candy'
\r
225 $80 for all the fruits
\r
227 $00 for all the other items (including the 'Dual blade')
\r
229 Notes: - generally speaking, it seems that more "valuable"
\r
230 items have a higher value for byte 1.
\r
231 - the value of this byte doesn't *seem* to be related to the
\r
232 "nutritional" value of the object for Capsule Monsters.
\r
234 - - - - - - - - - - -
\r
237 Byte 2: Targetting mode
\r
239 $00 => You can't/don't have to target
\r
240 (bows, boomerangs, ...)
\r
242 $01 => You must target one or several allies
\r
243 (the 'Statue' is the only item having this property)
\r
245 $02 => You must target one (and only one) ally
\r
246 ('Potion', 'Mystery pin', ...)
\r
248 $81 => You must target one or several enemies
\r
249 (the Freeze bow is the only weapon having this property)
\r
251 $82 => You must target one (and only one) enemy
\r
254 !!! This byte does not affect the effect of the weapon
\r
255 (ex.: Arty's bow (targetting mode: $00) will still attack all
\r
256 enemies even if this byte is set to $81 or $82)
\r
258 - - - - - - - - - - -
\r
263 The icon that appears to the left of the item name in
\r
271 $E4 => Shoe (not used by any existing item)
\r
278 $EB => Arrow (for bows and boomerangs)
\r
281 $EE => Ball ('Sleep ball', 'Confuse ball', ...)
\r
282 $EF => Wrench (for tools)
\r
284 !!! This byte affects only the icon, not the usability/equipability
\r
285 of the items (see byte 0 and 7)
\r
287 - - - - - - - - - - -
\r
292 The sprite that represents the item when you obtain it by opening
\r
293 a chest, when someone gives it to you (scenario items), ...
\r
294 There's a lot of item sprites. The following list is not complete.
\r
296 $00 => Coins ('1 coin', ...
\r
297 Also used for some items not found in chests,
\r
298 like the 'Dual blade')
\r
299 $01 => Sword ('Gladius', ...)
\r
300 $02 => Armor ('Metal mail', ...)
\r
310 $0D => Jewel ('Evil jewel', 'Magma rock', ...)
\r
316 $13 => Mace ('Morning star', ...)
\r
320 $1B => Dress ('Quilted silk', ...)
\r
321 $1C => Scroll (for spells in the Ancient Cave. Not used for items)
\r
322 $1D => Hat ('Blue beret')
\r
323 $20 => Wing ('Escape', 'Warp', 'Providence')
\r
324 $21 => Tiara ('Fury ribbon', ...)
\r
331 $45 => Hourglass ('Reset' spell. Not used for items)
\r
333 - - - - - - - - - - -
\r
337 GP cost (2 bytes, little-endian).
\r
340 - Bytes 5 and 6 of the 'Silver sword':
\r
341 $48 71 => GP cost = $7148 = 29000 GP
\r
343 The following items have a cost of 0 GP:
\r
350 - - - - - - - - - - -
\r
353 Byte 7: "Equipability"
\r
355 Each bit of this byte is a flag. Only one bit can be set for
\r
356 each item. if 2 or more bits are set, only the least significant
\r
357 one will be taken into account.
\r
359 $00 (b00000000) => non equipable
\r
360 $01 (b00000001) => equipable as Weapon
\r
361 $02 (b00000010) => equipable as Armor
\r
362 $04 (b00000100) => equipable as Shield
\r
363 $08 (b00001000) => equipable as Helmet
\r
364 $10 (b00010000) => equipable as Ring
\r
365 $20 (b00100000) => equipable as Jewel
\r
367 Note: bit 1 of byte 0 must be set for an item to be equipable.
\r
369 - - - - - - - - - - -
\r
372 Byte 8: Who can be equipped with the item
\r
374 Each bit of this byte is a flag.
\r
383 bit 7: (not used - 0 for all existing items)
\r
387 - Byte 8 of all the "non-equipable" items:
\r
388 $00 = b00000000 => Nobody
\r
390 - Byte 8 of the 'Dual blade':
\r
391 $01 = b00000001 => Maxim only
\r
393 - Byte 8 of the 'Bunny ears':
\r
394 $1A = b00011010 => Selan, Artea and Tia
\r
396 - Byte 8 of the 'Mystery ring':
\r
397 $7F = b01111111 => All
\r
399 - - - - - - - - - - -
\r
403 "additional properties" flags
\r
405 Each bit of these bytes is a flag.
\r
406 For each set flag, there will be 2 "additional properties bytes"
\r
407 (if none of the flags are set, there will be no "additional
\r
408 properties bytes").
\r
412 bit 0: 1 => Has an "Item effect" at Party Status screen.
\r
413 Some item effects:
\r
414 - HP/MP recovery ('Charred newt', ...)
\r
415 - warp ('Escape', 'Warp', ...)
\r
417 => A pointer to the "item effect bytes" is stored on
\r
418 2 "Additional properties bytes" (little-endian).
\r
419 Add the start offset of the Item Compendium entry to
\r
420 find the offset of the item effect bytes.
\r
423 - Byte 9 for the 'Charred newt': $03 (b00000011)
\r
425 => the 'Charred newt' has an "Item effect" at
\r
426 Party Status screen.
\r
428 "Additional properties bytes" corresponding to
\r
430 => pointer to the "effect bytes": $0015
\r
432 Start offset of the 'Charred newt' Item
\r
433 Compendium entry: [$0B551C]
\r
434 => offset of the "effect bytes":
\r
435 $0015 + $0B551C = $0B5531
\r
436 => the bytes defining the effect of the
\r
437 'Charred newt' when it's used at the Party Status
\r
438 screen start at offset [$0B5531].
\r
440 bit 1: 1 => Has an "item effect" during battle.
\r
441 Not for equipable items (see bit 2).
\r
442 Some item effects:
\r
444 - damage (boomerangs, ...)
\r
446 => A pointer to the "item effect bytes" is stored on
\r
447 2 "Additional properties bytes" (little-endian).
\r
448 Add the start offset of the Item Compendium entry to
\r
449 find the offset of the item effect bytes.
\r
451 bit 2: 1 => Has a "Weapon special effect".
\r
452 For weapons, 'Undead ring', 'Sea ring', 'Dragon ring'.
\r
453 Some weapon special effects:
\r
454 - enhanced critical hit rate
\r
455 - "elemental attacks" (Fire, Thunder, ...)
\r
456 - chances of causing Confusion, Sleep,
\r
459 => A pointer to the "weapon effect bytes" is stored on
\r
460 2 "Additional properties bytes" (little-endian).
\r
461 Add the start offset of the Item Compendium entry to
\r
462 find the offset of the weapon effect bytes.
\r
464 bit 3: 1 => Has an "Armor special effect".
\r
465 For protective equipment (armors, shields, helmets,
\r
467 Some armor special effects:
\r
468 - "elemental protection" (Fire, Thunder, ...)
\r
469 - protection against Confusion, Sleep,
\r
472 => A pointer to the "armor effect bytes" is stored on
\r
473 2 "Additional properties bytes" (little-endian).
\r
474 Add the start offset of the Item Compendium entry to
\r
475 find the offset of the armor effect bytes.
\r
477 bit 4: 1 => Increases ATP.
\r
478 For equipable items only, not for "potions"
\r
480 => The ATP increasment is stored on 2 "Additional
\r
481 properties bytes" (little-endian).
\r
483 bit 5: 1 => Increases DFP.
\r
484 For equipable items only, not for "potions"
\r
486 => The DFP increasment is stored on 2 "Additional
\r
487 properties bytes" (little-endian).
\r
489 bit 6: 1 => Increases STR.
\r
490 For equipable items only, not for "potions"
\r
492 => The STR increasment is stored on 2 "Additional
\r
493 properties bytes" (little-endian).
\r
495 bit 7: 1 => Increases AGL.
\r
496 For equipable items only, not for "potions"
\r
498 => The AGL increasment is stored on 2 "Additional
\r
499 properties bytes" (little-endian).
\r
503 bit 0: 1 => Increases INT.
\r
504 For equipable items only, not for "potions"
\r
506 => The INT increasment is stored on 2 "Additional
\r
507 properties bytes" (little-endian).
\r
509 bit 1: 1 => Increases GUT.
\r
510 For equipable items only, not for "potions"
\r
512 => The GUT increasment is stored on 2 "Additional
\r
513 properties bytes" (little-endian).
\r
515 bit 2: 1 => Increases MGR.
\r
516 For equipable items only, not for "potions"
\r
518 => The MGR increasment is stored on 2 "Additional
\r
519 properties bytes" (little-endian).
\r
521 bit 3: 1 => (not used - 0 for all existing items)
\r
523 bit 4: 1 => (not used - 0 for all existing items)
\r
525 bit 5: 1 => Animation when used during battle.
\r
526 For weapons, "potions", ...
\r
527 => The animation number is stored on 2 "Additional
\r
528 properties bytes" (little-endian).
\r
529 Some animation numbers:
\r
530 $0000 => No battle animation
\r
531 The character doesn't move; no sound;
\r
532 no "slashing" effect (but the attack inflicts
\r
534 For 'Last' and 'RAN-RAN step'.
\r
535 $0001 => "Sword" animation
\r
536 For all swords (except 'Frypan' and 'Last')
\r
538 $0003 => "Rod" animation
\r
539 For all rods and maces + 'Frypan'.
\r
540 $0005 => "Bow" animation
\r
542 $0007 => "Spear" animation
\r
543 For all spears + 'Superdriver'.
\r
544 $0009 => "Whip" animation
\r
546 $000B => "Tool animation
\r
547 For all tools except 'Superdriver'.
\r
548 $000D => "Ax" animation
\r
550 $000F => "Punch" animation
\r
551 For attacks without an equipped weapon.
\r
553 $0013 => 'Flash' spell animation
\r
554 $0014 => 'Bolt' spell animation
\r
556 $0033 => 'Zap spell' animation
\r
557 $0091 => 'Dark Fry' animation
\r
560 => 2 "Additional properties bytes": $64 00
\r
561 Note: the value of these 2 bytes doesn't seem to have
\r
562 an effect on the animation displayed when the
\r
563 item is used at Party Status screen.
\r
565 bit 7: 1 => Has an IP effect.
\r
566 For equipable items only.
\r
567 => The IP number is stored on 2 "Additional
\r
568 properties bytes" (little-endian).
\r
570 $0001 => Repeat attack
\r
572 $0003 => Mirror block
\r
574 $002D => Wave motion
\r
576 $00A8 => Octo-strike
\r
577 $00A7 => Double slash
\r
578 $00A8 => Ancient power
\r
580 - - - - - - - - - - -
\r
584 $00 00 for all items
\r
586 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
587 "Additional properties bytes"
\r
588 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
590 The "Additional properties bytes" corresponding to the "Additional
\r
591 properties flags" (bytes 9 and 10) are stored in the following order:
\r
592 [2 bytes for byte 9, bit 0],
\r
593 [2 bytes for byte 9, bit 1],
\r
595 [2 bytes for byte 9, bit 6],
\r
596 [2 bytes for byte 9, bit 7],
\r
597 [2 bytes for byte 10, bit 0],
\r
598 [2 bytes for byte 10, bit 1],
\r
600 [2 bytes for byte 10, bit 6],
\r
601 [2 bytes for byte 10, bit 7].
\r
603 Example: 'Hi-Potion' [$0B556C]
\r
604 - Byte 9: $03 (b00000011)
\r
605 bit 0: 1 => Has an "Item effect" at Party Status screen.
\r
606 bit 1: 1 => Has an "item effect" during battle.
\r
607 - Byte 10: $60 (b01100000)
\r
608 bit 5: 1 => Animation when used during battle.
\r
610 => the 'Hi-Potion' has 8 (= 4 * 2) additional properties bytes:
\r
611 15 00 1D 00 61 00 64 00
\r
612 - $15 00: the "Item effect at Party Status screen" bytes start at
\r
613 offset [$0B556C + $0015]
\r
614 - $1D 00: the "Item effect at Party Status screen" bytes start at
\r
615 offset [$0B556C + $001D]
\r
616 - $61 00: animation when used during battle: animation number $0061
\r
620 Important remark about the "stats increasment bytes":
\r
622 When an item increases STR, it also increases ATP, even if bit 4 of
\r
625 total ATP increasment granted by an item
\r
626 = ATP incr (if bit 4 of bytes 9 is set)
\r
627 + STR incr (if bit 6 of bytes 9 is set)
\r
629 Similarly, when an item increases STR and/or AGL, it also increases DFP,
\r
630 even if bit 5 of byte 9 is not set:
\r
632 total DFP increasment granted by an item
\r
634 + (STR incr + AGL incr) / 2
\r
636 Example: 'lion fang' [$0B7557]
\r
638 - Byte 9: $C0 (b11000000)
\r
639 bit 4: 0 => Doesn't (explicitely) increase ATP.
\r
640 bit 5: 0 => Doesn't (explicitely) increase DFP.
\r
641 bit 6: 1 => Increases STR.
\r
642 bit 7: 1 => Increases AGL.
\r
644 STR incr bytes: $0F 00 => STR incr = 15
\r
645 AGL incr bytes: $0A 00 => AGL incr = 10
\r
647 => total ATP incr = ATP incr + STR incr
\r
651 => total DFP incr = DFP incr + (STR incr + AGL incr) / 2
\r
652 = 0 + (15 + 10) / 2
\r
656 => Increasments of the 'Lion fang': ATP +15, DFP +12, STR +15, AGL +10
\r
658 Other example: 'Fire dagger' [$0B5C2A]
\r
664 => total ATP incr = 56
\r
666 => Increasments of the 'Fire dagger': ATP +56, DFP +3, STR +6
\r
668 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
670 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
674 -----------------------------------------------------------------------
\r
676 -----------------------------------------------------------------------
\r
678 [$0B8200 -> $0B85FF]: pointers to item descriptions
\r
679 (2 bytes, little-endian)
\r
681 [$0B87B4 -> $0BB2A0]: item/spell/IP descriptions
\r