Defines for a Skill

After you understand the command defines the skill define only adds a few more fields and they shouldn't be to hard to understand. We will use the 'kick' skills define as an example refer to Example 2-4.

Example 2-4. Kick Define

 index          = SKI_KICK
name           = kick
command        = kick
minpos         = POSITION_FIGHTING
turns          = PULSE_VIOLENCE/2
func           = kick@skills
race human     =   0
race elf       =  -1
race dwarf     =  -2
race halfling  =   0
race gnome     =   0
race half-orc  =   0
race half-ogre =   0
race half-elf  =   0
race brownie   =  -1
race groll     =  +1
race darkelf   =   0

The following list is the break down of each of the fields and what they represent..


The element of the define that attaches the skill to its value in the values.h.


The element of the define that is the reference name of the skill. This name will be used in teachers and when displaying the skill in a skills listing.


The element of the define file that is the skill name to be typed. When creating your command names you must follow the variable naming rules as defined in the dil manual.


The element that defines what function is to be run when the skill is executed. This element is used when defining a dil skill rather than when using an internal function.


The element that defines which internal function is to be used for the skill being defined. For a complete list of all internal skills consult Appendix A.


The element that defines how much of the combat round a skill or a command takes up. We only mention this field in the skills section of the document but you can use it in the commands as well. You could make a command take as much time as you want by multiplying and or dividing the full combat rounds as defined in the vme.h and listed and explained here.

Table 2-1. Mud time defines


The element that defines what the Minimum position a character must be in order to be able to execute the skill.


The element that defines what the Minimum level a character must be in order to use the skill that is being defined.


The level an character must be in order to see the logs. When you set this value to zero it turns off logging of the skill, most skills are set to zero so that the log files don't get to big. Setting the log level lower than 200 is no different from setting it to 200, because players that are not in the Admin level range (200-255) will not be able to see the logs.


the element that defines the type of command, social, skill, or other that this define is referencing.


The element that defines the difficulty the skill is to practice for each race. This is only used if you use the base code teachers. If you do not use the base code teachers you are free to leave off these fields. Each race has a difficulty that ranges from three to negative three. three means the race has no problem practicing this skill and negative three means it has the most difficulty.