Step 5: Open the mod loader, hit the Install Loader button near the bottom, check mark the mod that should be there and hit save and play.
Step 4: Next download the mod you want and extract the file into the mods folder, make sure its just the first file when you open the zip and not any files inside of it. Step 3: Take the contents of the mod loader zip, opened with something like WinRAR If you don't have it already, simply download from the bottom of the page and run it and put all of its contents into the Sonic Mania folder Step 2: Download the mod loader from here it usually is in C:\Program Files (x86)\Steam\steamapps\common\Sonic Mania. Right-Clicking on properties and going to local files, from there hit browse. Step 1: Figure out where your sonic root folder is, you can do this by going to the game on steam. Special thanks to all of them.I know it was already posted but if you needed a bit more help and links here you go Without them, this would not be possible. The community of Retro Engine Modding Server is an amazing source of talents and knowledge, while the modders & developers thesupersonic16 and Rubberduckycooly gave me the initial bootstrap and all the framework that helped me to understand how Sonic Mania works internally. Special thanksĪnd special is not due a formality. To run your mod and attach a debugger, just run it pressing F5 from Visual Studio. Ensure to do that from Mania Mod Manager at least for the first time. When you will run the "play" button on Visual Studio, the mod will be installed but not enabled by default. Run your modĪn important step is to install Mania Mod Manager. In this way, you can run Sonic Mania with a deubgger attached and with your mod loaded. Under the section Debugging, place the following values:Ĭommand: $(SONICMANIA_PATH)\SonicMania.exe Command Arguments: stage=GHZ scene=1 console=true Working Directory: $(SONICMANIA_PATH) Right click on your project and go to properties. Replace it to 00 so you have 00 81 00 00 and save your changes. Timestamps: 0:00 Intro 0:28 Best Friends 1:36 Beat Change 2:13 Best Friend is Tails CHART IS NOT MADE BY M. The Sprites are from another similar mod following the style of the video that secret history tails came from. That 40 there is the flag that enables the ASLR. This mod showcases the scrapped Secret History Tails Song that is called Mania. If you open SonicMania.exe with an hex editor, at the offset 0x176 you should notice the byte sequence 40 81 00 00. This is bad when you do not want to lose the static address of variables and functions by keeping the base address the same at every execution.
Windows applications are often compiled with ASLR enable, that instructs Windows to re-locate the application memory locations in-memory. In the Sonic Mania game's folder create a new file called steam_appid.txt and paste in it the text 584400. We do not want to allow that as it would prevent to keep the debugger attached when launching the game. Disallow to reboot through Steamīy default when you open the game executable of a game it will be closed and re-executed through Steam internal launcher. Remember that the executable name needs to be SonicMania.exe as if you rename it as SonicMania_unpack.exe, for instance, Steam will force to load the original file name anyway. Download Steamless, select the SonicMania.exe from your Steam copy and press Unpack file. Strip the DRM from the game's executable, allowing to attach a debugger.
Also be sure to add the environment variable SONICMANIA_PATH with the value of your Sonic Mania game directory.
A git submodule update -init would do the trick.
Please be sure to clone the submodules when cloning this repository. The expectations by following this guide is to configure a development environment that will allow you to write the game scripts and test them with just a single click, allowing real-time debugging and breakpoint placement in the code. This will lead to crashes when opening a ring box.
It will showcase how to load and play an animation, how to load and play a sound effect, set a collision box manually, show the object in the debug object placement and make it act like an enemy.įor a showcase purpose, rather than acting like a completely new entity this will replace the ring object with the custom Bloominator. Shows the basics on how to create a custom object. It is a good place to start as you can use it as a playground or as a base to create your new mod. This contains the very minimal information required. This barebone mod is empty and it does not do anything. This is especially focused on scripting functionality, allowing to override the game's logic by creating or expanding existing game objects. This repository aims to give a bootstrap to advanced modding techniques with Sonic Mania, using the power of Mania Mod Loader and the revolutionary ManiaAPI.