Can I change prisoners security based on reform grade?

Discussion about Mods for Prison Architect

Moderator: NBJeff

yuk
level2
level2
Posts: 172
Joined: Fri May 20, 2016 5:47 pm

Can I change prisoners security based on reform grade?

Postby yuk » Sat Jul 23, 2016 10:45 am

So I have a really good prison set up and I want to make it so when prisoners get to 15% likely to reoffend they get moved to min security. This will reward them with their own cells and a bit of freedom (they're going to be out soon anyway!) and allow new prisoners to move into the max area since I only accept max. Because there's 1k prisoners this makes it a pretty hefty task for me to undertake on my own.

I would need this to only change max security people, not supermax or protected :).
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Wed Aug 03, 2016 5:03 am

Hey...

I'm currently writing a little mod I'm intending to use myself for exactly that purpose...

What I can say from fiddling around is that at least I don't know of a any way to get the Reform Grade property.


But what I can get is the time since the last misbehaviour property and use that together with the Prisoner Category property to decide if a prisoner deservers to be reassigned to a lower security level.

TThe Last Misbehaviour Property is a time stamp using the TimeIndex of a map.


BUT where I'm currently stuck is the goddamn Game.Time()... The Game.Time isn't the same as the TimeIndex of a map. For whatever reason it's something absolutely different and it also scales differently.

And I don't know of a way to access the correct TimeIndex of a map... which makes me pull my hair out.


Maybe someone else has found out how the Game.Time() is actually calculated... because it surely ISN'T a real ingame Game Minute...

Otherwise I could easily substract the LastMisbehaviour property from the Game.Time() and use the difference to determine how well behaving a prisoner is... but the two time scales/formats don't fit together at all. The Game.Time() value is several magnitudes bigger than the actual TimeIndex of the map (maybe because Game.Time continues to tick up even when the game is paused, while TimeIndex is paused correctly).

At least I tried to find a factor that connects the Game.Time() with the TimeIndex value but to no avail... it seems like whatever ratio I find through testing is obsolete after a few ingame days... suggesting that the Game.Time really scales differently than the actual TimeIndex of the map.

It really makes me wonder how anything within the game actually works if the Game.Time is so unreliable... or if the devs interally use the correct TimeIndex but haven't made it available to the modders.


I already considered opening an issue on Mantis to hopefully clarify how the Game.Time value is actually calculated... or if it is absolutely worthless.


I know why I stayed away from Prison Architect Modding for this long... the devs may have done a quite good job on the "core game mechanics" but from a Modder's point of view a lot of the game mechanics are absolutely inaccessible and the interface doesn't provide all the necessary information to be used in Lua.
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Re: Can I change prisoners security based on reform grade?

Postby elDiablo » Wed Aug 03, 2016 9:30 am

You should be able to just use World.TimeIndex. This should be available to both scripted WorldObjects and World scripts.
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Wed Aug 03, 2016 12:09 pm

elDiablo wrote:You should be able to just use World.TimeIndex. This should be available to both scripted WorldObjects and World scripts.


Thanks for the suggestion... I'll try that!

By the way is there anywhere a more complete list of available functions etc? Because most guides and resources I found seem like they are rather incomplete, which is probably why I am having some problems with certain things.
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Re: Can I change prisoners security based on reform grade?

Postby elDiablo » Wed Aug 03, 2016 12:36 pm

