Turtl3Skulll
Blue Turtl3
- 78
- Posts
- 11
- Years
- Utah, U.S.A.
- Seen Feb 14, 2025
Pokemon Fire Red Hacked Engine For Dummies
Pokémon Engine hacks and additions tutorial
By: Turtl3skulll
Pokémon Engine hacks and additions tutorial
By: Turtl3skulll
While working with JPAN's hacked engine, I've noticed a lot of the instructions are very poorly written; many assume you know every little thing that is going on, and thus a lot of examples are completely voided. I've began rewritting his manual in a friendlier way, one which (hopefully) any beginner with scripting knowledge may be able to look at and understand without the need of carefully reading every word of the document and having to put one-and-one together to figure out an example that was briefly talked about before that is needed.
I will attempt to update the manual to make it as user friendly as possible, and include every special as soon as I get it fully working.
I'll use this format:
NAME OF SPECIAL & ITS NUMBER
BRIEF DESCRIPTION
A SCRIPT EXAMPLE
EXTRA NOTES ON IT
DISCLAIMER: I will not include everything the original manual had. These will be examples of how to script the specials he created, and therefore they will not be explained in full detail, that's what his manual is for & you may look at that for in-depth explanation on his code.
If anything is wrong, needs more explaining, or I missed a special and you know how to explain it feel free to tell me & I'll add it onto this. Hope this helps some of you out :)
Multichoice boxes
Spoiler:
Multichoice boxes have 2 special, being special 0x24 and special 0x25
They contains 7 boxes to use, ranging from 0x20 – 0x25, which define how many choices you wish to have.
0x20 – 2 Choices
0x21 – 3 Choices
0x22 – 4 Choices
0x23 – 5 Choices
0x24 – 6 Choices
0x25 – 7 Choices
Special 0x25 - Load Pointer from Script Bank
Special 0x24 - Load Pointer by Variables
The max number of choices allowed are 7, if you attempt to load 'Setvar 0x8006 0x7' or higher (which would be 8 choices) it will fail.
Every single loadpointer must be pointed to some offset whether or not it contains text, else game will crash.
Multichoice box text must be under 20 characters to be properly displayed, and According to JPAN will not display special characters such as the \v\hxx or coloring, but its worked fine for me.
They contains 7 boxes to use, ranging from 0x20 – 0x25, which define how many choices you wish to have.
0x20 – 2 Choices
0x21 – 3 Choices
0x22 – 4 Choices
0x23 – 5 Choices
0x24 – 6 Choices
0x25 – 7 Choices
Special 0x25 - Load Pointer from Script Bank
Spoiler:
Special 0x25 uses pointers given in the script to load the data into the multichoice boxes
Uses Setvar 0x8006 --multichoice slot
Example Special 0x25:
Uses Setvar 0x8006 --multichoice slot
Example Special 0x25:
Spoiler:
For 2 choices:
To add a 3rd or 4th choice you just add another 'setvar 0x8006 0xYY' another 'loadpointer 0x0 @something' and 'special 0x25', as shown below, as well as changing the Multichoice from 0x20 to the box with the desired choice amount.
For 3 choices:
Spoiler:
#org @start
lock
setvar 0x8006 0x0 ------------------'sets 1st choice slot
loadpointer 0x0 @1 -----------------'loads '@1' to the 1st choice slot
special 0x25 -----------------------'prepares the 1st choice slot to be shown
setvar 0x8006 0x1 -----------------'sets 2nd choice slot
loadpointer 0x0 @2 -----------------'loads '@2' to the 2nd choice slot
special 0x25 ------------------------'prepares the 2nd choice slot to be shown
Multichoice 0x0 0x0 0x20 0x0 --------'the 3rd 0xYY, is which box you'll use; 0x20-0x25, accordingly. Rest are filler
release
end
#org @1
= Choice 1 'This is the text which will appear in choice slot 1
#org @2
= Choice 2 'This is the text which will appear in choice slot 2
lock
setvar 0x8006 0x0 ------------------'sets 1st choice slot
loadpointer 0x0 @1 -----------------'loads '@1' to the 1st choice slot
special 0x25 -----------------------'prepares the 1st choice slot to be shown
setvar 0x8006 0x1 -----------------'sets 2nd choice slot
loadpointer 0x0 @2 -----------------'loads '@2' to the 2nd choice slot
special 0x25 ------------------------'prepares the 2nd choice slot to be shown
Multichoice 0x0 0x0 0x20 0x0 --------'the 3rd 0xYY, is which box you'll use; 0x20-0x25, accordingly. Rest are filler
release
end
#org @1
= Choice 1 'This is the text which will appear in choice slot 1
#org @2
= Choice 2 'This is the text which will appear in choice slot 2
To add a 3rd or 4th choice you just add another 'setvar 0x8006 0xYY' another 'loadpointer 0x0 @something' and 'special 0x25', as shown below, as well as changing the Multichoice from 0x20 to the box with the desired choice amount.
For 3 choices:
Spoiler:
#org @start
setvar 0x8006 0x0
loadpointer 0x0 @1
special 0x25
setvar 0x8006 0x1
loadpointer 0x0 @2
special 0x25
setvar 0x8006 0x2
loadpointer 0x0 @3
special 0x25
multichoice 0x0 0x0 0x21 0x0
#org @1
= Choice 1
#org @2
= Choice 2
#org @3
= Choice 3
setvar 0x8006 0x0
loadpointer 0x0 @1
special 0x25
setvar 0x8006 0x1
loadpointer 0x0 @2
special 0x25
setvar 0x8006 0x2
loadpointer 0x0 @3
special 0x25
multichoice 0x0 0x0 0x21 0x0
#org @1
= Choice 1
#org @2
= Choice 2
#org @3
= Choice 3
Special 0x24 - Load Pointer by Variables
Spoiler:
Special 0x24 uses pre-defined variables to load the data into the multichoice boxes
It uses:
Example Special 0x24:
It uses:
Spoiler:
Setvar 0x8004 --to load the lower half of a pointer (B in 0xAAAABBBB)
Setvar 0x8005 --to load the upper half of a pointer (A in 0xAAAABBBB)
Setvar 0x8006 --multichoice slot
Setvar 0x8005 --to load the upper half of a pointer (A in 0xAAAABBBB)
Setvar 0x8006 --multichoice slot
Example Special 0x24:
Spoiler:
#org @start
lock
setvar 0x8004 0x3848 ------'The pointer is 08803848, this takes the lower half
setvar 0x8005 0x0880 ------'The pointer is 08803848, this take the upper half
setvar 0x8006 0x0
loadpointer 0x0 0x0203f4a0
special 0x24
setvar 0x8004 0x383f ------'The pointer is 0880383f, this takes the lower half
setvar 0x8005 0x0880 –----The pointer is 0880383f, this take the upper half
setvar 0x8006 0x1
loadpointer 0x0 0x0203f4a0
special 0x24
multichoice 0x0 0x0 0x20 0x0
release
end
#org 0x803848
= Text 1
#org 0x80383f
= Text 2
lock
setvar 0x8004 0x3848 ------'The pointer is 08803848, this takes the lower half
setvar 0x8005 0x0880 ------'The pointer is 08803848, this take the upper half
setvar 0x8006 0x0
loadpointer 0x0 0x0203f4a0
special 0x24
setvar 0x8004 0x383f ------'The pointer is 0880383f, this takes the lower half
setvar 0x8005 0x0880 –----The pointer is 0880383f, this take the upper half
setvar 0x8006 0x1
loadpointer 0x0 0x0203f4a0
special 0x24
multichoice 0x0 0x0 0x20 0x0
release
end
#org 0x803848
= Text 1
#org 0x80383f
= Text 2
The max number of choices allowed are 7, if you attempt to load 'Setvar 0x8006 0x7' or higher (which would be 8 choices) it will fail.
Every single loadpointer must be pointed to some offset whether or not it contains text, else game will crash.
Multichoice box text must be under 20 characters to be properly displayed, and According to JPAN will not display special characters such as the \v\hxx or coloring, but its worked fine for me.
Runtime Trainer Customization
Spoiler:
The trainer OW, trainer backsprite, and Trainer card can now be changed.
The variables below contain the variable to use according to what you wish to change:
Spoiler:
Variable Changes
0x4054 Standing & Walking
0x4055 Bike
0x4056 Sitting (Surfing)
0x4057 VS Seeker
0x4058 Fishing
0x4059 VS Seeker on Bike
0x4054 Standing & Walking
0x4055 Bike
0x4056 Sitting (Surfing)
0x4057 VS Seeker
0x4058 Fishing
0x4059 VS Seeker on Bike
Examples:
Spoiler:
Trainer Sprite
Trainer Card
Trainer Backsprites
Spoiler:
#org @start
setvar 0x4054 0x025----------'variable 4054 will change the standing and walking sprite's, 0x25 can be found in Advance Map, under "Picture no:" just convert that number in the box to hex, to use that sprite.
callasm 0x805BE61------------'Changes the sprite instantly, and allows the script to continue
end--------------------------'0x025 will change to the little girl; this can be changed according to the OW you want to become, Example: 0x87 will change the OW to the Lapras OW.
For the sprite to change, a new map must be entered, or you can just call the ASM routine in this example script (Credit to diegoisawesome for finding this routine).
setvar 0x4054 0x025----------'variable 4054 will change the standing and walking sprite's, 0x25 can be found in Advance Map, under "Picture no:" just convert that number in the box to hex, to use that sprite.
callasm 0x805BE61------------'Changes the sprite instantly, and allows the script to continue
end--------------------------'0x025 will change to the little girl; this can be changed according to the OW you want to become, Example: 0x87 will change the OW to the Lapras OW.
For the sprite to change, a new map must be entered, or you can just call the ASM routine in this example script (Credit to diegoisawesome for finding this routine).
Trainer Card
Spoiler:
For Boy
For Girl
0x8 is just the image that will replace the original
Trainer cards use variables 0x4060 for boys and 0x4061 for girls.
To switch back to the original hero/heroine you use 0x87 & 0x88 accordingly.
Spoiler:
#org @start
setvar 0x4060 0x8
end
setvar 0x4060 0x8
end
For Girl
Spoiler:
#org @start
setvar 0x4061 0x8
end
setvar 0x4061 0x8
end
0x8 is just the image that will replace the original
Trainer cards use variables 0x4060 for boys and 0x4061 for girls.
To switch back to the original hero/heroine you use 0x87 & 0x88 accordingly.
Trainer Backsprites
Spoiler:
This is practically its own little tutorial and thus I won't explain, since it requires changing palletes and images, if anyone wants to make a tutorial of this or has made their own, let me know and I'll link to your tutorial.
Poke-Decrypt Specials:
Spoiler:
The following specials are used to change a Pokémon's internals, such as EV/IV Pokeball, capture location, Ribons, and Pokerus.
Special 0x6 – Pokemon Decrypt/encrypt
BufferPartyPokemon
Read & Check Specials
The Read & Check will use their specials as 'special2 0x8005 0xZZ'
Write & Editor Specials
The Write & Editor Specials will use their specials as 'special 0xZZ'
Special 0xF – EV/Contest Stat Editor
Special 0x10 – IV Stat Editor
Special 0x11 – Ribbon Flag set/clear
Special 0x12 – Pokerus Set/Immunize
Special 0x13 – Increase/Decrease Happiness
Special 0x14 – Change Ball
Special 0x15 – Give Held Item
Special 0x16 – Change Pokemon Species
Special 0x17 – Change Pokemon Attacks
Special 0x18 - Check Pokemon Species
Special 0x6 – Pokemon Decrypt/encrypt
Spoiler:
A toggle to open and close a Pokemon's 'DNA' to alter, alone its useless therefore I'll explain a few more specials and then I'll give an example.
BufferPartyPokemon
Spoiler:
Bufferpartypokemon 0x0 0x0
Explanation:
The first 0x0 chooses the pokemon to buffer from slots 1-6 (0x0 – 0x05)
The second 0x0 is the buffers that will be used.
Examples:
#org @start
Bufferpartypokemon 0x0 0x0 -----'buffers 1st pokemon, & the buffer set to \v\h02; the buffer in the script MUST have 2 added when using it as "\v\h0X", thus this one will be \v\h02 since our pointer is 0x0
Bufferpartypokemon 0x1 0x1 -----'buffers 2nd pokemon, & the buffer set to \v\h03
Bufferpartypokemon 0x2 0x2 -----'buffers 3rd pokemon, & the buffer set to \v\h04; \v\h04 (0x2) is the max amount of pokemon to buffer, no more than 3 pokemon can be buffered at a time, after this, the game will load, the rival name and some other things.
Msgbox @hi 0x6
end
'strings
#org @hi
= \v\h02, then \v\h03 'meaning it'll be read [buffer1], then [buffer2]
Explanation:
The first 0x0 chooses the pokemon to buffer from slots 1-6 (0x0 – 0x05)
The second 0x0 is the buffers that will be used.
Examples:
#org @start
Bufferpartypokemon 0x0 0x0 -----'buffers 1st pokemon, & the buffer set to \v\h02; the buffer in the script MUST have 2 added when using it as "\v\h0X", thus this one will be \v\h02 since our pointer is 0x0
Bufferpartypokemon 0x1 0x1 -----'buffers 2nd pokemon, & the buffer set to \v\h03
Bufferpartypokemon 0x2 0x2 -----'buffers 3rd pokemon, & the buffer set to \v\h04; \v\h04 (0x2) is the max amount of pokemon to buffer, no more than 3 pokemon can be buffered at a time, after this, the game will load, the rival name and some other things.
Msgbox @hi 0x6
end
'strings
#org @hi
= \v\h02, then \v\h03 'meaning it'll be read [buffer1], then [buffer2]
Read & Check Specials
The Read & Check will use their specials as 'special2 0x8005 0xZZ'
Spoiler:
Special 0x7 – Read EV/Contest Stats
Special 0x8 – read IVs
Special 0x9 – Check Ribbon Flags
Special 0xa – Check Pokerus Timer
Special 0xb - Check Pokeball
Special 0xc - Check Capture Location
Special 0xd - Check Happiness
Special 0xe – Check Pokemon Held Item
Spoiler:
Read Evs
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Example:
#org @start
Bufferpartypokemon 0x0 0x0------'fetches pokemon in slot 1
setvar 0x8004 0x0 ---------------'stores (0x0) slot 1 Pokemon to variable 0x8004; replace 0x0 with 1-5 to pick which pokemon slot to use, 0 being the 1st and 5 being 6th pokemon
special 0x6 ----------------------'Open the pokemon to edit
setvar 0x8005 0x6 ---------------'sets the var to the "coolness" stat
special2 0x8006 0x7 --------------'reads EV/Stat (This case a Stat) and WRITES its value to var 0x8006 0x7 to read for later.
compare 0x8006 0x80 ------------'compares the Pokemon's coolness to 0x80;
if 0x0 goto @fail
msgbox @coolest 0x6
special 0x6 ----------------------'Closes the Pokemon and saves its changes
release
end
#org @fail
msgbox @not_cool 0x6
special 0x6 ----------------------'Closes and saves pokemon if not cool enough, pokemon MUST always be closed before ending the script
release
end
#org @coolest
= That \v\h02 is the Coolest \npokémon I've ever seen!
#org @not_cool
= That \v\h02 of yours is lame. ---'\v\h02 is the special text to load whatever is stored at [buffer1].
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Spoiler:
0x0 HP
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Defense
0x6 Coolness
0x7 Beauty
0x8 Cuteness
0x9 Smartness
0xa Toughness
0xb Luster
Else Fails (F400)
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Defense
0x6 Coolness
0x7 Beauty
0x8 Cuteness
0x9 Smartness
0xa Toughness
0xb Luster
Else Fails (F400)
Example:
Spoiler:
#org @start
Bufferpartypokemon 0x0 0x0------'fetches pokemon in slot 1
setvar 0x8004 0x0 ---------------'stores (0x0) slot 1 Pokemon to variable 0x8004; replace 0x0 with 1-5 to pick which pokemon slot to use, 0 being the 1st and 5 being 6th pokemon
special 0x6 ----------------------'Open the pokemon to edit
setvar 0x8005 0x6 ---------------'sets the var to the "coolness" stat
special2 0x8006 0x7 --------------'reads EV/Stat (This case a Stat) and WRITES its value to var 0x8006 0x7 to read for later.
compare 0x8006 0x80 ------------'compares the Pokemon's coolness to 0x80;
if 0x0 goto @fail
msgbox @coolest 0x6
special 0x6 ----------------------'Closes the Pokemon and saves its changes
release
end
#org @fail
msgbox @not_cool 0x6
special 0x6 ----------------------'Closes and saves pokemon if not cool enough, pokemon MUST always be closed before ending the script
release
end
#org @coolest
= That \v\h02 is the Coolest \npokémon I've ever seen!
#org @not_cool
= That \v\h02 of yours is lame. ---'\v\h02 is the special text to load whatever is stored at [buffer1].
Special 0x8 – read IVs
Spoiler:
Reads the IVs
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Example:
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Spoiler:
0x0 HP
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Deffense
Else Fails
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Deffense
Else Fails
Example:
Spoiler:
This is exactly the same as special 0x7.
The only difference is Setvar 0x8005 must be set below 6. given 0x5 is the last stat that can be checked.
The compare must also be change to anything between 0x0 to 0x1F (0-31), Since IVs go to 31 max.
The only difference is Setvar 0x8005 must be set below 6. given 0x5 is the last stat that can be checked.
The compare must also be change to anything between 0x0 to 0x1F (0-31), Since IVs go to 31 max.
Special 0x9 – Check Ribbon Flags
Spoiler:
Checks Flags
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Only one flag has a name, and it's the champion's flag (key 0xf), awarded at register Hall of Fame special.
Example
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Spoiler:
0x0 to 0x1F – Active flags, not named in FireRed
Else Fail
Returns the Value and status of flag (0 or 1)
Else Fail
Returns the Value and status of flag (0 or 1)
Example
Spoiler:
Same as special 0x8, just change the special to 0x9
Uses 0x0 to 0x1F for Setvar 0x8005
The compare 0x8006 must be set to 0x1
Uses 0x0 to 0x1F for Setvar 0x8005
The compare 0x8006 must be set to 0x1
Special 0xa – Check Pokerus Timer
Spoiler:
Does not take any arugments
Returns Timer value (0xF – 0x0) or 0x10 if the Pokemon is immune.
Example:
Returns Timer value (0xF – 0x0) or 0x10 if the Pokemon is immune.
Example:
Spoiler:
#org @start
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xa
compare 0x8005 0x10 –--------'0x10 means it had the sickness, but not anymore
if 0x1 goto @fine
compare 0x8005 0x0 –----------'zero means it never got the sickness
if 0x1 goto @fine
buffernumber 0x1 0x8005------'Buffers the number returned to \v\h03
msgbox @sick 0x6
special 0x6
release
end
#org @fine
message @good 0x6
special 0x6
release
end
#org @sick
= Your \v\h02 is sick.\nIt will take \v\h03 cycles to heal.
#org @good
= That's the healtiest \v\h02\nI've ever seen!
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xa
compare 0x8005 0x10 –--------'0x10 means it had the sickness, but not anymore
if 0x1 goto @fine
compare 0x8005 0x0 –----------'zero means it never got the sickness
if 0x1 goto @fine
buffernumber 0x1 0x8005------'Buffers the number returned to \v\h03
msgbox @sick 0x6
special 0x6
release
end
#org @fine
message @good 0x6
special 0x6
release
end
#org @sick
= Your \v\h02 is sick.\nIt will take \v\h03 cycles to heal.
#org @good
= That's the healtiest \v\h02\nI've ever seen!
Special 0xb - Check Pokeball
Spoiler:
Does not take any arguments
Returns the Item value of the Pokeball its stored in.
Example:
Returns the Item value of the Pokeball its stored in.
Example:
Spoiler:
#org @start
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xb
compare 0x8005 0x0 ----------'When Pokemons are hatched their Pokeball value is 0; this checks for that.
if 0x1 goto @none
bufferitem 0x1 0x8005 --------'buffers the Pokeball value to \v\h03.
msgbox @ball 0x6
special 0x6
release
end
#org @none
message @hatched 0x6
special 0x6
release
end
#org @ball
= Your \v\h02 is kept in a\n\v\h03.
#org @hatched
= You hatched your \v\h02?\nI'm impressed!
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xb
compare 0x8005 0x0 ----------'When Pokemons are hatched their Pokeball value is 0; this checks for that.
if 0x1 goto @none
bufferitem 0x1 0x8005 --------'buffers the Pokeball value to \v\h03.
msgbox @ball 0x6
special 0x6
release
end
#org @none
message @hatched 0x6
special 0x6
release
end
#org @ball
= Your \v\h02 is kept in a\n\v\h03.
#org @hatched
= You hatched your \v\h02?\nI'm impressed!
Special 0xc - Check Capture Location
Spoiler:
Does not take any arguments
Returns the location where the pokemon was captured or hatched.
Example:
Returns the location where the pokemon was captured or hatched.
Example:
Spoiler:
You'd need to know the Location table to work this one, so no example.
Special 0xd - Check Happiness
Spoiler:
Does not take any arguments
Returns the Pokemon Happiness.
Example:
Returns the Pokemon Happiness.
Example:
Spoiler:
#org @start
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xd
compare 0x8005 0x0
if 0x1 goto @none
buffernumber 0x1 0x8005 --------'buffers the happiness number to \v\h03.
msgbox @happy 0x6
special 0x6
release
end
#org @none
message @hate 0x6
special 0x6
release
end
#org @happy
= Your \v\h02 happiness is \n\v\h03.
#org @hate
= Your \v\h02 hates you.
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xd
compare 0x8005 0x0
if 0x1 goto @none
buffernumber 0x1 0x8005 --------'buffers the happiness number to \v\h03.
msgbox @happy 0x6
special 0x6
release
end
#org @none
message @hate 0x6
special 0x6
release
end
#org @happy
= Your \v\h02 happiness is \n\v\h03.
#org @hate
= Your \v\h02 hates you.
Special 0xe – Check Pokemon Held Item
Spoiler:
Does not take any arguments
Returns the Pokemons held item.
Example:
Returns the Pokemons held item.
Example:
Spoiler:
#org @start
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xe
compare 0x8005 0x0
if 0x1 goto @none
bufferitem 0x1 0x8005 --------'buffers the Pokemon's Item to \v\h03.
msgbox @item 0x6
special 0x6
release
end
#org @none
message @no_item 0x6
special 0x6
release
end
#org @item
= Your \v\h02 has \n\v\h03.
#org @no_item
= Your \v\h02 isn't holding an item
lock
Bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
special2 0x8005 0xe
compare 0x8005 0x0
if 0x1 goto @none
bufferitem 0x1 0x8005 --------'buffers the Pokemon's Item to \v\h03.
msgbox @item 0x6
special 0x6
release
end
#org @none
message @no_item 0x6
special 0x6
release
end
#org @item
= Your \v\h02 has \n\v\h03.
#org @no_item
= Your \v\h02 isn't holding an item
Write & Editor Specials
The Write & Editor Specials will use their specials as 'special 0xZZ'
Spoiler:
Special 0xF – EV/Contest Stat Editor
Spoiler:
Used to change a Pokemon's EV values, useful for contests
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Uses Setvar 0x8006 0x0ZZ or Setvar 0x8006 0x1ZZ
The 'ZZ' being the number by which the EV will increase or decrease
the 0 before the ZZ means add, while the 1 means subtract; therefore 0A would add 10 Evs while 1A would subtract 10EVs
Example:
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Spoiler:
0x0 HP
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Deffense
0x6 Coolness
0x7 Beauty
0x8 Cuteness
0x9 Smartness
0xa Toughness
0xb Luster
Else Fails (F400)
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Deffense
0x6 Coolness
0x7 Beauty
0x8 Cuteness
0x9 Smartness
0xa Toughness
0xb Luster
Else Fails (F400)
Uses Setvar 0x8006 0x0ZZ or Setvar 0x8006 0x1ZZ
The 'ZZ' being the number by which the EV will increase or decrease
the 0 before the ZZ means add, while the 1 means subtract; therefore 0A would add 10 Evs while 1A would subtract 10EVs
Example:
Spoiler:
Stat Editor (PLAIN SCRIPT)
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x3 'reads stat of speed
setvar 0x8006 0x80 'adds 0x80 Evs to speed
special 0xf 'special to make code work
special 0x6
release
end
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x3 'reads stat of speed
setvar 0x8006 0x80 'adds 0x80 Evs to speed
special 0xf 'special to make code work
special 0x6
release
end
Special 0x10 – IV Stat Editor
Spoiler:
Used to change a Pokemon's IV values.
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Uses Setvar 0x8006 0x0ZZ
The 'ZZ' Being the value of the IV it will replace. This will not add or subtract from the original, only replace the current IV with the one told to use.
Example:
Uses Setvar 0x8005 0xY
The 'Y' being the following stats:
Spoiler:
0x0 HP
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Deffense
0x1 Attack
0x2 Defense
0x3 Speed
0x4 Special Attack
0x5 Special Deffense
Uses Setvar 0x8006 0x0ZZ
The 'ZZ' Being the value of the IV it will replace. This will not add or subtract from the original, only replace the current IV with the one told to use.
Example:
Spoiler:
Stat Editor (PLAIN SCRIPT)
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x3 'reads stat of speed
setvar 0x8006 0xa 'Make Speed EV 10
special 0x10 'special to make code work
special 0x6
release
end
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x3 'reads stat of speed
setvar 0x8006 0xa 'Make Speed EV 10
special 0x10 'special to make code work
special 0x6
release
end
Special 0x11 – Ribbon Flag set/clear
Special 0x12 – Pokerus Set/Immunize
Spoiler:
Sets or removes Pokerus
Uses Setvar 0x8005 0xY
The 'Y' being the following cylces:
Example:
Uses Setvar 0x8005 0xY
The 'Y' being the following cylces:
Spoiler:
0x0 = make pokémon good or remove immunization
0x1 to 0xf = Make Pokémon sick
0xf = 15 cycles ; 0x1 = 1 cycles ; 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, a=10, b=11, c=12, d=13, e=14
0x10 or Elese = immunize pokémon
0x1 to 0xf = Make Pokémon sick
0xf = 15 cycles ; 0x1 = 1 cycles ; 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, a=10, b=11, c=12, d=13, e=14
0x10 or Elese = immunize pokémon
Example:
Spoiler:
Gives Pokerus
Removes Pokerus
Makes Immune To Pokerus
Spoiler:
#Org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xf ----------'Sets Pokerus to 15 cycles
special 0x12
special 0x6
release
end
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xf ----------'Sets Pokerus to 15 cycles
special 0x12
special 0x6
release
end
Removes Pokerus
Spoiler:
Org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x0 ----------'Sets Pokerus to 0 cycles
special 0x12
special 0x6
release
end
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x0 ----------'Sets Pokerus to 0 cycles
special 0x12
special 0x6
release
end
Makes Immune To Pokerus
Spoiler:
Org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x10 ---------'Sets Pokemon to be immune from Pokerus
special 0x12
special 0x6
release
end
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x10 ---------'Sets Pokemon to be immune from Pokerus
special 0x12
special 0x6
release
end
Special 0x13 – Increase/Decrease Happiness
Spoiler:
Used to increase/decrease Pokemon Happiness
Uses Setvar 0x8005 0xY
The 'Y' being the following:
Example Increase:
Example Decrease:
Uses Setvar 0x8005 0xY
The 'Y' being the following:
Spoiler:
0x0 to 0xFF = Adds Happiness
0x100 to 0x1ff = Subtracts Happiness
0x100 to 0x1ff = Subtracts Happiness
Example Increase:
Spoiler:
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xA ----------'Increases Happiness by 10
special 0x13
special 0x6
release
end
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xA ----------'Increases Happiness by 10
special 0x13
special 0x6
release
end
Example Decrease:
Spoiler:
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x1A ----------'Decreases Happiness by 10
special 0x13
special 0x6
release
end
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0x1A ----------'Decreases Happiness by 10
special 0x13
special 0x6
release
end
Special 0x14 – Change Ball
Spoiler:
Change the Pokeball a Pokemon is stored at
Uses Setvar 0x8005 0xY
The 'Y' being the following Pokeballs:
Example:
Uses Setvar 0x8005 0xY
The 'Y' being the following Pokeballs:
Spoiler:
0x0 Poke-ball (Hatched)
0x1 Master-ball
0x2 Ultra-ball
0x3 Great-ball
0x4 Poke-ball
0x5 Safari-ball
0x6 Net-ball
0x7 Dive-ball
0x8 Nest-ball
0x9 Repeat-ball
0xa Timer-ball
0xb Luxury-ball
0xc Premier-ball
0x1 Master-ball
0x2 Ultra-ball
0x3 Great-ball
0x4 Poke-ball
0x5 Safari-ball
0x6 Net-ball
0x7 Dive-ball
0x8 Nest-ball
0x9 Repeat-ball
0xa Timer-ball
0xb Luxury-ball
0xc Premier-ball
Example:
Spoiler:
#Org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xC ----------'Sets Pokemon's currnt Pokeball to Premier Ball
special 0x14
special 0x6
release
end
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xC ----------'Sets Pokemon's currnt Pokeball to Premier Ball
special 0x14
special 0x6
release
end
Special 0x15 – Give Held Item
Spoiler:
Gives a selected Pokemon an item
Uses Setvar 0x8005 0xY
The 'Y' being the Item ID
Example:
Uses Setvar 0x8005 0xY
The 'Y' being the Item ID
Example:
Spoiler:
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xX –------'The X can be replace with the item ID
special 0x15
special 0x6
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xX –------'The X can be replace with the item ID
special 0x15
special 0x6
Special 0x16 – Change Pokemon Species
Spoiler:
Changes selected Pokemon Species
Uses Setvar 0x8005 0xY
The 'Y' being the Pokemon ID
Example:
DISCLAIMER: The species switched to MUST have the same EXP curve as the current or game will crash upon looking at the POKEMON screen.
According to JPAN entering a battle fixes this issue, but haven't tested it.
Uses Setvar 0x8005 0xY
The 'Y' being the Pokemon ID
Example:
Spoiler:
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xX –------'The X can be replace with the Pokemon ID
special 0x16
special 0x6
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xX –------'The X can be replace with the Pokemon ID
special 0x16
special 0x6
DISCLAIMER: The species switched to MUST have the same EXP curve as the current or game will crash upon looking at the POKEMON screen.
According to JPAN entering a battle fixes this issue, but haven't tested it.
Special 0x17 – Change Pokemon Attacks
Spoiler:
Changes selected Pokemon Attacks
Uses Setvar 0x8005 0xY
The 'Y' being the Slot number 0-5
Uses Setvar 0x8006 0xZZ
The 'ZZ' being the attack number, 0x0 can be used to erase the attack
Example:
This code can (and usually should) be used in conjunction with another special, this one original from the game. Special 0xdc not only accesses the pokémon slot at 0x8004 (the one used at the decryption code) and opens the status screen's Attack screen, and the chosen attack is saved in 0x8005
This code will automatically check for empty slots first, and then, if all are occupied
replace the slot with the given attack. It also restores that attack PP fully, and removes
all PPup slots used.
Uses Setvar 0x8005 0xY
The 'Y' being the Slot number 0-5
Uses Setvar 0x8006 0xZZ
The 'ZZ' being the attack number, 0x0 can be used to erase the attack
Example:
Spoiler:
#org @start
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xX –------'The X can be replace with the attack ID
special 0x17
special 0x6
bufferpartypokemon 0x0 0x0
setvar 0x8004 0x0
special 0x6
setvar 0x8005 0xX –------'The X can be replace with the attack ID
special 0x17
special 0x6
This code can (and usually should) be used in conjunction with another special, this one original from the game. Special 0xdc not only accesses the pokémon slot at 0x8004 (the one used at the decryption code) and opens the status screen's Attack screen, and the chosen attack is saved in 0x8005
This code will automatically check for empty slots first, and then, if all are occupied
replace the slot with the given attack. It also restores that attack PP fully, and removes
all PPup slots used.
Special 0x18 - Check Pokemon Species
Spoiler:
Check (compares) the species of a pokemon and return a yes or no
Uses Special2 LASTRESULT 0x18
Example:
This will just compare a pokemon and give back the result. It will NOT tell you the pokemon species, or do anything else. Use this as an if statement with a pokemon instead of a question.
Credits for script: Lance32497.
Uses Special2 LASTRESULT 0x18
Example:
Spoiler:
#org @start
special 0x9f ----------------------------'pokemon select screen
waitstate
compare 0x8004 0x6 --------------'compares if 'b' is pressed (cancel)
if 0x1 goto @cancel
special 0x6
special2 LASTRESULT 0x18 ------'calls special 18 (apparently 'special2' not 'special')
compare LASTRESULT 0xYY -----'compares to 0xYY; YY being pokemon number
if 0x1 goto @yes
special 0x6
release
end
special 0x9f ----------------------------'pokemon select screen
waitstate
compare 0x8004 0x6 --------------'compares if 'b' is pressed (cancel)
if 0x1 goto @cancel
special 0x6
special2 LASTRESULT 0x18 ------'calls special 18 (apparently 'special2' not 'special')
compare LASTRESULT 0xYY -----'compares to 0xYY; YY being pokemon number
if 0x1 goto @yes
special 0x6
release
end
This will just compare a pokemon and give back the result. It will NOT tell you the pokemon species, or do anything else. Use this as an if statement with a pokemon instead of a question.
Credits for script: Lance32497.
Party Specials
Spoiler:
Party Specials seem to always fail me, all status flags equal sleep & hp does not check correctly, I will keep looking, but the scripts should be the correct way of doing it
Special 0x52 - Temporary Status inducer
Special 0x53 - Status inducer canceller
Special 0x54 -Permanent Status Inducer
Special 0x55 - Permanent Status inducer canceller
Special 0x62 - Earase Party Pokemon
Special 0x63 - Status Checker
Special 0x64 - Party Status Modifier
Special 0x65 - HP Checker
Special 0x66 - Change Party HP
Special 0x52 - Temporary Status inducer
Spoiler:
temporarily adds status effects to wild pokemon
Uses 0x8004 with the following key
Uses 0x8005 as the number of changes.
Example:
#org @start
setvar 0x8004 0x5 '---- set status to frozen
setvar 0x8005 0x7 '---- set turns for 1 pokemon
special 0x52
Uses 0x8004 with the following key
Spoiler:
0-2: Sleep bits.
3: Poison
4: Burned
5: Frozen
6: Paralysis
7: Badly poisoned
3: Poison
4: Burned
5: Frozen
6: Paralysis
7: Badly poisoned
Uses 0x8005 as the number of changes.
Spoiler:
setting it to 7 equals 1 pokemon appearing, 0E(14) equals 2, etc. Multiply by number of pokemon to appear like this
Example:
Spoiler:
#org @start
setvar 0x8004 0x5 '---- set status to frozen
setvar 0x8005 0x7 '---- set turns for 1 pokemon
special 0x52
Special 0x53 - Status inducer canceller
Spoiler:
Cancels special 52
takes no argument; it can be placed in any script as is.
takes no argument; it can be placed in any script as is.
Special 0x54 -Permanent Status Inducer
Spoiler:
Permanently applies status effect to all encountered pokemon
Uses 0x8004 same key as special 0x52
Example:
#org @start
setvar 0x8004 0x6 '----Set status to Paralysis
special 0x54
release
end
DISCLAMIER:
Uses 0x8004 same key as special 0x52
Example:
Spoiler:
#org @start
setvar 0x8004 0x6 '----Set status to Paralysis
special 0x54
release
end
DISCLAMIER:
Spoiler:
there is a bug with this one, that if you use a healing function (special 0x0), one that creates pokémon (givepokemon, giveegg, special 0x1bb…) or simply withdraw a pokémon from the box, the Status creating routine is activated, the same one I changed to create the Status always on effect. As such, perfectly healthy pokémon enter the pokecenter and come out poison or paralyzed… -JPAN
Special 0x55 - Permanent Status inducer canceller
Spoiler:
Cancels special 0x54
Works the same as special 0x53
Works the same as special 0x53
Special 0x62 - Earase Party Pokemon
Spoiler:
Uses 0x8004 0xY 'Slot to delete, 0xf deletes whole party
Examples:
Examples:
Spoiler:
Example #1 - 1st slot Pokemon:
Example #2- Erase full party:
Example #3 - Keep 1 Pokemon:
Spoiler:
#org @start
setvar 0x8004 0x0
special 0x62
release
end
setvar 0x8004 0x0
special 0x62
release
end
Example #2- Erase full party:
Spoiler:
#org @start
setvar 0x8004 0xf
special 0x62
release
end
setvar 0x8004 0xf
special 0x62
release
end
Example #3 - Keep 1 Pokemon:
Spoiler:
#org @start
special 0x9f ------------'Pokemon selection screen
waitstate
compare 0x8004 0x6 -------'Checks if 'b' is pressed & cancels action
if 0x4 goto @cancel
special 0x6 -------------'Decrypts pokemon to RAM
setvar 0x8004 0xf ------'selects whole party
special 0x62 ------------'Deletes whole party
setvar 0x8004 0x0 ------'Setvar to 0
special 0x6 -------------'Encrypt Pokemon to 0x8004 0x0; slot 0.
release
end
#org @cancel
release
end
special 0x9f ------------'Pokemon selection screen
waitstate
compare 0x8004 0x6 -------'Checks if 'b' is pressed & cancels action
if 0x4 goto @cancel
special 0x6 -------------'Decrypts pokemon to RAM
setvar 0x8004 0xf ------'selects whole party
special 0x62 ------------'Deletes whole party
setvar 0x8004 0x0 ------'Setvar to 0
special 0x6 -------------'Encrypt Pokemon to 0x8004 0x0; slot 0.
release
end
#org @cancel
release
end
Special 0x63 - Status Checker
Spoiler:
Uses Setvar 0x8004 0xY 'Pokemon Slot
Returns The Status of asked Pokemon
Status Key is same as Special 0x52
Returns The Status of asked Pokemon
Status Key is same as Special 0x52
Special 0x64 - Party Status Modifier
Spoiler:
Uses Setvar 0x8004 0xY 'Pokemon Slot
Uses Setvar 0x8005 0xY 'Status Flag
Uses Setvar 0x8005 0xY 'Status Flag
Spoiler:
0-2: Sleep bits.
3: Poison
4: Burned
5: Frozen
6: Paralysis
7: Badly poisoned
3: Poison
4: Burned
5: Frozen
6: Paralysis
7: Badly poisoned
Special 0x65 - HP Checker
Spoiler:
Uses Setvar 0x8004 0xY 'Pokemon Slot
Example:
'HP does not appear to update, just give full HP
Example:
Spoiler:
#org @start
setvar 0x8004 0x1
special 0x65
msgbox @m 0x2
release
end
#org @m
= Your Pokemon HP is \v\h03.
setvar 0x8004 0x1
special 0x65
msgbox @m 0x2
release
end
#org @m
= Your Pokemon HP is \v\h03.
Special 0x66 - Change Party HP
Spoiler:
Uses Setvar 0x8004 0xY 'Pokemon Slot
Uses Setvar 0x8005 0xY 'Quantity of HP
Uses Setvar 0x8006 0xY '1 to heal, else to damage
Example:
Uses Setvar 0x8005 0xY 'Quantity of HP
Uses Setvar 0x8006 0xY '1 to heal, else to damage
Example:
Spoiler:
#org @start
setvar 0x8004 0xF ----'Entire Party
setvar 0x8005 0xB ----'11 HP
setvar 0x8006 0x0 ----'Damages
special 0x66
release
end
setvar 0x8004 0xF ----'Entire Party
setvar 0x8005 0xB ----'11 HP
setvar 0x8006 0x0 ----'Damages
special 0x66
release
end
Wild Battle Pokemon
Spoiler:
Special 0x51 - Shiny Battle
Spoiler:
Makes the next Pokemon shiny
Example:
Example:
Spoiler:
#org @start
special 0x51 -------------'Makes Shiny
wildbattle 0x1 0x1 0x0 ----'Starts wild battle to show shiny
release
end
special 0x51 -------------'Makes Shiny
wildbattle 0x1 0x1 0x0 ----'Starts wild battle to show shiny
release
end
Special 0x56 – Swarm-roaming Pokémon Changer
Spoiler:
Vars Used:
Spoiler:
Uses Setvar x8004
Uses Setvar x8005This is the only one I will explain, until I practice the others:
0 to 0x3fff-> The number of the Pokemon wanted (Use YAPE to see correct numbers as there is a gap between Celebi and Treecko)
0x4000-> 0x8015: The pokemon number IN the variable stored in 0x8004
0x8000-> 0xfffc: not defined
0xfffd-> specific pokemon stored at a pointer kept in two variables, 0x8008 0x8009.
0xfffe-> specific pokemon stored at a pointer, that must be placed by hand in 0x0203f488
0xffff-> specific pokemon stored at the LoadPointer location
Uses Setvar x8006Chance pokemon will appear out of 65536
0x0-0xffff (0-65536)
50% is 7fff (32767)
Uses Setvar x8007Amount of roaming Pokemon 0x1,0x2,etc.
0x0 means unlimited, will keep appearing
uses lower and upper halves:
Lower half is location given by:
each bit either being 0 or 1 depending on what you want
Bit 0 = Grass
Bit 1= Surfing
Bit 2 = Tree/rock-smash
Bit 3 = Fishing
1001 (bit 0=1, bit 1=0, bit 2=0, bit 3=1) would make pokemon available on grass and fishing
1110 (bit 0=1, bit 1=1, bit 2=1, bit 3=0) would activate it in grass, surfing, & tree/rock-smash
it must be written in hex though, so 0x9 and 0xE respectively
The Upper half is the pokemon level:
level 80 being 0x50
Example:
Spoiler:
#org @start
setvar 0x8004 0x85 ------' sets pokemon to Eevee
setvar 0x8005 0xfd70 –--' make the chances of appearance 99% (64880)
setvar 0x8006 0x1 -------'Will appear once
setvar 0x8007 0x500e –' appear by all except fishing
special 0x56
release
end
setvar 0x8004 0x85 ------' sets pokemon to Eevee
setvar 0x8005 0xfd70 –--' make the chances of appearance 99% (64880)
setvar 0x8006 0x1 -------'Will appear once
setvar 0x8007 0x500e –' appear by all except fishing
special 0x56
release
end
You can only replace the level for Roaming codes, that is, only for the ones in that 0x8006 = 1. For swarms, however, you cannot.
Special 0x57 - Swarm-roam Pokemon Canceller
Spoiler:
Cleans Special 0x56 for its next use.
Special 0x58 - Wild Pokémon Data Switch
Spoiler:
Changes the current map's pokemon data to a predefined set you created.
Example:
All script using offset 0x810000
Script by Loadpointer :
msgbox @change 0x2
loadpointer 0x0 0x810000
special 0x58
release
end
#org @change
= The wild pokemon have been changed.
Script by Vars :
msgbox @change 0x2
setvar 0x8008 0x0000
setvar 0x8009 0x0881
setvar 0x8005 0x0
setvar 0x8006 0x1
special 0x58
release
end
#org @change
= The wild pokemon have been changed.
Script by writebyteoffset :
msgbox @change 0x2
writebytetooffset 0x81 0x203F48C
writebytetooffset 0x00 0x203F48D
writebytetooffset 0x00 0x203F48E
writebytetooffset 0x08 0x203F48F
special 0x58
release
end
#org @change
= The wild pokemon have been changed.
Hex edit Part 1:
At the offset defined in the script (in my case 0x810000) write:
XX 00 00 00 YY YY YY 08
XX - determines location of wild data... such as pokemon appearing in water, grass, tree/rock, and fishing.
table for this:
00 00 00 - filler
YY YY YY - pointer to wild data (in reverse the 08 is already included so you just need the offset in reverse, don't add another 08)
Hex edit Part 2:
HUGEEEEE thanks to Lance32497 for helping me figure this one out.
Example:
All script using offset 0x810000
Script by Loadpointer :
Spoiler:
msgbox @change 0x2
loadpointer 0x0 0x810000
special 0x58
release
end
#org @change
= The wild pokemon have been changed.
Script by Vars :
Spoiler:
msgbox @change 0x2
setvar 0x8008 0x0000
setvar 0x8009 0x0881
setvar 0x8005 0x0
setvar 0x8006 0x1
special 0x58
release
end
#org @change
= The wild pokemon have been changed.
Script by writebyteoffset :
Spoiler:
msgbox @change 0x2
writebytetooffset 0x81 0x203F48C
writebytetooffset 0x00 0x203F48D
writebytetooffset 0x00 0x203F48E
writebytetooffset 0x08 0x203F48F
special 0x58
release
end
#org @change
= The wild pokemon have been changed.
Hex edit Part 1:
Spoiler:
At the offset defined in the script (in my case 0x810000) write:
XX 00 00 00 YY YY YY 08
XX - determines location of wild data... such as pokemon appearing in water, grass, tree/rock, and fishing.
table for this:
Spoiler:
Bit 0 = Grass
Bit 1 = Surfing
Bit 2 = Tree/Rock
Bit 3 = Fishing
So activating Grass and Fishing would be 1001 (in binary) so 0x9 in hex.
Bit 1 = Surfing
Bit 2 = Tree/Rock
Bit 3 = Fishing
So activating Grass and Fishing would be 1001 (in binary) so 0x9 in hex.
00 00 00 - filler
YY YY YY - pointer to wild data (in reverse the 08 is already included so you just need the offset in reverse, don't add another 08)
Hex edit Part 2:
Spoiler:
At the offset defined by the "YY's" in part 1 you will need to place the wild pokemon data.
It goes as followed:
AA BB CC 00
AA = Min Level
BB = Max Level
CC = Pokemon Index Number
00 = filler
For grass wild data you will need to fill up this info 12 times total
For Surfing wild data you will need to fill up this info 5 times total
For Tree/rock wild data you will need to fill up this info 5 times total
For Fishin wild data you will need to fill up this info 10 times total
Example:
For an all Eevee party ranging from level 25-32 in grass:
19 20 85 00 19 20 85 00 19 20 85 00 19 20 85 00
19 20 85 00 19 20 85 00 19 20 85 00 19 20 85 00
19 20 85 00 19 20 85 00 19 20 85 00 19 20 85 00
It goes as followed:
AA BB CC 00
AA = Min Level
BB = Max Level
CC = Pokemon Index Number
00 = filler
For grass wild data you will need to fill up this info 12 times total
For Surfing wild data you will need to fill up this info 5 times total
For Tree/rock wild data you will need to fill up this info 5 times total
For Fishin wild data you will need to fill up this info 10 times total
Example:
For an all Eevee party ranging from level 25-32 in grass:
19 20 85 00 19 20 85 00 19 20 85 00 19 20 85 00
19 20 85 00 19 20 85 00 19 20 85 00 19 20 85 00
19 20 85 00 19 20 85 00 19 20 85 00 19 20 85 00
HUGEEEEE thanks to Lance32497 for helping me figure this one out.
Special 0x59 - Wild Pokémon Data Canceller
Spoiler:
Cancels Special 0x58, by clearing all the data that was changed.
Example:
Example:
Spoiler:
#org @start
msgbox @normal 0x2
special 0x59
release
end
#org @normal
= The Pokemon are back to normal
msgbox @normal 0x2
special 0x59
release
end
#org @normal
= The Pokemon are back to normal
Special 0x97 - Random Grass Battle
Spoiler:
No Arguments
Creates a random grass wild battle
Wild pokémon data (of grass) must exist on that map.
Creates a random grass wild battle
Wild pokémon data (of grass) must exist on that map.
Special 0x98 - Random Water Battle
Spoiler:
No Arguments
Creates a random grass wild battle
Wild pokémon data (of water) must exist on that map.
Creates a random grass wild battle
Wild pokémon data (of water) must exist on that map.
Special 0x9c - Old Man Battle For All
Spoiler:
The Old Man battle for any Pokemon
Uses Setvar 0x8004 0xY 'being the Pokemon species
Uses Setvar 0x8005 0xY 'being the Pokemon level
Example:
The old man can catch no legendary except for the bird trio, Blissey and a few others in the legendary region.
Uses Setvar 0x8004 0xY 'being the Pokemon species
Uses Setvar 0x8005 0xY 'being the Pokemon level
Example:
Spoiler:
#org @start
setvar 0x8004 0x1 -----' Bulbasaur
setvar 0x8005 0xA -----' Pokemon level 10
special 0x9c -----------' The special
release
end
setvar 0x8004 0x1 -----' Bulbasaur
setvar 0x8005 0xA -----' Pokemon level 10
special 0x9c -----------' The special
release
end
The old man can catch no legendary except for the bird trio, Blissey and a few others in the legendary region.
Speical 0x156 - Ghost Pokemon Battle
Spoiler:
The Old Man battle for any Pokemon
Uses Setvar 0x8004 0xY 'being the Pokemon species
Uses Setvar 0x8005 0xY 'being the Pokemon level
Uses Setvar 0x8006 0xY 'being the held item
Example:
This code also can use all Pokemon legendary except for the bird trio (ask not why), blissey and a few others in the legendary region.
I remind you that this code is originally meant to make a battle with an uncatchable ghost pokémon that has no ghost on its type.
This will also not crash if you don't have the SILPH SCOPE, so it will work w/o it.
Uses Setvar 0x8004 0xY 'being the Pokemon species
Uses Setvar 0x8005 0xY 'being the Pokemon level
Uses Setvar 0x8006 0xY 'being the held item
Example:
Spoiler:
#org @start
setvar 0x8004 0x1 -----' Bulbasaur
setvar 0x8005 0xA -----' Pokemon level 10
setvar 0x8006 0x0 -----' No Held Item
special 0x9c -----------' The special
release
end
setvar 0x8004 0x1 -----' Bulbasaur
setvar 0x8005 0xA -----' Pokemon level 10
setvar 0x8006 0x0 -----' No Held Item
special 0x9c -----------' The special
release
end
This code also can use all Pokemon legendary except for the bird trio (ask not why), blissey and a few others in the legendary region.
I remind you that this code is originally meant to make a battle with an uncatchable ghost pokémon that has no ghost on its type.
This will also not crash if you don't have the SILPH SCOPE, so it will work w/o it.
Walking Scripts
Spoiler:
"Basically, this feature allows you to create your own special scripts that are activated each time you take a step, well, most of the times you take a step.
There are some other scripts that will always run first. The Egg hatching script, the whiteout script or every step-on (green) script will always beat this one into execution, so you have to take these into consideration if you need that script to run all the time (such as calling the walking script before starting a normal step-on one).
Also, this script is, by definition, a blocking script, meaning that every script you make here must end with the release or releaseall commands.
This script is indicated to make some small checks, manipulate the landscape, and the occasional message, like the Phone script in Gold." -JPAN
This special contains a max 4 slots to store the walking scripts into as a table.
They are located 0x1a4e2c.
Only 1 can be executed at a time, they are selected by using:
Setvar 0x407e 0x(1-4)
An extra walking script can be set temporarily by setting 0x407e to 0 and loading a pointer to the RAM address 0x0203f4f0, this one will take priority over the ROM table.
Special 0x81 - Load Walking Script Pointer
Spoiler:
Loads the pointer from the loadpointer bank 0 to the 0x0203f4f0 address to allow execution, is also needed for wildbattles to be activated through this.
Instructions:
Spoiler:
Instructions to this are:
"First, you have to make the script you want to activate on every step. Once the script is compiled, you open a hex editor and navigate to offset: 0x1a4e2c
There are 4 slots for pointers there. Place the offset (reversed) of the script you want to execute with every step in the first slot.
Then, at whatever point you want the walking script to be active (be it through an event script or a level script) just put:
So that's how special 0x81 works, in case anyone else was having trouble with the instructions." (Credit to metapod23)Code:setvar 0x407e 0x1 ---'tells game to access 1st pointer at offset 0x1a4e2c special 0x81 ---------------' starts the script to activate on every step.
Examples:
Spoiler:
Example #1:
Example #2
Spoiler:
Master Script
Money On Step
This example uses the 1st pointer in the offset 0x1a4e2c.
Assuming the offset for the 'Money On Step' script was 0x8003f9, you'd go to a hex editor and in the 1st slot you'd write over '00 00 00 00' with 'f9 03 80 08'
Spoiler:
#org @start
setvar 0x407e 0x1
special 0x81
release
end
setvar 0x407e 0x1
special 0x81
release
end
Money On Step
Spoiler:
#org @start
givemoney 0xA 0x0 ---------------'Gives $10 on every step
release
end
givemoney 0xA 0x0 ---------------'Gives $10 on every step
release
end
This example uses the 1st pointer in the offset 0x1a4e2c.
Assuming the offset for the 'Money On Step' script was 0x8003f9, you'd go to a hex editor and in the 1st slot you'd write over '00 00 00 00' with 'f9 03 80 08'
Example #2
Spoiler:
Master Script
Random Wild Battle
This example uses the 2nd pointer in the offset 0x1a4e2c.
Assuming the offset for the 'Random Wild Battle' script was 0x8003d8, you'd go to a hex editor and in the 2nd slot you'd write over '00 00 00 00' with 'd8 03 80 08'
Spoiler:
#org @start
setvar 0x407e 0x2
special 0x81
release
end
setvar 0x407e 0x2
special 0x81
release
end
Random Wild Battle
Spoiler:
#org @start
random 0x64 ----------------------'Creates a random number from 0-100
compare LASTRESULT 0xA ---------'Compares if the number is 10
if 0x0 goto @none ----------------'If not it ends
special 0x97 ----------------------'If it equals 10, it creates a willbattle
releaseall
#org @none
releaseall
random 0x64 ----------------------'Creates a random number from 0-100
compare LASTRESULT 0xA ---------'Compares if the number is 10
if 0x0 goto @none ----------------'If not it ends
special 0x97 ----------------------'If it equals 10, it creates a willbattle
releaseall
#org @none
releaseall
This example uses the 2nd pointer in the offset 0x1a4e2c.
Assuming the offset for the 'Random Wild Battle' script was 0x8003d8, you'd go to a hex editor and in the 2nd slot you'd write over '00 00 00 00' with 'd8 03 80 08'
Key Detection Specials
Spoiler:
Detects when a player presses certain keys.
Special 0x2b – AB checker
Special 0x2c – D-Pad checker
Special 0x2d – Select\start checker
Special 0x2e –RL checker
Special 0x2f – Key Dumper
Special 0x2b – AB checker
Spoiler:
No Arguments
Uses special2 0x8006 0xY
The 'Y' being the following:
Example:
Uses special2 0x8006 0xY
The 'Y' being the following:
Spoiler:
0x0 if none is pressed
0x1 if A is pressed
0x2 if B is pressed
0x3 if both are pressed
0x1 if A is pressed
0x2 if B is pressed
0x3 if both are pressed
Example:
Spoiler:
#org @Start
lock
special2 0x8006 0x2b ----------'0x2b is the AB Checker
compare 0x8006 0x3 -----------'0x3 compares if both A&B are pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
lock
special2 0x8006 0x2b ----------'0x2b is the AB Checker
compare 0x8006 0x3 -----------'0x3 compares if both A&B are pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
Special 0x2c – D-Pad checker
Spoiler:
No Arguments
Uses special2 0x8006 0xY
The 'Y' being the following:
Example:
Uses special2 0x8006 0xY
The 'Y' being the following:
Spoiler:
0x0 if no direction is pressed
0x1 if up is pressed
0x2 if left is pressed
0x3 if down is pressed
0x4 if right is pressed
0x5 if up-left is pressed
0x6 if up-right is pressed
0x7 if down-left is pressed
0x8 if down-right is pressed
0x1 if up is pressed
0x2 if left is pressed
0x3 if down is pressed
0x4 if right is pressed
0x5 if up-left is pressed
0x6 if up-right is pressed
0x7 if down-left is pressed
0x8 if down-right is pressed
Example:
Spoiler:
#org @Start
lock
special2 0x8006 0x2c ----------'0x2c is the D-Pad Checker
compare 0x8006 0x3 -----------'0x3 compares down is pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
lock
special2 0x8006 0x2c ----------'0x2c is the D-Pad Checker
compare 0x8006 0x3 -----------'0x3 compares down is pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
Special 0x2d – Select\start checker
Spoiler:
No Arguments
Uses special2 0x8006 0xY
The 'Y' being the following:
Example:
Uses special2 0x8006 0xY
The 'Y' being the following:
Spoiler:
0x0 if none is pressed
0x1 if select is pressed
0x2 if start is pressed
0x3 if both are pressed
0x1 if select is pressed
0x2 if start is pressed
0x3 if both are pressed
Example:
Spoiler:
#org @Start
lock
special2 0x8006 0x2d ----------'0x2d is the select/start Checker
compare 0x8006 0x2 -----------'0x2 compares if start is pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
lock
special2 0x8006 0x2d ----------'0x2d is the select/start Checker
compare 0x8006 0x2 -----------'0x2 compares if start is pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
Special 0x2e –RL checker
Spoiler:
No Arguments
Uses special2 0x8006 0xY
The 'Y' being the following:
Example:
Uses special2 0x8006 0xY
The 'Y' being the following:
Spoiler:
0x0 if none is pressed
0x1 if R is pressed
0x2 if L is pressed
0x3 if both are pressed
0x1 if R is pressed
0x2 if L is pressed
0x3 if both are pressed
Example:
Spoiler:
#org @Start
lock
special2 0x8006 0x2e ----------'0x2e is the R&L Checker
compare 0x8006 0x2-----------'0x2 compares if L is pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
lock
special2 0x8006 0x2e ----------'0x2e is the R&L Checker
compare 0x8006 0x2-----------'0x2 compares if L is pressed
if 0x0 goto @not_yet
msgbox @did_it 0x6
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= Keys Pressed Wrong!
#org @did_it
= Keys Pressed Correctly!
Special 0x2f – Key Dumper
Spoiler:
This Special dumps the keys pressed & returns them to be compared against a specific combination entered.
No Arguments
Returns values? Yes
Example:
No Arguments
Returns values? Yes
Spoiler:
0x0 to 0x3ff, one bit per key, following the same key as the GBA specifications, that is
Key per bit, starting at the lowest:
0 A
1 B
2 Select
3 Start
4 Right
5 Left
6 Up
7 Down
8 R
9 L
But what if I want the player to press a wacky combination involving A+B+L, then you would just add them up in a calculator in binary mode:
A | B | Select | Start | Right | Left | Up | Down | R | L
1-|-1-|---0---|--0---|--0---|--0--|--0-|--0---|-0-|1
now you just add it backwards, that would be 1000000011, 0x203 hexadecimal.
Key per bit, starting at the lowest:
0 A
1 B
2 Select
3 Start
4 Right
5 Left
6 Up
7 Down
8 R
9 L
But what if I want the player to press a wacky combination involving A+B+L, then you would just add them up in a calculator in binary mode:
A | B | Select | Start | Right | Left | Up | Down | R | L
1-|-1-|---0---|--0---|--0---|--0--|--0-|--0---|-0-|1
now you just add it backwards, that would be 1000000011, 0x203 hexadecimal.
Example:
Spoiler:
#org @Start
lock
special2 0x8006 0x2f
compare 0x8006 0x203
if 0x0 goto @not_yet
msgbox @did_it 0x6
release
end
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= You cannot escape this deadly trap!
#org @did_it
= No! You escaped!
lock
special2 0x8006 0x2f
compare 0x8006 0x203
if 0x0 goto @not_yet
msgbox @did_it 0x6
release
end
#org @not_yet
msgbox @no_good 0x6
goto @Start
#org @no_good
= You cannot escape this deadly trap!
#org @did_it
= No! You escaped!
Misc.
Spoiler:
SetHealingPlace Difference
Increasing Max Money Amount
Fixes for the engine:
Spoiler:
Vars Used:
Example:
Sethealing 0x0 -----'plays nurse joy Pokecenter Script
Sethealing 0x1 -----'Does NOT play nurse joy Pokecenter Script; useful for bed resting places.
Spoiler:
Uses Setvar 0x405a 0xmmBB - Map
Uses Setvar 0x405b 0xXX - X Position
Uses Setvar 0x405c 0xYY - Y Position
Spoiler:
mm= Map Number BB= Banks Number
Uses Setvar 0x405b 0xXX - X Position
Uses Setvar 0x405c 0xYY - Y Position
Example:
Spoiler:
#org @healing
Msgbox @heal 0x6
Sethealingplace 0x0
Setvar 0x405a 0x000d -----'map 0, and Bank d =13; Indigo Plateau
Setvar 0x405b 0x0d -------'x coordinate of player
Setvar 0x405c 0x0c -------'y coordinate of player
Release
End
#org @heal
= I'll set your healing place here.
Msgbox @heal 0x6
Sethealingplace 0x0
Setvar 0x405a 0x000d -----'map 0, and Bank d =13; Indigo Plateau
Setvar 0x405b 0x0d -------'x coordinate of player
Setvar 0x405c 0x0c -------'y coordinate of player
Release
End
#org @heal
= I'll set your healing place here.
Sethealing 0x0 -----'plays nurse joy Pokecenter Script
Sethealing 0x1 -----'Does NOT play nurse joy Pokecenter Script; useful for bed resting places.
Increasing Max Money Amount
Spoiler:
You can now hold up to 999 999 999 money! That's nearly 1000 times more money!
This was never added to the manual, but JPAN talked about adding this in a future release, i dunno if it was added as of version 1.1, but here it is anyways:
This replaces 7 bytes, and here's how to do it:
Done, you should be able to have that much money now.
This was never added to the manual, but JPAN talked about adding this in a future release, i dunno if it was added as of version 1.1, but here it is anyways:
This replaces 7 bytes, and here's how to do it:
Spoiler:
In a Hexeditor goto:
0809fdd4 replace |3f 42 0f 00| with |ff c9 9a 3b|------------------' (999999 for 999999999)
In the following offsets replace that one byte from |06| to |09| ----'(6 digit display for 9 digit display)
0808a006
0809fe52
0809fe62
0809fdd4 replace |3f 42 0f 00| with |ff c9 9a 3b|------------------' (999999 for 999999999)
In the following offsets replace that one byte from |06| to |09| ----'(6 digit display for 9 digit display)
0808a006
0809fe52
0809fe62
Done, you should be able to have that much money now.
Fixes for the engine:
Last edited: