• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Gold scripting - Tutorials/Commands

Status
Not open for further replies.

cooley

///Keepin' it simple
1,148
Posts
17
Years
Here is a tutorial on how to script, Skeetendo showed me how to do it, so now I'm sharing with everyone. If I missed anything, please Tell me.

******************
What You Will Need
******************

1. Hex Editor(Preferably Translhextion)
2. Gold Map 1.6
3. Tauwasser's Scripting Compendium
4. Pokémon Gold or Silver Rom
5. Pointer Calculator
6. Windows Calculator(Start>All Programs>Accesories>Calculator)

***************

First you Pick which person to edit. We will edit the fat guy in New bark town, so go in Goldmap and double-click New bark town, and the "Map Properties" Will come up. Go to the events data offset and it should be: $120366. Now we open our Hex Editor and we go to this address. This takes us to the start of the actual event data for the map. Now we scroll down until we find a blank space after the data that is already in this bank. The blank space starts at 0x1225A0.

Now that we have found our blank space, we have some room to insert our script. For our script I will make the Fat guy display Simple Text. Our SCript should look like:

6A 47 4C xx xx 53 49 90

You can Type "00" for the x's for now. Now, after you have typed the script, you can go to the byte after 90 Which should be 0x1225A8, and Write Text, BUT! before you go crazy writing text, make sure you start it with 00.
Example:

00 87 A4 AB AB AE E7 - This text will say "Hello!" But it is wrong.

00 87 A4 AB AB AE E7 57 00 - This is correct, always end the text with 57 00, so the game knows the text has been ended, if you don't you will Get a message that says "1df-" or "2df-".

Ok, so far we have our script and text, now what? Now you fill in those 00's for the text pointer. To get the pointer use Scizz's A-point to calculate it. All you do is type the offset (0x1225A8) and hit Calculate pointer. (make sure the "Offset in Pointer" is checked). You should get 48A865 as the pointer. take the last four digits (A865) and put it in the script. It should now look like this:
6A 47 4C A8 65 53 49 90 00 87 A4 AB AB AE E7 57 00 (Underline is the text)

Before you save it, Calculate the pointer of where the script starts (0x1225A0) and write it down.

Click save. All right, the script is in the game. Now we need to assign it to someone.

The pointer you wrote down, You will now need it. Open up Calculator in accessories, and click on the "Hex" bullet. Type in the first byte of the 4 digit pointer( 1 byte = 2 digits) type in A0 , then click on the "Dec" Bullet and you get "160". Do the same for the second byte, type in 65 and get 101.

Now Reload your Rom in A-map....Just kidding. Reload it in Goldmap, goto Events Tab, then click on the fat guy. His info should pop up. Where it says Text Block Type in "160" And where it says Text bank, type in "101".

Hit Save and test it. If you did it wrong, then you either don't get any text at all, or get a "1Df-" message.

You have learned how to script in hex, For GOLD version! Spread the news, and get more people into hacking gold.

******************
Examples:
******************

Note: ALL numbers are in Hexadecimal!!!! 10 = 0A
Note2: For Giveitem, and givepokemon, the numbers are in hexadecimal also! Pikachu = 19 not 25
Note3: I am trying to make a tool for these commands, the tool will be able to compile scripts to the ROM too!
Note4: For giveitem and givepokemon refer to the Item and Pokemon list

---------------------------------------------------------
Tutorial:

REGULAR TALK

6A 47 4C xx xx 53 49 90

Faceplayer, then open text box and writes the text from the pointer. Then close text box.

EMOTICON

6A 73 zz 74 00 zz xx 90

00 = Emoticon no. zz = Person no(add 1 to it. person is 2 add 1 and is 3) xx = Time in hex, 10 is 0A.

YES/NO

6A 47 4C xx xx 54 4E 09 xx xx 4C xx xx 53 49 90

Ok, the 54 means to keep a text box open, so that a Yes/no box(4E) comes up. 09 xx xx means that if it is yes, then go to the pointer xx xx, If no then the script continues, in this case, Text comes up and says "Fine Then" You don't need to put another 47 4C because the text box was already open so you just need to load new text from a new pointer. Btw, 08 xx xx = If no then goto (pointer), and 09 xx xx = If yes then goto (pointer). You Do NOT NEED BOTH!