The ModSchema on the devwiki has some, but needs updating (I'll try and do it next week). The Modding page itself is also good with links to guides and things.
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Wed Aug 03, 2016 1:05 pm

elDiablo wrote:The ModSchema on the devwiki has some, but needs updating (I'll try and do it next week). The Modding page itself is also good with links to guides and things.


Yeah, I even looked into these:

http://devwiki.introversion.co.uk/pa/in ... tart_Guide
http://devwiki.introversion.co.uk/pa/index.php/Lua

http://steamcommunity.com/sharedfiles/f ... =480978426
https://github.com/aubergine10/Prison-A ... %20(Global)
http://prisonarchitectwiki.com/wiki/Mod ... Properties

But none of them really mentions the World object and its possible properties... :D

Would be really nice if the documentation would be expanded...


By the way your suggestion of World.TimeIndex is working... I changed my Lua script accordingly and now a simple (World.TimeIndex - name.TimeOfLastMisconduct) / (24*60) is resulting in the correct value I was looking for. The script every now and then periodically checks for prisoners that are eglible for a category downgrade depending on their well behaviour time.

It would also be nice to know if there is a way to access the total amount of prisoners per Security Level and the total amount of cells per security level as a property/function... then it would be more deathproof that the script doesn't change a category if there are actually no free cells available in the target security level. Probably I could implement my own function for that somehow but if the game already offers these properties I could spare myself the work.
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Thu Aug 04, 2016 3:17 am

I somewhat got my mod to work in a very rudimentary way...

The prisoner's security level gets changed depending on the time of last misconduct.

  • Max Sec get changed to Med Sec when >=4 days without misconduct
  • Med Sec get changed to Min Sec when >=8 days without misconduct
  • Min Sec get changed to Med Sec when < 1 days without misconduct OR changed to Max Sec if there is no space available in Med Sec
  • Med Sec get changed to Max Sec when < 1 days without misconduct

To control that I have two items placed in my current prison:

  • Downgrader: Placed in a canteen with 2 hour eat regimes. The object checks once every 2 ingame hours (120min on clock) in a radius (covering the canteen) all nearby prisoners if someone's security level can be downgraded. With matching the delay up with the eat regime it is guranteed that the check is at least run once every eat regime when almost all prisoners are nearby. If the downgrade happened or if there is no-one egligble in the first place then the script waits another 2 ingame hours (despaming method).
  • Upgrader: Placed in my solitary block with 2 (light misconduct) and 4 (heavy misconduct) hour policies. The object checks once every 2 hours (120min on clock) in a small radius (covering the solitary block) all nearby prisoners if someone's security level should be upgraded. With matching the delay up with the policy setting it is also guranteed that the check is at least performed once while the prisoners are still in a solitary cell. It's the only way to gurantee that you only upgrade someone who actually misbehaved and not someone who recently entered your prison and therefore doesn't have time without misconduct yet.

The balancing largely depends on my special regime and policy settings. Since there's no real way to determine these settings via lua scripts I basically hardcoded the settings into my script.


The next problem is that without checking for the current amount of prisoners per security level against the total cells per security level to change a prisoner's category only if there are actually free cells in the target security level the system will end up in complete madness. Since there is currently no known way to access these values (or at least I don't know of a way) I had to hardcore the total amount of cells per security level.

But the current amount of prisoners per security level is done by counting all prisoners on the map periodically... Basically once every 2 ingame hours (120 minutes)... but only if there are actually any prisoners nearby that are eglible for downgrading/upgrading... but then I do all eglible nearby prisoners at once as long as there are cells available to move them around. It could be done less... but then one risks loading the game in a bad state and the script might not work as intended.
For downgrading I already considered performing a global check only once a day... but it would be very sluggish in response, especially if it has to work in tandem with the upgrader... which only works when the prisoners are actually in the solitary cells. So if the downgrade would only happen once a day then the upgrader couldn't profit from the emptied up cells from the downgrader because the empty cells may get filled with fresh prisoners... maybe leading to a deadlock where prisoner's cant't be upgraded nor downgraded because everything is full.

The mod is pretty nasty since a lot of things are hardcoded and have to be changed for each individual prison, and also the periodic counting of prisoners per security level is even with a "only do when absolutely necessary and as little as possible" implementation still noticeable as lag/slowdown for about a second when the counting is invoked.

I may have some ideas to slipstream both items into one item placed only in the Solitary block... but I'll have to look into that in the next few days because for now I'm too tired.


I really wish the game provided the current amount of prisoners per security level as well as the available/total amount of cells per security level for Lua scripting. Then the lag caused by counting the prisoners would be gone and also some of the hardcoded settings.
I mean the game is about prisoners and we don't even have the bare minimum information about how many prisoners/cells per security level there are. Or at least these properties lack documentation if they exist... I spent 3 days straight googling for guides and references but there are none about that. :roll:
yuk
level2
level2
Posts: 172
Joined: Fri May 20, 2016 5:47 pm

Re: Can I change prisoners security based on reform grade?

Postby yuk » Thu Aug 04, 2016 9:54 am

Is there no way to find the reform grade?

It would be so much better if we could because everyone I've moved to their own cells revolt every morning...they literally riot every time and I have no idea why....so it wouldn't work ha ha.
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Thu Aug 04, 2016 1:38 pm

yuk wrote:Is there no way to find the reform grade?


Not that I'd know of.

The reform grade is calculated internally depending on various properties such as how much time spent working, how much time spent in lockdown, how much time spend well fed, etc... with the exact mechanic not being transparent. At least I never figured out how exactly the game calculates these values and the explanation about how and why is quite shallow. For example I didn't even know until a few days ago that "Sleep regime" counts as "Lockdown" for the grading mechanism because it is nowhere mentioned... and that even though I'm playing the game ever since the early alpha days.

So there is no "reform grade"-value available to mods per se or maybe there is but then it hasn't been documented yet.

A lot of the values the game is using everywhere aren't really accessible. Not even all the stuff that gets saved to the save game. You can't even get the bio with the name of the prisoner and reputations of prisoners, their convictions, recent misconducts or other things like that


But then again the save files have a quite superfluous and botched structure anyways which I would never have done that way... like for example it's completely unnecessary to have a section for each Electricity, Piping and Temperature... why can't the information if a cell has a pipe, electricity or temperature value be saved into the "Cells"-section at the beginning of the save game like most other things that are never going to change their position anyways? Having a seperate table for everything that uses x,y coordinates extensively makes the save file unncessarily longer and thereby bigger because most of the cells WON'T have anything on them so it's just bloated. And the same goes for many other stuff in the save file that should have been organized better/differently so data is stored where it actually belongs. If done the save file would surely be only half the size of now, which would surely speed up the save process.
While most game mechanics work fine it really seems like whoever implemented the save file output really didn't give a shit about order, data structure and tidyness... sorry Chris and other guys, if you ever going to read that, but it's the truth and someone should say it. The save game structure really looks like someone realized "shit we need to save that to the save file" and therefore did it on the last minute before compiling the build without caring that it's an utter mess for external tools and readability as well as future additions/changes. If the game internally manages the data structures in the same messed up way then it's no wonder that modding support is tedious to implement and the performance of the game lackluster for large prisons because all the data is all over the place and always has to be referred over additional ids and pointers which one has to keep track off.
yuk
level2
level2
Posts: 172
Joined: Fri May 20, 2016 5:47 pm

Re: Can I change prisoners security based on reform grade?

Postby yuk » Sun Aug 07, 2016 6:53 am

If the grade is calculated could that mean it's assigned a variable or placed somewhere we can grab at some point? It seems silly to have a grade assigned to each prisoner if it's not going to be grab-able if you understand my drift.

The thing with people with good reform values is they have to wait in line behind the shit heads to get out, which means less money for me. When I go round the prison moving them to their own area I am having between 6 and 12 out a day which means more people can be moved to that area and more people can get out. There's no point having 200 parole rooms if no one will get out, and to be honest I want my re offend rate extremely low so I would like to stop parole for people who have above that percent but not waste time humoring those with higher offending rates because their time served means they have a parole date.

Ultimately I am playing as a reformery and it would be nice to have some capabilities there to grab things like their grading, their crime, their gang info, etc.

I have to agree on the save file ha ha. There's no structure there :/.
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Sun Aug 07, 2016 6:41 pm

yuk wrote:If the grade is calculated could that mean it's assigned a variable or placed somewhere we can grab at some point? It seems silly to have a grade assigned to each prisoner if it's not going to be grab-able if you understand my drift.

The thing with people with good reform values is they have to wait in line behind the shit heads to get out, which means less money for me. When I go round the prison moving them to their own area I am having between 6 and 12 out a day which means more people can be moved to that area and more people can get out. There's no point having 200 parole rooms if no one will get out, and to be honest I want my re offend rate extremely low so I would like to stop parole for people who have above that percent but not waste time humoring those with higher offending rates because their time served means they have a parole date.

Ultimately I am playing as a reformery and it would be nice to have some capabilities there to grab things like their grading, their crime, their gang info, etc.

I have to agree on the save file ha ha. There's no structure there :/.


Every variable/value the game is using for something is somewhere on the game's memory stack... but if it's up to the devs to map these variables/values to the Lua script API so that they can be grabbed or even be manipulated by the encapsuled Lua scripts run on each object (or Mod World scripts with Update 8...).
But it seems like either most of these variables/values aren't mapped to the Lua script API yet (and probably never will be if they really call it a day with Update 8..)... that OR they are mapped but aren't documented yet and nobody has discovered all of them yet.
Some of these values can be "emulated" with custom brute force methods within a Lua script using GetNearbyObject but the lag caused by having to get a huge List of all matching objects and their properties (especially for Prisoners since normally you have quite a lot of them and they have quite a lot of properties each) is unbearable in many cases and it's absolutely redundant to "emulate" something that the game internally has all information about already.
And I'm completely with you on that matter... I wish the API would provide ALL gamestate information to the modding system... even if most of these variables/values would be read-only for the most part, but many of them are really interesting and could be used for a wide variety of mods. Spares to implement a function to gather the information yourself (if it's even possible to get the information in the first place).

