Home Sweet Home locres file

How to translate the files of a game
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Home Sweet Home locres file

Post by patyek »

Hi!

How to extract the HSH.locres file? All of the extractor won't work, all run but not export the text just always run.

Br.: Patyek
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Re: Home Sweet Home locres file

Post by makc_ar »

Try this tool
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Home Sweet Home locres file

Post by patyek »

makc_ar wrote:Try this tool


Thanks a lot! It's perfect! :R
binlv1
Posts: 54
Joined: Sat Apr 15, 2017 9:00 am

Re: Home Sweet Home locres file

Post by binlv1 »

i has tried unpacking, but the subtitile part is not in the file .locres file
it is in path:
Home Sweet Home\HomeSweetHome\Content\HomeSweetHome\Blueprints\DataBase\Subtitle
in the DT_SubtitleRaw.uexp file
And I have no way to edit it
Although #makc_ar has helped me to know the subtitle but can not import again
Ren
Posts: 16
Joined: Thu Jan 12, 2017 4:54 am

Re: Home Sweet Home locres file

Post by Ren »

binlv1 wrote:i has tried unpacking, but the subtitile part is not in the file .locres file
it is in path:
Home Sweet Home\HomeSweetHome\Content\HomeSweetHome\Blueprints\DataBase\Subtitle
in the DT_SubtitleRaw.uexp file
And I have no way to edit it
Although #makc_ar has helped me to know the subtitle but can not import again

Can you tell me how to extract subtitle texts?
binlv1
Posts: 54
Joined: Sat Apr 15, 2017 9:00 am

Re: Home Sweet Home locres file

Post by binlv1 »

Ren wrote:
binlv1 wrote:i has tried unpacking, but the subtitile part is not in the file .locres file
it is in path:
Home Sweet Home\HomeSweetHome\Content\HomeSweetHome\Blueprints\DataBase\Subtitle
in the DT_SubtitleRaw.uexp file
And I have no way to edit it
Although #makc_ar has helped me to know the subtitle but can not import again

Can you tell me how to extract subtitle texts?

http://zenhax.com/memberlist.php?mode=viewprofile&u=124
he can do it, ask him
by the way, when you know, guide me :D
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Home Sweet Home locres file

Post by patyek »

binlv1 wrote:
Ren wrote:
binlv1 wrote:i has tried unpacking, but the subtitile part is not in the file .locres file
it is in path:
Home Sweet Home\HomeSweetHome\Content\HomeSweetHome\Blueprints\DataBase\Subtitle
in the DT_SubtitleRaw.uexp file
And I have no way to edit it
Although #makc_ar has helped me to know the subtitle but can not import again

Can you tell me how to extract subtitle texts?

http://zenhax.com/memberlist.php?mode=viewprofile&u=124
he can do it, ask him
by the way, when you know, guide me :D


Any progress? :)
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Re: Home Sweet Home locres file

Post by makc_ar »

Here mod folder ...\HomeSweetHome\Content\Localization\Game\en. locres file UI viewtopic.php?f=12&t=5023#p26950 + SUB http://forum.xentax.com/viewtopic.php?p=142359#p142359. locres tools: viewtopic.php?f=12&t=1022
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Re: Home Sweet Home locres file

Post by makc_ar »

New ui+sub
patyek
Posts: 100
Joined: Sat May 28, 2016 5:43 am

Re: Home Sweet Home locres file

Post by patyek »

makc_ar wrote:New ui+sub


Thanks a lot! :R

Br.: Patyek
akintos
Posts: 88
Joined: Tue May 08, 2018 7:48 pm

Re: Home Sweet Home locres file

Post by akintos »

makc_ar wrote:New ui+sub


I'm working on Unreal Engine 4 locfile scripts and stuck at generating hash.

Can you please explain what hash algorithm used to calculate it, or how did you put subtitle data into locres file?
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Home Sweet Home locres file

Post by MerlinSVK »

Are you really sure you need to calculate that hash?
akintos
Posts: 88
Joined: Tue May 08, 2018 7:48 pm

Re: Home Sweet Home locres file

Post by akintos »

MerlinSVK wrote:Are you really sure you need to calculate that hash?


Yes, I've tested with wrong string hash and found that the game checks both key and hash.
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Home Sweet Home locres file

Post by MerlinSVK »

AFAIK that hash is a "key" or "ID" for that string.

Example:

KEY = VALUE
4C8ED2A4431AE7844EC83CB4F3E6D535 = Jane! It's me!

Compare your locres with some other from the same game. You will find out, that different languages has the same hashes.
akintos
Posts: 88
Joined: Tue May 08, 2018 7:48 pm

Re: Home Sweet Home locres file

Post by akintos »

MerlinSVK wrote:Compare your locres with some other from the same game. You will find out, that different languages has the same hashes.

I've checked the source code of UE4 and found the locres generation code.

The hash value is crc32 hash of source string, so it's same for every language.

I also found the locres load code and it looks like one key can have multiple hash and string.


The problem is I can't get same crc32 hash result when I tested it.
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Home Sweet Home locres file

Post by MerlinSVK »

Well, I have never ever changed any hash (nor in .locrec nor in .pak file) and translations worked. But I didn't try this game yet.

And if I understand that code correctly, than StrCrc32 returns uint32, but hash in .locres has 16 bytes. So... some change by game Devs?
akintos
Posts: 88
Joined: Tue May 08, 2018 7:48 pm

Re: Home Sweet Home locres file

Post by akintos »

Image

Hash is 4 bytes.

I need to know how to get correct hash because I'm adding non-localized strings into localization resource file.

makc_ar somehow did it, and I want to learn how to do it.
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Home Sweet Home locres file

Post by MerlinSVK »

"I'm adding non-localized strings into localization resource file."

What do you mean by that? Are adding new strings that were not in the game?

Because if you want to translate this game, than there is no problem.

Image
akintos
Posts: 88
Joined: Tue May 08, 2018 7:48 pm

Re: Home Sweet Home locres file

Post by akintos »

Original locres file only have menu/UI strings. Subtitle strings are at DT_SubtitleRaw.uexp file, and it only have key and string data.

makc_ar wrote:Here mod folder ...\HomeSweetHome\Content\Localization\Game\en. locres file UI viewtopic.php?f=12&t=5023#p26950 + SUB http://forum.xentax.com/viewtopic.php?p=142359#p142359. locres tools: viewtopic.php?f=12&t=1022


make_ar added subtitle strings to locres file.
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Home Sweet Home locres file

Post by MerlinSVK »

Now I see... Hm, that Game.locres has older format. But I have no idea how he did it :D