ConverterPIX - Game formats to middle formats
- abasstreppas
- Posts: 7499
- Joined: 06 Feb 2013 20:32
- Location: Back on Öland again
- Contact:
Re: ConverterPIX - Game formats to middle formats
Great work mwl4, will you update the first page with that post too. It is easier to find all new parameters then
Re: ConverterPIX - Game formats to middle formats
Well this simply calls for a importer wrapper Now as we have listings user could be able to select file and even navigate to desired model and as last import it ... hmm....
- abasstreppas
- Posts: 7499
- Joined: 06 Feb 2013 20:32
- Location: Back on Öland again
- Contact:
Re: ConverterPIX - Game formats to middle formats
@abass: but there is a problem... What happens when someone does that on a mod and mod is not "standalone" with some missing resources? Fallback to base I guess... that wrapper addon should have same input as B2SCS had: 2 paths, where second is just for a fallback...
Re: ConverterPIX - Game formats to middle formats
well, it does not list some of SCS# I had so I assume not all SCS# can be extracted or listed
Re: ConverterPIX - Game formats to middle formats
@SiSL, it is not depended on implementation, but rather on available information in SCS# format. Idea of the HashFS is storing the hashes, not paths.
Basically you can only get real paths by reading directory file (this is some trick, directory content is stored in file named as directory path). So for example in base.scs "/" file looks like:
* on the beginning means directory.
"/vehicle" file looks as follows:
Of course directory files are flagged as directory. There is no other way to list files from HashFS. You can extract all files from HashFS, however you will not have paths, what is not desired I think.
Additionally, some .scs files do not have "/" file inside (like locale.scs), but they have "/locale" directory for instance:
locale.scs/locale:
locale.scs/locale/pl_pl:
@50keda, ConverterPIX supports multiple base paths.
Basically you can only get real paths by reading directory file (this is some trick, directory content is stored in file named as directory path). So for example in base.scs "/" file looks like:
Code: Select all
*automat
*contentbrowser
*dlc
*effect
*font
*map
*material
*model
*model2
*prefab
*prefab2
*road_template
*sound
*system
*ui
*unit
*vehicle
*video
autoexec.cfg
version.txt
"/vehicle" file looks as follows:
Code: Select all
*ai
*driver
*share
*trailer_eu
*truck
*wheel
Additionally, some .scs files do not have "/" file inside (like locale.scs), but they have "/locale" directory for instance:
locale.scs/locale:
Code: Select all
*bg_bg
*ca_es
*cs_cz
*cy_gb
*da_dk
*de_de
*el_gr
*en_gb
*en_us
*es_es
*es_la
*et_ee
*eu_es
*fi_fi
*fr_fr
*gl_es
*hr_hr
*hu_hu
*it_it
*ja_jp
*ka_ge
*ko_kr
*lt_lt
*lv_lv
*mk_mk
*nl_nl
*no_no
*pl_pl
*pl_si
*pt_br
*pt_pt
*ro_ro
*ru_ru
*sk_sk
*sl_sl
*sr_sp
*sr_sr
*sv_se
*tr_tr
*uk_uk
*vi_vn
*zh_cn
*zh_tw
autodetect.conf
locale.rev
Code: Select all
local.override.sii
local.sii
mails.sii
Re: ConverterPIX - Game formats to middle formats
Ah makes sense now. I guess "/" didn't work that way, thanks for the update mate , btw, small request, if I accidently type wrong name of folder to extract or forgot quotes for base folder, application crashes, may be it would just be best to file folder exists check and exit on error.
Re: ConverterPIX - Game formats to middle formats
Well, this might be fixed, however better solution will be just providing GUI to the application
Re: ConverterPIX - Game formats to middle formats
Not GUI but I made a small Batch file for Windows.
Copy following code to a Notepad file, edit path variables in for your directories (game files, extraction path, convertion path) save it in same folder with scs_extractor.exe and converter_pix.exe and run it. It automatically select 1st choice in 90 seconds.
[ external image ]
Don't forget to change these lines:
Copy following code to a Notepad file, edit path variables in for your directories (game files, extraction path, convertion path) save it in same folder with scs_extractor.exe and converter_pix.exe and run it. It automatically select 1st choice in 90 seconds.
[ external image ]
Code: Select all
@echo off
setlocal
set GAMEPATH=D:\Oyunlar\Steam\SteamApps\common\Euro Truck Simulator 2
set EXTPATH=E:\ETS2\ETS2Base
set CNVPATH=E:\ETS2\ETS2Base_exp
cls
echo.
echo SiSL's EXTRACT HELPER
echo ------------------------------------------------------------
echo.
echo [1] CLEAN FULL EXTRACT ^& CONVERT (DEFAULT)
echo.
echo Cleans Base folder, extracts all files and DLC
echo and converts them to PIM
echo.
echo [2] EXTRACT ALL FILES ^& CONVERT
echo.
echo Does not clean base folder, extracts all files and DLC
echo and converts
echo.
echo [3] CLEAN CONVERT
echo.
echo Converts from SCS files directly from game folder.
echo Does not extract any files seperately.
echo.
echo [4] CONVERT EXISTING BASE FOLDER
echo.
echo [5] EXIT
echo.
echo Please press key of your choice. [1]
C:\Windows\System32\choice.exe /c:12345 /n /t:90 /D:1
IF ERRORLEVEL 5 (
goto:eof
)
IF ERRORLEVEL 4 (
call :convertpix
echo SiSL's EXTRACT HELPER Finished
goto:eof
)
IF ERRORLEVEL 3 (
call :cleancnv
call :convbase
echo SiSL's EXTRACT HELPER Finished
goto:eof
)
IF ERRORLEVEL 2 (
call :extractscs
call :convertpix
echo SiSL's EXTRACT HELPER Finished
goto:eof
)
IF ERRORLEVEL 1 (
call :cleanfolders
call :extractscs
call :convertpix
echo SiSL's EXTRACT HELPER Finished
goto:eof
)
GOTO:eof
:cleanfolders
cls
echo Cleaning Folders...
RD "%EXTPATH%" /S /Q
RD "%CNVPATH%" /S /Q
MD "%EXTPATH%"
goto:eof
:extractscs
echo.
echo Extracting SCS files...
scs_extractor.exe "%GAMEPATH%\def.scs" "%EXTPATH%"
scs_extractor.exe "%GAMEPATH%\effect.scs" "%EXTPATH%"
scs_extractor.exe "%GAMEPATH%\base.scs" "%EXTPATH%"
for %%f in ("%GAMEPATH%\dlc_*.scs") do (
FOR %%i IN ("%%f") DO (
echo.
echo Extracting %%~ni
)
scs_extractor.exe "%%f" "%EXTPATH%"
)
goto:eof
:convertpix
echo.
echo Converting entire Base folder...
converter_pix "%EXTPATH%" -e "%CNVPATH%"
goto:eof
:cleancnv
RD "%CNVPATH%" /S /Q
:convbase
cls
echo.
echo Extracting def.scs
converter_pix -b "%GAMEPATH%\def.scs" -e "%CNVPATH%" -extract_d /
echo.
echo Extracting base.scs
converter_pix -b "%GAMEPATH%\base.scs" -e "%CNVPATH%" -extract_d /
for %%f in ("%GAMEPATH%\dlc_*.scs") do (
FOR %%i IN ("%%f") DO (
echo.
echo Extracting %%~ni
)
converter_pix -b "%%f" -e "%CNVPATH%" -extract_d /
)
goto:eof
Code: Select all
set GAMEPATH=D:\Oyunlar\Steam\SteamApps\common\Euro Truck Simulator 2
set EXTPATH=E:\ETS2\ETS2Base
set CNVPATH=E:\ETS2\ETS2Base_exp
Re: ConverterPIX - Game formats to middle formats
@mwl: Yesteday I tried new version however had problems because I tried to convert sth directly from ZIP, do you plan to add zip support soon? Now as you have HashFS it would be also nice to have zip support otherwise my idea of importing models will have to wait.
Who is online
Users browsing this forum: No registered users and 1 guest