April 17, 2024, 03:41
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Batch to Export Complete Games  (Read 1892 times)
Gao
Newbie
*
Posts: 6


View Profile
« on: June 18, 2017, 12:28 »

Hello, and thanks for reading this post.

I have been using uModel for some years now (for modding).
I was able to export complete games before with a batch file.
Exporting: Static Mesh, Animated Mesh, Animations, Textures and Sounds.

Code:
@echo off

:: Command file for batch export using the umodel


::-----------------------------------------------
:: Settings
:: For additional information look here:
:: http://www.gildor.org/smf/index.php/topic,1099.0.html
:: -----------------------------------------------

:: Feel free to override options below. You may fully comment the line or
:: use blank values ("set option=") here.

:: Specify game override. Use empty value for autodetection.
set game=

:: Specify directory with game files. May be either relative or absolute path.
:: Do not use quotes here!
set game_dir=

:: Specify file masks to export. Note: usully Unreal package has extensions
:: whith starts with 'U' letter (*.u, *.ukx, *.upk), plus cooked packages
:: by default has extension *.xxx. Feel free to add other extensions here.
set file_mask=*.u* *.xxx *.bsm *.pcc *.gpk

:: Specify compatibility options here - such as
:: -sounds -3rdparty -nomesh -noanim -nostat -notex -lzo -lzx -zlib
set compat=-sounds

:: Other umodel options
set options=-export -uncook -groups

:: Where to write exported contect. May be either relative or absolute path.
:: Do not use quotes here!
set out=..\ExportOutput

set log=%out%\output.log
set umodel=umodel.exe

:: End of settings block
::-----------------------------------------------

:: Debug
::set umodel=echo umodel

:: Prepare some options

if not "%game%" == "" set game_opt=-game=%game%
if not "%out%" == "" set out_opt=-out="%out%"
if "%file_mask%" == "" set file_mask=*.*

if not "%game_dir%" == "" (
set path_opt=-path="%game_dir%"
if not exist "%game_dir%" (
echo ERROR: game directory "%game_dir%" is not valid
exit
)
)
:: export from the current directory by default
if "%game_dir%" == "" set game_dir=.

if not "%log%" == "" (
set log_opt=-log="%log%"
if exist "%log%" del %log%
)

:: Process ...
for /r "%game_dir%" %%a in (%file_mask%) do call :process "%%a"
goto :eof


::-----------------------------------------------
:: Function to process single package
::-----------------------------------------------
:process
echo Processing %1 ...
%umodel% %path_opt% %options% %compat% %game_opt% %out_opt% %log_opt% %1

With the new uModel this batch is not working and I don't know how to make it work.
I have been reading and the tools provided and Batch files are old like mine.

Sorry if I'm being stupid and miss something here. Will keep checking and if I find the solution will update this post.

Again: need a batch file to export .psk / .pskx / .psa / textures / sounds

Thank you.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #1 on: June 18, 2017, 12:32 »

Hello.

Quote
With the new uModel this batch is not working and I don't know how to make it work.
With new UModel, or with new games (UE4)?
Logged
Gao
Newbie
*
Posts: 6


View Profile
« Reply #2 on: June 18, 2017, 13:10 »

Well both.
Can't make it work with the new uModel and the new games.
Since you have to pick the Engine now it seems my batch is not longer working.

Or I have to add something else to the batch?

Thanks in advance.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
« Reply #3 on: June 18, 2017, 13:23 »

Batch probably won't work with UE4 games. Actually I was forced to write a UI for UModel just to make it working with UE4 games. I mean - this engine has too much difference from older ones, so it is quite expected that batch doesn't work.

I'd suggest doing the following.
1. Launch UModel with all special options which you're setting in batch export file (like - "-dds" etc). Just add these options to the command line and nothing else.
2. When UModel opens, select a game directory and open package selection window.
3. There, select "flat view", so you'll see all game packages in a single list.
4. Press "Ctrl+A" to select everything.
5. Do export.

This won't work correctly with animations - every track will be stored to a separate psa file. This is just another specific of UE4 which require adaptation in UModel. I just don't know how to handle animation export in more correct way, so it works just as it works.
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS