Difference between revisions of "Manual:Zone Manual/Appendices/Reserved keyword listing"

From DikuMUD Wiki
Jump to navigation Jump to search
(checked against the current code (wiki review 2026-11-15))
 
Line 1: Line 1:
 
==== Reserved keyword listing ====
 
==== Reserved keyword listing ====
 +
 +
These words are the field names and reset commands of the zone language. vmc reads them as keywords wherever they appear outside a string, so none of them can be used as the symbolic name of a room, object, NPC or zone. The list comes from the keyword table in the vmc source, [https://github.com/Seifert69/DikuMUD3/blob/master/vme/src/vmc/vmctok.h vme/src/vmc/vmctok.h].
 +
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
−
|ability
+
| <code>ability</code> || <code>affect</code> || <code>alignment</code> || <code>applyf</code> || <code>armour</code> || <code>attack</code> || <code>bits</code> || <code>bright</code>
−
|affect
 
−
|alignment
 
−
|applyf
 
−
|armour
 
−
|attack
 
−
|bits
 
−
|bright
 
 
|-
 
|-
−
|capacity
+
| <code>capacity</code> || <code>complete</code> || <code>cost</code> || <code>creators</code> || <code>data</code> || <code>default</code> || <code>defensive</code> || <code>descr</code>
−
|complete
 
−
|cost
 
−
|creators
 
−
|data
 
−
|default
 
−
|defensive
 
−
|descr
 
 
|-
 
|-
−
|dilcopy
+
| <code>difficulty</code> || <code>dilcopy</code> || <code>door</code> || <code>duration</code> || <code>end</code> || <code>equip</code> || <code>exit</code> || <code>exp</code>
−
|door
 
−
|duration
 
−
|end
 
−
|equip
 
−
|exit
 
−
|exp
 
−
|extra
 
 
|-
 
|-
−
|firstf
+
| <code>extra</code> || <code>firstf</code> || <code>flags</code> || <code>follow</code> || <code>gmap</code> || <code>height</code> || <code>help</code> || <code>hit</code>
−
|flags
 
−
|follow
 
−
|height
 
−
|help
 
−
|hit
 
−
|id
 
−
|in
 
 
|-
 
|-
−
|inside_descr
+
| <code>id</code> || <code>in</code> || <code>inside_descr</code> || <code>into</code> || <code>key</code> || <code>keyword</code> || <code>lastf</code> || <code>level</code>
−
|into
 
−
|key
 
−
|keyword
 
−
|lastf
 
−
|level
 
−
|lifespan
 
−
|light
 
 
|-
 
|-
−
|link
+
| <code>lifespan</code> || <code>light</code> || <code>link</code> || <code>load</code> || <code>local</code> || <code>mana</code> || <code>manipulate</code> || <code>max</code>
−
|load
 
−
|local
 
−
|mana
 
−
|manipulate
 
−
|max
 
−
|minv
 
−
|money
 
 
|-
 
|-
−
|movement
+
| <code>minv</code> || <code>money</code> || <code>movement</code> || <code>names</code> || <code>nop</code> || <code>notes</code> || <code>npcflags</code> || <code>offensive</code>
−
|names
 
−
|nop
 
−
|notes
 
−
|npcflags
 
−
|offensive
 
−
|open
 
−
|outside_descr
 
 
|-
 
|-
−
|position
+
| <code>open</code> || <code>outside_descr</code> || <code>position</code> || <code>purge</code> || <code>race</code> || <code>random</code> || <code>remove</code> || <code>rent</code>
−
|purge
 
−
|race
 
−
|random
 
−
|remove
 
−
|rent
 
−
|reset
 
−
|romflags
 
 
|-
 
|-
−
|sex
+
| <code>reset</code> || <code>romflags</code> || <code>sex</code> || <code>special</code> || <code>speed</code> || <code>spell</code> || <code>string</code> || <code>tickf</code>
−
|special
 
−
|speed
 
−
|spell
 
−
|string
 
−
|tickf
 
−
|time
 
−
|title
 
 
|-
 
|-
−
|to
+
| <code>time</code> || <code>title</code> || <code>to</code> || <code>type</code> || <code>value</code> || <code>weapon</code> || <code>weather</code> || <code>weight</code>
−
|type
+
|-
−
|value
+
| <code>zonemax</code> ||  ||  ||  ||  ||  ||  ||  
−
|weapon
 
−
|weather
 
−
|weight
 
−
|zonemax
 
−
|
 
 
|}
 
