Sonic and Sega Retro Message Board: Mania Mod Loader - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 7 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

Mania Mod Loader It loads mods, for Mania. Update: now with custom code support.

#1 User is online MainMemory 

  Posted 01 September 2017 - 01:31 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3956
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Note: Currently the mod loader only works with the September 6th version of the game. For instructions on how to downgrade, go here.

You can download it here. It works basically the same way as the SADX Mod Loader and SA2 Mod Loader, except this one only does file replacements right now.

To make a mod, simply create a folder containing a "mod.ini" file like so:
Name=Mod Name Here
Author=Your Name Here
Description=Describe mod here.
Version=v11.q (optional)

Then, create a "Data" folder in that folder, and place whichever files you want your mod to replace in their relative paths within that folder (ie Data\Sprites\Players\Sonic.bin).

To use mods, extract it into the folder Sonic Mania is in, run ManiaModManager.exe, click the "Install Loader" button on the bottom, then check the mods you want to enable and hit "Save" or "Save and Play".

The source code is available on Sonic Retro's GitHub.
This post has been edited by MainMemory: 05 October 2017 - 04:51 PM

#2 User is offline LoneDevil 

Posted 01 September 2017 - 01:58 PM

  • Posts: 120
  • Joined: 09-December 13
  • Gender:Male
  • Project:[TOP SECRET]
I've been waiting for this one, very flexible and works like a charm.

#3 User is offline Qjimbo 

Posted 01 September 2017 - 03:31 PM

  • Your friendly neighbourhood lemming.
  • Posts: 4411
  • Joined: 17-February 03
  • Gender:Male
  • Location:Vancouver
  • Wiki edits:69
Neato. I see a lot of potential use of this by talented modders, and perhaps more possibilities for the program in future (scripting etc.). May be able to contribute to the loader if needed as I see it's in C#.

#4 User is online MainMemory 

Posted 01 September 2017 - 03:33 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3956
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
The manager is C#, the loader is C++.

#5 User is offline RibShark 

Posted 01 September 2017 - 04:20 PM

  • Posts: 66
  • Joined: 29-September 12
  • Gender:Male
Is the modloader under a licence of any kind? I want to adapt it to another (non-Sonic) game, but I can't see a licence file anywhere, so right now I can't (legally).

#6 User is offline null1024 

Posted 01 September 2017 - 04:37 PM

  • Posts: 160
  • Joined: 16-October 08
  • Gender:Male
  • Wiki edits:1
Oh, this is cool. Been playing around with it for a little bit doing little sprite edits and it's working like a charm.

#7 User is online MainMemory 

Posted 01 September 2017 - 04:47 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3956
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339

View PostRibShark, on 01 September 2017 - 04:20 PM, said:

Is the modloader under a licence of any kind? I want to adapt it to another (non-Sonic) game, but I can't see a licence file anywhere, so right now I can't (legally).

I hate software licenses. Even if I just want to say "yeah I don't care what you do with any of this", it has to be some kind of legally binding document that gets applied to every project that uses so much as one line of code from my project. None of the tools I write are released under any kind of license. Some of them probably can't be licensed because they use copyrighted code or assets.

#8 User is offline Dude 

Posted 01 September 2017 - 04:56 PM

  • Posts: 3130
  • Joined: 11-September 04
  • Gender:Male
  • Location:Southbridge, MA
  • Project:Random VR/AR trash
  • Wiki edits:43

View PostMainMemory, on 01 September 2017 - 04:47 PM, said:

View PostRibShark, on 01 September 2017 - 04:20 PM, said:

Is the modloader under a licence of any kind? I want to adapt it to another (non-Sonic) game, but I can't see a licence file anywhere, so right now I can't (legally).

I hate software licenses. Even if I just want to say "yeah I don't care what you do with any of this", it has to be some kind of legally binding document that gets applied to every project that uses so much as one line of code from my project. None of the tools I write are released under any kind of license. Some of them probably can't be licensed because they use copyrighted code or assets.


