Tutorial Pokemon G/S: Ultimate Item Tutorial

Started by Coolboyman November 22nd, 2007 9:17 PM
• 10675 views
• 9 replies
Many of you have seen a document on this before, but did you know that theres an easy way to change what they items actually DO?

First, let's start with the first part. I mapped this part out for easy access on what item you want, the values that aren't shown are in between other values (06 is in between 04 and 08 obviously)

04 - 68B5
08 - 68D1
0C - 68ED
10 - 6909
14 - 6925
18 - 6941
1C - 695D
20 - 6979
24 - 6995
28 - 69B1
2C - 69CD
30 - 69E9
34 - 6A05
38 - 6A21
3C - 6A3D
40 - 6A59
44 - 6A75
48 - 6A91
50 - 6AC9
54 - 6AE5
58 - 6B01
5C - 6B1D
60 - 6B39
64 - 6B55
68 - 6B71
6C - 6B8D
70 - 6BA9
74 - 6BC5
78 - 6BE1
7C - 6BFD
80 - 6C19
84 - 6C35
88 - 6C51
8C - 6C6D
90 - 6C89
94 - 6CA5
98 - 6CC1
9C - 6CDD
A0 - 6CF9
A4 - 6D15
A8 - 6D31
AC - 6D4D
B0 - 6D69
B4 - 6D85
B8 - 6DA1
BC - 6DBD
C0 - 6DD9
C4 - 6DF5
C8 - 6E11
CC - 6E2D
D0 - 6E49
D4 - 6E65
D8 - 6E81
DC - 6E9D
E0 - 6EB9
E4 - 6ED5
E8 - 6EF1
EC - 6F0D
F0 - 6F29
F4 - 6F45
F8 - 6F61
FC - 6F7D

Each item has 7 bytes each for this part.
1 = Price Byte 1
2 = Price Byte 2
3 = Effects when held
- 00 = Nothing
- 01 = Restores HP When Pokemon loses 1/2 of its total HP or 128 HP, whichever is less
- 03 = Recovers HP every turn
- 06 = Restores 5 PP to move that reaches 0 PP
- 08 = Wild Pokémon Encounter Rate Lowers
==Cures==
- 0A = Poison
- 0B = Freeze
- 0C = Burn
- 0D = Sleep
- 0E = Paralize
- 0F = All status problems.
- 10 = Confusion
==Others==
- 2A = Increases Defense of Ditto
==Type Increase==
- 32 = Normal
- 33 = Fighting
- 34 = Flying
- 35 = Poison
- 36 = Ground
- 37 = Rock
- 38 = Bug
- 39 = Ghost
- 3A = Fire
- 3B = Water
- 3C = Grass
- 3D = Electric
- 3E = Psychic
- 3F = Ice
- 40 = Dragon
- 41 = Dark
- 42 = Steel
==Others==
- 48 = Helps escape from wild Pokemon.
- 49 = Increases the chances of a Critical Hit by 1 level
- 4A = % chance of the holding Pokemon going first.
- 4B = Pokemon evolve by trading with item attached.
- 4C = Multiples money receives Math Formula: X = Money Recieved Y = Variable (X + Y * X)
- 4D = Reduces opposing Pokemon's Accuracy
- 4F = % of keeping a Pokemon at 1 HP when the damage dealt directly by an attack would cause it to faint.
4 = Supporting math variable
5 = What options do you have when you select it?
- 00 = Give/Toss/Select
- 10 = Use/Give/Toss/Select
- 40 = Give/Toss
- 80 = Select
- C0 = Use
6 = Which Slot does it go in?
- 1 = Items
- 2 = Key items
- 3 = Balls
- 4 = TM/HM
7 = Can you Use it?
- 00 = Can't use
- 06 = Pokeball
- 40 = Brings up text in Item Menu
- 50 = Brings up Pokemon Party Menu
- 55 = Brings up Pokemon Party Menu + Heal / Status heal
- 60 = Has special effect on player outside of battle (Bike/Escape Rope)

