Skip to content

New Contributor Guide Computers

Mark Langsdorf edited this page Jun 18, 2020 · 1 revision

Feature introduced in #20770

Mapping

Creating computers through mapgen uses one of two methods:

  • Mapping
  • Direct placement

TODO: Describe how to do mappings and direct placement in some doc

Example of mapping:

"furniture": {
  "b": "f_bench"
},
"computers": {
  "6": {
    "name": "Evac shelter computer", "options": [
      { "name": "Emergency Message", "action": "emerg_mess" },
      { "name": "Disable External Power", "action": "complete_mission" },
      { "name": "Contact Us", "action": "emerg_ref_center" }
    ]
  }
}

Regardless of method used, the actual computer object has the following fields:

  • "name" (mandatory) - the displayed caption of the computer
  • "options" (mandatory) - list of "functions" this computer has
  • "failures" (optional) - what happens when hacking fails
  • "security" (optional) - integer value describing the difficulty of hacking this computer

Options

Each option is an object with the following fields:

  • "name" (mandatory) - the displayed string describing the option
  • "action" (mandatory) - what does this option do (see list in section below)
  • "security" (optional) - as per whole computer, except just for this option

"action" should be one of the following:

  • "open" - turns locked metal doors into floors in radius 25
  • "lock" - turns closed metal doors into locked metal doors in radius 8
  • "unlock" - turns locked metal doors into closed metal doors in radius 8
  • "toll" - causes 120 volume noise
  • "sample" - if there is a sewage pump in the reality bubble, fills all containers on counters next to it with sewage
  • "release" - turns reinforced glass into floors in radius 25 and causes 40 volume noise
  • "release_bionics" - turns reinforced glass into floors in radius 3 and causes 40 volume noise
  • "terminate" - kills all monsters surrounded from above and below by concrete walls or reinforced glass
  • "portal" - for every 5x5 block on the z-level that has 4 or more radio towers, spawns a portal in the middle of it or removes a portal if it was there
  • "cascade" - randomly spawns monsters, fields and small explosions near radio towers
  • "research" - prints random flavor text based on position of the console
  • "maps" - reveals map in radius 40 (in overmap tiles) on z-level 0
  • "map_sewer" - reveals sewer or sewage overmap tiles in radius 60 on current z-level
  • "miss_launch" - asks for an overmap tile and launches a nuke there. Never fully implemented, so it's a very underwhelming nuke (kills all NPCs but no monsters)... Removes nearby nuke tiles
  • "miss_disarm" - shuts down the console
  • "list_bionics" - prints all bionic items lying on the map on current z-level
  • "elevator_on" - turns all offline elevator controls on current z-level into online ones
  • "amigara_log" - prints hardcoded flavor text
  • "amigara_start" - starts amigara event and removes this option from console
  • "complete_mission" - completes a step of a mission with a name that EXACTLY matches the name of this option. That is, "name" fields have to be identical (including translation!).
  • "repeater_mod" - consumes a repeater mod item and completes a mission step of mission with name "Install Repeater Mod" or fails if player has no repeater mod
  • "download_software" - puts software (mission item, mission is dependent on console) in an USB drive in player's inventory
  • "blood_anal" - if there is a vacutainer with zombie blood in 5x5 square centered at console, acts like "download_software" above, otherwise prints text and fails
  • "data_anal" - if there is a black box on nearby blue floor tile (terrain type, not dependent on display colors), spawns a transcript item. Fails otherwise.
  • "disconnect" - prints flavor text
  • "stemcell_treatment" - causes stem cell treatment effect for 120 turns and 40-90 pain
  • "emerg_mess" - prints flavor text
  • "emerg_ref_center" - finds nearby refugee center and, if possible, reveals a road-only route to it
  • "tower_unresponsive" - prints flavor text
  • "sr1_mess" - prints flavor text
  • "sr2_mess" - prints flavor text
  • "sr3_mess" - prints flavor text
  • "sr4_mess" - prints flavor text
  • "srcf_1_mess" - prints flavor text
  • "srcf_2_mess" - prints flavor text
  • "srcf_3_mess" - prints flavor text
  • "srcf_seal_order" - prints flavor text
  • "srcf_seal" - wrecks nearby terrain (hardcoded types only) and covers them with rubble
  • "srcf_elevator" - if player has "sarcophagus_access_code" item, acts like "elevetor_on", otherwise fails

Failures

Failures happen on unsuccessful hacking. Failures are picked at random, with no weighting. If no failure is specified and a hacking fails, the "shutdown" action will be executed.

Failure object has only one field:

  • "action" (mandatory) - failure action to execute on failed hack

"action" must be one of:

  • "shutdown" - turns first (starting from upper left corner, going left then down) console adjacent to player into a broken console
  • "alarm" - causes 60 noise and WANTED event (like breaking glass in banks)
  • "manhacks" - spawns 4-8 manhacks in random spots in 7x7 square centered on player
  • "secubots" - spawns 1 secubot on a random spot in 7x7 square centered on player
  • "damage" - causes 1-10 damage unless player is immune to electricity
  • "pump_explode" - causes sewage pumps on the z-level to explode
  • "pump_leak" - turns 4-10 contiguous, passable tiles near every sewage pump to turn into sewage tiles
  • "amigara" - causes amigara effect (as successful start), but makes it happen faster and also causes small explosions
  • "destroy_blood" - if there is a nearby centrifuge with vacutainer with blood in it, destroys the vacutainer and blood
  • "destroy_data" - if there is a nearby blue floor with USB drive with software on it, destroys the USB drive and software
Clone this wiki locally