Included with Purchase
Plugin Download
Instant access to the plugin file (.dll)
Future Updates
All updates and fixes at no extra cost
Developer Support
Help through our forum and Discord
Optional: Source Code
Add-on in cart for an additional fee
Readme

Keycards

A plugin that allows players to open doors using specific keycards in Unturned.

Features

  • Create doors that require specific keycards to open
  • Configure whether players need to hold the keycard or just have it in inventory
  • Doors stay open while an authorized player looks at them, and close again shortly after they look away
  • Optionally play an effect when a keycard opens a door
  • Set custom door health

Setting Up Keycard Doors

  1. Place a lockable door, such as a Metal, Jail or Vault door. Wooden doors can be opened by hand by anyone, which defeats the point — the plugin warns you if you tag one.
  2. Configure your KeycardAuthentications in the config file (see below)
  3. Look directly at the door and run /authkey <AuthID>, using an AuthID from your configuration
  4. Only players holding the matching keycard can open the door from now on

Tagging a door clears its owner and group, so even the player who placed it can no longer open it by hand.

Commands

  • /authkey <AuthID> - Makes the door you're looking at require a keycard to open
    • You must be looking at a door when using this command
    • The AuthID must match one from your configuration

Configuration

<?xml version="1.0" encoding="utf-8"?>
<KeycardsConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <KeycardAuthentications>
    <KeycardAuthentication AuthenticationID="1" Keycards="1196 519" />
    <KeycardAuthentication AuthenticationID="2" Keycards="519" />
  </KeycardAuthentications>
  <ShouldEquip>true</ShouldEquip>
  <DoorHealth>0</DoorHealth>
  <CloseDoorDelay>3</CloseDoorDelay>
  <ToggleDoorRange>4</ToggleDoorRange>
  <CheckFrequency>40</CheckFrequency>
  <EnableOpenDoorEffect>false</EnableOpenDoorEffect>
  <OpenDoorEffect>61</OpenDoorEffect>
</KeycardsConfiguration>

Configuration Options

  • KeycardAuthentications: Define different keycard access levels

    • AuthenticationID: Unique ID to assign to doors (used with /authkey command)
    • Keycards: Item IDs of keycards that can open doors with this authentication level
  • ShouldEquip: If true, players must hold the keycard in their hands. If false, having it in inventory is enough.

  • DoorHealth: Health to give a door when it is tagged with /authkey. Set to 0 to leave the door's health alone (it keeps whatever its asset defines).

  • CloseDoorDelay: Time in seconds before a door closes again after the player stops looking at it. A door stays open for as long as an authorized player keeps looking at it.

  • ToggleDoorRange: Maximum distance (in meters) a player can be from a door to open it with a keycard.

  • CheckFrequency: How often the plugin checks if a player is looking at a door (in frames). Lower values are more responsive but may impact performance.

  • EnableOpenDoorEffect: Set to true to play an effect at the door whenever a keycard opens it. Off by default.

  • OpenDoorEffect: Which effect to play. Accepts an effect ID such as 61 for an electric spark, or an asset GUID for a modded effect that has no ID.