The rules have been updated, read them now: Rules!

Ship Simulator Notes

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
timetraveller
beginner
Posts: 26
Joined: Wed Apr 29, 2009 1:36 am
Been thanked: 10 times

Ship Simulator Notes

Post by timetraveller » Mon Jan 07, 2013 12:52 am

Ship Simulator (by VStep, distributed by Paradox) uses the open source compression method Gzip (or GNU zip) to pack many of its files. In a hex editor, they are easy to recognize by the x789C at displacement x08 in the header of all records compressed this way.

Ship Simulator of course adds its own extra header information (x00 - x07), confusing the matter some. The first 3 bytes of each record is identified by the ASCII characters "ENC". The extra information ahead of the x789C is unnecessary and easily stripped out by software. Then by adding adding 4 trailing bytes to the end of the record, which is a fullword compressed data length count, the resultant file can then be unzipped using the freeware command line utility zlibc.exe (written by the same people who wrote Gzip).

Ship Simulator does not pack masses of files into one compressed ".PAK" file like so many games do, but chooses to compress each file individually, leaving its original file extension intact. You will even find some graphic files (like .dds, .jpg, etc.) compressed in this method in case you wonder why they won't open up normally in an image editor.

NOTE: .CGR files, of which there are many in this game, cannot be extracted. They are exported (let me call that "compiled") Quest3D channel graphics files (many include sounds too) and by nature are not extractable. About 50% of the game files ARE extractable though, of many different file extensions, using the above method.

Once extracted, they are simply a text file (.xml, .ini, etc.), easily modified in any text editor. The technique is to keep the original compressed file in the same folder by just renaming it with a ".bak" extension. Ship Simulator won't see it, but instead will use the plain text modified file in its place. Recompression of your modified file is not necessary. Many modding abilities will now be possible, something sorely lacking in Ship Simulator.

-timetraveller

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 133 times

Re: Ship Simulator Notes

Post by WRS » Mon Jan 07, 2013 6:25 am

you could easily write a script for this - is the uncompressed size part of the header?

Code: Select all

idstring "ENC"

get name basename
get zsize asize
math zsize -= 8

clog basename 8 zsize size
Useful tool links:

timetraveller
beginner
Posts: 26
Joined: Wed Apr 29, 2009 1:36 am
Been thanked: 10 times

Re: Ship Simulator Notes

Post by timetraveller » Mon Jan 07, 2013 9:09 am

Yes, I suppose a script would do it too. The size of the compressed data is 10 bytes less than the size of the file (8 + the x789C). Size is not kept in the ENC header. It must be computed.

Joe295398
ultra-n00b
Posts: 1
Joined: Sat Feb 20, 2021 10:06 pm

Re: Ship Simulator Notes

Post by Joe295398 » Sat Feb 20, 2021 10:08 pm

Hello. I know its been a really long time since this post was made, but I'm still actively trying to mod the game. Is there anyway I could get a laymen's definition of what you're describing?

Post Reply