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

Diamond/Pearl/Platinum hacking

Status
Not open for further replies.

SCV

DPP Game Researcher
178
Posts
16
Years
  • ??? Arceus

    I Found PokeText!!!!
    its to edit the games messages!
    attaching now
    Yes I used that and the information on the event file structures to make this rom: I did not make the video, just gave fenzo a patch.



    no i don't mind telling you SCV i'm makeing a modle and texture list for diamond, and i alrready checed out the thread before. any way thanks for the idea i might use it, but i was thinking of makeing some people say some thing different and then walk you around

    It cool that you are making those lists it will be a good contribution. As to the walking you around, we can't do that with scripting yet, that I know of. As far as I know the actual structure of the script files has not been figured out. So we can't insert things, like I did with the event file for the Hall Of Origin for the video above, without causing the game to crash.
     
    Last edited:
    39
    Posts
    16
    Years
    • Seen Sep 10, 2009
    first someone has tio figure out how
    map<->event<->script<->textfile
    are linked


    once that is known the script files should not really be a big deal (besides the fact that there are a lot of commands)
     

    SCV

    DPP Game Researcher
    178
    Posts
    16
    Years
  • first someone has tio figure out how
    map<->event<->script<->textfile
    are linked


    once that is known the script files should not really be a big deal (besides the fact that there are a lot of commands)
    Do you mean how they are figured out by the game? Or would a list made by "brute force" be fine.

    I have a list for DP of Location <-> Event and put notes that would allow me to make a Location <-> Map <-> Event list.

    The way I made it was by going through each event file and guiding myself off of what overworld sprites the event file said were in that place. Also event files are order corresponds very closely to the map order. This also helped, as I was able to use pokesav's Map/coordinate editing and coordinates from the event file to work my way through all of Sinnoh and even find places that I had never been to in the game. Some that did not make it into the game. (Like 3rd and 4th floors of some houses, in one you even get an item from a person laying in a bed.) There seem to be alot more script files but I saw that most of them are pretty empty. For the entries that I have now for Location <-> Script the order is the same as for the Event case. Except the numbers are different because there are so many empty files in between.

    I am working on Location <-> Script, thanks to the script handler offset.

    Right now I have more entries for the Platinum Location <-> Script, than DP. But I am going back to DP now.

    I am not sure if you had this info before. But this morning I identified the structure of the script files. Now its just a matter of looking at individual scripts to try to figure out commands.

    So now a video like what Potatomuffin wanted to make is almost possible. (I also have all the necessary movement commands). The telling you something different could be a problem. I have not figured out how to change what people say by linking to a different message. However, I did find out how to edit who said something. Like making the hero or assistant say "What's going on" when you enter lake verity for the first time (instead of the rival saying it).

    I am thinking of writing a program that would make it easier for us to play around with editing script files to find out what the commands are. Right now its a hassle to have to repoint everything that need to be repointed withing the script. Then the narc file. I build a small program based on your narcreader class to insert files into any narc. But its very sloppy. I just did it because I wanted to insert something into a script, yesterday. Since I did not know the structure and did not repoint the appropriate things the game crashed. Now I can make a program to repoint within script files. But then we have to use three different programs just to insert something into a script.
     
    Last edited:
    39
    Posts
    16
    Years
    • Seen Sep 10, 2009
    as a start normal lists would be fine as a start i assume (although you want to be able to change that sometime in the future & collecting data like that is not my cup of tea, i blame my short attention span ;))

    Textfile<->Script would also help a LOT since script references help.

    For narc reading/writing I use this python class nowdays (basicly ever since i switched to physton for most of my prototyping stuff) it's also the one used in newpoketext
    Code:
    from struct import *
    from array import *
    
    class BTAF:
        def __init__(self, rawdata):
            if len(rawdata)>0:           
                self.magic = rawdata[:4]
                self.header = unpack("II", rawdata[4:12])
                if self.magic != "BTAF":
                    raise NameError, "BTAF tag not found"
            else:
                self.magic = "BTAF"
                self.header = (12, 0)
                
            self.table = []
            rawdata=rawdata[12:]
            if len(rawdata)>0:
                for i in range(self.getEntryNum()):            
                    self.table.append(unpack("II", rawdata[i*8:i*8+8]))      
        def getSize(self):
            return self.header[0]
        def getEntryNum(self):
            return self.header[1]
        def ToFile(self, f, t):
            f.write(self.magic)
            f.write(pack("II", self.header[0],self.header[1]))
            
            for pair in t:            
                f.write(pack("II", pair[0], pair[1]))
        def addFile(self):
            s, e=self.header
            s += 8
            e += 1
            self.header=s, e
            
                   
        
     
        
        
    class BTNF:
        def __init__(self, rawdata):
            if len(rawdata)>0:
                self.magic = rawdata[:4]
                self.header = unpack("IIHH", rawdata[4:0x10])
                if self.magic != "BTNF":
                    raise NameError, "BTNF tag not found"
            else:
                self.magic = "BTNF"
                self.header = (16, 4, 0, 1)
        def ToFile(self, f):
            f.write(self.magic)
            f.write(pack("IIHH", self.header[0],self.header[1],self.header[2],self.header[3]))          
            
    
     
    class GMIF:
        def __init__(self, rawdata, t):
            if len(rawdata)>0:
                self.magic = rawdata[:4]
                self.size = unpack("I", rawdata[4:8])[0]
                if self.magic != "GMIF":
                    raise NameError, "GMIF tag not found"         
            else:
                self.magic = "GMIF"
                self.size = 8
    
            self.files = []
            for ofs in t:
                self.files.append(rawdata[8+ofs[0]:8+ofs[1]])
                
        def appendFile(raw):
            data += raw
            self.header.size += len(raw)
        def ToFile(self, f):
            f.write(self.magic)
            f.write(pack("I", self.size))
            for d in self.files:
                f.write(d)            
        def addFile(self, data, size):
            self.files.append(data)
            self.size += size        
        def buildIndex(self):
            index = []
            c = 0
            for f in self.files:
                l = len(f)
                index.append((c, c+l))
                c=c+l
            return index
        
        
            
    
    class NARC:
        def __init__(self, rawdata):
    
    
            if len(rawdata)>0:
                self.magic = rawdata[:4]
                if self.magic != "NARC":
                    raise NameError, "NARC tag not found"
                self.header = unpack("IIHH", rawdata[4:16])
            else:
                self.magic = "NARC"
                self.header = (0x0100FFFE, 0x10+12+8 + 0x10, 0x10, 3)
    
                
            rawdata= rawdata[16:]
            self.btaf = BTAF(rawdata)
            rawdata= rawdata[self.btaf.getSize():]
            self.btnf = BTNF(rawdata)
            rawdata= rawdata[self.btnf.header[0]:]
            #print rawdata[:10]
            self.gmif = GMIF(rawdata, self.btaf.table)
    
        def ToFile(self, f):
            f.write(self.magic)
            f.write(pack("IIHH", self.header[0],self.header[1],self.header[2],self.header[3]))
            self.btaf.ToFile(f, self.gmif.buildIndex())
            self.btnf.ToFile(f)
            self.gmif.ToFile(f)
        def addFile(self, s):
            size = len(s)
            mark, narcsz, hdrsize, sect = self.header
            narcsz += (size + 8)
            self.header = (mark, narcsz, hdrsize, sect)
            self.btaf.addFile()
            self.gmif.addFile(s, size)
        def replaceFile(self, index, s):
            newmold = len(s) - len(self.gmif.files[index])
            mark, narcsz, hdrsize, sect = self.header
            narcsz += (newmold)
            self.header = (mark, narcsz, hdrsize, sect)
            self.gmif.size += (newmold)
            self.gmif.files[index] = s
     

    SCV

    DPP Game Researcher
    178
    Posts
    16
    Years
  • Wow this is amazeing,SCV! great job! can you give us those programs?
    Well the one that will make it easier to edit scripts and other stuff has yet to be started. It was in its planning stage, but now I think I am ready to begin writing it. However, I just started school again, so progress in finishing the program might be slow.

    I am trying to recruit people to help me study scripts and events (check my signature). I posted a link to a zip file with useful programs, more will be added later. Those programs include Tahaxan Tihaxa by Arcnor, NDS Editor by kiwi.ds, NitroExplorer2 by Treeki and a small program PPNFR, which I made based on what I use in my trainer editor (based on some codes by loadingNOW, me and HackMew) to allow one to reinsert files into a narc files. This is how I was able to insert the pokeball behind arceus into the event narc. You can download that program there. and eventually I will add the link to my sig as well (probably once I get home tonight). Unfortunately, I have no idea when the other one will be done.

    When I get some time this week I will publish some information on the structure of the script files for everyone to play around with. But there won't be a program to repoint within script files yet. I will explain what should be done later.

    I am also getting some help on making the list of event files that I have presentable enough to be posted and I will post it once it is available. In the mean time I posted some of the list in the thread that is in my sig.

    EDIT: I have written a first article on scripts I will post it here as well.

    Spoiler:


    Here is the zip I mentioned earlier: https://rapidshare.com/files/179900486/ROMHackingTools.zip and I also added a link to it in my signature.

    With the information above about movements and linking, and using PPNFR, you can insert movement sequences into a script by editing the script file and replacing the file you edited with PPNFR then reinserting the narc with NitroExplorer2.
     
    Last edited:
    9
    Posts
    15
    Years
  • How can I change the text entry in Pokemon Platinum?

    I want too much change the text entry (where we edit Player's name in Pokemon Platinum) I'll put the sprite text entry in English.
    Please Help me!!!!!!!!!!!!
     
    Last edited:

    Potatomuffin

    The One And ONLY!!!
    58
    Posts
    15
    Years
  • Hey guys, i'm almost fished with that model list. it turns out i may even make a model editor.also lots of the modles are weird red square thingys.i'll probabaally finish the list tommorow.
    and septile leaf, there is already a english key board in the text entery.
    also my next vid will be comeing out some time soon.
     

    D-Trogh

    Dead
    439
    Posts
    18
    Years
  • Ah, finally everyone can enjoy 'thenewpoketext' :)
    Very nice loadingNOW!
    About the GUI; I don't think it really needs one.. oh well, I don't need one anyway.
    Someone else can make one if he/she really wants one :P
     

    sabrina-psychic

    Psychic Pokemon Guru
    7
    Posts
    15
    Years
  • Ok I don't know if this has been resolved or not but I am not sifting through 60+ threads looking for the answer. Could someone tell me if you can use POKETEX to change the main character to a different sprite. Like could I play as a psychic (mystery in poketex) instead of the two main characters they give you. Also, on the listus there's only a male psychic where's the female one? Is it also possible to use sprites from FireRed in Diamond and Pearl? And one last thing...how do I transfer all of these changes to a Nintendo DS Lite? Thanks a million!!!!!!!!
     

    EvilCrazyMonkey

    D/P Hacker-in-Training
    32
    Posts
    16
    Years
    • Seen Mar 6, 2012
    Please, at least from now on, start reading threads.
    I'll still answer the questions, though.

    Ok I don't know if this has been resolved or not but I am not sifting through 60+ threads looking for the answer. Could someone tell me if you can use POKETEX to change the main character to a different sprite.
    You can.

    Like could I play as a psychic (mystery in poketex) instead of the two main characters they give you.
    Well, you can change it to whatever, so I suppose.

    Also, on the listus there's only a male psychic where's the female one?
    I don't know. I haven't used Pokétex; I know how it works, though.

    Is it also possible to use sprites from FireRed in Diamond and Pearl?
    Pokémon sprites or overworld sprites?
    It's possible to use Pokétex for the overworlds; I do not know how to change the Pokémon sprites (I'm quite sure it's possible, though).

    And one last thing...how do I transfer all of these changes to a Nintendo DS Lite? Thanks a million!!!!!!!!
    I'm not sure of the details (as I haven't done it), but I know you need a flash cartridge. I think you can get them on eBay or something.
     
    9
    Posts
    15
    Years
  • But, Potatomuffin, I know, but Don't have to put the name selection box in English like Pokemon Diamond and Pearl English? I don't like name selection box in Japanese, because the player's name is BIG!

    But Potatomuffin, I want to put the name selection in English like Pokemon DP English.
    Because the player's name is BIG!

    and in thenewpoketex, there is a file called patchedintro.xml for what is this file?

    Please Help Me!
     
    Last edited:

    SCV

    DPP Game Researcher
    178
    Posts
    16
    Years
  • But in thenewpoketext don't have the option Help and when I open the program, open the command prompt. Help
    When you get to the command prompt press "h", then enter.
    ___________________________________________________________________________________
    Well I have finished a first script editor (As part of PPRE). Its mainly a research tool. I basically made it so that its easier for me to identify commands for DPP scripting. But I am releasing it publicly for everyone to play around with.

    Here is a video where I inserted some new commands to the script sequence and added new text with newpoketext. Its very minor and more complicated things can be done but they are a bit tedious right now because PPRE does not automatically repoint some things that need to be repointed within the individual script files (i.e., pointers to movement commands)




    For PPRE, DO NOT go through the combo boxes on the left or right too fast, this will cause the program to crash. (EDIT: Actually this is an unhanded exception that I don't know how to fix yet. Just press continue and choose something else.)

    here is a list of a few script numbers (by pichu2000, damio):
    02 Jubilife city
    342 Lake Verity
    392 Route 201
    978 Twinleaf Town
    981 Hiro's House 1 floor
    982 Hiro's Room
    984 Sandgem Town

    Look for those numbers on the left. On the right are the individual scripts for that location/script file.
    Once we have a more complete script file list I will add it to PPRE.
    Also this is to be a DPP Rom editing program but as it is mainly a research tool I am only supporting US DP for now. The research will mostly be the same, so there's no need to worry about adding Platinum support now. I will add platinum support for a particular feature once that feature is out of the research stages.
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top