The Forum is up for sale: XeNTaX Forum looking for new owner

Soul Worker OBT String Files (.res file)

The Original Forum. Game archives, full of resources. How to open them? Get help here.
CaseyVGCx
ultra-n00b
Posts: 2
Joined: Sat Apr 02, 2016 11:30 pm
Been thanked: 1 time

Soul Worker OBT String Files (.res file)

Post by CaseyVGCx »

Hello,

I'm currently trying to localize Soul Worker Online (F2P game) into English. I've gone so far as extracting the .v archives and obtaining the files that contains the strings to translate the game. I have uploaded a zip containing the string files.
I tried opening the .res file into Visual Studio, but I could not find the right encoding to edit the file in.


http://sharex.closershq.com/casey/Table.zip
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 136 times

Re: Soul Worker OBT String Files (.res file)

Post by WRS »

CaseyVGCx wrote:Hello,

I'm currently trying to localize Soul Worker Online (F2P game) into English. I've gone so far as extracting the .v archives and obtaining the files that contains the strings to translate the game. I have uploaded a zip containing the string files.
I tried opening the .res file into Visual Studio, but I could not find the right encoding to edit the file in.


http://sharex.closershq.com/casey/Table.zip
been waiting for this game for years. could you upload the client please?
Useful tool links:
CaseyVGCx
ultra-n00b
Posts: 2
Joined: Sat Apr 02, 2016 11:30 pm
Been thanked: 1 time

Re: Soul Worker OBT String Files (.res file)

Post by CaseyVGCx »

The whole client is here.
https://drive.google.com/open?id=0B38PE ... nVTeTBfS2M

If you prefer install / downloading the whole client from the official site, then here is that link.
http://bit.ly/1qodrLR
Miyu
ultra-n00b
Posts: 7
Joined: Sun Apr 03, 2016 11:39 am
Has thanked: 3 times
Been thanked: 2 times

Soul Worker Online Archive Format

Post by Miyu »

Hello, i am trying to translate this game but i'm kind of stuck to the archive format of the data files, i'm pretty new to this

i'll try to explain what i got until now
someone brought me(we are more in the "mini-team") XOR extractor and we used that to unpack the files from *.v files but we got stuck at trying to find the archive format of the .res files
i think some of them have a different format from other ones

only worked around tb_Skill_Script.res
first 6 bytes are nothing?
then comes one long with the size of the string that follows
another 38 bytes of nothing?
then keeps repeating, one long(size) then japanese text string
after all data comes 22 bytes of nothing?
last 32 bytes might be an MD5 checksum, i used a website to "crack" the checksum and it got me a decimal, in no way i was able to find out how they calculate it

the problem is if i change something in the translation the game won't load the file but if i just swap bytes or insert bytes but then reduce the bytes from another place to keep the file intact the game loads
here is the whole data folder that we can't find the format to: https://drive.google.com/file/d/0B1oLkd ... sp=sharing

also there is someone who does many translations for games and also did one for Soul Worker Online, but all of them are with google/bing translate and it's really, really bad. we tried to ask him to help us but he asks us for 250$...
if the files he translated help, here they are: https://drive.google.com/file/d/0B1oLkd ... sp=sharing

also if it's possible to know or explain how the *.v files were extracted? we used those files: https://drive.google.com/file/d/0B1oLkd ... sp=sharing

Thank you very much for your time! i hope someone can help us
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 136 times

Re: Soul Worker Online Archive Format

Post by WRS »

Dupe of viewtopic.php?f=10&t=14177

aaadn
also there is someone who does many translations for games and also did one for Soul Worker Online, but all of them are with google/bing translate and it's really, really bad.
LOL
Useful tool links:
Miyu
ultra-n00b
Posts: 7
Joined: Sun Apr 03, 2016 11:39 am
Has thanked: 3 times
Been thanked: 2 times

Re: Soul Worker Online Archive Format

