Skip to content

Add project export CLI command - #2488

Open
luizzeroxis wants to merge 1 commit into
UnderminersTeam:masterfrom
luizzeroxis:cli-export-1
Open

luizzeroxis wants to merge 1 commit into
UnderminersTeam:masterfrom
luizzeroxis:cli-export-1

Conversation

@luizzeroxis

Copy link
Copy Markdown
Contributor

Description

Add a CLI command to export assets to a project. This allows you to extract existing assets of a data.win and then modify them on disk without having the use the GUI. Usage: UndertaleModCli project export <project> -s <source> -d <destination> -a <assets glob> (use -v for a better view).

Caveats

This is a bit awkward to do in the code, so it has to import the entire project first before being able to export. Maybe an empty project could be created in code just for this, so it at least doesn't have to load the stuff already in the project (since this is really just to extract assets from the original source, not the current project). You still have to define the destination - it's used when, for example, looking at audiogroups (it uses the destination one). Another problem is that if one asset fails to export for some reason, the whole thing fails. Still I think this is better than nothing.

Notes

I already talking about this on Discord but I do think the project system has to be more abstracted and modularized, you should be able to deal with a project without loading a data file at all, and you shouldn't need to specify a destination until you actually want to save. Changes like that would make this kind of code a lot cleaner.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant