Bulbapedia:Sandbox: Difference between revisions

No edit summary
Line 4,080: Line 4,080:
|}
|}
[[User:Thwackeyrabootdrizzile|<span style="color:#78C850;">Thwackey</span>]][[User talk:Thwackeyrabootdrizzile|<span style="color:#F08030;">raboot</span>]][[Special:Random|<span style="color:#6890F0;">drizzile</span>]] 18:37, 22 January 2024 (UTC)
[[User:Thwackeyrabootdrizzile|<span style="color:#78C850;">Thwackey</span>]][[User talk:Thwackeyrabootdrizzile|<span style="color:#F08030;">raboot</span>]][[Special:Random|<span style="color:#6890F0;">drizzile</span>]] 18:37, 22 January 2024 (UTC)
== Gen4 evolution structure==
Data on the '''[[Evolution|evolution of Pokémon]]''' is stored as a series of 6-byte structures in [[Generation III]].  These structures must be aligned on a 4-byte boundary, and each Pokémon species has 5 such entries, for a total of 40 bytes per species.
In all Generation III games, evolution data is situated between the Pokémon move list data pool and the actual Pokémon move list index; see [[Move list data structures in Generation III]] for a list of locations.
== Pokémon Evolution Data Structure ==
Each species has 5 substructures, as {{p|Eevee}} has 5 evolution options in this generation.  The overall structure is laid out as follows:
{| class="wikitable"
! Offset !! Size !! Type !! Notes
|-
| 0x00 || 8 || Substructure || First Substructure
|-
| 0x08 || 8 || Substructure || Second Substructure
|-
| 0x10 || 8 || Substructure || Third Substructure
|-
| 0x18 || 8 || Substructure || Fourth Substructure
|-
| 0x20 || 8 || Substructure || Fifth Substructure
|}
=== Pokémon Evolution Data Substructure ===
The 6-byte substructure is organized as follows:
{| class="wikitable"
! Offset !! Size !! Type !! Notes
|-
| 0x00 || 2 || uint16_t
| Method of evolution - How this Pokémon will evolve.  This can be one of the following values:
* 0x0001 - Evolves by friendship without regards to time of day
* 0x0002 - Evolves by friendship during the day
* 0x0003 - Evolves by friendship at night
* 0x0004 - Evolves by level up
* 0x0005 - Evolves by trade without items
* 0x0006 - Evolves by trading the Pokémon while holding an item
* 0x0007 - Evolves by using an item on the Pokémon
* 0x0008 - Evolves by level up, but only when Attack is greater than Defense
* 0x0009 - Evolves by level up, but only when Attack is equal to Defense
* 0x000A - Evolves by level up, but only when Attack is lower than Defense
* 0x000B - Evolves by level up, but only when the [[personality value]] permits ({{p|Wurmple}} → {{p|Silcoon}} evolution)
* 0x000C - Evolves by level up, but only when the personality value permits ({{p|Wurmple}} → {{p|Cascoon}} evolution)
* 0x000D - Evolves by level up, but may spawn another Pokémon if permitted ({{p|Nincada}} → {{p|Ninjask}} evolution)
* 0x000E - Evolves by level up, but is only spawned if the conditions permit ({{p|Nincada}} → {{p|Shedinja}} evolution)
* 0x000F - Evolves by beauty
|-
| 0x02 || 2 || uint16_t
| Parameter - The meaning of this is dependent on the method of evolution - the item, the level, etc.  Not used and zeroed out where applicable.  Note that the parameter is used for the beauty threshold, but is not used for the friendship threshold (which is always 220).
|-
| 0x04 || 2 || uint16_t || Target Pokémon - The Pokémon which this Pokémon will evolve to.  See [[List of Pokémon by index number (Generation III)]] for a list of values.
|-
| 0x06 || 2 || uint16_t || Padding due to alignment. Zeroed out.
|}
All unused entries will be entirely zeroed-out.
==Fingerprint==
<pre>
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // -
04 00 10 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // BULBASAUR
04 00 20 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // IVYSAUR
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // VENUSAUR
04 00 10 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // CHARMANDER
04 00 24 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // CHARMELEON
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // CHARIZARD
...
</pre>
==See also==
{{data structure}}<br>
{{Project Games notice|data structure}}
54

edits