i dont like folder naming.
lets keep it just as original file name but just without extensionm, the way YZ2 tool does.
It would be easier in general usage including my script that allows merging mods
residentevilmodding.boards.net/thread/977/re4hd-mod-installer-distribution-standardWith names like _udas you will force me to do extra parsing job by using _ as delimiter, cutton _udas from names etc. So please just use original name without extension.
pl00
Also about list, where do you want to put it and how do you gonna name it? Inside folder or outside? I think its better idea to put it folder where original udas file exist to keep only upacked files inside folder. And naming of list files should be simple pl00.txt (but please dont hardcore extension, let your tool accept any etension, just add some checks that it not folder and has extension). So that new udas file will be composed from
pl00.txt+pl00=pl00.udas
Another thing - please make sure that command line arguments works right and that any type of path properly accepted, be it relative to root, full ot relative to current working dir.
lets say Current Dir is
H:\Program files\Steam\SteamApps\common\Resident Evil 4\
lets say your tool is in root of RE4 folder
and we need to work with files from
H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em
so we can use as input any of these kinds of path:
BIO4\Em\file.udas
.\BIO4\Em\file.udas
..\Resident Evil 4\BIO4\Em\file.udas
"H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\file.udas" - bet you use space as delimeters for input arguments so any path with space should have "" to tell that space between "" is not delimeter. For path without spaces "" may or may not be used.
"\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\file.udas"
if output is not specified it should use input path minus input extension, please do not hardcode it as udas, just use last\right "." as delimeter and cut any extension and . to form output folder. And use anything between last "\" and last ". as name for unpacked folder
But thats only in case if output folder not specified, i with to have ability to specify it like this
BIO4\Em - not the difference between two trailing slahs, it should act the same in both cases, many cmd line tools i saw have problems with it.
BIO4\Em\
.\BIO4\Em
.\BIO4\Em\
..\Resident Evil 4\BIO4\Em
..\Resident Evil 4\BIO4\Em\
"H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em"
"H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\"
"\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em"
"\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\"
subfolder and list file should be generated in specified folder according to name of input udas file.
argument format should be
for eXtraction:
udasunpacker -x "input udas path" "output path"
for example
udasunpacker -x "H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\file.udas" "H:\"
-in this case folder name file should be extracted to H: if output path not specified it should use same directory where udas was and create there sub-dir with udas name without extension.
for Compilation
udasunpacker -c "input folder or list file" "output path"
for example
udasunpacker -c "H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\file" "H:\"
or
udasunpacker -c "H:\Program files\Steam\SteamApps\common\Resident Evil 4\BIO4\Em\file.txt" "H:\"
-yet again in both cases output path is optional and input path should be used to place output udas file in if nothing specified.
-in 1st case we enter folder, you should check if path is folder or file to do it right. Folder name plus .udas extension should be used for output file.
-in 2nd case we enter list file, again please check if its a file. File name minus original extension plus .udas extension should be used for output file.
-in case of folder input you have no choice but to search input list file with hardcoded extension (not like in case of file input, where extension can be any and you just need to search for folder with same name), at least hardcode 2 of them .txt and .lst just in case.
also it would be good if both -c /c and -x /x formats for arguments will be available.
So to put it simple
Unpacking
pl00.udas
will make us
folder pl00
file pl00.txt
Packing:
File:
pl00.txt
or folder:
pl00
will make us
pl00.udas
oh yeah, in case of drag and drop -x and -c will be ignored and you will only have input path or file.
This should provide alternative way, just keep in mind all i just said, you have to detect if 1st argument is not -x or -c and actually a path and then use alternate mode:
If input path is folder then extract folder name from long path, get folder above it, search for folder name + .txt list file in folder above, make name+.udas in folder above
if input path is file then detect if its a list or udas (simple way is just extension txt or udas, but if extension is different, you better to check header file to make sure what kind of file you have for input),
> if we have txt list file then extract folder name and its name, search for folder with name - .txt . , make name + .udas in same folder where txt is
> if we have udas file then get folder name its in, extract to folder name - (minus) .udas inside folder where udas was.
Hope that will help
Oh, about visual appearance - please use standard buffere size, its kind makes it ugly and uncomfortable to read whne from script where all tools uses standard ot customised text buffer size it jumps to one you prefer and back leaving hor scroller bellow.
Another thing is - error handling, its does not meet console standards.
Whenever error happens, instead of show erro message, quitiing and setting errorcode above zero it simple hangs and starts to wait for user to press any key and as far as i remember it does not set the exit code, so this kinda make it very hard and uncomfortable to use in automated script like mine that processing a lot of files to save people time.
Every time there is and error, your tool halts entire processing. Imagine what will happen if user was away for a hour, instead of processing some files and skipping files with some errors, your tool will half entire batch processing for hours until user will input anything.
This is really bad way of handling errors in console tools. Please stick to the common standards.
Also its really weird, but it seems like your tool does not even allow to copy and past text they way standard console on widnows does. You using some weird and clunky techniques for output and input. Thats why i wanted to see your code and fix what possible to make it work like a normal console tool.
Naming of exe also very weird and not recommended for general usage in console tools [PC]RE4UHD_UDAS_extract.exe
its very long (and input command at cmd not very long itself so if there is a long path for input and output there is a way to run out of space so its recommened to save some space by using shorter names) for no reason, uses [ ] which can act as delimeters in many cases of scripting and so on.
I would short it to just UDAStool.exe (since it not just extractor and since we all know that udas belongs to RE4 UHD, and we surely dont need [PC] in name).
And the icon, FSBL icon is ugly, please just dont use any icon to make it use generic console tool icon from windows.
Just look at how YZ2 tool done, it does it all right for console tool.