Prison Architect

Prison Architect

Not enough ratings
Materials.txt – Equipment – Prison Architect
By leftbehind
This guide shows how to define equipment (contraband, tools, weapons) in materials.txt...
   
Award
Favorite
Favorited
Unfavorite
Introduction
Equipment items cover all tools, narcotics, luxuries and weapons in the game. They do not appear on any menu but are instead found in rooms (contraband), on entities (equipment) and sometimes even smuggled in to the 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 Equipment Definition
To give a quick overview, here's an example definition of some equipment that comes with the game:

BEGIN Equipment Name Shank Sprite HandKnife AttackPower 9.00000 RechargeTime 3.00000 Properties Weapons Properties Metal Properties Tools Properties Improvised END

There are a few other properties that we'll cover later, but the example above covers the basics.
Physical Attributes
Properties – Metal

Should this equipment trigger metal detectors?
  • Optional: Defaults to not triggering detectors
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Metal

Properties – Smelly

Is this equipment detectable by dogs?
  • Optional: Defaults to not detectable by dogs
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Smelly

TwoHanded

Does this equipment require both hands to use?
  • Optional: Defaults to false (one-handed use)
  • Value type: Boolean (true or false)
  • Singleton: Can use only once per definition
  • Lua script: Not accessible
Example:

TwoHanded true

RechargeTime

What is the delay (in game seconds) between uses of this equipment?
  • Optional: Defaults to 0.0
  • Value type: Number >= 0
  • Singleton: Can use only once per definition
  • Lua script: Not accessible
Example:

RechargeTime 4.00000
Delivery Attributes
Properties – NoImport

Prevent this equipment being imported (smuggled or thrown)?
  • Optional: Defaults to allowing imports
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties NoImport

Properties – Improvised

Can this equipment be improvised (eg. a wooden pickaxe can be improvised in the workshop) by prisoners?
  • Optional: Defaults to not improvised
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Improvised

Not sure how this works yet, will update when I find out.

Other delivery methods

Staff and other entities can have equipment (see Materials.txt – Entities for details). If they get attacked they will sometimes drop that equipment.

Rooms can be sources of equipment (see Materials.txt – Rooms for details). Prisoners gaining access to those rooms can steal the equipment.

Some materials can be purchased from shops or become available due to production processes.
Tools Attributes
Properties – Tools

Can this equipment be used as a tool?
  • Optional: Defaults to not being a tool
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Tools

Not sure how to invoke the use of a tool yet, will update when I work out how.
Contraband Attributes
Properties – Narcotics

Is this narcotics (eg. drugs, booze) equipment?
  • Optional: Defaults to not being narcotics
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Narcotics

Properties – Luxuries

Is this luxuries (eg. mobile phone) equipment?
  • Optional: Defaults to not being luxury
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Luxuries
Weapons
Properties – Weapons

Can this equipment be used as a weapon?
  • Optional: Defaults to not being a weapon
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties Weapons

You need to define this property in order to use any of the following 3 properties...

AttackPower

How much damage does this weapon do?
  • Optional-ish: Defaults to 0.0; for weapons it should always be > 0
  • Value type: Number >= 0.0
  • Singleton: Can use only once per definition
  • Lua script: Not accessible
Example (based on scissors which have low attack power):

AttackPower 1.00000

Certain traits of prisoners can multiply attack power.

Properties – RangedWeapon

Can this weapon be used for ranged attacks?
  • Optional: Defaults to not melee weapon (direct contact)
  • Value type: Bitmask
  • Multiple: You can define multiple "Properties" per definition, one for each value required
  • Lua script: Not accessible
Example:

Properties RangedWeapon

Range

The range (in map tiles) of the weapon.
  • Optional-ish: Defaults to 0.0; for ranged weapons it should always be > 0
  • Value type: Number >= 0.0
  • Singleton: Can use only once per definition
  • Lua script: Not accessible
Example (based on assault rifle which has very long range):

Range 40.0
Sprites
Will complete this section later.

SpriteScale

Used to tweak the size of the equipment sprite.
  • Optional: Defaults to 1.0 (normal size)
  • Value type: Number > 0.0
  • Singleton: Can be used only once per definition
  • Lua script: Not accessible
Example:

SpriteScale 0.6

A scale smaller than 1.0 will shrink the sprite, a scale larger than 1.0 will enlarge the sprite.
1 Comments
leftbehind  [author] 1 Dec, 2015 @ 2:53pm 
Before doing anything with sprites I strongly suggest reading about this major limitation of the modding system: http://forums.introversion.co.uk/viewtopic.php?f=88&t=50923