MOVEMENTS

6A 47 4C xx xx 53 49 69 xx xx 90

Ok, New codes here. 69 is the movement of the talked-to person, and 68 is movement for any person but you have to put people no.
the command 69 requires a 2 byte pointer to the movement data and the movements are below. After you've pointed to the movements, end the movements with a 47 command. Ok, so you talk to someone, then they tell you something, and then the move around, yay! You made a movement script!

DEALING WITH FLAGS

31 10 00 09 yy yy 47 4C xx xx 53 49 33 10 00 90

All this is is another way to make things NEVER repeat twice, and it has some advantages too. After a flag is set, you can activate other events by checking if an Event has been activated before. (ie. You can't leave if you don't have a pokemon, you can when you do. This is by Flags. Not really, but it is an example) Flags can also make people disappear and stay like that (ie. Found an Item) The way I'm using it is if the flag hasn't been used then display some text. If it has then goto different text (ie. yy yy)

Explanation:

31 = Check for flag
'requires 2 bytes which are the flag numbers

09 = Ram Check [2]
' 09 means "if yes" and 08 means "If no"

33 = Set a flag
'requires 2 bytes which are the flag numbers

90 = End script
'No parameters required

xx xx = Pointer to another script

10 00 = Flag ID you can use an flag you wish, but the numbers are reverse hex. 0010 = 1000 in-game. 1000 = 0010 in-game, etc.


GIVEPOKEMON

[2D][PKMN][PKMNlvl][PKMNitem][TRAINER]

Gives a Bulbasaur with no item on level 5.
[TRAINER] = 00 or 01
00 = HIRO, don't worry too much about 01 now.

GIVEITEM

1F [Item no] [amount] 45

Gives you 99 rare candies
45 Just adds the "HIRO Put the Item in the Pocket" dialog after the item is given.

WARPING

[3C][Map bank][Map no][X][Y]

Pretty Self Explanitory...

POKEPICS

55 [xx]

Displays a pokepic at predifined coordinates.
You can use 56 for "display pokepic with a Yes/no box"

xx = Pokemon no.

POKEMART

6A 47 93 [Dialog no] [Mart no 2byte] 53 49 90


Code:
[FONT=Lucida Console][FONT=Comic Sans MS]Dialogues:[/FONT][/FONT]
 
[FONT=Lucida Console][FONT=Comic Sans MS]00 = "Welcome! How can I help you?" dialogue[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]01 = bitter herb medicine dialogue[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]02 = rare items dialogue (exchanges mart inventory and every item can only be bought once)[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]03 = sell medicine dialogue[/FONT][/FONT]
Marts:

Code:
[FONT=Comic Sans MS]00 = Cherrygrove City without PokéBalls
[/FONT] [FONT=Comic Sans MS]01 = Cherrygrove City with PokéBalls
[/FONT] [FONT=Comic Sans MS]02 = Violet City
[/FONT] [FONT=Comic Sans MS]03 = Azalea Town
[/FONT] [FONT=Comic Sans MS]04 = 
[/FONT] [FONT=Comic Sans MS]05 = 2nd floor Goldenrod City Mart/ Counter1
[/FONT] [FONT=Comic Sans MS]06 = 2nd floor Goldenrod City Mart/ Counter2
[/FONT] [FONT=Comic Sans MS]07 = 3rd floor Goldenrod City Mart
[/FONT] [FONT=Comic Sans MS]08 = 4th floor Goldenrod City Mart
[/FONT] [FONT=Comic Sans MS]09 = 5th floor Goldenrod City Mart/ Counter1, if all ??? aren't enabled
[/FONT] [FONT=Comic Sans MS]0A = 5th floor Goldenrod City Mart/ Counter1 when ???
[/FONT] [FONT=Comic Sans MS]0B = 5th floor Goldenrod City Mart/ Counter1 when ???
[/FONT] [FONT=Comic Sans MS]0C = 5th floor Goldenrod City Mart/ Counter1 when ???
[/FONT] [FONT=Comic Sans MS]0D = 
[/FONT] [FONT=Comic Sans MS]0E = 
[/FONT] [FONT=Comic Sans MS]0F = 
[/FONT] [FONT=Comic Sans MS]10 = Mahagony town
[/FONT] [FONT=Comic Sans MS]11 = Blackthorne City
[/FONT] [FONT=Comic Sans MS]12 = 
[/FONT] [FONT=Comic Sans MS]13 = Pewter City
[/FONT] [FONT=Comic Sans MS]14 = Cerulean City
[/FONT] [FONT=Comic Sans MS]15 = Lavender
[/FONT] [FONT=Comic Sans MS]16 = Vermillion City
[/FONT] [FONT=Comic Sans MS]17 = 2nd floor Prismania City Mart/ Counter1
[/FONT] [FONT=Comic Sans MS]18 = 2nd floor Prismania City Mart/ Counter2
[/FONT] [FONT=Comic Sans MS]19 = 3rd floor Prismania City Mart
[/FONT] [FONT=Comic Sans MS]1A = 4th floor Prismania City Mart
[/FONT] [FONT=Comic Sans MS]1B = 5th floor Prismania City Mart/ Counter1
[/FONT] [FONT=Comic Sans MS]1C = 5th floor Prismania City Mart/ Counter2
[/FONT] [FONT=Comic Sans MS]1D = Fuchsia City
[/FONT] [FONT=Comic Sans MS]1E = 
[/FONT] [FONT=Comic Sans MS]1F = Mt. Moon-Shop
[/FONT] [FONT=Comic Sans MS]20 = Indigo Plateau
[/FONT] [FONT=Comic Sans MS]21 = 
[/FONT] [FONT=Comic Sans MS]>=22 = [/FONT]


