[REQ] Help for Translate Deadlock GOG to Portuguese Brazil

See what Deadlock fans are creating, whether it be fan games, art or scenarios.
Post Reply
Druid8232
Hatchling
Hatchling
Posts: 2
Joined: Sat Oct 01, 2016 1:05 am
Favourite Race: Maug

[REQ] Help for Translate Deadlock GOG to Portuguese Brazil

Post by Druid8232 » Sat Oct 01, 2016 1:30 am

Hello, i have a old "Portuguese Brazillian" Disc Version of Deadlock Planetary Conquest. But i want adapt and use this Localization into GOG Version!

I already adapted/translated all Texts in Game using a Dialog Editor, but for my surprisse, some Texts "in-game" don't use or build using a Dialog/String.

Some these Text's is present on Deadlock.EXE but only can be Edited with a Hex Editor. The problem is, using a Hex Software. You can't translate this game with Quality, because you can't break a word's Lenght or the Deadlock.EXE corrupt and be invalided!

Here a Original Text from GOG Deadlock.exe
http://pastebin.com/raw/f3j0n3Z8

Here a Localization Brazilian Portuguese i want use/adapt
http://pastebin.com/raw/yVBJnzEv

Someone with a experience can help me to solve this problem ? If necessary i can provide the .EXE whose the entire adaptation for Portuguese has already been made.

Seeking some info about why the .EXE file is invalid after direct Hex edition, I found some details.
http://www.heaventools.com/PE_Explorer_file_repair.htm

As I understand it, when you make an direct Hex edit, and adds bigger words, the block size is broken, and this corrupt the executable.

If someone with more knowledge, know how to solve this, and can explain it in details, I'm grateful.

Thank you and have a nice day.

Some Screen's of GOG adapted to PT-BR

Image
Image
Image
Image

Red Square = Dont have a Dialog/String, only can be acessed via Hex

User avatar
Tggtt
Mighty Colony Leader
Mighty Colony Leader
Posts: 210
Joined: Sun Oct 06, 2013 8:08 pm

Re: [REQ] Help for Translate Deadlock GOG to Portuguese Braz

Post by Tggtt » Sun Oct 02, 2016 12:42 am

Hello Druid8232 and welcome.

Initially, GOG planned to release Deadlock Planetary Conquest in Portuguese Brazillian as well.

However, they have apparently quit from doing it. The major issue is that GOG version provides a modified updated (1.31) version, which was never released in Portuguese Brazillian.

The EXE they provide has been modified to remove features that crash on newer Windows. This could make editing harder, because that EXE could have a few modifications that might not be recommended (that is, it is almost like it's corrupt in a working way).

And secondly, newer Windows would probably have encoding issues for some strings.


Answers that could help:
  1. It is possible to change the length of a strings since they are 00 terminated, but doing so might invade another data.
  2. If you need to change the starting position of a string, you need to locate for address references and update them.
  3. There are a few padding areas around the data segment that could be used.
Another possible approach:
Increase the last segment and append area for the new strings. Replace every offset.

My other recommended approach:
If it were possible, a better approach would be to patch the code inserting new code into a code cave.
Inside that cave there would be (binary) code for opening a file that would have a mapping table from old offsets with the new strings. The problem is that there is no function that loads the strings that we could inject this.

Regardless, best of luck on your efforts, we have some knowledge on disassembling the code that we could add more hints if you need.

TL;DL version: While DL1 is often praised in this community, it is sad that they did not externalize the strings.
Best 20x20 Map is elected.
Follow @OpenDeadlock.
Please help Deadlock Wikis by documenting buildings.
Note: OpenDeadlock Knowledge Gathering has been updated. Translation and Build Tools might fail. Send me a PM if you need help.

Druid8232
Hatchling
Hatchling
Posts: 2
Joined: Sat Oct 01, 2016 1:05 am
Favourite Race: Maug

Re: [REQ] Help for Translate Deadlock GOG to Portuguese Braz

Post by Druid8232 » Mon Oct 03, 2016 7:33 am

Interesting, GOG Company come to Brazil months ago, on August GOG launched Brazillian version of his Platform.

https://www.gog.com/news/bgogcom_chega_ao_brazil_b

Every day i trying new method for finish this adaptation. ATM i reading some articles about RomHacking 'Pointers/Offset/Block/Tables and many others'.

As you said, when using a larger text, it consequently invade another section in this case is necessary to find the pointer/offset/block and relocate the text. It is one of the solutions

But so far my attempts to find the correct address failed.

Fortunately I am willing to continue trying, an hour something should work ;) .

Wish me luck :D

User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 177
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: [REQ] Help for Translate Deadlock GOG to Portuguese Braz

Post by Ubergeneral Grunt » Thu Oct 06, 2016 3:32 pm

I remember trying to modify the GOG version a few years ago or so and found that any changes caused crashes, but I found that Tggtt's multiplayer patch (viewtopic.php?f=4&t=351) worked fine under Windows 7 and attempted modifications didn't crash the game, maybe have a go with his patch?

I don't think I modified any offsets though, as I was attempting to have the game use the higher quality sound assets from the Mac version (22 KHz vs. 11 KHz). I never got round the posting about my findings though, but on that subject - I did get the race themes working at 22 KHz 8-Bit Mono and the in game sounds working at 22 KHz 16-bit Mono (as Deadlock.exe overruled the WAVE sample rate for sounds, but not the number of channels).

I may have had to use compatibility for sound but from memory with that everything worked fine. It has been awhile so I may be misremembering certain things though.
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...

Post Reply