Skip to content

IntoxicatedKid/LBoL-Entity-Sideloader

 
 

Repository files navigation

LBoL-Entity-Sideloader

Entity manager/loader for modding Lost Branch of Legend.
Made using Harmony and BepInEx.

Currently works with alpha, beta and main branches

Switching to beta branch

Installation

Use r2modman

or

Download LBoL-Entity-Sideloader.zip and extract it in BepInEx/plugins folder.

Detailed Installation guide

For mod creators

This modding framework attempts to streamline, simplify and standardize common game entity (Card, Enemy etc.) creation and loading.

The general idea is that the Sideloader provides abstract template types which should be extended and implemented concretely in your own plugin. Each abstract template method corresponds to one component of the game entity. For example, CardTemplate expects LoadCardImages to load CardImages, MakeConfig to define CardConfig. Additionally, entity logic type should be written and marked with EntityLogic attribute. In case of a card, entity logic will be extending a Card type and defining its behavior in the same manner as a vanilla card would. That is, overriding Actions adding custom triggers (reactors/handlers) and so on.

Sideloader has many convenience methods and types designed to reduce clutter and speed up development. Examples include ResourceLoader, CardImages.AutoLoad, GlobalLocalization. It also provides thorough error feedback to help define templates correctly and feature to reload mods while the game is running.

Modding guides

Essential tools
  1. Visual Studio 2022(or any other IDE ofc) with .NET development package.
  2. Sideloader mod template. Has tons of configuration preset.
  3. dnSpyEx. For reading game's code and understanding how to code entity behavior.
  4. scriptengine. For hot reload. My fork has a bug fix for LBoL.
  5. DebugMode. For quickly building decks and fighting enemies.
First card

tutorial and introduction to Sideloader

Hot reload
  1. In BepInEx/config/neo.lbol.frameworks.entitySideloader.cfg change DevMode = false to DevMode = true.
  2. Download and put scriptengine to plugins folder.
  3. Create BepInEx/scripts folder. This from where scriptengine will load the plugins. Sideloader mods which are being developed should go there. If Sideloader mod template is used it will copy dlls to scripts folder automatically after building.
  4. In-game, press F3 to reload the mods. If in-run level will need to be restarted for changes to take effects. By default, that will be done automatically. There might some odd issues with Collection.

Sometimes the game freezes and crashes at the moment of reloading plugins. This is probably related to pc resource usage.

Examples
Game Entity reference

Mini wiki detailing game entity and config specifics.

Roadmap

Suggestions, contributions, issues, bug reports/fixes and critique are all very welcome.

*Game Entity loading*
|-- Create Cards ☑️
  |-- Create custom Effects ☑️
    |-- Workflow/templates for working with Effect prefabs in Unity
  |-- Create custom Guns (attack vfx) ☑️ (technically possible but very inconvenient to design)
    |-- PieceConfig ☑️
    |-- BulletConfig ☑️
    |-- LaserConfig ☑️
    |-- whatever else..
|-- Create StatusEffects (Abilities) ☑️
|-- Create Exhibits ☑️
  |-- Display modded Exhibits in Collection
|-- Load custom SFX ☑️
  |-- SfxConfig ☑️
  |-- BgmConfig ☑️
|-- Create Enemies ☑️
  |-- Load custom spine models ☑️
    |-- UnitModelConfig ☑️
    |-- Spine asset packaging helper in Unity Editor
  |-- Create Enemy groups (Battles) ☑️
    |-- Add modded battles to stage encounter pools ☑️
|-- SpellCards ☑️
  |-- Custom starting decks (if possible) ☑️
    |-- Custom deck selection UI ☑️
|-- (New) Custom Stages ☑️
  |-- Stage pooling ☑️
|-- *Playable characters at this point?* ☑️
  |-- Inherent character mechanics ☑️ (it was here all along. Units can register reactors.)
|-- Create GapOption
|-- Load Yarn Spinner scripts [???](https://github.com/salyu9/YarnSpinner)
  |-- Create Adventures (Encounters)
    |-- Modded Adventure pooling system
|-- Create JadeBox challenges ☑️

*Sideloader features and maintenance*
|-- Better docs/tutorials/wikis..
|-- Support Localization ☑️
|-- Dynamic entity reload for development ☑️
|-- Overwrite or modify vanilla entities ☑️
  |-- Overwrite individual entity components selectively ☑️
    |-- Merge configs overwritten by different mods (maybe)
  |-- Make overwriting more convenient by introducing mass overwrite types ☑️
    |-- Programmatic template generation ☑️
|-- Error feedback and handling ☑️
  |-- Better error feedback and handling..
|-- Support loading from AssetBundles ☑️
|-- main/beta double branch support (maybe)
|-- Handle duplicate entity Ids
|-- Performance and profiling
  |-- async loading
  |-- Addressables
  |-- size reduction/compression
  |-- whatever else..
|-- Rewritting and refactoring Sideloader backend..

Yarn script problem

Old mod list

About

Entity manager/loader for modding Lost Branch of Legend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%