-
Notifications
You must be signed in to change notification settings - Fork 31
All About Zone Commands
Zone commands are used to set up the game world.
To see the current list of zone commands in your current zone, use the zlist
command. This will print a list of strings like this:
19) (always) load (1) The Incarnation of Knowledge (10013) at (10003)
20) (always) set (east) door at (10021) to (closed)
21) (always) set (north) door at (10018) to (closed and locked)
22) (always) load (5) A GMC Bulldog Security (1324) at (10025)
23) (always) upgrade (-1) a firmpoint external mount (70501) on A GMC Bulldog Security (1324)
24) (always) upgrade (-1) an AK-97 assault rifle (837) on A GMC Bulldog Security (1324)
25) (always) load (-1) A road-raging ganger (10015) into A GMC Bulldog Security (1324)
26) (always) load (-1) a heavily-armed guard (10002) into A GMC Bulldog Security (1324)
The first number is the zone command's index number. You'll need to care about this if you want to edit a specific zone command (zedit <index>
), but otherwise it simply specifies the order of command executions.
The (always) field means that this command is executed every time the zone resets. Resets happen on the schedule specified in the zone's settings, or when a staff member uses zreset <zone number>
. The other option for this field is (if last), which means this command will only execute if the previous one executed correctly.
The rest of the string describes what the command does, and the parameters being passed to it. We'll go into more detail about the various command types and their parameters in the next section.
Once you've zswitch
ed to your zone, you can create a new zone command with zedit add
. This will put you in an interface that allows you to specify your command type. Once you're satisfied, save your zone command. You can edit it in the future with zedit <command number>
. The command number can be seen in zlist
.
1) MOB (load an NPC at a location in the world)
2) OBJECT (load an object at a location in the world)
3) PUT (put an object inside the previous object you loaded)
4) EQUIP (equip an object to the previous NPC you loaded)
5) GIVE (add an object to the inventory of the previous NPC you loaded)
6) REMOVE (remove an object from a room)
7) DOOR (set the state of a door in your zone)
8) GIVE NUMBER (same as #5, but with a quantity)
9) CYBER/BIOWARE (install an object as cyberware to the previous NPC you loaded)
0) VEHICLE (load a vehicle at a location in the world)
A) DRIVER/PASSENGER (load an NPC into the previous vehicle you loaded)
B) UPGRADE (install an upgrade into the previous vehicle you loaded)
C) CARRIED (put an object into the cargo of the previous vehicle you loaded)
D) HOST (load an object into a Matrix host)
n) NOTHING (does nothing; any command set to this will be deleted at next boot)
ALWAYS always happens on reset. IF LAST only happens if the previous zone command succeeded. ONLY set spawn amount to -1 flag when used with IF LAST, because it does not respect count, which can lead to flood.
Most commands will allow you to specify a quantity, like "Load until this many are in the game". There are three modes that you can use:
The global count mode is specified with a positive number such as 1
or 5
. This counts all instances of the thing across the whole game and refuses to execute the command if the count is at or above your global count. For instance, if I set a key to spawn with global count 3, and players have squirreled away three copies already, the key will no longer load.
Room count mode functions like Global Count, but instead of counting across the game, it counts the number of the thing that are in the targeted room. It's good for placing stationary guards and other limited use cases, but should not be used for roaming mobs, as it is likely to act like the Unlimited flag due to them wandering away from the spawning room.
To use the room count, subtract the desired quantity from -1. For example, if you want a room count of 1, the value is -1 - 1 = -2
. For a count of 5, it's -6
, for a count of 8 it's -9
, etc.
Load-Once is specified with 0
. This causes the thing to load exactly once at game startup and never be replaced until the game copies over or reboots.
Unlimited loads are specified with -1
. Unlimited really means unlimited, and the thing will spawn every time the zone resets. You almost never want to set unlimited unless you have a very good reason for it.
Certain commands can be repeated. This is a convenience feature, so instead of having to write the same command four times to have four identical mobs in a room, you can use the command repeat field to auto-repeat the command. Compatibility has not been tested with if-last commands, so you should avoid combining repeated commands with if-last statements.