Post by Miyu »

WRS wrote:Dupe of viewtopic.php?f=10&t=14177

aaadn
also there is someone who does many translations for games and also did one for Soul Worker Online, but all of them are with google/bing translate and it's really, really bad.
LOL
not really a dup
my question is entirely different, i want at least a hint on how the check sum at the end is calculated or if it's a check sum or not
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 136 times

Re: Soul Worker Online Archive Format

Post by WRS »

covers the same bases.

anyway, i think its a content hash as some files share the same contents and hash:

tb_MazeReward_PartyValue.res
tb_MazeReward_Difficulty.res

still looking


edit 1
Miyu wrote:also if it's possible to know or explain how the *.v files were extracted?
those .v files are just xor'ed by the value 0x55 - which are just zip files.

note: you need a decent zip extractor to get the language files, as the root folder name ".." does not show up on windows machines


edit 2

its an md5 hash of a string value which i'm still investigating:

Code: Select all

tb_Achievement
unknown value: 4669786877
md5("4669786877") == 37BA4A9FFBFE982FD83265FDB4A70CB8


tb_Achievement_begin
unknown value: 244201444
md5("244201444") == 3D3BE6A70FBDC4D6648A808844B57C45

note: you can easily patch the game to ignore invalid hash files:

Code: Select all

01286E9B  |. 83BD 24FFFFFF >CMP DWORD PTR SS:[EBP-DC],0
01286EA2  |. 0F84 CA000000  JE SoulWork.01286F72

change to :

01286E9B     E9 D2000000    JMP SoulWork.01286F72
01286EA0     90             NOP
01286EA1     90             NOP
Useful tool links:
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 136 times

Re: Soul Worker OBT String Files (.res file)

Post by WRS »

also, unfortunately each .res file has its own hardcoded parse routine.......

the generic template looks like this:

Code: Select all

int count;
[.. data ..]
short hash_len; // should be 32
char hash[hash_len]; // md5 hash of the sum of the file contents (see below)
the achievements data is FIXED, and read like this:

Code: Select all

struct Achievement
{
  uint id;
  ubyte b1;
  ushort s1;
  ubyte b2;
  ushort s2;

  ushort len; wchar_t name[len];

  ushort s3;
  int i1;
  int i2;
  int i3;
  int i4;
  int i5;
  int i6;
  int i7;
  int i8;
  byte b3;
  byte b4;
  int i9;
  int i10;
  byte b5;
  byte b6;
};

// there are *count* numbers of archivements

for anyone following along, just label these functions:

Code: Select all

012643A0 read_int
012642A0 read_byte
01264320 read_short
0125E0C0 read_wstring_with_size
specific formats can then be ripped, although thats a real pain 8)


end

the checksum at the end is just the sum of each data member, converted to string, then md5 hashed.

i've written an example here: https://gist.github.com/x1nixmzeng/3c13 ... 33254cbe34

which validates the achivement file:
Parse total: 4669786877
Expected hash: 37ba4a9ffbfe982fd83265fdb4a70cb8
Read hash: 37ba4a9ffbfe982fd83265fdb4a70cb8
-- SUCCESS--
remember that there is no "auto" serialization. the formats are fixed in the game executable.
Useful tool links:
Miyu
ultra-n00b
Posts: 7
Joined: Sun Apr 03, 2016 11:39 am
Has thanked: 3 times
Been thanked: 2 times

Re: Soul Worker OBT String Files (.res file)

Post by Miyu »

thank you very much for the help!
i won't let your efforts go to waste
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 136 times

Re: Soul Worker OBT String Files (.res file)

Post by WRS »

Miyu wrote:thank you very much for the help!
i won't let your efforts go to waste
8)

i've just extracted every single resource structure which saves manually extracting it all -->

https://gist.github.com/x1nixmzeng/a4a5 ... tructs-txt
Useful tool links:
Miyu
ultra-n00b
Posts: 7
Joined: Sun Apr 03, 2016 11:39 am
Has thanked: 3 times
Been thanked: 2 times

