The .prison format is the way games are saved in Prison Architect. They are effectively just .txt files, as demonstrated by the tutorial campaign files where they are in plain text format. The .prison file defines all features of a prison, including the progress of Research, the daily Regime and several game options.
While Prison Architect does not contain any cheats (as far as known), modifying the save files is rather easy and powerful.
A more general overview of the file format can be found on the File Format page.
Save files can be found from the main menu in Prison Architect by selecting the "Open Save Folder" option. Alternatively, save files can be found in the following locations, depending on the operating system being run and the version of the game installed (e.g. Steam vs standalone):
|Windows (General)|| |
|Windows (Vista or 7)|| |
|Windows (XP)|| |
|Mac OS X (10.6+)|| |
If Steam cloud save is used (simply toggle the checkbox on the save screen in order to enable/disable this feature), the savegame might be stored in a different local location (besides the cloud).
Each object is given an Id.i and an Id.u, which are two separate identifier numbers. Id.i is unique to that object type while Id.u is unique to the whole game. The next Id.u to be used is stored as ObjectId.next.
- User:Lukegb has written a quick Python parser, which can be found at https://github.com/lukegb/PrisonArchitectFun - please make pull requests and contribute! He's hoping to make a .prison file sharing service which will generate pseudo-screenshots.
- User:amdavies is in the process of making a PHP parser that is currently used as part of a Map Viewer script, viewable at http://amdavies.com/dev/pa
- User:jasondew started a Ruby gem to parse savegame files here: https://github.com/jasondew/prison_parser
.prison files begin with a header of basic information.
Version alpha-36b NumCellsX 100 NumCellsY 120 OriginX 0 OriginY 40 OriginW 100 OriginH 80 TimeIndex 137483. RandomSeed 26206 SecondsPlayed 31888 ObjectId.next 18244304 EnabledElectricity true EnabledWater true EnabledFood true EnabledMisconduct true EnabledGangs true EnabledDecay true EnabledVisibility true GenerateLakes true GenerateBuildings true ObjectsCentreAligned true FailureConditions true UnlimitedFunds true EnabledEvents true FoodQuantity 3 FoodVariation 3 LethalForce true BioVersions 4 CeoLetterRead true Intake.next 138719. Intake.numPrisoners 8 Intake.reqNormal false
On the forums, Chris has stated that adding the text below will "All materials will be delivered by truck, and your workmen will spend a lot of time unloading them. Workmen will no longer be able to teleport materials around"
Version indicates the game version the save file was last saved as per the version history.
NumCellsX specifies the width of the game area.
NumCellsY specifies the height of the game area. Used in conjunction with NumCellsX. When altered to a larger number, the map increases downward and to the right, the defined number of tiles. When the size is decreased, all items that were beyond the edge of the map are visible on the very edge of the newly sized map. If the map is increased once again, the original positions of the items are retained.
OriginX Unknown purpose at time of writing.
OriginY Unknown purpose at time of writing.
OriginW Unknown purpose at time of writing.
TimeIndex specifies the in game time at which the save was created.
RandomSeed is a randomly generated number used to generate landscapes when GenerateXXX options are enabled. [verification needed]
SecondsPlayed records to the second, the number of hours played in game as viewable in the heads up display in game.
ObjectId.next is currently unknown, but looks like it could be the game pre-cacheing an object ID so that the game knows what ID is available to choose next. [verification needed]
EnabledElectricity if disabled, there will be no need of electric station or cables (Free Electricity) [verification needed]
EnabledWater if disabled, there will be no need of water pump station or pipes [verification needed]
EnabledFood Unknown purpose at time of writing. [verification needed]
EnabledMisconduct if disabled, there will be no misconduct in prison. [verification needed]
EnabledDecay If disabled there is no need of janitors as nothing would get dirty.
GenerateLakes Associated with RandomSeed. Randomly generates water on the map. See Create New Prison.
GenerateBuildings Associated with RandomSeed. Randomly generates partial buildings on the map. See Create New Prison.
ObjectsCentreAligned Unknown purpose at time of writing. [verification needed]
UnlimitedFunds Corresponds with setting on new prison menu to enable Unlimited Funds within a prison. See Create New Prison.
FoodQuantity An in game variable that corresponds with the quality of food served in a prison. Changed using options within the game.
FoodVariation An in game variable that corresponds with the variation of food types served in a prison. Changed using options within the game.
LethalForce An in game variable that corresponds with the lethal force ability of armed guards. Changed using options in the bottom right corner of the screen.
BioVersions Unknown purpose at time of writing. Speculating it may relate to a prisoner biography layout/format version. [verification needed]
CeoLetterRead A boolean flag indicating whether or not the CEO's letter has been read or not. Set to true once read.
Removing a header setting value equates to setting the value to false or zero (0).
Defines the material of every cell in the game area.
BEGIN Cells BEGIN "0 0" Mat PavingStone Con 37.8430 END BEGIN "0 1" Con 18.5168 END BEGIN "0 2" Con 6.91396 END BEGIN "0 3" Mat PavingStone Con 31.9050 END BEGIN "0 3" Mat BrickWall Con 58.4516 Ind true END BEGIN "0 4" Mat Grass Con 78.3275 Room.i 27 Room.u 277797 END
The first two numbers are the co-ordinates of the cell in question.
In the above example, cell [0,0] is made of paving stones, whilst cell [0,1] is empty.
If a cell is considered 'Inside' the cell will contain an attribute 'Ind' with a value of true. This will be absent for outside cells.
Each cell also contains a reference to the Room ID and Unique Id if it forms part of a room.
The following materials can be used:
BuildingFrame BrickWall ConcreteFloor ConcreteTiles ConcreteWall FancyTiles Fence Grass Gravel MetalFloor MosaicFloor PavingStone Road RoadMarkings RoadMarkingsLeft RoadMarkingsRight Stone WhiteTiles PerimeterWall
Not a comprehensive list.
Janitor Prisoner Workman Warden Doctor Guard Cook Gardener Foreman Accountant Chief Psychologist
Tree Light Door JailDoor Bench Light Toilet TV Bed Bin Box FilingCabinet OfficeDesk PowerStation Chair Capacitor JailDoorLarge Cooker Fridge Garbage PhoneBooth WeightsBench ShowerHead Drain Stack ServingTable Sink PoolTable MorgueSlab MedicalBed MetalDetector Cctv SupplyTruck
Defines the rooms the player has designated.
BEGIN Rooms Size 2 BEGIN "[i 0]" Id.i 0 Id.u 26 RoomType Deliveries END BEGIN "[i 1]" Id.i 1 Id.u 29 RoomType Garbage END BEGIN "[i 2]" Id.i 2 Id.u 248505 Entity.i 397 Entity.u 271986 RoomType Office END BEGIN "[i 3]" Id.i 3 Id.u 255184 RoomType Shower Name Grant_bootstraps_shower END END
Size indicates the total number of rooms that have been defined. Each room is then defined on its own line. Each room is referred to by its own Room ID (Id.i) and a global unique object ID (Id.u). When a room is removed, the game will attempt to reuse the room ID for any new rooms, while global IDs are not reused. Some rooms have additional data associated to them. For instance, Offices contain the Entity.I and Entity.u IDs of the staff member assigned to that office and rooms which are required or used for grants have the associated grant name listed.
Available room types are:
Canteen Cell CommonRoom Deliveries Garbage HoldingCell Kitchen MedicalWard Office Shower Solitary Storage Workshop Yard
The regime is defined in the following format (default):
BEGIN Regime PreviousHour 19 "[i 0]" Sleep "[i 1]" Sleep "[i 2]" Sleep "[i 3]" Sleep "[i 4]" Sleep "[i 5]" Sleep "[i 6]" Sleep "[i 8]" Shower "[i 10]" FreeTime "[i 13]" Eat "[i 14]" Eat "[i 15]" Yard "[i 16]" Yard "[i 18]" FreeTime "[i 20]" Eat "[i 21]" Eat "[i 23]" Sleep END
The PreviousHour variable dictates the current in game hour that the saved game is at. The "[i 0]" part defines the hour at which the activity takes place (in this instance, midnight), with the corresponding activity defining what will happen at that time. Any hour without a defined activity (Such as hour 17 in the above example) will be left blank.
Available activities are:
Sleep Shower Eat Yard FreeTime
Nothing is not available.
Details the prison's financial data.
BEGIN Finance Balance x LastDay x SalePrice x END
Balance is the total current available funds, in whole dollars.
LastDay is the number of in-game days that have passed since the creation of the prison.
SalePrice is the price at which the prison was sold. If the sale price is nonzero, this indicates that the prison has been sold and that it cannot be loaded for further editing or play. To 'unsell' a prison and revert it to a playable state, delete SalePrice x or replace x with 0.
The Patrols section defines the various co-ordinates of your guard's patrol routes.
BEGIN Patrols BEGIN "34 35" Set true Visit 28742.5 END BEGIN "35 35" Set true Visit 28743.7 END BEGIN "36 35" Set true Visit 28741.0 END BEGIN "38 35" Set true Visit 28744.1 END BEGIN "38 36" Set true Visit 28744.4 END BEGIN "38 37" Set true Visit 28741.2 END END
Each new square of a patrol starts and ends with its own BEGIN and END, hence patrols are a sequence of squares that a guard travels along, rather than a route from one location to another.
The numbers refer to the grid coordinates of the map, with the first number indicating the horizontal location and the second number indicating the vertical location, counting from the upper-left (northwest) corner of the map, starting at 0. In the above example, the first three lines form a horizontal line three meters long.
Set true is a validity check indicating that the patrol is active. If this is set to false, the corresponding map grid will no longer appear as part of a patrol in the deployment menu.
Visit indicates the game-time that a guard last patrolled the corresponding map grid. If the map grid has not been visited since the creation of the patrol, this value will not exist.
Details the locations of electrical conduits, based on grid locations:
BEGIN Electricity BEGIN "85 13" END BEGIN "85 14" END END
Similar to Electricity, with the difference in pipe choices and pressure values.
BEGIN Water BEGIN "74 21" PipeType 1 PressureY -0.994009 END BEGIN "75 21" PipeType 1 PressureX 0.991027 END BEGIN "76 21" PipeType 1 PressureX 0.988054 END BEGIN "53 22" PipeType 1 PressureX -0.936038 END BEGIN "54 22" PipeType 1 PressureX -0.938854 END BEGIN "55 22" PipeType 1 PressureX -0.941679 END BEGIN "56 22" PipeType 1 PressureX -0.944513 END END
As in other sections of the save file, the numbers indicate the coordinates of a map grid.
PipeType indicates the type of pipe that is currently in that grid location.
PressureX and PressureY indicate the pressure variables for those sections of pipe.
Defines everything that can be unlocked through Bureaucracy.
BEGIN Research BEGIN None Desired false Progress 1.00000 END BEGIN Warden Desired false Progress 1.00000 END BEGIN Maintainance Desired false Progress 1.00000 END BEGIN Security Desired false Progress 1.00000 END BEGIN MentalHealth Desired false Progress 1.00000 END BEGIN Finance Desired false Progress 1.00000 END BEGIN Cctv Desired false Progress 1.00000 END BEGIN Health Desired false Progress 1.00000 END BEGIN Cleaning Desired false Progress 1.00000 END BEGIN GroundsKeeping Desired false Progress 1.00000 END BEGIN Clone Desired false Progress 1.00000 END BEGIN Deployment Desired false Progress 1.00000 END BEGIN Patrols Desired false Progress 1.00000 END BEGIN Dogs Desired false Progress 1.00000 END BEGIN PrisonLabour Desired false Progress 1.00000 END BEGIN Education Desired false Progress 1.00000 END BEGIN LandExpansion Desired false Progress 1.00000 END BEGIN Contraband Desired false Progress 1.00000 END BEGIN Policy Desired false Progress 1.00000 END BEGIN Armoury Desired false Progress 1.00000 END BEGIN BodyArmour Desired false Progress 1.00000 END BEGIN Tazers Desired false Progress 1.00000 END BEGIN TazersForEveryone Desired false Progress 1.00000 END BEGIN BankLoans Desired false Progress 1.00000 END BEGIN LowerTaxes1 Desired false Progress 1.00000 END BEGIN LowerTaxes2 Desired false Progress 1.00000 END BEGIN ExtraGrant Desired false Progress 1.00000 END END
Each research line of this section consists of a name of an item which may be unlocked (e.g. Clone), a flag indicating whether or not the item is currently being researched (Desired false indicates that the item is not currently being researched; Desired true indicates that the item is currently being researched), and a float indicating how much progress has been made toward unlocking the research item (Progress 0.000000 indicates that the item has not been researched at all; Progress 1.00000 indicates that the item has been unlocked). To manually unlock a research item by editing the save file, set the Desired flag to false and Progress to 1.
The construction section represents the display in "Planning mode".
BEGIN Construction AutoLights false BEGIN Jobs Size 0 END BEGIN PlanningJobs Size 32000 BEGIN Job x 1 y 1 Mode Wall END BEGIN Job x 1 y 2 Mode Object END BEGIN Job x 1 y 3 Mode Route END END BEGIN BlockedAreas END END
x and y values are cell coordinates starting from 0, 0
Mode values are values for displayed plans.
- Route (Displays Pathways)
Penalties are received when things start to go wrong, and your prisoners start to break the rules. There are currently only 4 penalties within the game and, depending on the severity of the crime, they each come with a different fine - written up in the prison's valuation.
BEGIN Penalties Points 104.000 BEGIN Penalties Size 17 BEGIN "[i 0]" Event 4 ObjectId.i 293 ObjectId.u 110398 Time 25358.2 Committed true END BEGIN "[i 1]" Event 1 ObjectId.i 225 ObjectId.u 53410 Time 25355.9 Committed true END BEGIN "[i 2]" Event 4 ObjectId.i 86 ObjectId.u 104248 Time 25331.6 Committed true END BEGIN "[i 3]" Event 4 ObjectId.i 281 ObjectId.u 110396 Time 25303.9 Committed true END BEGIN "[i 4]" Event 1 ObjectId.i 149 ObjectId.u 45740 Time 25298.2 Committed true END BEGIN "[i 5]" Event 2 ObjectId.i 69 ObjectId.u 42072 Time 25304.1 Committed true END BEGIN "[i 6]" Event 4 ObjectId.i 787 ObjectId.u 93171 Time 25297.5 Committed true END BEGIN "[i 7]" Event 1 ObjectId.i 115 ObjectId.u 104359 Time 25294.1 Committed true END BEGIN "[i 8]" Event 1 ObjectId.i 141 ObjectId.u 45709 Time 25284.5 Committed true END BEGIN "[i 9]" Event 1 ObjectId.i 63 ObjectId.u 42043 Time 25253.3 Committed true END BEGIN "[i 10]" Event 4 ObjectId.i 145 ObjectId.u 45713 Time 25241.5 Committed true END BEGIN "[i 11]" Event 1 ObjectId.i 125 ObjectId.u 104361 Time 25239.6 Committed true END BEGIN "[i 12]" Event 1 ObjectId.i 71 ObjectId.u 42074 Time 25234.7 Committed true END BEGIN "[i 13]" Event 1 ObjectId.i 115 ObjectId.u 104359 Time 25231.4 Committed true END BEGIN "[i 14]" Event 1 ObjectId.i 142 ObjectId.u 45710 Time 25229.8 Committed true END BEGIN "[i 15]" Event 1 ObjectId.i 66 ObjectId.u 42046 Time 25218.8 Committed true END BEGIN "[i 16]" Event 2 ObjectId.i 64 ObjectId.u 42044 Time 25231.9 Committed true END END END
The Points appear to be the games way of keeping track of how many penalties you have, although the value seemingly does not relate to any actual number within the game.
Event 1 is "Attacking a Guard" (or perhaps any member of staff). It does not incur a fine, however, and is not visible as an in-game statistic. Event 2 is a "Serious Injury" and incurs a $1000 fine, per occurrence. Event 3 is an "Unsolved Murder" and incurs a $30,000 fine, per occurrence. Event 4 is the status of an Escaped Prisoner. Each escapee brings with it a $60,000 fine in the prison valuation report.
ObjectId.i is the ID of the prisoner that committed the offence. It's worth noting that if the prisoner has escaped - the prisoner will be removed from the save file.
ObjectId.u is the Unique ID of the prisoner. I don't know the benefit of this, but every object - animal, vegetable and mineral - has both an ID and a Unique ID.
Time is the in-game time that the offence occurred
Committed true appears to just be a check to see if the event actually happened.
Here are the sectors defined inside of the savegame and there positionals. In this code example its a starting sector of a customized 82x200 sized Map.
Here you can see that the system handles the cells a little bit inconsistent. While the BottomRight values starting to be counted at 0 the Centre positionals seems to be counted from 1. NumSquares is just the value of X*Y. Size defines the amount of sectors in the list.
BEGIN Sectors NextSectorId 1 BEGIN Sectors Size 1 BEGIN "[i 0]" id 0 TopLeft.x 0 TopLeft.y 0 BottomRight.x 199 BottomRight.y 159 Centre.x 100.500 Centre.y 80.5000 NumSquares 32000 BEGIN Stations Size 0 END BEGIN Jobs Size 0 END END END
This section defines the grants that the player has either accepted or completed.
BEGIN Grants BEGIN Grant_bootstraps Status Completed END BEGIN Grant_FirstCellBlock Status Completed END END
The above code shows that the player has accepted and completed the 'Bootstraps' grant and the 'First Cell Block' grant.