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
  • 15 Pages +
  • ◄ First
  • 12
  • 13
  • 14
  • 15
    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: 438
  • Joined: 25-June 08
  • Gender:Male
  • Wiki edits:22
Use the US exe.

#197 User is offline Morph 

Posted 27 March 2017 - 05:06 AM

  • AKA SonicFreak94.
  • Posts: 723
  • 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: 27 March 2017 - 05:10 AM

#198 User is offline Morph 

Posted 31 March 2017 - 01:56 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
I heard you like features, so now you can dynamically resize the sadx window and press alt+enter to toggle fullscreen


This post has been edited by Morph: 31 March 2017 - 02:44 PM

#199 User is online MainMemory 

Posted 03 April 2017 - 12:37 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3809
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
It appears that the window resizing feature causes performance drops on some systems, and the initial build had that performance drop even with the feature disabled. If you notice framerate drops, update the mod loader and disable the "Resizable Window" feature.

SADX Mod Loader now forces custom resolutions in order to fix some issues with mod initialization, but I've added a dropdown with all of SADX's presets and more.
Posted Image

#200 User is offline Morph 

Posted 08 June 2017 - 09:49 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
The Mod Loader has gained a couple major features! I'll start off with the most noticeable (and most requested):

Posted Image

Full menu scaling! With HUD scaling enabled, ingame menus are now correctly scaled to match.

Additionally, menu background scaling has been implemented. This enables aspect-correct scaling with two modes: fit and fill. With "fit" mode, the background will scale down so that it is entirely visible within the game window. With "fill" mode, the background will zoom to fill any potential gaps at the edges of the screen (i.e no letterboxing). The screenshot above demonstrates fill mode. These modes can also be configured for in-game FMVs. You can disable this functionality at any time using the two new dropdowns in the Graphics tab of the Mod Manager. Using the "Stretch" setting restores default background/FMV scaling behavior.

Posted Image

The other feature is a new method of using and packaging texture packs.

I've developed a (very simple) custom archive called PVMX which works similarly to PVMs, but it has all the bells and whistles that a standard folder-based texture pack does (PNG, DDS, arbitrary resolution, etc). It should improve performance considerably for mods that use texture packs primarily. The reason for this is: reading data from a single file (even in bulk) is faster than reading data from many individual tiny files, particularly on mechanical hard drives. The suite of Dreamcast mods already uses this functionality.

You can manage PVMX archives using this utility. It takes an existing folder-based texture pack and generates a PVMX archive from it. PVMX archives are to be placed in your mod's "textures" folder just like standard texture packs.

Note that PVMX archives can only be used for texture packs that replace PVMs. It doesn't work on individual PVR texture replacements (the ones just sitting in the system folder).

#201 User is offline Turbohog 

Posted 08 June 2017 - 11:57 PM

  • Posts: 438
  • Joined: 25-June 08
  • Gender:Male
  • Wiki edits:22
Wow. The menu and menu background scaling is a huge quality of life improvement. The PVMX texture archive sounds great too! Impressive work Morph!

Now that the menu scaling problem is fixed, are there really any other glaring issues that anyone knows of when playing SADX widescreen? It's a shame Sega didn't have Morph, MainMemory, and co. to help them when they released the crappy Steam/XBLA/PSN port.

#202 User is offline Morph 

Posted 09 June 2017 - 01:04 AM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Well, Sky Chase is basically unplayable at any resolution greater than 640x480 still. Fixing it will be interesting to say the least :v:

#203 User is online Blue Spikeball 

Posted 09 June 2017 - 02:26 PM

  • Posts: 112
  • Joined: 29-October 16
  • Gender:Male
Works as a charm! Thanks, I've been waiting for something like this for a long time. Thanks to the modding scene, the PC version of SADX went from being an underwhelming port to my favorite version :)

Bug report: While this fixes nearly all scaling issues, they're still present in the GG game select screen and the GG games themselves.

#204 User is offline Morph 

Posted 09 June 2017 - 03:51 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Yep, I'm aware. It's fairly low priority, but I'll get to it. One other thing that isn't scaling for some reason is the text on the recap screen. Before I get to those though, I'd like to find out why the menus feel the need to write to the depth buffer and cause artifacts like in that screenshot of the character select screen I posted. It should still be yellow behind "Player Select". It works fine with the god-awful 16-bit depth buffer, but like hell I'm reverting that. :colbert:

#205 User is online Blue Spikeball 

Posted 09 June 2017 - 04:51 PM

  • Posts: 112
  • Joined: 29-October 16
  • Gender:Male
That player select screen issue isn't present for me:

Posted Image

Perhaps it's caused by a mod?

Would you like me to post my settings?

#206 User is offline Morph 

Posted 09 June 2017 - 04:58 PM

  • AKA SonicFreak94.
  • Posts: 723
  • Joined: 01-August 08
  • Gender:Male
  • Location:Utah
  • Project:SA1/2 hax
  • Wiki edits:11
Sure! It does tend to stop happening sometimes, but I haven't been able to pinpoint it. Does it happen for you if you start the game and go straight to Trial mode, by chance?

#207 User is online Blue Spikeball 

Posted 09 June 2017 - 05:09 PM

  • Posts: 112
  • Joined: 29-October 16
  • Gender:Male
Here you go:
Posted Image
Posted Image

Plus my enabled mods:
Posted Image

Just tried that and still no issue.

#208 User is offline Turbohog 

Posted 09 June 2017 - 10:53 PM

  • Posts: 438
  • Joined: 25-June 08
  • Gender:Male
  • Wiki edits:22

View PostMorph, on 09 June 2017 - 01:04 AM, said:

Well, Sky Chase is basically unplayable at any resolution greater than 640x480 still. Fixing it will be interesting to say the least :v:/>

Haha woo boy. I had never tried that before. Fixing that definitely seems like it will be a challenge.

#209 User is offline Turbohog 

Posted 09 July 2017 - 12:46 PM

  • Posts: 438
  • Joined: 25-June 08
  • Gender:Male
  • Wiki edits:22
So double post. But I think this question belongs here.

I was trying to make a mod for SA2 that uses the init function of the mod loader. However, it seems like the mod loader doesn't find the init function because I can tell it's never called. The extern "C" and "__declspec(dllexport)" are both there. Does anyone have an idea of what I might be doing wrong?

#210 User is online MainMemory 

Posted 09 July 2017 - 02:29 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3809
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Did you make sure to call it "Init", not "init"? The full signature should technically be "void __cdecl Init(const char *path, const HelperFunctions &helperFunctions)", although you can usually ignore the __cdecl as that's the default, and the arguments can be left out if you aren't using them.

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

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