More text in game?

Discussion in 'NDS - ROM Hacking and Translations' started by BlueFlame90, Sep 7, 2008.

Sep 7, 2008

More text in game? by BlueFlame90 at 11:51 PM (2,431 Views / 0 Likes) 18 replies

  1. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    When translating a game, is there a way of putting more text in than there was?
    for examle the japanese text is in the middle of a file and is 12 byte long, the english text would be 18 byte long.
    because i can't put "i lk t kw hw" in the game, when it should be "i like to know how".

    I hope somone can tell me how to do this.
     
  2. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    Most games have some offsets called pointers which point to the start and the end of a text block.Tell us the game you are translating and we might be able to help you.
     
  3. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    i don't really translate a game yet, because i need to know how to do this before i start a translation.
    are te pointers different for each game?
    how do i know or find pointers?

    if it helps i'm planning to translate code geass, but first i need to know more about romhacking
     
  4. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    Yeah they are somewhat different in every game but they are not hard to spot and edit.
     
  5. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    Really? So can you tell me hoe to spot and edit them? That would be great.
     
  6. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    Usually when you find text in a file it will be separated by 00 bytes. Write down the offset where each line of text starts after the 00, then look for those numbers somewhere else in the file. They will be stored in Little Endian order, which you should understand if you intend to change them. Basically it means that if a line of text is located at the address 0x0A7E, the pointer will be stored as 7E 0A in the pointer table.

    If you're lucky the pointer table will be something simple like line number, address, line number, address. If you're not lucky, it will be embedded in the scripting for the entire scene (loading backgrounds, animations, sounds, etc.) and the numbers won't all be the same distance apart.
     
  7. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    Are the pinters in the same file as the text or could it be in other files?
    Because i can not find the pointers, or maybe i'm just too stupid?
     
  8. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    They are usually in the same file, but there's no rule saying they have to be.
     
  9. psycoblaster

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    if you start on a trans, tell us - we might be able to help as you go along, because without anything, we cannot guide you through.
     
  10. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    I found the first Text of the game at the beginning of the file data\chiba\maptool\script\ev001_500.bin

    The first sentence is:
    ようこそ、黒の騎士団へ。 (which would be 24 Bytes long)
    Welcome to the Black Knights. (this is 29 Bytes long)

    So i tried to find a pointer for that, but i could not make it.
    If someone helps me i would start this game as a project.
     
  11. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    Wow, looks like the text is embedded directly into the cutscene script.

    Code:
    E9EA0A000000EB3E0100C7171E0057FF001E0058401011120B28006AFFED016702
    62 1B 82E682A482B182BB81418D9582CC8B528E6D926382D681425C6E00
    0C68ED016702
    62 1D 82DC82B882CD90AB95CA82F0836083468362834E82B782E981425C6E00
    62 19 82E082BF82EB82F181418349837D834782CC82BE81425C6E00
    62 27 8DC58BDF82CD81418CA982BD96DA82C582CD82ED82A982E782C882A282A982E782C881425C6E00
    0C68ED01
    62 1D 8A59939682B782E995FB82F0914991F082B782E982F182BE81425C6E00
    F1EF0003926A00EF01038F9700F3F400020000F2F3F500EB000000F5018F01000068ED01
    62 0D 82C882E982D982C781635C6E00
    62 0F 8177926A817882BE82C881485C6E00
    F1EF000582CD82A200EF010782A282A282A600F3F400020000F2F3F500BA010000F501350100001F
    80368ED01
    62 15 82E082A488EA9378814195B782B182A481425C6E00
    62 1B 8349837D834782CC90AB95CA82CD82C782BF82E782BE81485C6E00
    62 19 8A59939682B782E995FB82F0914991F082B582EB81425C6E00
    05CA000000681E8803ED01
    62 0D 82C882E982D982C781635C6E00
    62 0F 81778F97817882BE82C881485C6E00
    050E0100000F0200000068ED016702
    62 11 8349837D834782CC96BC82CD81635C6E00
    62 13 254E49434B4E414D452582BE82C881485C6E00
    F1EF000582CD82A200EF010782A282A282A600F3
    62 denotes a string, then the next number is how long it is. This could be as simple as inserting the new text and updating the number right before it.

    Edit: lol
    [​IMG]
     
  12. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    Thank you! Now that you mention it, it really is very easy^^
    Now i know most of the things i need to know for this project
    thanks for the help DarthNemesis and Noitora.
     
  13. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    I must say, this game reminds me of super robot wars games a little.The battles at least.

    Edit:I wanna have some fun too!
    [​IMG]
     
  14. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    I have soe problems with adding text:
    it freezes after selecting a choice (adding text to the file messes up te pointers)
    so itseams it doesn't work.
     
  15. psycoblaster

    Member psycoblaster Divine

    Joined:
    Jan 26, 2008
    Messages:
    2,132
    Location:
    Seoul.. (in Korea)
    Country:
    Korea, South
    [​IMG]


    [​IMG]


    well yeah
    after few choices, the ROM crashes.

    That might not be due to more texts, but the larger file size.
     
  16. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    Ok i figured it out, i will make a small example on how it works.
    But that could take a while.
     
  17. Noitora

    Member Noitora ::

    Joined:
    Aug 9, 2007
    Messages:
    3,768
    Location:
    Athens
    Country:
    Greece
    What was causing the problem?
     
  18. BlueFlame90
    OP

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    The problem is when text is added the pointers for the answers points to the wrong offsets.
    In this screenshot i fixed it already
    [​IMG]

    I marked the pointers i changed.
    But you have to change all the pointers for coices in this file.
     
  19. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    Yeah, should've known it wouldn't be that easy.

    Decision boxes have the following format:
    Code:
    F1
    EF00 03 926A00 //Label for first choice
    EF01 03 8F9700 //Label for second choice
    F3F400020000F2F3
    F500 EB000000 //Pointer to next section for first choice
    F501 8F010000 //Pointer to next section for second choice
    There are also unconditional jumps:
    Code:
    05 CA000000 //Pointer to next section
     

Share This Page