By the way... the information about if a Prisoner is a gang member and which gang he belongs to is one of the few things that can be accessed using GetProperty on that Prisoner. But Grading, Crimes, their recent Misconducts, even their Bio (like name, reputations etc) can't be accessed yet.



Apart from that I'm curious how your Prison looks like... Because normally if I build just 6-8 Parole rooms and schedule 6 hearings per room each day (first patch starting at 0:00) then everyone that is eglible for parole (depending on cutoff) will get a chance to be paroled every day. I never had any queue issues there. Don't know what's your cutoff... but I never set it higher than 10%.
Though most of my prisoners have as low as 2% because I'm driving the grading system to its limits... with a special regime, meal setting and room design that maximizes each of the 4 individual ratings (Punishment, Reform, Security, Health) as much as possible. For most prisoners all 4 bars are at maximum and the only real thing that prevents them from being paroled early is their sentence time since they can only be paroled early halfway and 3/4 through the sentence.
The only ones that that do not have 2% yet are mostly the freshly arriving prisoners since they are often addicted to something, etc and the ones that can't be reformed anyways like gang members (but even there you can push the security rating by having armed guards/snipers around almost all day long to push their supression)... or the stoical ones that can't be supressed, or volatile ones that randomly kick off and may cause serious injuries or even deaths.



