SpritesheetAPI
BETA RELEASE. This mod lets you load animated portraits for cards from spritesheets.
Screenshots 3 screenshots
About this mod Author’s original text
An Inscryption mod that lets you easily add animated portraits to your cards with a spritesheet and a JSON file (or, alternatively, through C#).
This is a project done purely for fun. Please don't expect much out of it and please don't get mad if there are bugs.
This mod is currently in its beta stage. Please know there may be bugs. If you find any bugs, please contact me on Discord: kelly betty#7936
And here's an example of animated cards made with this mod (all art by me):
Below you'll find all the documentation for this mod, as well as a short blink animation tutorial.
Installation
This mod’s only dependencies are BepInEx and the InscryptionAPI mod.
There are two ways of installing this mod: with the help of a mod manager (like r2modman or the Mod Manager) or manually.
Installation (Mod Manager)
- Download and install r2modman or the Mod Manager.
- Install this mod and all of its dependencies with the help of the mod manager!
Installation (Manual)
- Download and install BepInEx.
- If you're downloading it from its Github page, follow this installation guide.
- If you're downloading "BepInExPack Inscryption", follow the manual installation guide page itself. This one comes with a preconfigured BepInEx.cfg file, so it's advised.
- Download and install the Inscryption API mod following its manual installation guide.
- Find the BepInEx > plugins folder.
- Place the contents of "SpritesheetAPI.zip" in a new folder within the plugins folder.
Overview
In order to use this mod, you're gonna need two things: A spritesheet, and a way to 'register' that spritesheet in-game.
A JSON file is the easiest way to do it, but C# is also an available option for those who prefer it.
I will go through each of those options in depth below this.
JSON
Your JSON file's name should end in _anim.json in order for this mod to find it. Yes, this is necessary.
And these are all the fields your JSON file should contain:
{
"CardName": "Kels_Example",
"Spritesheet": "Example_Spritesheet.png",
"FrameRate": 12,
"FrameCount": 4,
"HasPause": false,
"PauseTime": 1
}
The first four fields—CardName, Spritesheet, FrameRate and FrameCount—are required. The last two fields—HasPause and PauseTime—are optional.
I'll give a thorough explanation of each field later down this page.
C#
You can use C# to register a spritesheet directly from your mod's code, like this:
RegisterPortrait.Add(CardName: "Kels_Example", Spritesheet: "Example_Spritesheet.png", FrameRate: 12, FrameCount: 4, HasPause: false, PauseTime: 1f);
You should preferably do this inside of Awake().
The first four arguments—CardName, Spritesheet, FrameRate and FrameCount—are required, and the last two arguments—HasPause and PauseTime—are optional, and default to false and 0f, respectively.
Documentation
Card Name
The in-game name of the card your animated portrait will be attached to. Your mod's GUID should be included in the name.
A few important thing to note about cards:
- If your card uses an alt portrait for anything, this might break the animation.
- Cards with changing portraits, like the Mud Turtle, prooooobably have weird interactions with this mod. I have not tested this. I'm too burnt out to test every possibility.
- I have not tested how cards affected by this mod interact with the Mycologist. For this reason, it's heavily advised you set cards with animated portraits as 'one per deck' (like how the base game's talking cards are). I was going to test this, but I'm kinda burnt out and don't have the energy.
The Spritesheet
The most important part of this mod is the spritesheet.
Your spritesheet should follow a few rules:
- Each frame should be the size of a traditional Inscryption card portrait: 114 x 94 pixels.
- Your spritesheet should preferably be a.png with transparency.
- The spritesheet should not have any 'padding' between sprites: This will break how the mod reads them.
This mod doesn't s
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: