We are hard at work on a new system to better support mods to the game, due for release in an upcoming Alpha. Mods will be stored in the users savefolder/mods/, and users will be able to activate and deactivate mods from an in-game window. You will be able to run multiple mods simultaneously, eg a translation to German, a new sprite bank and a new Grants mod could all be run at once with this new system.
There are a few steps to follow to prepare existing mods for our new system. Broadly speaking we have kept things the same - you simply override the files in /data/ that you want to mod, but you should now include a manifest.txt and a thumbnail image to go with your mod. Here are some instructions on how to make your mod compatible with the new official Prison Architect modding system.
- All mods are held in the /mods/ subfolder within the PA save data folder
- Each mod has its own subdirectory, with the folder layout shown:
mods
├───YourMod/
│ │ manifest.txt
│ │ thumbnail.png
│ ├───data
│ │ ...
- These mod folders need to contain a data folder and a manifest.txt file, as well as an optional thumbnail.png.
- The thumbnail is shown in the mods menu when the mod is selected
- The data folder mirrors the structure of the main.dat's data directory, allowing you to override any game files with your own
- The manifest.txt file contains a list of items which describe the mod to the system in the following format:
Code: Select all
Name "Mod Name"
Author "Mod Author"
Description "Mod Description"
Version "v1.0"
Date "DD/MM/YYYY"
URL "http://www.yourwebsite/my-pa-mod/"
Language translations
- The core language file is now located at /data/language/base-language.txt, and can be overridden by your mod
- Language is loaded "additively", meaning the base language is loaded first, then any language files from the mods are loaded in order, overriding strings as they are found. So translations to other languages are easy - include each string translation in your own base-language.txt file.
- If you are providing new strings for your mod, eg for a new Grants mod, you only need to include your new strings in your base-language.txt. Ie you no longer need to duplicate the rest of the strings file. Your new strings will be loaded alongside the base english language.
New grants mods
The grants.lua file is also loaded additively. This means that different grants mods can work together. Within your grants.lua file, you now no longer need to include our base grants, only your own. Each grants mod is loaded (in order), and then the CreateGrants() function is called. Each grants mod can also provide their own base-language.txt file with only the phrases that they require (as the language files are also loaded additively). This means you don't have to copy our grants and strings into your mod.