

This package is fully open source, meaning anyone that wishes to contribute may, as long as my license is applied to all forks of this project, additionally rights for contributors code still applies, e.g. if code in this mod did not come from me, YOU MUST ASK THE CODE'S AUTHOR FOR USAGE OF THAT SECTION OF CODE. If you wish to contribute or find bugs please send them to the Github found here: https://github.com/Chaosyr/TextureReplacerInscryption, Also if this package ever at any point needs updating DM @thincreator3483 on discord.
A ton for surprising little it shows within the game, allow us to break this into sections of explanation, it should help with understanding exactly what this does.
This can be toggled on and off via config property Deathcards Module in the Modules section, if toggled off none of this module will occur, if on all of it will occur based on circumstances.
These all load on Launch, and when configs related to the Module changes, Any references to Objects or parsers can be looked at in the code, or when you use the mod in C# for whatever reason, likely not ideal to but code comments are there if you do.
RESERVED-NORIGHT found in TextureReplacer/Deathcards/{Chosen System}, and parses its contents for Subpath = ApplyNoRight = Inverse Apply and |-> ApplyNoRight = Inverse Apply, with this it parses out the Subpath name, and associates it with two bools, one that says "hey do we apply a RESERVED-NoRight.png for this path?" the other asks "Should this be applied in reverse where we switch the black in the given NoRight to cut a hole rather than paste a filling?" Oh yeah and with the |-> it utilizes the subpath from the previously applied subpath properties.TextureReplacer/Deathcards/{Chosen System} to get the subpaths and within those subpaths it defines a List of List<Image<Rgba32>> for each base set, if it spots a Emissive folder within it does the same however its added as a emissive set, technically a emissive set is by default added for each subpath, however if there is no Emissive folder it will be empty, which we handle dont worry.RESERVED-Presets.csv found in TextureReplacer/Deathcards/{Chosen System}, and parses it into 3 components, one a List of Names, two a Conditions Object that will be associated with the name, and three a Preset Object that will be associated with the name.RESERVED-Saves.csv if it exists in TextureReplacer/Deathcards/{Chosen System}, and does pretty much the same as step 3, however rather than a Preset Object its a SavedImages Object.There are 3 Portrait Handling systems that we utilize to give the most cutomization possibilities to modders, there is a Portrait Randomizer which randomizes portraits for every deathcard not yet in Saves, and not found in the Presets, there is a Preset Handler which checks if Conditions between the deathcard and the presets conditions match and if they do completely we than apply the specified Preset, and lastly there is a Save Handler which does the same as the Preset Handler however, rather than applying a specified Preset it applies the saved randomized portrait or preset from a saved base64 string, this last one is done to optimize the handling so theres not visible lag every time you look at a deathcard.
Runs when theres not a save and the names not found in Presets.
Set that was loaded in HandleTrees, tries to choose a associated emission if that fails it continues without causing errors.Emission and PortraitEmission and Portrait into the LostEye handler, and overwrites the previous Emission and Portrait with the output of the handler.head to the Portrait, and the Deathcard eyes_emissive to the Emission.base.mods to the Portrait and Emission in base64 formRuns when theres not a save and the names found as described in step 1.
Deathcard name is found in PresetNames.Deathcard Modifications matches the Presets Conditions exactly.Preset Portrait and Preset Emission if step 2 evaluates to true.Runs when theres a save as described in step 1.
Deathcard name is found in SaveNames.Deathcard Modifications matches the Presets Conditions exactly.Preset Portrait and Preset Emission if step 2 evaluates to true.This is a seperateish handler that essentially handles how LostEye should be applied.
LostEye handling found for the Portrait and Emission in the following ways:
RESERVED-NoRight.png to the Portrait.Portrait's AlphaRESERVED-NoRight.png to the PortraitPortrait's AlphaPortrait's R, G, B followed by A.RESERVED-NoRight.png to the PortraitPortrait's A followed by R, G, B.RESERVED-NoRight.png to the PortraitSubPath in the LostEye Subpaths, and LostEye EmissiveSubPathsSimply place the DLL in the Plugins folder, and what BepInEx/config contains into BepInEx/config. MAKE SURE YOU HAVE ALSO INSTALLED ALL DEPENDENCIES OF THIS MOD.
This is going to be a beefy section just like the above section was [e.g. what the mod does], so bare with me as we explain how to make a mod using the Texture Replacer.
I wanted to start here first because this is the EXTREMELY IMPORTANT part to making a Texture Replacer mod. As a sort of what you can and can't do and how to bundle this into a thunderstore package.
So you may be asking "How do I include my setup within a Thunderstore Package?" well for that its pretty simple. The following steps should help if you need further support reach out to me (@thincreator3483).
BepInEx/config folder within your package setup.TextureReplacer/(INSERT MODULE), and creator.inscryption.TextureReplacerInscryption.cfg <- Make sure this is set to your system under the specified module section.(INSERT MODULE) drag and drop or better yet copy and paste your system to that folder.RESERVED-Saves.csv if applicable to the module unless its relavent to your setup for whatever reason just if it is ensure to mention that if you reset the act, these will be overwrote.Import Local Mod for the package in a new profile, if it worked, the setup should be identical to your testing setup without the base texture replacer module stuff.Alright so you want to make a deathcards system now do ya? Well lets dig into how to set these up, it shouldn't be all too complicated. First lets lay some ground works.
TextureReplacer/Deathcards, it can be called anything as long as its not a pre-existing folder, try and make it something unique so we can reduce chance of a override.creator.inscryption.TextureReplacerInscryption.cfg under Deathcards Portrait system to that created folders name.RESERVED-Presets; a folder, RESERVED-NoRight; a file, and RESERVED-Presets.csv, NoRight must be filled out, see the Base-Game for an example of how.So this is likely the main part you want to know how to setup. Let's go over it in some detail.
RESERVED- will be deemed as a set component, it is loaded essentially alphabetically.1., 2. as soon as you pass 10 for example you'd instead of 1. would do 01. so that order is preserved, I'd reccomend guesstimating how many subpaths there will be prior to setting up so your folder names will be in the right order off the bat.PNG Files not affixed with RESERVED- will be deemed as a set piece, it is loaded essentially alphabetically.Emissive; a subfolder into the subpath you can garuntee the peice will have a matching emission, HOWEVER, if this is the case the emissions and peices need to be in the same order to prevent mismatching see point 2 for a example of how to do such.subpath or emissive is meant to be affected by NoRight/LostEye add a png in the subfolder entitled RESERVED-NoRight.png, it should be a full black square but it should be plausible for it to be something else just note with how current inverse application works color will be lost after LostEye takes affect because inverting a image full transparent kills the color. [if we ever find a way to counteract this point will be updated].Alright so now how would I setup a basic system for randomization?
PNG files and must be 114x94 in sizeEmissive as a folder, and essentially copy the prior peices from the subpath folder into the emission and turn those images into how the emission should look, of course you dont have to do it that way, this is just how I'd do it, the main point is ORDER MUST BE THE EXACT SAME.Now if you need further assistence with this DM me (@thincreator3483) and lets proceed to the next section.
Now let's go over the presets setup and some notes.
Presets have the same name (likely exactly) it will break because dictionarys may not contain 2 of the same key, so beware of that when setting up your presets, dont believe theres case sensitivity either so may be a update in the future for handling the rare case of duplicates.CSV Header row is needed, maybe not required but if it bugs bring it back in.Attack through Lost Eye are the conditions to check when determining if a preset should be applied note if you need these extended you'll need to wait for a extension mod to be made to have compat with API deathcard stuff.PNG names for the presets found in RESERVED-Presets.114x94 images, and there should be a normal and emission for each.Now how do I set these up?
Open RESERVED-Presets.csv in a text editor, I usually use Visual Studio Code as it gives a rich text editor experience, but you can use anything.
Past the following line into line 1 of the file;
name,attack,health,abilities[],blood,bones,statIcon,specialAbilities[],lostEye,preset,preset_emission
Go to the next line, and than your essentially going to fill out the fields, commas are what seperates fields, and no names and properties may not contain commas or the CSV handling breaks.
| Property | What it does? | What is it If Applicable |
|---|---|---|
| name | This is the name in which we check against for whether its a preset and to see if it matches. | |
| attack | This is the attack stat which we check against for whether the card mods has the same attack value. | |
| health | This is the health stat which we check against for whether the card mods has the same health value. | |
| abilities[] | This is a list of abilities formatted adjacent to [Sharp;SplitStrike;1027] which we check against the mods abilities list. Note an extension may be made to handle sigils added by the API better than just a number. | |
| blood | This is the blood cost which we check against for whether the card mods has the same blood cost value. | |
| bones | This is the bone cost which we check against for whether the card mods has the same bone cost value. | |
| statIcon | This is the stat icon which we check against for whether the card mods has the same stat icon value. | |
| specialAbilities[] | This is setup petty much the same as abilities just instead its special abilities, and again a extension may be made to handle it better. | |
| lostEye | This is the bool that we check against for whether the card mods has the same bool value for lost eye. | A check for whether or not the deathcard was made after use of the dagger in the same fight. |
| preset | The preset that will be applied for the portrait. | A PNG file that matches with the given preset found within RESERVED-Presets. |
| preset_emission | The preset that will be applied for the emission portrait. | A PNG file that matches with the given preset found within RESERVED-Presets. |
Nullable fields are; abilities[], statIcon, specialAbilities[] which can all be set to null to be nullified in loading.
Repeat step 3 for each preset you want to add
Add the Preset images into RESERVED-Presets for each entry in RESERVED-Presets.csv.
Sorry if this ones not the most high quality, exhaustions set in from 4 straight days of coding. This and the next will likely be revised. If you need assistence reach out to me (@thincreator3483)
Now lets get into RESERVED-NORIGHT, theres not really any notes with this one as its pretty straight forward in nature.
RESERVED-NORIGHT file./-------------------------------------------------------------------------\
| |
| FOLDER NAME = LOST EYE = INVERSELY APPLY(?) |
| |-> = Subpath |
\-------------------------------------------------------------------------/
subpath write the following Path Name = {Whether Lost Eye is Applicable to the set} = {INVERSE} for example 1-Heads = False = FalseEmissive folder do |-> {Whether Lost Eye is Applicable to the set} = {INVERSE}, adjacent to |-> True = TrueAnd thats pretty much it with Lost Eye its really simple, well also if not done already make sure theres a RESERVED-NoRight.png in each subpath you set handling to true for.
If you have issues with Mod Managers head to one of these discords;
AppImage file.Browse Profile Folder.Installed Files click Browse to open the folder containing Inscryption's local files; paste the BepInEx folder there.Compatibility.WINEDLLOVERRIDES=“winhttp.dll=n,b” %command%.If you have any issues with Mac/Linux, Steam Deck, or Manual head over to the discord for this game:
Copyright 2025 SaxbyMod
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Additionally, any software that is published, or derived from this project must credit the author(s) of this project. If this is to be published code may not match in a 1:1, there must be some alteration.
Alterations not allowed would be for example changing of comments, stripping of comments, adding of comments, changing variable names, changing variable types, or adding or removing variables that make no change to the code.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.