Prison Architect Guide

[UPD] Circuits. Memory, counter, better airlock. For advanced players. for Prison Architect

[UPD] Circuits. Memory, counter, better airlock. For advanced players.

Overview

UPDATE: TWO NEW AIRLOCK TYPES and some more useful electronics circuits. Hi everyone. Unfortunately, there are very few decent guides about electrical circuits in the game. Or am I missing something? I’m not expert, but imo we should share ideas with each other even if they are far from perfection. There definitely are some problems with logic gates in the game right now. For some unknown reason one of two completely identical devices may work while another doesn’t. Although it’s rather rare occasion, it drives me crazy sometimes. Another thing about logic – for now its use is very limited. We can only turn the lights on and off, open the doors and that is all. Characters will rush to the closed door anyway, even if there’s an open one right next to it. I hope we can make up some new uses for it together.

Introduction and useful links.

If you don’t know how do logic gates work, please consider reading this beautiful guides before going to the next section:

  • [link] – gates basics and some applications by christopher1006, explained in detail
  • [link] – same basics much shorter, videodemonstration by ProphetBeal
  • [link] – building a sally port with some logic by RGeezy911
  • [link] – some great ideas, automated prison security by Onaka, KERNBOOM and others. I’ll try to improve some of their designs.

Excuse me in advance, english isn’t my first language, so there may be some ridiculous mistakes.

Same goes for the logic itself, I’m not professional in logic circuits, so I may be sloppy sometimes.

This community seems to be nearly abandoned, that is why I will explain things briefly and only go full-detailed explanation if someone requests it.

Memory bit

The design is quite simple, SET signal goes from the right switch, RESET – from the top one.

The reset signal must be TRUE for the memory to work, FALSE is what actually resets it. The AND gate can be replaced with XOR if you wish to reset it with TRUE signal instead.

Both logic gates stay on even after the SET signal is gone. To reset the memory, we flick the upper switch to false.

Primitive timer

For some reasons indicator lights go off much-much longer than they go on. AFAIK this delay is the longest we can have with single logic object in a game. Not dead sure though. For some reasons some people use door servos for delays, but they are bulky, noisy, 4 times more expensive and not that aesthetic. Is the delay any bigger? dunno.

The most simple large delay is the circle (square in our case) of indicator lights connected together with odd number of NOT gates involved. One will be enough.

All the light get turned off one by one, then it affects the not gate and they pretty quickly go on one by one.

Any number of lights can be used, less for shorter delay, more for longer.

In most cases I use one indicator light with one NOT gate as a slow clock generator. The full cycle lasts about 1,3 ingame minutes.

Pulse gen

There are many cases where we need short pulse, even without complex electronics. For example, if I only want to open a door for a short period of time, I use pulse.

The switch connects to the bottom NOT, it is connected to the top one. Both NOTs connect to nor on the left and and on the right.

There are short periods when the signal haven’t been received by the top NOT, so they both stay red for a moment (when the switch gets ON) or green (when if is turned OFF). So, when you change the state of a switch, either NOR or AND gives of a short pulse.

In most cases only one of them is needed.

Counter

The counter can be assembled pretty easily with elements we already have: memory, pulse and clock.

Here is 4-register counter, it can store a number from 0 to 15.
By doubling the number of register (which is very easy to do, scheme doesn’t get any more complex with register addition) that range become 0 to 255 and so on.


Here’s what it’s made of and how it works:

  • the yellow outline contains short-delayed clock gen
  • its output goes to the pulse generator, where the signal gets conveniently short
  • memory unit is outlined by a pink frame. It is set by a pulse gen.
  • reddish frame shows… i don’t know how to name this segment, i’m not professional in that sphere, like i said. It is needed =)
  • When the AND inside the red frame get input signal from the pulse gen and reads the indicator light (connected to the memory) true signal, it gives sets the next register and resets current one by sending signal to NOT (which is memory reset)
  • exactly the same happens with all the other registers, except that they receive their input signal from the previous and, not the pulse itself.

I do know, that XOR memory may be used instead of NOT-AND conjunction, but for some reason, XOR variant isn’t reliable enough for me. Sometimes it does work as it should, sometimes it does not. But, yes, i agree, it is a bit more compact and cheap. Here is compacted version:

Using the same logic we can create bidirictional counter, here it is:

For some reason it didn’t work properly until i added top layer of ANDs, which now work as short delay.

I’d be cool if someone comes up with better design.

Typical Airlock problems

The benefits of using the airlock is obvious, but all the airlock designs I saw so far share the same problem – the doors close-open at the same time.

First of all, we cannot actually find out whether the door is closed or open using logic for now. If the door is blocked by something or someone and cannot close, the servo will still send low (false) signal. That’s a shame.
The second thing is that when doors open and close at the same time (using not gate in between two servos), sometimes it is completely possible to rush through both doors without stopping, which makes that kind of defence a bit ineffective.

That is especially true for high traffic areas. To decrease chance of that, some airlock creators enlarge airlock inner space. It helps a little, but even being blocked inside a large room one can run in circles to avoid the guards. That is completely possible.

The first problem can be partly dealt with by adding multiple doors, so that even if some got blocked, the other still work as they should. But what can we do with the other?

