ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old June 15th, 2007 (9:42 AM).
Tentachu's Avatar
Tentachu Tentachu is offline
Movie Making Expert
     
    Join Date: Sep 2003
    Location: In front of my PC
    Age: 25
    Gender:
    Nature: Careful
    Posts: 273
    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

    Relevant Advertising!

      #2    
    Old June 15th, 2007 (1:18 PM).
    HackMew's Avatar
    HackMew HackMew is offline
    Mewtwo Strikes Back
    • Crystal Tier
     
    Join Date: Jun 2006
    Posts: 1,314
    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 (4:10 PM).
    >Bent<'s Avatar
    >Bent< >Bent< is offline
    awhups
       
      Join Date: Oct 2006
      Location: Reading the Psalms.
      Age: 27
      Gender:
      Nature: Adamant
      Posts: 50
      Tauwasser actually translated his document; you can find the English version at RHDN.
      __________________
      Reply With Quote
        #4    
      Old June 19th, 2007 (9:51 PM).
      RinniP's Avatar
      RinniP RinniP is offline
         
        Join Date: Mar 2007
        Gender:
        Nature: Adamant
        Posts: 16
        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< >Bent< is offline
        awhups
           
          Join Date: Oct 2006
          Location: Reading the Psalms.
          Age: 27
          Gender:
          Nature: Adamant
          Posts: 50
          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 (9:27 AM).
          Irish Witch's Avatar
          Irish Witch Irish Witch is offline
          Office Jenny
             
            Join Date: Jul 2006
            Location: Australia
            Age: 37
            Gender:
            Nature: Lonely
            Posts: 147
            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 (8:59 AM).
            Tentachu's Avatar
            Tentachu Tentachu is offline
            Movie Making Expert
               
              Join Date: Sep 2003
              Location: In front of my PC
              Age: 25
              Gender:
              Nature: Careful
              Posts: 273
              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 (9:56 AM).
              >Bent<'s Avatar
              >Bent< >Bent< is offline
              awhups
                 
                Join Date: Oct 2006
                Location: Reading the Psalms.
                Age: 27
                Gender:
                Nature: Adamant
                Posts: 50
                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

                Join the conversation!

                Create an account to post a reply in this thread, participate in other discussions, and more!

                Create a PokéCommunity Account

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