The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.


Reply
 
Thread Tools
  #1    
Old June 15th, 2007, 09:42 AM
Tentachu's Avatar
Tentachu
Movie Making Expert
 
Join Date: Sep 2003
Location: In front of my PC
Age: 22
Gender:
Nature: Careful
Hi. I'm a hacker from the 2nd Generation (Gold/Silver/Crystal) and I am about to start a new hack. I was wondering if there was a way to do scripting in GS like you can in RSE, or whether there was something similar to scripting for GS.

Long story short, is there a way of scripting GS (initiating legendary battles, etc.).
__________________

That cave above Blackthorn City sure has changed...


SIGN THE G/S REMAKE PETITION HERE!

Watch my ROM Hack videos http://www.youtube.com/profile?user=WeirdEars





In case you didn't realize, I support ShinyGold!
Reply With Quote
  #2    
Old June 15th, 2007, 01:18 PM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by Tentachu View Post
Long story short, is there a way of scripting GS (initiating legendary battles, etc.).
Yes, there is. Here you can find a really useful document about G/S scripting made by Tauwasser. Be aware that is in German so you could need some translations before fully understanding it.
Reply With Quote
  #3    
Old June 18th, 2007, 04:10 PM
>Bent<'s Avatar
>Bent<
awhups
 
Join Date: Oct 2006
Location: Reading the Psalms.
Age: 23
Gender:
Nature: Adamant
Send a message via AIM to >Bent<
Tauwasser actually translated his document; you can find the English version at RHDN.
__________________
Reply With Quote
  #4    
Old June 19th, 2007, 09:51 PM
RinniP's Avatar
RinniP
Beginning Trainer
 
Join Date: Mar 2007
Gender:
Nature: Adamant
Cant beleive Aunty K didn't see this.

Currently construction Gold/Silver database for pokescript using above data..
Database will be posted online and will allow scripts to be written using pokescript style (commands will be different but layout will be the same and script inserted using bufrite)

We'll get back to you in a few days when we have the database built.
Reply With Quote
  #5    
Old June 20th, 2007, 12:44 PM
>Bent<'s Avatar
>Bent<
awhups
 
Join Date: Oct 2006
Location: Reading the Psalms.
Age: 23
Gender:
Nature: Adamant
Send a message via AIM to >Bent<
It should also be noted that the scripting codes are slightly different in Crystal, due specifically to the Pokegear phone and the Mobile Adapter's removed functions.
__________________
Reply With Quote
  #6    
Old June 22nd, 2007, 09:27 AM
Irish Witch's Avatar
Irish Witch
Office Jenny
 
Join Date: Jul 2006
Location: Australia
Age: 34
Gender:
Nature: Lonely
Send a message via AIM to Irish Witch Send a message via Yahoo to Irish Witch
I'll keep that in mind.. I've found I'm going to have to re-engineer poketscript a little to make the database work.

Who ever heard of a three byte value?? Would never happen in most serious computer systems

A patched ver of the current pokescript will come out next week along with modifications to the pkmadv(rubikon) database. Hopefully soon after that pkmgsc will be released.

The file extentions will be
.gsc = script
.gsh = header

The buffer files will continue to have .buf extensions. It will be on your head to make sure you use the right .buf on the right rom.
__________________
PokeScript Assembler C pokewitch inc

PokeWitch's PokePets

Smitten the level 25 Kirlia! :: Myrial the Level 22 Pidgeotto
Reply With Quote
  #7    
Old June 25th, 2007, 08:59 AM
Tentachu's Avatar
Tentachu
Movie Making Expert
 
Join Date: Sep 2003
Location: In front of my PC
Age: 22
Gender:
Nature: Careful
I've got the English guide, but how do you add the scripts to the game?
__________________

That cave above Blackthorn City sure has changed...


SIGN THE G/S REMAKE PETITION HERE!

Watch my ROM Hack videos http://www.youtube.com/profile?user=WeirdEars





In case you didn't realize, I support ShinyGold!
Reply With Quote
  #8    
Old June 25th, 2007, 09:56 AM
>Bent<'s Avatar
>Bent<
awhups
 
