Okami HD PC - Texts files

Read or post about compression. And decompression. Or ask questions how to decompress your files.
ffgriever
beginner
Posts: 25
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Okami HD PC - Texts files

Post by ffgriever » Mon Jan 08, 2018 1:02 pm

Here is an updated msd tool that handles both u16 values properly. Now it also takes care of utf8 bom/signature.

http://ff12.pl/down/okami-tools-20180108.zip

Remember, though, the tool writes proper utf8 and expect utf8 but in fact is unaware of the encoding whatsoever. It's lazy but it works.

@innocentius92
You shouldn't need to modify MSA file for Spanish font. AFAIK all the characters used in Spanish are already there. Unless you mean the ñ character, that has some weird space on the right.

Photoshop needs a plugin to support DDS. I'm using paint.NET, though (it's free) with a "DDS Plus" plugin:
https://github.com/0xC0000054/pdn-ddsfi ... s/releases

star19990
ultra-n00b
Posts: 1
Joined: Sun Jan 07, 2018 9:59 am

Re: Okami HD PC - Texts files

Post by star19990 » Tue Jan 09, 2018 12:41 pm

ffgriever wrote:Here is an updated msd tool that handles both u16 values properly. Now it also takes care of utf8 bom/signature.

http://ff12.pl/down/okami-tools-20180108.zip

Remember, though, the tool writes proper utf8 and expect utf8 but in fact is unaware of the encoding whatsoever. It's lazy but it works.

@innocentius92
You shouldn't need to modify MSA file for Spanish font. AFAIK all the characters used in Spanish are already there. Unless you mean the ñ character, that has some weird space on the right.

Photoshop needs a plugin to support DDS. I'm using paint.NET, though (it's free) with a "DDS Plus" plugin:
https://github.com/0xC0000054/pdn-ddsfi ... s/releases
this tool support 2-byte? (ex : korean)

ffgriever
beginner
Posts: 25
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Okami HD PC - Texts files

Post by ffgriever » Tue Jan 09, 2018 1:39 pm

It doesn't support any language in particular. It supports the glyphs supported by the game and present in character replacement table (hardcoded in executable for now). It so happens I encoded the table as utf8. The tool should work (provided you'll use proper replacement table) on any encoding that doesn't use 0x00 values anywhere (it's read in text mode).

I'll add support for external table at some point. I don't need it (I have another version with hardcoded Polish diacritic characters), but it might make things easier for some people.

But... The game itself doesn't support combining jamos into full syllables, so it means you'd have to create a font with ~12k glyphs (containing all combinations) and create a table for these as well. Main font can't accommodate that much, but there is a system for Japanese version, that uses font pages (separate images) for each stage file. There can be many of such pages in each stage, but you have to add pages with all used glyphs to each stage.

For Japanese it was solved by adding kanas, romaji and some most common kanji to the main font and then adding font pages to each stage (so the font was basically different in each stage and the values of characters in one MSD file meant different glyphs than in another MSD file, in other words, the values are pointing at a particular glyph in a particualr font page, not at a particular character). But with Japanese it was easy, as there was only ~3k characters used in total, with only a small subset per stage. For Korean it actually gets more complicated. This writing system is simple and works great on paper, but becomes nightmare when there is no combining support available. Good riddance hanja are scarcely used in Korean nowadays, as that would complicate things even further :D.

prime
ultra-n00b
Posts: 3
Joined: Tue Dec 26, 2017 1:23 pm
Been thanked: 1 time

Re: Okami HD PC - Texts files

Post by prime » Tue Jan 09, 2018 3:03 pm

innocentius92 wrote:
makcar wrote:
Zolodei wrote:makcar, dismantled the MSA archive or rebuilt the image?
I used Photoshop to edit dds.
How did you do it? Photoshop does not recognize the DDS file extension.

¿Can you help me, please?
innocentius92, As I said before, You have to install DDS plug-in file to photoshop.

Please refer to this site: http://gametechdev.github.io/Intel-Text ... ks-Plugin/
(intel texture works plugin)

And if you want to edit MessCore.dds file, you have to edit both RGB and alpha channel.

ffgriever
beginner
Posts: 25
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Okami HD PC - Texts files

