Skip to content

Create a simple 1-Click mod-installer for games made with unity

License

Notifications You must be signed in to change notification settings

mricharz/UnityModInstaller

Repository files navigation

UnityAssetReplacer

Create a Mod-Installer for your created game mod for games made with unity.

Development

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.

Usage

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.

Documentation

settings.yml

  • 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

New features needed / Bugs found / Refactoring needed?

You're welcome to:

  • Open an issue...
  • Or do it on your own and send a PR.

Want to create a mod on your own?

Here are a list of useful links as a starting point:

Questions?

Reach me at discord: Valtos#3367

Credits

I'm using the awesome lib from nesrak1: AssetsTools.NET

About

Create a simple 1-Click mod-installer for games made with unity

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages