Chapter 2. Parts of a Command or Skill

Table of Contents
DIL structure for Command and Skill
Defines for a Command
Defines for a Skill
Compiling the Defines

When creating a Command and/or a Skill there is really only two parts you need to worry about. Those parts are the defines and the DIL command itself. We will deal first with the DIL portion and then explain the defines.

DIL structure for Command and Skill

The structure for a dil command is no different from making any other dil in a zone. The only requirement of a dil command over that of a normal dil is it must have a single string variable type as the parameter being passed in. It doesn't matter if the command will not use it has to be there in order for the base code to recognize it as a command or a skill. This means even commands that do not have an argument passed in still need to have the string variable in the header of the DIL . A simple Command like 'sit' would look like Example 2-1.

Example 2-1. SitDIL command shell

dilbegin sit (arg:string);

Once you have created and compiled the dil you then only have one other thing to do, create and compile the define for the DIL . This is where we depart normal dil writing procedures. If you are creating a skill you will have to create a different kind of define than if you were creating a command. We suggest you create a command first because it has an easier define to create than a skill. after you get a simple command down creating a skill is much easier.

First we should start off by explaining exactly what the define is. The define is a structure that the VME server will read in that holds information about the command or skill including where the DIL portion can be found.