That is all the basic examples for now....Until I learn more! xD


Resources:

***********
Movement List
***********
Code:
[FONT=Lucida Console][FONT=Lucida Console][FONT=Comic Sans MS]NOTE: Always in order: down, up, left, right; always 4 per action[/FONT][/FONT][/FONT]
[FONT=Lucida Console][FONT=Lucida Console][FONT=Comic Sans MS]This rule ends from code 0x45 on. Items with variables in parentheses, (xx), have a variable after them.[/FONT][/FONT]
[/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]00 = Turn head Down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]01 = Turn head Up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]02 = Turn head Left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]03 = Turn head Right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]04 = ½ step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]05 = ½ step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]06 = ½ step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]07 = ½ step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]08 = slow step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]09 = slow step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]0A = slow step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]0B = slow step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]0C = 1 step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]0D = 1 step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]0E = 1 step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]0F = 1 step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]10 = 1½ step[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]11 = 1½ step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]12 = 1½ step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]13 = 1½ step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]14 = slow slide 1 step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]15 = slow slide 1 step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]16 = slow slide 1 step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]17 = slow slide 1 step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]18 = slide 1 step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]19 = slide 1 step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]1A = slide 1 step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]1B = slide 1 step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]1C = fast slide 1 step down [/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]1D = fast slide 1 step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]1E = fast slide 1 step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]1F = fast slide 1 step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]20 = Turn 1 step (Face opposite of HIRO) down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]21 = Turn 1 step (Face opposite of HIRO) up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]22 = Turn 1 step (Face opposite of HIRO) left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]23 = Turn 1 step (Face opposite of HIRO) right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]24 = Turn 1 step (Facing HIRO) down [/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]25 = Turn 1 step (Facing HIRO) up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]26 = Turn 1 step (Facing HIRO) left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]27 = Turn 1 step (Facing HIRO) right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]28 = 1 step in waterfall mode (facing changes between down and right) down ???[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]29 = 1 step in waterfall mode (facing changes between down and right) up ???[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]2A = 1 step in waterfall mode (facing changes between down and right) left ???[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]2B = 1 step in waterfall mode (facing changes between down and right)  right ???[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]2C = slow jump over 1 step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]2D = slow jump over 1 step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]2E = slow jump over 1 step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]2F = slow jump over 1 step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]30 = jump over 1 step down[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]31 = jump over 1 step up[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]32 = jump over 1 step left[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]33 = jump over 1 step right[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]34 = fast jump over 1 step[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]3A = remove fixed facing[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]3B = fix facing[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]3D = hide person[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]45 = make move before command faster[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]46 = Wait for time (xx as time)[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]47 = End of moving script[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]49 = hide person[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]4C = Teleport from[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]4D = Teleport to[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]4E = Fall from above screen[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]4F = 5 whole turns[/FONT][/FONT]
[FONT=Lucida Console][FONT=Comic Sans MS]55 = Shake screen (xx as displacement)[/FONT][/FONT]

