README
znmud-0.0.1/cmd/README · 2.0 KB
From the archive znmud-minimal-0.0.1.tar.gz
Download the archive « Back to the archive contents
This directory holds all the commands used in the game. They are parsed
via the folders listed in config.yaml. Look for a section like this:
# command interfaces to load (in order)
character_interface:
- teensy
- tiny
- zombie
If you can a cmd_get in teensy and you put a cmd_get in zombie the get
command from zombie is the one that will be used because teensy gets
loaded first then overrriden by tiny, then zombie.
Each directory has a matching yaml file that tells the engine which
cmd files to load and their specific settings. cmd_xxx.rb files are
Command objects that run under the Character class. So references to
id, @mode, location are all that current characters (or mobiles)
The Yaml file has some specific traits in the zombie nation mud engine.
Lets take this entry for an example:
- !ruby/object:Command
cmd: :cmd_load
help: load an object (Ex. @load \#<oid>)
name: @load
perm: builder
pos: :sitting
The first line is always the same and that says we are making a Command obj.
Required entries are: cmd, help, name
The rest are optional.
cmd - :symbol to command sepcified as the def cmd_xxx in cmd_xxx.rb file
help - Users help info if they type help <cmd>
name - The command the character actually types to use this command
perm - Minimum permisions to use this command. Options are:
builder - Requires a builder or admin to use this command
admin - Admin only command
pos - Minimum position to use this command. By default a character
must be standing to use a command. Valid options are
:any - No restrictions on position
:standing - Default
:sitting - Sitting or Standing
:fighting - Fighting and standing command
skill - Requires a skill to use (admins can also use) The value specified
is the required skill. skill level must be a > 0 to execute and
the actual command could check for higher skills levels if necessary.