filename.spritebank - originalfoo/Prison-Architect-API GitHub Wiki

##Overview

A .spritebank file is an old way (and still the primary way used by the core game) of defining sprites and markers.

There are several .spritebank files found within main.dat/data/:

##Modding

Modding of .spritebank files (and the images they relate to) is deeply problematic.

First, you have to copy the entire .spritebank file from main.dat/data in to your mod, and keeping it's existing contents either make tweaks or small additions as required by your mod. If a game update changes the .spritebank file, you've got to repeat the process and release a new version of your mod.

Second, because the file will replace it's main.dat counterpart, only one mod in a game will be able to change the file (because it will overwrite changes made by any other mod loaded before it). The chances of multiple mods wanting to update the same .spritebank file are actually very high - especially for interface.spritebank and objects.spritebank. The same exact issues applies to the images associated with the spritebank - only one mod will be able to update them.

Wherever possible, you should avoid modding the .spritebank files. If you're defining or changing sprites for Objects or Equipment then it's much better to put the sprites in sprites.png and use the alternate [Sprite setting](Sprite (sprites.png)) in materials.txt to specify which sprites (and markers, if applicable) are used.

##File Format

###Sprites

###Markers

Most .spritebank files do not use markers, so you'll just see something like this at the bottom of the file:

BEGIN Markers    Size 0  END

At the time of writing, only the objects.spritebank defines actual markers, so we've put the remainder of documentation on that linked page.

##See Also

⚠️ **GitHub.com Fallback** ⚠️