A Friday Night Funkin' mod to enable a custom menu at the start of the game alongside other mods. This menu will allow the user to switch between different mods and their own custom menus, to allow for custom mod content to be enabled/disabled, or grouped together.
This mod by itself, does nothing other than create a fancy menu. It requires other mods to interface with it to function properly.
Setting up
Download the latest version of MenuCore, here.
Then extract the folder into your mods/ directory.
You are now ready to start using menu core
Using Menu Core
Inside of your mod (not MenuCore), create a new Module:
package kade.hex; import kade.hex.states.HexMainMenu; import funkin.modding.module.Module; import funkin.modding.module.ModuleHandler; import flixel.FlxState; class HMenuCore extends Module { var addedVersion:Bool = false; var modName = "VS Hex"; var modDescription = "V.S Hex v3"; var modAssetKey = "mc_hex"; var modState = null; public function new() { // Priority is set to 3 here. super("HMenuCore", 3); } public function addVersion() { var mcHandle = ModuleHandler.getModule("MC_Data"); if (mcHandle == null) { trace("MenuCore: MC_Data not found!"); return; } if (mcHandle.versions.indexOf(modName) != -1) { // Already added return; } modState = new HexMainMenu(); mcHandle.addVersion(modName, modAssetKey, modDescription, modState); } public override function onStateChangeBegin(event:StateChangeScriptEvent):Void { super.onStateChangeBegin(event); addVersion(); } public override function onCreate(event):Void { super.onCreate(event); addVersion(); } }
You will create a module like so, name it whatever. Make sure it's priority is after 2! After that, copy the three other non-constructor functions and change the top properties to what you'd like!
var modName = "VS Hex"; var modDescription = "V.S Hex v3"; var modAssetKey = "mc_hex";
Then at the bottom (in the addVersion method) you'll see
modState = new HexMainMenu();
This will be what state will be created by MenuCore (and where the user will be sent too). To find out more about how to create states like this, please check out the Scripted States article.