Prison Architect Guide

[script inside]How to remove all prisoners for Prison Architect

[script inside]How to remove all prisoners

Overview

Ever wished you could remove all prisoner in your prison without killing them or letting them escape ?

What is it ?

This is a python script that will remove all the prisoners from your save file. This will not change anything else on your prison. Your rooms, employees, grading etc will not be affected.

How do I use it ?

If you don’t have python installed, install it.
Download the script and place it next to your game saves.
Modify the name of the prison in the third line by the name of your prison (you can also modify the fourth line as it is the name of the same prison without prisoners)
Make the script executable
Launch the script.
Done.

Script

Link to download the script :[link]

In case the download doesn’t work or you just want to have a quick look:

#!/usr/bin/python #Open the save file and the copy file (any file with the Newprison.prison name will be erased) f = open(‘prison.prison’) f1 = open(‘Newprison.prison’, ‘w’) doIHaveToCopyTheLine=True #read the file and store its line by line as a list lines = f.readlines() #as long as the list still contain 3 lines while len(lines)>3: #strat copying if you stopped and the line has ‘END’ in it and the line is smaller than 10 caracter (‘ END’ will pass, ‘ END’ will not) if ((doIHaveToCopyTheLine==False) and (‘END’ in lines[0]) and (len(lines[0])<10)): doIHaveToCopyTheLine=True #remove the ‘ END’ line lines.pop(0) #stop copying if the obeject is a prisonner type if ((doIHaveToCopyTheLine==True) and (‘Type Prisoner’ in lines[3])): doIHaveToCopyTheLine=False #if you can copy, write into the new file the line then delite it from the list if doIHaveToCopyTheLine: f1.write(lines.pop(0)) #if not, delete the line from the list else: lines.pop(0) #close both files f1.close() f.close()

rq: if you want to copy the code from this source, remember that python is sensible to indentation.

SteamSolo.com