Re: Soul Worker OBT String Files (.res file)

Post by Miyu »

WRS wrote:
Miyu wrote:thank you very much for the help!
i won't let your efforts go to waste
8)

i've just extracted every single resource structure which saves manually extracting it all -->

https://gist.github.com/x1nixmzeng/a4a5 ... tructs-txt
wow, you did the formats for all of them, you're a god
but i don't really understand how to use it... i didn't use python before

i don't know why we need the the assembly offsets of... SoulWorker100.exe? i think
i'll use the file formats that you got and i'll try to make an extractor and a repacker
that way it will be easy to translate for our team

thank you so much for your help!
Last edited by Miyu on Sun Apr 03, 2016 10:27 pm, edited 2 times in total.
Chaiyapos72
ultra-n00b
Posts: 1
Joined: Sun Apr 03, 2016 2:32 am
Has thanked: 1 time

Re: Soul Worker OBT String Files (.res file)

Post by Chaiyapos72 »

Oh , I can't use python
but thank you very much
Miyu
ultra-n00b
Posts: 7
Joined: Sun Apr 03, 2016 11:39 am
Has thanked: 3 times
Been thanked: 2 times

Re: Soul Worker OBT String Files (.res file)

Post by Miyu »

for some reason for tb_Achievement_Script the MD5 is different, i used the structs you gave us
and i get

Code: Select all

Parse total: 1857985864
Expected hash: b6d99e9223245c7426d0c0d85aa2d15c
Read hash: 6d6d2e43af9fe67ae81a771f71a917ab
*ERROR Line 61: Assertion Failed: 
but running it on the translated(by Formica) tb_Achievement_Script it generates the same MD5

Code: Select all

Parse total: 1695499578
Expected hash: b0cb1cabe6a76d27d35dd26646352583
Read hash: b0cb1cabe6a76d27d35dd26646352583
-- SUCCESS--
both of the file are accepted by the game
if i try to replace on the original the MD5 that is expected to be with the one in there(not changing anything else) it fails to load
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 136 times

Re: Soul Worker OBT String Files (.res file)

Post by WRS »

Miyu wrote:for some reason for tb_Achievement_Script the MD5 is different, i used the structs you gave us
and i get

Code: Select all

Parse total: 1857985864
Expected hash: b6d99e9223245c7426d0c0d85aa2d15c
Read hash: 6d6d2e43af9fe67ae81a771f71a917ab
*ERROR Line 61: Assertion Failed: 
ah sorry, that checksum is slightly wrong. wchar_t is actually hashed per-byte, not per character.

interestingly it worked on tb_achievement because it didn't use japanese text (:

here is an update:

Code: Select all


struct tb_Achievement_Script
{
	uint i1; read_sum += i1;
	ushort len1; read_sum += len1;

    ubyte str1[len1*2];
    for(j=0;j<len1*2;++j) read_sum += str1[j];

	ushort len2; read_sum += len2;

	ubyte str2[len2*2];
    for(j=0;j<len2*2;++j) read_sum += str2[j];
};

typedef tb_Achievement_Script Achievement;

which is correct
Parse total: 1694900869
Expected hash: 6d6d2e43af9fe67ae81a771f71a917ab
Read hash: 6d6d2e43af9fe67ae81a771f71a917ab
-- SUCCESS--
edit

just change the struct dumper to use ubyte[] instead of wchar_t[] if that helps

https://gist.github.com/x1nixmzeng/a4a5 ... tructs-txt
Useful tool links:
Miyu
ultra-n00b
Posts: 7
Joined: Sun Apr 03, 2016 11:39 am
Has thanked: 3 times
Been thanked: 2 times

Re: Soul Worker OBT String Files (.res file)

Post by Miyu »

OH
that makes sense
thank you very much once again!
Post Reply