Prison Architect Guide

Materials.txt - Rooms - Prison Architect for Prison Architect

Materials.txt – Rooms – Prison Architect

Overview

This guide shows how to define rooms in materials.txt…

Introduction

Rooms are areas which can be drawn in buildings, and sometimes outdoors, that define the specific use of that part of your prison.

Note: This is an add-on to the main Materials.txt – Overview guide – if you are new to modding PA, it’s recommended that you read that guide first to get a basic understanding of how materials.txt works.

Example Room Definition

To give a quick overview, here’s an example of a room definition from a mod I’m working on:

BEGIN Room Name AssemblyArea BEGIN Requirement Type Outdoor END BEGIN Requirement Type Secure END BEGIN Requirement Type MinimumSize x 3 y 3 END BEGIN Requirement Type Object Id FirstAidKit END BEGIN Requirement Type AdjacentObject Id EmergencyExit END BEGIN Requirement Type AdjacentObject Id AssemblyPoint END BEGIN LikelyObject Id FireExtH2O END BEGIN LikelyObject Id Bin END BEGIN LikelyObject Id Bench END BEGIN LikelyObject Id PhoneBooth END BEGIN LikelyObject Id Cctv END BEGIN Contraband Id Cigs END BEGIN Contraband Id Lighter END BEGIN Contraband Id CleaningBrush END BEGIN Sprite x 6 y 2 h 2 w 2 END END

Physical attributes

MinimumSize (requirement)

Does the room have to be a minimum size before it becomes operational?

  • Optional: Defaults to minimum of 1×1
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

BEGIN Requirement Type MinimumSize x 3 y 2 END

The example above requires the room to be either 3×2 or 2×3 before it becomes oprerational.

Note: You can place rooms smaller than the minimum size, but they won’t be usable until you make them greater than or equal to the minimum size.

RequiresSector (properties)

Is this room treated as an individual sector (security zone) even if it’s not enclosed by walls and doors?

  • Optional: Defaults to not being a unique sector
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

Properties RequiresSector

An example in the vanilla game is the canteen.

Enclosed (requirement)

Does this room need to be enclosed by walls and doors around its edges before it becomes operational?

  • Optional: Defaults to not requiring walls and doors
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

BEGIN Requirement Type Enclosed END

Secure (requirement)

Does this room need to be secured (no escape routes) before it becomes operational?

  • Optional: Defaults to not needing to be secure
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

BEGIN Requirement Type Secure END

Placement attributes

Indoor (requirement)

Can this room only be placed indoors?

  • Optional: Defaults to not requiring indoor placement
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

BEGIN Requirement Type Indoor END

Outdoor (requirement)

Can this room only be placed outside (not in a building)?

  • Optional: Defaults to not requiring outdoor placement
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

BEGIN Requirement Type Outdoor END

Research

Which research is required before the room can be placed?

  • Optional: Defaults to none
  • Value type: Srting (research id as defined in research.txt)
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

Research PrisonLabour

Content Attributes

These properties define which objects should be in (or next to) the room, and whether those things are mandatory for the room to become operational.

Note: The ‘RoomSpecific’ property of an object (as defined in Materails.txt – Objects & Utilities) will hide it from the objects menu until a room which mentions it (either as ‘LikelyObject’ or ‘Object’ in the room definition) is visible near the middle of the map window.

Contraband

What items of contraband might prisoners find in this room?

  • Optional: Defaults to no contraband
  • Value type: Bitmask
  • Multiple: You can define multiple “Contraband” per room definition
  • Lua script: Partially scriptable – eg. see Equipment property of entities. Not yet tested to see whether contraband can be spawned, deleted or located.

Example:

BEGIN Contraband Id Cigs END BEGIN Contraband Id Lighter END

See Materials.txt – Equipment for details on how to define contraband items.

Object (required)

Which objects must be placed in the room for the room to become operational?

  • Optional: Defaults to no mandatory objects
  • Value type: Bitmask
  • Multiple: You can define multiple “Object” requirements per room definition
  • Lua script: You can spawn, delete, detect and fully interact with objects via scripts.

Example:

BEGIN Requirement Type Object Id FirstAidKit END

See Materials.txt – Objects & Utilities for details on how to define items that can go in rooms.

AdjacentObject (requirement)

Does an object need placing adjacent to the room (eg. in or on a wall surrounding the room) before the room becomes operational?

  • Optional: Defaults to no mandatory objects
  • Value type: Bitmask
  • Multiple: You can define multiple “Object” requirements per room definition
  • Lua script: You can spawn, delete, detect and fully interact with objects via scripts.

Example:

BEGIN Requirement Type AdjacentObject Id EmergencyExit END

An example in the vanilla game is the shop front that’s needed next to a shop.

Note: In most cases you’ll need to allow the object to be placed in or on a wall via it’s definition in materials.txt. For more information on how to do that see Materials.txt – Objects & Utilities.

LikelyObject

Which optional objects are likely to appear in the room?

  • Optional: Defaults to no likely objects
  • Value type: Bitmask
  • Multiple: You can define multiple “LikelyObject” per room definition
  • Lua script: You can spawn, delete, detect and fully interact with objects via scripts.

Example:

BEGIN LikelyObject Id Bin END BEGIN LikelyObject Id Bench END

See Materials.txt – Objects & Utilities for details on how to define items that can go in rooms.

Interaction Attributes

Capturable

Can this room be captured by gangs?

  • Optional: Defaults to false
  • Value type: Boolean
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

Capturable true

PrisonerCanWork (property)

Can prisoners work in this room?

  • Optional: Defaults to no prison labour
  • Value type: Bitmask
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

Properties PrisonersCanWork

Qualification

What qualification do prisoners require before they can work in the room?

  • Optional: Defaults to none
  • Value type: String (qualification id)
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

Qualification KitchenInduction

Workgroup

Which workgroup is associated with this room?

  • Optional: Defaults to none
  • Value type: String (workgroup id)
  • Singleton: Can be used only once per room definition
  • Lua script: Not scriptable

Example:

WorkGroup Library

Note: I’m still not entirely sure how workgroups are set up and used; they don’t seem to be mandatory for rooms that allow prison labour. If you know please post details in comments at end of page.

Sprites

Room sprites are difficult to implement because you have to overwrite one of the main game files rather than using a separate sprites.png; this means that only one mod at a time can update room sprites (epic fail!). Details will be added at a later date.

SteamSolo.com