extraes-JeviLibBL_Debug icon

JeviLibBL Debug

A multifunction library for code modders, containing patching, preferences, tweening, easy barcodes, async support, stats, and other utilities.

Last updated a year ago
Total downloads 1808
Total rating 2 
Categories Code Mods
Dependency string extraes-JeviLibBL_Debug-2.2.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

gnonme-BoneLib-2.2.0 icon
gnonme-BoneLib

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

Preferred version: 2.2.0

README

JeviLib Debug

A multifunction library for code modders, containing serialization utilities and tweening.

What's the difference between "Debug" and "Normal"?

This version was built with the DEBUG compiler flag. This means that there are extra checks and log points. This means slightly decreased performance, but you will be warned when you attempt to perform invalid operations.

You should not rely on the increased checks for your code. This version should not be the version you depend on. You should depend on the normal version of JeviLib.

What does it do?

JeviLib v2.0.0 and above requires a game restart before mods using them will work. (This is due to the fact that it modifies MelonLoader generated files to enable modders to use UniTasks and Coroutines)

This library holds a bunch of utilities I found necessary to create whilst I created BW Chaos, and that continues to remain useful on other projects. In these utilities are my Prefs system, numerous extension methods, and my serialization utilities (byte array lossless joiner and separator, Vector3 byte converter).

JeviLib also includes many extra utilities I created because I can see others having a use for them, organized by namespace.

  • Jevil: Contains countless utilities and extension methods I created during development of Chaos, maps, and other parts of JeviLib.
  • Jevil.Prefs: Described above, a way to quickly and easily create MelonPreferences and BoneMenu entries.
  • Jevil.Tweening: An extensible tweener that modders can use to smoothly transition the state of values from a starting value to another, with multiple tweeners built in.
  • Jevil.IMGUI: Contains utilities for drawing quick debug things to IMGUI. Use via DebugDraw class's methods.
  • Jevil.Patching: Easily hook/replace/disable methods using Actions and Funcs (And disable methods using namespace, type name, and method names).
  • Jevil.Waiting: Replacements for WaitUntil and WaitDuring, as well as a WaitForSceneInit awaitable. As well as CallDelayed to invoke things at a later time.

Be specific: what else does the JeviLib contain?

  • Asset management: The BundledAsset class makes it easy to reference assets contained in AssetBundles, with support for async asset loading to avoid halting the main thread
  • Various other utilities: The Utilities class has a lot of reflection and serialization utilities, so you can quickly serialize objects and save them to a file or send them over the network.
  • Asynchronous coding: The AsyncUtilities and AsyncExtensions classes let you run all your code without halting the game, and minimizing lag.
  • Compiler services: The compiler is more useful than you know! JeviLib defines the [CallerArgumentExpression] attribute, letting you see what expression led to the value of parameter, see the MSDN docs for more info

Thanks

  • Adamdev: making BoneMenu
  • WNP78: Making FieldInjector & telling me about (and helping me with) System.Linq.Expressions, used extensively in Jevil.Patching.
  • Adi: Carrying the code modding category while I waste a bunch of time fucking with Unity for Septic Survival and other things. Also bringing a seafaring misnomer to my attention.
  • Simpleflips: Shoutouts to simpleflips. Its a meme you dip.

Changelog

  • 2.2.1

    • Rebuilt fix process. This is necessary for release build.
    • Added normal ways to create a OneOf.
  • 2.2.0

    • Added Jevil.Stats namespace for use with the ModStats API. (You need a ModStats category first. If you want to know more/use it yourself, contact me for details)
    • Added optional subcategory support to Method Prefs (see summary for the [Pref] constructors)
    • Added support for custom interpolators to tweens. See TweenTweenExtensions.UseCustomInterpolator for more info.
    • Probably some other stuff I can't discern because I forgot to commit after releasing 2.1.1, but general preparation for SSBL.
  • 2.1.1

    • Fixed fixer process waiting
    • Made prefSubCategory not apply to method preferences & added override for RegisterUnder
  • 2.1.0

    • Added AsyncExtensions, AsyncUtilities, and BundledAsset.
    • Defined CallerArgumentExpressionAttribute.
    • Refactored a lot of internal Prefs stuff - you can now call Prefs.RegisterUnder.
    • Removed off-main-thread patching. It was pointless anyway lol.
    • Made fork process fix the ToString and GetHashCode methods on UnityEngine IL2CPP types.
    • Optimized Extensions.ToBytes(Vector3) to decrease GC alloc using "unsafe" code that is effectively a paste of BitConverter.GetBytes (tested working using SceneSaver)
  • 2.0.0

    • Make mod development easier!
    • UniTasks and Coroutines now work how they should (UniTasks are now awaitable, you still must set your return type to Task though)
    • Added utility methods to check if the coroutine/unitask fixes have already been applied and restart the game to apply them if not.
    • Brought the debug build back after testing and fixing Tweening and Barcodes (mostly)
    • Fixed scene initialization error(s)
    • Added Hook.OntoComponentInit
    • Improved documentation for Redirect and Hook
  • 1.1.0

    • Add more functionality to Preferences, for Nichrome (which I need to fix a part of before releasing) and likely for Chaos, eventually.
    • Fixed Const.RigManagerName (oops! theres a reason i said you probably shouldn't use it)
  • 1.0.0

    • Initial BONELAB port