************
Pokemon List
************

Code:
[/FONT][/B][FONT=Comic Sans MS]01 - Bulbasaur      40 - Kadabra        7F - Pinsir         BE - Aipom
02 - Ivysaur          41 - Alakazam       80 - Tauros         BF - Sunkern
03 - Venusaur       42 - Machop         81 - Magikarp       C0 - Sunflora
04 - Charmander   43 - Machoke        82 - Gyarados       C1 - Yanma
05 - Charmeleon    44 - Machamp        83 - Lapras         C2 - Wooper
06 - Charizard      45 - Bellsprout     84 - Ditto          C3 - Quagsire
07 - Squirtle       46 - Weepinbell     85 - Eevee          C4 - Espeon
08 - Wartortle      47 - Victreebell    86 - Vaporeon       C5 - Umbreon
09 - Blastoise      48 - Ventacool      87 - Jolteon        C6 - Murkrow
0A - Caterpie       49 - Tentacruel     88 - Flareon        C7 - Slowking
0B - Metapod        4A - Geodude        89 - Porygon        C8 - Misdreavus
0C - Butterfree     4B - Graveler       8A - Omanyte        C9 - Unown
0D - Weedle         4C - Golem          8B - Omastar        CA - Wobbuffet
0E - Kakuna         4D - Ponyta         8C - Kabuto         CB - Girafarig
0F - Beedrill       4E - Rapidash       8D - Kabutops       CC - Pineco
10 - Pidgey         4F - Slowpoke       8E - Aerodactyl     CD - Forretress
11 - Pidgeotto      50 - Slowbro        8F - Snorlax        CE - Dunsparce
12 - Pidgeot        51 - Magnemite      90 - Articunno      CF - Gligar
13 - Rattata        52 - Magneton       91 - Zapdos         D0 - Steelix
14 - Raticate       53 - Farfetch'd     92 - Moltres        D1 - Snubbull
15 - Spearow        54 - Doduo          93 - Dratini        D2 - Granbull
16 - Fearow         55 - Dodrio         94 - Dragonair      D3 - Qwilfish
17 - Ekans          56 - Seel           95 - Dragonite      D4 - Scizor
18 - Arbok          57 - Dewgong        96 - Mewtwo         D5 - Shuckle
19 - Pikachu        58 - Grimer         97 - Mew            D6 - Heracross
1A - Raichu         59 - Muk            98 - Chikorita      D7 - Sneasel
1B - Sandshrew      5A - Shellder       99 - Bayleef        D8 - Teddiursa
1C - Sandslash      5B - Cloyster       9A - Meganium       D9 - Ursaring
1D - Nidoran (f)    5C - Gastly         9B - Cyndaquil      DA - Slugma
1E - Nidorina       5D - Haunter        9C - Quilava        DB - Magcargo
1F - Nidoqueen      5E - Gengar         9D - Typhlosion     DC - Swinub
20 - Nidoran (m)    5F - Onix           9E - Totodile       DD - Piloswine
21 - Nidorino       60 - Drowzee        9F - Croconaw       DE - Corsola
22 - Nidoking       61 - Hypno          A0 - Feraligatr     DF - Remoraid
23 - Clefairy       62 - Krabby         A1 - Sentret        E0 - Octillery
24 - Clefable       63 - Kingler        A2 - Furret         E1 - Delibird
25 - Vulpix         64 - Voltorb        A3 - Hoothoot       E2 - Mantine
26 - Ninetails      65 - Electrode      A4 - Noctowl        E3 - Skarmory
27 - Jigglypuff     66 - Exeggcute      A5 - Ledyba         E4 - Houndour
28 - Wigglytuff     67 - Exeggcutor     A6 - Ledian         E5 - Houndoom
29 - Zubat          68 - Cubone         A7 - Spinarak       E6 - Kingdra
2A - Golbat         69 - Marowak        A8 - Ariados        E7 - Phanpy
2B - Oddish         6A - Hitmonlee      A9 - Crobat         E8 - Donphan
2C - Gloom          6B - Hitmonchan     AA - Chinchou       E9 - Porygon2
2D - Vileplume      6C - Lickitung      AB - Lanturn        EA - Stantler
2E - Paras          6D - Koffing        AC - Pichu          EB - Smeargle
2F - Parasect       6E - Weezing        AD - Cleffa         EC - Tyrogue
30 - Venonat        6F - Rhyhorn        AE - Igglybuff      ED - Hitmontop
31 - Venomoth       70 - Rhydon         AF - Togepi         EE - Smoochum
32 - Diglett        71 - Chansey        B0 - Togetic        EF - Elekid
33 - Dugtrio        72 - Tangela        B1 - Natu           F0 - Magby
34 - Meowth         73 - Kangaskhan     B2 - Xatu           F1 - Miltank
35 - Persian        74 - Horsea         B3 - Mareep         F2 - Blissey
36 - Psyduck        75 - Seadra         B4 - Flaaffy        F3 - Raikou
37 - Golduck        76 - Goldeen        B5 - Ampharos       F4 - Entei
38 - Mankey         77 - Seaking        B6 - Bellossom      F5 - Suicune
39 - Primeape       78 - Staryu         B7 - Marill         F6 - Larvitar
3A - Growlithe      79 - Starmie        B8 - Azumarill      F7 - Pupitar
3B - Arcanine       7A - Mr. Mime       B9 - Sudowoodo      F8 - Tyranitar
3C - Poliwag        7B - Scyther        BA - Politoed       F9 - Lugia
3D - Poliwhirl      7C - Jynx           BB - Hoppip         FA - Ho-oh
3E - Poliwrath      7D - Electabuzz     BC - Skiploom       FB - Celebi
3F - Abra           7E - Magmar         BD - Jumpluff[/FONT][B][FONT=Comic Sans MS]
************
Item list
************

