SpritesheetAPI
BETA RELEASE. This mod lets you load animated portraits for cards from spritesheets.
截圖 共 3 張
模組介紹 作者原文
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
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: