Mod site API automatic update tool (open source)

by ◕小莫◕·v1.0·Updated 2022-02-07

Mod站API自动更新工具(开源)

About this mod Machine translation

A C# example that demonstrates how to dynamically detect version updates through the Mod Site's API

Prerequisites

  • Check "Enable API" when publishing the mod
  • The version number is filled in floating point number (float) type, such as (0.31, 1.25, 1.0)
Of course, if you write it yourself, you can determine the version format yourself, so you don’t have to follow the float type.

Principle

In fact, it is to use the Get method to obtain the API address (``ID}``), use json to parse the data, and obtain the version number of ``mods_version``.

Then compare the local version number to determine whether it is new or old, and use this to determine whether there is a new version and whether it needs to be updated.

Use ready-made tools

If you want to use the tool downloaded from here directly,

  • Edit the "modid" and "mods_version" values ​​in the CheckUp.ini file to your own values
  • Then send the three files "CheckUp.exe", "CheckUp.ini" and "Newtonsoft.Json.dll" together with your Mod to the players.
  • And tell them to run "CheckUp.exe" if they need to check for updates.
  • In addition, after updating to a new version, remember to change the value of "mods_version" to the new version number.

Start the Mod to automatically check for version updates

Compared with the above method of letting players manually run the program to check for updates,

I believe you would prefer to have the game automatically check for updates when it is running.

Then at this time you need to take action yourself,

I believe that as a mod author, this little thing will not trouble you. It only requires a little basic knowledge of code. Combining the working principles I mentioned above and referring to the source code, you can easily achieve the functions you want.

Do it yourself and work hard.

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
  3. Place the files exactly as the readme says; mods with listed dependencies need those installed too.
  4. Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.

Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.

File & checksum

Filename
Mod站API自动更新工具(开源)
File size
255.8 KiB