Jump to content

Font, Locale


Aelina

Recommended Posts

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!

Link to comment
Share on other sites

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... :(

Link to comment
Share on other sites

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  ;_;

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

xskGAk6.png

xlWaTmZ.png

Is there a way to fix it?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
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:

xskGAk6.png

xlWaTmZ.png

Is there a way to fix it?

I can send you russian Rio.arc if it needed. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...