-
Notifications
You must be signed in to change notification settings - Fork 2
Update Notification
To use this feature, you will need either a GitHub account or a Pastebin account. These are well-known and impartial free public services, required here to discourage passive telemetry scraping.
Write a JSON containing the current version code and home page URL of each of your mods by ID, following this format:
{
"cat_modutils": {
"version_code": 9,
"mod_page": "https://github.com/Yukitty/CassetteBeasts-cat-modutils"
},
"cat_qol": {
"version_code": 5,
"mod_page": "https://github.com/Yukitty/CassetteBeasts-cat-qol"
}
}Your mod page may be a link to the mod's GitHub repository, ModWorkshop release page, GameBanana mod page, ModDB, or anywhere else you consider to be your mod's primary source. Avoid using direct download links here, as this may be confusing for users and potentially violate the rules of some upload sites, as they often make money from in page advertisements.
Upload this JSON while logged into your account to either gist.github.com or pastebin.com and copy the raw link to it. You may use a "secret gist" (GitHub) or "unlisted paste" (Pastebin) for this if desired. Advanced users may use GitHub Pages (github.io) if they prefer it.
The reason an account is required, is to allow you to edit the data after upload. Then, whenever you release an update to your mod, you can simply update the version code for that mod in the JSON to match, and Mod Utils will handle the rest.
Now that your JSON is properly formatted and uploaded somewhere, we need to store the URL in your mod metadata for Mod Utils to use. As long as you are using one of the whitelisted services and everything is formatted correctly, this should "just work" and Mod Utils will do all of the heavy lifting for you when it is loaded.
Simply add an entry named "updates" to the MODUTILS Dictionary in your mod's ContentInfo script, and set it to the raw link to your JSON as a String.
Read Getting started for a step-by-step guide to set up your ContentInfo script.
As a bonus, if multiple mods provide the same URL, Mod Utils will know to only download the file once and apply the update data to all of them. This can be much faster when using many mods by the same author, so try to combine your update data as much as possible.
Example:
const MODUTILS: Dictionary = {
"updates": "https://gist.githubusercontent.com/Yukitty/f113b1e2c11faad763a47ebc0a867643/raw/updates.json",
}