JaLib

v1.0.1·Updated 2022-10-26

List of utilities to help making mods in Rogue Genesia

About this mod Author’s original text

JaLib

A modding library to help making mods in Rogue Genesia

How to use it

Add JaLib as dependency

Add JaLib.dll as reference in your csproj file:

\BepInEx\plugins\JaLib\JaLib.dll" />

Add JaLib as a dependency in your BepInEx's Plugin class

using BepInEx;

using BepInEx.Unity.IL2CPP;

namespace MyMod

{

[BepInDependency("JaLib")]

[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]

public class Plugin: BasePlugin

{

//...

}

}

AssetsUtils

public static Texture2D LoadTextureFromFile(string texturePath)

public static Sprite LoadSpriteFromFile(string spritePath)

public static Sprite LoadSpriteFromFile(string spritePath, Vector2 pivot)

// not guaranteed to works

public static AudioClip LoadAudioClipFromFile(string audioClipPath, AudioType type)

// doesn't work due to an Unity error

public static AssetBundle LoadAssetBundleFromFile(string bundlePath)

CardUtils

public static void AddStatCard(CardTemplate cardTemplate)

public static void AddCustomCard(CardTemplate cardTemplate) where T: RogueGenesia.Data.SoulCard

public static void AddWeaponCard(CardTemplate cardTemplate) where T: RogueGenesia.Actors.Survival.Weapon

Constants

// contains all vanilla souls cards names

public static class SoulCardsNames

// conains all player projectiles Resources path

public static class WeaponProjectiles

Il2CppUtils

// return a new instance of T created on Il2Cpp side

public static T NewILOjectInstance() where T: Il2CppObjectBase

GameUtils

public static event OnStartNewGameHandler OnStartNewGameEvent;

public static event OnGameStartHandler OnGameStartEvent;

public static event OnGameEndHandler OnGameEndEvent;

public static event OnPlayerFinalDeathHandler OnPlayerFinalDeathEvent;

// usage

JaLib.GameUtils.OnStartNewGameHandler += () => {

// do things when a new game is started

};

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. 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.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. 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.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack_RogueGenesia

File & checksum

Filename
JaLib-1.0.1.zip
File size
18.2 KiB