Code:
[/FONT][/B][FONT=Comic Sans MS]01 - Master Ball          51 - Poison Barb          AF - Squirt Bottle
02 - Ultra Ball           52 - King's Rock          B1 - Park Ball
03 - Bright Powder        53 - Bitter Berry         B2 - Rainbow Wing
04 - Great Ball           54 - Mint Berry           B4 - Brick Piece
05 - Pok¿ Ball            55 - Red Apricorn         B5 - Surf Mail
07 - Bicycle              56 - Tiny Mushroom        B6 - Lite Blue Mail
08 - Moon Stone           57 - Big Mushroom         B7 - Portrait Mail
09 - Antidote             58 - Silver Powder        B8 - Lovely Mail
0A - Burn heal            59 - Blue Apricorn        B9 - Eon Mail
0B - Ice heal             5B - Amulet Coin          BA - Morph Mail
0C - Awakening            5C - Yellow Apricorn      BB - Blue Sky Mail
0D - Paralyze heal        5D - Green Apricorn       BC - Music Mail
0E - Full Restore         5E - Cleanse Tag          BD - Mirage Mail
0F - Max Potion           5F - Mystic Water         BF - TM01 Dynamic Punch
10 - Hyper Potion         60 - Twisted Spoon        C0 - TM02 Headbutt
11 - Super Potion         61 - White Apricorn       C1 - TM03 Curse
12 - Potion               62 - Black Belt           C2 - TM04 Rollout
13 - Escape Rope          63 - Black Apricorn       C3 - TM04 Rollout (again)
14 - Repel                65 - Pink Apricorn        C4 - TM05 Roar
15 - Max Ether            66 - Black Glasses        C5 - TM06 Toxic
16 - Fire Stone           67 - Slowpoke Tail        C6 - TM07 Zap Cannon
17 - Thunder Stone        68 - Pink Bow             C7 - TM08 Rock Smash
18 - Water Stone          69 - Stick                C8 - TM09 Psych Up
1A - HP Up                6A - Smoke Ball           C9 - TM10 Hidden Power
1B - Protein              6B - Never - Melt Ice     CA - TM11 Sunny Day
1C - Iron                 6C - Magnet               CB - TM12 Sweet Scent
1D - Carbos               6D - Miracle Berry        CC - TM13 Snore
1E - Lucky Punch          6E - Pearl                CD - TM14 Blizzard
1F - Calcium              6F - Big Pearl            CE - TM15 Hyper Beam
20 - Rare Candy           70 - EverStone            CF - TM16 Icy Wind
21 - X Accuracy           71 - Spell Tag            D0 - TM17 Protect
22 - Leaf Stone           72 - Rage Candy Bar       D1 - TM18 Rain Dance
23 - Metal Powder         75 - Miracle seed         D2 - TM19 Giga Drain
24 - Nugget               76 - Thick Club           D3 - TM20 Endure
25 - Pok¿Doll             77 - Focus Band           D4 - TM21 Frustration
26 - Full Heal            79 - Energy Powder        D5 - TM22 Solar Beam
27 - Revive               7A - Energy Root          D6 - TM23 Iron Tail
28 - Max Revive           7B - Heal Powder          D7 - TM24 Dragon Breath
29 - Guard Spec.          7C - Revival Herb         D8 - TM25 Thunder
2A - Super Repel          7D - Hard Stone           D9 - TM26 Earthquake
2B - Max Repel            7E - Lucky Egg            DA - TM27 Return
2C - Dire Hit             7F - Card Key             DB - TM28 Dig
2E - Fresh Water          80 - Machine Part         DC - TM28 Dig (again)
2F - Soda Pop             82 - Lost Item            DD - TM29 Psychic
30 - Lemonade             83 - Star Dust            DE - TM30 Shadow Ball
31 - X Attack             84 - Star Piece           DF - TM31 Mud - Slap
33 - X Defend             85 - Basement key         E0 - TM32 Double Team
34 - X Speed              86 - Pass                 E1 - TM33 Ice Punch
35 - X Special            8A - Charcoal             E2 - TM34 Swagger
36 - Coin Case            8B - Berry Juice          E3 - TM35 Sleep Talk
37 - Item Finder          8C - Scope Lens           E4 - TM36 Sludge Bomb
39 - Exp. Share           8F - Metal Coat           E5 - TM37 Sand Storm
3A - Old Rod              90 - Dragon Fang          E6 - TM38 Fire Blast
3B - Good Rod             92 - LeftOvers            E7 - TM39 Swift
3C - Silver Leaf          96 - Mystery Berry        E8 - TM40 Defense Curl
3D - Super Rod            97 - Dragon scale         E9 - TM41 Thunder Punch
3E - PP UP                98 - Berserk Gene         EA - TM42 Dream Eater
3F - Ether                9C - Sacred Ash           EB - TM43 Detect
40 - Max Ether            9D - Heavy Ball           EC - TM44 Rest
41 - Elixer               9E - Flower Mail          ED - TM45 Attract
42 - Red Scale            9F - Level Ball           EE - TM46 Thief
43 - Secret Potion        A0 - Lure Ball            EF - TM47 Steel Wing
44 - S.S.Aqua Ticket      A1 - Fast Ball            F0 - TM48 Fire Punch
45 - Mystery Egg          A3 - Light Ball           F1 - TM49 Fury Cutter
47 - Silver Wing          A4 - Friend Ball          F2 - TM50 Nightmare
48 - MooMoo Milk          A5 - Moon Ball            F3 - HM01 Cut
49 - Quick Claw           A6 - Love Ball            F4 - HM02 Fly
4A - Poison Cure Berry    A7 - Normal Box           F5 - HM03 Surf
4B - Gold Leaf            A8 - Gorgeous Box         F6 - HM04 Strength
4C - Soft Sand            A9 - Sun Stone            F7 - HM05 Flash
4D - Sharp Beak           AA - Polkadot Bow         F8 - HM06 Whirlpool
4E - Paralyze Cure Berry  AC - Up Grade             F9 - HM07 Waterfall
4F - Burnt Berry          AD - Berry                FF - Nothing
50 - Ice Berry            AE - Gold Berry[/FONT][B][FONT=Comic Sans MS]
If you have any Questions, Feel Free to ask.
 
Last edited:

FHJoker

Re-thinking Osmium
88
Posts
16
Years
Here is a tutorial on how to script, Skeetendo showed me how to do it, so now I'm sharing with everyone. If I missed anything, please Tell me.

******************
What You Will Need
******************

1. Hex Editor(Preferably Translhextion)
2. Gold Map 1.6
3. Tauwasser's Scripting Compendium
4. Pokémon Gold or Silver Rom
5. Pointer Calculator
6. Windows Calculator(Start>All Programs>Accesories>Calculator)

***************

First you Pick which person to edit. We will edit the fat guy in New bark town, so go in Goldmap and double-click New bark town, and the "Map Properties" Will come up. Go to the events data offset and it should be: $120366. Now we open our Hex Editor and we go to this address. This takes us to the start of the actual event data for the map. Now we scroll down until we find a blank space after the data that is already in this bank. The blank space starts at 0x1225A0.

Now that we have found our blank space, we have some room to insert our script. For our script I will make the Fat guy display Simple Text. Our SCript should look like:

6A 47 4C xx xx 53 49 90

You can Type "00" for the x's for now. Now, after you have typed the script, you can go to the byte after 90 Which should be 0x1225A8, and Write Text, BUT! before you go crazy writing text, make sure you start it with 00.
Example:

