• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

HELP Translating "Return of the Legend"

Thanks very much. That's very interesting indeed! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

I don't know about the DAT files, but I do know that our attempts to crack the DLL files in the MODULES folder of PotC have failed miserably. We can't seem to extract the original code from them. Luckily in PotC the dialogs are in the PROGRAM folder and freely accessible.
 
<!--quoteo(post=256865:date=May 13 2008, 09:16 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 13 2008, 09:16 PM) <a href="index.php?act=findpost&pid=256865"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Thanks very much. That's very interesting indeed! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

I don't know about the DAT files, but I do know that our attempts to crack the DLL files in the MODULES folder of PotC have failed miserably. We can't seem to extract the original code from them. Luckily in PotC the dialogs are in the PROGRAM folder and freely accessible.<!--QuoteEnd--></div><!--QuoteEEnd-->


I heard about the lack or progress on the .dll front, however like i said earlier it doesnt seem to be a good place for the dialogs to reside. Apart fromt that theyre not sufficient in size, it would be bad programming practice to hardcode something that may need frequent changing by the developers. Do they really want to recompile the .dll or .dll's if they made a spelling mistake somewhere? Besides something such as a collection of dialogs should have a database structure to it to be able to easily extract it through code. I'm not much on programming, but are dll's really such a good place for storing database structures?
 
I'm pretty sure the dialogs are in the DLL's in AoP. Though there is an update for AoP that re-enables the ordinary PROGRAM folder.
 
indeed i might be very wrong.... ill see what i can achive by playing around with the dll's. now that i think about it dialogs were in .c files and that usually gets compiled. just a thought though.... any chance that .c dialog files, if placed in the correct directory with correct names would override the ones in the .dll's/.dat's?
 
Not likely. I know the Russian SLiB mod for PotC also has the code in DLL files and they're used even when the original PROGRAM folder is still present.
Don't spend too much time trying to decompile DLL files. There's been lots of people who tried it, some with a lot of computer experience. Nobody succeeded. <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
dam russians and their programming skills :p why was i born without them...? however i still remain of the opinion that if someone can make a multiplayer modification for grand theft auto, then extracting and modifying a few lines of text is a possibility, all credit due to ones who tried but i say we dont lay down the arms and let akella and seaward pwn us as they want. this is the world owned by reverse engineers simpy because if something can be done it can also be undone.
 
dam russians and their programming skills :p why was i born without them...? however i still remain of the opinion that if someone can make a multiplayer modification for grand theft auto, then extracting and modifying a few lines of text is a possibility, all credit due to ones who tried but i say we dont lay down the arms and let akella and seaward pwn us as they want. this is the world owned by reverse engineers simpy because if something can be done it can also be undone.
 
HAHAHAHAHAHAAHAH i dont know what the F*CK i just did, but i turned all options on in the ini and look at this <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><img src="style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" />D:D:

A bunch of stuff with dialogs in it appeared in the main folder suddenly <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />:<img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><img src="style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" />D:D

files are with an extension ".b" and point to .c files in the header <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><img src="style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" />D:D: gonna see where this takes me <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><img src="style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" />D:

edit:

Righty the files seem to appear if i change their names as soon as they initialize and i got an idea of the internal directory structure. Wonder if the dialogs can be overridden from there. Also i wonder if whatever process "unpacks" these .b files can be backtraced and repeated from outside the engine?
 
Interesting. Did you get a PROGRAM folder? What happens if you remove the seadogs.c from the PROGRAM folder? If the game still runs after that, it's not using the files in the PROGRAM folder. In that case the question would be if it's possible to put the files from that PROGRAM folder back into a DLL/DAT file that the game can use instead of the original. I'd recommend waiting for the English version though; perhaps that DOES have an open PROGRAM folder. Edward Zaitsev did mention that it'd be a good idea to continue out modding on CoAS and we can only do that if the code is accessible, so there's a chance the code indeed <i>will</i> be accessible.
 
