• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Accent marks

4
Posts
4
Years
    • Seen Jul 19, 2019
    Hi, it's me again. So I'm working on a translation of Fire Red and I noticed that the game won't display some accent marked characters (Ľ, ý, etc.) and instead displays blank spaces. Is there a way to fix this?
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Those characters aren't included as the languages that FRLG released in don't have them as part of their alphabets. Since that's the case, you'll have to edit the game's fonts and include them.

    To edit the fonts you'll have to download Tile Molester and open your ROM with it (back it up beforehand!). Navigate to 0x1F3100, goto to 'View > Codec' and select 2BPP Linear, reverse order. Click the 'Decrease Width' button at the top of the screen a couple of times until you can clearly see characters like backwards E's. This is the beginning of (one of) FR's font tables. To edit the characters its as easy as selecting the brush icon on the left and changing what you want to change. For example, it would be simple to add an accent mark over the letters L or y like you've indicate you need. However, doing this will change the appearance of every instance of L or y in the game. To avoid this, it would be best to make some brand new letters using unused character spaces. Here's a list of all of the blank characters in FR's alphabet:

    Spoiler:


    If I got my math right, there should be 99 unused characters in FR's font table - more than enough to get the job done for any latin-based alphabet. Anyway, to get to the correct position in the ROM in order to start drawing your new character, you can use this mathematical operation: 0x1F3100 + (0x40 * 0xYY), where YY is the number of the character you want. For example, if I wanted character 0x37, I would get the result 0x1F3EC0. Anyway, you can start drawing your character here, just make sure it isn't more than 16 pixels in height and if its wider than 8 pixels, have it wrap around to the right of where you started. To make it easier, you can scroll up/ down to the rest of FR's alphabetical characters and copy paste them into your desired slot and edit them there. Write down the index numbers that you inserted your letters into as you'll need them later. Save and close Tile Molester.

    Interestingly, FR actually has four different font tables (each is for a different font colour for some reason) so at this point its easiest to overwrite their data with the changes you've already made. The starting point of the extra tables are: 0x1FF300, 0x20F618 and 0x21F930. Open your ROM in HxD and navigate back to 0x1F3100. Press 'Ctrl + E' and type 4000 in the length box (make sure its set to hex at the bottom!). Press 'Ctrl + C' to copy the data that's been selected and then go to the three points in the ROM I mentioned earlier and press 'Ctrl + B' at each of them - This will paste the data on top of what's already there. Now you've change all three tables within the space of one or two minutes!

    Once you've finished making your new characters, you have to edit the font width to have it display properly in-game. Navigate to 0x1FB100 as this is the start of (one of) the game's font width table and is pretty simple to edit. Each entry in the table is a single byte and indicates how wide its corresponding character will be. To find which bytes you need to edit, just add the index number of the character to 0x1FB100. For example, if I wanted to change character 0x37's width, I would go to 0x1FB137. All of the empty slots should have a width of 06, as if they were a blank space. You can reopen Tile Molester to count how wide your characters are, but be sure not to click save in it, otherwise it may erase some of your progress. Anyway, once again, there are three more tables that you have to overwrite if you want to get everything perfect. Do the same thing you did earlier when you were overwriting the image data, except start at 0x1FB100 and change the length selected to 100. The three tables that you need to overwrite are at 0x207300, 0x217618 and 0x227930. Save your edits and now its time to test it in-game!

    Unfortunately XSE won't recognize your new characters when you write Ľ and ý in a script. To have them display properly in-game, you'll have to write them as pure hexadecimal values. This can be done by including '\h' followed by the index number of your character. Here's an example script that will display your desired characters which I've inserted in character indexes 0x37 and 0x38:

    Spoiler:


    Hopefully this all isn't too complicated. Font editing isn't really that widely known or explained so there no tutorial that I can point to and just say "read that". If you experience any issues, feel free to ask for more help~
     
    4
    Posts
    4
    Years
    • Seen Jul 19, 2019
    Thank you! I do have a question though. I'm editing the script through the Advance Text editor. So after I edit the fonts and do all that, I'll have to somehow also add the codes for the characters in Advance Text? E.g. Ľudia needs to be written as \h37udia (to use your example) in Advance Text as well?
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Normally I wouldn't advise using Advance Text, but since you're just doing a translation, it should probably be okay~

    You can use the new characters by writing [&HYY] where YY is the character index. In your example, you would write [&H37]udia.
     
    4
    Posts
    4
    Years
    • Seen Jul 19, 2019
    So what else would you recomend? I'm still open to suggestions, it's a project for my students, so I'm really open for any help I can get.

    I also tried Pokemon Text Editor, but for some reason it doesn't work. It gives me some weird errors and then shuts down. Advance Text seems the most user friendly right now.
     
    Back
    Top