How Do Mod Updates Work?

Description of the mod versioning system in the OFP Game Schedule

Adding a new version      Example      Editing an existing version      Jumping between versions      Testing      


Adding a new version

On the OFP Game Schedule website you can indicate that you've updated your mod and then players will be able to download the new files.

Note: there's no need to change version if you only change mod details (e.g. name).


After modifying mod files and uploading them to the host of your choice, go to the OFP GS main page. Find your mod and select "Installation".



  • OPTION #1: If you have overwritten existing download package then little action is required. Website automatically suggest a new version number and selects last used installation script. Just fill in the patch notes and click on the "Add New Version" button.


  • OPTION #2: If you have a new file to download then select "Installation script: Add a new script" and paste the URL below. Fill in the correct download size and patch notes and then click on the "Add New Version".


When users check for updates they will download the latest mod version number from the website and compare it against the number stored in the identification file __gs_id inside the modfolder. If the latter is lower then the option to update the mod will appear.



Clicking on the option starts the update process. Website combines installation scripts based on what the user is missing. If the same script is repeated multiple times (option #1) it will be served only once in order to avoid duplicating downloads (see example below).

Installer documentation


Example

Here's an example of a mod that reuses the same installation script (option #1).


All versions use the same installation script. Users, regardless of their version, will download mod.zip only once in order to get to the latest version.

You can see what the installation process will look like by clicking on the "Preview Installation" button on the bottom of the "Installation" page.




Every time this mod gets updated the users will redownload the same file. This might get burdensome with large archives so instead you could provide a new, smaller package that only contains the patched files (option #2).


In this example new users will download all three files.


Players who already have the mod will download one or two patches.



Editing an existing version

To change previously added mod version go to the "Installation" page and select number from the version list.


You can reuse script from any other version by selecting it from the "Installation script" list. Alternatively pick "Add a new script" to create a new one for this version.

Contents of a script can be modified here as well. This will affect all the versions that use this particular script. For example: you have changed the host for your files and now you want to update all URLs. In case of a single script (option #1) you only have to do it once in any version. With multiple scripts (option #2) you'll have to modify all of them.

Editing an existing version will not cause file changes for users who already downloaded this version. You'll have to add a new version.


It is not possible to remove an update because it would lead to a situation where users have newer version of the mod than the website database.


Jumping between versions

Jumps can be used to skip updates that became obosolete.

Look again at the example with multiple scripts (option #2).


Let's assume that patch2.zip already contains all the changes from the patch1.zip so the latter is unnecessary. We could skip it so that players will download less data.



Go to the "Installation" page and select "Jumps Between Versions". In the field "From version" type "version = 1" to target users with the first version of the mod. Select below "Installation script: Same as in version 1.1 to 1.2" which downloads patch2.zip. Finally click on the "Add New Jump".


In the preview you'll see that new users will download mod.zip and then patch2.zip. File patch1.zip will be ignored.




It's possible to simultaneously provide a single large package (mod_new.zip) for the new users and small patches (patch.zip) for the existing users (option #1 and #2).

In the field "From version" write "version = 0" to target new users. From the list "To version" select "Always to the newest one". Write the new installation script below and then click on the "Add New Jump".



Now every time you add a new version this jump will be automatically adjusted. Don't forget to upload the new mod_new.zip.





Testing

Create a new mod just for testing. Add a password to hide it from other users.


Now you can add new versions and jumps to find out how they function.


To download this mod launch the game, select MODS --> [Download Mods] --> [Show Private Mods]. Type in password and press ENTER.


Now the mod will appear on the list.


See also testing installation scripts.