2.8 KiB
Marble It Up! Ultra Console Unlocker
This is a mod of Marble It Up! Ultra which allows you to access the in-game console, which is useful for logging exact scores, enabling quick resets, and using console command for other mods, among other things.
Installation
- Install the MIUU Mod Loader.
- Download the mod from the Releases page.
- Extract the zip into your
Mods
folder. - You should be able to use the console with
~
in-game!
Adding custom console commands to a mod
Adding custom commands to your own mod is pretty simple. In a class, define a method annotated with a ConsoleCommand
annotation, which can have the following parameters (all optional):
Name | Type | Description |
---|---|---|
name |
string |
The name of the command. You can leave it out and it will use the name of the method instead. |
description |
string |
The description of this command, which gets printed when running the help command. |
paramsDescription |
string |
A small description of what parameters the command takes, usually inside square brackets. |
hidden |
bool |
Set to true to make this command not appear in the help command. |
The method has a few requirements:
- It should be a
public static
method. - It should either return
void
orstring
.- If it returns a string, that string will be printed to the console.
- The method should take either zero or one arguments, with the one argument being of type
params string[]
containing the parameters typed by the user.
If a method meets all the requirements and is annotated, it should automatically become a usable console command in-game.
Example commands
A simple example command with no parameters:
[ConsoleCommand(description = "Prints a hello world message to the console")]
public static string HelloWorld()
{
return "Hello World!";
}
A simple example command which takes parameters:
[ConsoleCommand(description = "Concatenates and prints two arguments together", paramsDescription = "[string1, string2]")]
public static string ConcatStrings(params string[] args)
{
if (args.Length != 2)
return "Must provide two arguments!";
return args[0] + args[1];
}
Build
If you just want to use the mod, refer to the Installation section above. These instructions are if you want to compile the mod itself.
- Clone the git repository.
- Install the MIUU Mod Loader, so the Harmony dll is present.
- Edit
UserProperties.xml
to remove theUserPropertiesNotSetUp
property and pointGameDir
to your MIUU installation directory.- Optional but recommended: To prevent this file from showing as changed in git, run the git command
git update-index --skip-worktree UserProperties.xml
- Optional but recommended: To prevent this file from showing as changed in git, run the git command
- Open
ConsoleUnlocker.sln
in Visual Studio. - Click Build -> Build Solution, and it will build directly into your MIUU Mods directory.