Sonic and Sega Retro Message Board: SA2/SADX Mod Loader - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 14 Pages +
  • ◄ First
  • 12
  • 13
  • 14
    Locked
    Locked Forum

SA2/SADX Mod Loader I am the best at names

#196 User is offline Turbohog 

Posted 02 January 2017 - 04:08 PM

  • Posts: 366
  • Joined: 25-June 08
  • Gender:Male
  • Wiki edits:22
Use the US exe.

#197 User is offline Morph 

Posted Today, 05:06 AM

  • AKA SonicFreak94.
  • Posts: 695
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
The SADX Mod Manager now has mod updating functionality!

For mod developers who would like to provide automatic updates, they can do so by using the GitHub release system, or by using a self-hosted directory containing the mod's files directly. The New Mod dialog has fields to configure these features when you first create your mod. I'll detail how these methods work and how to add these fields to existing mods below.

Posted Image

GitHub Release System

This method uses the GitHub API to check the latest available release for updates. The Repo field defines the username and repository that the mod is hosted in. For example, for my Dreamcast lighting mod, this field would be "sonicfreak94/sadx-dc-lighting" (without quotes; case insensitive). The Attachment field (known internally as the Asset field) defines the name of the attachment that will be present on each release. To use the Dreamcast lighting mod as an example again, it would in this case be "sadx-dc-lighting.7z" (without quotes; case insensitive).

To add this functionality to an existing mod, add the fields "GitHubRepo" (same as the Repo field) and "GitHubAsset" (same as the Attachment field) to your mod's mod.ini file with the information described above. For example:

Quote

Name=Lantern Engine
Author=x-hax
Version=1.2
Description=Re-implementation of the Dreamcast Sonic Adventure's palette-based lighting system.
DLLFile=sadx-dc-lighting.dll
GitHubRepo=sonicfreak94/sadx-dc-lighting
GitHubAsset=sadx-dc-lighting.7z



This method requires that a "mod.manifest" file is included in the release archive. This will be detailed below.

Self-Hosted Directory (aka Modular System)

This method will only download individual files as they've changed as defined by "mod.manifest" (again, detailed below), and is ideal for large mods. It requires the user to self-host their mod's content in a directory on a web server. The "Directory URL" field should point to the directory which contains the mod's "mod.ini" file and "mod.manifest" file.

To add this functionality to an existing mod, add the field "UpdateUrl" to your mod.ini with a valid url pointing to your self-hosted directory.

What's this mod.manifest crap about?

mod.manifest is a manifest of the files contained in your mod. It contains information like their file name and path (relative to the mod's directory, of course), file size, and checksum (sha256). It's used to track file additions, modifications, and removals. Its presence is required for all updatable mod releases. You can generate one for your mod by using the following menu:

Posted Image

It will give you a stern warning about only doing this for mods you've developed, because if used incorrectly, it could mean that one could, for example, accidentally include their mod-specific save data in the mod manifest. This would cause those saves to get deleted upon next update because they will be detected as deleted from the latest version.

In any case, this will prompt you with a dialog which you can use to manage the files you'd like to have tracked in your mod.manifest, and it will place the resulting mod.manifest in your mod's root directory (where mod.ini is).

For the average user, you can see there's some options available to you: Manual update checking, integrity verification, force updating, and even uninstallation. Pretty convenient if you ask me!

The main window has also received a bit of re-organization to facilitate these new options.

Posted Image

Here you can configure automatic update frequency for both the mod loader itself (which will eventually be re-implemented so that it can download and apply its own updates like mods can) and mods. By default, it checks for updates to the mod loader and installed mods weekly.

When mod updates are available, you will be prompted with the following dialog:

Posted Image

Using this dialog, you can select which mods you want to update, or just ignore the update all together.
This post has been edited by Morph: Today, 05:10 AM

  • 14 Pages +
  • ◄ First
  • 12
  • 13
  • 14
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users