<!--quoteo(post=256938:date=May 14 2008, 04:20 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 14 2008, 04:20 PM) <a href="index.php?act=findpost&pid=256938"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Interesting. Did you get a PROGRAM folder? What happens if you remove the seadogs.c from the PROGRAM folder? If the game still runs after that, it's not using the files in the PROGRAM folder. In that case the question would be if it's possible to put the files from that PROGRAM folder back into a DLL/DAT file that the game can use instead of the original. I'd recommend waiting for the English version though; perhaps that DOES have an open PROGRAM folder. Edward Zaitsev did mention that it'd be a good idea to continue out modding on CoAS and we can only do that if the code is accessible, so there's a chance the code indeed <i>will</i> be accessible.<!--QuoteEnd--></div><!--QuoteEEnd-->


Well thats the thing, its taking them half a year now to deliver, i don't think its quite fair, by the time the game hits the shelves it will be so outdated i probably won't even touch it with a one meter pole. I mean sure we can wait for the modding part of it, but im sure everyone wants to play the damned thing. am i right or am i right. it would take no more than 3 months to translate the game if i was doing it pro-bono on my free time. but if i was getting paid for it, like akella is, itd be done within a month. i think my fellow countrymen just want to keep the upper hand when it comes to modding the game and while youll be busy still playing, theyll be well on the way witht heir next mod. the game isnt released in english to prevent everyone from attempting to reverse-engineer it while theyre building their next creation. then when theyre almost done, youll get the game and when theres a new version of the storm engine, thats when youll get your modding tools.

Anyway the .b files seem to be written in some low-level code and if im not mistaking resemble by sructure the .c dialog files previously available. I managed to disassemble the .b files and i got a neat code which i unfortunatly didnt understand... and now i also forgot what i used to disassemble it.... but if someone thinks they can understand any of it ill gladly send it all over. basically the game will output any .c file in .b format when its initialized that includes seadogs.c, game_menu.c, main_menu.c just about any .c file in the game is outputted in disassemblable code. i was hoping that could be good news.....
 
honestly though, i was all bored and out of ideas so i decided to mess around with the contents of the resource0.dat and resource1.dat files in hex. it seems to generate .c file errors every time:

COMPILE ERROR - file: seadogs.c; line: 3
Missing '}' in segment

COMPILE ERROR - file: quests\quests_check.c; line: 359
Duplicate variable name: quest


i also disassembled dialog.dll using IDA and seriously have not found a single trace of the actual dialog texts. I would eexpect something like repeating variables or some kind of pattern due to those case switches in the .c files, but nothing so far. ill keep poking at the resource files untill i mess something up in the dialog or get an error within one of the dialog .c files. I honestly think im not too crazy to assume that the .c files are hiding compressed in the resource folder, because as errors indicate theyre compiled upon run. had they been in the .dll they would have already been compiled.

EDIT:
And i have successfully made the file seadogs.c disappear:

COMPILE ERROR - file: no debug information; line: 1
file not found: seadogs.c

also generated a few more errors:

COMPILE ERROR - file: scripts\utils.c; line: 4
can't load file: scripts\Rumour_Init.c

and something about colonies.c which ikinda deleted by accident....

Don't know about dialogs yet, but if you were looking for moddable resources, well look no further then cracjing open the respurce0.dat and resource1.dat <img src="style_emoticons/<#EMO_DIR#>/readon.gif" style="vertical-align:middle" emoid=":mm" border="0" alt="readon.gif" />
 
alright, just confirmed it with sources in verious languages. akella are known to stuff resources in SFFS (star force file system) containers. people had that problem with NWN2 and other titles. so this is good news, this is not unique in any way. now just to crack the dam things open. apparently its very possible, this may be a little outdated, but still useful. though we never know if it is outdated... akella used maya 3.5 to make the game i doubt they would dish out for the latest starforce version. so here:

<a href="http://forum.xentax.com/viewtopic.php?f=21&t=2084&sid=b81aec5d4dc397eaa5e03001b9f762ff" target="_blank">http://forum.xentax.com/viewtopic.php?f=21...5e03001b9f762ff</a>

i found some more stuff regarding the topic, including sourcecode by RELOADED to defeat the same type of compression, just have to check it out. apparently the structure of the archived .dat files is known and what we neeed is the decryption key. the decryption key we have a chance of getting IF we have file and directory names within the files. if you have been reading my previous posts, those filenames we have in abundance.

ive been hearing alot aobut experienced programmers on this forum, id looooooove to have a chat with some of them cause now this is where i fail, i operate on logic but have little programming experience.
 