00 87 A4 AB AB AE E7 - This text will say "Hello!" But it is wrong.

00 87 A4 AB AB AE E7 57 00 - This is correct, always end the text with 57 00, so the game knows the text has been ended, if you don't you will Get a message that says "1df-" or "2df-".

Ok, so far we have our script and text, now what? Now you fill in those 00's for the text pointer. To get the pointer use Scizz's A-point to calculate it. All you do is type the offset (0x1225A8) and hit Calculate pointer. (make sure the "Offset in Pointer" is checked). You should get 48A865 as the pointer. take the last four digits (A865) and put it in the script. It should now look like this:
6A 47 4C A8 65 53 49 90 00 87 A4 AB AB AE E7 57 00 (Underline is the text)

Before you save it, Calculate the pointer of where the script starts (0x1225A0) and write it down.

Click save. All right, the script is in the game. Now we need to assign it to someone.

The pointer you wrote down, You will now need it. Open up Calculator in accessories, and click on the "Hex" bullet. Type in the first byte of the 4 digit pointer( 1 byte = 2 digits) type in A0 , then click on the "Dec" Bullet and you get "160". Do the same for the second byte, type in 65 and get 101.

Now Reload your Rom in A-map....Just kidding. Reload it in Goldmap, goto Events Tab, then click on the fat guy. His info should pop up. Where it says Text Block Type in "160" And where it says Text bank, type in "101".

Hit Save and test it. If you did it wrong, then you either don't get any text at all, or get a "1Df-" message.

You have learned how to script in hex, For GOLD version! Spread the news, and get more people into hacking gold.


Special Award goes to Skeetendo Inc. For teaching me Scripting!
[S-HIGHLIGHT]/-|-\
\-|-/[/S-HIGHLIGHT] - Here is your award, Please accept!
******************
Examples:
******************
REGULAR TALK
6A 47 4C xx xx 53 49 90 - Faceplayer, then open text box and writes the text from the pointer. Then close text box.

EMOTICON
6A 73 00 74 00 zz xx 90 - 00 = Emoticon no. zz = Person no(add 1 to it. person is 2 add 1 and is 3) xx = Time in hex 10 is 0A.

YES/NO
6A 47 4C xx xx 54 4E 09 xx xx 4C xx xx 53 49 90 -
Ok, the 54 means to keep a text box open, so that a Yes/no box(4E) comes up. 09 xx xx means that if it is yes, then go to the pointer xx xx, If no then the script continues, in this case, Text comes up and says "Fine Then" You don't need to put another 47 4C because the text box was already open so you just need to load new text from a new pointer. Btw, 08 xx xx = If no then goto (pointer), and 09 xx xx = If yes then goto (pointer). You Do NOT NEED BOTH!

That is all the basic examples for now....Until I learn more! xD

If you have any Questions, Fell Free to ask, even though most of them I probably Will not answer based on my experience...xD
Where can I get the table file for Translhextion?
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
I love this! Nice work cooley, it will definitely help alot of people including me.
But I need time to learn XD. Anyways, nice work!

~Celebi
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
*UPDATE

I updated the first post with more Examples of scripts to help you get scripting better. I'll do whatever I can to help you Get it.
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
Just what CBM was talking about, I have basically no replies. I bet you if this were a Tutorial on how to Edit FireRed completely I'd get a bunch of replies. Same goes for my other topic with the Megamap tool.