You should use the MIT license then, and state in your readmes that it only applies to the things you've made.

#9 User is offline CyberKitsune 

Posted 01 September 2017 - 04:57 PM

  • Never enough time.
  • Posts: 83
  • Joined: 29-May 09
  • Gender:Male
  • Project:aaaaaaaaa
  • Wiki edits:52

View PostMainMemory, on 01 September 2017 - 04:47 PM, said:

I hate software licenses. Even if I just want to say "yeah I don't care what you do with any of this", it has to be some kind of legally binding document that gets applied to every project that uses so much as one line of code from my project. None of the tools I write are released under any kind of license. Some of them probably can't be licensed because they use copyrighted code or assets.


https://tldrlegal.co...l-2.0)#fulltext
This post has been edited by CyberKitsune: 01 September 2017 - 04:58 PM

#10 User is offline winterhell 

Posted 02 September 2017 - 04:37 PM

  • Posts: 1103
  • Joined: 16-October 10
  • Gender:Male
You'd want to add "You agree not to sue me".

#11 User is offline Hydr0city 

Posted 02 September 2017 - 04:48 PM

  • Sonic the Fighters for EVO 2018
  • Posts: 31
  • Joined: 01-September 17
  • Gender:Male
Does this modloader look for the Mania EXE in the C: drive? I have Mania installed onto a external HDD, and every time I try to use this it just fails to load.

Posted Image

This is the error I get each time. Should I just reinstall the game onto my C: disk? Or is this a different error?

#12 User is online MainMemory 

Posted 02 September 2017 - 05:36 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3956
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
You should have the mod manager in the same folder as Mania. It shouldn't matter where that is, as long as everything's in the same place.

Also, when reporting errors, it helps greatly to copy the text that appears when you click "Details", just that error message by itself hardly tells me anything.
This post has been edited by MainMemory: 02 September 2017 - 05:36 PM

#13 User is offline Hydr0city 

Posted 02 September 2017 - 06:02 PM

  • Sonic the Fighters for EVO 2018
  • Posts: 31
  • Joined: 01-September 17
  • Gender:Male

View PostMainMemory, on 02 September 2017 - 05:36 PM, said:

You should have the mod manager in the same folder as Mania. It shouldn't matter where that is, as long as everything's in the same place.

Also, when reporting errors, it helps greatly to copy the text that appears when you click "Details", just that error message by itself hardly tells me anything.


My bad! Thank you for the heads up though.

#14 User is online MainMemory 

Posted 02 September 2017 - 10:52 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3956
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
New version of the mod loader, now it supports custom code by loading DLL files. To create a DLL, you'll need the files from the mod loader's include folder, and a C++ file that looks something like this:
#include "ManiaModLoader.h"

extern "C"
{
	__declspec(dllexport) void Init(const char *path)
	{
		// code to run on init goes here
	}

	__declspec(dllexport) ModInfo ManiaModInfo = { ModLoaderVer, GameVer };
}


You can also export lists of byte patches, jumps, calls, and pointers to be applied to the game, but I find it's generally simpler to just do that from Init.

I don't currently have an example mod, but the system is basically identical to SADX mods, so maybe look at those, idk.

Unfortunately, as Mania is very likely going to be updated in the future, the mod loader and all custom code mods will have to be rebuilt to account for the shifted addresses. I currently have a mechanism in place so the mod loader should detect if the game has been updated and refuse to do anything, and the GameVer setting will be able to detect mods built for other versions of the game as well, since I'll increment it every time I have to update the mod loader for a new version of the game.

#15 User is online MainMemory 

Posted 03 September 2017 - 07:45 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3956
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Now the mod loader supports cheat codes, OnFrame hooks for mods, and options to start Mania with the console enabled, or at a specific scene. Cheat codes use the same format as the other mod loaders, so you can look at the Codes.xml files from the others for examples, or this document that lists all the code types. It comes with a few basic codes to start with, I may add more in the future, and contributions are certainly welcome.

  • 7 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

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