Create a Mod-Installer for your created game mod for games made with unity.
You need .NET 4.7.1 installed.
Then checkout the project and open the UnityModInstaller.sln with Visual Studio 2022. Install NuGet-Packages and Build the Project.
Thats it.
You can get the finsihed install.exe from the Release-Page.
This installer needs to be configured with a settings.yml. The settings.yml describes the install.exe how to install the mod-files into the affected game.
You can find a demo configuration in data/demo-mod/
Put the mod-files, the settings.yml and the install.exe into one folder:
/
|-mod/ - Directory containing files used for this mod
|-settings.yml
|-install.exe
|-README.txt (optional) add a readme file with instructions, license, credits etc. for the user
Compress the structure above into a zip-file and you have a pretty bundled mod for your game.
- modName - (string) - Name of the mod
- author - (string)[optional] - author of the mod
- license - (string)[optional] - license this mod depends on
- selectFolderDescription - (string) - Descriptiontext for Choose-GameFolder-Dialog during installation
- initialDirectory - (string)[optional] - Path for preselecting the Game-Folder in Choose-GameFolder-Dialog during installation
- continueIfInitialDirectoryExists - (boolean)[optional] - skip Choose-GameFolder-Dialog if initialDirectory exsits
- assets - (array)[optional] - all asset tasks
- file - (string) - target-assets-file filepath
- replaceAssetsFromAssets - (array) - replace assets from a source-assets-file
- file - (string) - source-assets-file filepath
- replacements - (array) - list of replacements to be made in this assets file
- source - (string) - name of the asset from source-assets-file
- target - (string) - name of the asset that will be overwritten in target-assets-file
- resourceFile - (string)[optional] - if provided, it will change the used resource-file for this asset. useful if your resource was newly added to the game. (use copyFiles for that)
- copyFiles - (array)[optional] - list of copy jobs
- source - (string) - source filepath relative to install.exe
- target - (string) - target filepath relative to choosen Game-Folder
- overwrite - (boolean)[optional] - overwrite if exists
You're welcome to:
- Open an issue...
- Or do it on your own and send a PR.
Here are a list of useful links as a starting point:
- AssetStudio - Explore Unity Bundles and/or Assets
- Unity Asset Bundle Extractor - Extract Unity Assets
- How to modify Sound Files - Good starting point to understand how to replace assets in unity game
Reach me at discord: Valtos#3367
I'm using the awesome lib from nesrak1: AssetsTools.NET