How to translate the files of a game
hnnewgames
Posts: 148 Joined: Sat Dec 16, 2017 8:58 pm
Post
by hnnewgames » Fri Nov 27, 2020 7:10 pm
Yeeeeey! Could anyone take a look at these files? I would like to translate that game. I found a tool and its source code on the internet, but it only extracts the texts and it doesn't matter. *I attached the texts, tool and its source code*
swuforce
Posts: 233 Joined: Thu Oct 16, 2014 4:39 pm
Post
by swuforce » Sat Nov 28, 2020 9:59 am
Snip.
Last edited by
swuforce on Mon Nov 30, 2020 11:31 am, edited 1 time in total.
hnnewgames
Posts: 148 Joined: Sat Dec 16, 2017 8:58 pm
Post
by hnnewgames » Sat Nov 28, 2020 5:27 pm
swuforce wrote: Try my tool.
Thank you, Swuforce! You're awesome!
I spent hours trying and whenever I edit some text the game bugs like that.
Last edited by
hnnewgames on Tue Dec 01, 2020 9:53 pm, edited 1 time in total.
Zmkiy
Posts: 27 Joined: Mon Mar 09, 2020 3:14 pm
Post
by Zmkiy » Sat Nov 28, 2020 5:35 pm
It's because CRC (4 bytes) after size archive. Upload .so files in "lib" folder here.
hnnewgames
Posts: 148 Joined: Sat Dec 16, 2017 8:58 pm
Post
by hnnewgames » Sat Nov 28, 2020 7:21 pm
Zmkiy wrote: It's because CRC (4 bytes) after size archive. Upload .so files in "lib" folder here.
Hmm
Here
Zmkiy
Posts: 27 Joined: Mon Mar 09, 2020 3:14 pm
Post
by Zmkiy » Mon Nov 30, 2020 5:33 pm
Ok, I found the checksum function.
It is FNV132
It use checksum for DATA.
SIZE_DATA(4 byte) | CHECKSUM(4 byte) | DATA (SIZE_DATA byte)
Code: Select all
$Path = "data.dat" $File = FileOpen($Path,16) $Size = FileGetSize($Path) $a3 = $Size $Result = -2128831035 if $Size > 0 Then $v3 = $Result $v4 = 0 While $v4 <> $a3 $v5 = 16777619 * $v3 $v6 = Dec(StringMid(FileRead($File,1), 3)) $v3 = BitXOR($v5,$v6) $Result = $v3 $v4 += 1 WEnd EndIf MsgBox(0,"",$Result)
Last edited by
Zmkiy on Mon Nov 30, 2020 5:45 pm, edited 1 time in total.
Zmkiy
Posts: 27 Joined: Mon Mar 09, 2020 3:14 pm
Post
by Zmkiy » Mon Nov 30, 2020 5:47 pm
otaviotr43 wrote: How to use?
Maybe swuforce will update their script.
hnnewgames
Posts: 148 Joined: Sat Dec 16, 2017 8:58 pm
Post
by hnnewgames » Mon Nov 30, 2020 6:20 pm
Zmkiy wrote: otaviotr43 wrote: How to use?
Maybe swuforce will update their script.
Let's wait for Swuforce to respond
swuforce
Posts: 233 Joined: Thu Oct 16, 2014 4:39 pm
Post
by swuforce » Mon Nov 30, 2020 7:37 pm
Try now. Thank Zmkiy.
Zmkiy
Posts: 27 Joined: Mon Mar 09, 2020 3:14 pm
Post
by Zmkiy » Tue Dec 01, 2020 7:20 am
swuforce wrote: Try now. Thank Zmkiy.
It seem like missing "padding".
STRS (4 byte) | SIZE_DATA (4 byte) | CHECKSUM (4 byte) | DATA (SIZE_DATA byte) | NULL ((4 - SIZE_DATA % 4) % 4 byte) | SYMB (4 byte)
swuforce
Posts: 233 Joined: Thu Oct 16, 2014 4:39 pm
Post
by swuforce » Tue Dec 01, 2020 5:44 pm
Thanks, maybe now fixed.
hnnewgames
Posts: 148 Joined: Sat Dec 16, 2017 8:58 pm
Post
by hnnewgames » Tue Dec 01, 2020 9:51 pm
Working great!
Thank you Swuforce and Zmkiy! Now I will be able to translate into Portuguese.