Gildor's Forums

Author Topic: Option -nooverwrite on -save  (Read 155 times)
ilias
Newbie
*
Posts: 1


View Profile
Option -nooverwrite on -save
« on: October 21, 2022, 11:34 »

Hello!

I use umodel to "save" some .uasset files from a game.
Every time the game updates, I run the save again.
The problem is that it saves all game files, overriding existing ones.
I'd like to skip existing files, because it's easier to identify new files if I sort them by date.

There is the command line parameter "-nooverwrite", but unfortunately it works only on -export.
It doesn't work on -save.

Please, add this option to -save as well.
And since you're on it, make the option "-out" work on -save as well.

Thanks for your work on this great tool.
Let me know if you need more info on my suggestion.

Best regards.
ilias
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 1930


View Profile
Re: Option -nooverwrite on -save
« Reply #1 on: October 21, 2022, 17:20 »

@ilias: For "-out" option you can read the following topic, where it was already discussed before: https://www.gildor.org/smf/index.php/topic,8229.0.html

As for "-nooverwrite" option, it doesn't make much sense in context of saving updated assets only. The reason is because how UE file system works and how updates can be applied. Each asset could consist of uasset/uexp/ubulk and in the update package only ubulk/uexp can be updated, while all three (well, actually no, only uasset is always present, the rest depends on the game and UE version) are required for proper work. Currently upon saving assets from a folder with packages, you can be sure that you get proper combination of files for extracted assets, considering all possible updates from present packages for any particular asset. But if the option is forced, under certain circumstances you can get improper combination of files for extracted assets and most likely you'll blame umodel for that. Considering all this, you need to either implement kind of hash checks against already present files in the output folder (which would greatly affect performance), or use some third party solutions.

I suggest to look at my quickbms scripts from custom scripts bundle, available here (for more info read sticked topic). With them it's possible to extract only new and/or updated files from packages by comparing hashes. It's semi-auto solution and suitable for using in batch scripts. Though it works properly only when used on the same package in updated version, otherwise you need to compare list of packages.
Here is an example: there is a mobile game with constant updates. Major updates are handled through updated base packages, let's say it's pak0.pak, while small updates are handled via additional packages downloaded on demand, like pak0_0, pak0_1, etc. When major update is out, pak0.pak would be updated under the same name and you can use mentioned scripts to compare its content with the same pak from previous major version. For packages from minor updates it's more or less safe to consider that each of them contains only new/updated assets, and you only need to check list of packages for new additions.
« Last Edit: August 11, 2023, 16:23 by spiritovod » Logged
Jump to:  

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