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
- 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.
- Configure your
KeycardAuthenticationsin the config file (see below) - Look directly at the door and run
/authkey <AuthID>, using an AuthID from your configuration - 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
/authkeycommand) - Keycards: Item IDs of keycards that can open doors with this authentication level
- AuthenticationID: Unique ID to assign to doors (used with
ShouldEquip: If
true, players must hold the keycard in their hands. Iffalse, having it in inventory is enough.DoorHealth: Health to give a door when it is tagged with
/authkey. Set to0to 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
trueto 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
61for an electric spark, or an asset GUID for a modded effect that has no ID.