Slime Modding Utilities
A utility mod that provides common functionality for modders.
About this mod Author’s original text
Slime Modding Utilities (SMU)
A utility mod for Nickelodeon All Star Brawl. This mod does nothing on its own, but has a bunch of nifty features that modders can make use of.
SMU.Events
Contains handy extension methods for safely firing off events, without the worry of an exception stopping the chain.
public static void InvokeAll(this Action action, params object args)
SMU.Constants
Contains methods to translate character and stage IDs into their human-readable names, and vice versa.
public static bool TryGetIdFromName(string name, out string id);
public static string GetIdFromName(string name);
public static bool TryGetNameFromId(string id, out string name);
public static string GetNameFromId(string id);
public static List GetCharacterIds();
public static List GetStageIds();
SMU.Reflection
Contains handy extension methods to help get and set private fields and properties, invoke private methods, and copy Unity components.
public static U GetField(this T obj, string fieldName);
public static U GetProperty(this T obj, string propertyName);
public static void SetField(this T obj, string fieldName, U value);
public static void SetProperty(this T obj, string propertyName, U value);
public static T InvokeMethod(this object obj, string methodName, params object args);
public static Component CopyComponent(this Component original, Type overridingType,
GameObject destination, Type originalTypeOverride = null);
SMU.Utilities
Contains extra utility classes with miscellaneous functionality
- ImageHelper
- Utility class for loading external images from various locations; creates Texture2D and Sprite objects
public static Texture2D LoadTextureRaw(byte bytes);
public static Texture2D LoadTextureFromFile(string path);
public static Texture2D LoadTextureFromResources(string resourcePath);
public static Sprite LoadSpriteRaw(byte image, float pixelsPerUnit = 100.0f);
public static Sprite LoadSpriteFromTexture(Texture2D texture, float pixelsPerUnit = 100.0f);
public static Sprite LoadSpriteFromFile(string path, float pixelsPerUnit = 100.0f);
public static Sprite LoadSpriteFromResources(string resourcePath, float pixelsPerUnit = 100.0f);
- SharedCoroutineStarter
- Provides a way to start coroutines from any class, without having to derive from MonoBehaviour
public static new Coroutine StartCoroutine(IEnumerator routine);
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: