JeviLib Debug
FOR DEVELOPMENT USE ONLY - A multifunction library for code modders, containing debugging, patching, preferences, and other utilities as well as tweening.
About this mod Author’s original text
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 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?
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.
Thanks
- 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.0.3 Hotfix
- Obsolete Disable.WhenCalledFrom; It didn't work and will now throw. It may be removed in a later version of JeviLib.
- Add Utilities.IsSteamVersion for use in combination with ILC
- Call the previously dormant Jevil.Patching.CMaps.FixUnload() during startup & change its behavior
- Prevents Custom Maps from unloading a map's bundle, taking the responsibility into the hands of JeviLib, which will unload the bundle after 90 frames.
- Makes the map bundle publicly accessible to any project referencing JeviLib, as it does not incur a dependency on CustomMaps, because all of this is done via reflection.
- Mods & maps (via Custom MonoBehaviours, or a LocalizedText containing "JEVILIB_PERSIST_BUNDLE") can have JeviLib not unload the map bundle after the 90 frames have elapsed by setting CMaps.dontUnload to true.
- This incurs no extra RAM usage, however reloading the map bundle (e.g. by selecting the map again in BoneMenu) will cause the loader to fail
- Avoid this by storing a reference to the bundle somewhere and calling AssetBundle.Unload in an OnDestroy, as the map scene is destroyed before the bundle is loaded again.
- Late-unloading the bundle also does not cause a lag spike, as far as my testing has shown.
- Actual use cases:
- Streaming AudioClips to avoid increasing loading times (set this in the clip's import settings)
- VideoClips can now no longer be unloaded immediately after Awake, so they will remain loaded for the map's duration, allowing videos for players with playOnAwake set to false to still function.
- ### 2.0.2 Hotfix
- Add multiple things used in Septic Survival
- WaitForEnd is wonky - it is recommended to not use.
- Add a new Utility & ActionExtension
- Fix bugs in Tweens
- And more!
- ### 2.0.1
- A
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: