Proc:Vault

From WikiName
Revision as of 23:53, 27 January 2016 by Teker (talk | contribs) (Created page with " = Overview = The vault procedure allows players establish their own customizable rooms and to store items in vaults. Vault rooms are created by Proc:Neighborhood when a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

The vault procedure allows players establish their own customizable rooms and to store items in vaults. Vault rooms are created by Proc:Neighborhood when a player issues a BUILD command.


KVP

The vault proc uses KVP to store some values related to the capabilities of the vault. These KVP values are:

Key Description
CFG_ID Standard proc key - must be set to 1.
PROC_NUM Standard proc key - must be set to 4.
PROC_ENABLED Standard proc key - must be set to 1.
PROC_CAN_READ Standard proc key - set to 44.
ROOM_FLAGS Flags pertaining to the room.

1 = Entry Room

VAULT_COMBINATION Combination to unlock the vault.
VAULT_CAPACITY Number of slots available for storing equipment in the vault. New vaults receive 20 slots. The maximum available for purchase is a total of 40 slots.
MODULE_FLAGS Flag value indicating which upgrade modules have been purchased.

1 = Say Recall
2 = Keyless Entry

KEYLESS_PHRASE Phrase used to enter/exit the vault.
KEYLESS_PERMIT Colon separated list of players allowed to enter the vault using the keyless entry phrase.


Database Tables

RoomOwners

The RoomOwners table contains fields regarding the owner of the room. Currently, owner status is only used for vaults but could be used in other ways in the future.


VaultItems

The VaultItems table contains the list of items currently stored in the vault.


Upgrading from Old Code

The steps required to upgrade a vault from the old code are:

  1. Have the player empty the vault
  2. upgrade! vault <player>
  3. setroom owner <player>
  4. unlock vault
  5. Have the player put their items back in the vault
  6. Have the player lock vault <new combination>