Author Topic: Weird Question  (Read 3408 times)

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« on: April 18, 2007, 10:06:05 AM »
Okay, you might think this is a lil weird but... i hold the original client of Outpost 2... which is not english. I'd like to port the translation to the new client: is that possible?
« Last Edit: April 18, 2007, 10:06:27 AM by Silver »
I didn't make the sig. I've just found it on Google images.

Offline Mez

  • Hero Member
  • *****
  • Posts: 648
Weird Question
« Reply #1 on: April 18, 2007, 12:08:40 PM »
Yes I believe that it is.

To do it your self I believe you would need some programming skills.

Hacker, Eddy-B or Hooman (Perhaps BrazilianFan as well) have any comments.

Which language is it?  I Know that a few different projects on different languages are underway!

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #2 on: April 18, 2007, 12:14:40 PM »
It was an official SIERRA italian translation.

Edit: toying with both installations' files, i've found out that replacing story.vol and voices.vol with translated versions apparently does not generate bugs.
« Last Edit: April 18, 2007, 01:02:04 PM by Silver »
I didn't make the sig. I've just found it on Google images.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Weird Question
« Reply #3 on: April 18, 2007, 05:37:54 PM »
Yeah, replacing those files should be no problem. It's probably a little more involved to get the in game text translated though. I'm pretty sure Hacker has worked on that sort of thing before. I haven't.

Wouldn't mind having the other language versions of OP2 uploaded somewhere. I'm a bit of a pack rat and I like to collect things. :)

That and it could be helpful for someone working on language translations to have different language versions to compare.

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #4 on: April 19, 2007, 07:09:59 AM »
just a question, is tec information (with tec descriptions) stored in sheets.vol? If that is, the only problem left besides the videos (which i can rip from my CD) is ingame text, that is probably located in the main executable.... i hope.
I didn't make the sig. I've just found it on Google images.

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Weird Question
« Reply #5 on: April 19, 2007, 10:18:36 AM »
You'll need to manually edit the menus inside 'op2res.dll' and 'op2shres.dll' and replace the .bmp files inside 'op2shres.dll' with the translated one inside the italian 'op2shres.dll' file.

Copy the content from Here and save it named 'language.ini' inside your Op2 directory. From there you will have to manually translate every in-game message.

Just one more thing: To edit the resources inside 'op2res.dll' and 'op2shres.dll', use the Resource Hacker. Google it, don't ask for any URLs  :P  

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #6 on: April 19, 2007, 12:48:14 PM »
thanks for the infos you all, i'll soon make my italian OPU client :D

edit: about language.ini, is there a way from me to get this out of my original outpost installation?
« Last Edit: April 19, 2007, 01:11:08 PM by Silver »
I didn't make the sig. I've just found it on Google images.

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Weird Question
« Reply #7 on: April 19, 2007, 02:23:52 PM »
As far as language.ini goes, it wasn't part of any official Sierra distribution. Instead, it was hacked into the game in a recent release.

(The game uses a stringtable for all language-specific text strings. The hack involves reading replacement text from language.ini and overwriting the stringtable at game startup to cause it to point to the new text).

You can get a language.ini for the english version of the game from:
http://wiki.outpostuniverse.net/Language-EN

Just copy and paste the text into a text editor, save as language.ini, and edit as necessary.

As far as translating the techtree text, yes, that is all inside sheets.vol. It should be straightforward (the files are just text) but the only problem is that of checksum mismatches (if the translation is to be used in multiplayer). To fix this, a tool that adds bytes to the end of the file in order to force the checksum to match was created. (This tool wasn't released because, although this doesn't seem like a likely problem, it could be used to create files with the same checksum as the original game files but different contents. This can cause unpredictable problems if two people are in the same game but have different files that were modified in this manner).

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Weird Question
« Reply #8 on: April 19, 2007, 03:45:55 PM »
Hacker, how 'bout a program that automatically extract those stringtables from the italian OP2 and auto-generate a language.ini file?

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #9 on: April 19, 2007, 04:31:33 PM »
Thanks for all the info: i've currently replaced sheets.vol (that is 95 Kb, opposing to the OPU version of 285 Kb), voices.vol, sound.vol, story.vol, and i'm about 25% of translating language.ini.

Brazillian Fan: It actually takes more time to develop such tool rather than manually translate it... Don't worry, i'm perfectly fine, i like having customized translations ;)

op2hacker: How do you suggest i solve this problem? OPU file is actually 190 Kb bigger.
I didn't make the sig. I've just found it on Google images.

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Weird Question
« Reply #10 on: April 19, 2007, 04:38:22 PM »
Quote
Hacker, how 'bout a program that automatically extract those stringtables from the italian OP2 and auto-generate a language.ini file?
I actually wrote a program like that. If I can find it on my other hard drive I'll upload it.

