Implement modding project system
Description
Implements the main functionality needed for a modding project system, along with installation logic. Library code is meant to be used by installers as well as for development via the mod tool itself.
Caveats
The JSON serialization results in a lot of similar structures for all models, but it's probably simplest to do this way. Maintaining project format versioning likely won't be a huge concern, but it could be implemented with new types if it's really bad (simple cases can just add optional properties).
This also will need a lot of testing to further refine, although the project file nature of this means that bugs may be less catastrophic.
Notes
Current progress (likely in scope for this PR):
- [x] Removed profile mode, as this system is designed to obsolete it
- [x] All main/basic asset types saving/loading as part of system
- [x] Game objects
- [x] Paths
- [x] Code
- [x] Script assets
- [x] Sounds
- [x] Rooms
- [x] Backgrounds (tilesets)
- [x] Sprites
- [x] Sequences
- [x] Animation curves
- [x] Fonts
- [x] Base project file JSON format
- [x] List of flags (user-defined and required project system ones)
- [x] Custom asset data file path
- [x] Exclude directories for main assets
- [x] Sub-projects
- [x] List of file patches to apply (currently using BPS)
- [x] List of external files and directories to copy
- [x] List of files to copy and delete in existing game files
- [x] Pre-import scripts, pre-asset-import scripts, post-import scripts
- [x] Mod file backup and restoration system (during installation)
- [ ] UI/UX for project asset management
- [x] Basic implementation
- [ ] Slightly improved project import flow (maybe just reverse the order of the GUI file selection prompts)
- [x] Make most of the importer scripts mark assets for export (at least in the short/medium-term)
- [ ] Finish the basic "view unexported assets" window functionality
- [ ] Option on
ProjectFile(and in GUI) to recompile all code when saving (prevents newly-added asset reference problems) - [ ] Game (version) detection and verification during installation
- [ ] General info modification, at least for the most commonly-desired fields (game name, flags, etc.)
Future work (maybe out of scope for this PR):
- [ ] CLI implementation
- [ ] More code importing operations (inaccessible from mod tool GUI?)
- [ ] Preprocessor directives based on project flags, maybe version detection results?
- [ ] Code append/prepend/replace operations
- [ ] Ability to export and import single assets, using serializable assets
- [ ] Ability to duplicate a single asset, using serializable assets (but without actually serializing)
- [ ] Custom texture group support (and associated settings), parallelized on import to some extent
- [ ] Custom audio group support
Download the artifacts for this pull request here:
GUI:
- GUI-windows-latest-isBundled-false-isSingleFile-false
- GUI-windows-latest-isBundled-false-isSingleFile-true
CLI: