Tutorial: Hacking the text in Pokemon DP/Pt.

Discussion in 'NDS - ROM Hacking and Translations' started by Rykin, Sep 23, 2008.

Thread Status:
Not open for further replies.
  1. Rykin
    OP

    Rykin GBAtemp Fan

    Member
    394
    0
    Feb 15, 2004
    United States
    Baltimore, MD
    Edit:

    Mods please close this thread.
     
  2. Tragoedia181

    Tragoedia181 B*tch I Look Like Goku!!

    Banned
    553
    0
    Mar 9, 2008
    United States
    Bronx, NY
    nice patch and happy birthday
     
  3. mehrab2603

    mehrab2603 GBAtemp Fan

    Member
    341
    25
    Sep 29, 2008
    Bulgaria
    Dhaka
    Rykin could you kindly post your compiled poketextds please.I compiled the source code of poketextds but when i tried to run the program it gives me an error message and closes the program.
     
  4. kazumi213

    kazumi213 GBAtemp Regular

    Member
    293
    0
    Oct 16, 2006
    Hi Rykin.

    Which (hex) editor accept 2-byte character replacement tables coded using UTF as the one supplied in the PokeTxt distribution? I know Windhex allows 2-byte character tables, but they must be coded in S-JIS.

    Thanks in advance.
     
  5. Rykin
    OP

    Rykin GBAtemp Fan

    Member
    394
    0
    Feb 15, 2004
    United States
    Baltimore, MD
    As some of you may have noticed, I never continued this tutorial into more advanced methods. This is because I became annoyed at certain people and decided "Screw it. You can figure it out for yourself".

    @mehrab2603
    No. Go read some C++ Tutorials. You'll figure it out.

    @kazumi213
    I couldn't find any that I liked. I just use hex workshop (I changed the character display settings) and manually added in the extra value. I sometimes forget to do this and that's how many of the ????? typos showed up.
     
  6. upbumpo190

    upbumpo190 GBAtemp Regular

    Member
    168
    0
    Jun 9, 2007
    France
    The 5th dimension
    @Rykin

    I fixed the PokeText source, and have it compiled and ready to re-encrypt, but I have one question, with the poketext.exe program how to we get it to re-encrypt upon execution? I havel my unencrypted bin files ready. I read somewhere that the file I want to re-encrypt has to be named dec.dat. But I am unsure, as I have tried this, placing it in various locations, to no avail. It must be me doing something wrong. I am not asking for help with the (C++) source code, so don't worry.

    Sorry to have offended you earlier on,

    Chris

    Edit:
    I see you have requested this thread to be closed. Permission to pm?
     
  7. warmijwilfaain

    warmijwilfaain War Mage MILF

    Member
    1,297
    43
    Sep 30, 2007
    Kent. lolol
    inb4lock
     
  8. upbumpo190

    upbumpo190 GBAtemp Regular

    Member
    168
    0
    Jun 9, 2007
    France
    The 5th dimension
    @Rykin
    I tried what you said, and I have one .exe decrypting to .bin, and I have this one to encrypt, but I get various C++ syntax errors when compiling. I'm not the best at this, so if anyone can point out my mistake(s), it would be appriciated.

    Chris

    EDIT2:
    I re-updated the code with a line of code, that gets rid of the errors ("fpout" undeclared indentifier).
    It successfully compiles, but I get one warning, which is the cause of crash upon launch.
    It is:

    warning C4700: uninitialized local variable 'data16' used
    warning C4700: uninitialized local variable 'fpout' used

    Here is the updated code.
    CODE
    int main(int argc, char *argv[])
    {

    int sze;

    u16 *data16;
    u32 *data32;
    FILE *fp;
    FILE *fpout;
    char filename[20];

    for(int i=0; ichars, i+1, data16+(((sdptr+i)->Ptr)/2), fpout); // encrypt Txt
    DecyptPtrs(*data16, *(data16+1), sdptr); // and ptr


    sprintf(filename, "done\\%03d.bin", i);
    fpout = fopen(filename, "wb");
    fwrite(data16, 1, sze, fpout);
    fclose(fpout);
    free(data16);
    }
    }
     
  9. Rykin
    OP

    Rykin GBAtemp Fan

    Member
    394
    0
    Feb 15, 2004
    United States
    Baltimore, MD
    One major thing I notice is that DecyptTxt() no longer has a for() loop, yet it's still calling the variable in the loop (i).

    As your code is right now, it /may/ re-encrypt the header, but it won't touch the actual text.

    Okay... here's the big hint.
    Take the decrypter. Remove the HTM output. If that works, move to the next step.

    The encrypter has one major difference from the decrypter.
    The call for DecyptTxt() comes before DecyptPtrs() in the encrypter.

    What compiler are you using?
     
  10. upbumpo190

    upbumpo190 GBAtemp Regular

    Member
    168
    0
    Jun 9, 2007
    France
    The 5th dimension
    Thanks again for your help, I'll keep working on it, I think I mixed up a few things. So off I go again, but for now, I think I'll just watch a movie.

    If you ever decide to release your project to someone willing to continue it, I would be more than happy to take the job, as I have the time and the patience, needed.

    Btw, happy late birth-day, sorry for the lateness. [​IMG]

    Chris
     
  11. upbumpo190

    upbumpo190 GBAtemp Regular

    Member
    168
    0
    Jun 9, 2007
    France
    The 5th dimension
    @Rykin, I didn't see your edit before I replied, I am using Microsoft C++ Express Edition, I will try what you said, in the edit. I think I will try again from ground zero, in the exact order that you described.
     
  12. Rykin
    OP

    Rykin GBAtemp Fan

    Member
    394
    0
    Feb 15, 2004
    United States
    Baltimore, MD
    Do you happen to have AIM? I'm online right now.
     
  13. upbumpo190

    upbumpo190 GBAtemp Regular

    Member
    168
    0
    Jun 9, 2007
    France
    The 5th dimension
    Yes, just let me reboot my pc into XP, my screen name is upbumpo190. BRB 2 min
     
Thread Status:
Not open for further replies.