Blade & Sorcery
0 of 0

File information

Last updated

Original upload

Created by

Wully

Uploaded by

Wully616

Virus scan

Safe to use

Tags for this mod

About this mod

A modding toolkit providing modders with extra custom events, functions and features to make modding easier!

Requirements
Permissions and credits
Donations
BetterModsBeta!
A modding toolbox

Please Endorse and Vote if this mod helped you!





BetterMods is a collection of reusable functions, events and features to help modders create mods easily.

Full documentation of BetterMods is available here
Full source code of BetterMods is available here

This is a Beta, please give me feedback and report issues. Please suggest new events and other features that could be added
Please contribute to the code base!

For Log files with line numbers for debugging, it is recommended to download this mod Detailed Logs

Custom Helper functions and extensions
Various functions to help access data and common boolean checks to make making mods easier!
BetterHelpers
BetterExtensions

Custom Events
Lots of events, with more to be added to let you build custom functionality easily
BetterEvents

Enhanced Logging
A wrapper around Unity.DebugLog() which adds colours, styling to logs, custom console commands generated for each class using BetterLogger so log level can be changed at run time to help diagnose issues with mods.
A global Log level changer, so when enabled all classes log level is set temporarily

BetterLogger

Logging Console Commands


Log Colours and extra detail



Manifest Validation

    • Checks if a duplicate manifest is found - ie two manifest.json's with the same mod name in them - even in different folders
    • Checks if a mod folder's name does not match the mod name in the manifest.json - highlighting it will probably not work with vortex
      installs
    • Checks if the manifest.json game version does not match the current game version. I know U9 mods work with U9.2 and such, but its a helpful
      indicator




JSON Configured Dependency Checking

Add a dependencies.json file to your mod folder - beside the manifest.json.
Inside it, you list different mods which your mod requires. The mods name should match the manifest.json name for that mod, same with the version

[ {
"name": "!BetterMods", "version": "0.0.4" },
{
"name": "AnotherMod", "version": "1.0.0" },
{
"name": "YouReallyNeedThisMod", "version": "1.0.0" }
]

BetterDependencies will:

  • Check the manifests of the installed mods vs what is requested in dependencies.json
  • Check if the mod is installed and the correct version.
  • Warns if there is a version mismatch.
  • Logs an Error if the mod does not appear at all in the mod folder.


Dll Dependency Checking


For mods which contain a DLL, it will check if any referenced dlls are also loaded, It will warn if it could not find a required referenced dll - this can
produce some false positives as it only checks for dlls in B&S, not system ones.
This can help to diagnose if a user is missing a required mod, without needing to define a dependencies.json file.




Quick Start Notes:
  • Download BetterMods from Nexus here
  • Extract the !BetterMods folder to your Blade and Sorcery mod folder \Blade & Sorcery\BladeAndSorcery_Data\StreamingAssets\Mods
  • In your mod project, add a reference to !BetterMods.dll
  • Start making your mod!
  • When packaging your mod and putting it on nexus, make sure you add BetterMods as a dependency for your mod
Example Mod:
  • Wully's Choking mod is available on Nexus here.
  • You can view the source for it here