Set up automatic updates - X-Hax/SADXModdingGuide GitHub Wiki
If you want the Mod Loader to prompt your mod's updates and to automatically distribute them, you will need to set some update information in your mod.ini
file. If you have already shipped your mod without this information, you will have to tell people to update manually once before they can take advantage of automatic updates.
- Configure automatic updates (first publication)
- Generate the manifest (first publication and for every update!)
Configure automatic updates
Depending on where your mod's package is stored, the configuration changes. Note that as of now, you can only use one type of mod update. If you set both self-hosted and GitHub, the Mod Loader will fetch self-hosted updates.
Self-Hosted Updates
If you can host the mod yourself, then you can use HTTP updates directly. First update your mod.ini
using the link to where the root of your mod will be. Then, generate the manifest and upload your unpacked mod to your server.
UpdateUrl=http://mywebsite.someweirdfreewebhosturl.net/my-cool-mod
ChangelogUrl=(optional, will display a text document to explain the changes)
The Mod Loader will prompt an update anytime the manifest file changes.
GitHub Updates
If you're publishing your mod's code on github, you may as well want to use GitHub's "release" functionality. You will need your profile name, the repository name and the future zip/7z package name. Follow the example below to edit your mod.ini
. Once this is done, generate the manifest and release your zip/7z packed mod. Don't forget that every time you're making an update, you need to generate the manifest again.
GitHubRepo=CoolGuy/MyCoolMod
GitHubAsset=MyMod.7z
The Mod Loader will prompt an update anytime a new release is made.
GameBanana Updates
If you are hosting your mod on GameBanana, you will need the type and ID of your mod. They can both be found in the URL of your mod's page. For example, given the URL https://gamebanana.com/mods/331757
, Mod
is the type and 331757
is the ID.
Once your mod.ini
is done, generate the manifest and upload your zip/7z packed mod. Don't forget that every time you're making an update, you need to generate the manifest again. Also, if your mod as a configuration, make sure to remove config.ini before generating the manifest and packing the mod.
Note: if you don't have a mod page, you can make a private one by uploading a dummy file like an empty text file, add the relevant information to your mod.ini, then edit the GB page to add the package with automatic updates ready and make it public.
GameBananaItemType=TYPE ("Mod")
GameBananaItemId=ID
The Mod Loader will prompt an update anytime a new update is made to your GB page. To make an update, first edit your page to change the mod's file, then save. Finally, on the mod's main page, press the "Add Update" button below screenshots and above the description.
Generate the manifest
If you're uploading the mod for the first time, or every time an update is finalized, you need to generate the manifest. To do so, right click your mod in the Mod Loader and in the "Developer" context click "Generate manifest".
This file tells the Mod Loader the name, size, and unique identifier of every file in your mod to know what changed between updates. This is very useful for self-hosted updates as the Mod Loader will only download the files that have changed!