
Texture Replacer
A planned to be full fledged texture replacing system for Inscryption, currently it has a full fledged deathcard system replacement module.Details
Texture Replacer
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.
What does this mod do?;
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.
Deathcards Module
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.
Loaders
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.
- Loads
RESERVED-NORIGHTfound inTextureReplacer/Deathcards/{Chosen System}, and parses its contents forSubpath = ApplyNoRight = Inverse Applyand|-> ApplyNoRight = Inverse Apply, with this it parses out theSubpathname, and associates it with twobools, one that says "hey do we apply aRESERVED-NoRight.pngfor this path?" the other asks "Should this be applied in reverse where we switch the black in the givenNoRightto cut a hole rather than paste a filling?" Oh yeah and with the|->it utilizes thesubpathfrom the previously appliedsubpathproperties. - Scans the path tree of
TextureReplacer/Deathcards/{Chosen System}to get thesubpathsand within thosesubpathsit defines a List ofList<Image<Rgba32>>for eachbase set, if it spots aEmissivefolder within it does the same however its added as aemissive set, technically aemissive setis by default added for eachsubpath, however if there is noEmissivefolder it will be empty, which we handle dont worry. - Loads
RESERVED-Presets.csvfound inTextureReplacer/Deathcards/{Chosen System}, and parses it into 3 components, one a List ofNames, two aConditions Objectthat will be associated with thename, and three aPreset Objectthat will be associated with thename. - Loads
RESERVED-Saves.csvif it exists inTextureReplacer/Deathcards/{Chosen System}, and does pretty much the same as step 3, however rather than aPreset Objectits aSavedImages Object.
Deathcard Portrait Handlers
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.
Portrait Randomization
Runs when theres not a save and the names not found in Presets.
- Choses randomized peices from each
Setthat was loaded inHandleTrees, tries to choose a associated emission if that fails it continues without causing errors. - Compiles the randomized peices into a
EmissionandPortrait - Calls and Passes the
EmissionandPortraitinto the LostEye handler, and overwrites the previousEmissionandPortraitwith the output of the handler. - Sets the Deathcard
headto thePortrait, and the Deathcardeyes_emissiveto theEmission. - Kills the base games Deathcards
base. - Enacts a save of the Deathcards
modsto thePortraitandEmissioninbase64form
Presets
Runs when theres not a save and the names found as described in step 1.
- Checks if the
Deathcard nameis found inPresetNames. - Checks if the
Deathcard Modificationsmatches thePresets Conditionsexactly. - Loads the
Preset PortraitandPreset Emissionif step 2 evaluates to true. - Enacts a save of the association.
Saves
Runs when theres a save as described in step 1.
- Checks if the
Deathcard nameis found inSaveNames. - Checks if the
Deathcard Modificationsmatches thePresets Conditionsexactly. - Loads the
Preset PortraitandPreset Emissionif step 2 evaluates to true. - Enacts a save of the association.
Lost Eye Handler
This is a seperateish handler that essentially handles how LostEye should be applied.
- Looks at the Loaded values for LostEye.
- Compiles a paste of each
LostEyehandling found for thePortraitandEmissionin the following ways:- If Apply = True
- Inverse = False and Emission = False
- Applies a Paste of the
RESERVED-NoRight.pngto thePortrait.
- Applies a Paste of the
- Inverse = True and Emission = False
- Applies a Inverse of
Portrait's Alpha - Applies a Paste of the
RESERVED-NoRight.pngto thePortrait - Applies a Inverse of
Portrait's Alpha
- Applies a Inverse of
- Inverse = True and Emission = True
- Applies a Inverse of
Portrait'sR,G,Bfollowed byA. - Applies a Paste of the
RESERVED-NoRight.pngto thePortrait - Applies a Inverse of
Portrait'sAfollowed byR,G,B.
- Applies a Inverse of
- Inverse = False and Emission = True
- Applies a Paste of the
RESERVED-NoRight.pngto thePortrait
- Applies a Paste of the
- Inverse = False and Emission = False
- If Apply = False
- Skip
- If Apply = True
- Repeat Step 2 for every
SubPathin theLostEye Subpaths, andLostEye EmissiveSubPaths
Basic Setup;
Simply 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.
How To Use Modders;
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.
Packaging
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.
What May I Do or Not Do with a Setup?
- What May You Do?
- You may, create a new folder within each module to contain your contents based upon the default packages within the modules.
- What Can I Not Do?
- Overwrite a package that uses this mods files, or the base mods files, why you may ask are we not allowed this? Well thats because the Mod Managers can't handle it, plus once overwritten it can't be rewritten without the origin being updated which will than rewrite your stuff. So if you want to add things to a setup, that are miniscule try asking the mod creator, or change it locally without putting it up on thunderstore, and if you really need to upload it to thunderstore than make your own system, and if a systems creator gives permissions use theirs as a base for yours, just make sure you give them credit when you upload.
- Anything Else?
- If its not listed here ask me (@thincreator3483), or whoever is maintaining this mod if you can or cant do X with the package, if its asked enough we will ammend this section.
Structuring
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).
- Create a
BepInEx/configfolder within your package setup. - In that setup add
TextureReplacer/(INSERT MODULE), andcreator.inscryption.TextureReplacerInscryption.cfg<- Make sure this is set to your system under the specified module section. - Within
(INSERT MODULE)drag and drop or better yet copy and paste your system to that folder. - Delete
RESERVED-Saves.csvif 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. - To test if the package works, zip the contents of your package and try to
Import Local Modfor 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.
Deathcards Module
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.
- Create a new folder in
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. - Set
creator.inscryption.TextureReplacerInscryption.cfgunder Deathcards Portrait system to that created folders name. - Within that folder just so we have it out of the way create the following items
RESERVED-Presets; a folder,RESERVED-NoRight; a file, andRESERVED-Presets.csv, NoRight must be filled out, see theBase-Gamefor an example of how.
Randomization
So this is likely the main part you want to know how to setup. Let's go over it in some detail.
- All subpaths not affixed with
RESERVED-will be deemed as a set component, it is loaded essentially alphabetically. - If you want to counteract the Alphabetic system its advised to use something like
1.,2.as soon as you pass 10 for example you'd instead of1.would do01.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. - All
PNGFiles not affixed withRESERVED-will be deemed as a set piece, it is loaded essentially alphabetically. - If you add
Emissive; a subfolder into thesubpathyou 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. - If the
subpathoremissiveis meant to be affected byNoRight/LostEyeadd a png in the subfolder entitledRESERVED-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?
- Add a subpath called anything you want keep the ordering in mind.
- In that folder add your peices they must be
PNGfiles and must be114x94in size - If the subpath should affect emissions add
Emissiveas 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.
Presets
Now let's go over the presets setup and some notes.
- I'm not 100% on this but if
Presetshave the samename(likely exactly) it will break becausedictionarysmay not contain 2 of the samekey, so beware of that when setting up yourpresets, dont believe theres case sensitivity either so may be a update in the future for handling the rare case of duplicates. - The
CSV Header rowis needed, maybe not required but if it bugs bring it back in. AttackthroughLost Eyeare the conditions to check when determining if a preset should be applied note if you need these extended you'll need to wait for aextension modto be made to have compat withAPIdeathcard stuff.- The last two properties should be the
PNGnames for thepresetsfound inRESERVED-Presets. - Presets must be
114x94images, and there should be a normal and emission for each.
Now how do I set these up?
-
Open
RESERVED-Presets.csvin 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 PNGfile that matches with the given preset found withinRESERVED-Presets.preset_emission The preset that will be applied for the emission portrait. A PNGfile that matches with the given preset found withinRESERVED-Presets.Nullable fields are; abilities[], statIcon, specialAbilities[] which can all be set to
nullto be nullified in loading. -
Repeat step 3 for each preset you want to add
-
Add the Preset images into
RESERVED-Presetsfor each entry inRESERVED-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)
Lost Eye
Now lets get into RESERVED-NORIGHT, theres not really any notes with this one as its pretty straight forward in nature.
- Open the
RESERVED-NORIGHTfile. - Add the reference to the top of the file;
/-------------------------------------------------------------------------\ | | | FOLDER NAME = LOST EYE = INVERSELY APPLY(?) | | |-> = Subpath | \-------------------------------------------------------------------------/ - Hit enter twice after pasting
- For each
subpathwrite the followingPath Name = {Whether Lost Eye is Applicable to the set} = {INVERSE}for example1-Heads = False = False - If the path has a
Emissivefolder do|-> {Whether Lost Eye is Applicable to the set} = {INVERSE}, adjacent to|-> True = True
And 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.
Installation;
Installing with a Mod Manager
- Download and install Thunderstore Mod Manager, Gale or r2modman.
- Click the Install with Mod Manager button on the top of BepInEx's page.
- Run the game via the mod manager.
If you have issues with Mod Managers head to one of these discords;
Installing Manually
- Install BepInEx by pressing 'Manual Download' and extract the contents into a folder. Do not extract into the game folder!
- Move the contents of the 'BepInExPack_Inscryption' folder into the game folder (where the game executable is).
- Run the game. If everything was done correctly, you will see the BepInEx console appear on your desktop. Close the game after it finishes loading.
Installing on the Steam Deck
- Download r2modman on the Steam Deck’s Desktop Mode and open it from its download using its
AppImagefile. - Download the mods you plan on using and their dependencies..
- Go to the setting of the profile you are using for the mods and click
Browse Profile Folder. - Copy the BepInEx folder, then go to Steam and open Inscryption's Properties menu
- Go to
Installed FilesclickBrowseto open the folder containing Inscryption's local files; paste the BepInEx folder there. - Enter Gaming Mode and check 'Force the use of a specific Steam Play compatibility tool' in the Properties menu under
Compatibility. - Go to the launch parameters and enter
WINEDLLOVERRIDES=“winhttp.dll=n,b” %command%. - Open Inscryption. If everything was done correctly, you should see a console appear on your screen.
Mac & Linux
- Follow the steps here first: https://docs.bepinex.dev/articles/user_guide/installation/index.html
- Your game should be setup for inscryption modding now
If you have any issues with Mac/Linux, Steam Deck, or Manual head over to the discord for this game:
- Inscryption Modding Discord: Here
Credits;
- Professor Eggnog: The comission that started this, the 9th deathcard base they made originally for the Deathcard Generator I made for Leshy IRL's wedding, and some idea fodder, and now the mod icon as well!!! its cute af X3c
- 157 (Special API): A ton of code help in terms of patching and Unity help.
- Lily Sylvie: Some of the base code I referenced, none of it is in this project, but they did help with ideas on how to go about our logic for the deathcard portrait replacements.
- Dark Dragoon: The Image Handlers for Unity used within this mod.
- Creator: The almost entire code base of the mod itself.
License;
SaxbyMod's License (Branched off of the MIT License)
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.