The only problem, is that you have to specify the offset (within the game file) where the stringtable starts (since it happens to be different for each version of the game). You need some additional tools to find the start of this stringtable (a disassembler or debugger) as well as some assembly skills to understand what is going on.

There are also some gaps in the stringtable (I remember when testing with a German EXE there was one entry missing about halfway thru the file and it screwed up the rest of the table output -- had to correct it manually).

So although there is a tool, it was more or less a tool to assist me when I extracted the string table (saved me the trouble of having to type out everything myself). If I find it however I will upload it to the site.

Silver: The OPU file is bigger because the files are not compressed. The original sheets files were compressed using a variant of adaptive Huffman coding which would explain the size difference.

I can't remember if there is a really reliable tool that could decompress the files. Hooman was the one who took the time to figure out how the compression worked (and developed a really rudimentary tool to decompress a single file from the VOL). If I remember correctly there were some problems with it.
In short, we should be able to decompress the files but it might take a little bit of work.
« Last Edit: April 19, 2007, 04:40:06 PM by op2hacker »

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #11 on: April 19, 2007, 05:44:27 PM »
Quote
I actually wrote a program like that. If I can find it on my other hard drive I'll upload it.

The only problem, is that you have to specify the offset (within the game file) where the stringtable starts (since it happens to be different for each version of the game). You need some additional tools to find the start of this stringtable (a disassembler or debugger) as well as some assembly skills to understand what is going on.

There are also some gaps in the stringtable (I remember when testing with a German EXE there was one entry missing about halfway thru the file and it screwed up the rest of the table output -- had to correct it manually).

So although there is a tool, it was more or less a tool to assist me when I extracted the string table (saved me the trouble of having to type out everything myself). If I find it however I will upload it to the site.

I don't think i can handle your tool... i don't know much about assembly. Thanks anyway.

Quote
Silver: The OPU file is bigger because the files are not compressed. The original sheets files were compressed using a variant of adaptive Huffman coding which would explain the size difference.

I can't remember if there is a really reliable tool that could decompress the files. Hooman was the one who took the time to figure out how the compression worked (and developed a really rudimentary tool to decompress a single file from the VOL). If I remember correctly there were some problems with it.
In short, we should be able to decompress the files but it might take a little bit of work.

