Add license and documentation
This commit is contained in:
parent
3236b81d61
commit
8580189282
2 changed files with 84 additions and 0 deletions
19
LICENSE
Normal file
19
LICENSE
Normal file
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2023-present Terry Hearst
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
65
README.md
Normal file
65
README.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
# Marble It Up! Ultra Console Unlocker
|
||||
|
||||
This is a mod of [Marble It Up! Ultra](https://marbleitup.com/) 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
|
||||
|
||||
1. Install the MIUU Mod Loader.
|
||||
2. Download the mod from the Releases page.
|
||||
3. Extract the zip into your `Mods` folder.
|
||||
4. 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` or `string`.
|
||||
* 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:
|
||||
|
||||
```c#
|
||||
[ConsoleCommand(description = "Prints a hello world message to the console")]
|
||||
public static string HelloWorld()
|
||||
{
|
||||
return "Hello World!";
|
||||
}
|
||||
```
|
||||
|
||||
A simple example command which takes parameters:
|
||||
|
||||
```c#
|
||||
[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.
|
||||
|
||||
1. Clone the git repository.
|
||||
2. Install the MIUU Mod Loader, so the Harmony dll is present.
|
||||
3. Edit `UserProperties.xml` to remove the `UserPropertiesNotSetUp` property and point `GameDir` 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`
|
||||
4. Open `ConsoleUnlocker.sln` in Visual Studio.
|
||||
5. Click Build -> Build Solution, and it will build directly into your MIUU Mods directory.
|
Loading…
Add table
Reference in a new issue