Prison Expansion

Can you handle the responsibility of managing a prison?

Overview

So, you want to start a prison, huh? Well, it’s not going to be easy. Throwing thugs in a jail cell is one thing, managing a successful prison is another. As a prison warden, you’ll have to deal with riots, food supply, cell space, and more. Can you handle the responsibility?

Gameplay:

To help you figure out how to use the Prison Expansion, I've made a short guide to help you understand the basics. This plug-in is pretty advanced and intricate, so reading this guide is highly recommended.


To begin, there are three prisoner types, waiting, holding, and jailed. Jailed and holding prisoners are the guys located in your prison. However, if your prisons are full, waiting prisoners will appear. Because you have nowhere to put them, you'll be forced to export them to a neighboring city at your expense. Thankfully, prisoners will only start appear in your towns after they've grown a bit, so you'll have all the time you need to build a small prison before they arrive.


To keep your prisoners happy (and avoid massive fines), you'll need to provide them with services. Cells, mess halls, yards, and guards are all required to run a successful prison. To save money, you can also build in holding cells for your prisoners rather than regular cells. However, keep in mind that it'll make these prisoners slightly unhappy, which may lead to riots. Aside from those, there are two optional service buildings called armories and parole offices. Armories will spawn riot vans, which can be used to quell prison riots, while parole offices are useful for reducing the number of prisoners in your system.


Keeping your prisoners happy is important, as it can reduce the chance of a prison riot. Although there is always a small chance a riot may occur, failing to provide services to your prisoners will increase this chance. Riots will always start near cells, so make sure to place some armories nearby just in case. Fortunately, riots will only spawn if your city is very large, so you'll have plenty of time to set up infrastructure to deal with them.


Finally, I've made a short list of tips and tricks you prison wardens might find useful:

  • If you ever want to play in a city without the prison system, just type Prison Disable in the console. If you ever change your mind, type Prison Enable to use the prison system again. Disabling the prison system like this will keep all of the buildings, but remove their functionality.

  • Make sure you provide your prisoners with all the service they need! Cutting corners or failing to meet your prisoners' need will result in massive fines and a larger chance of a prison riot.

  • The warden's office is a great option for starting your prisons. Not only will it unlock new prison buildings, but it'll also provide enough cell space and services to keep 250 prisoners happy.

  • Make sure to check your prison stats by looking at the prison buildings' descriptions. They'll give you information regarding how well your prisons are functioning.

  • Pay attention to your in-game notifications! Your prison manager will warn you if your prisons need to be expanded.

  • Make sure you've build a SWAT HQ before building armories.

  • The danger level will always have a minimum of 5% and a maximum of 100%. A danger level of 5% means that cells have a 0.005% chance per day of spawning a riot, while a danger level of 100% raises this to 0.1%.

  • Aside from looking nice, prison decorations provide no bonuses or value.

Changelog:

1.1:

  • Fixed riot spawning.

  • Added prisoner and guard deco.

  • Added in-game notifications that will tell you when you're losing money.

  • Nerfed PEF.

  • Money lost from the prison system can be found in the financials menu.

  • Maximum holding cells is now equal to 25% of the number of regular cells available.

  • Small texture changes.

1.1.1:

  • Small bug fix for future compatibility.

1.1.2:

  • Temporarily fixed an issue where the plug-in would cause an error at start-up.

1.2:

  • Made the prison plug-in easier by nerfing the fees and fines system.

  • Added Armories, which can be used to quell rebellions using the SWAT team.

  • The Prison Expansion can now be turned on/off on a per-city basis through the console using "Prison Enable" and "Prison Disable."

  • Added a manifest to the plug-in so it can be used in multiplayer maps.

  • Prison buildings will now require ranks to unlock.

  • Prisons will not be required until rank 5 and prison riots will be disabled until rank 10.

  • Added a notification at rank 5 that will tell you to build a prison and another notification at rank 10 to warn you about prison riots. Also, two additional notifications have been added to warn you when your prison services are nearing max capacity.

  • Expanded on the prison riot system by incorporating "Prisoner Happiness," which is influenced by how well you provide services to your prisoners.

  • Added a "Posted Guards" item that'll act like a cheaper version of the Guard Tower.

  • Added lights to some of the prison buildings.

  • Changed the build times of several buildings.

  • Added a small police influence to prison buildings.

  • Prison buildings will no longer spawn police cars.

  • Removed power and water requirements from the Prison Yard.

  • Removed rotation support from the Warden's Office.

  • Made some minor changes to the textures of a few buildings.

  • Fixed the descriptions of the Mess Halls.

  • Changed the ordinals of some items to accommodate some new changes and additions.

  • Prison Pathways should allow emergency vehicles now.

  • Made a variety of changes to the Prison System's pedestrian system.

  • Prison pathways now support any road flag at x crossings.

  • Removed the maximum holding cells mechanic. Holding cells are now balanced out by the new Prisoner Happiness system.