Join Date: Oct 2006
Location: Reading the Psalms.
Age: 23
Gender:
Nature: Adamant
Send a message via AIM to >Bent<
Tauwasser once wrote an excellent post at Acmlm's detailing how to script.

Quote:
Originally Posted by Tauwasser
So, first off, I have the English version rom of Pokmn Gold here. But I'm gonna D/L one instead and tell you it's CRC-32 and MD5, just for you to be sure. MD5: A6924CE1F9AD2228E1C6580779B23878 CRC-32: 6BDE3C3E
So, my rom is 0671 - Pokemon Gold.gbc dumped by Oldskool. So, where to begin.... Well, right. You hopefully know about mapheaders and the like. Off we are to 0x940ED. That's the map bank pointer table for your information. Every pointer stands for a map-bank and points to the first mapheader in the map bank. The list is FF-terminated.

There are bytes 2141 there, so let's go to our first mapheader for map 1.1 at 94121.

2506036D5B1B090101

So. It's out first mapheader. It's a PokéCenter. Tileset 06. Permissionbyte 03. 2nd mapheader @ 25:5B6D. Location on world map is 0x1B. Music is 09. Time of day is 01, morning. Fishing byte is 01, a random set, because you obviously can't fish in a PokéCenter.

So, let's examine the 2nd mapheader @ 95B6D:

0004052BE842510040C54000

Border block is 00, a black block. Dimensions are 04x05, height times width. Blockdata/mapdata is at 2B:42E8. Scriptheader (see my doc for information) is at 51:4000. Events are at 51:40C5. Connections are none, hence 00.

Let's go to the event data. at 1440C5:


0000 Bytes with no use, just filler bytes (I checked the asm)
03 # of warps, 03
070301010E Warp #0
070401010E Warp #1
0700011401 Warp #2
00 no triggers, 00
00 no signposts either, 00
04 # of people events, 04
3705070600FFFF00000240FFFF people event #0
3B080C0501FFFF00000540FFFF people event #1
3A07060600FFFFA0000840FFFF people event #2
29050B0600FFFF00000B40FFFF people event #3



These are all generic People events, they all have only 3 byte codes in place. However, we're gonna play. Let's go to the first people event's script codes @ 51:4002 (see my doc), since all other scripts for other people follow that one.

@ 144002

0C0000 Script for people event #0
0C2D00 Script for people event #1
510E40 Script for people event #2
516740 Script for people event #3

You can check with my doc now.

So, the first one starts a pokécenter-dialog. That's the woman behind the counter. It's terminated after it finishes without a special code.

The second one is a happiness counseling dialog. It'll tell you something like "PKMN#1 is very happy" or so.

The other two actually refer to text within this rombank.

Two textcodes, one for text @ 51:400E and one @ 51:4067. This is, where your known codes happen. Both texts start off with 00Textextextextex and end with 57 (which will terminate the whole text process and not let any other codes take place. feel free to put a 50 for the first occurence of 57 and watch people event #2 say his text and event #3's text as well (of course, it'll screw up )

So. I said I'm gonna have phun. So basically, I'll tell you what to do. Either you do it, or you don't.

Set the scriptpointers for events #1 to #3 to 0x2812. That will make them not lose it, once we're done with the scripts and you enter that map.

So, that's event #0 left for us to play with. Let's make it a give-pokémon script instead of that oldfashioned pokécenter talk

So off we go. I'll make it so you can only get the pokémon once or else, it will be the PokéCenter lady talk.

311A00 - check whether pokémon was already given.
080B40 - If it wasn't already given, goto code for giving
0C0000 - PokéCenter dialog
331A00 - Set bit no so it won't be given twice.
47 - load font and start textbox, the code afterwards is gonna output something
2DFB050000 - Give a Pkmn Celbi at lvl 05 without item and with your own trainer ID
49 - rewrite sprite moving tiles to ram, we don't want ABCD's walking about.
90 - end script

Notice, how I used the bit no that s given by Elm once you got a pokémon, so it won't work unless you cheat your way there without a pokémon or have a handy cheat menu incorporated or manually edit the ram the bit is held.

Now for the test :D
http://acmlm.no-ip.org/archive3/thread.php?id=8786 (yeah I linked it, it's an archive anyway and you can't register)
__________________
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 08:12 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.