[TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE December 24, 2023)

Forum rules
SCS as a company do not wish to have paid mods on this forum. While we understand that not all paid mods use the Intellectual Property of other companies/people, it is very hard to moderate what is and isn't acceptable when money is involved. There are also concerns that it could look unfavorable to potential work partners going forward if SCS allow mods that may potentially use unlicensed branding.
Posting in the Mods forum (ATS and ETS2) is restricted to sharing free-to-the-public mods and providing support for mods. For more details, please check the Forum Rules.
Post Reply
User avatar
Cadde
Posts: 6800
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Nov 16, 2019)

#51 Post by Cadde » 26 Nov 2019 20:37

veso266 wrote: 23 Nov 2019 01:21 does anyone still have .scs file format on hand
also, is it possible to repack a DLC file with this tool (would like to change the game version inside DLC so older file would work on newer version)
Do you mean this format: viewtopic.php?f=41&t=220553&start=110 ?

And repacking DLC files won't work. The game won't accept them as they don't have the correct checksums, unless you meant make a mod archive out of DLC content which would work. But then i would suggest you only mod the things you want to keep as old content.
You can compare folders contents with each other using applications like KDiff3 (freeware) and then you can see which files have changed and track down their relationships so you can restore what has been changed.
Much better than outright trying to downgrade a whole DLC to an older version.
On extended hiatus.
User avatar
A_Fox
Posts: 2
Joined: 07 Dec 2019 13:36

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Nov 30, 2019)

#52 Post by A_Fox » 07 Dec 2019 13:41

How to unzip locked files like MTG mods? For example: https://atsmods.lt/peterbilt-281-351-beta-1-32/

I try to use command .\sxc.exe mack.scs -o "D:\0", but it not working - nothing is unpacked:
[ external image ]

Not locked files are unpacked. I read the manual, but did not understand anything except that command. In addition, I do not know much English.
madman271
Posts: 36
Joined: 18 May 2019 11:25

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 10, 2019)

#53 Post by madman271 » 10 Dec 2019 16:23

@A_Fox Working with missing items/no base root has been explained in the readme. From your mod link (Peterbilt truck mod), here's how to pull those missing items. I'm using ATS_Peterbilt_281-351_mTG_2.0_Part2.scs (as this mod packed using SCS HashFS format) as a short example.
  1. First, we build a brand new index file for that .scs file. If you have associated .idx file already exists in SXC folder, delete it first.

    Code: Select all

    sxc ATS_Peterbilt_281-351_mTG_2.0_Part2.scs -lq -af
    The -lq switch used to suppress list output as for now we don't care with the list of it's content. The -af switch used to detect file type of missing items.
  2. Next, we need to collect filenames from the content of particular missing items. In this example, I collect them only from missing items of type unit (.sii) by performing this command:

    Code: Select all

    sxc ATS_Peterbilt_281-351_mTG_2.0_Part2.scs -x -f *.sii -oc C:\sxc_temp
    Now all *.sii type files has been extracted to C:\sxc_temp folder. By opening all these files using text editor, I'm able to collect the following filenames:

    Code: Select all

    manifest.sii
    mod_description.txt
    pet_281.jpg
    model/flare/cab_lbl.pmd
    model/flare/cab_rev.pmd
    model/flare/cab_rbl.pmd
    model/flare/cab_lo.pmd
    model/flare/bli.pmd
    model/flare/regsign.pmd
    model/flare/cab_hi.pmd
    model/flare/vehicle_parko.pmd
    model/flare/dal.pmd
    model/flare/cab_red.pmd
    model/flare/cab_bra.pmd
    model/flare/cab_gab.pmd
  3. Next, I put those list of filenames into a blank new text file and save it as C:\sxc_temp\missing_items.txt file, and then try to solve the missing items by performing the following command:

    Code: Select all

    sxc ATS_Peterbilt_281-351_mTG_2.0_Part2.scs -bl C:\sxc_temp\missing_items.txt
    Any filename that match and found as a missing item will be added and resolved. As you can see, the number of missing items decreased. You need to do this with other types of missing items, best start it with a text type like *.sii, *.mat, *.font, etc.
  4. Dont forget to delete C:\sxc_temp folder when no longer needed. :)
Still, finding and resolving whole missing items need lots of effort. In the next version I'll try to allow collect them automatically with a switch.
Good luck.


EDIT:
About mack.scs that show nothing, PM me with the file and I'll take a look for further examination.
Kobalt
Posts: 4
Joined: 23 Jul 2019 23:51

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 10, 2019)

#54 Post by Kobalt » 10 Dec 2019 22:14

When i want to create the database i've got this error

Code: Select all

C:\ETS2\SCX>sxc -b C:\ets2\scx\dblist.txt
SXC Extractor (x86), version 1.19.12.10
Created (c) 2019, by Madman
See 'readme.html' and 'license.txt' for details.

Error: Invalid file -> Invalid ASCII file or size too large for C:\ets2\scx\dblist.txt
dblist.txt

Code: Select all

D:\SCX\C-Program-Files-(x86)_Steam_steamapps_common_Euro-Truck-Simulator-2_base.idx 
D:\SCX\C-Program-Files-(x86)_Steam_steamapps_common_Euro-Truck-Simulator-2_core.idx 
D:\SCX\C-Program-Files-(x86)_Steam_steamapps_common_Euro-Truck-Simulator-2_def.idx 
D:\SCX\C-Program-Files-(x86)_Steam_steamapps_common_Euro-Truck-Simulator-2_effect.idx 
D:\SCX\C-Program-Files-(x86)_Steam_steamapps_common_Euro-Truck-Simulator-2_locale.idx 
madman271
Posts: 36
Joined: 18 May 2019 11:25

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 10, 2019)

#55 Post by madman271 » 11 Dec 2019 02:25

@Kobalt Make sure to save the dblist.txt as ASCII or ANSI encoding. Unicode or UTF8/UTF16 won't work. Simply open that dblist.txt file again with Windows Notepad, choose File -> Save As, and next to "Encoding" dropdown list, choose ANSI. If still doesn't work, PM me along with the attached dblist.txt file.
User avatar
A_Fox
Posts: 2
Joined: 07 Dec 2019 13:36

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 10, 2019)

#56 Post by A_Fox » 15 Dec 2019 15:45

@madman271 Thank you very much, I got it :-)
pedrog4201
Posts: 4
Joined: 20 Oct 2019 19:22

Help SXC Extractor - Flexible Game Data/Mod File Extraction Tool

#57 Post by pedrog4201 » 26 Jan 2020 23:58

tes.png
Hello everyone
I was using the SXC Extractor to extract the def folder from a mod and the following error appeared: Invalid file.
The amazing thing is that this is the only file I can't get with SXC. With the d.a.r.t. neither configuration works too.
I never had so much headache with a mod. Can someone help me ?
User avatar
m1keY
Posts: 3436
Joined: 18 Oct 2015 22:49
Contact:

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 30, 2019)

#58 Post by m1keY » 21 Feb 2020 16:51

I've tried various mods, a few RTA ... everyone was successfully extracted using the explained methods ...
one only need to take it slow, and do it step by step ... always some small thing that is forgotten... :P
eshvos
Posts: 83
Joined: 09 Sep 2019 12:40

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 30, 2019)

#59 Post by eshvos » 28 Mar 2020 18:00

Thank you very much for this amazing tool!

Until recently, I've used the version from 2019-10-04 and I wasn't able to extract every file completely. I've now switched to the latest version (2019-12-30) and I am able to replace D.A.R.T completely with this release! I was able to re-use the list of missing files/folders from D.A.R.T.
The tool is very convenient to use and I've managed to fully automate the extraction of mods/game files:

Code: Select all

:: Build ETS index first
:: Place Map *.scs files in Map_ETS/

:: Index directory
if not exist ".index" mkdir ".index"
set SXC_IDX_PATH=.index

:: Generate index
FOR %%I in ("Map_ETS/*.scs") DO (
	sxc.exe "Map_ETS/%%I"
)

:: Build hash database
del /f .index\dblist.txt
FOR %%I in (".index/*.idx") DO (
	@echo .index/%%I >> .index/dblist.txt
)
sxc.exe -b .index/dblist.txt

:: Extract *.scs files (use namelist_stuff.txt for missing files)
if not exist "MP_ETS_extracted" mkdir "MP_ETS_extracted"
FOR %%I in ("Map_ETS/*.scs") DO (
	if not exist "MP_ETS_extracted/%%I" mkdir "MP_ETS_extracted/%%I"
	sxc.exe "Map_ETS/%%I" -bl namelist_stuff.txt -o "MP_ETS_extracted/%%I"
)
(very barebones, you could add variables for the paths, etc.; everyone is welcome to freely use this batch script snippet)

The only thing I am missing, is a native Linux version ... 8-)


Btw.: Is it possible to disable the output of currently processed files to the command line? I've tried -q, but it still displays every single file. I think this causes a considerable slowdown, since printing text is usually a very time-consuming operation.
Goodbye. No interest in participating in a community where posts get silently deleted without any explanation.
User avatar
Raahtaah
Posts: 99
Joined: 15 Jun 2018 21:03
Location: Joinville/SC - Brasil
Contact:

Re: [TOOL] SXC Extractor - Flexible Game Data/Mod File Extraction Tool (UPDATE Dec 30, 2019)

#60 Post by Raahtaah » 29 Mar 2020 02:33

Thanks, nice job
Sorry for using Google Translate
Post Reply

Return to “Others”

Who is online

Users browsing this forum: SeZu, sneg1784 and 9 guests