Post by ffgriever » Thu Jan 11, 2018 1:57 pm

An updated version of tools:

http://ff12.pl/down/okami-tools-20180111v2.zip

I've added support for PS2 binaries in okami-pack (via -ups2 and -pps2 switches).

I've added support for external character replacement table to okami-msd (via -t=table_file). I've included default table (it's not necessary as it contains exactly the hardcoded table) and Polish table I use for translation. Each line holds one entry in format

Code: Select all

u16_hex_value=replacement
The table supports utf8 (including bom). Malformed lines will be skipped (eg. value greater than u16, no 0x prefix, empty string, etc.). If a particular character is not found, tool will fall back to the hardcoded table. So only entries that have changed (or completely new entries) are required. The "replacement" part doesn't have to be one character. For example:

Code: Select all

0xb902={button}
is a valid entry and will be properly handled by both unpacker and packer. Newline at the end of file is optional.

The normal steps would probably be to export English (or other language) with default table (not specifying it at all is always a bit faster). Then translate in your native language and import with table containing all the glyphs you've used. You don't need to change parts of control/special values, because even if you've replaced it in table, it will still fallback to default table and be resolved properly.

Finally, I've fixed a stupid bug that could cause the tool to end export early or read past the end of file in very specific situations :/. Thanks to @makcar for the heads up.

faqy
n00b
Posts: 10
Joined: Tue Jun 16, 2009 10:30 am
Has thanked: 3 times

Re: Okami HD PC - Texts files

Post by faqy » Wed Jan 17, 2018 8:34 pm

ffgriever wrote:An updated version of tools:

http://ff12.pl/down/okami-tools-20180111v2.zip

I've added support for PS2 binaries in okami-pack (via -ups2 and -pps2 switches).
I found some files has messed in this version.
Like "data_pc\st0\r011.bin" will cause msd tool crash.

ffgriever
beginner
Posts: 25
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Okami HD PC - Texts files

Post by ffgriever » Thu Jan 18, 2018 8:59 am

These files are not used. On PS2 these directories (AFAIR st0, std and one or two more) were empty.

MJay
ultra-n00b
Posts: 4
Joined: Mon Aug 11, 2014 12:49 am

Re: Okami HD PC - Texts files

Post by MJay » Sat Feb 03, 2018 3:11 pm

Hi, can you update the tool to insert .pac files?

Thanks.

ffgriever
beginner
Posts: 25
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Okami HD PC - Texts files

Post by ffgriever » Sun Feb 04, 2018 1:33 pm

These files (like EmFileMes.pac or EmFileIcon.dat) have no structure at all. It's just one file appended to another and padded to the length of the largest file rounded up to the nearest 0x800. The padding is not stored within a file (probably in the executable itself), so you need to keep the offsets.

I'm attaching a quick app that works with pac files containing MSD (it won't work for dat files as you would have to check the sizes with dds headers instead of msd headers). You'll need the libraries from my previous tool pack (or mingw64 installed).

BTW. I'm done with the Polish translation and the project has been released.
You do not have the required permissions to view the files attached to this post.

MJay
ultra-n00b
Posts: 4
Joined: Mon Aug 11, 2014 12:49 am

Re: Okami HD PC - Texts files

Post by MJay » Mon Feb 05, 2018 3:24 pm

Thanks. Did you edited the IDDs files?

ffgriever
beginner
Posts: 25
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 26 times

Re: Okami HD PC - Texts files

Post by ffgriever » Mon Feb 05, 2018 6:25 pm

IDD files are handled by okami-pack tool just fine. Just as tbl, pac and many others. It's the structure that matters not the extension. The four applications in my toolset are all that's needed to do a full translation. I didn't have to use anything else.

SuHeAndZl
ultra-n00b
Posts: 1
Joined: Wed Jan 30, 2019 5:08 pm
Has thanked: 1 time

Re: Okami HD PC - Texts files

Post by SuHeAndZl » Fri Feb 01, 2019 5:32 pm

ffgriever wrote:IDD files are handled by okami-pack tool just fine. Just as tbl, pac and many others. It's the structure that matters not the extension. The four applications in my toolset are all that's needed to do a full translation. I didn't have to use anything else.
hello sorry my English is bad

i want your okami GUI tools please

Post Reply