I could offer you some early access to my mod somewhen (don't know exactly because my interest in modding/playing the game is periodically changing from "do as much as possible" to "nay... can't be arsed to do anything") after Update 8 gets officially released...
It can't access the grading value for a prisoner, but it can access the time without misconducts and use that to change the prisoner category up/down. And with that you can basically group people with the same behaviour tendency together.
With that you can automatically reassign prisoners with long times without misconductions to minsec, making room in Med/MaxSec, while Max sec is for the ones continously misconducting. MedSec is somewhat balanced in between... they may re-offend but usually only after 5-7 days. With that in mind you can basically build most Cells with high grading in MinSec because most people there really deserve it, while in Max Sec you can put the bad cells because they deserve that as well... and in MedSec something on average. So basically the category change can (but isn't required to) work in tandem with the cell grading.

Even my mod has still some way to go it currently works fine with Fill to Capacity intake... because my mod respects how many cells and prisoners there are per security level.
Though the check for the prisoners is a bit laggy... 0.3-0.5 seconds each time, but I only check every other ingame hour currently. There's pretty much nothing I can do about the lag because the lag is caused by having to count all prisoners in the map to be up to date with the current free prisoner capacity per security level. That's why I wish that information would be available to the Lua Script API... if the information how many prisoners there are per security level would be available the lag would be gone. And we know the game has that information available somewhere or otherwise it couldn't display these values in the GUI. :P
yuk
level2
level2
Posts: 172
Joined: Fri May 20, 2016 5:47 pm

Re: Can I change prisoners security based on reform grade?

Postby yuk » Mon Aug 08, 2016 7:41 am

All of these things are such big features....it's so awful they aren't mapped yet. I think they mentioned working on hooks so HOPEFULLY they're going to get that done.


As for my Prison it's 20% cutoff (IIRC, I started a new one ha ha) but there's over 1k prisoners, which makes a queue. I have noticed sometimes prisoners who just arrived are up for parole as well...that doesn't seem normal.

How do you use the rooms etc to maximise? So far I just have dorms and lots of reform programs. It's a huge struggle making sure there's jobs for everyone and that's another reason I want those 2% graders out of there....to let the other guys get jobs. They don't rotate, the same x amount of prisoners get the jobs first. It's not even based on closeness or chance.

Problem with minsec and that is the lower payments. The only reason I am moving guys around is to make space and stop wasting reformery on them lol. I know what you mean about the 8th update causing a huge letdown. I'm not even sure I like what's in it and it's making me really sluggish because I feel like it's not worth it :(.
User avatar
Medu_Salem
level1
level1
Posts: 46
Joined: Fri May 16, 2014 6:42 pm

Re: Can I change prisoners security based on reform grade?

Postby Medu_Salem » Mon Aug 08, 2016 4:36 pm

yuk wrote:All of these things are such big features....it's so awful they aren't mapped yet. I think they mentioned working on hooks so HOPEFULLY they're going to get that done.


As for my Prison it's 20% cutoff (IIRC, I started a new one ha ha) but there's over 1k prisoners, which makes a queue. I have noticed sometimes prisoners who just arrived are up for parole as well...that doesn't seem normal.

How do you use the rooms etc to maximise? So far I just have dorms and lots of reform programs. It's a huge struggle making sure there's jobs for everyone and that's another reason I want those 2% graders out of there....to let the other guys get jobs. They don't rotate, the same x amount of prisoners get the jobs first. It's not even based on closeness or chance.

Problem with minsec and that is the lower payments. The only reason I am moving guys around is to make space and stop wasting reformery on them lol. I know what you mean about the 8th update causing a huge letdown. I'm not even sure I like what's in it and it's making me really sluggish because I feel like it's not worth it :(.


Well I think Update 8 could have been a bit better especially if it is going to be the last Update for now. A last big feature Update and after that only bugfixing if there are some. It's not like they can't come back to the game in the future for DLCs/Addons or whatever and I'd gladly pay another few bucks for that. That said some features in Update 8 are quite nice...

  • Work/Lockdown and Work/Freetime regime slots (which is one I wanted to have for a long time now, even I wish there'd be a regime slot type for "Commonroom" too as an additional alternative to Yard to have more variety, especially in a shared zone prison with rotating regimes.)
  • The TV/Radio rework
    [*Long awaited Menu rework (though I would also have liked to see a rework of the Reports because the Reports book is really clusterf*cked sometimes and some of the tabs cause huge delays when open. On top of that they don't provide nearly enough information on how your prison is actually doing... you don't even have statistics on how many prisoners per security level released in a time period and all such things. Yeah the grading menu is doing that a bit but pretty shallow to say at least.)
  • World Scripts for modding (though I still have to check them out once I'm migrated to Update 8. I'm already curious how useful they are going to be... and if one is able to refer to "this" Properties set on that script outside with other scripts)
  • Various other small improvements/bug fixes which are always welcome.

Too bad we can't just pick up the game once they stop development and implement everything lacking with mods because most of the stuff in the game seems pretty much hardcoded to me... A lot of the things seem to be compiled into the .exe which means that most of the things can never be modified or extended upon.



By the way... Payments for MinSec are only lower on FIRST Intake... but the DAILY federal grant per prisoner is the same for every Security level... so if you decide to downgrade a MaxSec Prisoner to MinSec you don't lose money at all... They changed that behaviour a long time ago because people where abusing the system by manually recategorizing MinSec prisoners to MaxSec = Profit.
That mechanic is good because of this behaviour my mod can recategorize Prisoners based on Good behaviour time and I don't lose any money because of changing a prisoner's category... and since the automatic recategorizing priorites downgrading prisoners from higher security levels to lower security levels it constantly makes room in the higher security levels (meaning more intakes of MaxSec than MedSec than MinSec, with MinSec only being taken in if there is noone egligble for downgrading at the time of intake).

For a while I thought that the dailay federal grant should be based on the time without misconduct or on the seriousness of the crimes comitted or something, but I guess that that would be less transparent and there would have to be some information on a prisoner's repsheet how much that particular prisoner is worth every day and why... and for the total federal grant each day sum up the indivudal grants per prisoner.



As for using the rooms to maximize:

For Reform Rating I'm using that guy/girls (can't decide because the name sounds girly but I'm not sure because I don't know him/her :D ) prisons as example/inspiration for my own prisons:
http://steamcommunity.com/profiles/7656 ... crollTop=0
That player has a lot of concept prisons... some are quite interesting in design and layout. The player is often building absolutely every possible item for need satisfaction everywhere... in Canteens/Yards/Cells etc. And thereby the prisoners are "happy" most of the time, which encourages them for reform programs... which means the Reform rating skyrockets.
Also I'm scheduling at least 6 hours (currently I'm experimenting also with 8 hours) of work every day so that prisoners who are still not convinced to do reform programs at least get a high reform rating by working a lot.

The Health Rating is upped by having High Quality/High Quantity food at least 2 times a day. I have 2 x 2 hours of Eat spread over the day. (In the morning after shower, and 8 hours later again). The well fed status effects caused by the 2 Eat times are barely enough to push the Health rating to 5.

Security Rating is pushed by having enough Lock Up over the day. I think currently I'm using 6 hours of sleep + 4 hours of Lock Up every day. the 4 hours of Lockup are 2 x 2 hours spread over the day after the work hours, followed by Yard time... so that their freedom need doesn't rise too much. The rest is done by random supression due to Solitary. I currently put gang members all to SuperMax... and everyone in SuperMax is under Armed Guard supression pretty much 24/7 (if their rep isn't stoical, then nothing helps anyways)... that takes the air out of the gang members.

The Punishment Rating normally goes up by long sentence time itself, but is also affected by the Lock Up regimes.


That said I'm using a shared zones prison... with rotating regimes so that the MinSec, MedSec, MaxSec and SuperMax prisoners almost never meet. Only the cellblocks for the 4 security levels, which are like 4 quadrants, are designated.
They share a centered work/reform area... and it's rotated around in 4 hour shifts. First MinSec 4 hours, then MedSec 4 hours, then MaxSec 4 hours and repeat... so the Work/Reform area is in use 24/7.
The single shared centered canteen is used in that rotation scheme, which means my two providing Kitchens are preparing meals pretty much 24/7... and since there is always someone prisoners working there it's maximizing their efficiency.
I have 2 yards... each is shared by two Security Levels.... MinSec+MedSec and MaxSec+SuperMax, using zoned airlocks so that only the 2 types can enter. Only one security level is present in the yard due to the regime rotation. It's basically to get the prisoners away from the work area or canteen to make room for another Security level.
Basically 1 Security Level is Locked Up, 1 Security Level is Eating, 1 Security Level is working, 1 Security Level is in the Yard... rinse and repeat.
The guards move with the Security levels... so if the SuperMax people are locked down in the cell block the armed guards are patrolling there. If they are in the Yard the Armed guards move with them to the yard. If they are in the Canteen they move with them to the canteen.
Generally I'm using quite a lot of zoned airlocks for doors so that only a particular Security level can enter through that door... and with that directing/regulating the flow of prisoners.

And now to the best part: Since the Gangleaders try to stay out of fights almost 100% the time they have a long time without misbehaviour. I currently have an additional 3 prisoner SuperMax Cellblock just for the 3 Gang Leaders that is entirely encapusled from the rest of the Prison (surrounded by Staff Area)... the area provides everything to keep the Gang Leaders happy. The cells have a rating of 10, so it's almost guranteed that only the gang leaders deserve them since they are the only SuperMax Prisoners that can make it for more than 10 days without misconduct due to their "don't interfere" behaviour. With that I ensure that they can never recruit anyone else to their gangs, but the gangs don't go mad... because their Leaders aren't locked down. They are just seperated. :D

It's designed for 240 prisoners in each Min/Med/Max/SuperMax, since I'm always using packets of 20 cells (10 on each side of the hallway, a habit I developed due to Small Pipe length). Together with the Protective Custody wing and DeathRow which are seperate it has a prisoner capacity over 1000. My computer's processor basically can't handle more than that since it's only a first generation i7 860, after a 1000 prisoners the slowdown becomes unbearable... and it used to be unbearable with 400-500 already before the performance updates. And yeah... the 240 SuperMax cells for gang members are quite filled up due to how many Med/Max Sec prisoners already arrive with that trait. I think the chance is 30% or something?

It's what I personally call the Ultimate Layout + Ultimate Regime.

It's not yet finished and I might have to rebuild it from scratch since I'm waiting for Update 8 to get "stable" and some changes would make it easier to rebuild than to adapt. I hate adapting/rebuilding stuff when the game has already slowed down to a crawl due to performance problems, I rather build the prison from scratch then and profit from the performance as long as there aren't staff/prisoners yet. But if it is ready I may upload a picture album to my own Steam Account.
elDiablo
level5
level5
Posts: 3111
Joined: Thu Mar 14, 2002 12:23 pm
Location: London, UK

Re: Can I change prisoners security based on reform grade?

Postby elDiablo » Tue Aug 09, 2016 8:34 am

Just a quick reply to a few things in this post:

- In regards to the reoffending rate, it is calculated per prisoner using a pretty complex formula based on their experience in the prison and a lot more. I could add a (read-only) value to the prisoner's table to return this calculated value if people want. The reason it's missing at the moment is that all shown variables are member variables of the prisoner (or WorldObject) class that we hold in a data registry for quick loading/saving/lookup/etc. As the reoffending rate isn't a variable, it doesn't exist in there. Shouldn't be too much to get the grade as a read only variable though.

- The save file is the way it is due to legacy. One thing we decided was important very early on in PAs development was the ability to have a save file work all the way through development. We never wanted to say to people, "oh, by the way, that prison you spent 100 hours on? Yeah, that's gone...". This, combined with the way the systems work in the game (for example, the water system keeps it own information separate from the cells it affects), mean that the save file does have a lot of duplication, as you pointed out, of x,y position. It's a trade off we made to have the compatibility over a save file increase. We also write it out as plain text (rather than binary format) so that it is human readable and players can look through and play with it if they want.

Hope that lets you know our thoughts on why some things are the way they are :)
yuk
level2
level2
Posts: 172
Joined: Fri May 20, 2016 5:47 pm

Re: Can I change prisoners security based on reform grade?

Postby yuk » Tue Aug 09, 2016 8:46 am

OH my god that's so annoying LOL!! I thought it was per day ha ha. This whole time I could have had min sec and saved myself the hassle!

Her (I'm going with Lissa being feminine ha ha) prisons are huge! Very impressive, I will have to look it over. I take a similar approach but I like to redirect my prisoners to different zones...

For example...this one is called Reformery, but I've since learned how to make dorms better (look at my max sec area) so I started a new prison to give that a go. The prisoner flow is not so 100% in my new prison but I am working on it.
http://imgur.com/a/pl4BX

The schedule there goes that lockup is 12-6, then shower, then lockup. This ensures everyone in the dorm has showered while giving them time to tend to other needs. They then go to yard for 1 hour then into eat. After eating they go to work for 4 hours. After work they lockup for 2 and freetime for 2 (this ensures everyone is in their own cell and won't travel to the closest and overflow them) then back to work (with all their needs met) for 3 hours. Finally they eat for 2 and then lockup again. It works very well.

All my canteens have toilet and shower blocks in them. My yards too. Both yards and canteens have phones. Dorms have radios and tvs etc so I don't like to add them elsewhere (so the rooms grade well). I usually prefer all prisoners to go through an infirmary to get to a canteen or their doorms but this prison I tried something different (and regretted it greatly). I like to feed them before bed so they don't wake up pissed and cause shit.

I tried using a shared space with rotating schedule but the issue is supermax won't work and there's nothing else for them to do...so they go into the canteen or the yard and wander around. They are SO FRUSTRATING. Your system sounds amazing! I'd love to see it :D. What's an airlock? Sounds interesting I may experiment with zoned hallways/doors to see how that turns out too :D.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 4 guests