Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.

Reply
 
Thread Tools
  #1    
Old September 29th, 2014 (12:21 AM). Edited October 18th, 2015 by Turtl3Skulll.
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Pokemon Fire Red Hacked Engine For Dummies
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
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:
Spoiler:
For 2 choices:
Spoiler:
#org @start
lock
setvar 0x8006 0x0 ------------------'sets 1st choice slot
loadpointer 0x0 @1 -----------------'loads [email protected]' 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 [email protected]' 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


Special 0x24 - Load Pointer by Variables
Spoiler:
Special 0x24 uses pre-defined variables to load the data into the multichoice boxes
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

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


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


Examples:
Spoiler:
Trainer Sprite
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).

Trainer Card
Spoiler:
For Boy
Spoiler:
#org @start
setvar 0x4060 0x8
end

For Girl
Spoiler:
#org @start
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
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]


Read & Check Specials
The Read & Check will use their specials as 'special2 0x8005 0xZZ'
Spoiler:
Special 0x7 – Read EV/Contest Stats
Spoiler:
Read Evs
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)


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:
Spoiler:
0x0 HP
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.


Special 0x9 – Check Ribbon Flags
Spoiler:
Checks Flags
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)
Only one flag has a name, and it’s the champion’s flag (key 0xf), awarded at register Hall of Fame special.

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



Special 0xa – Check Pokerus Timer
Spoiler:
Does not take any arugments
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!



Special 0xb - Check Pokeball
Spoiler:
Does not take any arguments
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!



Special 0xc - Check Capture Location
Spoiler:
Does not take any arguments
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:
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.



Special 0xe – Check Pokemon Held Item
Spoiler:
Does not take any arguments
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



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:
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)

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


Special 0x10 – IV Stat Editor
Spoiler:
Used to change a Pokemon's IV values.
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

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


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


Example:
Spoiler:
Gives 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

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

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


Special 0x13 – Increase/Decrease Happiness
Spoiler:
Used to increase/decrease Pokemon Happiness
Uses Setvar 0x8005 0xY
The 'Y' being the following:
Spoiler:
0x0 to 0xFF = Adds 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

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




Special 0x14 – Change Ball
Spoiler:
Change the Pokeball a Pokemon is stored at
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


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


Special 0x15 – Give Held Item
Spoiler:
Gives a selected Pokemon an item
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


Special 0x16 – Change Pokemon Species
Spoiler:
Changes selected Pokemon Species
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

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

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

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
Spoiler:
temporarily adds status effects to wild pokemon

Uses 0x8004 with the following key
Spoiler:
0-2: Sleep bits.
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.


Special 0x54 -Permanent Status Inducer
Spoiler:
Permanently applies status effect to all encountered pokemon
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


Special 0x62 - Earase Party Pokemon
Spoiler:
Uses 0x8004 0xY 'Slot to delete, 0xf deletes whole party

Examples:
Spoiler:
Example #1 - 1st slot Pokemon:
Spoiler:
#org @start
setvar 0x8004 0x0
special 0x62

release
end


Example #2- Erase full party:
Spoiler:
#org @start
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 0x63 - Status Checker
Spoiler:
Uses Setvar 0x8004 0xY 'Pokemon Slot

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
Spoiler:
0-2: Sleep bits.
3: Poison
4: Burned
5: Frozen
6: Paralysis
7: Badly poisoned



Special 0x65 - HP Checker
Spoiler:
Uses Setvar 0x8004 0xY 'Pokemon Slot

Example:
Spoiler:
#org @start
setvar 0x8004 0x1
special 0x65
msgbox @m 0x2
release
end

