Closed LluisCat closed 3 years ago
Hello!
To change the font in this game, you have to:
The main problem is that we can use all the characters we need because the game only allows a limited number of variable width characters.
I think @foubou made a French translation of this game, so he had to deal with those characters. Maybe he can send you the font files and the needed code modifications.
Hi ! Yes, I think I can help with the missing characters, but I need time to prepare the tool and the files. I'll reply here when it's ready ! @LluisCat In what language do you want to translate the game ?
Hi ! Yes, I think I can help with the missing characters, but I need time to prepare the tool and the files. I'll reply here when it's ready ! @LluisCat In what language do you want to translate the game ?
Hello! I want to translate the game into Catalan.
These are the extra characters used: àèò ïü éíóú ç ÀÈÒ ÏÜ ÉÍÓÚ Ç · «»
Also, when writing "l·l" a halfwidth "L l" would be advisable
As I said, I made the font myself and inside TF2 the font is correct, but inside the game the characters are not showing. Maybe I'm not doing something correct when creating the font, or I'm missing some step. I tried to change plugin source code as @Kaplas80 said, but the result is the same. I don't really understand what is the problem.
Example:
Thank you for answering and for your help ^^
Here is a tool you can try : https://drive.google.com/file/d/1p2fAjMbRX0x8Wk456d6XM--WUwKS8ljK/view?usp=sharing Just follow the instructions to make it work. If you have troubles using it, I am here to help you. ;) Good luck !
Here is a tool you can try : https://drive.google.com/file/d/1p2fAjMbRX0x8Wk456d6XM--WUwKS8ljK/view?usp=sharing Just follow the instructions to make it work. If you have troubles using it, I am here to help you. ;) Good luck !
Hello, I can't enter this link. An error appears saying it fails to comply with terms and conditions :/
Oh sorry, let me fix it !
Try this new link : https://drive.google.com/drive/folders/1MKzpKV9DFNx6SreJjLn0576zJfdI2rnD?usp=sharing
Okay, this time it is working. Thank you ^^ I will ask you if I have any problem.
Try this new link : https://drive.google.com/drive/folders/1MKzpKV9DFNx6SreJjLn0576zJfdI2rnD?usp=sharing
I am trying and trying and I don't know what's wrong ;-; I created the font using your folder and first I didn't have Ed6Back.exe because I didn't know I needed it but it created the fonts anyway. After that, I imported the files in TF2 but I get the same results as always. The font is showing right in the program, not in the game. After that I tried downloading Ed6Back.exe but when I paste the fonts created with this .exe they show buggy in TF2. Anyway, the result in game is the same. Are you using TF2 to translate? Because I think maybe the problem is with the program encoding that can't recognize these characters when creating the text files... (The "plugin source code" @Kaplas80 mentioned) Also, when I'm creating the font this error appears: "ERROR?0Character: À" (for every letter) I don't know if this is normal.
(Font without Ed6Back.exe) (Font with Ed6Back.exe) (Text that I wrote in TF2) (Text in game with ED6_DT00 that appears in "to_copy_inside_game_folder") (Text in game with ED6_DT00 modified with TF2)
The problem is that you are using characters over 0xDF
(à = 0xE0
). If the string has any character over 0xDF, the game reads it as the first byte of a two-byte character and that's why it shows strange symbols.
The problem is that you are using characters over
0xDF
(à = 0xE0
). If the string has any character over 0xDF, the game reads it as the first byte of a two-byte character and that's why it shows strange symbols.
So what is the solution to this? How I can use these characters without showing other symbols?
What do I have to modify? I'm not experienced enough to solve this by myself.
You are right, it might be an encoding problem. I am using a custom TF2 to translate the menus only. For the scenario, I am using spreadsheets and another tool made by a friend. I don't know what my friend modified though, I have little knowledge about programming. To compile scripts, I am also using the font tool made by ZhenjianYang. https://github.com/ZhenjianYang/SoraTranslation-Tools https://github.com/ZhenjianYang/SoraTranslation-Tools/tree/master/examples/french This tool has a special encoding and you can try to modify some of the values to display properly your characters. (see screenshot). I'll run some tests myself and I'll let you know if I find a solution. ;)
You are right, it might be an encoding problem. I am using a custom TF2 to translate the menus only. For the scenario, I am using spreadsheets and another tool made by a friend. I don't know what my friend modified though, I have little knowledge about programming. To compile scripts, I am also using the font tool made by ZhenjianYang. https://github.com/ZhenjianYang/SoraTranslation-Tools https://github.com/ZhenjianYang/SoraTranslation-Tools/tree/master/examples/french This tool has a special encoding and you can try to modify some of the values to display properly your characters. (see screenshot). I'll run some tests myself and I'll let you know if I find a solution. ;)
Before trying TF2 I was trying Sora Translation tools and I made my first custom font there, but when using"3.compile_scripts" this error appeared (I opened an issue there, but nobody answered):
C:\Users\Lluis\SoraTranslation-Tools\examples\french>(
title Compiling C0100
py "py\C0100.py" "--cppy=..\..\SoraTrs\SoraSJIS.py" "--chlist=chlist.txt" "--gp=dir" "scena"
)
Traceback (most recent call last):
File "C:\Users\Lluis\SoraTranslation-Tools\examples\french\PyLibs\ouroboros\dbghelp\invoker.py", line 6, in Try
return method(*values)
File "C:\Users\Lluis\SoraTranslation-Tools\examples\french\py\C0100.py", line 6, in main
CreateScenaFile(
File "C:\Users\Lluis\SoraTranslation-Tools\examples\french\EDDecompiler\Decompiler\ED6FCScenaFile.py", line 81, in CreateScenaFile
initDatFileNameTable(GAME_PATH)
File "C:\Users\Lluis\SoraTranslation-Tools\examples\french\EDDecompiler\Decompiler\Base\ED6FCBase.py", line 46, in initDatFileNameTable
n = buf[i:i+0x10].split(b'\x00', 1)[0].decode(CODE_PAGE)
LookupError: unknown encoding: Sora-SJIS
So now I'm in this situation in which everything is failing.
TF2 replaces the characters over 0x7F
and that's why I told @LluisCat to edit the plugin source to add the characters he needs.
new Tuple<string, string>("É", "\u0026"), //&
new Tuple<string, string>("Í", "\u0027"), //'
new Tuple<string, string>("á", "\u003B"), //;
new Tuple<string, string>("é", "\u005C"), //\
new Tuple<string, string>("í", "\u005E"), //^
new Tuple<string, string>("ó", "\u005F"), //_
new Tuple<string, string>("ú", "\u0060"), //`
new Tuple<string, string>("ü", "\u007B"), //{
new Tuple<string, string>("ñ", "\u007D"), //}
new Tuple<string, string>("¡", "\u007E"), //~
new Tuple<string, string>("¿", "\u007F"), //DEL
You can add other replacements like new Tuple<string, string>("à", "\u00DF"),
but you won't be able to adjust their width.
TF2 replaces the characters over
0x7F
and that's why I told @LluisCat to edit the plugin source to add the characters he needs.new Tuple<string, string>("É", "\u0026"), //& new Tuple<string, string>("Í", "\u0027"), //' new Tuple<string, string>("á", "\u003B"), //; new Tuple<string, string>("é", "\u005C"), //\ new Tuple<string, string>("í", "\u005E"), //^ new Tuple<string, string>("ó", "\u005F"), //_ new Tuple<string, string>("ú", "\u0060"), //` new Tuple<string, string>("ü", "\u007B"), //{ new Tuple<string, string>("ñ", "\u007D"), //} new Tuple<string, string>("¡", "\u007E"), //~ new Tuple<string, string>("¿", "\u007F"), //DEL
You can add other replacements like
new Tuple<string, string>("à", "\u00DF"),
but you won't be able to adjust their width.
Well, I changed
new Tuple<string, string>("á", "\u003B"), //;
to new Tuple<string, string>("à", "\u003B"), //;
but I don't see any difference.
For example, I wrote the sentence: El pare fa tárd tàrd
This is the game using the Spanish font but using new Tuple<string, string>("à", "\u003B"), //;
This is the game using my custom font and using new Tuple<string, string>("à", "\u003B"), //;
Why is "á" still working if I removed it from Encoding.cs?
I think you have changed the code but have not recompiled the dll or replaced it in the plugins folder.
You have to build the tool from source. Download VisualStudio and the TF2 source files, make your changes and launch TranslationFramework2.sln
Oh, okay. Now I understand the problem. I downloaded both the compiled version and the VisualStudio version. So I wasn't changing anything when modifying the script. I'm sorry you have to bear with me and my little programming knowledge. I guess I'll try downloading VisualStudio and see if I get to solve anything.
Don't worry, I will try to help you the best I can to solve your problem ! ;)
Well, after hours and hours of fighting, I ALMOST got the expected result. In the first red box a "À" should appear, in the second one a "Ü" and in the third one a "Ç". I don't know why they aren't showing. ;-;
Also @foubou the tool you provided creates fonts without "ò" "ú" and other characters I need. Do you know if it is possible to modify it to include them?
Well, after hours and hours of fighting, I ALMOST got the expected result. In the first red box a "À" should appear, in the second one a "Ü" and in the third one a "Ç". I don't know why they aren't showing. ;-;
Good job for making it work ! The "À" "Ç" "Ü" should appear in-game if they are in your chlist file and in TF2.
Can you send me a translated ._SN file please ? I'd like to run some tests and see how catalan characters are displayed with my tools and setup.
The files are directly in .dat and .dir because I'm translating with TF2. I have the ._SN file, but I don't think it is going to work because it has the wrong encoding and I don't know how to apply it with "3.compile_scripts". It gives me an error.
There's only one translated sentence, the second sentence from the beginning of the game. Here are the files: https://drive.google.com/drive/folders/1vtP-HJpJObqXlUNaLfzYutaAivGA50dM?usp=sharing
Also, my chlist has all the characters. I don't know where is it failing.
Thank you for uploading your files. I'll make some tests when I have time. ;)
Thanks to you! :) Meanwhile, I will be making some more tests to see if changing the position of these letters or something fixes the problem.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello, @foubou I've been busy this time, but in the future I would like to continue and get help for the fonts because I can't get to separate well the letters from each other. Would you give me your e-mail for contact, please? It would be appreciated. After this I think I can close the thread because the main problem was solved.
Oh !! Really sorry Luis, I was busy too with other projects and completely forgot to come back to you. My mail is foubou@msn.com Feel free to contact me anytime ! I will have some time this week-end.
Oh !! Really sorry Luis, I was busy too with other projects and completely forgot to come back to you. My mail is foubou@msn.com Feel free to contact me anytime ! I will have some time this week-end.
I understand, I'm in other projects too haha. I will do so ^^
Hello, I'm trying to import custom fonts for this game. The characters I want show up on the preview screen, but when I export and test the game, different characters show up. In the .exe I can't assign the characters either.
I must say I tested the font provided by TranslationFramework and the correct characters appear, so I suppose it is a problem of my font. It is a good font but lower case for "à" "è" "ò" "ç" "ï" or "·" are missing, so I can't use it. Also, I created my custom font with MakeFont.py from SoraTranslation-Tools to provide you some more information.
What should I do? Is there any font available with these characters?