1.2.1:

  • Reduced the chance of a prison riot occurring

1.2.2:

  • Attempted to fix a prison riot bug that may have caused more riots than intended

  • Reduced the chance of a prison riot again

  • Removed fires from the prison riot

  • Removed the minimum danger level mechanic

1.2.3:

  • Notifications will no longer appear in cities with the prison system disabled

1.2.4:

  • Prison roads will now allow rioters and regular pedestrians

  • Prison fences are no longer flammable

  • Removed some of the extra spaces from the building descriptions

  • Reduced how often prison notifications appear

1.2.4a:

  • Fixed the annoying toast message that appeared when a notification triggered.

TROUBLESHOOTING Tips:

Here is a list of troubleshooting tips you can use if something in this plug-in pack isn't working.

  • My city is losing money and I don't know why!

    • Make sure you've built a prison in your city. If you don't, you'll be forced to pay prisoner exportation fees, which can be very costly. After building a prison, make sure you're proving your prisoners enough services to keep them happy, otherwise you'll be fined. If you would like to view prison-related fees/fines, go to the prison info category.

  • A riot/fire has spawned inside my prison!

    • Prison cells have a chance of starting riots and fires. Make sure you have emergency services nearby, just in case. Keep in mind that placing prisoners in holding cells and failing to provide prisoners with services will increase the chance of a riot.

  • The game won't load because of a plug-in error!

    • Make sure the original prison expansion plug-in pack is loaded before the add-ons (putting an "@' at the beginning of the folder name should work). Also, remember that most add-ons for the prison system require the prison expansion to be installed.

  • The game crashed and an error appeared on my screen!

    • Tap the report button and copy or screenshot the error and send it to me. Sending me the error code helps me find and fix the problem.

  • The add-on I made isn't working and the game won't load because of it!

    • Make sure your add-on uses "override": true. Forgetting to add that value will cause an error.

Add-on Info:

This plug-in has official add-on support. This means that add-ons can be made for this plug-in without having to modify any code in this plug-in. Using a simple ID-based system, new buildings can be added to the prison system with ease.

An example of an add-on can be found at the bottom of the page!

Adding New Buildings:In order to add a building to the prison system, you must override any of the following IDs:· Cells:o Use “cell4.addon”, “cell5.addon”, “cell6.addon”, or “cell7.addon” to add a cell with a capacity of 150.o Use “cell8.addon”, “cell9.addon”, “cell10.addon”, or “cell11.addon” to add a cell with a capacity of 300.o Use “cell12.addon”, “cell13.addon”, “cell14.addon”, or “cell15.addon” to add a cell with a capacity of 600.· Holding Cells:o Use “holdingcell4.addon”, “holdingcell5.addon”, “holdingcell6.addon”, or “holdingcell7.addon” to add a holding cell with a capacity of 250.o Use “holdingcell8.addon”, “holdingcell9.addon”, “holdingcell10.addon”, or “holdingcell11.addon” to add a holding cell with a capacity of 500.o Use “holdingcell12.addon”, “holdingcell13.addon”, “holdingcell14.addon”, or “holdingcell15.addon” to add a holding cell with a capacity of 1000.· Mess Halls:o Use “messhall4.addon”, “messhall5.addon”, “messhall6.addon”, or “messhall7.addon” to add a mess hall with a capacity of 300.o Use “messhall8.addon”, “messhall9.addon”, “messhall10.addon”, or “messhall11.addon” to add a mess hall with a capacity of 600.o Use “messhall12.addon”, “messhall13.addon”, “messhall14.addon”, or “messhall15.addon” to add a mess hall with a capacity of 1200.· Yards:o Use “yard4.addon”, “yard5.addon”, “yard6.addon”, or “yard7.addon” to add a yard with a capacity of 500.o Use “yard8.addon”, “yard9.addon”, “yard10.addon”, or “yard11.addon” to add a yard with a capacity of 1000.o Use “yard12.addon”, “yard13.addon”, “yard14.addon”, or “yard15.addon” to add a yard with a capacity of 2000.· Guard Towers:o Use “tower4.addon”, “tower5.addon”, “tower6.addon”, or “tower7.addon” to add a guard tower with a capacity of 1000.o Use “tower8.addon”, “tower9.addon”, “tower10.addon”, or “tower11.addon” to add a guard tower with a capacity of 2000.o Use “tower12.addon”, “tower13.addon”, “tower14.addon”, or “tower15.addon” to add a guard tower with a capacity of 4000.· Parole Offices:o Use “office4.addon”, “office5.addon”, “office6.addon”, or “office7.addon” to add a parole office with a capacity of 5%.o Use “office8.addon”, “office9.addon”, “office10.addon”, or “office11.addon” to add a parole office with a capacity of 10%.o Use “office12.addon”, “office13.addon”, “office14.addon”, or “office15.addon” to add a parole office with a capacity of 15%. Additional Info:· You must override one of those IDs to add a new building to the prison system. No additional code, lua, fun, or tags are needed.· I wouldn’t recommend overriding IDs that end in “.kt101”. Those IDs are used for the original prison system buildings and overriding them might cause problems.· There are a limited number of IDs you can use. Try not to override the same IDs that other add-ons use.· Although there are a limited number of IDs, more can be added in future updates if need be.· It is not possible to change the capacities of the add-on buildings without modifying the original Prison Expansion code. Prisoner Pedestrians:You might have noticed the groups of prisoners that wander around your prison. These guys use a special group of flags to differentiate them from regular pedestrians. Adding one of the following flags to your roads will make them compatible with the prisoner pedestrians (although it is recommended that you use all of them). Prisoner Pedestrian Flags:· Pedestrian· User8 If you want to make a prisoner-only road, only use the flag “user8”. By default, the prisoners can walk on pedestrian zones and prisoner-only pathways.
Also, for those of you who want prisoner pedestrians to spawn from your buildings, their ID is "walking_prisoners.kt101".
Categories:There are a few categories used in the Prison Expansion. There is the main category, deco category, info category, and template category. Their IDs are $cat_prison00_KT, $cat_prisondeco00_KT, $cat_prisoninfo00_KT, and $cat_prisontemplate00_KT. Adding Info to Your Building Descriptions:Another thing you might’ve noticed while using this plug-in is how it keeps track of prison stats in the prison buildings’ descriptions. This is done by using a plug-in feature that allows fun variables to be displayed in strings. Here is a list of those variables:· ${fTP}o Total number of prisoners in your city, including waiting prisoners, holding prisoners, and jailed prisoners· ${fP}o Total number of prisoners in your prison, including holding prisoners and jailed prisoners· ${fPW}o Number of waiting prisoners in your city· ${fPH}o Number of holding prisoners in your prison· ${fPJ}o Number of jailed prisoners in your prison· ${fTCO}o Total number of cell spaces available.· ${fHCO}o Number of holding cell spaces available.· ${fCO}o Number of normal cell spaces available.· ${fMHO}o Number of mess hall meals available.· ${fYO}o Number of yard spaces available.· ${fGO}o Amount of guard power available.· ${fRC}o Release chance.· ${fPR}o Estimated number of prisoners released via release chance.· ${fPMF}o Estimated amount the player will be fined for not providing services, aka prison management fees.· ${fPEF}o Estimated amount the player will be charged for exporting waiting prisoners, aka prisoner exportation fees.· ${fHP}o Prisoner happiness level.· ${fDL}o Prison danger level. Has a minimum of 5% and a maximum of 100%.· ${fST}o Number of SWAT teams spawned by armories available.
Just copy and paste these into your building descriptions to add these stats. Displaying these stats isn’t required, but it is helpful to the player.