#org @m
= Your Pokemon HP is \v\h03.
'HP does not appear to update, just give full HP


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:
Spoiler:
#org @start
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:
Spoiler:
#org @start
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
Quote:
This 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 x8005
Quote:
Chance pokemon will appear out of 65536
0x0-0xffff (0-65536)
50% is 7fff (32767)
Uses Setvar x8006
Quote:
Amount of roaming Pokemon 0x1,0x2,etc.
0x0 means unlimited, will keep appearing
Uses Setvar x8007
Quote:
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

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

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



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:
Spoiler:
#org @start
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.


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.


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:
Spoiler:
#org @start
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:
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

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:
Quote:
"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:
Quote:
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:
Quote:
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:
Code:
setvar 0x407e 0x1 ---'tells game to access 1st pointer at offset 0x1a4e2c
special 0x81 ---------------' starts the script to activate on every step.
So that's how special 0x81 works, in case anyone else was having trouble with the instructions."
(Credit to metapod23)
Examples:
Spoiler:
Example #1:
Spoiler:
Master Script
Spoiler:
#org @start
setvar 0x407e 0x1
special 0x81
release
end


Money On Step
Spoiler:
#org @start
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
Spoiler:
#org @start
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

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
Spoiler:
No Arguments

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


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!


Special 0x2c – D-Pad checker
Spoiler:
No Arguments

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


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!


Special 0x2d – Select\start checker
Spoiler:
No Arguments

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


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!


Special 0x2e –RL checker
Spoiler:
No Arguments

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


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!


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


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!


Misc.
Spoiler:
SetHealingPlace Difference
Spoiler:
Vars Used:
Spoiler:
Uses Setvar 0x405a 0xmmBB - Map
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.

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:

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

Done, you should be able to have that much money now.


Fixes for the engine:

__________________
To steal ideas from one person is plagiarism; to steal from many is research.
Reply With Quote

Relevant Advertising!

  #2    
Old October 12th, 2014 (10:26 PM).
Phasesaber's Avatar
Phasesaber Phasesaber is offline
I code too much
 
Join Date: Oct 2014
Gender: Male
Posts: 20
Send a message via Skype™ to Phasesaber
Looks fancy, I''l have to look into his engine some more.
__________________
https://github.com/phase
Reply With Quote
  #3    
