Modding guide
Modding is when you change a gameplay element, such as:
- Grants
- Pictures (e.g prisoner clothing, objects, terrain)
- Save games
Contents
- 1 Code
- 2 Modifying your save game
- 3 Modifying the Game Files
- 4 Data Folder
- 5 Lua Scripting
Code
Example Code
function CreateGrants() CreateBootstrapGrants(); CreateFirstCellBlockGrant(); CreateHealthGrant(); CreateBookWormsInmatesGrant(); CreateHigherSecurity(); CreateFamilyMatters(); CreateMetalDetectors(); CreateExercice(); CreateWaterLand(); CreateVisitation(); CreateLaundromat(); CreateWorkshop(); CreateModInstall(); --Input new grants here CreateSmallPrison(); CreateMediumPrison(); end function CreateBootstrapGrants() -- Basic Detention Centre Objective.CreateGrant ( "Grant_bootstraps", 40000, 0 ) Objective.CreateGrant ( "Grant_bootstraps_holdingcell", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireRoom ( "HoldingCell", true ) Objective.CreateGrant ( "Grant_bootstraps_shower", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireRoom ( "Shower", true ) Objective.CreateGrant ( "Grant_bootstraps_yard", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireRoom ( "Yard", true ) Objective.CreateGrant ( "Grant_bootstraps_kitchen", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireRoom ( "Kitchen", true ) Objective.CreateGrant ( "Grant_bootstraps_canteen", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireRoom ( "Canteen", true ) Objective.CreateGrant ( "Grant_bootstraps_guard", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireObjects ( "Guard", 2 ) Objective.CreateGrant ( "Grant_bootstraps_chef", 0, 0 ) Objective.SetParent ( "Grant_bootstraps" ) Objective.RequireObjects ( "Cook", 2 ) -- Basic Administrative set up Objective.CreateGrant ( "Grant_Administration", 10000, 0 ) Objective.CreateGrant ( "Grant_Administration_offices", 0, 0 ) Objective.SetParent ( "Grant_Administration" ) Objective.RequireRoomsAvailable ( "Office", 2 ) Objective.CreateGrant ( "Grant_Administration_Warden", 0, 0 ) Objective.SetParent ( "Grant_Administration" ) Objective.RequireObjects ( "Warden", 1 ) Objective.CreateGrant ( "Grant_Administration_Accountant_Research", 0, 0 ) Objective.SetParent ( "Grant_Administration" ) Objective.RequireResearched ( "Finance" ) Objective.CreateGrant ( "Grant_Administration_Accountant", 0, 0 ) Objective.SetParent ( "Grant_Administration" ) Objective.RequireObjects ( "Accountant", 1 ) end function CreateFirstCellBlockGrant() Objective.CreateGrant ( "Grant_FirstCellBlock", 20000, 10000 ) Objective.CreateGrant ( "Grant_FirstCellBlock_Cells", 0, 0 ) Objective.SetParent ( "Grant_FirstCellBlock" ) Objective.RequireRoomsAvailable ( "Cell", 15 ) end function CreateHealthGrant() Objective.CreateGrant ( "Grant_Health", 10000, 10000 ) Objective.CreateGrant ( "Grant_Health_Ward", 0, 0 ) Objective.SetParent ( "Grant_Health" ) Objective.RequireRoom ( "MedicalWard", true ) Objective.CreateGrant ( "Grant_Health_Doctors", 0, 0 ) Objective.RequireObjects ( "Doctor", 2 ) Objective.SetParent ( "Grant_Health" ) Objective.CreateGrant ( "Grant_Health_Psychologist", 0, 0 ) Objective.RequireObjects ( "Psychologist", 1 ) Objective.SetParent ( "Grant_Health" ) end --Added by Adico: function CreateBookWormsInmatesGrant() Objective.CreateGrant ( "Grant_Book_Worms_Inmates", 2000, 1000 ) Objective.CreateGrant ( "Grant_Book_Worms_Inmates_Commonroom", 0, 700 ) Objective.SetParent ( "Grant_Book_Worms_Inmates" ) Objective.RequireRoom ( "CommonRoom", true ) Objective.CreateGrant ( "Grant_Book_Worms_Inmates_Books", 0, 0 ) Objective.RequireObjects ( "Bookshelf", 3 ) Objective.SetParent ( "Grant_Book_Worms_Inmates" ) Objective.CreateGrant ( "Grant_Book_Worms_Inmates_Chairs", 0, 0 ) Objective.RequireObjects ( "Chair", 2 ) Objective.SetParent ( "Grant_Book_Worms_Inmates" ) end function CreateHigherSecurity() Objective.CreateGrant ( "Grant_Higher_Security", 25000, 5000 ) Objective.CreateGrant ( "Grant_Higher_Secutiry_1", 0, 500 ) Objective.SetParent ( "Grant_Higher_Security" ) Objective.RequireResearched ( "Security" ) Objective.CreateGrant ( "Grant_Higher_Secutiry_2", 0, 500 ) Objective.SetParent ( "Grant_Higher_Security" ) Objective.RequireResearched ( "Deployment" ) Objective.CreateGrant ( "Grant_Higher_Secutiry_3", 0, 500 ) Objective.SetParent ( "Grant_Higher_Security" ) Objective.RequireResearched ( "Cctv" ) Objective.CreateGrant ( "Grant_Higher_Security_Room", 0, 1000 ) Objective.SetParent ( "Grant_Higher_Security" ) Objective.RequireRoom ( "Security", true ) Objective.CreateGrant ( "Grant_Higher_Security_Guards", 0, 500 ) Objective.RequireObjects ( "Guard", 10 ) Objective.SetParent ( "Grant_Higher_Security" ) Objective.CreateGrant ( "Grant_Higher_Security_CCTV_monitors", 0, 100 ) Objective.RequireObjects ( "CctvMonitor", 1 ) Objective.SetParent ( "Grant_Higher_Security" ) Objective.CreateGrant ( "Grant_Higher_Security_CCTV", 0, 500 ) Objective.RequireObjects ( "Cctv", 3 ) Objective.SetParent ( "Grant_Higher_Security" ) end function CreateFamilyMatters() Objective.CreateGrant ( "Grant_Family_Matters", 10000, 0 ) Objective.CreateGrant ( "Grant_Family_Matters_Phones", 0, 0 ) Objective.RequireObjects ( "PhoneBooth", 5 ) Objective.SetParent ( "Grant_Family_Matters" ) end function CreateMetalDetectors() Objective.CreateGrant ( "Grant_Metal_Detectors", 20000, 5000 ) Objective.CreateGrant ( "Grant_Metal_Detectors_MT", 0, 1000 ) Objective.RequireObjects ( "MetalDetector", 6 ) Objective.SetParent ( "Grant_Metal_Detectors" ) end function CreateExercice() Objective.CreateGrant ( "Grant_Exercice", 500, 500 ) Objective.CreateGrant ( "Grant_Exercice_1", 0, 500 ) Objective.SetParent ( "Grant_Exercice" ) Objective.RequireResearched ( "Maintainance" ) Objective.CreateGrant ( "Grant_Exercice_2", 0, 500 ) Objective.SetParent ( "Grant_Exercice" ) Objective.RequireResearched ( "GroundsKeeping" ) Objective.CreateGrant ( "Grant_Exercice_Benchs", 0, 200 ) Objective.RequireObjects ( "WeightsBench", 4 ) Objective.SetParent ( "Grant_Exercice" ) end function CreateSmallPrison() Objective.CreateGrant ( "Grant_Small_Prison", 0, 20000 ) Objective.CreateGrant ( "Grant_Small_Prison_Inmates", 0, 0 ) Objective.RequireObjects ( "Prisoner", 20, "prisoner" ) Objective.SetParent ( "Grant_Small_Prison" ) end function CreateMediumPrison() Objective.CreateGrant ( "Grant_Medium_Prison", 0, 50000 ) Objective.CreateGrant ( "Grant_Medium_Prison_Inmates", 0, 0 ) Objective.RequireObjects ( "Prisoner", 50, "prisoner" ) Objective.SetParent ( "Grant_Medium_Prison" ) end --Added by LDshadowLord function CreateWaterLand() Objective.CreateGrant ( "Water_Land", 2500, 1500 ) Objective.CreateGrant ( "Water_land_pump", 0, 5000 ) Objective.RequireObjects ( "WaterPumpStation", 1) Objective.SetParent ( "Water_Land" ) Objective.CreateGrant ( "Water_land_drain", 0, 1000 ) Objective.RequireObjects ( "Drain", 2) Objective.SetParent ( "Water_Land" ) Objective.CreateGrant ( "Water_land_sh", 0, 500 ) Objective.RequireObjects ( "ShowerHead", 2) Objective.SetParent ( "Water_Land" ) Objective.CreateGrant ( "Water_land_room", 0, 500 ) Objective.SetParent ( "Water_Land" ) Objective.RequireRoom ( "Shower", true) end function CreateLaundromat() Objective.CreateGrant ( "Grant_Laundromat", 1000, 500 ) Objective.CreateGrant ( "Grant_Laundromat_1", 0, 1000 ) Objective.SetParent ( "Grant_Laundromat" ) Objective.RequireResearched ( "PrisonLabour" ) Objective.CreateGrant ( "Grant_Laundromat_Machines", 0, 1000 ) Objective.RequireObjects ( "LaundryMachine", 2 ) Objective.SetParent ( "Grant_Laundromat" ) Objective.CreateGrant ( "Grant_Laundromat_Baskets", 0, 500 ) Objective.RequireObjects ( "LaundryBasket", 2 ) Objective.SetParent ( "Grant_Laundromat" ) Objective.CreateGrant ( "Grant_Laundromat_Room", 0, 500 ) Objective.SetParent ( "Grant_Laundromat" ) Objective.RequireRoom ( "Laundry", true) end function CreateWorkshop() Objective.CreateGrant ( "Grant_Workshop", 1000, 500 ) Objective.CreateGrant ( "Grant_Workshop_1", 0, 1000 ) Objective.SetParent ( "Grant_Workshop" ) Objective.RequireResearched ( "PrisonLabour" ) Objective.CreateGrant ( "Grant_Workshop_Press", 0, 1000 ) Objective.RequireObjects ( "WorkshopPress", 2 ) Objective.SetParent ( "Grant_Workshop" ) Objective.CreateGrant ( "Grant_Workshop_Saw", 0, 500 ) Objective.RequireObjects ( "WorkshopSaw", 2 ) Objective.SetParent ( "Grant_Workshop" ) Objective.CreateGrant ( "Grant_Workshop_Room", 0, 500 ) Objective.SetParent ( "Grant_Workshop" ) Objective.RequireRoom ( "Workshop", true) end function CreateVisitation() Objective.CreateGrant ( "Grant_Visitation", 1000, 500 ) Objective.CreateGrant ( "Grant_Visitation_Table", 0, 500 ) Objective.RequireObjects ( "VisitorTable", 2 ) Objective.SetParent ( "Grant_Visitation" ) Objective.CreateGrant ( "Grant_Visitation_Room", 0, 500 ) Objective.SetParent ( "Grant_Visitation" ) Objective.RequireRoom ( "Visitation", true) end function CreateModInstall() Objective.CreateGrant ( "Grant_Mod_Installed", 500, 500 ) Objective.CreateGrant ( "Grant_Mod_Installed_1", 0, 0 ) Objective.RequireRoom ( "Deliveries", 1 ) Objective.SetParent ( "Grant_Mod_Installed" ) end
Modifying your save game
Step 1: Save Game location
For Windows Vista/7/8/10 Navigate to: C:\Users\YOUR_NAME\AppData\Local\Introversion\Prison Architect\saves
For Mac Navigate to: /Users/YourUserName/Library/Application Support/Prison Architect/saves
For Windows XP Navigate to: C:\Documents and Settings\YOUR_NAME\Local Settings\Application Data\Introversion\Prison Architect\saves
For Linux Navigate to: ~/.Prison Architect/saves
Step 2: Accessing the save
Look for a file with .prison at the end, With your prison name infront. e.g. MyPrison.prison. Right Click that file and open with notepad, or for mac Textedit or other text editors.
Step 3: Modifying the save
Money Cheat
- Once open, Press Ctrl + F, or for mac Command + F. Then type in the following: Finance. The following number should match your current money, change it to whatever you like and save the file.
Prisoner Cheat
- Once open, the top few lines of the file will say "TimeIndex xyz" and a little bit below it will say "Intake.next zyx", modify zyx so that it is 1 higher than xyz to have prisoners arrive instantly
- Below "Intake.next" is "Intake.numPrisoners", change that to whatever number you like
Once done, save the file and load up your save game.
Scripting Changes
- Scripting tools such as https://gist.github.com/bradbeattie/276db65f08730f296cb3 exist that will allow you to make more complicated procedural changes to your save files.
Modifying the Game Files
* That are in bold are notes are very important!
Getting the Game Files (Windows)
- Navigate to your installation directory e.g "C:\Program Files (x86)\Prison Architect\" (Steam users should navigate to "C:\Program Files (x86)\Steam\steamapps\common\Prison Architect")
- Open main.dat with an archive program such as 7-Zip or WinRAR.
- Extract it and rename it to "data", so the "grants.lua" file should be at "INSTALL_DIRECTORY\data\grants.lua"
Creating a Grant (Windows)
Open "grants.lua" with a text editor (I recommend Notepad++, but notepad is sufficient) and then make a new line anywhere between "function CreateGrants()" and "end"
type "CreateMyGrant();", it should now look like this:
function CreateGrants() CreateBootstrapGrants(); CreateFirstCellBlockGrant(); CreateHealthGrant(); CreateMyGrant(); end
Directly after CreateGrants "end" line, create a new line and type "function CreateMyGrant()", followed by a new line with "end", like this:
function CreateMyGrant() end
Inbetween those lines, press the TAB key once (its above capslock) and type "Objective.CreateGrant", followed by 3 more TAB's, and then "( "Grant_MyGrant", 1337, 42 )", like so:
function CreateMyGrant() Objective.CreateGrant ( "Grant_MyGrant", 1337, 42 ) end
"Grant_MyGrant" is the internal name of the grant, the actual name of the grant can be modified in the english.txt file, within the language folder, within the data folder, which we'll get to later
1337 is the amount of money you get from accepting the grant, 42 is the money you get once all grant requirements are complete (and doesn't include extra money from completing those requirements)
Now save the file and start up the game, go to the grants screen and you should see it there with its internal name "Grant_MyGrant", click it and you should get the money, if you don't go back and double-check it against my example.
Let's add a requirement, every requirement in a grant is a grant of its own, to make it a requirement we have to call "Objective.SetParent(Parent_Internal_Name_Here)" after creating it, like so:
function CreateMyGrant() Objective.CreateGrant ( "Grant_MyGrant", 1337, 42 ) Objective.CreateGrant ( "Grant_MyGrant_MyRequirement1", 0, 8001 ) Objective.SetParent ( "Grant_MyGrant" ) end
The number 8001 is the money you get when the grant, or in this case the requirement since we set its parent, is complete.
While it is now 'technically' a requirement, the requirement itself requires nothing, so let's change that.
scroll down this page and take a look at the Lua Scripting->Dump->Objective section and pick something meaningful from there (or just follow along), in this case I'll use "Objective.RequireRoom", you can take a look at the Rooms available to pick from in the Lua Scripting->Objects->Rooms section below, we'll do Solitary simply because it has no requirement itself (e.g be indoors) which is perfect for testing.
So after you set the parent, type in "Objective.RequireRoom ( "Solitary", true )", it should now look like this:
function CreateMyGrant() Objective.CreateGrant ( "Grant_MyGrant", 1337, 42 ) Objective.CreateGrant ( "Grant_MyGrant_MyRequirement1", 0, 8001 ) Objective.SetParent ( "Grant_MyGrant" ) Objective.RequireRoom ( "Solitary", true ) end
Congratulations, you just made a basic grant, you can keep adding requirements, change the names, how much money you earn, etc. to your hearts content, save the file and run the game to test it out, if it doesn't work go back and compare it to my examples.
Getting the Game Files (Mac)
- Navigate to library 'For Steam buyers"/Users/YourUsername/Library/Application Support/steam/steamapps/Common/Prison Architect/Prison Architect.app(to get inside it right click on it and click show package contents)/Contents/Resources"
- Extract the file main.dat with and archive program ,not Compress, such as WinRAR Mac, or 7-Zip mac
- Rename it to "data"
Creating a Grant (Mac)
Open the file grants.lua with textmate which is a free code editor for mac, or any other text editor like TextEdit, then make a new line anywhere between "function CreateGrants()"
type "CreateMyGrant();", it should now look like this:
function CreateGrants() CreateBootstrapGrants(); CreateFirstCellBlockGrant(); CreateHealthGrant(); CreateMyGrant(); end
Directly after CreateGrants "end" line, create a new line and type "function CreateMyGrant()", followed by a new line with "end", like this:
function CreateMyGrant() end
Inbetween those lines, press the TAB key once (its above capslock) and type "Objective.CreateGrant", followed by 3 more TAB's, and then "( "Grant_MyGrant", 1337, 42 )", like so:
function CreateMyGrant() Objective.CreateGrant ( "Grant_MyGrant", 1337, 42 ) end
"Grant_MyGrant" is the internal name of the grant, the actual name of the grant can be modified in the english.txt file, within the language folder, within the data folder, which we'll get to later
1337 is the amount of money you get from accepting the grant, 42 is the money you get once all grant requirements are complete (and doesn't include extra money from completing those requirements)
Now save the file and start up the game, go to the grants screen and you should see it there with its internal name "Grant_MyGrant", click it and you should get the money, if you don't go back and double-check it against my example.
Let's add a requirement, every requirement in a grant is a grant of its own, to make it a requirement we have to call "Objective.SetParent(Parent_Internal_Name_Here)" after creating it, like so:
function CreateMyGrant() Objective.CreateGrant ( "Grant_MyGrant", 1337, 42 ) Objective.CreateGrant ( "Grant_MyGrant_MyRequirement1", 0, 8001 ) Objective.SetParent ( "Grant_MyGrant" ) end
The number 8001 is the money you get when the grant, or in this case the requirement since we set its parent, is complete.
While it is now 'technically' a requirement, the requirement itself requires nothing, so let's change that.
scroll down this page and take a look at the Lua Scripting->Dump->Objective section and pick something meaningful from there (or just follow along), in this case I'll use "Objective.RequireRoom", you can take a look at the Rooms available to pick from in the Lua Scripting->Objects->Rooms section below, we'll do Solitary simply because it has no requirement itself (e.g be indoors) which is perfect for testing.
So after you set the parent, type in "Objective.RequireRoom ( "Solitary", true )", it should now look like this:
function CreateMyGrant() Objective.CreateGrant ( "Grant_MyGrant", 1337, 42 ) Objective.CreateGrant ( "Grant_MyGrant_MyRequirement1", 0, 8001 ) Objective.SetParent ( "Grant_MyGrant" ) Objective.RequireRoom ( "Solitary", true ) end
Congratulations, you just made a basic grant, you can keep adding requirements, change the names, how much money you earn, etc. to your hearts content, save the file and run the game to test it out, if it doesn't work go back and compare it to my examples.
Adding your Grant to the Language File
Now that you've made your grant its time to give it a proper name and description, not to mention an explanation for its requirements.
First open the language folder in the data folder, then open base-language.txt and press CTRL + F or for mac Command + F, search for "objective_grant_bootstraps", which is the internal name of the Detention Center grant, to the right of it is the grants actual name "Contract: Basic Detention Center", the line below this is the grants description which appears below the grants name in the grant screen.
the next 6 lines are the internal names of the grants that have "objective_grant_boostraps" as its parent, in other words they are the requirements, the text to the right of those requirements is the text that appears in your grant checklist on the left-side of the screen to tell you what you need.
So now let's add proper names and descriptions for our grant, I'll be using the internal names of my grant guide above, replace them with whatever you've done yourself if you aren't following it.
Directly below "objective_grant_bootstraps_chef Hire at least two chefs" type a new blank line and then
objective_grant_mygrant Custom Grant
which will be the grants name, on the next line we will place our description so type in
objective_grant_mygrant_description A custom grant designed to teach beginners
now the only thing left is the description for the requirements, I recommend you keep it short and to the point due to the fact it is displayed constantly, so go to the next line and type
objective_grant_mygrant_myrequirement1 Build 1 Solitary Room
so it should now look like this:
objective_grant_bootstraps Contract: Basic Detention Centre objective_grant_bootstraps_description Turn an empty field into a functioning prison. This government contract gives you the funds neccesary to build the absolute minimum facilities for your first set of Prisoners. objective_grant_bootstraps_cells Build enough cells for 8 prisoners objective_grant_bootstraps_shower Build a shower objective_grant_bootstraps_yard Build a yard objective_grant_bootstraps_kitchen Build a kitchen objective_grant_bootstraps_canteen Build a canteen objective_grant_bootstraps_guard Hire at least two guards objective_grant_bootstraps_chef Hire at least two chefs objective_grant_mygrant Custom Grant objective_grant_mygrant_description A custom grant designed to teach beginners objective_grant_mygrant_myrequirement1 Build 1 Solitary Room
and done! save the file, start the game and test it out, like always if it doesn't work go back and compare it to examples.
Data Folder
language
Within this folder you should include a .txt file named "base-language.txt".
This will allow for you to include the in-game text for names and tool-tips of objects, rooms, research, reform programs, materials, equipment and jobs. Before looking for or creating a translation mod, you can have a look at options > language to see if there's already an official translation available.
All Var use lower case letters
Var | Extentions | Example Var | Example Descriptive Text |
---|---|---|---|
material_MATERIALNAME | None | material_acid | Acid |
room_ROOMNAME | None | room_disco | Disco |
object_OBJECTNAME | None | object_car | Car |
Example | Example | Example | Example |
buildtoolbar_popup_EXTENTION_object/entity |
|
buildtoolbar_popup_obj_car | This car if not secure will be used as a get away vehicle |
Example | Example | Example | Example |
Example | Example | Example | Example |
Example | Example | Example | Example |
Example | Example | Example | Example |
Example | Example | Example | Example |
Example | Example | Example | Example |
VEG MOD Example
If we use "Gary's amazing Vegetable Patch Mod" as an example:
var | Objects Display Name |
---|---|
object_preparationtable | Preparation Table |
object_vegetableseeds | Vegetable Seeds |
object_rawpotato | Potato |
object_rawcabbage | Cabbage |
object_compost | Compost |
object_shed | Shed |
room_vegetablepatch | Vegetable Patch |
research_farming | Farming |
researchtooltip_farming | Allows you to place a vegetable patch in your prison and train your prisoners to grow vegetables that can contribute to your kitchens ingredients pool. |
reformprogram_horticulture | Horticulture |
material_farmland | Compost |
equipment_trowel | Trowel |
tooltip_seeds_compost | Seeds need to be planted in Compost before they will grow and produce vegetables. |
tooltip_seeds_needtending | This plant needs to be tended before it will grow more vegetables. |
job_custom_tendvegetables | Tend Vegetables |
Objects_Name is the name use to create each item within it valid .txt file i.e (object_rawpotato is templated in the material.txt file).
Objects Display Name is the name that will be displayed while playing Prison Architect.
scripts
jobs.txt
Here is where you will declare all the new Jobs.
VEG MOD Example
For example "Gary's amazing Vegetable Patch Mod" adds TendVegetables, to do this all we need to include is:
BEGIN Job Name TendVegetables JobTime 30 Tool Trowel Worker Prisoner Material Compost Qualification Horticulture END
Var | Description | Example |
---|---|---|
Name | Object name | TendVegetables |
JobTime | Time in game minutes to complete job | 30 |
Tool | The required tool to complete the job | Trowel |
Worker | Who can do this job |
|
Material | Example | Compost |
Qualification | Example | Horticulture |
This job can now be called in an objects script with Object.CreateJob("TendVegetables");
materials.txt
Here is where you will declare all your new Objects, Materials, Equipment and rooms.
VEG MOD Example
BEGIN Object Name RawPotato Width 1 Height 1 Toughness 1.0000 MaxStackSize 20 RenderDepth 1 Properties Material BEGIN Sprite x 0 y 0 w 2 h 2 RotateType 0 END BEGIN StackSprite x 4 y 10 w 2 h 2 RotateType 0 END END
Var | Description | Example |
---|---|---|
Name | Objects Name | Potatoes |
Width | x Tiles | A Bed is 1 tile wide |
Height | Y Tiles | A Bed is 2 tiles high |
Toughness | How much damage it can take | Float |
MaxStackSize | Amount it can be stacked in when stored | Int |
RenderDepth | The layer it is rendered (Prisoners are 2) | Int |
Properties | Used to express properties of the material | Example |
needs.txt
This is where you can state needs of the prisoners, E.x food, and what happens after a certain period of time.
Caution: There's no official information about how some variables act. Please keep in mind what is here is the result of trial and error.
ex.
BEGIN Need Name Food Priority 8 TimeToAction 960.000 TimeToFailure 1440.00 StartingActionPoints 33 RandomActionPoints 33 Chance 1.00000 Visibility Visible Properties AutoCharge Properties RaisesTemp END
- Name
- Type: string
- Name of Need.
- Priority
- Type: int
- Priority of need. Currently, 9 is max and 5 is min.
- FailureAction
- Type: enum (Nothing, Use, UsePhone, Consume, Sleep, Urinate, SoilSuit, Eat, Exercise, Complain, Do-Regime, Work, Visitation, GrabThrownContraband, ReformProgram, Withdrawal)
- Action that prisoner will do immediately when TimeToFailure passed.
- MisbehaviorType
- Type: enum (None, Misbehaving, Escaping, Destroying, Spoiling, Fighting, Rioting, HostageTaking)
- Action that needs do rises. (ex. Spoiling rises need of what he spoiled)
- TimeToAction
- Type: float (Unit: minutes)
- When prisoner individual "Needs Point"(%) reaches 100%. After this, prisoner's need level turns to High(Orange).
- TimeToFailure
- Type: float (Unit: minutes)
- Time when prisoner's need level turns to 'Critical'(Red) and certain bad will occur.
- StartingActionPoints
- RandomActionPoints
- Type: int (Both)
- Both variables use for calculation of 'Action Point'(%)
- When Prisoner's "Needs Point" reaches 'Action Point', the need level turns to 'Medium'(Yellow) from 'Satisfied'(Green), and he starts to seek something to satisfy the need.
- Prisoner's 'Action Point' is determined individually (and each needs) from "StartingActionPoints + n * RandomActionPoints (0<n<1)"
- Chance
- Type: float
- How often he will take chance to satisfy his need if possible. 0.70 means 70%(* 100), so he take chance in 70% of the probability. 1.00 means "always".
- GenerationRules
- Type: bitmask (Family, Narcotics, Intelligent)
- Only prisoner who has the characteristic which bitmask assigns will show this need.
- Properties
- Type: bitmask(AutoCharge, Involuntary, RaisesTemp)
- AutoCharge : This need continually rise no matter what happening around.
- Involuntary : This need will rise regardless of his mind.
- RaisesTemp : If this need wasn't satisfied, prisoner get angry and rise prison danger. Without this option, the need satisfy will give optional happy(like 'Literacy').
- Type: bitmask(AutoCharge, Involuntary, RaisesTemp)
- Visibility
- Type: enum(Hidden, Visible, AutoHide)
- Whether prisoner shows his this need with the icon in picture balloon or not.
events.txt
production.txt
This is where you will you add anything to do with moving or production in your mod.
VEG MOD Example 1, Production Rule
BEGIN ProductionRule Rule Storage Material RawPotato Container PreparationTable Distribution Random END
Now, let's break this down.
Var | Description | Example |
---|---|---|
Rule | What is happening to the material |
|
Material | The object you the production rule is about (In this case, what you are moving to storage) | Any in-game or mod item |
Container | What to store the material in | Any in-game or mod item |
Distribution | How to distribute the material |
|
VEG MOD Example 2, Processor
BEGIN Processor Processor PreparationTable Input RawPotato Output Ingredients OperatingTime 15.0 Properties ShowDuringOperation Object PreparationTable Worker Cook Worker Prisoner Qualification KitchenInduction END
Now, let's break this down.
Var | Description | Example |
---|---|---|
Processor | What the process is being done on | Any in-game or mod item |
Input | The object that you use to start the process | Any in-game or mod item |
Output | The object the input will turn into after the process is finished | Any in-game or mod item |
OperatingTime | How long it will take to do (Measured in in-game minutes) | 15.0 |
Properties | The "Options" on the processor for optimization | ShowDuringOperation (Only option) |
Object | The object that is being used as the processor | PreparationTable |
Worker | Who can perform this task |
|
Qualification | What program a prisoner will have to pass to do this process | Any in-game or mod programs |
reform_programs.txt
Here is where you will declare all the new reform_programs.
VEG MOD Example
For example "Gary's amazing Vegetable Patch Mod" adds Horticulture, to do this all we need to include is:
BEGIN Program Name Horticulture SessionCost -100 Places 10 SessionLength 120 NumSessions 2 Difficulty 10 Research PrisonLabour Room VegetablePatch Teacher Gardener Equipment None Intake Voluntary Properties Practical END
research.txt
This is where you will declare all your new research options for your mod.
VEG MOD Example
For example "Gary's amazing Vegetable Patch Mod" adds Farming, to do this all we need to include is:
BEGIN Research Name Farming Type Ability Requires PrisonLabour Admin Maintainance Cost -1500 Time 360 X 420 Y 620 END
Var | Description | Example |
---|---|---|
Name | Name of your object, not to be confused with the display name of your object | Farming |
Type | What type of object(s) this will be unlocking |
|
Requires | Needed Research |
|
Admin | Staff member required to research |
Limited to:
|
Cost | Funds spent to unlock | -1500 |
Time | Time taken to unlock in game-minutes | 360 |
X | X position on research board | 420 |
Y | Y position on research board | 620 |
sprites.png
This is where you will you add the textures for everything in your mod.
Every sprite (graphic) you wish to use in your mod is put into this single file. Files that create content i.e materials.txt, can declare the location of a sprite that it uses, an example is below.
VEG MOD Example
(This code is located in materials.txt and refers to sprites.png)
BEGIN Object Name RawPotato Width 1 Height 1 Toughness 1.0000 MaxStackSize 20 RenderDepth 1 Properties Material BEGIN Sprite x 0 y 0 w 2 h 2 RotateType 0 END END
Now, let's break this down.
This is the part that says where the sprite is.
BEGIN Sprite x 0 y 0 w 2 h 2 RotateType 0 END
Var | Description | Example |
---|---|---|
x | The x coordinate of the left side of your sprite* | 0 |
y | The y coordinate of the top of your sprite* | 0 |
w | The width of your sprite (1 unit = 32 pixels [So 2 would = 64 pixels across]) | 0 |
h | The height of your sprite (1 unit = 32 pixels [So 2 would = 64 pixels across]) | 0 |
RotateType | How the object can be rotated |
|
*NOTE: Like the width and height the x/y coordinates take jumps of 32 pixels.
E.g. If x = 1 in the code the sprite would be 32 pixels from the left. E.g. If y = 2 in the code the sprite would be 64 pixels down from the top.
List of all predefined sprites
There are 719 pre-defined sprites in the main game code. These can be used in the form "Sprite ShowerHead", in a similar fashion to the Name property, where ShowerHead is replaced with any of the following sprite: 'Accountant', 'Actor', 'Ak47', 'Alert', 'AlertElectrical', 'Ambulance', 'AnthonyClothes', 'AnthonyIRL', 'ArcadeCabinet', 'ArcadeCabinetToolbar', 'ArmedGuard', 'ArmedGuard2', 'ArmedGuard3', 'ArmedGuard4', 'AssaultRifle', 'Avatar', 'Axe', 'BagOfDrugs', 'Bathtub', 'BatteringRam', 'Bed', 'BedToolbar', 'BedsideCab1', 'BedsideCab2', 'Bench', 'BenchToolbar', 'Benedict', 'BenedictHenchman1', 'BenedictHenchman2', 'BenedictHenchman3', 'BenedictIRL', 'BigDesk', 'Bin', 'BodyBaby', 'Book', 'BooksSorted', 'BooksUnSorted', 'Bookshelf', 'BookshelfLarge', 'Boombox', 'Booze', 'Box', 'Brick', 'Bulldozer', 'BunkBed', 'BunkBedToolbar', 'BusStop', 'CameraMan', 'Candelabra', 'Capacitor', 'Car', 'CarpenterTable', 'CarpenterTableToolbar', 'CbRadio', 'Cctv', 'CctvMonitor', 'CctvMonitorToolbar', 'CctvMount', 'Ceo', 'Chef', 'Chef2', 'Chef3', 'Chef4', 'Chief', 'ChurchAltar', 'ChurchPew', 'ChurchPewToolbar', 'ChurchStatue', 'ChurchWindow', 'Cigs', 'CircuitBox', 'CleaningBrush', 'Clipboard', 'Concrete', 'Connection', 'ConstructionVehicle', 'Cooker', 'CookerToolbar', 'CopCar1', 'CopCar2', 'Cot', 'CrateLabel', 'Cup', 'Cupboard', 'Detective', 'DiningChair', 'DiningTable', 'Doctor', 'Doctor2', 'Doctor3', 'Doctor4', 'DogCrate', 'DogCrateToolbar', 'DogCrateTop', 'DogHandler', 'DogHandler2', 'DogHandler3', 'DogHandler4', 'DogLeash', 'DogPaw', 'Door', 'DoorControlSystem', 'DoorLockedOpen', 'DoorServo', 'DoorServo2', 'DoorServoToolbar', 'DoorTimer', 'DoubleBed', 'Drain', 'Drill', 'DrinkMachine', 'DrinkMachineToolbar', 'Dummy', 'Edward', 'EdwardCivilian', 'EdwardsEnemy', 'EdwardsWife', 'ElectricChair', 'ElectricalCable', 'ElectricalSwitch', 'ElectricalSwitchOff', 'EscapeIcon', 'FaceBaby', 'FaceDaughter', 'FaceDaughter2', 'FaceHusband', 'FaceHusband2', 'FaceHusband3', 'FaceMorganDaughter', 'FaceOldMan1', 'FaceOldMan2', 'FaceOldMan3', 'FaceOldMan4', 'FaceOldMan5', 'FaceOldWoman1', 'FaceOldWoman2', 'FaceOldWoman3', 'FaceSon', 'FaceSon2', 'FaceWife', 'FaceWife2', 'FaceWife3', 'FemaleBody', 'FemaleBody2', 'FemaleBody3', 'FemaleBody4', 'FemaleHead1', 'FemaleHead10', 'FemaleHead11', 'FemaleHead12', 'FemaleHead13', 'FemaleHead14', 'FemaleHead15', 'FemaleHead16', 'FemaleHead17', 'FemaleHead18', 'FemaleHead19', 'FemaleHead2', 'FemaleHead20', 'FemaleHead21', 'FemaleHead22', 'FemaleHead23', 'FemaleHead24', 'FemaleHead25', 'FemaleHead3', 'FemaleHead4', 'FemaleHead5', 'FemaleHead6', 'FemaleHead7', 'FemaleHead8', 'FemaleHead9', 'FemaleHeadLast', 'Fig100294', 'Fig101059', 'Fig101646', 'Fig101906', 'Fig102722', 'Fig102798', 'Fig103155', 'Fig104292', 'Fig105139', 'Fig106569', 'Fig107617', 'Fig108741', 'Fig112492', 'Fig112790', 'Fig113432', 'Fig115003', 'Fig118474', 'Fig119715', 'Fig125987', 'Fig126461', 'Fig127257', 'Fig127280', 'Fig133813', 'Fig135616', 'Fig139546', 'Fig148599', 'Fig149554', 'Fig154063', 'Fig165219', 'Fig179008', 'Fig198804', 'Fig2', 'Fig214446', 'Fig218681', 'Fig224027', 'Fig228859', 'Fig292397', 'Fig3', 'Fig370087', 'Fig4', 'Fig41711', 'Fig46854', 'Fig5', 'Fig50590', 'Fig50771', 'Fig55062', 'Fig56295', 'Fig60080', 'Fig60741', 'Fig60787', 'Fig61059', 'Fig61370', 'Fig62307', 'Fig65274', 'Fig66457', 'Fig68853', 'Fig72094', 'Fig72986', 'Fig74173', 'Fig75791', 'Fig76678', 'Fig80569', 'Fig81147', 'Fig81374', 'Fig81428', 'Fig81601', 'Fig81682', 'Fig82533', 'Fig83037', 'Fig83710', 'Fig83918', 'Fig83944', 'Fig85363', 'Fig86934', 'Fig88222', 'Fig88430', 'Fig89046', 'Fig89538', 'Fig89905', 'Fig90601', 'Fig91147', 'Fig92146', 'Fig94122', 'Fig98223', 'Fig98442', 'FilingCabinet', 'FilingCabinetToolbar', 'Fire', 'FireEngine', 'Fireman', 'Food1', 'Food2', 'Food3', 'Food4', 'FoodTrash1', 'FoodTrash2', 'FoodTrash3', 'FoodTrash4', 'FoodTray', 'FoodTrayDirty', 'Foreman', 'Fork', 'Fridge', 'FridgeLid', 'FridgeToolbar', 'GameBible', 'Garbage', 'Gardener', 'Gardener2', 'Gardener3', 'Gardener4', 'Girder', 'GlassWindow', 'GrassTurf', 'Gravestone', 'Guard', 'Guard2', 'Guard3', 'Guard4', 'GuardArmour', 'GuardArmour2', 'GuardArmour3', 'GuardArmour4', 'GuardArmour5', 'GuardDog', 'GuardDogDigging', 'GuardDogSitting', 'GuardDogSleeping', 'GuardLocker', 'GuardLockerToolbar', 'GuardTower', 'GuardUniform', 'Gun', 'GunRack', 'GunRackToolbar', 'Hammer', 'Hand', 'HandBaton', 'HandEmpty', 'HandKnife', 'Head1', 'Head10', 'Head11', 'Head12', 'Head13', 'Head14', 'Head15', 'Head16', 'Head17', 'Head18', 'Head19', 'Head2', 'Head20', 'Head21', 'Head22', 'Head23', 'Head24', 'Head25', 'Head26', 'Head27', 'Head28', 'Head29', 'Head3', 'Head30', 'Head31', 'Head32', 'Head33', 'Head34', 'Head35', 'Head36', 'Head37', 'Head38', 'Head39', 'Head4', 'Head40', 'Head5', 'Head6', 'Head7', 'Head8', 'Head9', 'HeadLast', 'Heller', 'Henchman', 'HenchmanKnifed', 'Hob', 'Hose', 'Hostage1', 'Hostage1Dead', 'Hostage2', 'Hostage2Dead', 'Hostage3', 'Hostage4', 'Hostage5', 'HouseDoor', 'Hurst', 'HurstEyesShut', 'Hydrant', 'Ingredient1', 'Ingredient2', 'Ingredient3', 'Ingredient4', 'InstalledCable', 'Iron', 'IroningBoard', 'IroningBoardToolbar', 'JailBars', 'JailDoor', 'JailDoorLarge', 'JailKey', 'Janitor', 'Janitor2', 'Janitor3', 'Janitor4', 'Keane', 'Kerry', 'KerryAlone', 'KitchenSink', 'KitchenSink2', 'KitchenSinkToolbar', 'Knife', 'LaundryBasket', 'LaundryMachine', 'LaundryMachineContents', 'LaundryMachineDoorClosed', 'LaundryMachineDoorOpen', 'LaundryMachineToolbar', 'Lawyer', 'LeatherChair', 'LibraryBooks1', 'LibraryBooks2', 'LibraryBooks3', 'LibraryBooksTop1', 'LibraryBooksTop2', 'LibraryBooksTop3', 'LibraryBookshelf', 'LibraryBookshelfToolbar', 'Light', 'LightOutdoor', 'Lighter', 'LivingRoomTable', 'LivingRoomTv', 'LogicBridge', 'Mac10', 'MailBox', 'MailOpened1', 'MailOpened2', 'MailOpened3', 'MailSatchel', 'MailSorted', 'MailUnopened1', 'MailUnopened2', 'MailUnopened3', 'MailUnsorted', '"Medical', 'MedicalBed', 'Medicine', 'MedicineCabinet', 'MedicineCabinetDoor', 'MedicineCabinetDrugs', 'Megaphone', 'MetalDetector', 'Microphone', 'Mirror', 'MobilePhone', 'MoneyBag', 'Mop', 'Morgan', 'MorganCivilian', 'MorganIRL', 'MorganNaked', 'MorgueSlab', 'MorgueSlabToolbar', 'Needle', 'Negotiator', 'NewsReporter', 'Nico', 'NicoHospital', 'NicoIRL', 'NicoNaked', 'NoEntry', 'Nothing', 'OakBookshelf', 'OakDesk', 'OfficeChair', 'OfficeDesk', 'OfficeDeskToolbar', 'PalermoDaughter1', 'PalermoDaughter2', 'Paramedic', 'ParoleBoardMember', 'ParoleBoardMember2', 'ParoleBoardMember3', 'ParoleBoardMember4', 'ParoleLawyer', 'ParoleLawyer2', 'ParoleLawyer3', 'ParoleLawyer4', 'PhoneBooth', 'PhoneMonitor', 'Photo', 'PianoWire', 'Pills', 'PipeLarge', 'PipeLargeCorner', 'PipeLargeCross', 'PipeLargeTJunction', 'PipeLargeTerminator', 'PipeSmall', 'PipeSmallCorner', 'PipeSmallCross', 'PipeSmallTJunction', 'PipeSmallTerminator', 'PipeValve', 'Plate', 'PlateBlank', 'PlayMat', 'Poison', 'PoolTable', 'PoolTableToolbar', 'PowerStation', 'PowerSwitch', 'PoweredIcon', 'PoweredOffIcon', 'PrayerMat', 'PressurePad', 'Priest', 'Priest2', 'Priest3', 'Priest4', 'Priest5', 'Priest6', 'Priest7', 'PrisonSign', 'PrisonUniformDirty', 'Prisoner', 'Prisoner2', 'Prisoner3', 'Prisoner4', 'PrisonerBus', 'PrisonerFemale', 'PrisonerFemale2', 'PrisonerFemale3', 'PrisonerFemale4', 'PrisonerNaked', 'PrisonerNaked2', 'PrisonerNaked3', 'PrisonerNaked4', 'PrisonerNakedFemale', 'PrisonerNakedFemale2', 'PrisonerNakedFemale3', 'PrisonerNakedFemale4', 'PrisonerUniform', 'Radio', 'Rake', 'RawWood', 'RemoteDoor', 'Rifle', 'RiotGuard', 'RiotShield', 'RiotVan', 'RoadGate', 'RoadGatePosts', 'RoadGateToolbar', 'Rubble1', 'Rubble2', 'Rubble3', 'Rubble4', 'Rubble5', 'Saw', 'SchoolDesk', 'SchoolDeskToolbar', 'Scissors', 'Screwdriver', 'SecurityGuard', 'SecurityVan', 'ServingTable', 'ServingTableLid', 'ServingTableToolbar', 'ShackleHands', 'Shackles', 'Shed', 'ShedToolbar', 'Sheers', 'SheetMetal', 'ShopFront', 'ShopFrontToolbar', 'ShopGoods1', 'ShopGoods2', 'ShopGoods3', 'ShopShelfGoods1', 'ShopShelfGoods2', 'ShopShelfGoods3', 'ShopShelfGoodsTop1', 'ShopShelfGoodsTop2', 'ShopShelfGoodsTop3', 'Shotgun', 'ShowerHead', 'ShowerHeadToolbar', 'Shrink', 'Sink', 'Sniper', 'Sniper2', 'Sniper3', 'Sniper4', 'Sofa', 'SofaChair', 'SofaDouble', 'SofaDoubleToolbar', 'SofaSingle', 'Soldier', 'Soldier2', 'Soldier3', 'Soldier4', 'SolitaryDoor', 'Sonny', 'SonnyIRL', 'SortingTable', 'SortingTableToolbar', 'Spade', 'Spatula', 'Spoon', 'Sprinkler', 'StabVest', 'StackBleach', 'StackBooksSorted', 'StackBooksUnsorted', 'StackBrick', 'StackCable', 'StackConcrete', 'StackFoodTrays', 'StackFoodTraysDirty', 'StackGirder', 'StackGrass', 'StackIngredients1', 'StackIngredients2', 'StackIngredients3', 'StackIngredients4', 'StackLogs', 'StackMailSorted', 'StackMailUnsorted', 'StackMeals1', 'StackMeals2', 'StackMeals3', 'StackMeals4', 'StackMealsCooked1', 'StackMealsCooked2', 'StackMealsCooked3', 'StackMealsCooked4', 'StackPipes', 'StackPlates', 'StackPlatesBlank', 'StackPrisonUniform', 'StackPrisonUniformDirty', 'StackSheetMetal', 'StackShopGoods1', 'StackShopGoods2', 'StackShopGoods3', 'StackTrees', 'StackWood', 'StaffDoor', 'StatusLight', 'Stick', 'StreetLight', 'SuperiorBed', 'SuperiorBedToolbar', 'SupplyTruck', 'Switch', 'Table', 'TableToolbar', 'TattooBody1', 'TattooBody2', 'TattooBody3', 'TattooBody4', 'TattooHead', 'TattooHead2', 'TattooHead3', 'Tazer', 'Teacher', 'Teacher2', 'Teacher3', 'Teacher4', 'TheDon', 'TheDonHurt', 'TheDonIRL', 'Toilet', 'ToiletNice', 'Tombstone', 'Torch', 'TrafficLight', 'Tree', 'Tree2', 'Tree3', 'Tree4', 'Tree5', 'Tree6', 'TreeInPot', 'TreeSapling', 'TreeStump', 'TreeStump2', 'TreeStump3', 'TreeStump4', 'TreeStump5', 'TreeStump6', 'TreeYoung', 'TreeYoung2', 'TreeYoung3', 'TreeYoung4', 'TreeYoung5', 'TreeYoung6', 'TroopTruck', 'Trowel', 'TruckDriver', 'Tux', 'TvLarge', 'TvSmall', 'VanityTable', 'VisitationSecure', 'VisitorTable', 'VisitorTableToolbar', 'Warden', 'WardenContraband', 'WardenFear', 'WardenLobbyist', 'WardenNorton', 'WardenTunnels', 'WaterIcon', 'WaterOffIcon', 'WaterStation', 'Wave', 'WeightsBar', 'WeightsBench', 'WeightsToolbar', 'Window', 'WindowLarge', 'Wood', 'WoodPickAxe', 'WoodenSpoon', 'Workman', 'Workman2', 'Workman3', 'Workman4', 'WorkshopPress', 'WorkshopPressDown', 'WorkshopPressToolbar', 'WorkshopSaw', 'WorkshopSawToolbar', 'eeg'.
Lua Scripting
Bureaucracy
Warden, Legal (5000), Legalprep (50000), Legaldefense (50000), Deathrow (10000), Reduceexecutionliability (10000), Permanentpunishments (5000), Smallcells (10000), Maintenance (500), Clone (1500), Groundskeeping (2000), Cleaning (2000), Prisonlabour (1000), Micromanagement (1000), Finance (500), Landexpansion (1000), Extragrant (500), Bankloan (500), Taxrelief (10000), Offshoretaxhaven (50000), Security (500), Surveillance (2000), Deployment (1000), Contraband (1000), Patrols (1000), Dogs (1000), Remoteaccess (2000), Prison Policy (1000), Psychology (500), Health (500), Education (2000)
Object
Rooms
None, Cell, HoldingCell, Canteen, Kitchen, Shower, Yard, Storage, Deliveries, Garbage, Execution, Workshop, Security, Office, MedicalWard, Morgue, CommonRoom, Laundry, CleaningCupboard, Visitation, Solitary, Armoury, Staffroom, Library, Chapel, Intake (Reception), ParoleRoom.
People
Workman, Policeman, SwatOfficer, Citizen, Doctor, Paramedic, Cook, Gardener, Guard, Janitor, Fireman, Avatar, Actor, Visitor, Mayor, Chief, Foreman, Psychologist, Accountant, Lawyer, Soldier.
Furniture
Bed, Toilet, Table, Chair, Bench, Bin, Sink, ServingTable, ShowerHead, Bookshelf, OfficeDesk, FilingCabinet, MedicalBed, MorgueSlab, WeightsBench, PhoneBooth, PoolTable, VisitorTable, IroningBoard, LaundryBasket
Doors
JailDoor, JailDoorLarge, Door, StaffDoor, SolitaryDoor, RoadGate, RemoteDoor
Windows
Window, WindowLarge
Floral
Tree, Grass Turf
Electronics
ElectricChair, Light, Cooker, Fridge, MetalDetector, Tv, LargeTv, Cctv, CctvMonitor, DoorControlSystem, PhoneMonitor, Servo, DoorTimer, LaundryMachine, WorkshopSaw, WorkShopPress
Utility
PowerStation, Capacitor, ElectricalCable , PowerSwitch, WaterPumpStation, PipeValve, PipeLarge, PipeSmall
Automobiles
SupplyTruck, FireEngine, RiotVan, Ambulance, PrisonerBus, Hearse, TroopTruck
Misc/Unknown
Sprinkler, Drain, None, Box, Stack, Fire, Garbage, Rubble, Equipment, Prop, Dummy, Polaroid, Brick, Concrete, Steel, Bleach, SheetMetal, LicensePlateBlank, LicensePlate, LogicCircuit, LogicBridge, PressurePad, Wire, TidyWires, ShowAllWires, StatusLight, Ingredients, IngredientsCooking, IngredientsCooked, Meal, FoodTray, FoodTrayDirty, PrisonerUniform, DirtyPrisonerUniform, CrumpledPrisonerUniform, DismantleObject, DismantleUtility
Materials
Flooring
Dirt, PavingStone, Grass, Gravel, Road, RoadMarkings, RoadMarkingsLeft, RoadMarkingsRight, Stone, ConcreteTiles, ConcreteFloor, WoodenFloor, CeramicFloor, MosaicFloor, MetalFloor, MarbleTiles, WhiteTiles, FancyTiles, BurntFloor
Walls
Fence, ConcreteWall, BrickWall, BurntWall, PerimeterWall
Misc
None, Building, Demolish, DemolishWalls, Roof, BuildingFrame, RemoveTunnels
Available Functions
The following is a list of available functions and their usages (where known). Note that some functions can only be used in Grants.lua, and some functions can only be used in a scenario's .lua file. For example Trigger.Create can only be used in scenario files, if you try to put it in Grants.lua the game will crash on load (or on mod enable).
Global
not including default Lua functions/tables
Global.Game table Global.ScriptSystem userdata Global.Objective table Global.Trigger table
Objective
Objective.Complete Objective.Create Usage: Objective.Create("Objective_Name") Creates an objective which is visible on the todo list. Objective.CreateGrant Usage: Objective.CreateGrant("Grant_Name", InitialMoney(number), CompletionMoney(number)) Creates a grant. Objective.Exists Objective.Invert Objective.RequireBuilding Objective.RequireFlag Objective.RequireGangControl Objective.RequireMaterials Objective.RequireMaterialsAvailable Objective.RequireNamedObject Objective.RequireObjectOff Objective.RequireObjectOn Objective.RequireObjectPower Objective.RequireObjects Usage: Objective.RequireObjects("Object_Name", Amount<number>) Example: Objective.RequireObjects("Warden", 1) Example: Objective.RequireObjects("Bookshelf", 3) Example: Objective.RequireObjects("Prisoner", 20, "prisoner") Makes an objective or grant require that a number of a certain object has been installed, or a number of certain people have
been hired before the objective is complete. Objective.RequireObjectsInRoom Objective.RequirePowerCapacity Objective.RequirePrisonerInCell Objective.RequirePrisonersUnderControl Objective.RequireResearched Usage: Objective.RequireResearched("Research_Name") Example: Objective.RequireResearched("Finance") Objective.RequireRoom Usage: Objective.RequireRoom("Room_Name", true) Room_Name true = (probably) whether it is required, false may mean that it must not exist, i.e excluded. Objective.RequireRoomsAvailable Usage: Objective.RequireRoomsAvailable ("Room_Name", "AtLeast", Quantity<number> ) Objective.RequireSecurityInRoom Objective.SetFlags Objective.SetParent Usage: Objective.SetParent("Grant_Name") Sets a grant as a requirement for the parent grant to be completed. Objective.SetPayment Objective.TargetObject Objective.TargetRoom Objective.TargetZone
Game
Game Control
Game.Pause function Usage: Game.Pause(3) Pauses the game for the set time period. Game.SetMap function Game.SetChapter function Game.SetFlag function Usage: Game.SetFlags( true, false ) Game.GetProperty function Game.GameOver function Game.SaveMap function Game.DebugOut function
View
Game.CamZoom function Usage: Game.CamZoom( 1.5, 10.0, false ) Zooms the camera to the specified zoom level. Game.CamMove function Usage: Game.CamMove( 3, 32, 33, 50, 10, false ) Moves the camera to the specified position. Game.Show function Usage: Game.Show( "Utilities" ) Used to show particular building overlays. Game.Hide function Usage: Game.Hide( "Utliities" ) Used to hide particular building overlays. Game.CamMoveAndZoom function Game.FadeToColour function Game.FadeUp function Game.FadeToBlack function
Polaroid
Game.Polaroid function Game.MovePolaroidTo function Game.HidePolaroid function
Dialogues
Game.AdviserIncoming function Usage: Game.AdviserIncoming( "Adviser_Name" ) The portrait for the adviser with the name Adviser_Name will appear. Game.AdviserSay function Usage: Game.AdviserSay( "Adviser_Name", "Text_Name" ) The text in the language file listed under Text_Name will be said by the adviser with the portrait that has the same name as the Adviser_Name Game.AdviserSayBatch function Usage: Game.AdviserSay( "Adviser_Name", "Text_Batch_Name" ) The text in the language file in the group Text_Batch_Name will be said by the adviser with the portrait that has the same name as the Adviser_Name
Entity Control
Game.Damage function Game.SendEntityToObject function Game.SpawnPrisoners function Game.SendEntityToPos function Game.LoseEquipment function Game.Unlock function Game.Pickup function Game.SendEntityToRoom function Game.DropEquipment function Game.GiveEquipment function Game.Misconduct function
Misc
Game.Drop function Game.PowerOff function Usage: Game.PowerOff( "Object_Name" ) Prevents the named object from drawing power (and stops it from working). Game.PowerOn function Usage: Game.PowerOn( "Object_Name" ) Turns the named object back on, allowing it to draw power from the grid and work as normal. Game.CamTrack function Game.Spawn function Usage: Game.Spawn( "Object", "Object_Name", Xpos, Ypos ) Game.Delivery function Game.Sound function Game.StopSound function Game.HideArea function Game.SpawnDecal function Game.SetSprite function
Trigger
Trigger.PreserveObjectives function Trigger.Create function Usage: Trigger.Create( "Function_Name" ) Trigger.RequireObjective function Usage: trigger.RequireObjective( "Objective_Name" ) "Objective_Name" is declared with Objective.Create()
Objects and their Properties
This section will cover the various properties that are available on objects
Name
The name that appears in the game for the object
Height
The height in squares that the object takes up
RoomSpecific
If not set, the object will show in the object menu by default; if set, the object will show in the menu only when hovering over a room in which it is required or set as a likely object. (Only affects appearing in the non expanded menu.)
Width
The width in squares that the object takes up
WorkGroup
Defines the group which this room work is; can be the same as another group (citation needed), or a new group. Jobs with this group can only be performed in a room with this WorkGroup.
Rooms and their Properties
This section will cover the various properties that are available on Rooms. Rooms are defined in the materials.txt file of a mod pack.
Name
The name that the rest of the code refers to for the room. The name that appears in the game for the Room is defined in
language/base-language.txt as such:
room_nameinmaterialstxt namethatappearsingame
PrisonersCanWork
When set enables prisoners to work in the room.
Qualification
Defines the qualification needed by a prisoner for them to work in the room (citation needed)
Requirement
Requirements are a list of individual requirements
Example
BEGIN Requirement Type Enclosed END BEGIN Requirement Type Object Id VegetableSeeds END BEGIN Requirement Type Object Id LaundryBasket END BEGIN Requirement Type MinimumSize x 5 y 5 END BEGIN Requirement Type Outdoor END
Enclosed
The "Enclosed" property, when set, defines that the room must be enclosed
MinimumSize
Defines that the size must be at least this many squares in width and height. Set using the x and y properties
Example
BEGIN Requirement Type MinimumSize x 5 y 5 END
Outdoor
The "Outdoor" property, when set, defines that the room can be outdoors
Research
Defines the research that is required to obtain the room.