Item data structure (Generation III): Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
'''Item data''' is stored in a 44-byte structure in the US version of the [[Game Boy Advance|GBA]] [[Pokémon games|games]].
'''Item data''' is stored in a 44-byte structure in the US version of the [[Game Boy Advance|GBA]] [[Pokémon games|games]].


In the Japanese version, the name field is only 10 bytes long, so the structure is 40 bytes long.
<!-- In the Japanese version, the name field is only 10 bytes long, so the structure is 40 bytes long. -->


{| {{bluetable|float: right;}}
{| {{bluetable|float: right;}}
Line 22: Line 22:
|-
|-
! 18
! 18
| Padding?
| Special value 1
| 2 bytes
| 1 byte
|-
! 19
| Special value 2
| 1 byte
|-
|-
! 20
! 20
| Description
| Description pointer
| 4 bytes
| 4 bytes
|-
|-
! 24
! 24
| Mystery value 1
| Mystery value
| 1 byte
| 2 bytes
|-
! 25
| Mystery value 2
| 1 byte
|-
|-
! 26
! 26
Line 46: Line 46:
|-
|-
! 28
! 28
| Mystery pointer
| Pointer to field usage code
| 4 bytes
| 4 bytes
|-
|-
! 32
! 32
| Padding?
| Parameter for field usage code
| 12 bytes
| 4 bytes
|-
! 36
| Pointer to battle usage code
| 4 bytes
|-
! 40
| Parameter for battle usage code
| 4 bytes
|}
|}



Revision as of 20:00, 30 June 2007

Item data is stored in a 44-byte structure in the US version of the GBA games.


Offset Field Size
0 Name 14 bytes
14 Index number 2 bytes
16 Price 2 bytes
18 Special value 1 1 byte
19 Special value 2 1 byte
20 Description pointer 4 bytes
24 Mystery value 2 bytes
26 Pocket 1 byte
27 Type 1 byte
28 Pointer to field usage code 4 bytes
32 Parameter for field usage code 4 bytes
36 Pointer to battle usage code 4 bytes
40 Parameter for battle usage code 4 bytes

Pocket

This determines which pocket of the bag the item should be stored in.

Number Item type
1 Main pocket
2 Poké Ball
3 Berries
4 TMs and HMs
5 Key items

Type

For items other than Poké Balls, the type determines how the item can be used. With Poké Balls, the type indicates the Poké Ball type, and is one less than the index number.

Type Description
0 Mail
1 Items which can be used out-of-battle.
2 Items which must be used in a certain location; key items of this type can be assigned to select.
3 Only the Pokéblock case is of this type.
4 Items which cannot be used out-of-battle.

Mystery values

Mystery value 1 is:

  • 0 for normal items.
  • 1 for HMs and most key items.
  • 2 for some plot-related key items: Devon Goods, Letter, Red Orb, Blue Orb and Oak's Parcel.

Mystery value 2 is:

  • 0 for most items.
  • 1 for many key items: Mach Bike, Itemfinder, Old Rod, Good Rod, Super Rod, Acro Bike, Pokéblock Case, Bicycle, Town Map, VS Seeker, Fame Checker, TM Case, Berry Pouch, Teachy TV, Tri-Pass, Rainbow Pass, Tea, Mysticticket, Auroraticket, Powder Jar, Ruby, Sapphire, Magma Emblem and Old Sea Map.

The mystery pointer is thought to point to program code, since items with a similar effect have the same pointer; for example, all healing items, including drinks and herbs, have the value 0x080FDEA1.