Making a text editor

Discussion in 'NDS - ROM Hacking and Translations' started by joesteve1914, Feb 15, 2014.

  1. joesteve1914
    OP

    joesteve1914 GBAtemp Fan

    Member
    346
    142
    Jul 31, 2012
    United States
    How would you go about making a text editor/dumper for a DS game? I have the table for the game and know how the pointers work.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,747
    9,618
    Nov 21, 2005
    United Kingdom
    There are tools to help dump and insert test (cartographer and atlas being the big two, you may also like Kruptar 7) but they do not always work the best with modern console text formats (they are built more for set memory locations and the like).

    Usually then you find a programming language and teach it how to read your text table (up to you if you want to render it in the game's font), handle your pointers should there be any, handle any markup if it is not part of the font, handle any variables if such things are present and so forth.

    You may or may not want to do line/section length checking, if you are exporting to text you have to both figure out a way to export it so others can read it (I usually use square brackets with readable text* or XML style markup) and a way to import it back again (including fixing the presumably altered pointers). If you are doing a 16 bit to 8 bit conversion then you also have to account for that, most of the time this is just a matter of having an export table and an import table.

    *an example might be

    You need to get the [italic]rusty spork of destiny[/italic] to enter this palace.

    Basically any general purpose language will do here. If you already know one then go with that, if you do not know any then you have several choices. For the most part though it boils down to C#, python or java though not many hackers use java (thankfully).
     
  3. DarthNemesis

    DarthNemesis GBAtemp Maniac

    Member
    1,211
    41
    Feb 19, 2008
    United States
    TingleTrans v1.0

    I didn't look closely at the other files, other than to see that they use LZ77 compression.
     
    Phoenix Goddess likes this.
  4. Kelebek

    Kelebek GBAtemp Regular

    Member
    165
    62
    May 25, 2012
    Did you figure out what those other shorts were for in each string entry Darth?
     
  5. DarthNemesis

    DarthNemesis GBAtemp Maniac

    Member
    1,211
    41
    Feb 19, 2008
    United States
    The third one? I suspect that they're flags, but messing with them didn't seem to do anything.
     
  6. joesteve1914
    OP

    joesteve1914 GBAtemp Fan

    Member
    346
    142
    Jul 31, 2012
    United States
    Thanks so much for making this!
    But when I change ふうせん-
    Warning: Spoilers inside!
    to Balloon I get this-
    Warning: Spoilers inside!
     
  7. DarthNemesis

    DarthNemesis GBAtemp Maniac

    Member
    1,211
    41
    Feb 19, 2008
    United States
    I double checked and it's recalculating the line length correctly in lang.bin. Did you start with a fresh file? I'm not running into any particular length restrictions.

    [​IMG]
     
  8. joesteve1914
    OP

    joesteve1914 GBAtemp Fan

    Member
    346
    142
    Jul 31, 2012
    United States
    Oh, I just redownloaded it and now it works.

    Thanks again for making this!