Page 1 of 2

Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Thu Oct 25, 2012 1:46 pm
by Ekey

Code: Select all

# Euro Truck Simulator 2 / Scania Truck Driving Simulator (SCS format)
# 
# Written by Ekey (h4x0r)
# http://www.progamercity.net
# 
# script for QuickBMS http://quickbms.aluigi.org
#
# For decrypt files with header 3nK use SCSSIITool

idstring "SCS#"
get VERSION long
idstring "CITY"
get FILES long

goto 0x1000

for i = 0 < FILES
    get HASH1 long
    get HASH2 long
    get OFFSET long
    get NULLS long
    get FLAG long
    get CRC long
    get SIZE long
    get ZSIZE long
    string NAME p= "%08X%08X" HASH1 HASH2
	
    if SIZE == ZSIZE
      log NAME OFFSET SIZE
    else
      clog NAME OFFSET ZSIZE SIZE
    endif
next i
Edited: Attached tool for decrypt files with header 3nK. They contained in base_cfg.scs , def.scs and locale.scs.

Code: Select all

[Usage]
        SCSSIITool <InFILE> <OutFILE>

[Example]
        SCSSIITool 18C69F3DD9D3D2A2 18C69F3DD9D3D2A2.txt

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Thu Oct 25, 2012 9:42 pm
by Haoose
Extractor
Распаковщик давно есть )

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sat Oct 27, 2012 1:36 am
by Ekey
Haoose wrote:Extractor
Распаковщик давно есть )
This tool for unpack default ZIP.
You may use the provided extractor to unpack the game archive to develop game mods. To repack the archive again use any standard ZIP utility after you've finished your mod.
Haoose wrote:Распаковщик давно есть )
But there is no utility to decrypt :)

PS: I would appreciate if someone would find a function to generate the hash.

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sat Oct 27, 2012 7:36 am
by Haoose
Ekey wrote:This tool for unpack default ZIP.
No. This tool for unpack SCS-files from game =)

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Oct 28, 2012 10:47 pm
by Ekey
This extractor not work on Euro Truck Simulator 2. Anyway i found function for generate hash. They is very looooooooooooooong. Tool coded on MASM32 :D.
In Euro Truck Simulator 2 and in Scania Truck Driving Simulator hash algo same. So how found filenames. For Example :

Unpack def.scs. After unpack open any file and search filename path's like this:

Code: Select all

	model_desc: "/model/sign/navigation/3hw_exit_far_d.pmd"
	model_coll: "/model/sign/navigation/3hw_exit_far_d.pmc"
Correct path (remove slash / from begin)

Code: Select all

	model/sign/navigation/3hw_exit_far_d.pmd
	model/sign/navigation/3hw_exit_far_d.pmc
Example Screen

Collect filenames and share here :)

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Mon Oct 29, 2012 7:41 am
by Haoose
Ekey wrote:This extractor not work on Euro Truck Simulator 2.
This extractor work on Euro Truck Simulator 2. :D
Image Image Image

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Mon Oct 29, 2012 1:38 pm
by Ekey
For example.

Code: Select all

[hashfs] locale.scs: Mounted ok, 90 entries
*** ERROR *** : Root directory not found, can not extract this archive!

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Dec 09, 2012 6:06 pm
by Ekey
Download here

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Mar 10, 2013 11:42 am
by aluigi
just for reference, I have made a script supporting both SCS# and ZIP archives of the games developed by SCS Software:
http://aluigi.org/papers/bms/scsgames.bms

Why supporting also the ZIP archives?
Well, because some people modify their mods to look like being password protected and with the shrink compression so this script allows to extract also these "modified" mods.

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Wed Mar 13, 2013 10:51 pm
by Sartr0n
Any chance for script or tool for repacking the damn language .sii files?

I've spent my whole life trying to figure a way to repack one file, but that's too complicated for me, as I have never programmed before and everything was with little help from one my friend that have experience (little) with programming, but not programming like this and he doesn't know how he can do things like modifying game files, because the format of the files and because he doesn't have the game.

I appreciate any given help!

Thanks much. [roll]

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Mar 17, 2013 4:32 pm
by aluigi
the script is valid for repacking so you can do it directly in quickbms.
for more info take a look at section 3 of quickbms.txt
http://aluigi.org/papers/quickbms.txt

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Mar 17, 2013 7:01 pm
by Ekey
aluigi wrote:the script is valid for repacking so you can do it directly in quickbms.
for more info take a look at section 3 of quickbms.txt
http://aluigi.org/papers/quickbms.txt
He was referring - encrypt language files back in SII format :)

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Mar 17, 2013 7:37 pm
by aluigi
ops :)

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Mar 17, 2013 8:16 pm
by Ekey
Well i try reimport unpacked files for test encrypted languages but get error.

Code: Select all

QuickBMS generic files extractor and reimporter 0.5.17b
by Luigi Auriemma
e-mail: aluigi@autistici.org
web:    aluigi.org

- REIMPORT mode enabled!
- open input file d:\Euro Truck Simulator 2\locale.scs
- open script Euro Truck Simulator 2.bms
- set output folder d:\Euro Truck Simulator 2\locale

  offset   filesize   filename
------------------------------

Error: CMD_Encryption_func with negative lastcmd

Note that if both the scripts and your files are correct then it's possible
that the script needs a newer version of QuickBMS, in which case download it:

  http://aluigi.org/quickbms
Image

Re: Euro Truck Simulator 2 (*.SCS, *.SII 3nK))

Posted: Sun Mar 17, 2013 8:38 pm
by Sartr0n
^ I was talking about the same.

Errors everywhere.

SCS Software :wmg:

Sometimes I think why SCS Software has done the files that way, but the answer is floating somewhere in their programmers' heads, and I can't understand what is it.