Old October 13th, 2014 (11:07 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Phasesaber View Post
Looks fancy, I''l have to look into his engine some more.
If You want to check it out, here's the link to his post:

http://www.pokecommunity.com/showthread.php?t=194241


You'll have to patch with this first:

http://www.pokecommunity.com/showpost.php?p=5005730&postcount=252
Reply With Quote
  #4    
Old October 15th, 2014 (3:18 AM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
Gold Tier
 
Join Date: Nov 2012
Location: Earth
Age: 17
Gender: Female
Nature: Jolly
Posts: 2,471
You should link to the fixes for the engine's bugs. Karatekid has a thread on PHO about it.
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site! | Join us in the romhacking chat
Pokémon Platinum Red and Blue
Reply With Quote
  #5    
Old October 15th, 2014 (10:03 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by GoGoJJTech View Post
You should link to the fixes for the engine's bugs. Karatekid has a thread on PHO about it.
That's actually a really good idea, I just wanted to make a tutorial on the specials themselves, but I assume you're right, it would make this better, I'll update it and add those under the "Misc." section. thanks
Reply With Quote
  #6    
Old October 15th, 2014 (10:07 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Also if there are other fixes please let me know, pm them to me or add them here & I'll include them, so far the one posted is the only one I've seen
__________________
To steal ideas from one person is plagiarism; to steal from many is research.
Reply With Quote
  #7    
Old May 11th, 2015 (3:59 PM). Edited May 11th, 2015 by Criminon.
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
 
Join Date: Aug 2012
Gender: Male
Posts: 205
Quote:
Originally Posted by Turtl3Skulll View Post
Also if there are other fixes please let me know, pm them to me or add them here & I'll include them, so far the one posted is the only one I've seen
So I've started using JPAN's engine because it seems like the hack I was working on is broken. (Might as well start over)

I found out I'm able to change IVs, and I want to do so through the pokemon selection menu. I feel like I'm close to being able to, and I understand how most calls work, but I'm having trouble understanding what each variable does, and how it is used in conjunction with other variables. What are the limits to these variables? etc


Below is an example of my code.
Spoiler:
#dyn 0x740000
#org @start
'-----------------------------------
lock
call @menu

compare 0x8004 0x6
if >= jump @goback
special2 0x800C 0xBA
storepokemon 0 0x800C ' stores pkmn name

bufferpartypokemon 0x0 0X800A
setvar 0x8004 0x1
special 0x6 ' sets iv change
setvar 0x8005 0x0 ' hp
setvar 0x8006 0x1F
special 0x10 ' makes it happen
setvar 0x8005 0x1 ' atk
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x2 ' def
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x3 ' spd
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x4 ' satk
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x5 ' sdef
setvar 0x8006 0x1F
special 0x10
special 0x6 ' ends iv change
removeitem 0x31 1
comparevars 0x8006 0x8005
if == jump @msg
release
end

#org @goback
release
end

#org @msg
msgbox @text1
callstd MSG_NOCLOSE
closemsg
release
end

#org @menu
'-----------------------------------
special 0x9F
waitstate
lock
faceplayer
copyvar 0x800A 0x8004
return

#org @text1
= \v\h02's potential has\nbeen realized.\pThe stone has become inert.


Any clue what I'm doing wrong? I have successfully made all IVs max, but it only happens to my first pokemon. The only time its worked with the menu, I've had to use the item twice to see results. Its really odd.
__________________
FC: 3582 - 9598 - 9978. Add me!
Reply With Quote
  #8    
Old May 12th, 2015 (11:29 AM). Edited May 12th, 2015 by Turtl3Skulll.
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Criminon View Post
I found out I'm able to change IVs, and I want to do so through the pokemon selection menu. I feel like I'm close to being able to, and I understand how most calls work, but I'm having trouble understanding what each variable does, and how it is used in conjunction with other variables. What are the limits to these variables? etc
Not sure what you mean by the limitations the variables have, PM me and I'll be glad to answer what I know about them.

As for what you did wrong, its not with JPAN's code, but with how you're calling the pokemon from their menu, I don't remember how to call them properly, I tried it and ended up changing the stats of everyone in my party XD try using diego's tutorial on XSE and see if you fix the way you called it, I'll look around my scrap codes cuz I think I have the solution there somewhere, if I find it I'll let you know.

Quote:
Originally Posted by Criminon View Post
Any clue what I'm doing wrong? I have successfully made all IVs max, but it only happens to my first pokemon. The only time its worked with the menu, I've had to use the item twice to see results. Its really odd.
Also how do you know it only happened for the 1st pokemon, did you check it with the checking specials? if so, could you post that script too, that may help.
Reply With Quote
  #9    
Old May 12th, 2015 (4:26 PM). Edited May 13th, 2015 by Criminon.
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
 
Join Date: Aug 2012
Gender: Male
Posts: 205
Quote:
Originally Posted by Turtl3Skulll View Post
Not sure what you mean by the limitations the variables have, PM me and I'll be glad to answer what I know about them.

As for what you did wrong, its not with JPAN's code, but with how you're calling the pokemon from their menu, I don't remember how to call them properly, I tried it and ended up changing the stats of everyone in my party XD try using diego's tutorial on XSE and see if you fix the way you called it, I'll look around my scrap codes cuz I think I have the solution there somewhere, if I find it I'll let you know.



Also how do you know it only happened for the 1st pokemon, did you check it with the checking specials? if so, could you post that script too, that may help.
I figured it out. It took 6 hours, but I finally understand everything now, and I really appreciate you posting the code. I'll post mine:

Spoiler:
'---------------
#org @start
lock
call @menu
compare 0x8004 0x6
if 0x4 goto @end
special2 0x800B 0xBA
compare 0x8000 0x0 ///this is the variable its stored at when you select your pokemon. this judges which one its based off of and then acts accordingly
if 0x1 goto @one
compare 0x8000 0x1
if 0x1 goto @two
compare 0x8000 0x2
if 0x1 goto @three
compare 0x8000 0x3
if 0x1 goto @four
compare 0x8000 0x4
if 0x1 goto @five
compare 0x8000 0x5
if 0x1 goto @six
'---------------
#org @menu
special 0x9F
waitstate
lock
faceplayer
copyvar 0x8000 0x8004
return

'---------------
#org @end
release
end

'---------------
#org @one
setvar 0x8004 0x0 ///this is the party variable for setting the stuff up.
goto @next

'---------------
#org @two
setvar 0x8004 0x1
goto @next

'---------------
#org @three
setvar 0x8004 0x2
goto @next

'---------------
#org @four
setvar 0x8004 0x3
goto @next

'---------------
#org @five
setvar 0x8004 0x4
goto @next

'---------------
#org @six
setvar 0x8004 0x5
goto @next

'---------------
#org @next
bufferpokemon 0x0 0x800B
special 0x6
compare 0x8004 0x6
if 0x4 goto @end
goto @next2

'---------------
#org @next2
setvar 0x8005 0x0
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x1
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x2
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x3
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x4
setvar 0x8006 0x1F
special 0x10
setvar 0x8005 0x5
setvar 0x8006 0x1F
special 0x10
goto @next3

'---------------
#org @next3
fanfare 0x71
waitfanfare
msgbox @text1 MSG_KEEPOPEN '"[buffer1]'s potential has\nbeen re..."
removeitem 0x3E 0x1 ///this is set up for items. this is the item I used.
closeonkeypress
special 0x6
release
end


'---------
' Strings
'---------
#org @text1
= [buffer1]'s IVs are at max!
__________________
FC: 3582 - 9598 - 9978. Add me!
Reply With Quote
  #10    
Old May 12th, 2015 (6:03 PM).
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 666
This is really useful thank you!
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
|VM|Flare Red Version|PM
|
Reply With Quote
  #11    
Old May 19th, 2015 (1:57 PM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Criminon View Post
I figured it out. It took 6 hours, but I finally understand everything now.
Ok I'm glad you figured it out, sorry for taking a week to answer I was out of town.

If you got the solution I'd like to know it, in the case I ever run into that problem, or need to help someone else with it.

Thanks for posting your code on it, I was always a little confused on if the worked correctly. Thanks for that, I'll use your code to correct anything I've done, thank you!
Reply With Quote
  #12    
Old May 19th, 2015 (6:41 PM).
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
 
Join Date: Aug 2012
Gender: Male
Posts: 205
Quote:
Originally Posted by Turtl3Skulll View Post
Ok I'm glad you figured it out, sorry for taking a week to answer I was out of town.

If you got the solution I'd like to know it, in the case I ever run into that problem, or need to help someone else with it.

Thanks for posting your code on it, I was always a little confused on if the worked correctly. Thanks for that, I'll use your code to correct anything I've done, thank you!
No problem! Glad you're using the code! I've tried it with multiple things, including renaming pokemon, etc and it works. I really appreciate you taking the time to explain the other things. I still use this post as a reference.
__________________
FC: 3582 - 9598 - 9978. Add me!
Reply With Quote
  #13    
Old May 19th, 2015 (6:49 PM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Criminon View Post
No problem! Glad you're using the code! I've tried it with multiple things, including renaming pokemon, etc and it works. I really appreciate you taking the time to explain the other things. I still use this post as a reference.
I feel like you're thanking me for things I didn't do, unless you're referring to my original post

Also I meant how did you fix your problem with giving the IVs to the selected slot on the pokemon choosing thing, instead of just the 1st/all pokemon in the party.
Reply With Quote
  #14    
Old May 19th, 2015 (6:52 PM).
Criminon's Avatar
Criminon Criminon is offline
Pokemon: Aqua Blue
 
Join Date: Aug 2012
Gender: Male
Posts: 205
Quote:
Originally Posted by Turtl3Skulll View Post
I feel like you're thanking me for things I didn't do, unless you're referring to my original post

Also I meant how did you fix your problem with giving the IVs to the selected slot on the pokemon choosing thing, instead of just the 1st/all pokemon in the party.
I mean on the original post. Thank you for placing everything in one place and giving examples.
And this:
setvar 0x8004 0x1

This controls which slot it gives the stats to. I stuck notes on my code, hopefully that helps.
__________________
FC: 3582 - 9598 - 9978. Add me!
Reply With Quote
  #15    
Old June 6th, 2015 (5:59 PM). Edited June 11th, 2015 by Lance32497.
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 739
Didn't see this special on your tut.
SPECIAL 0x18: Check Pokémon Specie
If you want to check if the Pokémon in your Party is Pikachu or somewhat, here's the script

Spoiler:

special 0x9F @Opens the pokemon party screen and stores the slot number of the selected pokemon in 0x8004, 0-5, 7 means cancel
waitstate
compare 0x8004 0x7 @Checks if it presses cancel
if 0x1 goto @cancel
special 0x6 @Decrypts pokemon, no need to set variable 0x8004, it is already set in special 0x9f
special2 0x800D 0x18 @Calls Special 0x18 and stores the value in Lastresult
compare 0x800D 0x19 @Compares if lastresult is 19, which is Pikachu's index number
if 0x1 goto @Yes
special 0x6 @Brings the data of pokemon back to its previous data
end
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #16    
Old June 9th, 2015 (8:57 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Lance32497 View Post
Didn't see this special on your tut.
SPECIAL 0x18: Check Pokémon Specie
If you want to check if the Pokémon in your Party is Pikachu or somewhat, here's the script
I've added it now under 'write & editor', Thank you!
Reply With Quote
  #17    
Old June 11th, 2015 (5:29 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 739
Quote:
Originally Posted by Turtl3Skulll View Post
I've added it now under 'write & editor', Thank you!
I think we may use bufferpokemon 0x0 LASTRESULT after special 0x18
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #18    
Old June 12th, 2015 (8:16 PM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Lance32497 View Post
I think we may use bufferpokemon 0x0 LASTRESULT after special 0x18
I mean... You can, but it works perfectly without it.
I decided to test both, just in case, and the both do the same so I wouldn't use it just to save some memory (yeah I know like 4 bits matters XD )
Reply With Quote
  #19    
Old June 28th, 2015 (2:33 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Age: 19
Gender: Male
Nature: Quiet
Posts: 307
Quote:
Originally Posted by Turtl3Skulll View Post
Pokémon Engine hacks and additions tutorial
Hey, could you explain to me how the special 0x58(Wild Pokemon Data Changer) works? I've read it a few times but I'm clueless about what should be done.
Reply With Quote
  #20    
Old June 28th, 2015 (8:22 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by DizzyEgg View Post
Hey, could you explain to me how the special 0x58(Wild Pokemon Data Changer) works? I've read it a few times but I'm clueless about what should be done.
Sadly I don't know how it works, I tried for a few hours today, but no success...

The closest I got to it working was this:

Spoiler:

This is the script:
Spoiler:
msgbox @change 0x2
setvar 0x8009 0x0890
setvar 0x8008 0x0034
setvar 0x8006 0x1
setvar 0x8005 0x0
special 0x58
release
end

#org @change
= I will change the pokemon now.

The pointer set in 8009 & 8008 is 0x08900000 (why does the script have 34 added to it, I know not, its just how others did it and it changed the pokemon to Sunflora instead of ??????? so yeah...)
The data I added to that offset was:
Spoiler:
0A 0C 01 9A
This was repeated about 12 times
That should make Deoxys levels 10-12

Reply With Quote
  #21    
Old June 28th, 2015 (9:15 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Age: 19
Gender: Male
Nature: Quiet
Posts: 307
Quote:
Originally Posted by Turtl3Skulll View Post
Sadly I don't know how it works, I tried for a few hours today, but no success...

The closest I got to it working was this:

Spoiler:

This is the script:
Spoiler:
msgbox @change 0x2
setvar 0x8009 0x0890
setvar 0x8008 0x0034
setvar 0x8006 0x1
setvar 0x8005 0x0
special 0x58
release
end

#org @change
= I will change the pokemon now.

The pointer set in 8009 & 8008 is 0x08900000 (why does the script have 34 added to it, I know not, its just how others did it and it changed the pokemon to Sunflora instead of ??????? so yeah...)
The data I added to that offset was:
Spoiler:
0A 0C 01 9A
This was repeated about 12 times
That should make Deoxys levels 10-12

Thank you! I'm going to play with it a bit and see what I can do. I now understand what "load pointer" meant.(except that 34)
Reply With Quote
  #22    
Old June 28th, 2015 (9:18 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by DizzyEgg View Post
Thank you! I'm going to play with it a bit and see what I can do. I now understand what "load pointer" meant.(except that 34)
I don't get it either
I'm asking a few people right now and if they reply with something that works I'll update the Tutorial and let you know.

As for now anything not on the tutorial I haven't figured out how to do, so if you realize how to do the timer specials please pm me.
Reply With Quote
  #23    
Old June 28th, 2015 (7:35 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 739
Special 0x58: Change Wild Data Hack

There are 3 ways to make it works, first is by loadpointer command, Second is by Setting the value to 8008 and 8009 in halves, lower halve in 8008 and upper in 8009 and lastly, by writebytetooffset.

So I'll show you the sample script, let's say the Wild data is stored in 08ABCDEF,

Loadpointer
Spoiler:

By using loadpointer command and bank 0x0, we can change the Wild Data,

...
loadpointer 0x0 0xABCDEF
special 0x58
...


Var 8008 and 8009
Spoiler:

...
setvar 0x8008 0xCDEF
setvar 0x8009 0x08AB
setvar 0x8005 0x0
setvar 0x8006 0x1
special 0x58
....

Writebytetooffset
Spoiler:

...
writebytetooffset 0xEF 0x203F48C
writebytetooffset 0xCD 0x203F48D
writebytetooffset 0xAB 0x203F48E
writebytetooffset 0x08 0x203F48F
...


That's all

EDIT:
Timer Specials will be updated too...
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #24    
Old July 1st, 2015 (6:28 PM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 20
Gender: Male
Nature: Bold
Posts: 75
Quote:
Originally Posted by Lance32497 View Post
Special 0x58: Change Wild Data Hack

So I'll show you the sample script, let's say the Wild data is stored in 08ABCDEF
So what appears in the data, could you give an example of what you would store at your offset



Quote:
Originally Posted by Lance32497 View Post
EDIT:
Timer Specials will be updated too...
Thanks! that'd be great
Reply With Quote
  #25    
Old July 3rd, 2015 (12:01 AM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 739
Quote:
Originally Posted by Turtl3Skulll View Post
So what appears in the data, could you give an example of what you would store at your offset




Thanks! that'd be great
Sorry, I can't face my computer so I'm still clueless on what time special is, maybe tonight, anyway,

Here's the Structure
15 00 00 00 3C 96 3C 08

15- Determines if it is Grass, Water, Tree or Fishing Rod?
00 00 00- Fillers
3C 96 3C 08- Pointer to the wild table, this table contains the index number of the pokemon(reversed), let's say lv32 Eevee, Eevee's index number is 85, so you will Write 20 20 00 85
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 8:48 AM.