The second part is the most critical - What it actually DOES. Heres a similar data thing

E7C0 - 1
E7D0 - 9
E7E0 - 11
E7F0 - 19
E800 - 21
E810 - 29
E820 - 31
E830 - 39
E840 - 41
E850 - 49
E860 - 51
E870 - 59
E880 - 61
E890 - 69
E8A0 - 71
E8B0 - 79
E8C0 - 81
E8D0 - 89
E8E0 - 91
E8F0 - 99
E900 - A1
E910 - A9
E920 - B1

Each one of these points to an ASM Script, and the pointer is 2 bytes long, and MUST be inside the same bank. Example, if you change one of the pointer to 2669 (Which translates to E926 for this bank) it will become a Pokeball, however no value is assigned to that item HEX Value. Most items that do the same thing but with little difference (like Pokeballs Potions etc) have a hex number assigned to a certain part. This hex number tells the script what to do if when the item used matches that hex number. If it can apply (which it can for some things that don't need a separate ASM script for each item.) For example, each separate Pokeball needs a separate ASM script to function, however Potion's don't, so you can simple just repoint the table where it asks for the item byte number to somewhere else and increase from there.

E926- Pokeballs

Heres some more places you can point to:
EE5C- Bicycle
EE63- Evolution Stone
EF68- Rare Candy
F003- Heal Powder
F022- Status Heal (Antidote, etc.)
F0FF- Revival Herb
F11E- Revives
F17E- Full Restore
F1C0- Confusion Fix
F1DC- HP Recover (Potion, etc.)
F1E2- Energy Powder
F1E6- Energy Root
F4A5- Escape Rope
F4E5- Poke Doll
F4FB- Guard Spec.
F508- Dire Hit
F5EC- Old Rod
F5F0- Good Rod
F5F4- Super Rod
F5FF- Item Finder
F606- Elixir / PP up / Ether
F715- Stat enhancer (Battle Only) (Attack X, etc.)
F785- Squirtbottle
F78C- Card Key
F793- Basement Key
F79A- Sacred Ash
F7AA- Normal Box
F7AE- Gorgeous Box

Heres some data within the item's ASM scripts in which you can change. I encourage everyone to look for themselves and try to find things themselves that they can change, even if you don't know ASM.

EC7C-EC91 Special Ball Pointers - for this, first Item Number, then pointer to ASM Script. So you can switch two balls if you'd like
EC98-ECA0 Park Ball
ECA1-ED1F Heavy Ball
ED20-ED30 Lure Ball
ED31-ED65 Moon Ball
ED66-EDBB Love Ball
EDBC-EDDF Fast Ball
EDE0-EDFD Level Ball

EE91- Base Stat Increaser (Protein etc.)
EEA7- Max stat
EEAB- How much stats it gives

EEFF-EF08 Stat Increases Text Types Pointers
EF09-EF2C Stat Increases Text types

EF30-EF32 Item/Stat it increases pointer

EF3F-EF48 Item/Stat it increases

F405-F407 - How Much Health does Fresh WAter Give you *Byte number then health*
F408-F40A - How Much Health does Soda Gives you *Byte number then health*
F40B-F40D - How much Health does Lemonade Give you *Byte number then health*
F40F-F411 - How much Health Hyper Potion gives you *Byte number then health*
F412-F414 - How much Health Super Potion gives you *Byte number then health*
F415-F417 - How much Health Potion gives you *Byte number then health*
F418-F41A - How much Health Max Potion gives you *Byte number then health* (Actually Gives you 999 Health!)
F41B-F41D - How much Health Full Restore gives you *Byte number then health* (Actually Gives you 999 Health!)
F41E-F420 - How much Health Moo Moo Milkgives you *Byte number then health*
F421-F423 - How Much Health Berry Give you *Byte number then health*
F423-F425 - How Much Health Gold Berry Gives you *Byte number then health*
F426-F428 - How Much Health Energy Powder Gives you *Byte number then health*
F429-F42B - How Much Health Energy Root Gives you *Byte number then health*
F42C-F42E - How Much Health Rare Candy Bar Gives you *Byte number then health*
F42F-F431 - How Much Health Berry Juice Gives you *Byte number then health*
F432-F434 - Blank

F4B8-F4BB Steps for Super Repel
F4BC-F4BF Steps for Max Repel
F4C0-F4C3 Steps for Repel

So there you go, I'm sure anyone could find more information, with the information that I've provided. I didn't include everything because I want people to actually look and find things for themselves. You'll be shocked at what I didn't include, it's quite cool.
Nice, its a good tutorial for all the G/S/C Hackers out there.
It is really useful

~Celebi
This can be very helpful. Could that also mean new items can be added in?(just double checking with you). Hopefully people won't go creating the ultimate healing item xD
This can be very helpful. Could that also mean new items can be added in?(just double checking with you). Hopefully people won't go creating the ultimate healing item xD
Yeah, but to add actual NEW items that aren't based off other items, you'd need to know ASM.

However one could work around it like what you did with the Hiking Kit, make it so it does a function at a certain point of the game, instead of letting people use it whenever they want in the item menu. This is used for a few other items in Gold anyway, and should be taken advantage of.
More stuff for me to learn. Nice tutorial by the way.
The Use/Give/Toss/Select should come in handy with an upcoming item I am planning, CBM. Seeing as the Hiker Kit is a Key Item, there is no need to edit it. The next step I probably have to take is ASM. Anyway hopefully you get some more up CBM so people will get back into GSC.
Wow.. that must have tooken you awhile eh? Well, I don't excpet anything less from CBM. ^_^

I am sure that this will come in handy when I start hacking G/S and others who want to as well.. Thanks CBM!
Funny you should mention that, I found something today, the two missing bytes.

1 = Price Byte 1
2 = Price Byte 2
3 = What happens when held?
4 = Supporting math variable
5 = What options do you have when you select it?
6 = Which Slot does it go in?
7 = Can you Use it?

The third byte is the effect when a Pokemon holds onto it. The fourth byte is usually a multiplier or adder (when necessary) that starts at 0.1 (Example, 09 = 0.9) I'll look into this a bit more tonight, for other variables to use, but I'm quite shocked actually I missed this.

Effects:
00 = Nothing
01 = Restores HP When Pokemon loses 1/2 of its total HP or 128 HP, whichever is less

03 = Recovers HP every turn

06 = Restores 5 PP to move that reaches 0 PP

08 = Wild Pokémon Encounter Rate Lowers

==Cures==
0A = Poison
0B = Freeze
0C = Burn
0D = Sleep
0E = Paralize
0F = All status problems.
10 = Confusion

==Others==
2A = Increases Defense of Ditto

==Type Increase==
32 = Normal
33 = Fighting
34 = Flying
35 = Poison
36 = Ground
37 = Rock
38 = Bug
39 = Ghost
3A = Fire
3B = Water
3C = Grass
3D = Electric
3E = Psychic
3F = Ice
40 = Dragon
41 = Dark
42 = Steel

48 = Helps escape from wild Pokemon.
49 = Increases the chances of a Critical Hit by 1 level
4A = % chance of the holding pokemon going first.
4B = Pokémon evolve by trading with item attached.
4C = Multiples money recieves Math Formula: X = Money Recieved Y = Variable (X + Y * X)
4D = Reduces opposing pokemon's Accuracy

4F = % of keeping a pokemon at 1 HP when the damage dealt directly by an attack would cause it to faint.

=Fourth Value=
This is used for variables (in battle only), which can be used when the third one is 0. If item is a healing item, this is used for recovering HP, if Elixir, recovers PP, etc. Can do 1-254 HP, and if it's FF, it sets it to the max.
Thank you for the info! Gen 2 resources are unfortunately slim.
"Living in service to yourself will never reveal your life's purpose." --Rick Warren
WOW, this tutorial is very helpfull, thanks Koolboyman :D