The tool makes hacking Gold Easier! People don't care of course, bet you they can't wait for advance map 1.9, What can I say, I hack both games of course so...
 
1,104
Posts
16
Years
Hey, cooley, I was just looking through the scripting Compendium, because I was a little bored, and I saw this.
Checks if HIRO/account has got zzyyxx money. Gives feedback: 00 = Enough money
01 = Exact amount
02 = Less money
zzyyxx = amount of money (000000 - 0F423F)

Structure:

[24][00-HIRO/01-account][xxyyzz]
So I was wondering, how would we call upon the 01 or 00? Kind of like the compare command of the third gen. I was just wondering.
 

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
Hey, cooley, I was just looking through the scripting Compendium, because I was a little bored, and I saw this.

So I was wondering, how would we call upon the 01 or 00? Kind of like the compare command of the third gen. I was just wondering.
I imagine you would use the 06-0B RAM checks.
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
Well, I was about to answer that, but thanks anyways!
Structure is 08 xx xx - Answer = no and 09 xx xx - Answer = Yes.

Just like GBA, you don't need both, if one is uesd, then you wn't need the other.

boxset 5
compare LASTRESULT 0x1
if 0x1 goto $gggg

If the answer is No, the next line after "if 0x1 goto $gggg" Will be what happens if you say no.

6A 47 4C xx xx 54 4E 09 xx xx 4C xx xx 53 49 90 - If yes, then goto pointer, and if no a text box comes up saying No is chosen.

I haven't used the other RAM checks, but Oh Well. Markus, do you happen to know how to use the bitTable set correctly? correctly?
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
Here's a link explaining the bit-table format. All they are are flags; just set a bit and write scripts that do stuff if the bitflag is set or reset.

Of all of those flags, which ones are for free use? are they the ones that aren't mentioned?
What's the difference between bitTable 1 set and bitTable 2 set?

Last question: Is the structure like:
6A 31 yy yy 06-0B xx xx ............... 33 yy yy 90 (......... = Script)
That's it?
 

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
Of all of those flags, which ones are for free use? are they the ones that aren't mentioned?
I doubt all the flags have been figured out. Probably you'd have to overwrite at least some of the existing ones for whatever you plan on doing.
What's the difference between bitTable 1 set and bitTable 2 set?
Table 2 is generally used for major flags such as Fly locations being found and the Time Capsule being open.
Is the structure like:
6A 31 yy yy 06-0B xx xx ............... 33 yy yy 90 (......... = Script)
That's it?
That looks about right. It depends on what you're trying to do, though.
 
16
Posts
16
Years
  • Age 33
  • Seen Apr 26, 2009
Now we scroll down until we find a blank space after the data that is already in this bank. The blank space starts at 0x1225A0.

Now that we have found our blank space, we have some room to insert our script. For our script I will make the Fat guy display Simple Text. Our SCript should look like:

I'm new to G/S/C hacking, just started actually.
I'm kind of experienced with FR/LG but I don't like it, I really prefer G/S/C.
So, I'm much more attracted to hacking those than the newer Advance games. I'd play Pokemon Prism over Shiny Gold any day. So any other tutorials you could write on the subject of scripting in a hex editor for Gold would be excellent. I have a question though. I might be retarded or something, then again I am a noob with hex editing, but I don't quite get what you mean by ''Now we scroll down until we find a blank space....The blank space starts at 0x1225A0....'', because I scroll down when I get to $120366, and I can't find 0x1225A0. By blank space you mean where the numbers are 00's right? Ugh, I don't know, but I'm not gonna give up on G/S/C editing so hopefully you get what I am saying. If not, tell me and I'll try to explain it differently.
Thanks.
 

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
Yes, in Pokemon GSC blank space is generally any large block of 00s.
 
16
Posts
16
Years
  • Age 33
  • Seen Apr 26, 2009
Alright, thanks man.
So, does it really matter where I write? Because I'm still having difficulty finding 0x1225A0. Well, rather, a blank space at that point.
 

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
In most cases it does matter where you write, because you'll want the data to be in the same bank, or block of 0x4000 bytes.

What version are you in? Data in Crystal is located differently from Gold and Silver.
 
Status
Not open for further replies.
Back
Top