That is where my airlock designs appear. They are very (VERY) far from perfect, but i hope you will help me make them better.

Dumb one

The timed airlock (or the dumb one) is much easier than the other one and so far if stopped all the (metal and smelly) contraband completely on my test prison.

That’s 7 days contraband found info of my 4 cell blocks (25 cells each):

First two

And the second

I believe there’s only 3 poison bottles and 1 drug item inside the cells. Also, it looks like some prisoners where pretty close to the cell block, when the guard finally caught them.

I know, the design isn’t perfect, but I think 4 items in seven days smuggled in by 100 prisoners in good enough for the start.

And don’t pay attention to the keys and batons found, that was legendary f***er accident.

Here’s the airlock area:

The idea of dumb airlock is very easy, and that is what makes it so reliable and not so traffic-friendly.

In contrast with ussual door->not->door technique, this one keeps both doors closed for couple of seconds before opening one of them. Guards and god handlers use that time. I make the interrior pretty cramped so escape mode player will not be able to run in circles and avoid guards.

The sequence is simple:

  • the left door opens for 1 sec
  • both doors are held closed for 2 sec
  • the right one opens for 1
  • both closed for 2 again

In the worst case scenario a character can wait spend about 6 seconds.

How to compare numbers

As we desire to create binary numbers based timer airlock, we need to compare them easily.

Here is the last counter design I came up with, both compact and reliable:

The right part is switch-controlled pulse gen, the left is updated and simplified 4-digit counter block. I took away the indicator lights, they were there just to make it a bit more obvious. I also made memory bits a little more optimal for our purpose.

If doesn’t work properly for you, consider connecting it in the following order (for each register):

  1. XOR to middle AND
  2. middle AND back to XOR
  3. middle AND to top AND
  4. top AND to the next register AND and XOR.

Looks like game sends the output signals one by one, not simultaneously. If believe this design will work fine even with random connection order, but not dead sure. But i’m positive about “correct” order.

If you need any detail and explanations, don’t hesitate to tell me.

The design above lacks “reset” button, which is added here:

FALSE signal to all memory ANDs will reset them to 0s.
Of course, that signal may (and should) be fired by something else than a manual switch.

Finally, how do we compare things??

Counter memory contains the first number. Nine in our case.
The vertical row of four switches represent the second. It’s twelve.
We need four XOR gates to compare four registers, each of them gets input from both corresponding bits. Xor gives output 0 if both of them are either false or true.
If numbers are the same, all four XORs will give out FALSE, lighting up the NOR on the right, together with the indicator we connected to it.

Why the hell do we need such complicated things? What’s benefit?

Variable timer airlock

Firstly, here is the same scheme with all the logic elements moved to the left:

Then, another number to compare is added to the right. Also, I added a pulse gen to each comparer block output:

The left number is still 12, the right one is 3. There is no any sense in this number right now, just random ones.
Anyway, the left pulse will happen at the counters 12, the right one – at 3.

We can easily make that pulses door control signals:

VT Airlock benefits

First of all, variable timer airlock is a very good device to gather experimental data.
We need more data about traffic impact and contraband detection rate.

But you already guessed it, it shouldn’t actually be used with switch-input.
The simplest thing to do is install door timers instead of switches, airlock will behave differently depending on time of day. For example, it may be wide open when prisoners go to canteen, but only let them pass after a strict inspection, when they head back from workshops to cell blocks several hours later.

Another thing is, of course, some more logic, changing the delays based on how much guards are inside and so on. I’ll publish that ideas together with coming anti-escape electronics post.

It is very easy to change counter max number with same comparing block and “reset” button.

So, VT airlock is:

  • flexible
  • efficient (if tuned correctly)
  • traffic friendly (if tuned correctly) (comparing to the more simple versions)
  • upgrade friendly
  • easy to build (there quite much elements, but logic underneath them is very easy)
  • still extremely reliable (failure possibility is miserable, unless tuned poorly)

Simple smart airlock

This one is flexible at all, time delays cannot be changed based on time of day or some other input, but it is much easier to build than the smartest version, which i will cover much later.
The main benefit is that its logic reacts to pressure plate states, making wait time as little as possible.

It only slows traffic a tiny little bit, still being very effective at detecting contraband.

Of course, in needs some optimisation for now, the connection scheme looks pretty messy:


At the same time, logic beneath it is rather simple. One can easily distinquish pulse gens above door blocks, primitive timer (with some special additions) in the center, SR-latch below it and six different door opening conditions, 3 for each side (two ands and one nor both top right and top left side) connected to the pulse gen. There are also manual debug switches on the pictures, they are not needed for airlock to work.

The conditions are:

  1. if outer this side pressure plates are pressed and all other are inactive.
  2. if outer plates are active on both sides, inner plates give of FALSE, sr-latch is directed towards this side
  3. at least one of inner pressure plates is pressed, delay passed already, sr-latch is directed towards this side

It works just nice.

To sum it all up, simple smart airlock is:

  • effective at detecting contraband
  • simple to understand, simple to build
  • one of the best in high-traffic areas
  • pretty reliable
  • not flexible at all
  • hard to upgrade
SteamSolo.com