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.
Sep 23, 2008
  1. Rykin
    OP

    Member Rykin GBAtemp Fan

    Joined:
    Feb 15, 2004
    Messages:
    394
    Location:
    Baltimore, MD
    Country:
    United States
    Edit:

    Mods please close this thread.
     
  2. Tragoedia181

    Banned Tragoedia181 B*tch I Look Like Goku!!

    Joined:
    Mar 9, 2008
    Messages:
    553
    Location:
    Bronx, NY
    Country:
    United States
    nice patch and happy birthday
     
  3. mehrab2603

    Member mehrab2603 GBAtemp Fan

    Joined:
    Sep 29, 2008
    Messages:
    335
    Location:
    Dhaka
    Country:
    Bangladesh
    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

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    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

    Member Rykin GBAtemp Fan

    Joined:
    Feb 15, 2004
    Messages:
    394
    Location:
    Baltimore, MD
    Country:
    United States
    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

    Member upbumpo190 GBAtemp Regular

    Joined:
    Jun 9, 2007
    Messages:
    168
    Location:
    The 5th dimension
    Country:
    France
    @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

    Member warmijwilfaain War Mage MILF

    Joined:
    Sep 30, 2007
    Messages:
    1,297
    Location:
    Kent. lolol
    Country:
    United Kingdom
  8. upbumpo190

    Member upbumpo190 GBAtemp Regular

    Joined:
    Jun 9, 2007
    Messages:
    168
    Location:
    The 5th dimension
    Country:
    France
    @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

    Member Rykin GBAtemp Fan

    Joined:
    Feb 15, 2004
    Messages:
    394
    Location:
    Baltimore, MD
    Country:
    United States
    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

    Member upbumpo190 GBAtemp Regular

    Joined:
    Jun 9, 2007
    Messages:
    168
    Location:
    The 5th dimension
    Country:
    France
    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

    Member upbumpo190 GBAtemp Regular

    Joined:
    Jun 9, 2007
    Messages:
    168
    Location:
    The 5th dimension
    Country:
    France
    @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

    Member Rykin GBAtemp Fan

    Joined:
    Feb 15, 2004
    Messages:
    394
    Location:
    Baltimore, MD
    Country:
    United States
    Do you happen to have AIM? I'm online right now.
     
  13. upbumpo190

    Member upbumpo190 GBAtemp Regular

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

Share This Page