That surely is bad news. How did you decompress the files in the beginning anyway? (i've noticed you decompressed just the sheets.vol). Will I get mismatching issues for the other .vol files?
I didn't make the sig. I've just found it on Google images.

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Weird Question
« Reply #12 on: April 19, 2007, 06:36:26 PM »
Well, unfortunately, I don't understand very well the OP2 inner workings so I'm not the best person to answer your question, but I do have experience in programming in general and OP2 translation (I'm translating OP2 into portuguese, very slowly).

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Weird Question
« Reply #13 on: April 20, 2007, 02:55:40 AM »
Doesn't the latest version of the map editor have the ability to decompress VOL files? Or can it only extract from the uncompressed ones? If you need to decompress sheets.vol, and the map editor doesn't work, then I can help with that. It'd probably be easiest if you sent me the file. I could send you the code/program, but I probably hardcoded filenames to save time. (Yeah, I know, bad habit). It's probably easiest to send stuff if you catch me on IRC sometime.

Oh, and the other VOL files don't use compression internally. Also, the client checksums certain files when you try to play multiplayer, and won't let you connect if the checksums are different. It's likely only an issue with the files in sheets.vol. Once you get them to where you want and everything seems to work in singleplayer, send the files to us and we'll make them work in multiplayer.


 

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #14 on: April 20, 2007, 06:16:05 AM »
Quote
Doesn't the latest version of the map editor have the ability to decompress VOL files? Or can it only extract from the uncompressed ones?

mapper2_2_1.exe crashes when trying to extract compressed files. VOLextractor successfully manage to extract data files, but in compressed form.

Quote
If you need to decompress sheets.vol, and the map editor doesn't work, then I can help with that. It'd probably be easiest if you sent me the file. I could send you the code/program, but I probably hardcoded filenames to save time. (Yeah, I know, bad habit). It's probably easiest to send stuff if you catch me on IRC sometime.

Oh, and the other VOL files don't use compression internally. Also, the client checksums certain files when you try to play multiplayer, and won't let you connect if the checksums are different. It's likely only an issue with the files in sheets.vol. Once you get them to where you want and everything seems to work in singleplayer, send the files to us and we'll make them work in multiplayer.

I see. I'll get the translation ready for single player first then. Thanks for your help ^_^
 
I didn't make the sig. I've just found it on Google images.

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #15 on: April 23, 2007, 11:02:24 AM »
bumpy~

I've finished translating both language.ini (though there are a lot of debug/error messages still untranslated) and both the resource DLLs. It seems it's working fine in Single Player.

Actually the translation includes the following files:

- language.ini
- op2shres.dll
- out2res.dll
- sheets.vol
- sound.vol
- voices.vol
- story.vol
- p??.dll
- e??.dll
- t??.dll
- ademo?.dll
- CES1.dll
- CEP1.dll
- CPS1.dll
- CPP1.dll

Missing stuff:

- Videos (just a few of em)
- Plymouth colony builder, spaceship 2
- Plymouth Cold War
- Pre and post-release demos


Actually i've no idea on how to get the videos, so if you can help me i'll even allow you to use my gene bank ^_^

edit: It seems i can't extract the files from the mission DLLs. Any suggestions?
« Last Edit: April 23, 2007, 12:44:44 PM by Silver »
I didn't make the sig. I've just found it on Google images.

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Weird Question
« Reply #16 on: April 23, 2007, 02:09:07 PM »
The mission DLLs are compiled executable files. The text can be modified but not easily (a bit of programming knowledge is required).

For the missions that we have the source code for (in the case of Plymouth Cold War and many of the multiplayer missions) they can just be recompiled with the new text strings.

It might be too time consuming however to replace the text in the multiplayer missions. (Checksum busting data would have to be added to the end of the files there as mentioned for the techtrees). The only problem with that is, if the file is modified in any way by automated tools or whatnot (for example, changing the resources stored inside the file), the checksum will be changed, and the data at the end could be wiped out.

As far as the mapper goes, extracting multiple files at a time is buggy. If you need to extract files, do it one at a time or use the VOLextractor (best method).

Neither tool can decompress the data, only extract it in a compressed form. As Hooman said, we can decompress the data (though it is very rough... the filenames are hardcoded, and garbage is output at the end of the file (not our fault, it's a side-effect of the compression algorithm. Since the game doesn't store the original uncompressed size of the file, it is hard to automatically remove the garbage. When the game decompresses a file, the code that reads the techtree / spreadsheet data will just stop when it encounters the garbage data (treating it as invalid / erroneous data)).

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Weird Question
« Reply #17 on: April 23, 2007, 05:47:04 PM »
Quote
bumpy~

Actually the translation includes the following files:

- language.ini
- op2shres.dll
- out2res.dll
- sheets.vol
- sound.vol
- voices.vol
- story.vol
- p??.dll
- e??.dll
- t??.dll
- ademo?.dll
- CES1.dll
- CEP1.dll
- CPS1.dll
- CPP1.dll

Missing stuff:

- Videos (just a few of em)
- Plymouth colony builder, spaceship 2
- Plymouth Cold War
- Pre and post-release demos


Actually i've no idea on how to get the videos, so if you can help me i'll even allow you to use my gene bank ^_^

edit: It seems i can't extract the files from the mission DLLs. Any suggestions?
Sorry for not telling you about the missions DLLs, I forgot  :P

There are 18 in-game scenes, all of them in AVI file type using Intel Lingo codec.
You can download them here

About the DLLs, what resource editor are you using?

Anyway, if you need any help, just ask  :D


EDIT (leeor_net): fixing broken links
« Last Edit: August 22, 2017, 03:42:59 PM by leeor_net »

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Weird Question
« Reply #18 on: April 23, 2007, 06:48:30 PM »
Err, what kind of text is in mission DLLs that needs to be translated? Mission objectives? I can't remember if that's text in the DLLs or is generated from the triggers. All the other text I can think of wouldn't need to be translated since it is never displayed in game. (and would probably be a bad idea to change).

 

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Weird Question
« Reply #19 on: April 23, 2007, 07:02:13 PM »
Yeah, it would just be mission objectives, and some of the messages that appear in the status bar (with AddMessage).

I wonder if the effort required to do that is really worth translating (you could probably just copy the single player DLLs from the original version however).

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Weird Question
« Reply #20 on: April 23, 2007, 07:08:42 PM »
Heh, yeah. You can probably take most stuff from the original actually. The only thing you'd really need updated is the exe, and then just checksum match all the stuff needed for multiplayer. I'm not aware of any incompatabilities introduced on our end other than in the exe.
 

Offline Silver

  • Newbie
  • *
  • Posts: 24
Weird Question
« Reply #21 on: April 24, 2007, 02:36:26 AM »
Quote
Yeah, it would just be mission objectives, and some of the messages that appear in the status bar (with AddMessage).

I wonder if the effort required to do that is really worth translating (you could probably just copy the single player DLLs from the original version however).
yeah, i'll probably leave them as they are. Didn't really think missions worked just like regular DLLs, and it would have been nice having those few missing texts translated.

I'm also leaving multiplayer maps as they are BTW, because of checksum issues.

Brazilian Fan: I simply copied the italian mission files from the original version.
I didn't make the sig. I've just found it on Google images.