<!--quoteo(post=256983:date=May 14 2008, 09:26 PM:name=SpankmasterFlex)--><div class='quotetop'>QUOTE (SpankmasterFlex @ May 14 2008, 09:26 PM) <a href="index.php?act=findpost&pid=256983"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->am i right or am i right.<!--QuoteEnd--></div><!--QuoteEEnd-->

<img src="style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" />

<!--quoteo(post=256999:date=May 15 2008, 01:11 AM:name=SpankmasterFlex)--><div class='quotetop'>QUOTE (SpankmasterFlex @ May 15 2008, 01:11 AM) <a href="index.php?act=findpost&pid=256999"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->and something about colonies.c which ikinda deleted by accident....<!--QuoteEnd--></div><!--QuoteEEnd-->

Look for it in yer recycle bin. <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
 
One thing's for sure, I am no professional programmer and this is going <i>waaay</i> over my head. Perhaps you could send a PM to Pirate_KK who probably knows a bit more about these things. Or Maximus, but he's not very active, especially not on the forum.
 
that won't work cylon. deleted lines of code don't end up in the bin.

oh, and don't judge a game by the release date. i've seen a whole lot more crappy new games than old ones.
 
Indeed. Perhaps they're doing some good finetuning work now. From what I understood, the Western CoAS will actually be CoAS with also some additional stuff from the other Russia-only add-ons.
 
<!--quoteo(post=257094:date=May 15 2008, 10:26 PM:name=Morgan Terror)--><div class='quotetop'>QUOTE (Morgan Terror @ May 15 2008, 10:26 PM) <a href="index.php?act=findpost&pid=257094"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->that won't work cylon. deleted lines of code don't end up in the bin.<!--QuoteEnd--></div><!--QuoteEEnd-->

I know.. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> I thought he meant that he delete the file not the code. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
<!--quoteo(post=256891:date=May 14 2008, 12:25 AM:name=SpankmasterFlex)--><div class='quotetop'>QUOTE (SpankmasterFlex @ May 14 2008, 12:25 AM) <a href="index.php?act=findpost&pid=256891"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Righty the files seem to appear if i change their names as soon as they initialize and i got an idea of the internal directory structure. Wonder if the dialogs can be overridden from there. Also i wonder if whatever process "unpacks" these .b files can be backtraced and repeated from outside the engine?<!--QuoteEnd--></div><!--QuoteEEnd-->I checked that files for PotC some time ago. They appear in main directory of the game, ignore directory structure and are in some binary form. They are produced as game starts if codefiles entry in SCRIPT section of engine.ini is set to 1. I suspect that they are some kind of object files (like *.obj in case of VC++ or *.o in GNU g++) and for now I don't see a chance for getting any benefit from them.

Since I restored my PotC installation yesterday I tried to make a primitive dll and put it in modules folder, but only I achieved was warning about inavailability of interface function and information that module was skipped:<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Module [ test.dll ] skipped
interface function not found<!--QuoteEnd--></div><!--QuoteEEnd-->I was 100% sure it won't work right because I produced that file with VS2008 which isn't a good environment for this purpose. However, I'll try to invent something, but in any case obvious observation must be clearly made that success can't be sure. I'd be very happy if I knew how to produce that "interface function" and what version of MSVC++ Akellani (I mean Akella programers) actually used... From the code I think I figured out that there are two ways of loading a DLL:
1) put it in MODULES folder and ensure that it has proper format (with that mysterious interface function)
or
2) dll can be loaded from code with russian-sounding directive:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#libriary "<some_name_here>"<!--c2--></div><!--ec2-->as it seen in PROGRAM\seadogs.c. But still, I don't know how to produce proper DLL for that.

ALexusB should know more because he made this kind of trick to hide PROGRAM folder of his mod. Alas, he probably won't be willing to share his knowledge in this field.

pirate_kk
 
hey you guys!
i been busy these last few days so didnt have much time for either playing and reviewing or reverse engineering. pirate_kk... seems we are on completely different pages :p but we will work on it. perhaps it is because youre on PotC and im pecking on CoaS <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" /> i should have some time available at the end of the week, and meanwhile i'm also working on improving my programming skills so i hope this goes well.... btw, saw some guy posting screenshots, if anyone is interested i could post a few myself on request <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
I'd like some screenshots. I'd like anything that gives us more information on CoAS. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Back
Top