Aelina Posted August 26, 2017 Posted August 26, 2017 Hello! Does somebody know how to change font and locale on Will Сo. engine? Or can somebody do it for me? The translation almost done, but... this engine doesn't support cyrillic symbols. I already asked many people about it, but... nobody know what to do >.< I will be grateful for any help! Quote
Veshurik Posted August 26, 2017 Posted August 26, 2017 Wow, cyrillic symbols? What the novel from Will are you translated in Russian?! This engine is so bad for me... I can't crop window size less than 1280x720... For example, games by Ensemble... Ugh! Stupid engine! Arrgh! I wish I want to help, but... I really don't know, I'm just the usual user... Quote
Aelina Posted August 26, 2017 Author Posted August 26, 2017 3 minutes ago, Veshurik said: Wow, cyrillic symbols? What the novel from Will are you translated in Russian?! This engine is so bad for me... I can't crop window size less than 1280x720... For example, games by Ensemble... Ugh! Stupid engine! Arrgh! I wish I want to help, but... I really don't know, I'm just the usual user... Oh, well... it's otome "Re:Birthday Song", 90% already translated. ^.^ It's ok! I don't know what to do with this engine too. Ah, I just hope that this problem will be solved in the near future. One person offered help, but price was too hight. We're just small team and all of us are students. We can't afford it. Also, I tried many ways to change font and locale, but I failed ;_; Quote
Aelina Posted August 26, 2017 Author Posted August 26, 2017 Just now, Keisuke said: No money down, satisfaction guaranteed! It was the first thing that I tried and... it didn't help. Quote
Keisuke Posted August 26, 2017 Posted August 26, 2017 Really? It worked for me. What font are you trying to change it to? Quote
Aelina Posted August 26, 2017 Author Posted August 26, 2017 1 minute ago, Keisuke said: Really? It worked for me. What font are you trying to change it to? I tried many different fonts (I don't even remember all of them) , but still no difference in russian text. Quote
binaryfail Posted August 26, 2017 Posted August 26, 2017 Cyrillic symbols should work if you are using their Shift-JIS variants. Let's assume that was already done. This engine seems to only support monospaced text, so you need to use a font with fixed-width characters. Since the Cyrillic glyphs are considered full-width under Shift-JIS, the engine uses double-width spacing which brings in extra (unwanted) spacing between each letter. The engine will need a bit of patching to get the spacing to an acceptable amount. After that is all done, this is what it would look like with the default font (MS Gothic) for Cyrillic text. Quote
Aelina Posted August 26, 2017 Author Posted August 26, 2017 44 minutes ago, binaryfail said: Cyrillic symbols should work if you are using their Shift-JIS variants. Let's assume that was already done. This engine seems to only support monospaced text, so you need to use a font with fixed-width characters. Since the Cyrillic glyphs are considered full-width under Shift-JIS, the engine uses double-width spacing which brings in extra (unwanted) spacing between each letter. The engine will need a bit of patching to get the spacing to an acceptable amount. After that is all done, this is what it would look like with the default font (MS Gothic) for Cyrillic text. Oh... thank you for the answer! Now I understand why it happend, but I don't know how to patch engine. Actually, I understand nothing in such things.. Please, can you explane step-by-step what should I do to achieve your result? Quote
binaryfail Posted August 27, 2017 Posted August 27, 2017 In this case, patching the engine means you would need to dig through the engine's code with a debugger and edit pieces of code that handle the text output. The example I showed is just a proof-of-concept. More work is needed in other areas like the backlog, and trying to fix it is more troublesome than I expected right now. I don't have too much free time to look at this. Since you asked for some steps to get the result, I'll write them below. The guide will be given as a large picture here. As a reminder, I used the trial version of the game. You will need OllyDbg 2.01 if you want to follow along. Quote
marcus-beta Posted August 27, 2017 Posted August 27, 2017 1 hour ago, binaryfail said: The guide will be given as a large picture here. As a reminder, I used the trial version of the game. You will need OllyDbg 2.01 if you want to follow along. i'm curious, you found this algorithm searching by the GetTextMetrics or something like this? Because you start searching for a constant... Quote
Aelina Posted August 27, 2017 Author Posted August 27, 2017 4 hours ago, binaryfail said: In this case, patching the engine means you would need to dig through the engine's code with a debugger and edit pieces of code that handle the text output. The example I showed is just a proof-of-concept. More work is needed in other areas like the backlog, and trying to fix it is more troublesome than I expected right now. I don't have too much free time to look at this. Since you asked for some steps to get the result, I'll write them below. Reveal hidden contents The guide will be given as a large picture here. As a reminder, I used the trial version of the game. You will need OllyDbg 2.01 if you want to follow along. Thank you very much!! It worked, but... not perfect. Sometimes it looks good, sometimes not: Is there a way to fix it? Quote
Aelina Posted August 27, 2017 Author Posted August 27, 2017 Also, some symbols too close to each other: Quote
binaryfail Posted August 27, 2017 Posted August 27, 2017 9 hours ago, marcus-beta said: i'm curious, you found this algorithm searching by the GetTextMetrics or something like this? Because you start searching for a constant... I like to look for GetGlyphOutline or CreateFont since those are usually where the interesting stuff is found. On this engine, following the width arg in CreateFontIndirect was helpful in finding where the text's properties originated. 6 hours ago, Aelina said: Thank you very much!! It worked, but... not perfect. Sometimes it looks good, sometimes not Is there a way to fix it? Right now, the example code only works on text when it's fading into view. I will need to keep looking for the parts which handle the instantly-displayed text. That will take me a while to figure out. 6 hours ago, Aelina said: Also, some symbols too close to each other: If you want to test a slightly wider value for spacing, try 20 40 instead of 1C 40. Quote
Aelina Posted August 27, 2017 Author Posted August 27, 2017 4 minutes ago, binaryfail said: Right now, the example code only works on text when it's fading into view. I will need to keep looking for the parts which handle the instantly-displayed text. That will take me a while to figure out. Ohh! I will wait as long as it takes! I'm very grateful to you, you're literally my saviour ^^ 9 minutes ago, binaryfail said: If you want to test a slightly wider value for spacing, try 20 40 instead of 1C 40. Thank you, it helped. Quote
binaryfail Posted August 29, 2017 Posted August 29, 2017 Here is a small follow-up. The steps are a bit shorter due to time constraints. Instructions are here in this image. This is the code that you'll need for the part I highlighted in the blue rectangle. cmp dword [esp+D8],0xB jnz short 4BB79A imul edi,edi,8 jmp 4184CE imul edi,dword [esp+D8] jmp 4184CE So with this fix, the main game text should be good to go. The next problem has to do with the backlog again, as the engine is hardcoded to allow 70 bytes (or 35 double-width characters) per row in the backlog. The hardcoded value is scattered at various places in the engine so this will take time to go over. Quote
Aelina Posted September 8, 2017 Author Posted September 8, 2017 On 29.08.2017 at 5:30 AM, binaryfail said: Here is a small follow-up. The steps are a bit shorter due to time constraints. Reveal hidden contents Instructions are here in this image. This is the code that you'll need for the part I highlighted in the blue rectangle. cmp dword [esp+D8],0xB jnz short 4BB79A imul edi,edi,8 jmp 4184CE imul edi,dword [esp+D8] jmp 4184CE So with this fix, the main game text should be good to go. The next problem has to do with the backlog again, as the engine is hardcoded to allow 70 bytes (or 35 double-width characters) per row in the backlog. The hardcoded value is scattered at various places in the engine so this will take time to go over. Thank you! It helped a lot. ^^ But I still have this problem: On 27.08.2017 at 1:08 PM, Aelina said: Thank you very much!! It worked, but... not perfect. Sometimes it looks good, sometimes not: Is there a way to fix it? I can send you russian Rio.arc if it needed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.