You are viewing a potentially older version of this package. View all versions.
WeatherElectric-OneLastLibPt2-1.0.0 icon

OneLastLibPt2

Core mod for my mods to reduce code duplication.

Date uploaded 2 weeks ago
Version 1.0.0
Download link WeatherElectric-OneLastLibPt2-1.0.0.zip
Downloads 2615
Dependency string WeatherElectric-OneLastLibPt2-1.0.0

This mod requires the following mods to function

LavaGang-MelonLoader-0.7.1 icon
LavaGang-MelonLoader

The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono

Preferred version: 0.7.1
bonelib-BoneLib-3.1.3 icon
bonelib-BoneLib

A BONELAB mod for making life easier for other mod creators.

Preferred version: 3.1.3

README

One Last Lib Pt.2

Personal core mod.

Literally serves to just make me not have to have duplicate code in all my mods, as all of my mods use the same console, preferences, and userdata code.

This intended to be universal. While there is game-specific code, it prevents itself from running if it is not in the intended game environment via Helpers.CheckGame().

Why I Made This

Logging

In all my mods, there's an option to enable debug logging. Some logs will not show up in console unless debug mode is enabled.

To prevent having a ton of "Debug Mode" preferences in every mod, I tried to make them global. Each mod would first read if the global preference existed, then just use that, and if it didn't, it'd write it.

Instead, with this mod, all the mods create their own LoggerInstance that goes through this mod's singular "Debug Mode" preference. The mods still get to use their own MelonLogger instance so the log message comes from the right mod.

Preferences

Implemented as part of the LoggerInstance system, the global preference.

Also includes a string I can access that just gives the path to the pref file all my mods write to.

UserData

Much easier UserData management, when needed.

A mod creates its own UserData instance which will automatically create or read a folder from the mod's provided name, including some methods to load files/folders.

Game-Specific - BONELAB

BoneMenu

All my mods use one root BoneMenu category, so instead of all of them creating a menu of the same name, they just add on to this mod's menu.

Also has some extension methods that allow for easier preference button creation.

CHANGELOG

v1.0.0

  • Initial Release