The Evil Winthin 2

Need help translating games in other languages? Have your language problems solved here.
User avatar
Posts: 196
Joined: Sat Nov 26, 2016 3:39 pm
Has thanked: 7 times
Been thanked: 6 times

Re: The Evil Winthin 2

Post by GHOST DEAD » Wed Jun 06, 2018 5:34 pm

In .xml files; bearingX is advanceX! Not a bX to bring offset to right! Actully you set wrong name

Replace AdvanceX to bearinX, you set worng name...

And also; you must change your source to creat a new 48.dat with added characters, not inject or insert value's...
Be Good, Even in distressing or defamation and chill, Even Everyone's Called You a Bad Guy Or Lier and Mad

Posts: 13
Joined: Tue Dec 16, 2014 5:47 pm

Re: The Evil Winthin 2

Post by Zotya0330 » Sat Jun 09, 2018 3:53 pm

And how to edit font files?

Posts: 6
Joined: Wed Nov 19, 2014 9:52 pm
Location: Ukraine
Been thanked: 2 times

Re: The Evil Winthin 2

Post by ripper » Tue Jul 31, 2018 7:01 pm

As i need recreate fonts (because english letters slight bolder than cyrillic) and You guys have some trouble with that, here detailed example.
There is big topic about Id tech textures, if you are interested - here link.

Before we start, you'll need some hex editor, we will put in and out image data from .bimage files.

Let's go:

1. After extracting pkr data, go to <extracted directory>\generated\textures\fonts and you'll see following folders

If your writting system alphabetical, as mine, you need change next fonts

If not, you might choose other fonts.

2. Go to first directory, fot_newrodinpro_db, and open 48.bimage in hex editor. You will see something like this

2.1. Find Goto function (in some editors Ctrl+G) set offset to 12 (dec) or 0C (hex) and press enter (or "Go" button)

2.2. Here is our image width - 1000 px

2.3. Now find goto function once again and set offset to 16 (dec) or 10 (hex) and press enter (or "Go" button)

2.4. Here is our image height - 2032 px

2.5. Now goto find goto function once again and set offset to 62 (dec) or 3E (hex) and press enter (or "Go" button)

2.6. Press Ctrl+Shift+End and copy (Ctrl+C) selected data (if nothing happened, click on the underscored symbol and press again)
2.7. Create new file (Ctrl+N), paste (Ctrl+V) data and save file (Ctrl+S). I named this file fot_newrodinpro_db.raw
2.8. Now you need create blank dds image, for these purposes I use GIMP. So open GIMP, create a new file with our image size and click OK

2.9. Now click File -> Export as (Ctrl+Shift+E) choose DDS image from dropdown list
2.10. Select compression BC3/DXT5, no mipmaps, no additional options and save file

2.11. Open created dds image in hex editor and goto 128 (dec) or 80 (hex) offset.

2.12. Press Ctrl+Shift+Home and copy selected data (if nothing happened check 2.6)
2.13. Paste this data at the beginning of fot_newrodinpro_db.raw

2.14. Save file as

Note: same thing with other files. Here sizes, start at 2.5 step for copy other data
fot_newrodinpro_db - 1000x2032
fot_udkakugo_large_pr6_m - 1112x2264
tng_font_cn - 860x2872
tng_font_ko - 840x1600
tng_font_lang - 368x656
tng_font_zh - 1076x2296
tng_gothic_m - 260x752

3. Now is time for edit image, i'll use Adobe Photoshop with NVIDIA Texture Tools because i'm still don't learned how to use others (GIMP, Paint .NET, Krita). You need any image editor with ability work with image channels.
Little about image. Image splitted by 2 parts, left part placed in red channel, right part - alpha channel. So real width of images are multiplited by 2, remember that, when you'll setting coordinates in xml-like font map file. Real image looks something like this

When you finish save image as DXT5

4. So, when you`ll finish with images, time add them to font map. Open xml-like file <extracted directory>\fonts\fot_newrodinpro_db\48.dat.xml
4.1. First thing what you need to do - update chars count, if you need add 1, 2, 5, 10 etc. chars, add to chars number. In current version fot_newrodinpro_db has 1920 chars, i need add only 8, so for me chars count is 1928.

4.2. Now going to UTF-8 encoding table and Unicode characters resource and choose your range, for me is U+0400 ... U+04FF: Cyrillic. Set "numerical HTML encoding of the Unicode character" param to decimal
4.3. When i added characters to DOOM (2016) weird thing happened. If i added char at the end of list, game don't recognized it, so i recommend add chars by id order. In my case first letter with id 1028

4.4. Copy closest row, paste after and set id

4.5. Now go to our image and get coordinates. In my case letter on the red channel so his X=528, Y=240, width=29, height=35 (if you add chars to alpha channel add to coordinate image width). Keep in mind, in program bearing is advance and advance is bearing. I missnamed params when develop tool. If bearing(advance) value > 127 substract 256, just wrong variable type.

5. Now you need only put in image data to bimage file and import back to pkr.
5.1. Open dds image and goto offset 128
5.2. Press Ctrl+Shift+End and copy selected data (if nothing happened check 2.6)
5.3. Open .bimage file and goto offset 62
5.4. Press Ctrl+Shift+End, paste previously copied data (if nothing happened check 2.6) and save file.

That's all, do same with other fonts, import data to pkr and enjoy your fonts.

Note: on version 1.0 fonts changed only, if you import map and image to p1_loc_01.pkr/ptr file. So if you try import to the other file and nothing change, try import to p1_loc_01.

Sorry for this long text. I would like hide all this in spoiler, but spoiler tag doesn't work.
Oh, and sorry for my english.
Impossible is nothing.

Post Reply