Editing .siz and .str files for Translation

Discussion in 'NDS - ROM Hacking and Translations' started by GHappy, Jun 11, 2017.

  1. GHappy
    OP

    GHappy Newbie

    Newcomer
    2
    0
    Jun 11, 2017
    Dear GBATEMP members,

    I am trying to localizing captain tsubasa game on DS, however there is a problem of editing text files of extension .str and .siz.

    I can edit team names on .str file however, if the name for example in Spanish is like that Italia, and I want to change it to italy I need to delete the letter a of the original word right?

    this change will affect the .siz file which is really confused me how I understand this. take a look for both files
    str file:
    Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    00000000 4E 61 6E 6B 61 74 73 75 49 74 C3 B4 C3 94 74 6F NankatsuItôÔto
    00000010 6D 6F 41 7A 75 6D 61 69 63 68 69 44 55 4D 4D 59 moAzumaichiDUMMY
    00000020 5F 45 48 61 6E 61 77 61 48 69 72 61 64 6F 46 75 _EHanawaHiradoFu
    00000030 72 61 6E 6F 54 C3 B4 68 C3 B4 4D 75 73 61 73 68 ranoTôhôMusash
    00000040 69 4D 61 74 73 75 6B 61 6D 69 4B 6F 6E 69 73 68 iMatsukamiKonish
    00000050 69 4D 65 69 77 61 20 48 69 67 61 73 68 69 53 61 iMeiwa HigashiSa
    00000060 70 70 6F 72 6F 53 75 77 61 4D 69 6E 61 6D 69 20 pporoSuwaMinami
    00000070 55 77 61 4D 69 20 4E 61 6E 6B 61 74 73 75 44 55 UwaMi NankatsuDU
    00000080 4D 4D 59 5F 45 44 55 4D 4D 59 5F 45 4E 61 6E 69 MMY_EDUMMY_ENani
    00000090 77 61 4E 61 6B 61 68 61 72 61 45 71 75 69 70 6F waNakaharaEquipo
    000000A0 20 61 6C 65 6D C3 A1 6E 49 6E 67 6C 61 74 65 72 alemánInglater
    000000B0 72 61 55 72 75 67 75 61 79 49 74 61 6C 69 61 41 raUruguayItaliaA
    000000C0 72 67 65 6E 74 69 6E 61 46 72 61 6E 63 69 61 41 rgentinaFranciaA
    000000D0 6C 65 6D 61 6E 69 61 45 73 63 75 65 6C 61 20 50 lemaniaEscuela P
    000000E0 61 73 65 45 73 63 2E 20 49 6E 74 65 72 63 2E 45 aseEsc. Interc.E
    000000F0 73 63 2E 20 4D 65 64 69 6F 45 73 63 2E 20 42 6C sc. MedioEsc. Bl
    00000100 6F 71 75 65 45 73 63 2E 20 43 68 75 74 4E 69 70 oqueEsc. ChutNip
    00000110 6F 6E 61 59 6F 69 63 68 69 20 31 31 41 67 65 6E onaYoichi 11Agen
    00000120 74 65 20 6C 69 62 72 65 3F 20 3F 20 3F te libre? ? ?

    corresponding siz file
    Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

    00000000 00 00 08 00 08 00 04 00 0C 00 06 00 12 00 09 00 ................
    00000010 1B 00 07 00 22 00 06 00 28 00 06 00 2E 00 06 00 ...."...(.......
    00000020 34 00 06 00 3A 00 07 00 41 00 09 00 4A 00 07 00 4...:...A...J...
    00000030 51 00 0D 00 5E 00 07 00 65 00 04 00 69 00 0A 00 Q...^...e...i...
    00000040 73 00 0B 00 7E 00 07 00 85 00 07 00 8C 00 06 00 s...~...…...Œ...
    00000050 92 00 08 00 9A 00 0E 00 A8 00 0A 00 B2 00 07 00 ’...š...¨...²...
    00000060 B9 00 06 00 BF 00 09 00 C8 00 07 00 CF 00 08 00 ¹...¿...È...Ï...
    00000070 D7 00 0C 00 E3 00 0C 00 EF 00 0A 00 F9 00 0B 00 ×...ã...ï...ù...
    00000080 04 01 09 00 0D 01 06 00 13 01 09 00 1C 01 0C 00 ................
    00000090 28 01 05 00 (...
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,204
    8,969
    Nov 21, 2005
    If you are only deleting characters then many will instead choose to use a space, however if it appears in the game in the middle of a paragraph or something it will look odd.

    Anyway if they are not fixed length then there are likely some pointers (things to tell the program where to find a given value) or length values (simple things to say how long the string in question is) in either the str file or the siz file. The str file does not appear to have anything so yes it will probably be in the .siz file.
    In this case it looks like a location and size listing
    The final thing
    00000090 28 01 05 00 (...
    If you flip the 2801 to give 0128 you get something towards the end of the file. It is indeed 00 05 long.
    1C 01 0C 00
    Gives you
    011c 000c
    At 11c there is indeed a string that is 12 decimal long, or C if you are sticking with hex.
    13 01 09 00
    Gives you
    0113 0009
    0113 in the file does have a string that is 9 long.
    I could go through the rest but I think you get the idea. Sadly there does not appear to be anything you can manually search for that indicates a string end (some games use 00 or something) so if you edit a string you have to edit the siz file for that entry and all those following it.
     
  3. GHappy
    OP

    GHappy Newbie

    Newcomer
    2
    0
    Jun 11, 2017
    Many thanks FAST6191 for your reply and illustration, I will put your comments in consideration and start figure out what is happening.

    Thanks for your awesome work so far in this forum.