|}
 +
 +
Besides these, vmc reserves:
 +
* the section markers <code>%zone</code>, <code>%rooms</code>, <code>%objects</code>, <code>%mobiles</code>, <code>%dil</code>, <code>%reset</code> and <code>%end</code>;
 +
* <code>null</code>, and <code>dilbegin</code>, which starts a DIL program (see [[Manual:DIL Manual/dilbegin|dilbegin]]).
 +
 +
Keywords are lowercase and vmc is case sensitive, but don't get round a keyword by changing its case: pick another name, such as <code>exit_room</code>. A keyword used as a name gives a syntax error that names it, here for a room called <code>exit</code>:
 +
 +
<pre>
 +
v: kwt.zon: 10: syntax error
 +
  Token: 'exit'
 +
Grave errors in file 'kwt.zon'.
 +
</pre>
 +
 +
The same goes for the zone name: <code>%zone door</code> doesn't compile.
 +
 +
Inside DIL programs other words are reserved; see the [[Manual:DIL Manual|DIL manual]]. And the macros of the header files you include (<code>NORTH</code>, <code>WEAR_BODY</code>, <code>M_AVG_HUMAN</code> ...) are replaced by the preprocessor before vmc sees them, so don't use those names either.
  
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: left;float:left;width:50%;'>[[Manual:Zone_Manual/Appendices|Previous: Appendices]]</div>
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: left;float:left;width:50%;'>[[Manual:Zone_Manual/Appendices|Previous: Appendices]]</div>
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: right;float:right;width:50%;'>[[Manual:Zone_Manual/Appendices/Race Definitions in values.h|Next: Race Definitions in values.h]]</div>
 
<div style='padding-top: 30px; padding-bottom: 20px; text-align: right;float:right;width:50%;'>[[Manual:Zone_Manual/Appendices/Race Definitions in values.h|Next: Race Definitions in values.h]]</div>

Latest revision as of 06:23, 15 November 2026

Reserved keyword listing

These words are the field names and reset commands of the zone language. vmc reads them as keywords wherever they appear outside a string, so none of them can be used as the symbolic name of a room, object, NPC or zone. The list comes from the keyword table in the vmc source, vme/src/vmc/vmctok.h.

ability affect alignment applyf armour attack bits bright
capacity complete cost creators data default defensive descr
difficulty dilcopy door duration end equip exit exp
extra firstf flags follow gmap height help hit
id in inside_descr into key keyword lastf level
lifespan light link load local mana manipulate max
minv money movement names nop notes npcflags offensive
open outside_descr position purge race random remove rent
reset romflags sex special speed spell string tickf
time title to type value weapon weather weight
zonemax

Besides these, vmc reserves:

  • the section markers %zone, %rooms, %objects, %mobiles, %dil, %reset and %end;
  • null, and dilbegin, which starts a DIL program (see dilbegin).

Keywords are lowercase and vmc is case sensitive, but don't get round a keyword by changing its case: pick another name, such as exit_room. A keyword used as a name gives a syntax error that names it, here for a room called exit:

v: kwt.zon: 10: syntax error
   Token: 'exit'
Grave errors in file 'kwt.zon'.

The same goes for the zone name: %zone door doesn't compile.

Inside DIL programs other words are reserved; see the DIL manual. And the macros of the header files you include (NORTH, WEAR_BODY, M_AVG_HUMAN ...) are replaced by the preprocessor before vmc sees them, so don't use those names either.

Previous: Appendices
Next: Race Definitions in values.h