Difference between revisions of "Sandpit"

From DikuMUD Wiki
Jump to navigation Jump to search
(Created page with " <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <BOOK ID="basiczone"><?dbhtml filename="index.html"> <bookinfo> <TITLE>VME basic zone writing manual</TITLE> <auth...")
 
Line 1: Line 1:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
+
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<BOOK ID="basiczone"><?dbhtml filename="index.html">
+
<BOOK ID="basiczone"><?dbhtml filename="index.html">
<bookinfo>
+
<bookinfo>
<TITLE>VME basic zone writing manual</TITLE>
+
<TITLE>VME basic zone writing manual</TITLE>
<author>
+
<author>
<firstname>Ken</firstname>
+
<firstname>Ken</firstname>
<surname>Perry</surname>
+
<surname>Perry</surname>
</author>
+
</author>
<copyright><year>2001</year><holder>Ken Perry</holder></copyright>
+
<copyright><year>2001</year><holder>Ken Perry</holder></copyright>
</bookinfo>
+
</bookinfo>
  
<CHAPTER ID="ch-intro"><?dbhtml filename="ch00.html">
+
<CHAPTER ID="ch-intro"><?dbhtml filename="ch00.html">
<TITLE>Introduction</TITLE>
+
<TITLE>Introduction</TITLE>
  
<SECT1><TITLE>Giving credit where credit is due!</TITLE>
+
<SECT1><TITLE>Giving credit where credit is due!</TITLE>
  
<PARA>The, basic zone writing manual, you are reading now, didn't
+
<PARA>The, basic zone writing manual, you are reading now, didn't
just come flying out of this authors head.  In fact it is a
+
just come flying out of this authors head.  In fact it is a
conglomeration of several old texts which are no longer used.  I had
+
conglomeration of several old texts which are no longer used.  I had
first thought about quoting and giving credit to each person who had
+
first thought about quoting and giving credit to each person who had
ever modified or created portions of the first documentation but
+
ever modified or created portions of the first documentation but
because of the nature of the way they were built it was impossible
+
because of the nature of the way they were built it was impossible
to know who did what.  I therefore have decided to create a list
+
to know who did what.  I therefore have decided to create a list
here of everyone who has ever worked on or had a hand in the
+
here of everyone who has ever worked on or had a hand in the
development of the basic zone writing documentation and references.  I will also
+
development of the basic zone writing documentation and references.  I will also
give a short summary for each.
+
give a short summary for each.
I would also like to thank those listed below for their contribution
+
I would also like to thank those listed below for their contribution
to the development of one of the best mud servers on the internet
+
to the development of one of the best mud servers on the internet
today.
+
today.
  
<VARIABLELIST id="var-credits">
+
<VARIABLELIST id="var-credits">
<VARLISTENTRY>
+
<VARLISTENTRY>
;Original DIKU coding Team
+
;Original DIKU coding Team
<DICTDEF>
+
<DICTDEF>
<PARA><itemizedlist>
+
<PARA><itemizedlist>
<LISTITEM><PARA>Hans Henrik Staerfeldt</PARA></LISTITEM>
+
<LISTITEM><PARA>Hans Henrik Staerfeldt</PARA></LISTITEM>
<LISTITEM><PARA>Sebastian Hammer</PARA></LISTITEM>
+
<LISTITEM><PARA>Sebastian Hammer</PARA></LISTITEM>
<LISTITEM><PARA>Michael Seifert</PARA></LISTITEM>
+
<LISTITEM><PARA>Michael Seifert</PARA></LISTITEM>
<LISTITEM><PARA>Katja Nyboe</PARA></LISTITEM>
+
<LISTITEM><PARA>Katja Nyboe</PARA></LISTITEM>
<LISTITEM><PARA>Tom Madsen</PARA></LISTITEM>
+
<LISTITEM><PARA>Tom Madsen</PARA></LISTITEM>
<LISTITEM><PARA>Lars Balker Rasmussen</PARA></LISTITEM>
+
<LISTITEM><PARA>Lars Balker Rasmussen</PARA></LISTITEM>
</itemizedlist>
+
</itemizedlist>
 +
 
 +
You should all know these people they are not only the original DIKU mud
 +
developers but a few of them designed and developed the new <ACRONYM>VME</ACRONYM>
 +
server. One or more of the previous mentioned people were the authors of
 +
the following texts that have been swallowed up by this book.
 +
<itemizedlist>
 +
<LISTITEM><PARA>''abilities.txt''</PARA></LISTITEM>
 +
<LISTITEM><PARA>''guild.txt''</PARA></LISTITEM>
 +
<LISTITEM><PARA>''monster.txt''</PARA></LISTITEM>
 +
<LISTITEM><PARA>''objects.txt''</PARA></LISTITEM>
 +
<LISTITEM><PARA>''rooms.txt''</PARA></LISTITEM>
 +
<LISTITEM><PARA>''vmc.txt''</PARA></LISTITEM>
 +
</itemizedlist></PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Andrew Cowan
 +
<DICTDEF>
  
You should all know these people they are not only the original DIKU mud
+
<PARA>One of the original administrators of Valhalla mud and now the administrator of the
developers but a few of them designed and developed the new <ACRONYM>VME</ACRONYM>
+
mud connector. Andrew created the first zone tutorial, which was later included
server. One or more of the previous mentioned people were the authors of
+
into the ''vmc.txt'' to clear up some things missing
the following texts that have been swallowed up by this book.
+
in the old ''vmc.txt''. Again my thanks go out to Andrew for his
<itemizedlist>
+
contributions not only to this document but to the growth of the <ACRONYM>DIL</ACRONYM>
<LISTITEM><PARA>''abilities.txt''</PARA></LISTITEM>
+
programming language.</PARA>
<LISTITEM><PARA>''guild.txt''</PARA></LISTITEM>
 
<LISTITEM><PARA>''monster.txt''</PARA></LISTITEM>
 
<LISTITEM><PARA>''objects.txt''</PARA></LISTITEM>
 
<LISTITEM><PARA>''rooms.txt''</PARA></LISTITEM>
 
<LISTITEM><PARA>''vmc.txt''</PARA></LISTITEM>
 
</itemizedlist></PARA>
 
 
</LISTITEM>
 
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
<VARLISTENTRY>
;Andrew Cowan
+
;Ryan Holliday
<DICTDEF>
+
<DICTDEF>
  
<PARA>One of the original administrators of Valhalla mud and now the administrator of the
+
<PARA>Made major updates to the ''tutorial.txt'' created by Andrew
mud connector.  Andrew created the first zone tutorial, which was later included
+
Cowan, which became version two of the tutorial.</PARA>
into the ''vmc.txt'' to clear up some things missing
+
</LISTITEM>
in the old ''vmc.txt''.  Again my thanks go out to Andrew for his
+
</VARLISTENTRY>
contributions not only to this document but to the growth of the <ACRONYM>DIL</ACRONYM>
+
<VARLISTENTRY>
programming language.</PARA>
+
;Peter Ryskin
</LISTITEM>
+
<DICTDEF>
</VARLISTENTRY>
+
<PARA>Wrote the original explanation of how to define exits.</PARA>
<VARLISTENTRY>
+
</LISTITEM>
;Ryan Holliday
+
</VARLISTENTRY>
<DICTDEF>
+
<VARLISTENTRY>
  
<PARA>Made major updates to the ''tutorial.txt'' created by Andrew
+
;John Clare
Cowan, which became version two of the tutorial.</PARA>
+
<DICTDEF>
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Peter Ryskin
 
<DICTDEF>
 
<PARA>Wrote the original explanation of how to define exits.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
  
;John Clare
+
<PARA>Made major updates to the ''tutorial.txt'' created by Andrew
<DICTDEF>
+
Cowan and updated by Ryan Holliday, which became version three of the
 +
tutorial.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Marc Bellemare
 +
<DICTDEF>
  
<PARA>Made major updates to the ''tutorial.txt'' created by Andrew
+
<PARA>An editor and an author Marc combined and revised the ''tutorial''
Cowan and updated by Ryan Holliday, which became version three of the
+
and the ''vmc.txt'' into one document making it less Valhalla specific
tutorial.</PARA>
+
and more for any mud running the <ACRONYM>VME</ACRONYM> server.</PARA>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
 
;Marc Bellemare
 
<DICTDEF>
 
  
<PARA>An editor and an author Marc combined and revised the ''tutorial''
+
<VARLISTENTRY>
and the ''vmc.txt'' into one document making it less Valhalla specific
+
;Jennifer Garuba
and more for any mud running the <ACRONYM>VME</ACRONYM> server.</PARA>
+
<DICTDEF>
</LISTITEM>
+
<para>Created the first document on how to create shop keepers. She also was
</VARLISTENTRY>
+
one of the first builders to have the insite and to make it clear that a manual like this was
 +
needed.</para>  
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<VARLISTENTRY>
 
;Jennifer Garuba
 
<DICTDEF>
 
<para>Created the first document on how to create shop keepers.  She also was
 
one of the first builders to have the insite and to make it clear that a manual like this was
 
needed.</para>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
<VARLISTENTRY>
 +
;Brian Spanton
 +
<DICTDEF>
  
<VARLISTENTRY>
+
<PARA>Converted the original ''vmc.txt'' into HTMl, while at the same
;Brian Spanton
+
time fixing many inconsistencies and typos in it.</PARA>
<DICTDEF>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Kathy Perry
 +
<DICTDEF>
  
<PARA>Converted the original ''vmc.txt'' into HTMl, while at the same
+
<PARA>Wrote the original ''compiler howto'' to make it easier for new builders
time fixing many inconsistencies and typos in it.</PARA>
+
to compile their zone.  She was also the first builder to open my eyes
</LISTITEM>
+
to the fact we needed a true manual on how to build.</PARA>
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Kathy Perry
 
<DICTDEF>
 
  
<PARA>Wrote the original ''compiler howto'' to make it easier for new builders
+
</LISTITEM>
to compile their zone.  She was also the first builder to open my eyes
+
</VARLISTENTRY>
to the fact we needed a true manual on how to build.</PARA>
 
  
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;Mark Pringle
 +
<DICTDEF>
 +
<para>Main editor, which spell checked and looked over my major grammer
 +
mistakes.  I am sure he didn't catch them all but at least the ugly ones
 +
were caught.</para>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<VARLISTENTRY>
 
;Mark Pringle
 
<DICTDEF>
 
<para>Main editor, which spell checked and looked over my major grammer
 
mistakes.  I am sure he didn't catch them all but at least the ugly ones
 
were caught.</para>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
<VARLISTENTRY>
 +
;Morgan Shafer
 +
<DICTDEF>
  
<VARLISTENTRY>
+
<PARA>Wrote the guild definition primer which explained teachers.</PARA>
;Morgan Shafer
+
</LISTITEM>
<DICTDEF>
+
</VARLISTENTRY>
  
<PARA>Wrote the guild definition primer which explained teachers.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
</VARIABLELIST></PARA>
  
</VARIABLELIST></PARA>
+
</SECT1>
  
</SECT1>
+
<SECT1> <TITLE> Who should read this book?</TITLE>
  
<SECT1> <TITLE> Who should read this book?</TITLE>
+
<PARA>This book was designed to be read by anyone who is thinking of writing
 +
areas for a <ACRONYM>VME</ACRONYM> server.  If you have wrote for other mud servers you will still
 +
need to at least skim every chapter because the <ACRONYM>VME</ACRONYM> is like no other mud engine
 +
and has some very interesting differences.</PARA>
  
<PARA>This book was designed to be read by anyone who is thinking of writing
+
</SECT1>
areas for a <ACRONYM>VME</ACRONYM> server.  If you have wrote for other mud servers you will still
 
need to at least skim every chapter because the <ACRONYM>VME</ACRONYM> is like no other mud engine
 
and has some very interesting differences.</PARA>
 
  
</SECT1>
+
<SECT1> <TITLE>What does this book cover?</TITLE>
  
<SECT1> <TITLE>What does this book cover?</TITLE>
+
<PARA>The topics covered in this book are everything to do with writing an
 +
area for the <ACRONYM>VME</ACRONYM> server.  While we do cover using <ACRONYM>DIL</ACRONYM> functions to make your
 +
monsters, Rooms, and objects better and smarter we do not cover how to write the
 +
<ACRONYM>DIL</ACRONYM> functions covered in the <ACRONYM>DIL</ACRONYM> manual.  The following
 +
are topics covered by this book.
 +
<itemizedlist>
 +
<LISTITEM><PARA>compiling and debugging</PARA></LISTITEM>
 +
<LISTITEM><PARA>Macros using the CPP</PARA></LISTITEM>
 +
<LISTITEM><PARA>Overall Zone structure</PARA></LISTITEM>
 +
<LISTITEM><PARA>Writing rooms</PARA></LISTITEM>
 +
<LISTITEM><PARA>Writing Objects</PARA></LISTITEM>
 +
<LISTITEM><PARA>Writing Monsters</PARA></LISTITEM>
 +
<LISTITEM><PARA>Doing the resets</PARA></LISTITEM>
 +
</itemizedlist></PARA>
  
<PARA>The topics covered in this book are everything to do with writing an
+
</SECT1>
area for the <ACRONYM>VME</ACRONYM> server.  While we do cover using <ACRONYM>DIL</ACRONYM> functions to make your
+
</chapter>
monsters, Rooms, and objects better and smarter we do not cover how to write the
 
<ACRONYM>DIL</ACRONYM> functions covered in the <ACRONYM>DIL</ACRONYM> manual.  The following
 
are topics covered by this book.
 
<itemizedlist>
 
<LISTITEM><PARA>compiling and debugging</PARA></LISTITEM>
 
<LISTITEM><PARA>Macros using the CPP</PARA></LISTITEM>
 
<LISTITEM><PARA>Overall Zone structure</PARA></LISTITEM>
 
<LISTITEM><PARA>Writing rooms</PARA></LISTITEM>
 
<LISTITEM><PARA>Writing Objects</PARA></LISTITEM>
 
<LISTITEM><PARA>Writing Monsters</PARA></LISTITEM>
 
<LISTITEM><PARA>Doing the resets</PARA></LISTITEM>
 
</itemizedlist></PARA>
 
  
</SECT1>
+
<chapter  ID="ch-01"><?dbhtml filename="ch01.html">
</chapter>
+
<TITLE>General compiler information</TITLE>
  
<chapter ID="ch-01"><?dbhtml filename="ch01.html">
+
<PARA>In order to get your zone onto a valhalla Mud Engine (<ACRONYM>VME</ACRONYM>) server you must convert your zone from readable
<TITLE>General compiler information</TITLE>
+
english text to binary form the server can understand.  The way
 +
you do this is with a compiler. No don't freak out you don't have
 +
to be a skilled programmer to use a compiler.  The only thing you
 +
have to do is format your rooms, objects, and Non-player characters
 +
(NPC) in a form which the compiler can understand.  The great thing
 +
about the <ACRONYM>VME</ACRONYM> is you can do all your zone writing in your favorite
 +
editor with out having to log on to code. For those of you who have
 +
coded for other mud servers and are used to coding online this may
 +
be a new experience to you but you will find you can plan out
 +
better and more well designed areas offline than you can on
 +
line.</PARA>
  
<PARA>In order to get your zone onto a valhalla Mud Engine (<ACRONYM>VME</ACRONYM>) server you must convert your zone from readable
+
<NOTE>
english text to binary form the server can understand.  The way
+
<PARA>In the future the <ACRONYM>VME</ACRONYM> coding team is thinking of adding
you do this is with a compilerNo don't freak out you don't have
+
an online coding module for those mud administrators that can not
to be a skilled programmer to use a compiler.  The only thing you
+
live with out itIf you are one of these make sure you write
have to do is format your rooms, objects, and Non-player characters
+
<email>whistler@valhalla.com</email> and express your desires so
(NPC) in a form which the compiler can understand.  The great thing
+
you can be counted.
about the <ACRONYM>VME</ACRONYM> is you can do all your zone writing in your favorite
+
</PARA>
editor with out having to log on to code.  For those of you who have
+
</NOTE>
coded for other mud servers and are used to coding online this may
 
be a new experience to you but you will find you can plan out
 
better and more well designed areas offline than you can on
 
line.</PARA>
 
  
<NOTE>
+
<PARA>This chapter will mainly cover the Valhalla Mud Compiler (<ACRONYM>VMC</ACRONYM>), how it works, and
<PARA>In the future the <ACRONYM>VME</ACRONYM> coding team is thinking of adding
+
the Valhalla Mud pre processor (<ACRONYM>VMC</ACRONYM> -p) works.  We will also throw in some debugging
an online coding module for those mud administrators that can not
+
hints but debugging will be covered more as you begin creating parts of
live with out it.  If you are one of these make sure you write
+
your areas in the following chapters.
<email>whistler@valhalla.com</email> and express your desires so
+
</PARA>
you can be counted.
 
</PARA>
 
</NOTE>
 
  
<PARA>This chapter will mainly cover the Valhalla Mud Compiler (<ACRONYM>VMC</ACRONYM>), how it works, and
+
<SECT1><TITLE>The compiler</TITLE>
the Valhalla Mud pre processor (<ACRONYM>VMC</ACRONYM> -p) works.  We will also throw in some debugging
 
hints but debugging will be covered more as you begin creating parts of
 
your areas in the following chapters.
 
</PARA>
 
  
<SECT1><TITLE>The compiler</TITLE>
+
<PARA>''VMC'' is the Valhalla Mud Engine Compiler.
 +
for <ACRONYM>VME</ACRONYM> servers.  A compiler takes a source file or better described
 +
as your areas input file and converts it to a binary file the
 +
server can then load and use online.  In the <ACRONYM>VME</ACRONYM> we call areas
 +
you build 'zones', therefore the source file for a zone has the
 +
extension 'zon'.  In order to make this more clear we will start
 +
with our first example.</PARA>
  
<PARA>''VMC'' is the Valhalla Mud Engine Compiler.
+
<PARA>Lets say you were making a Zone of dragons.  You may want to
for <ACRONYM>VME</ACRONYM> serversA compiler takes a source file or better described
+
call the file something resembling its contents like,
as your areas input file and converts it to a binary file the
+
''dragon.zon''.  Notice we have appended the
server can then load and use onlineIn the <ACRONYM>VME</ACRONYM> we call areas
+
'.zon' extensionThe compiler requires all zones to end in '.zon'
you build 'zones', therefore the source file for a zone has the
+
in order for it to know this is a zone source file.</PARA>
extension 'zon'.  In order to make this more clear we will start
+
       
with our first example.</PARA>
+
<PARA>Now lets say we have completed writing our first zone and want
 +
to compile itThe command is simply:
 +
<command>
 +
VMC> dragon.zon
 +
</command>
 +
If the zone compiles correctly it will indicate success by printing
 +
a message to the screen and outputting two files both with the same
 +
root name as the original zone source file but with different
 +
extensions.  In this case there would be the following:
 +
<VARIABLELIST>
 +
<VARLISTENTRY>
 +
;''dragon.data''
 +
<DICTDEF>
  
<PARA>Lets say you were making a Zone of dragons.  You may want to
+
<PARA>The file holding the binary version of the zone</PARA>
call the file something resembling its contents like,
+
</LISTITEM>
''dragon.zon''.  Notice we have appended the
+
</VARLISTENTRY>
'.zon' extension.  The compiler requires all zones to end in '.zon'
+
<VARLISTENTRY>
in order for it to know this is a zone source file.</PARA>
+
;''dragon.reset''
       
+
<DICTDEF>
<PARA>Now lets say we have completed writing our first zone and want
 
to compile it.  The command is simply:
 
<command>
 
VMC> dragon.zon
 
</command>
 
If the zone compiles correctly it will indicate success by printing
 
a message to the screen and outputting two files both with the same
 
root name as the original zone source file but with different
 
extensions.  In this case there would be the following:
 
<VARIABLELIST>
 
<VARLISTENTRY>
 
;''dragon.data''
 
<DICTDEF>
 
  
<PARA>The file holding the binary version of the zone</PARA>
+
<PARA>The file containing the reset information for the
</LISTITEM>
+
zone.</PARA>
</VARLISTENTRY>
+
</LISTITEM>
<VARLISTENTRY>
+
</VARLISTENTRY>
;''dragon.reset''
+
</VARIABLELIST>
<DICTDEF>
+
If the zone doesn't compile correctly and you have errors it
 +
will print a list of the errors and the location where they can be
 +
found so you can fix them. The debugging process will be explained
 +
more as you learn how to create rooms, monsters, and objects.</PARA>
  
<PARA>The file containing the reset information for the
+
</SECT1>
zone.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
If the zone doesn't compile correctly and you have errors it
 
will print a list of the errors and the location where they can be
 
found so you can fix them.  The debugging process will be explained
 
more as you learn how to create rooms, monsters, and objects.</PARA>
 
  
</SECT1>
+
<SECT1><TITLE>The VMC pre-processor</TITLE>
  
<SECT1><TITLE>The VMC pre-processor</TITLE>
+
<PARA>The <ACRONYM>VMC</ACRONYM> Pre-Processor (<ACRONYM>VMC</ACRONYM> -p) can be thought of as a powerful
 +
search and replace tool used by the compiler before it
 +
converts the zone to its binary form.  This tool gives you the
 +
builder the ability to add comments, create short hand expressions
 +
for repeated items, include other files in your zone, and even to do
 +
some minor calculations when necessary.</PARA>
  
<PARA>The <ACRONYM>VMC</ACRONYM> Pre-Processor (<ACRONYM>VMC</ACRONYM> -p) can be thought of as a powerful
+
<NOTE> <PARA>If you have coded in C or c++ before the Pre Processor the
search and replace tool used by the compiler before it
+
<ACRONYM>VMC</ACRONYM> uses is no different and you can skip this section.</PARA>
converts the zone to its binary form.  This tool gives you the
+
</NOTE>
builder the ability to add comments, create short hand expressions
 
for repeated items, include other files in your zone, and even to do
 
some minor calculations when necessary.</PARA>
 
  
<NOTE> <PARA>If you have coded in C or c++ before the Pre Processor the
+
<sect2><TITLE>Commenting your zone</TITLE>
<ACRONYM>VMC</ACRONYM> uses is no different and you can skip this section.</PARA>
 
</NOTE>
 
  
<sect2><TITLE>Commenting your zone</TITLE>
+
<PARA>The practice of adding comments to your zone is a good thing
 +
to get into so the administrators and other builders can help
 +
you with your zone and know what you were trying to do if there are
 +
problems.  Comments aren't as important when writing the zone as
 +
they will be when you start writing your own special <ACRONYM>DIL</ACRONYM> functions
 +
but it is important to know how comments work and that you can use
 +
them if you need to.  A comment is a block of text the compiler
 +
will never see and is there only for you and who ever reads the
 +
file.  In order to make it so the compiler will not see the block of
 +
text you must surround it by a set of symbols that tell the CPP to
 +
strip it out before passing the zone on to the compiler.  These
 +
symbols are the '/*' and the '*/' symbols or the '//' symbols together in front of a single line.</PARA>
  
<PARA>The practice of adding comments to your zone is a good thing
+
<PARA>In order to best explain how comments work we will give you a some
to get into so the administrators and other builders can help
+
what strange exampleFirst we will start by showing you a very basic
you with your zone and know what you were trying to do if there are
+
line you will see time and time again in rooms.</PARA>
problemsComments aren't as important when writing the zone as
+
<INFORMALEXAMPLE>
they will be when you start writing your own special <ACRONYM>DIL</ACRONYM> functions
+
<PROGRAMLISTING>
but it is important to know how comments work and that you can use
 
them if you need to.  A comment is a block of text the compiler
 
will never see and is there only for you and who ever reads the
 
file.  In order to make it so the compiler will not see the block of
 
text you must surround it by a set of symbols that tell the CPP to
 
strip it out before passing the zone on to the compiler.  These
 
symbols are the '/*' and the '*/' symbols or the '//' symbols together in front of a single line.</PARA>
 
  
<PARA>In order to best explain how comments work we will give you a some
+
title "this is a title"
what strange example.  First we will start by showing you a very basic
 
line you will see time and time again in rooms.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
title "this is a title"
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>This is a title it will show up in everything from rooms, to objects
 +
and even NPCs.  Now lets see what a commented line would look like.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
//I am going to make a title now
</INFORMALEXAMPLE>
+
title /* I put the keyword
<PARA>This is a title it will show up in everything from rooms, to objects
+
first*/ "this is a title/*then the title*/
and even NPCs.  Now lets see what a commented line would look like.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
//I am going to make a title now
+
</PROGRAMLISTING>
title /* I put the keyword
+
</INFORMALEXAMPLE>
first*/ "this is a title/*then the title*/
+
<PARA>This of course is very ugly but the point is not to be pretty it is
 +
to show you both the first way and the second way will look
 +
exactly the same to the compiler because all comments are removed
 +
before the compiler ever gets it.  A better use of a comment in a
 +
zone however would be something like this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
/*
</INFORMALEXAMPLE>
+
The following ten rooms are the vineyards,
<PARA>This of course is very ugly but the point is not to be pretty it is
+
there are 97 rooms in the zone.
to show you both the first way and the second way will look
+
*/
exactly the same to the compiler because all comments are removed
 
before the compiler ever gets it. A better use of a comment in a
 
zone however would be something like this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
/*
+
//Zone first created 1994
The following ten rooms are the vineyards,
 
there are 97 rooms in the zone.
 
*/
 
  
//Zone first created 1994
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>You will find comments will make coding large zones much easier
 +
because you can add text meant just for the builders
 +
eyes.</PARA>
  
</PROGRAMLISTING>
+
<NOTE><PARA>You will have to decide if you want a multi-line comment or a single
</INFORMALEXAMPLE>
+
line comment and use the '//' or the '/**/' respectively.  The rule of thumb is if the comment is longer than 1 line it is easier to put the '/**/' around the comment than to comment each individual line.</PARA></NOTE>
<PARA>You will find comments will make coding large zones much easier
 
because you can add text meant just for the builders
 
eyes.</PARA>
 
  
<NOTE><PARA>You will have to decide if you want a multi-line comment or a single
+
</sect2>
line comment and use the '//' or the '/**/' respectively.  The rule of thumb is if the comment is longer than 1 line it is easier to put the '/**/' around the comment than to comment each individual line.</PARA></NOTE>
+
<sect2><TITLE>Macros and what they can do for you</TITLE>
  
</sect2>
 
<sect2><TITLE>Macros and what they can do for you</TITLE>
 
  
 +
<PARA>When making a zone you will find there are things you use more
 +
than once.  In fact you may find things you want others to use or
 +
things you want to use in multiple zones.  Its true you could block
 +
and copy and stick them everywhere. in fact that is what I did when
 +
I first started building.  I soon found my zone file was
 +
extremely large and hard to upkeep.  With a few minor changes and a
 +
lot of deleting I used short hand or better known in the world of coding
 +
as macros to make my zone readable.</PARA>
  
<PARA>When making a zone you will find there are things you use more
+
<PARA>Lets say you had some flags you were going to set in
than once.  In fact you may find things you want others to use or
+
fifty rooms and you knew they would all be the sameYou could type
things you want to use in multiple zonesIts true you could block
+
the following line 50 times.</PARA>
and copy and stick them everywhere. in fact that is what I did when
+
<INFORMALEXAMPLE>
I first started building.  I soon found my zone file was
+
<PROGRAMLISTING>
extremely large and hard to upkeep.  With a few minor changes and a
 
lot of deleting I used short hand or better known in the world of coding
 
as macros to make my zone readable.</PARA>
 
  
<PARA>Lets say you had some flags you were going to set in
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}
fifty rooms and you knew they would all be the same.  You could type
 
the following line 50 times.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>With the macros however you could make this much easier by just doing
 +
the following at the beginning of your zone.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}
</INFORMALEXAMPLE>
 
<PARA>With the macros however you could make this much easier by just doing
 
the following at the beginning of your zone.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>Then where ever you want the flags you just type DIRTFLOOR.  You are
 +
probably thinking, yeah big deal I can do that with block and copy.
 +
True but there is another benefit to this.  Lets say later you
 +
wanted to also make these 50 rooms no teleport.  All you would have
 +
to change is the define like this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}
</INFORMALEXAMPLE>
 
<PARA>Then where ever you want the flags you just type DIRTFLOOR.  You are
 
probably thinking, yeah big deal I can do that with block and copy.
 
True but there is another benefit to this.  Lets say later you
 
wanted to also make these 50 rooms no teleport.  All you would have
 
to change is the define like this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>Now when you recompile all 50 rooms are changed and you didn't even
 +
have to do a search and replace.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>You can also make macros that take arguments.  The ability to
<PARA>Now when you recompile all 50 rooms are changed and you didn't even
+
take arguments is where macros take a leap and a bound out in front
have to do a search and replace.</PARA>
+
of your favorite editor to allow you to do things you can not do easily
 +
with search and replace.  Lets say you have an exit descr you
 +
want to use in 50 swamp rooms because heck everything looks the same
 +
in a swamp when you look one direction to the next.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>You can also make macros that take arguments.  The ability to
+
east to swamp1 descr
take arguments is where macros take a leap and a bound out in front
+
"You see the swamp stretch out for miles";
of your favorite editor to allow you to do things you can not do easily
 
with search and replace.  Lets say you have an exit descr you
 
want to use in 50 swamp rooms because heck everything looks the same
 
in a swamp when you look one direction to the next.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
east to swamp1 descr
+
</PROGRAMLISTING>
"You see the swamp stretch out for miles";
+
</INFORMALEXAMPLE>
 +
<PARA>This could be made into a macro like:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
#define sexit(direction, place) direction to place descr \
</INFORMALEXAMPLE>
+
"You see the swamp stretch out for miles.";
<PARA>This could be made into a macro like:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
#define sexit(direction, place) direction to place descr \
+
</PROGRAMLISTING>
"You see the swamp stretch out for miles.";
+
</INFORMALEXAMPLE>
 +
<PARA>Then all you need to use it is:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
SEXIT(east,swamp1)
</INFORMALEXAMPLE>
+
SEXIT(north,swamp2)
<PARA>Then all you need to use it is:</PARA>
+
SEXIT(south,swamp3)
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
SEXIT(east,swamp1)
+
</PROGRAMLISTING>
SEXIT(north,swamp2)
+
</INFORMALEXAMPLE>
SEXIT(south,swamp3)
+
<NOTE><PARA>There is no space between 'SEXIT' and '(' that is
 +
important because the CPP sees 'SEXIT(' and 'SEXIT (' as two
 +
different things.  It is also important to notice all defines must start at the
 +
beginning of the line and be either one line long or have a '\'
 +
telling the Pre Processor that it should continue with the next line as if it was
 +
this line.</PARA></NOTE>
  
</PROGRAMLISTING>
+
<PARA>You can also combine macros together so you have a set
</INFORMALEXAMPLE>
+
of macros like:</PARA>
<NOTE><PARA>There is no space between 'SEXIT' and '(' that is
+
<INFORMALEXAMPLE>
important because the CPP sees 'SEXIT(' and 'SEXIT (' as two
+
<PROGRAMLISTING>
different things.  It is also important to notice all defines must start at the
 
beginning of the line and be either one line long or have a '\'
 
telling the Pre Processor that it should continue with the next line as if it was
 
this line.</PARA></NOTE>
 
  
<PARA>You can also combine macros together so you have a set
+
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}
of macros like:</PARA>
+
#define DIRTSECT  movement SECT_INSIDE \
<INFORMALEXAMPLE>
+
DIRTFLOOR
<PROGRAMLISTING>
 
  
#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}
+
</PROGRAMLISTING>
#define DIRTSECT  movement SECT_INSIDE \
+
</INFORMALEXAMPLE>
DIRTFLOOR
 
  
</PROGRAMLISTING>
+
<PARA>You may have noticed I capitalize all macros.  This is not a must but it is
</INFORMALEXAMPLE>
+
suggested so you can easily tell what is a macro and what is not.</PARA>
  
<PARA>You may have noticed I capitalize all macros.  This is not a must but it is
+
</sect2>
suggested so you can easily tell what is a macro and what is not.</PARA>
+
<sect2><TITLE>Including other files in your zone</TITLE>
  
</sect2>
+
<PARA>Another function of the <ACRONYM>VMC</ACRONYM> Pre Processor,
<sect2><TITLE>Including other files in your zone</TITLE>
+
'#include', allows you to include other files  in
 +
your zone file.  The <ACRONYM>VME</ACRONYM> comes with some basic include files
 +
you can use the macros out of and use as examples on how to make
 +
your own include files.  These files are the
 +
''composed.h'',, ''vme.h'',
 +
''values.h'', ''base.h'',
 +
''liquid.h'', and ''wmacros.h''.
 +
Including ''composed.h'' will include all the rest
 +
of
 +
the include files into your zone because it has include statements
 +
that use all the others.</PARA>
  
<PARA>Another function of the <ACRONYM>VMC</ACRONYM> Pre Processor,
+
<NOTE><PARA>You will want to include the files at the beginning of
'#include', allows you to include other files  in
+
your zone file because all defines you use must be defined before
your zone file.  The <ACRONYM>VME</ACRONYM> comes with some basic include files
+
you use them.</PARA></NOTE>
you can use the macros out of and use as examples on how to make
 
your own include files.  These files are the
 
''composed.h'',, ''vme.h'',
 
''values.h'', ''base.h'',
 
''liquid.h'', and ''wmacros.h''.
 
Including ''composed.h'' will include all the rest
 
of
 
the include files into your zone because it has include statements
 
that use all the others.</PARA>
 
  
<NOTE><PARA>You will want to include the files at the beginning of
+
</sect2>
your zone file because all defines you use must be defined before
+
<sect2><TITLE>Doing minor calculations</TITLE>
you use them.</PARA></NOTE>
 
  
</sect2>
+
<PARA> You can also do minor calculations in a macro.  Lets say you
<sect2><TITLE>Doing minor calculations</TITLE>
+
wanted to make it so the higher level an NPC was the heavier he
 +
was and the taller he was.  This would be simple with a macro.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA> You can also do minor calculations in a macro.  Lets say you
+
#define MLEVEL(lvl) \
wanted to make it so the higher level an NPC was the heavier he
+
level lvl \
was and the taller he was.  This would be simple with a macro.</PARA>
+
height lvl+72 \
<INFORMALEXAMPLE>
+
weight lvl*9
<PROGRAMLISTING>
 
  
#define MLEVEL(lvl) \
+
</PROGRAMLISTING>
level lvl \
+
</INFORMALEXAMPLE>
height lvl+72 \
+
<PARA>This macro would increase the height and weight depending on what
weight lvl*9
+
level you made the NPC pretty simple.  There is much more a macro
 +
can do for you but the Pre Processor and all its uses go far beyond the scope
 +
of this manual.  If you are really interested in all the neat things
 +
it can do type the following command at the '$' prompt on your
 +
Linux box.
 +
<command>man cpp</command>
 +
The C-Pre Processor is what the <ACRONYM>VMC</ACRONYM> Pre Processor is based on and most
 +
if not all functions of the CPP work in the <ACRONYM>VMC</ACRONYM>. </PARA>
 +
</sect2>
  
</PROGRAMLISTING>
+
</SECT1>
</INFORMALEXAMPLE>
+
</chapter>
<PARA>This macro would increase the height and weight depending on what
 
level you made the NPC pretty simple.  There is much more a macro
 
can do for you but the Pre Processor and all its uses go far beyond the scope
 
of this manual.  If you are really interested in all the neat things
 
it can do type the following command at the '$' prompt on your
 
Linux box.
 
<command>man cpp</command>
 
The C-Pre Processor is what the <ACRONYM>VMC</ACRONYM> Pre Processor is based on and most
 
if not all functions of the CPP work in the <ACRONYM>VMC</ACRONYM>. </PARA>
 
</sect2>
 
  
</SECT1>
+
<chapter ID="ch-02"><?dbhtml filename="ch02.html">
</chapter>
+
<TITLE>Zone source file</TITLE>
  
<chapter ID="ch-02"><?dbhtml filename="ch02.html">
+
<PARA>In this chapter we will define all the sections of a zone file
<TITLE>Zone source file</TITLE>
+
and go in-depth on the zone info section. Once complete with this
 +
chapter you should be able to create an empty yet compilable zone.</PARA>
  
<PARA>In this chapter we will define all the sections of a zone file
+
<PARA>A zone source file is split up into 6 sections.  A
and go in-depth on the zone info section. Once complete with this
+
zone-declaration section, a mobile (NPC) section, an object
chapter you should be able to create an empty yet compilable zone.</PARA>
+
section, a room section, a reset section, and the <ACRONYM>DIL</ACRONYM>
 +
section.  The zone section is the only section that has to be in the file, and
 +
they may appear in any order.</PARA>
  
<PARA>A zone source file is split up into 6 sectionsA
+
<PARA>Each section is preceded by a section header. These are the six
zone-declaration section, a mobile (NPC) section, an object
+
possible headers:
section, a room section, a reset section, and the <ACRONYM>DIL</ACRONYM>
+
<itemizedlist>
section.  The zone section is the only section that  has to be in the file, and
+
<LISTITEM><PARA>%zone</PARA></LISTITEM>
they may appear in any order.</PARA>
+
<LISTITEM><PARA>%rooms</PARA></LISTITEM>
 +
<LISTITEM><PARA>%mobiles</PARA></LISTITEM>
 +
<LISTITEM><PARA>%objects</PARA></LISTITEM>
 +
<LISTITEM><PARA>%reset</PARA></LISTITEM>
 +
<LISTITEM><PARA>%<ACRONYM>DIL</ACRONYM></PARA></LISTITEM>
 +
</itemizedlist>
 +
The  first  four sections may be considered lists of definitions.
 +
The reset section can be considered a program in a simple  programming
 +
language. And the <ACRONYM>DIL</ACRONYM> section is a bit special - it
 +
includes the zone templates (DIL functions that can be used from any
 +
zone, on anything, as opposed to "specialized" DIL functions placed
 +
inside a unit's
 +
definitions). After all sections you are using are defined you
 +
must tell the compiler you are done the special symbol '%end'
 +
must be placed at the end of the zone for this reason.
 +
</PARA>
  
<PARA>Each section is preceded by a section header. These are the  six
+
<SECT1><TITLE>Definition types</TITLE>
possible headers:
 
<itemizedlist>
 
<LISTITEM><PARA>%zone</PARA></LISTITEM>
 
<LISTITEM><PARA>%rooms</PARA></LISTITEM>
 
<LISTITEM><PARA>%mobiles</PARA></LISTITEM>
 
<LISTITEM><PARA>%objects</PARA></LISTITEM>
 
<LISTITEM><PARA>%reset</PARA></LISTITEM>
 
<LISTITEM><PARA>%<ACRONYM>DIL</ACRONYM></PARA></LISTITEM>
 
</itemizedlist>
 
The  first  four sections may be considered lists of definitions.
 
The reset section can be considered a program in a simple  programming
 
language. And the <ACRONYM>DIL</ACRONYM> section is a bit special - it
 
includes the zone templates (DIL functions that can be used from any
 
zone, on anything, as opposed to "specialized" DIL functions placed
 
inside a unit's
 
definitions).  After all sections you are using are defined you
 
must tell the compiler you are done the special symbol '%end'
 
must be placed at the end of the zone for this reason.
 
</PARA>
 
  
<SECT1><TITLE>Definition types</TITLE>
+
<PARA>When creating your zone there are six main building blocks.
 +
We call these definition types.  Each type represents some kind of
 +
data you want the compiler to be able to recognize.  These data
 +
definitions take the basic form:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>When creating your zone there are six main building blocks.
+
field value
We call these definition types.  Each type represents some kind of
 
data you want the compiler to be able to recognize.  These data
 
definitions take the basic form:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
field value
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>Where field is the name of a data field, and value is some value.
 +
Values are of one of 6 types:
 +
<VARIABLELIST>
 +
<VARLISTENTRY>
 +
;integer
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Number</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
A whole number or if you are in practice of using Hex you can
</INFORMALEXAMPLE>
+
use the C style hex numbers in either upper or lower case (i.e 0X0f3
<PARA>Where field is the name of a data field, and value is some value.
+
0x0f3)</PARA>
Values are of one of 6 types:
+
</LISTITEM>
<VARIABLELIST>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
<VARLISTENTRY>
;integer
+
;string
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Number</primary>
+
<primary>String</primary>
</indexterm>
+
</indexterm>
  
A whole number or if you are in practice of using Hex you can
+
Text enclosed in Double Quotes.  The string can span more than
use the C style hex numbers in either upper or lower case (i.e 0X0f3
+
one line
0x0f3)</PARA>
+
as it would in a description.</PARA>
</LISTITEM>
+
<INFORMALEXAMPLE>
</VARLISTENTRY>
+
<PROGRAMLISTING>
<VARLISTENTRY>
 
;string
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>String</primary>
 
</indexterm>
 
  
Text enclosed in Double Quotes.  The string can span more than
+
title "The dark dragon altar"
one line
+
descr
as it would in a description.</PARA>
+
"There are many things you can see and there are many things that
<INFORMALEXAMPLE>
+
can't be seen but this is still a description none the less."
<PROGRAMLISTING>
 
  
title "The dark dragon altar"
+
</PROGRAMLISTING>
descr
+
</INFORMALEXAMPLE>
"There are many things you can see and there are many things that
+
</LISTITEM>
can't be seen but this is still a description none the less."
+
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;stringlist
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Stringlist</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
A set of strings, it can be a single string or multiple depending on your needs.
</INFORMALEXAMPLE>
+
These are used in names, extras, creators, and special keywords all to be
</LISTITEM>
+
defined later in their respective places.  These are defined in the following
</VARLISTENTRY>
+
manor.</PARA>
<VARLISTENTRY>
+
<INFORMALEXAMPLE>
;stringlist
+
<PROGRAMLISTING>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Stringlist</primary>
 
</indexterm>
 
  
A set of strings, it can be a single string or multiple depending on your needs.
+
&lt;fieldname&gt;    {"string1","string2","string3", ...}
These are used in names, extras, creators, and special keywords all to be
 
defined later in their respective places. These are defined in the following
 
manor.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
&lt;fieldname&gt;    {"string1","string2","string3", ...}
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;intlist
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Intlist</primary></indexterm>
  
</PROGRAMLISTING>
+
A list of numbers which can be used with an extra.  This type works like the
</INFORMALEXAMPLE>
+
stringlist but doesn't need the quotes.</PARA>
</LISTITEM>
+
<INFORMALEXAMPLE>
</VARLISTENTRY>
+
<PROGRAMLISTING>
<VARLISTENTRY>
 
;intlist
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Intlist</primary></indexterm>
 
  
A list of numbers which can be used with an extra. This type works like the
+
extra {"mynumberlist"} {1,2,3,4,5,6,7,...}
stringlist but doesn't need the quotes.</PARA>
+
"This is a number list attached to an extra"
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
extra {"mynumberlist"} {1,2,3,4,5,6,7,...}
+
</PROGRAMLISTING>
"This is a number list attached to an extra"
+
</INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;flags
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Flags</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
Like the Intlist the flag is defined with a list of numbers.  The list of numbers
</INFORMALEXAMPLE>
+
is not taken literally however it is combined to create one number by binary
</LISTITEM>
+
oring the number list together.  If that confuses you don't worry, it
</VARLISTENTRY>
+
takes some getting used to.  These types are used for Manipulation, flags,
<VARLISTENTRY>
+
and positions.</PARA>
;flags
+
<INFORMALEXAMPLE>
<DICTDEF>
+
<PROGRAMLISTING>
<PARA><indexterm>
 
<primary>Flags</primary>
 
</indexterm>
 
  
Like the Intlist the flag is defined with a list of numbers.  The list of numbers
+
flags {2,8}
is not taken literally however it is combined to create one number by binary
+
manipulate {8}
oring the number list together.  If that confuses you don't worry, it
 
takes some getting used to.  These types are used for Manipulation, flags,
 
and positions.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
flags {2,8}
+
</PROGRAMLISTING>
manipulate {8}
+
</INFORMALEXAMPLE>
 +
<PARA>In the previous example the 'flags' value after this zone compiles
 +
would be 10 because binary oring the two flags together is a lot
 +
like adding.  The two numbers probably make no sense so most flags
 +
you use will have defines if I used the defines found in
 +
''vme.h'' the previous example would look like this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
flags {UNIT_FL_INVISIBILE,UNIT_FL_BURIED}
</INFORMALEXAMPLE>
+
manipulate {WEAR_BODY}
<PARA>In the previous example the 'flags' value after this zone compiles
 
would be 10 because binary oring the two flags together is a lot
 
like adding.  The two numbers probably make no sense so most flags
 
you use will have defines if I used the defines found in
 
''vme.h'' the previous example would look like this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
flags {UNIT_FL_INVISIBILE,UNIT_FL_BURIED}
+
</PROGRAMLISTING>
manipulate {WEAR_BODY}
+
</INFORMALEXAMPLE>
 +
<PARA>We will cover this more in-depth later but it was necessary to give
 +
a good overview so you understand this field type enough to recognize
 +
what it is when you see it.</PARA>
 +
</LISTITEM> </VARLISTENTRY> <VARLISTENTRY>
 +
;symbol
 +
<DICTDEF> <PARA><indexterm>
 +
<primary>Symbol</primary> </indexterm>
  
</PROGRAMLISTING>
+
A label you reference from other parts in your zones.  Every
</INFORMALEXAMPLE>
+
unit (room,object,room) and even the zone itself has a unique label
<PARA>We will cover this more in-depth later but it was necessary to give
+
that can be referenced.  It is important to make symbol names that
a good overview so you understand this field type enough to recognize
+
are clear so the Administrators of the mud know what each item
what it is when you see it.</PARA>
+
is when using the online administration commands.</PARA>
</LISTITEM> </VARLISTENTRY> <VARLISTENTRY>
+
<INFORMALEXAMPLE>
;symbol
+
<PROGRAMLISTING>
<DICTDEF> <PARA><indexterm>
 
<primary>Symbol</primary> </indexterm>
 
  
A label you reference from other parts in your zones.  Every
+
dark_sword /*good symbol*/
unit (room,object,room) and even the zone itself has a unique label
+
rm_5892 /*Bad symbol*/
that can be referenced.  It is important to make symbol names that
 
are clear so the Administrators of the mud know what each item
 
is when using the online administration commands.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
dark_sword /*good symbol*/
+
</PROGRAMLISTING>
rm_5892 /*Bad symbol*/
+
</INFORMALEXAMPLE>
 +
<PARA>When loading items online the zone symbol and the item symbol are
 +
combined to create a reference to the item.  For example if our zone
 +
name was 'dragon' and our item was 'dark_sword' the symbolic name for
 +
this item would be 'dark_sword@dragon'.  Using symbols will be
 +
covered more in the <ACRONYM>DIL</ACRONYM> manual and in the administration manuals for
 +
loading objects online.  For now it is enough to understand
 +
symbols must follow the following rules when being defined.</PARA>
 +
<itemizedlist>
 +
<LISTITEM><PARA>The first letter of the
 +
symbol must be a letter of the alphabet or a '_' character</PARA></LISTITEM>
 +
<LISTITEM><PARA>Characters following the first can be numbers, alphabet
 +
letters, and '_' characters</PARA></LISTITEM>
 +
<LISTITEM><PARA>The name can be no longer than
 +
15 characters</PARA></LISTITEM>
 +
<LISTITEM><PARA>No reserved keywords can be used as a name
 +
<XREF LINKEND="app-b"></PARA></LISTITEM>
 +
</itemizedlist>
  
</PROGRAMLISTING>
+
<NOTE><PARA>the end tag that ends all unit definitions is also
</INFORMALEXAMPLE>
+
considered a symbol it is just a symbol that must be included with</PARA></NOTE>
<PARA>When loading items online the zone symbol and the item symbol are
+
</LISTITEM>
combined to create a reference to the item.  For example if our zone
+
</VARLISTENTRY>
name was 'dragon' and our item was 'dark_sword' the symbolic name for
+
</VARIABLELIST></PARA>
this item would be 'dark_sword@dragon'.  Using symbols will be
 
covered more in the <ACRONYM>DIL</ACRONYM> manual and in the administration manuals for
 
loading objects online.  For now it is enough to understand
 
symbols must follow the following rules when being defined.</PARA>
 
<itemizedlist>
 
<LISTITEM><PARA>The first letter of the
 
symbol must be a letter of the alphabet or a '_' character</PARA></LISTITEM>
 
<LISTITEM><PARA>Characters following the first can be numbers, alphabet
 
letters, and '_' characters</PARA></LISTITEM>
 
<LISTITEM><PARA>The name can be no longer than
 
15 characters</PARA></LISTITEM>
 
<LISTITEM><PARA>No reserved keywords can be used as a name
 
<XREF LINKEND="app-b"></PARA></LISTITEM>
 
</itemizedlist>
 
  
<NOTE><PARA>the end tag that ends all unit definitions is also
+
<PARA>There are two other field types that can not be defined as a
considered a symbol it is just a symbol that must be included with</PARA></NOTE>
+
regular field type.  These are the function reference and the
</LISTITEM>
+
Structure.  The function reference can be either a reference to a
</VARLISTENTRY>
+
<ACRONYM>DIL</ACRONYM> function or a special function called from the
</VARIABLELIST></PARA>
+
base code.</para>
  
<PARA>There are two other field types that can not be defined as a
+
<NOTE><PARA>Special functions are being replaced with
regular field type.  These are the function reference and the
+
<ACRONYM>DIL</ACRONYM> for better performance and should only be used
Structure.  The function reference can be either a reference to a
+
when no <ACRONYM>DIL</ACRONYM> functions exist to replace
<ACRONYM>DIL</ACRONYM> function or a special function called from the
+
them</PARA></NOTE>
base code.</para>
 
  
<NOTE><PARA>Special functions are being replaced with
+
<para>The Structure field types are a combination of other field types
<ACRONYM>DIL</ACRONYM> for better performance and should only be used
+
to make a special field type for the unit being defined.  A good example
when no <ACRONYM>DIL</ACRONYM> functions exist to replace
+
of this is a 'exit' for a room.  The exit has everything from flag,
them</PARA></NOTE>
+
string, stringlist, and even description fields.  The exit field will be
 +
defined much more in-depth in the chapter on rooms but it is important
 +
to know some fields are considered Structure fields because they can have
 +
many values.  The only two Structure fields are the exit and extra
 +
fields which will both be defined more later because they can be used
 +
differently depending on what you are using them for.</PARA>
  
<para>The Structure field types are  a combination of other field types
+
</SECT1>
to make a special field type for the unit being defined.  A good example
 
of this is a 'exit' for a room.  The exit has everything from flag,
 
string, stringlist, and even description fields.  The exit field will be
 
defined much more in-depth in the chapter on rooms but it is important
 
to know some fields are considered Structure fields because they can have
 
many values.  The only two Structure fields are the exit and extra
 
fields which will both be defined more later because they can be used
 
differently depending on what you are using them for.</PARA>
 
  
</SECT1>
+
<SECT1 id="zoneinfo">
 +
<TITLE>Zone information section</TITLE>
  
<SECT1 id="zoneinfo">
+
<PARA>The zone information section is the only section that must
<TITLE>Zone information section</TITLE>
+
exist in the source file of your area.  With out this section the
 +
compiler is unable to create the zone because frankly it doesn't
 +
know what to call it.  It is also the easiest of the sections to
 +
learn because there is only a few possible fields. The  Zone-section  defines  the global parameters for the current
 +
zone. It is usually wise to place this section in the top of  the
 +
source file to make it easy to find the zone information when editing the file.</PARA>
  
<PARA>The zone information section is the only section that must
+
<TABLE frame=all>
exist in the source file of your area.  With out this section the
+
<TITLE>Zone section field descriptions</TITLE>
compiler is unable to create the zone because frankly it doesn't
+
<TGROUP align=left cols=3 colsep=1>
know what to call it.  It is also the easiest of the sections to
+
<THEAD>
learn because there is only a few possible fields. The  Zone-section  defines  the global parameters for the current
+
<ROW>
zone. It is usually wise to place this section in the top of  the
+
<ENTRY>Field</ENTRY>
source file to make it easy to find the zone information when editing the file.</PARA>
+
<ENTRY>Type</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
  
<TABLE frame=all>
+
<TBODY>
<TITLE>Zone section field descriptions</TITLE>
 
<TGROUP align=left cols=3 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Field</ENTRY>
 
<ENTRY>Type</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
  
<TBODY>
+
<ROW>
 +
<ENTRY>creators</ENTRY>
 +
<ENTRY>Stringlist</ENTRY>
 +
<ENTRY>
 +
This field is where you place the creators of the zone.  With
 +
this field filled out the Administrators and builders can easily find out who
 +
the zone was written by and be able to contact them if there are problems.
 +
</ENTRY></ROW>
 +
<ROW>
 +
<ENTRY>lifespan</ENTRY>
 +
<ENTRY>Number</ENTRY>
 +
<ENTRY>
 +
This  defines  the interval between resets for this zone, in minutes.
 +
Default is 60 if this field is left out of the information section.
 +
</ENTRY></ROW>
 +
<ROW>
 +
<ENTRY>notes</ENTRY>
 +
<ENTRY>String</ENTRY>
 +
<ENTRY>
 +
This is a plain text description of the zone for administrators and builders.
 +
It is often a good idea to
 +
include your e-mail address in the  notes so you can be
 +
reached easily by the administrators.
 +
</ENTRY></ROW>
 +
<ROW>
 +
<ENTRY>reset</ENTRY>
 +
<ENTRY>Number</ENTRY>
 +
<ENTRY>
 +
This combined with 'lifespan' defines if the zone will be reset.  This
 +
field gives the condition that must be met to reset the zones you
 +
should use the defines in the ''vme.h'', RESET_NOT,
 +
RESET_IFEMPTY, and RESET_ANYHOW.  Default is RESET_ANYHOW, which
 +
means, the zone will be reset even if players are present within it.
 +
</ENTRY></ROW>
 +
<ROW>
 +
<ENTRY>title</ENTRY>
 +
<ENTRY>String</ENTRY>
 +
<ENTRY>
 +
This is the title of the zone, for example Dragons Nest, Dark
 +
station, and
 +
creators hide out.  It is used mainly for the areas command so
 +
players can get a list of all the areas in the game.  It can
 +
however be accessed by the 'zoneptr' variable type in <ACRONYM>DIL</ACRONYM>.  If you
 +
have
 +
a zone that spans across multiple source files you only need to
 +
define the title once.  If you put the title in all source files it
 +
will show up multiple times in the area listing.  You would also
 +
leave this blank if the zone should not be on the areas list like an
 +
administration zone.
 +
</ENTRY></ROW>
  
<ROW>
+
<ROW>
<ENTRY>creators</ENTRY>
+
<ENTRY>weather</ENTRY>
<ENTRY>Stringlist</ENTRY>
+
<ENTRY>Integer</ENTRY>
<ENTRY>
+
<ENTRY>
This field is where you place the creators of the zone.  With
+
This field sets the humidity level of the zone.  If for example you want
this field filled out the Administrators and builders can easily find out who
+
a hot desert like zone you would want to set this to its highest value.  
the zone was written by and be able to contact them if there are problems.
+
The range of this field is 1000 to -1000.  This is an optional field and
</ENTRY></ROW>
+
will not be covered else where because it is simple to use.
<ROW>
+
</ENTRY></ROW>
<ENTRY>lifespan</ENTRY>
 
<ENTRY>Number</ENTRY>
 
<ENTRY>
 
This  defines  the interval between resets for this zone, in minutes.
 
Default is 60 if this field is left out of the information section.
 
</ENTRY></ROW>
 
<ROW>
 
<ENTRY>notes</ENTRY>
 
<ENTRY>String</ENTRY>
 
<ENTRY>
 
This is a plain text description of the zone for administrators and builders.
 
It is often a good idea to
 
include your e-mail address in the  notes so you can be
 
reached easily by the administrators.
 
</ENTRY></ROW>
 
<ROW>
 
<ENTRY>reset</ENTRY>
 
<ENTRY>Number</ENTRY>
 
<ENTRY>
 
This combined with 'lifespan' defines if the zone will be reset.  This
 
field gives the condition that must be met to reset the zones you
 
should use the defines in the ''vme.h'', RESET_NOT,
 
RESET_IFEMPTY, and RESET_ANYHOW.  Default is RESET_ANYHOW, which
 
means, the zone will be reset even if players are present within it.
 
</ENTRY></ROW>
 
<ROW>
 
<ENTRY>title</ENTRY>
 
<ENTRY>String</ENTRY>
 
<ENTRY>
 
This is the title of the zone, for example Dragons Nest, Dark
 
station, and
 
creators hide out.  It is used mainly for the areas command so
 
players can get a list of all the areas in the game.  It can
 
however be accessed by the 'zoneptr' variable type in <ACRONYM>DIL</ACRONYM>.  If you
 
have
 
a zone that spans across multiple source files you only need to
 
define the title once.  If you put the title in all source files it
 
will show up multiple times in the area listing.  You would also
 
leave this blank if the zone should not be on the areas list like an
 
administration zone.
 
</ENTRY></ROW>
 
  
<ROW>
 
<ENTRY>weather</ENTRY>
 
<ENTRY>Integer</ENTRY>
 
<ENTRY>
 
This field sets the humidity level of the zone.  If for example you want
 
a hot desert like zone you would want to set this to its highest value.
 
The range of this field is 1000 to -1000.  This is an optional field and
 
will not be covered else where because it is simple to use.
 
</ENTRY></ROW>
 
  
 +
<ROW>
 +
<ENTRY>%zone</ENTRY>
 +
<ENTRY>Symbol</ENTRY>
 +
<ENTRY>
 +
This entry defines the name of the
 +
zone. Default is the preceding  component of the current filename,
 +
minus the trailing ".zon". Note, the symbol should be added
 +
after the %zone tag, which should always be put, even if you
 +
do not add a symbol after it.
 +
</ENTRY></ROW>
 +
</TBODY>
 +
</TGROUP>
 +
</TABLE>
  
<ROW>
 
<ENTRY>%zone</ENTRY>
 
<ENTRY>Symbol</ENTRY>
 
<ENTRY>
 
This entry defines the name of the
 
zone. Default is the preceding  component of the current filename,
 
minus the trailing ".zon". Note, the symbol should be added
 
after the %zone tag, which should always be put, even if you
 
do not add a symbol after it.
 
</ENTRY></ROW>
 
</TBODY>
 
</TGROUP>
 
</TABLE>
 
  
 +
<PARA>The only field that must exist when you go to create the zone
 +
information section is the '%zone'.  Leaving the '%zone' field out
 +
will cause an error when you try to compile it.  We suggest you
 +
not only put the '%zone' field but you also add a symbol or as I
 +
call it a zone name.  The following are three legal examples of a Zone information header.  You be the judge of
 +
which is more informative.</PARA>
  
<PARA>The only field that must exist when you go to create the zone
+
<INFORMALEXAMPLE>
information section is the '%zone'.  Leaving the '%zone' field out
+
<PROGRAMLISTING>
will cause an error when you try to compile it.  We suggest you
 
not only put the '%zone' field but you also add a symbol or as I
 
call it a zone name.  The following are three legal examples of a Zone information header.  You be the judge of
 
which is more informative.</PARA>
 
  
<INFORMALEXAMPLE>
+
/*very bad*/
<PROGRAMLISTING>
+
%zone
  
/*very bad*/
+
/*bad but better than nothing*/
%zone
+
%zone bug_planet
  
/*bad but better than nothing*/
+
/*The way it should be done!*/
%zone bug_planet
+
%zone dragonst
 +
lifespan 20
 +
reset RESET_ANYHOW
 +
creators {"whistler"}
  
/*The way it should be done!*/
+
notes
%zone dragonst
+
"This is the dragon station I shortened it to dragonst for ease in
lifespan 20
+
loading.  If you have  any questions email me at whistler@valhalla.com"
reset RESET_ANYHOW
 
creators {"whistler"}
 
  
notes
+
help
"This is the dragon station I shortened it to dragonst for ease in
+
"Not sure what could help you now.  You are stuck on one of the
loading.  If you have any questions email me at whistler@valhalla.com"
+
weirdest space stations you have ever seen and you smell burning
 +
sulfur."
  
help
+
</PROGRAMLISTING>
"Not sure what could help you now.  You are stuck on one of the
+
</INFORMALEXAMPLE>
weirdest space stations you have ever seen and you smell burning
 
sulfur."
 
  
</PROGRAMLISTING>
+
<PARA>If you felt like it you could add a '%end' to the proceeding
</INFORMALEXAMPLE>
+
examples and compile them.  They would create an empty zone so
 +
wouldn't be very exciting but at least its possible.  We will not go into any compiling until we have at least one unit
 +
type to compile because it is pretty useless to do.
 +
  the next chapters will
 +
define the basic unit building blocks you will use for rooms,
 +
objects, and NPCs and start you off on compiling.</PARA>
 +
</SECT1>
  
<PARA>If you felt like it you could add a '%end' to the proceeding
+
</chapter>
examples and compile them.  They would create an empty zone so
 
wouldn't be very exciting but at least its possible.  We will not go into any compiling until we have at least one unit
 
type to compile because it is pretty useless to do.
 
  the next chapters will
 
define the basic unit building blocks you will use for rooms,
 
objects, and NPCs and start you off on compiling.</PARA>
 
</SECT1>
 
  
</chapter>
+
<chapter ID="ch-03"><?dbhtml filename="ch03.html">
 +
<TITLE>Unit building blocks</TITLE>
  
<chapter ID="ch-03"><?dbhtml filename="ch03.html">
+
<PARA>When creating your zone you will find some basic
<TITLE>Unit building blocks</TITLE>
+
structures are used in all three unit types rooms, objects, and
 +
NPCs. In this chapter we will define the main building blocks of
 +
all units along with some helpful hints </PARA>
  
<PARA>When creating your zone you will find some basic
+
<PARA>No matter which unit type you are dealing with there is a
structures are used in all three unit types rooms, objects, and
+
simple basic structure that lets the compiler know not only what
NPCs. In this chapter we will define the main building blocks of
+
unit type it is dealing with but where one unit begins and where it
all units along with some helpful hints </PARA>
+
ends.  The way the compiler tells what unit type it is dealing with
 +
is by the section header '%rooms', '%objects', and '%mobiles'.  All
 +
rooms must be defined under the '%rooms' header and likewise objects
 +
and NPCS under their respective headers. Each unit starts with a
 +
symbolic name called the unit symbol and ends with the keyword
 +
end.  The following would be a legal definition of any
 +
unit type:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>No matter which unit type you are dealing with there is a
+
symbol_name
simple basic structure that lets the compiler know not only what
+
end
unit type it is dealing with but where one unit begins and where it
 
ends.  The way the compiler tells what unit type it is dealing with
 
is by the section header '%rooms', '%objects', and '%mobiles'.  All
 
rooms must be defined under the '%rooms' header and likewise objects
 
and NPCS under their respective headers.  Each unit starts with a
 
symbolic name called the unit symbol and ends with the keyword
 
end.  The following would be a legal definition of any
 
unit type:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
symbol_name
+
</PROGRAMLISTING>
end
+
</INFORMALEXAMPLE>
 +
<PARA>If you define a unit like this when it loads it will be blank, while
 +
this is not extremely useful it is good to know you can leave
 +
out any field you don't feel you need.</PARA>
  
</PROGRAMLISTING>
 
</INFORMALEXAMPLE>
 
<PARA>If you define a unit like this when it loads it will be blank, while
 
this is not extremely useful it is good to know you can leave
 
out any field you don't feel you need.</PARA>
 
  
 +
<VARIABLELIST>
 +
<TITLE>Unit building blocks</TITLE>
 +
<VARLISTENTRY>
 +
;symbol field
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>symbol field</primary>
 +
</indexterm>
  
<VARIABLELIST>
+
In the last chapter we defined the different field types and
<TITLE>Unit building blocks</TITLE>
+
the rules you must follow when defining a symbol.  It is
<VARLISTENTRY>
+
important enough to relist these rules here so you do not run into
;symbol field
+
problems when creating your units.
<DICTDEF>
+
<itemizedlist>
<PARA><indexterm>
+
<LISTITEM><PARA>The first letter of the
<primary>symbol field</primary>
+
symbol must be a letter of the alphabet or a '_' character</PARA></LISTITEM>
</indexterm>
+
<LISTITEM><PARA>Characters following the first can be numbers, alphabet
 +
letters, and '_' characters</PARA></LISTITEM>
 +
<LISTITEM><PARA>The symbol can be no longer than
 +
15 characters</PARA></LISTITEM>
 +
<LISTITEM><PARA>No reserved keywords can be used as a symbol<XREF LINKEND="app-b"></PARA></LISTITEM>
 +
</itemizedlist></PARA>
  
In the last chapter we defined the different field types and
+
<NOTE><PARA>It is also important to know currently it is hard to deal with units
the rules you must follow when defining a symbol.  It is
+
having capital letters in them, this may be fixed in the future but it is
important enough to relist these rules here so you do not run into
+
good practice to use all lower case characters in the
problems when creating your units.
+
symbols.</PARA></NOTE>
<itemizedlist>
 
<LISTITEM><PARA>The first letter of the
 
symbol must be a letter of the alphabet or a '_' character</PARA></LISTITEM>
 
<LISTITEM><PARA>Characters following the first can be numbers, alphabet
 
letters, and '_' characters</PARA></LISTITEM>
 
<LISTITEM><PARA>The symbol can be no longer than
 
15 characters</PARA></LISTITEM>
 
<LISTITEM><PARA>No reserved keywords can be used as a symbol<XREF LINKEND="app-b"></PARA></LISTITEM>
 
</itemizedlist></PARA>
 
  
<NOTE><PARA>It is also important to know currently it is hard to deal with units
+
<PARA>Another thing you should think about when defining your symbol
having capital letters in them, this may be fixed in the future but it is
+
names is to be clear about what the unit is.  When you list units on
good practice to use all lower case characters in the
+
the <ACRONYM>VME</ACRONYM> server with <command>wstat</command> the symbolic names are
symbols.</PARA></NOTE>
+
shown
 +
if you were to see the list:
 +
<computeroutput>
 +
i6853 b2419 l1854
 +
</computeroutput>
 +
You would have no idea what those three items were unless you
 +
personally built them recently, therefore it is a much better coding
 +
practice to name things what they are like:
 +
<computeroutput>
 +
long_sword healer_hut dog
 +
</computeroutput>
 +
</PARA></LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;title field
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>title field</primary>
 +
</indexterm>
  
<PARA>Another thing you should think about when defining your symbol
+
The title field is probably the easiest field on all units it
names is to be clear about what the unit is.  When you list units on
+
is what is shown on the first line of a room when you enter and it
the <ACRONYM>VME</ACRONYM> server with <command>wstat</command> the symbolic names are
+
is the name shown when you get an object or attack a NPC.
shown
+
There is only two important things to look at when defining titles
if you were to see the list:
+
one is punctuation and the other is capitalizationRoom titles
<computeroutput>
+
need to be capitalized and so do proper names but the first letter of an object
i6853 b2419 l1854
+
title or a NPC title do not normally need to be capitalized. this is
</computeroutput>
+
best explained by some examples.</PARA>
You would have no idea what those three items were unless you
+
<INFORMALEXAMPLE>
personally built them recently, therefore it is a much better coding
+
<PROGRAMLISTING>
practice to name things what they are like:
 
<computeroutput>
 
long_sword healer_hut dog
 
</computeroutput>
 
</PARA></LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;title field
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>title field</primary>
 
</indexterm>
 
  
The title field is probably the easiest field on all units it
+
title "The dragons in."/*good*/
is what is shown on the first line of a room when you enter and it
+
title "a big bull dog."/*bad has a period at the end*/
is the name shown when you get an object or attack a NPC.
+
title "Bill the destroyer"/*good*/
There is only two important things to look at when defining titles
+
title "A long dagger"/*bad capital 'a'*/
one is punctuation and the other is capitalization.  Room titles
 
need to be capitalized and so do proper names but the first letter of an object
 
title or a NPC title do not normally need to be capitalized. this is
 
best explained by some examples.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
title "The dragons in."/*good*/
+
</PROGRAMLISTING>
title "a big bull dog."/*bad has a period at the end*/
+
</INFORMALEXAMPLE>
title "Bill the destroyer"/*good*/
+
<PARA>Now to show why some of those are good we will demonstrate by some
title "A long dagger"/*bad capital 'a'*/
+
sample output in the game.
 +
<computeroutput>
  
</PROGRAMLISTING>
+
prompt:  l
</INFORMALEXAMPLE>
+
The Dragons Inn
<PARA>Now to show why some of those are good we will demonstrate by some
+
You are standing in a moldy inn.
sample output in the game.
 
<computeroutput>
 
  
prompt: l
+
prompt: get A long dagger
The Dragons Inn
+
You get A long dagger.
You are standing in a moldy inn.
 
  
prompt: get A long dagger
+
prompt kick dog
You get A long dagger.
+
You kick a bull dog. in the head.
 +
</computeroutput>
 +
Notice the 'A' and the extra period do not really look right where
 +
they end up appearing in the game. These may be minor nit picky
 +
details but if you do it right the first time you won't have to deal
 +
with the english major that just happens to be playing on your
 +
mud.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;names field
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>names field</primary>
 +
</indexterm>
  
prompt kick dog
+
The 'names' field defines the names everything in the game can
You kick a bull dog. in the head.
+
use to interact with your unit. For rooms the names are used as
</computeroutput>
+
teleport or goto points for characters and NPCs or they are
Notice the 'A' and the extra period do not really look right where
+
sometimes used for special DIL functions on objects to trigger in certain
they end up appearing in the game.  These may be minor nit picky
+
rooms.  On NPCs and objects names can be used for anything from
details but if you do it right the first time you won't have to deal
+
poking a player to giving a player an object.  The names field is
with the english major that just happens to be playing on your
+
very flexible it has even been used to store what a container is
mud.</PARA>
+
holding in order to have quick access to the names in the container.
</LISTITEM>
+
it</PARA>
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;names field
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>names field</primary>
 
</indexterm>
 
  
The 'names' field defines the names everything in the game can
+
<PARA>When making rooms it is not necessary to put room names.  In
use to interact with your unitFor rooms the names are used as
+
fact it is a good way of making sure players can't teleport to
teleport or goto points for characters and NPCs or they are
+
certain rooms because if the room doesn't have a name the person
sometimes used for special DIL functions on objects to trigger in certain
+
can't teleport to itObjects and NPCs must have names because if
rooms.  On NPCs and objects names can be used for anything from
+
you leave names off of them you can not pick them up or kill them
poking a player to giving a player an objectThe names field is
+
depending on which you are dealing withIt is also good practice
very flexible it has even been used to store what a container is
+
to use all combinations of the object or NPCs title so a
holding in order to have quick access to the names in the container.
+
player will know exactly what to type to use the item for example:</PARA>
it</PARA>
+
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>When making rooms it is not necessary to put room names.  In
+
bad_obj
fact it is a good way of making sure players can't teleport to
+
title a small dog"
certain rooms because if the room doesn't have a name the person
+
names{"small dog","small","dog"}
can't teleport to it.  Objects and NPCs must have names because if
+
end
you leave names off of them you can not pick them up or kill them
 
depending on which you are dealing with.  It is also good practice
 
to use all combinations of the object or NPCs title so a
 
player will know exactly what to type to use the item for example:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
bad_obj
+
</PROGRAMLISTING>
title a small dog"
+
</INFORMALEXAMPLE>
names{"small dog","small","dog"}
+
<PARA>It is up to you as a builder if you want to use names like 'small'
end
+
in your names list since you would not 'get small' in real life it
 +
may not have to be added to the names list.  It is important however
 +
to define your extras from big to small because of how the <ACRONYM>VME</ACRONYM>
 +
command interpreter handles names of things.  For example if you had
 +
the following names:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
small_item
</INFORMALEXAMPLE>
+
title "a small item"
<PARA>It is up to you as a builder if you want to use names like 'small'
+
names {"small","item","small item"}
in your names list since you would not 'get small' in real life it
 
may not have to be added to the names list.  It is important however
 
to define your extras from big to small because of how the <ACRONYM>VME</ACRONYM>
 
command interpreter handles names of things.  For example if you had
 
the following names:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
small_item
+
</PROGRAMLISTING>
title "a small item"
+
</INFORMALEXAMPLE>
names {"small","item","small item"}
+
<PARA>When you try to <command>give small item Bill</command>.  The interpreter
 +
would try to give
 +
small to item and that would not be what you wanted to do.  Don't
 +
worry the compiler will catch this and give you an error something
 +
like:
 +
<computeroutput>
  
</PROGRAMLISTING>
+
Fatal name ordering on line ###.
</INFORMALEXAMPLE>
 
<PARA>When you try to <command>give small item Bill</command>. The interpreter
 
would try to give
 
small to item and that would not be what you wanted to do.  Don't
 
worry the compiler will catch this and give you an error something
 
like:
 
<computeroutput>
 
  
Fatal name ordering on line ###.
+
</computeroutput></PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</computeroutput></PARA>
+
<VARLISTENTRY>
</LISTITEM>
+
;descr field
</VARLISTENTRY>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>descr field</primary>
 +
</indexterm>
  
<VARLISTENTRY>
+
The description building block is used in many places. You will find
;descr field
+
description fields on extras, exits, rooms, NPCs, objects, and as
  <DICTDEF>
+
you have already seen the help and the notes field of the zone
<PARA><indexterm>
+
information section are also description fields.</PARA>
<primary>descr field</primary>
 
</indexterm>
 
  
The description building block is used in many placesYou will find
+
<PARA>  Depending on what
description fields on extras, exits, rooms, NPCs, objects, and as
+
you are working on description fields can mean totally different
you have already seen the help and the notes field of the zone
+
things to the person looking in the roomA description field on a
information section are also description fields.</PARA>
+
room can be the inside or outside of the rooms description.  A
 +
description on extras can be an NPCs descr or an extra description
 +
on the room like if you looked at a 'rug' or a 'chair'.  On an exit
 +
the descr field describes what you see when you look in that
 +
direction from the room you are in.  The important thing right now
 +
is no matter where you use them they all work the same.</PARA>
  
<PARA> Depending on what
+
<PARA>description fields like the title field have a tag or unlike
you are working on description fields can mean totally different
+
the title field can have a set of tags before them like in extras or
things to the person looking in the room.  A description field on a
+
exits but like titles they are just a string surrounded by quotes.
room can be the inside or outside of the rooms description.  A
+
You can make multiple line descriptions if the description is on a
description on extras can be an NPCs descr or an extra description
+
NPC you may not want to since it is the description shown when you
on the room like if you looked at a 'rug' or a 'chair'. On an exit
+
walk into the room.  The following would be some examples of room descriptions.</PARA>
the descr field describes what you see when you look in that
 
direction from the room you are in.  The important thing right now
 
is no matter where you use them they all work the same.</PARA>
 
  
<PARA>description fields like the title field have a tag or unlike
+
<INFORMALEXAMPLE>
the title field can have a set of tags before them like in extras or
+
<PROGRAMLISTING>
exits but like titles they are just a string surrounded by quotes.
 
You can make multiple line descriptions if the description is on a
 
NPC you may not want to since it is the description shown when you
 
walk into the room.  The following would be some examples of room descriptions.</PARA>
 
  
<INFORMALEXAMPLE>
+
descr
<PROGRAMLISTING>
+
"this is how you would define a room descr and as you can see it can
 +
be much longer than a line if you like."
  
descr
+
extra {"basic extra"}
"this is how you would define a room descr and as you can see it can
+
"This is a description field on an extra."
be much longer than a line if you like."
 
  
extra {"basic extra"}
+
extra{"more advanced","extra"}{1,2,3,4,5,6}
"This is a description field on an extra."
+
"This is still the description field.  Like the room description or
 +
any description field for that matter this can be longer than a
 +
line."
  
extra{"more advanced","extra"}{1,2,3,4,5,6}
+
east to bathroom descr
"This is still the description field.  Like the room description or
+
"You see one big toilet!";
any description field for that matter this can be longer than a
 
line."
 
  
east to bathroom descr
+
</PROGRAMLISTING>
"You see one big toilet!";
+
</INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING>
+
<VARLISTENTRY>
</INFORMALEXAMPLE>
+
;extra fields
</LISTITEM>
+
<DICTDEF>
</VARLISTENTRY>
+
<PARA><indexterm>
 +
<primary>extra fields</primary>
 +
</indexterm>
  
<VARLISTENTRY>
+
The extra field is the work horse for the builder.  It is the
;extra fields
+
building block that most brings your zone to life.  You can use it
  <DICTDEF>
+
to describe body parts or items in a room. When you use
<PARA><indexterm>
+
<ACRONYM>DIL</ACRONYM> you will use extras to store information like quest information
<primary>extra fields</primary>
+
or special information you need later.  Extras also store the
</indexterm>
+
main description on NPCs since the descr field on NPCs is really the
 +
long title shown in the room which will be explained later
 +
in <xref linkend="ch-05">.</PARA>
  
The extra field is the work horse for the builder.  It is the
+
<PARA>The extra Is the first structure definition you have run into
building block that most brings your zone to lifeYou can use it
+
so it may take some playing with to figure it outThe extra has
to describe body parts or items in a roomWhen you use
+
actually 4 fields three of them must be there in some formThe
<ACRONYM>DIL</ACRONYM> you will use extras to store information like quest information
+
first is the identifier that tells the compiler that this is an
or special information you need later.  Extras also store the
+
extra, the second is a stringlist, the third is an Optional
main description on NPCs since the descr field on NPCs is really the
+
Intlist, and the final one is the extra description field.  If the extra
long title shown in the room which will be explained later
+
had all the fields it would look like this:</PARA>
in <xref linkend="ch-05">.</PARA>
+
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>The extra Is the first structure definition you have run into
+
extra {"small chair","chair"} {1,2,3,4,5} "Its a chair."
so it may take some playing with to figure it out.  The extra has
 
actually 4 fields three of them must be there in some form.  The
 
first is the identifier that tells the compiler that this is an
 
extra, the second is a stringlist, the third is an Optional
 
Intlist, and the final one is the extra description field. If the extra
 
had all the fields it would look like this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
extra {"small chair","chair"} {1,2,3,4,5} "Its a chair."
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>If the previous wasn't an example we
 +
would have left out the Intlist because it is not necessary to put
 +
the Intlist on a chair unless you want it there for some special <ACRONYM>DIL</ACRONYM>
 +
you are creating. the Intlist is the only field that can be totally
 +
left out but you can leave the string list blank when you want
 +
to make the extra the default description when the object, room, or
 +
NPC is being looked at, like this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
extra {}
</INFORMALEXAMPLE>
+
"This would be what you see when you look at any of the names in the
<PARA>If the previous wasn't an example we
+
names list."
would have left out the Intlist because it is not necessary to put
 
the Intlist on a chair unless you want it there for some special <ACRONYM>DIL</ACRONYM>
 
you are creating. the Intlist is the only field that can be totally
 
left out but you can leave the string list blank when you want
 
to make the extra the default description when the object, room, or
 
NPC is being looked at, like this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
extra {}
+
</PROGRAMLISTING>
"This would be what you see when you look at any of the names in the
+
</INFORMALEXAMPLE>
names list."
+
<PARA>We will go more in-depth into why you want to do this in the
 +
following chapters.
 +
</PARA></LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
</PROGRAMLISTING>
+
<PARA>You are now ready to put these building blocks to work.  You have only
</INFORMALEXAMPLE>
+
to learn how to put these fields to work for each of the three unit
<PARA>We will go more in-depth into why you want to do this in the
+
types and you will be off and running.</PARA>
following chapters.
 
</PARA></LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<PARA>You are now ready to put these building blocks to work.  You have only
+
</chapter>
to learn how to put these fields to work for each of the three unit
 
types and you will be off and running.</PARA>
 
  
</chapter>
+
<chapter ID="ch-04"><?dbhtml filename="ch04.html">
 +
<TITLE>The room section</TITLE>
  
<chapter ID="ch-04"><?dbhtml filename="ch04.html">
+
<PARA> The previous chapter gave you the basic building blocks that
<TITLE>The room section</TITLE>
+
will be used all through creating rooms, NPCs, and objects.  If you
 +
jumped straight to this chapter without reading about the general
 +
building blocks you might want to return to <XREF LINKEND="ch-03">
 +
first. This chapter will deal with all the fields
 +
of rooms what they are and how to use them but with out the previous
 +
chapter you may get lost.</PARA>
  
<PARA> The previous chapter gave you the basic building blocks that
+
<PARA>In order to get started building rooms you should first be aware
will be used all through creating rooms, NPCs, and objects.  If you
+
of the room fields you can use.  The <xref linkend="rmfields"> shows a full listing
jumped straight to this chapter without reading about the general
+
of all the room fields and their types as defined in <xref linkend="ch-03">.</PARA>
building blocks you might want to return to <XREF LINKEND="ch-03">
 
first.  This chapter will deal with all the fields
 
of rooms what they are and how to use them but with out the previous
 
chapter you may get lost.</PARA>
 
  
<PARA>In order to get started building rooms you should first be aware
+
<TABLE frame=all id="rmfields">
of the room fields you can use. The <xref linkend="rmfields"> shows a full listing
+
<TITLE>Room fields and types listing</TITLE>
of all the room fields and their types as defined in <xref linkend="ch-03">.</PARA>
+
<TGROUP align=left cols=5 colsep=1>
 +
<COLSPEC COLNAME="c1" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c2" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c3" COLWIDTH=".5in">
 +
<COLSPEC COLNAME="c4" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c5" COLWIDTH="2in">
  
<TABLE frame=all  id="rmfields">
+
<THEAD>
<TITLE>Room fields and types listing</TITLE>
+
<ROW>
<TGROUP align=left cols=5 colsep=1>
+
<ENTRY COLNAME="c1">Field</ENTRY>
<COLSPEC COLNAME="c1" COLWIDTH="2in">
+
<ENTRY COLNAME="c2">Type</ENTRY>
<COLSPEC COLNAME="c2" COLWIDTH="2in">
+
<entry></entry>
<COLSPEC COLNAME="c3" COLWIDTH=".5in">
+
<ENTRY COLNAME="c4">Field</ENTRY>
<COLSPEC COLNAME="c4" COLWIDTH="2in">
+
<ENTRY COLNAME="c5">Type</ENTRY>
<COLSPEC COLNAME="c5" COLWIDTH="2in">
+
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
               
 +
<ROW>
 +
<ENTRY COLNAME="c1">symbolic name</ENTRY>
 +
<ENTRY COLNAME="c2">Symbol</ENTRY>
 +
<ENTRY morerows=9 colname="c3"></ENTRY>
  
<THEAD>
+
<ENTRY COLNAME="c4">manipulate</ENTRY>
<ROW>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c1">Field</ENTRY>
+
</ROW>
<ENTRY COLNAME="c2">Type</ENTRY>
 
<entry></entry>
 
<ENTRY COLNAME="c4">Field</ENTRY>
 
<ENTRY COLNAME="c5">Type</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
               
 
<ROW>
 
<ENTRY COLNAME="c1">symbolic name</ENTRY>
 
<ENTRY COLNAME="c2">Symbol</ENTRY>
 
<ENTRY morerows=9 colname="c3"></ENTRY>
 
  
<ENTRY COLNAME="c4">manipulate</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">names</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Stringlist</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">alignment</ENTRY>
<ENTRY COLNAME="c1">names</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Stringlist</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">alignment</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">title</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">String</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">flags</ENTRY>
<ENTRY COLNAME="c1">title</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">flags</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">descr</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">String</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">weight</ENTRY>
<ENTRY COLNAME="c1">descr</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">weight</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">outside_descr</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">String</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">capacity</ENTRY>
<ENTRY COLNAME="c1">outside_descr</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">capacity</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">extra</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Structure</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">light</ENTRY>
<ENTRY COLNAME="c1">extra</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Structure</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">light</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">minv</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">exit</ENTRY>
<ENTRY COLNAME="c1">minv</ENTRY>
+
<ENTRY COLNAME="c5">Structure</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">exit</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Structure</ENTRY>
+
<ENTRY COLNAME="c1">key</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">string</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">movement</ENTRY>
<ENTRY COLNAME="c1">key</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">string</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">movement</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">spell</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">end</ENTRY>
<ENTRY COLNAME="c1">spell</ENTRY>
+
<ENTRY COLNAME="c5">Symbol</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">end</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Symbol</ENTRY>
+
<ENTRY COLNAME="c1">dilbegin or dilcopy</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Function pointer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4"></ENTRY>
<ENTRY COLNAME="c1">dilbegin or dilcopy</ENTRY>
+
<ENTRY COLNAME="c5"></ENTRY>
<ENTRY COLNAME="c2">Function pointer</ENTRY>
+
</ROW>
 +
</TBODY>
 +
</TGROUP>
 +
</TABLE>
  
<ENTRY COLNAME="c4"></ENTRY>
 
<ENTRY COLNAME="c5"></ENTRY>
 
</ROW>
 
</TBODY>
 
</TGROUP>
 
</TABLE>
 
  
 +
<PARA>As you can see there is not a whole lot of fields you have to
 +
learn in order to make a room.  In fact as you will see shortly some of
 +
these fields are not even used on rooms.  In <xref linkend="
 +
rmfielddescr"> we will expand your knowledge from just knowing what the
 +
field types are to how to set them as well.</PARA>
  
<PARA>As you can see there is not a whole lot of fields you have to
+
<sect1 id="rmfielddescr">
learn in order to make a room.  In fact as you will see shortly some of
+
<TITLE>Description of room fields</TITLE>
these fields are not even used on rooms.  In <xref linkend="
 
rmfielddescr"> we will expand your knowledge from just knowing what the
 
field types are to how to set them as well.</PARA>
 
  
<sect1 id="rmfielddescr">
+
<variablelist id="var-rmfields">
<TITLE>Description of room fields</TITLE>
+
<VARLISTENTRY>
 +
;symbolic name
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room symbol</primary>
 +
</indexterm>
  
<variablelist id="var-rmfields">
+
The rules of the symbols has been explained in <XREF
<VARLISTENTRY>
+
LINKEND="ch-03">, if you didn't read them yet you may want to review.
;symbolic name
+
The important thing to realize with the room symbol is it is always
<DICTDEF>
+
good practice to give the room a symbol resembling the title so
<PARA><indexterm>
+
administrators and builders can use the
<primary>Room symbol</primary>
+
<command>goto</command> and the <command>wstat</command> to easily
</indexterm>
+
goto the room in question.
 +
</PARA></LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;title
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room title</primary>
 +
</indexterm>
  
The rules of the symbols has been explained in <XREF
+
The room title field should start with a capital and depending on
LINKEND="ch-03">, if you didn't read them yet you may want to review.
+
your preference the compiler will not complain if you add punctuation
The important thing to realize with the room symbol is it is always
+
at the end. The following are good examples of a room title.</PARA>
good practice to give the room a symbol resembling the title so
+
<INFORMALEXAMPLE>
administrators and builders can use the
+
<PROGRAMLISTING>
<command>goto</command> and the <command>wstat</command> to easily
 
goto the room in question.
 
</PARA></LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;title
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Room title</primary>
 
</indexterm>
 
  
The room title field should start with a capital and depending on
+
title "The Post Office"
your preference the compiler will not complain if you add punctuation
+
title "The deep dark jungle floor:"
at the end.  The following are good examples of a room title.</PARA>
+
title "The Dragon Station control room"
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
title "The Post Office"
+
</PROGRAMLISTING>
title "The deep dark jungle floor:"
+
</INFORMALEXAMPLE>
title "The Dragon Station control room"
+
<PARA>It is really up to you weather you want to use punctuation or not, it
 +
is more administrator personal opinion than anything.
 +
</PARA></LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;names
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room names</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
The names field on the rooms are not that important and only should be
</INFORMALEXAMPLE>
+
used if the builder wishes the room to be accessed by the players by a
<PARA>It is really up to you weather you want to use punctuation or not, it
+
teleport command.  If the room has no names no one will be able to
is more administrator personal opinion than anything.
+
teleport to it. On some muds there will be no teleport spell so the
</PARA></LISTITEM>
+
only use for this field will be for <ACRONYM>DIL</ACRONYM> functions the administrator
</VARLISTENTRY>
+
creates.  If a builder wants the room to be accessible by teleport then
<VARLISTENTRY>
+
the names should match the title since that is what the player will try
;names
+
to teleport to. A few good examples of names on a room would look as
  <DICTDEF>
+
follows.</PARA>
<PARA><indexterm>
+
<INFORMALEXAMPLE>
<primary>Room names</primary>
+
<PROGRAMLISTING>
</indexterm>
 
  
The names field on the rooms are not that important and only should be
+
title "The Post Office"
used if the builder wishes the room to be accessed by the players by a
+
Names {"post office","office"}
teleport command.  If the room has no names no one will be able to
 
teleport to it.  On some muds there will be no teleport spell so the
 
only use for this field will be for <ACRONYM>DIL</ACRONYM> functions the administrator
 
creates.  If a builder wants the room to be accessible by teleport then
 
the names should match the title since that is what the player will try
 
to teleport to.  A few good examples of names on a room would look as
 
follows.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
title "The Post Office"
+
title "the thrown room"
Names {"post office","office"}
+
names {"thrown room","thrown"}
  
title "the thrown room"
+
</PROGRAMLISTING>
names {"thrown room","thrown"}
+
</INFORMALEXAMPLE>
 +
</LISTITEM>
 +
  </VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;descr
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room description</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
The description field is what the player sees when walking into the room or
</INFORMALEXAMPLE>
+
when looking with no arguments.
</LISTITEM>
+
</PARA></LISTITEM>
  </VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
<VARLISTENTRY>
;descr
+
;outside_descr
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Room description</primary>
+
<primary>Room outside description</primary>
</indexterm>
+
</indexterm>
  
The description field is what the player sees when walking into the room or
+
This field is what is shown to a char if the room is loaded inside
when looking with no arguments.
+
another room. For example if you had a room linked inside
</PARA></LISTITEM>
+
another room and called a barrel this would be the description that
</VARLISTENTRY>
+
lets the character know it is a barrel.  An example would be like:</PARA>
<VARLISTENTRY>
+
<INFORMALEXAMPLE>
;outside_descr
+
<PROGRAMLISTING>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Room outside description</primary>
 
</indexterm>
 
  
This field is what is shown to a char if the room is loaded inside
+
outside_descr "a big old barrel is laying here on its side."
another room.  For example if you had a room linked inside
 
another room and called a barrel this would be the description that
 
lets the character know it is a barrel. An example would be like:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
outside_descr "a big old barrel is laying here on its side."
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>This allows a builder to make a room that looks like an object
 +
inside another room.
 +
</PARA></LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;movement
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>movement</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
The movement field defines the endurance cost to a character when moving through
</INFORMALEXAMPLE>
+
this room.  In the future these fields will be adjustable by the use of a define
<PARA>This allows a builder to make a room that looks like an object
+
file.  Currently all movement fields are constants and are defined in the
inside another room.
+
''vme.h''  The following is the movement sector types and their values.
</PARA></LISTITEM>
+
<TABLE frame=all id="sectors">
</VARLISTENTRY>
+
<TITLE>Sector movement values</TITLE>
<VARLISTENTRY>
+
<TGROUP align=left cols=3 colsep=1>
;movement
+
<THEAD>
<DICTDEF>
+
<ROW>
<PARA><indexterm>
+
<ENTRY>Symbol</ENTRY>
<primary>movement</primary>
+
<ENTRY>Name</ENTRY>
</indexterm>
+
<ENTRY>Endurance Cost</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
The movement field defines the endurance cost to a character when moving through
+
<ROW>
this room.  In the future these fields will be adjustable by the use of a define
+
<ENTRY>SECT_INSIDE</ENTRY>
file.  Currently all movement fields are constants and are defined in the
+
<ENTRY>inside</ENTRY>
''vme.h''  The following is the movement sector types and their values.
+
<ENTRY>1</ENTRY>
<TABLE frame=all id="sectors">
+
</ROW>
<TITLE>Sector movement values</TITLE>
+
<ROW>
<TGROUP align=left cols=3 colsep=1>
+
<ENTRY>SECT_CITY</ENTRY>
<THEAD>
+
<ENTRY>city</ENTRY>
<ROW>
+
<ENTRY>1</ENTRY>
<ENTRY>Symbol</ENTRY>
+
</ROW>
<ENTRY>Name</ENTRY>
+
<ROW>
<ENTRY>Endurance Cost</ENTRY>
+
<ENTRY>SECT_FIELD</ENTRY>
</ROW>
+
<ENTRY>field</ENTRY>
</THEAD>
+
<ENTRY>2</ENTRY>
<TBODY>
+
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_FOREST</ENTRY>
 +
<ENTRY>forest</ENTRY>
 +
<ENTRY>3</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_HILLS</ENTRY>
 +
<ENTRY>hills</ENTRY>
 +
<ENTRY>4</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_MOUNTAIN</ENTRY>
 +
<ENTRY>mountain</ENTRY>
 +
<ENTRY>6</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_DESERT</ENTRY>
 +
<ENTRY>desert</ENTRY>
 +
<ENTRY>8</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_SWAMP</ENTRY>
 +
<ENTRY>swamp</ENTRY>
 +
<ENTRY>8</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_WATER_SWIM</ENTRY>
 +
<ENTRY>water-swim</ENTRY>
 +
<ENTRY>4</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_WATER_SAIL</ENTRY>
 +
<ENTRY>water-sail</ENTRY>
 +
<ENTRY>50</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_UNDER_WATER</ENTRY>
 +
<ENTRY>under-water</ENTRY>
 +
<ENTRY>8</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_SNOW</ENTRY>
 +
<ENTRY>snow</ENTRY>
 +
<ENTRY>8</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_SLUSH</ENTRY>
 +
<ENTRY>slush</ENTRY>
 +
<ENTRY>6</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>SECT_ICE</ENTRY>
 +
<ENTRY>ice</ENTRY>
 +
<ENTRY>10</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
 +
The movement is simply defined by placing the 'movement' keyword first
 +
followed by the type of sector you desire.  For example a few
 +
movement fields would look as follows:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<ROW>
+
movement SECT_FOREST
<ENTRY>SECT_INSIDE</ENTRY>
+
movement SECT_HILLS
<ENTRY>inside</ENTRY>
 
<ENTRY>1</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_CITY</ENTRY>
 
<ENTRY>city</ENTRY>
 
<ENTRY>1</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_FIELD</ENTRY>
 
<ENTRY>field</ENTRY>
 
<ENTRY>2</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_FOREST</ENTRY>
 
<ENTRY>forest</ENTRY>
 
<ENTRY>3</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_HILLS</ENTRY>
 
<ENTRY>hills</ENTRY>
 
<ENTRY>4</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_MOUNTAIN</ENTRY>
 
<ENTRY>mountain</ENTRY>
 
<ENTRY>6</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_DESERT</ENTRY>
 
<ENTRY>desert</ENTRY>
 
<ENTRY>8</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_SWAMP</ENTRY>
 
<ENTRY>swamp</ENTRY>
 
<ENTRY>8</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_WATER_SWIM</ENTRY>
 
<ENTRY>water-swim</ENTRY>
 
<ENTRY>4</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_WATER_SAIL</ENTRY>
 
<ENTRY>water-sail</ENTRY>
 
<ENTRY>50</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_UNDER_WATER</ENTRY>
 
<ENTRY>under-water</ENTRY>
 
<ENTRY>8</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_SNOW</ENTRY>
 
<ENTRY>snow</ENTRY>
 
<ENTRY>8</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_SLUSH</ENTRY>
 
<ENTRY>slush</ENTRY>
 
<ENTRY>6</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>SECT_ICE</ENTRY>
 
<ENTRY>ice</ENTRY>
 
<ENTRY>10</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
The movement is simply defined by placing the 'movement' keyword first
 
followed by the type of sector you desire.  For example a few
 
movement fields would look as follows:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
movement SECT_FOREST
+
</PROGRAMLISTING>
movement SECT_HILLS
+
</INFORMALEXAMPLE>
 +
<NOTE><PARA>Only one movement is needed for a room if you put more than one
 +
the last one added will be the one used.</PARA></NOTE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;flags
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room flags</primary>
 +
</indexterm>
  
</PROGRAMLISTING>
+
This field on a room is used to set special attributes in order to make the room
</INFORMALEXAMPLE>
+
private or no-teleportable and many others.  The following is the list of possible
<NOTE><PARA>Only one movement is needed for a room if you put more than one
+
already defined flags.  Extras can also be used to create special room flags.
the last one added will be the one used.</PARA></NOTE>
+
<TABLE frame=all id="unitflagsroom">
</LISTITEM>
+
<TITLE>Room unit flag affects</TITLE>
</VARLISTENTRY>
+
<TGROUP align=left cols=2 colsep=1>
<VARLISTENTRY>
+
<THEAD>
;flags
+
<ROW>
<DICTDEF>
+
<ENTRY>Flag</ENTRY>
<PARA><indexterm>
+
<ENTRY>Description</ENTRY>
<primary>Room flags</primary>
+
</ROW>
</indexterm>
+
</THEAD>
 +
<TBODY>
  
This field on a room is used to set special attributes in order to make the room
 
private or no-teleportable and many others.  The following is the list of possible
 
already defined flags.  Extras can also be used to create special room flags.
 
<TABLE frame=all id="unitflagsroom">
 
<TITLE>Room unit flag affects</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Flag</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
  
 +
<ROW>
 +
<ENTRY>UNIT_FL_PRIVATE</ENTRY>
 +
<ENTRY>When this flag is set on a room it marks it as a private room.  Commands
 +
that honor the private flag will not let more than 2 players into this room.
 +
Commands like <command>goto</command> and direction commands are a few
 +
commands that do honor this flag.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_INVISIBLE</ENTRY>
 +
<ENTRY>Makes unit invisible</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_NO_BURY</ENTRY>
 +
<ENTRY>Makes a hard floor so items can't be buried.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_BURIED</ENTRY>
 +
<ENTRY>Makes unit buried when loaded</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_NO_TELEPORT</ENTRY>
 +
<ENTRY>makes unit so no one can teleport to it</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_NO_MOB</ENTRY>
 +
<ENTRY>Makes it so no mobile will enter the unit</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_NO_WEATHER</ENTRY>
 +
<ENTRY>keeps weather and natural light out of unit</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_INDOORS</ENTRY>
 +
<ENTRY>Makes unit inside and doesn't affect weather</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_TRANS</ENTRY>
 +
<ENTRY>Makes unit transparent</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_NO_SAVE</ENTRY>
 +
<ENTRY>Makes it so you can't save with unit</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_SACRED</ENTRY>
 +
<ENTRY>Makes unit a double gain unit</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>UNIT_FL_MAGIC</ENTRY>
 +
<ENTRY>Marks a unit to be magic</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<ROW>
+
</PARA></LISTITEM>
<ENTRY>UNIT_FL_PRIVATE</ENTRY>
+
</VARLISTENTRY>
<ENTRY>When this flag is set on a room it marks it as a private room.  Commands
+
<VARLISTENTRY>
that honor the private flag will not let more than 2 players into this room.
+
;extra
Commands like <command>goto</command> and direction commands are a few
+
<DICTDEF>
commands that do honor this flag.</ENTRY>
+
<PARA><indexterm>
</ROW>
+
<primary>Room extras</primary>
<ROW>
+
</indexterm>
<ENTRY>UNIT_FL_INVISIBLE</ENTRY>
+
</PARA>
<ENTRY>Makes unit invisible</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_NO_BURY</ENTRY>
 
<ENTRY>Makes a hard floor so items can't be buried.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_BURIED</ENTRY>
 
<ENTRY>Makes unit buried when loaded</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_NO_TELEPORT</ENTRY>
 
<ENTRY>makes unit so no one can teleport to it</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_NO_MOB</ENTRY>
 
<ENTRY>Makes it so no mobile will enter the unit</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_NO_WEATHER</ENTRY>
 
<ENTRY>keeps weather and natural light out of unit</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_INDOORS</ENTRY>
 
<ENTRY>Makes unit inside and doesn't affect weather</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_TRANS</ENTRY>
 
<ENTRY>Makes unit transparent</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_NO_SAVE</ENTRY>
 
<ENTRY>Makes it so you can't save with unit</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_SACRED</ENTRY>
 
<ENTRY>Makes unit a double gain unit</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>UNIT_FL_MAGIC</ENTRY>
 
<ENTRY>Marks a unit to be magic</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
</PARA></LISTITEM>
+
<PARA>Extras are the work horse of the <ACRONYM>VME</ACRONYM>.  Extras are used in everything from <ACRONYM>DIL</ACRONYM> to just normal
</VARLISTENTRY>
+
extra descriptions on rooms.  The first job for an extra was to hold extra description information
<VARLISTENTRY>
+
on a room. For example if you had a computer room and you described it might look something like this:</PARA>
;extra
+
<INFORMALEXAMPLE>
  <DICTDEF>
+
<PROGRAMLISTING>
<PARA><indexterm>
 
<primary>Room extras</primary>
 
</indexterm>
 
</PARA>
 
  
<PARA>Extras are the work horse of the <ACRONYM>VME</ACRONYM>. Extras are used in everything from <ACRONYM>DIL</ACRONYM> to just normal
+
descr
extra descriptions on rooms.  The first job for an extra was to hold extra description information
+
"This small room houses the computer power of the <ACRONYM>VME</ACRONYM> development team.
on a room. For example if you had a computer room and you described it might look something like this:</PARA>
+
All four walls are lined with various pieces of computer equipment old pizza
<INFORMALEXAMPLE>
+
boxes and plenty of empty soda cans."
<PROGRAMLISTING>
 
  
descr
+
</PROGRAMLISTING>
"This small room houses the computer power of the <ACRONYM>VME</ACRONYM> development team.
+
</INFORMALEXAMPLE>
All four walls are lined with various pieces of computer equipment old pizza
+
<PARA>The problem is as a player if you saw this description you might want to know what kind
boxes and plenty of empty soda cans."
+
of pizza we eat or maybe you would want to see what kind of soda we drink.  Or heaven forbid you might want to know
 +
what kinds of computer equipment is scattered about the room.  In the <ACRONYM>VME</ACRONYM> servers we
 +
do this by adding extra descriptions to the room. In this case the builder of the zone
 +
may do something like this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
descr
</INFORMALEXAMPLE>
+
"This small room houses the computer power of the <ACRONYM>VME</ACRONYM> development team.
<PARA>The problem is as a player if you saw this description you might want to know what kind
+
All four walls are lined with various pieces of computer equipment old pizza
of pizza we eat or maybe you would want to see what kind of soda we drink.  Or heaven forbid you might want to know
+
boxes and plenty of empty soda cans."
what kinds of computer equipment is scattered about the room.  In the <ACRONYM>VME</ACRONYM> servers we
 
do this by adding extra descriptions to the room.  In this case the builder of the zone
 
may do something like this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
descr
+
extra {"soda cans", "cans", "soda", "can"}
"This small room houses the computer power of the <ACRONYM>VME</ACRONYM> development team.
+
"These cans are all Canadian blue.  Maybe the Valhalla team hates American
All four walls are lined with various pieces of computer equipment old pizza
+
beer. Strange all of them look to have strange indentations."
boxes and plenty of empty soda cans."
 
  
extra {"soda cans", "cans", "soda", "can"}
+
extra {"strange indentations", "strange indentation","indentation"}
"These cans are all Canadian blue.  Maybe the Valhalla team hates American
+
"They are human bite marksIs this what happens when code doesn't work right?"
beerStrange all of them look to have strange indentations."
 
  
extra {"strange indentations", "strange indentation","indentation"}
+
extra {"pizza boxes","pizza","boxes","box"}
"They are human bite marksIs this what happens when code doesn't work right?"
+
"Dominos could make a fortune from all these boxes and probably already have
 +
from the <ACRONYM>VME</ACRONYM> teamyou notice all the boxes are empty at least they finish what
 +
they start."
  
extra {"pizza boxes","pizza","boxes","box"}
+
extra {"computer pieces","computer parts", "equipment","hardware", "pieces", "parts"}
"Dominos could make a fortune from all these boxes and probably already have
+
"I bet you thought you would see what we have running.  Yeah right you might come
from the <ACRONYM>VME</ACRONYM> team.  you notice all the boxes are empty at least they finish what
+
over and rob us if we told you thatAll you see is an old XT."
they start."
 
  
extra {"computer pieces","computer parts", "equipment","hardware", "pieces", "parts"}
+
extra {"xt"}
"I bet you thought you would see what we have running.  Yeah right you might come
+
"Its a hunk of junk really!"
over and rob us if we told you that.  All you see is an old XT."
 
  
extra {"xt"}
+
</PROGRAMLISTING>
"Its a hunk of junk really!"
+
</INFORMALEXAMPLE>
 +
<PARA>There is a lot to notice in the previous examples.  First we will start with
 +
extras when defined on rooms, NPC, and objects must be in length
 +
order for the names.  There are a few reasons for this but lets just
 +
say the most important reason is we wanted it this way.  If you
 +
don't put them in order the <ACRONYM>VMC</ACRONYM> will give you a fatal error and
 +
will not compile your zone.</PARA>
  
</PROGRAMLISTING>
+
<PARA>The next thing you should notice is we have used an extra to
</INFORMALEXAMPLE>
+
describe something in another extraWe actually did this twice
<PARA>There is a lot to notice in the previous examplesFirst we will start with
+
once for the beer cans and once for the computer partsThat way
extras when defined on rooms, NPC, and objects must be in length
+
you can actually give quest information but make the person really
order for the namesThere are a few reasons for this but lets just
+
have to explore your rooms descriptions to find it.</PARA>
say the most important reason is we wanted it this way.  If you
 
don't put them in order the <ACRONYM>VMC</ACRONYM> will give you a fatal error and
 
will not compile your zone.</PARA>
 
  
<PARA>The next thing you should notice is we have used an extra to
+
<PARA>The previous example is what we consider normal extras in a
describe something in another extraWe actually did this twice
+
roomThere are also extras that hold information for DIL functionsThese
once for the beer cans and once for the computer partsThat way
+
special extras can have extra fields and they can be hidden to the
you can actually give quest information but make the person really
+
players eyes.  Here are some
have to explore your rooms descriptions to find it.</PARA>
+
examples of special extras.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>The previous example is what we consider normal extras in a
+
extra {"$rockcount"}
room.  There are also extras that hold information for DIL functions.  These
+
"5"
special extras can have extra fields and they can be hidden to the
 
players eyes.  Here are some
 
examples of special extras.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
extra {"$rockcount"}
+
extra {"$playerkill"}
"5"
+
"0"
  
extra {"$playerkill"}
+
extra {"$coke","$milk","$water"}{1,5,10}
"0"
+
"Drinks and amounts"
  
extra {"$coke","$milk","$water"}{1,5,10}
+
</PROGRAMLISTING>
"Drinks and amounts"
+
</INFORMALEXAMPLE>
 +
<PARA>These extras all have the '$' sign appended to the front of
 +
the names in order to tell the look command the player
 +
shouldn't be able to look at the extra.  If you have not already seen
 +
<ACRONYM>DIL</ACRONYM> coding you may not understand why you would want extras
 +
players can't see.  The <ACRONYM>DIL</ACRONYM> language can manipulate these extras by
 +
reading and writing them in order to change the way a command or
 +
another function works.  For example the last <ACRONYM>DIL</ACRONYM> could be used for
 +
a shopkeeper to tell how many of each type of drink he has.  Notice
 +
the drink extra also has something you haven't seen yet, an added integer list after the namelist. all extras can have these but
 +
only extras being used with DIL functions really need
 +
them.</PARA>
  
</PROGRAMLISTING>
+
<PARA>Some of these special functions are supported already in the code
</INFORMALEXAMPLE>
+
and the ones that affect the rooms are as followsIn the
<PARA>These extras all have the '$' sign appended to the front of
+
following $1n is the activator and $2n is the unit in question.</PARA>
the names in order to tell the look command the player
 
shouldn't be able to look at the extra.  If you have not already seen
 
<ACRONYM>DIL</ACRONYM> coding you may not understand why you would want extras
 
players can't see.  The <ACRONYM>DIL</ACRONYM> language can manipulate these extras by
 
reading and writing them in order to change the way a command or
 
another function worksFor example the last <ACRONYM>DIL</ACRONYM> could be used for
 
a shopkeeper to tell how many of each type of drink he has.  Notice
 
the drink extra also has something you haven't seen yet, an added integer list after the namelist. all extras can have these but
 
only extras being used with DIL functions really need
 
them.</PARA>
 
  
<PARA>Some of these special functions are supported already in the code
+
<PARA>There is only one special extra already supported for rooms and
and the ones that affect the rooms are as followsIn the
+
that would be the '$get'.  As we have previously
following $1n is the activator and $2n is the unit in question.</PARA>
+
mentioned the extras that start with a dollar sign are not seen by the
 +
playersThis one however is shown to the player when the person
 +
types get on the other names in the extras list.  This easier to
 +
describe in an example than in words so the following would be a good
 +
example.:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>There is only one special extra already supported for rooms and
+
extra {"$get", "statues", "statue"}
that would be the '$get'.  As we have previously
+
"You attempt to pick up a statue but quickly discover your feeble
mentioned the extras that start with a dollar sign are not seen by the
+
attempts will never work."
players.  This one however is shown to the player when the person
 
types get on the other names in the extras list.  This easier to
 
describe in an example than in words so the following would be a good
 
example.:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
extra {"$get", "statues", "statue"}
+
{"$get", "red roses", "roses"}
"You attempt to pick up a statue but quickly discover your feeble
+
"You bend down to pick a rose, but then decide to leave the beautiful
attempts will never work."
+
flower to itself."
  
{"$get", "red roses", "roses"}
+
</PROGRAMLISTING>
"You bend down to pick a rose, but then decide to leave the beautiful
+
</INFORMALEXAMPLE>
flower to itself."
+
<PARA>With this one special extra we have made it so you don't need to
 +
make millions of items so the person can act upon them.  You can
 +
just make the acts as if the items were in the room.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Exits
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Exits</primary>
 +
</indexterm>
 +
</PARA>
  
</PROGRAMLISTING>
+
<PARA>
</INFORMALEXAMPLE>
+
Every room has ten possible exits; North, East, South, West, Northeast,
<PARA>With this one special extra we have made it so you don't need to
+
Southeast, Southwest, Northwest, Up and Down. To
make millions of items so the person can act upon them.  You can
+
enable mobile use of these commands, you must specify these exits as outlined
just make the acts as if the items were in the room.</PARA>
+
below:</PARA>
</LISTITEM>
+
<INFORMALEXAMPLE>
</VARLISTENTRY>
+
<PROGRAMLISTING>
<VARLISTENTRY>
 
;Exits
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Exits</primary>
 
</indexterm>
 
</PARA>
 
  
<PARA>
+
exit &lt;direction&gt; [to &lt;destination&gt;] [open {&lt;infoflags&gt;}]
Every room has ten possible exits; North, East, South, West, Northeast,
+
[key &lt;keyname&gt;] [keyword {&lt;keywords&gt;}] descr &lt;description&gt; ;  
Southeast, Southwest, Northwest, Up and Down. To
 
enable mobile use of these commands, you must specify these exits as outlined
 
below:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
exit &lt;direction&gt; [to &lt;destination&gt;] [open {&lt;infoflags&gt;}]
+
</PROGRAMLISTING>
[key &lt;keyname&gt;] [keyword {&lt;keywords&gt;}] descr &lt;description&gt; ;
+
</INFORMALEXAMPLE>
  
</PROGRAMLISTING>
+
<VARIABLELIST>
</INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;exit &lt;directions&gt;
 +
<DICTDEF>
 +
<PARA>Is the direction the exit leads, ie. one of north, south ..
 +
  up, down.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
                  <VARLISTENTRY>
 +
    <TERM>to &lt;destinations&gt;</TERM>
 +
<LISTITEM>
 +
<PARA>The symbolic reference to the room, you want this exit
 +
  to lead to. If you reference a room within another zone, post pend the name
 +
  with @&lt;zone name&gt;</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<VARIABLELIST>
+
  to myotherroom
<VARLISTENTRY>
 
;exit &lt;directions&gt;
 
<DICTDEF>
 
<PARA>Is the direction the exit leads, ie. one of north, south ..
 
  up, down.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
                  <VARLISTENTRY>
 
    <TERM>to &lt;destinations&gt;</TERM>
 
<LISTITEM>
 
<PARA>The symbolic reference to the room, you want this exit
 
  to lead to. If you reference a room within another zone, post pend the name
 
  with @&lt;zone name&gt;</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
  to myotherroom
+
  to hisotherroom@hiszone
  
  to hisotherroom@hiszone
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
  
</PROGRAMLISTING>
+
</LISTITEM>
</INFORMALEXAMPLE>
+
</VARLISTENTRY>
 +
                  <VARLISTENTRY>
 +
    <TERM>open &lt;info flags&gt;</TERM>
 +
<LISTITEM>
  
</LISTITEM>
+
<PARA>These flags describe the state of the door.  The following is the
</VARLISTENTRY>
+
list of possible door flags.</PARA>
                  <VARLISTENTRY>
 
    <TERM>open &lt;info flags&gt;</TERM>
 
<LISTITEM>
 
  
<PARA>These flags describe the state of the door.  The following is the
+
<VARIABLELIST>
list of possible door flags.</PARA>
+
<VARLISTENTRY>
 
+
;EX_OPEN_CLOSE
<VARIABLELIST>
+
<DICTDEF>
<VARLISTENTRY>
+
<PARA> Set this if you can open and close this exit, be it a door, gate or  
;EX_OPEN_CLOSE
+
    otherwise.</PARA>
<DICTDEF>
+
</LISTITEM>
<PARA> Set this if you can open and close this exit, be it a door, gate or  
 
    otherwise.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;EX_CLOSED
 
<DICTDEF>
 
<PARA>Set this if you want the exit to be closed at boot time.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;EX_LOCKED
 
<DICTDEF>
 
<PARA>Set this if you want the exit to be clocked at boot time.</PARA>
 
<NOTE>
 
<PARA>An interesting aspect is, if you do not specify a key, you can
 
    only unlock this door with the 'pick' skill, 'unlock' spell or from
 
    <ACRONYM>DIL</ACRONYM> with UnSet();</PARA>
 
</NOTE>
 
</LISTITEM>
 
 
</VARLISTENTRY>
 
</VARLISTENTRY>
<VARLISTENTRY>
+
<VARLISTENTRY>
;EX_PICK_PROOF
+
;EX_CLOSED
<DICTDEF>
+
<DICTDEF>
<PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the
+
<PARA>Set this if you want the exit to be closed at boot time.</PARA>
    lock of this exit.</PARA>
 
 
</LISTITEM>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARLISTENTRY>
 
 
<VARLISTENTRY>
 
<VARLISTENTRY>
;EX_HIDDEN
+
;EX_LOCKED
<DICTDEF>
+
<DICTDEF>
<PARA>If this bit is set, the exit is hidden until the mobile has successfully
+
<PARA>Set this if you want the exit to be clocked at boot time.</PARA>
    searched for it, using the 'search'-command.</PARA>  
+
<NOTE>
</LISTITEM>
+
<PARA>An interesting aspect is, if you do not specify a key, you can
</VARLISTENTRY>
+
    only unlock this door with the 'pick' skill, 'unlock' spell or from
</VARIABLELIST>
+
    <ACRONYM>DIL</ACRONYM> with UnSet();</PARA>
 +
</NOTE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;EX_PICK_PROOF
 +
<DICTDEF>
 +
<PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the
 +
    lock of this exit.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
 +
<VARLISTENTRY>
 +
;EX_HIDDEN
 +
<DICTDEF>
 +
<PARA>If this bit is set, the exit is hidden until the mobile has successfully
 +
    searched for it, using the 'search'-command.</PARA>
 
</LISTITEM>
 
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
</VARIABLELIST>
;key &lt;keyname&gt;
 
<DICTDEF>
 
<PARA>The symbolic name of a key object used for unlocking this exit.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
 
key mykey@myzone
 
 
</PROGRAMLISTING>
 
</INFORMALEXAMPLE>
 
  
</LISTITEM>
+
</LISTITEM>
 
</VARLISTENTRY>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
<VARLISTENTRY>
;keyword { &lt;stringlist&gt; }
+
;key &lt;keyname&gt;
<DICTDEF>
+
<DICTDEF>
<PARA>This stringlist holds all the names of the exit, 
+
<PARA>The symbolic name of a key object used for unlocking this exit.</PARA>
you specify to manipulate the exit. If the exit is
+
<INFORMALEXAMPLE>  
  hidden exit, these are the keywords the mobile can search for.</PARA>
+
<PROGRAMLISTING>  
  <INFORMALEXAMPLE>
+
<PROGRAMLISTING>
+
key mykey@myzone
+
keyword {"wooden door","door"}
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
  
keyword {"hidden door","door","hatch","floor"}
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;keyword { &lt;stringlist&gt; }
 +
<DICTDEF>
 +
<PARA>This stringlist holds all the names of the exit, 
 +
you specify to manipulate the exit. If the exit is
 +
  hidden exit, these are the keywords the mobile can search for.</PARA>
 +
  <INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
 +
 +
keyword {"wooden door","door"}
  
</PROGRAMLISTING>
+
keyword {"hidden door","door","hatch","floor"}
</INFORMALEXAMPLE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;descr &lt;description&gt;
 
<DICTDEF>
 
<PARA>This string is the description of what you see if you look in
 
  the direction of the exit.</PARA>
 
  </LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;;
 
<DICTDEF>
 
<PARA>Every exit statement needs to be terminated with a semi-colon.
 
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  </VARIABLELIST>
 
  
<NOTE>
+
</PROGRAMLISTING>
<TITLE>General notes</TITLE>
+
</INFORMALEXAMPLE>
<PARA>Even though you do not need an exit in all directions, you can use it to place
+
</LISTITEM>
descriptions of the direction.</PARA>
+
</VARLISTENTRY>
</NOTE>
+
<VARLISTENTRY>
<INFORMALEXAMPLE>
+
;descr &lt;description&gt;
<PROGRAMLISTING>
+
<DICTDEF>
 
+
<PARA>This string is the description of what you see if you look in  
      exit north descr "An unsurmountable mountain blocks your way.";
+
  the direction of the exit.</PARA>
 +
  </LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;;
 +
<DICTDEF>
 +
<PARA>Every exit statement needs to be terminated with a semi-colon.
 +
</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
  </VARIABLELIST>
  
</PROGRAMLISTING>
+
<NOTE>
</INFORMALEXAMPLE>
+
<TITLE>General notes</TITLE>
</LISTITEM>
+
<PARA>Even though you do not need an exit in all directions, you can use it to place
</VARLISTENTRY>
+
descriptions of the direction.</PARA>
<VARLISTENTRY>
+
</NOTE>
;minv
+
<INFORMALEXAMPLE>
<DICTDEF>
+
<PROGRAMLISTING>
<PARA><indexterm>
 
<primary>Room minv</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is rarely used on rooms. It could however be used to
+
      exit north descr "An unsurmountable mountain blocks your way.";
make a room invisible inside another room.  Or it could be used to store numbered values on a room.  The reason this
 
field is on a room is it is part of the base object which all objects
 
are derived from.  If the room is going to be inside another room and
 
you don't want it visible the following would make it invisible to all
 
players below the level of 20.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
minv 20
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;minv
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room minv</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING>
+
<PARA>This field is rarely used on rooms.  It could however be used to
</INFORMALEXAMPLE>
+
make a room invisible inside another room.  Or it could be used to store numbered values on a room.  The reason this
</LISTITEM>
+
field is on a room is it is part of the base object which all objects
</VARLISTENTRY>
+
are derived from.  If the room is going to be inside another room and
 +
you don't want it visible the following would make it invisible to all
 +
players below the level of 20.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<VARLISTENTRY>
+
minv 20
;key
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Room key</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is not used normally on a room.  It is a string that
+
</PROGRAMLISTING>
can be used for anything you desire.  The reason it exists on rooms is
+
</INFORMALEXAMPLE>
it is a part of the base object all unitptrs (unit pointers like,
+
</LISTITEM>
rooms, objects, and NPCs) are derived from.</PARA>
+
</VARLISTENTRY>
  
</LISTITEM>  
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;key
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room key</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>This field is not used normally on a room.  It is a string that
;manipulate
+
can be used for anything you desire. The reason it exists on rooms is
  <DICTDEF>
+
it is a part of the base object all unitptrs (unit pointers like,
<PARA><indexterm>
+
rooms, objects, and NPCs) are derived from.</PARA>
<primary>Room manipulate</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is not used normally on a room.  It is an integer that can be
+
</LISTITEM>  
used for anything you desire.  The reason it exists on rooms is it is a
+
</VARLISTENTRY>
part of the base object all unitptrs are derived from.</PARA>
 
  
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;manipulate
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room manipulate</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>This field is not used normally on a room.  It is an integer that can be
;alignment
+
used for anything you desire. The reason it exists on rooms is it is a
  <DICTDEF>
+
part of the base object all unitptrs are derived from.</PARA>
<PARA><indexterm>
 
<primary>Room alignment</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is not used normally on a room.  It is an integer that can be
+
</LISTITEM>
used for anything you desire.  The reason it exists on rooms is it is a
+
</VARLISTENTRY>
part of the base object all unitptrs are derived from.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;weight
+
;alignment
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Room weight</primary>
+
<primary>Room alignment</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
<PARA>This field is not used normally on a room.  It is an integer that can be
+
<PARA>This field is not used normally on a room.  It is an integer that can be
used for anything you desire.  The reason it exists on rooms is it is a
+
used for anything you desire.  The reason it exists on rooms is it is a
part of the base object all unitptrs are derived from.</PARA>
+
part of the base object all unitptrs are derived from.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;weight
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room weight</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>This field is not used normally on a room.  It is an integer that can be
;capacity
+
used for anything you desire. The reason it exists on rooms is it is a
  <DICTDEF>
+
part of the base object all unitptrs are derived from.</PARA>
<PARA><indexterm>
 
<primary>Room capacity</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is not used normally on a room.  It is an integer that can be
+
</LISTITEM>
used for anything you desire.  The reason it exists on rooms is it is a
+
</VARLISTENTRY>
part of the base object all unitptrs are derived from.</PARA>
 
  
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;capacity
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Room capacity</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>This field is not used normally on a room.  It is an integer that can be
;light
+
used for anything you desire. The reason it exists on rooms is it is a
  <DICTDEF>
+
part of the base object all unitptrs are derived from.</PARA>
<PARA><indexterm>
 
<primary>Room light </primary>
 
</indexterm></PARA>
 
  
<PARA>This field sets the light on a room.  Normally this is not done
+
</LISTITEM>
directly, instead it is set using macros defined in
+
</VARLISTENTRY>
''wmacros.h''.</PARA>
 
  
<TABLE frame=all id="seg-light">
+
<VARLISTENTRY>
<TITLE>Light defines</TITLE>
+
;light
<TGROUP align=left cols=3 colsep=1>
+
<DICTDEF>
<THEAD>
+
<PARA><indexterm>
<ROW>
+
<primary>Room light </primary>
<ENTRY>Define</ENTRY>
+
</indexterm></PARA>
<ENTRY>Light Value</ENTRY>
 
<ENTRY>Affect</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
  
 +
<PARA>This field sets the light on a room.  Normally this is not done
 +
directly, instead it is set using macros defined in
 +
''wmacros.h''.</PARA>
  
 +
<TABLE frame=all id="seg-light">
 +
<TITLE>Light defines</TITLE>
 +
<TGROUP align=left cols=3 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Define</ENTRY>
 +
<ENTRY>Light Value</ENTRY>
 +
<ENTRY>Affect</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
<ROW>
 
<ENTRY>ALWAYS_LIGHT</ENTRY>
 
<ENTRY>1</ENTRY>
 
<ENTRY>Room is always light no matter time of day</ENTRY>
 
</ROW>
 
  
<ROW>
 
<ENTRY>IN_ALWAYS_DARK  </ENTRY>
 
<ENTRY>-1</ENTRY>
 
<ENTRY>When an inside room is always dark - both inside and outside </ENTRY>
 
</ROW>
 
  
<ROW>
+
<ROW>
<ENTRY>OUT_DARK_NON_NOON </ENTRY>
+
<ENTRY>ALWAYS_LIGHT</ENTRY>
<ENTRY>-1</ENTRY>
+
<ENTRY>1</ENTRY>
<ENTRY>Always a dark room, except when it is high noon </ENTRY>
+
<ENTRY>Room is always light no matter time of day</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>OUT_ALWAYS_DARK </ENTRY>
+
<ENTRY>IN_ALWAYS_DARK </ENTRY>
<ENTRY>-2</ENTRY>
+
<ENTRY>-1</ENTRY>
<ENTRY>Always a Dark room, no matter the time of day</ENTRY>
+
<ENTRY>When an inside room is always dark - both inside and outside </ENTRY>
</ROW>
+
</ROW>
  
</TBODY></TGROUP></TABLE>
+
<ROW>
 +
<ENTRY>OUT_DARK_NON_NOON </ENTRY>
 +
<ENTRY>-1</ENTRY>
 +
<ENTRY>Always a dark room, except when it is high noon </ENTRY>
 +
</ROW>
  
<PARA>To set natural light that changes depending on the type of day
+
<ROW>
nothing is needed to be put in the light field the compiler will default
+
<ENTRY>OUT_ALWAYS_DARK </ENTRY>
to '0'. If you for some reason want to set the light to default
+
<ENTRY>-2</ENTRY>
lighting you can do so but you don't need to.  You will also notice
+
<ENTRY>Always a Dark room, no matter the time of day</ENTRY>
there are two macros that set the light to the exact same value.  This is
+
</ROW>
for compatibility with older code base and if you wish to combine these
 
two macros or only use one it would not change the way the mud
 
works.</PARA>
 
  
<PARA>This is probably one of the simplest fields you will have to deal
+
</TBODY></TGROUP></TABLE>
with in the rooms.  In order to set it all that is needed is to place
 
the macro or the light and value on a line in the room and your all
 
done.</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
//To Set always light with macro
+
<PARA>To set natural light that changes depending on the type of day
ALWAYS_LIGHT
+
nothing is needed to be put in the light field the compiler will default
 +
to '0'.  If you for some reason want to set the light to default
 +
lighting you can do so but you don't need to.  You will also notice
 +
there are two macros that set the light to the exact same value.  This is
 +
for compatibility with older code base and if you wish to combine these
 +
two macros or only use one it would not change the way the mud
 +
works.</PARA>
  
//To set Always light with out macro
+
<PARA>This is probably one of the simplest fields you will have to deal
light 1
+
with in the rooms.  In order to set it all that is needed is to place
 +
the macro or the light and value on a line in the room and your all
 +
done.</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
</PROGRAMLISTING>
+
//To Set always light with macro
</INFORMALEXAMPLE>
+
ALWAYS_LIGHT
<PARA>You can decide which is easiest for you.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
//To set Always light with out macro
;link
+
light 1
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Room link</primary>
 
</indexterm></PARA>
 
</LISTITEM>
 
  
</VARLISTENTRY>
+
</PROGRAMLISTING>
 +
</INFORMALEXAMPLE>
 +
<PARA>You can decide which is easiest for you.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;spell
+
;link
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Room spell</primary>
+
<primary>Room link</primary>
</indexterm></PARA>
+
</indexterm></PARA>
</LISTITEM>
+
</LISTITEM>
  
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;dilbegin or dilcopy
+
;spell
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Room dilbegin or dilcopy</primary>
+
<primary>Room spell</primary>
</indexterm></PARA>
+
</indexterm></PARA>
 +
</LISTITEM>
  
 +
</VARLISTENTRY>
  
<PARA>The <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds.
+
<VARLISTENTRY>
We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach
+
;dilbegin or dilcopy
you how to create your own functions that will make your rooms, NPC, and
+
<DICTDEF>
objects more than special.</PARA>
+
<PARA><indexterm>
 +
<primary>Room dilbegin or dilcopy</primary>
 +
</indexterm></PARA>
  
<PARA>There are only currently three room functions that come
 
standard with a <ACRONYM>VME</ACRONYM> in the ''function.zon''.  There
 
are much more in the zones released with the <ACRONYM>VME</ACRONYM> but you
 
will have to hunt for those.  The three that come standard are Safe
 
room, Death room, and forced move.  The safe room makes it
 
impossible for players to kill each other, the death room is a
 
function that lets you make things like rock slides and quick sand,
 
and the forced move lets you make an easy river.</PARA>
 
  
<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the
+
<PARA>The <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds.
Valhalla mud all you have to do is use the dilcopy keyword in the
+
We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach
room with the function name you want to use and the arguments the
+
you how to create your own functions that will make your rooms, NPC, and
function requires.  The following is what you would find in the
+
objects more than special.</PARA>
''function.zon'' for death room.</PARA>
 
  
<INFORMALEXAMPLE>
+
<PARA>There are only currently three room functions that come
<PROGRAMLISTING>
+
standard with a <ACRONYM>VME</ACRONYM> in the ''function.zon''.  There
 +
are much more in the zones released with the <ACRONYM>VME</ACRONYM> but you
 +
will have to hunt for those.  The three that come standard are Safe
 +
room, Death room, and forced move.  The safe room makes it
 +
impossible for players to kill each other, the death room is a
 +
function that lets you make things like rock slides and quick sand,
 +
and the forced move lets you make an easy river.</PARA>
  
/* Death room <ACRONYM>DIL</ACRONYM>
+
<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the
*tick is in 4th's of seconds
+
Valhalla mud all you have to do is use the dilcopy keyword in the
* Damage is damage done per tick
+
room with the function name you want to use and the arguments the
*act_s is string shown to damaged player.
+
function requires.  The following is what you would find in the
*/
+
''function.zon'' for death room.</PARA>
dilbegin death_room(tick: integer, damage: integer, act_s: string);
 
  
var ext: extraptr;
+
<INFORMALEXAMPLE>
    u  : unitptr;
+
<PROGRAMLISTING>
    i  : integer;
 
  
code
+
/* Death room <ACRONYM>DIL</ACRONYM>
{
+
*tick is in 4th's of seconds
 +
* Damage is damage done per tick
 +
*act_s is string shown to damaged player.
 +
*/
 +
dilbegin death_room(tick: integer, damage: integer, act_s: string);
  
if (tick < 12) tick := 12;
+
var ext: extraptr;
 +
    u  : unitptr;
 +
    i  : integer;
  
heartbeat := tick;
+
code
 +
{
  
if (damage < 0)
+
if (tick < 12) tick := 12;
    damage := -damage;
 
  
if ("$death room for mobs" in self.extra)
+
heartbeat := tick;
    i := UNIT_ST_PC|UNIT_ST_NPC;
 
else
 
    i := UNIT_ST_PC;
 
  
while (TRUE)
+
if (damage < 0)
{
+
    damage := -damage;
wait (SFB_TICK, TRUE);
 
  
foreach (i, u)
+
if ("$death room for mobs" in self.extra)
    {
+
    i := UNIT_ST_PC|UNIT_ST_NPC;
    if (u.level >= IMMORTAL_LEVEL)
+
else
        continue;
+
    i := UNIT_ST_PC;
  
    if (("$no death room" in u.extra) and (u.type == UNIT_ST_NPC))
+
while (TRUE)
        continue; // Don't allow pcs to get this flag
+
{
 +
wait (SFB_TICK, TRUE);
  
    if (act_s != "")
+
foreach (i, u)
        act ("&[hit_me]"+act_s, A_ALWAYS, u, null, null, TO_CHAR);
+
    {
    else
+
    if (u.level >= IMMORTAL_LEVEL)
        act ("&[hit_me]You bleed from your wounds.",
+
        continue;
            A_ALWAYS, u, null, null, TO_CHAR);
 
  
    u.hp := u.hp - damage;
+
    if (("$no death room" in u.extra) and (u.type == UNIT_ST_NPC))
    position_update (u);
+
        continue; // Don't allow pcs to get this flag
    }
 
  
}
+
    if (act_s != "")
 +
        act ("&[hit_me]"+act_s, A_ALWAYS, u, null, null, TO_CHAR);
 +
    else
 +
        act ("&[hit_me]You bleed from your wounds.",
 +
            A_ALWAYS, u, null, null, TO_CHAR);
  
}
+
    u.hp := u.hp - damage;
 +
    position_update (u);
 +
    }
  
dilend
+
}
  
</PROGRAMLISTING>
+
}
</INFORMALEXAMPLE>
 
<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to
 
understand or adjust it you just have to use it.  In this function it requires a time,
 
damage, and act.  So you could use this in a room definition like
 
this:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
dilcopy death@function (60,25,"Flames shoot from the floor burning
+
dilend
your rear.");
 
  
</PROGRAMLISTING>
+
</PROGRAMLISTING>
</INFORMALEXAMPLE>
+
</INFORMALEXAMPLE>
<PARA>This says to copy the <ACRONYM>DIL</ACRONYM> from zone function with the arguments 60
+
<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to
seconds, damage 25% and act as shownPretty simple eh?</PARA>
+
understand or adjust it you just have to use it.  In this function it requires a time,
 +
damage, and act.  So you could use this in a room definition like
 +
this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>All released <ACRONYM>DIL</ACRONYM> room functions are described in
+
dilcopy death@function (60,25,"Flames shoot from the floor burning
<XREF LINKEND="rmdilfunc">.
+
your rear.");
Then we put some to work so you can see how
 
to use them in <XREF LINKEND="rmcomplex"></PARA>
 
  
</LISTITEM>
+
</PROGRAMLISTING>
</VARLISTENTRY>
+
</INFORMALEXAMPLE>
</VARIABLELIST>
+
<PARA>This says to copy the <ACRONYM>DIL</ACRONYM> from zone function with the arguments 60
 +
seconds, damage 25% and act as shown.  Pretty simple eh?</PARA>
  
</SECT1>
+
<PARA>All released <ACRONYM>DIL</ACRONYM> room functions are described in
 +
<XREF LINKEND="rmdilfunc">.
 +
Then we put some to work so you can see how
 +
to use them in <XREF LINKEND="rmcomplex"></PARA>
  
<sect1 id="rmbasic">
+
</LISTITEM>
<TITLE>Building your first room</TITLE>
+
</VARLISTENTRY>
 +
</VARIABLELIST>
  
<PARA>Now you are ready!  With all you have learned about room
+
</SECT1>
fields you are now ready to build your first room.  I personally
 
like dragons and I like space so I have chosen to make a dragon
 
station.  We will first do a simple room and build on to it in the
 
next sections.  In this section we will walk you through creating a
 
basic room and why we choose what we do where we do.</PARA>
 
  
<PARA>When making rooms you create the zone source file first as shown
+
<sect1 id="rmbasic">
in <xref linkend="ch-02">.  If you only have rooms you do not need the
+
<TITLE>Building your first room</TITLE>
%reset, %objects, and %mobiles.  For the examples in this chapter we
 
will use the zone we created in <xref linkend="ch-02"> and add the %room
 
tag where we will put all the rooms.  At the end of the chapter we will
 
have the entire zone so you can see it all together.</PARA>
 
  
<PARA>The first part of all rooms is the symbolic name it is good to
+
<PARA>Now you are ready!  With all you have learned about room
always pick a name that will match the title so you can use the
+
fields you are now ready to build your first room.  I personally
administrator command <command>goto</command> to easily get to the
+
like dragons and I like space so I have chosen to make a dragon
roomThe reason is when you use the command
+
station.  We will first do a simple room and build on to it in the
<command>wstat</command> it will only show you a list of the rooms
+
next sectionsIn this section we will walk you through creating a
by symbolic name for example if you type
+
basic room and why we choose what we do where we do.</PARA>
<command>
 
wstat zone dragon room
 
</command>
 
You will get  the following:</PARA>
 
<INFORMALEXAMPLE>
 
<PROGRAMLISTING>
 
  
List of rooms in zone Dragon:
+
<PARA>When making rooms you create the zone source file first as shown
chamber portal office
+
in <xref linkend="ch-02">.  If you only have rooms you do not need the
 +
%reset, %objects, and %mobiles.  For the examples in this chapter we
 +
will use the zone we created in <xref linkend="ch-02"> and add the %room
 +
tag where we will put all the rooms.  At the end of the chapter we will
 +
have the entire zone so you can see it all together.</PARA>
  
</PROGRAMLISTING>
+
<PARA>The first part of all rooms is the symbolic name it is good to
</INFORMALEXAMPLE>
+
always pick a name that will match the title so you can use the
<PARA>If you didn't make it clear what the rooms were by the symbolic name
+
administrator command <command>goto</command> to easily get to the
it might look like this:</PARA>
+
room.  The reason is when you use the command
<INFORMALEXAMPLE>
+
<command>wstat</command> it will only show you a list of the rooms
<PROGRAMLISTING>
+
by symbolic name for example if you type
 +
<command>
 +
wstat zone dragon room
 +
</command>
 +
You will get  the following:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
List of rooms in zone Dragon:
+
List of rooms in zone Dragon:
st_rm1 st_rm2 st_rm3
+
chamber portal office
  
</PROGRAMLISTING>
+
</PROGRAMLISTING>
</INFORMALEXAMPLE>
+
</INFORMALEXAMPLE>
 +
<PARA>If you didn't make it clear what the rooms were by the symbolic name
 +
it might look like this:</PARA>
 +
<INFORMALEXAMPLE>
 +
<PROGRAMLISTING>
  
<PARA>While this might be great when you first start imagine trying to
+
List of rooms in zone Dragon:
remember what all one hundred rooms are.</PARA>
+
st_rm1 st_rm2 st_rm3
  
<PARA>The first room we will create will be a simple chamber with nothing special.  We can build on to it later if we need to.</PARA>
+
</PROGRAMLISTING>
<INFORMALEXAMPLE>
+
</INFORMALEXAMPLE>
<PROGRAMLISTING>
 
  
chamber
+
<PARA>While this might be great when you first start imagine trying to
end
+
remember what all one hundred rooms are.</PARA>
  
</PROGRAMLISTING>
+
<PARA>The first room we will create will be a simple chamber with nothing specialWe can build on to it later if we need to.</PARA>
</INFORMALEXAMPLE>
+
<INFORMALEXAMPLE>
<PARA>Pretty easy so far.  Now lets add some life to it.  The room
+
<PROGRAMLISTING>
will need a title and a description.  The title should be a one line
 
description of a room sort of like if you were walking someone
 
around your house and telling them what each room was like this is
 
'My houses big bathroom' or maybe this is 'The computer room'The
 
description should be something you would tell an interior
 
decorator you were talking to on the phone and asking for
 
advice.  He would want to know everything about the room you
 
can see so he could give you good advice.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
chamber
 +
end
  
chamber
+
</PROGRAMLISTING>
title "The middle chamber of the station"
+
</INFORMALEXAMPLE>
descr
+
<PARA>Pretty easy so far.  Now lets add some life to it. The room
"This chamber seems to have the entire station rotating around it.
+
will need a title and a description.  The title should be a one line
Small human size ornate chairs with dragon designs scrawled on the
+
description of a room sort of like if you were walking someone
arms and back are arranged in a triangle like setting with one large
+
around your house and telling them what each room was like this is
chair at the frontThis must be where all station meetings are held.
+
'My houses big bathroom' or maybe this is 'The computer room'The
large pictures cover the walls depicting dragons in all kinds of
+
description should be something you would tell an interior
situationsSmall passages lead of to the west and the east.
+
decorator you were talking to on the phone and asking for
."
+
adviceHe would want to know everything about the room you
end
+
can see so he could give you good advice.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>It is a matter of taste if you want the descriptions of the
+
chamber
exits in your description or not but I like them so I put themNow
+
title "The middle chamber of the station"
if you were reading this description to someone the person might ask
+
descr
you what is on the pictures or maybe even what exactly do the chairs
+
"This chamber seems to have the entire station rotating around it.
look like so we better take care of that by adding some extras to
+
Small human size ornate chairs with dragon designs scrawled on the
our little room.</PARA>
+
arms and back are arranged in a triangle like setting with one large
<INFORMALEXAMPLE><PROGRAMLISTING>
+
chair at the frontThis must be where all station meetings are held.
 +
large pictures cover the walls depicting dragons in all kinds of
 +
situations.  Small passages lead of to the west and the east.
 +
."
 +
end
  
extra {"chairs","chair"}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
"The chairs are made of some metal you don't recognize and every inch is covered
 
with some kind of dragon."
 
  
extra  {"dragon picture","picture"}
+
<PARA>It is a matter of taste if you want the descriptions of the
"Thousands of dragons dot the skies of this rather life like pictureIn the
+
exits in your description or not but I like them so I put themNow
center you see something move.  It looks to be a little green dragon."
+
if you were reading this description to someone the person might ask
 +
you what is on the pictures or maybe even what exactly do the chairs
 +
look like so we better take care of that by adding some extras to
 +
our little room.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
extra{"green dragon","dragon","green"}
+
extra {"chairs","chair"}
"An intelligent looking dragon is sitting perched on a large chair watching you."
+
"The chairs are made of some metal you don't recognize and every inch is covered
 +
with some kind of dragon."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
extra  {"dragon picture","picture"}
<PARA>Normally we could put a movement type for the amount of
+
"Thousands of dragons dot the skies of this rather life like picture.  In the
endurance lost when a person is moving through the area but we will
+
center you see something moveIt looks to be a little green dragon."
leave it blank and go with the default which is SECT_CITY since
 
with the fake gravity that is the closest we could come with the
 
sector types availibleThe last thing we need to finish our room
 
is the two exits leading to the other rooms.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
west to portal descr "You see a small room.";
+
extra{"green dragon","dragon","green"}
 +
"An intelligent looking dragon is sitting perched on a large chair watching you."
  
east to office descr "You see what looks to be an office.";
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>Normally we could put a movement type for the amount of
 +
endurance lost when a person is moving through the area but we will
 +
leave it blank and go with the default which is SECT_CITY since
 +
with the fake gravity that is the closest we could come with the
 +
sector types availible.  The last thing we need to finish our room
 +
is the two exits leading to the other rooms.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
west to portal descr "You see a small room.";
  
<PARA>Thats it that is all there is to making a room.  In the next
+
east to office descr "You see what looks to be an office.";
couple of sections we are going to add some more rooms with more
 
advanced features and give some debugging hints for compiling your
 
rooms but if you understand everything so far your going to have no
 
problem. Lets take a look at our entire finished first room</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
chamber
+
<PARA>Thats it that is all there is to making a room. In the next
title "The middle chamber of the station"
+
couple of sections we are going to add some more rooms with more
descr
+
advanced features and give some debugging hints for compiling your
"This chamber seems to have the entire station rotating around it.
+
rooms but if you understand everything so far your going to have no
Small human size ornate chairs with dragon designs scrawled on the
+
problemLets take a look at our entire finished first room</PARA>
arms and back are arranged in a triangle like setting with one large
 
chair at the front.  This must be where all station meetings are held.
 
large pictures cover the walls depicting dragons in all kinds of
 
situationsSmall passages lead of to the west and the east.
 
."
 
  
extra {"chairs","chair"}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"The chairs are made of some metal you don't recognize and every inch is covered
 
with some kind of dragon."
 
  
extra  {"dragon picture","picture"}
+
chamber
"Thousands of dragons dot the skies of this rather life like pictureIn the
+
title "The middle chamber of the station"
center you see something moveIt looks to be a little green dragon."
+
descr
 +
"This chamber seems to have the entire station rotating around it.
 +
Small human size ornate chairs with dragon designs scrawled on the
 +
arms and back are arranged in a triangle like setting with one large
 +
chair at the frontThis must be where all station meetings are held.
 +
large pictures cover the walls depicting dragons in all kinds of
 +
situationsSmall passages lead of to the west and the east.
 +
."
  
extra{"green dragon","dragon","green"}
+
extra {"chairs","chair"}
"An intelligent looking dragon is sitting perched on a large chair watching you."
+
"The chairs are made of some metal you don't recognize and every inch is covered
west to portal descr "You see a small room.";
+
with some kind of dragon."
  
east to office descr "You see what looks to be an office.";
+
extra  {"dragon picture","picture"}
end
+
"Thousands of dragons dot the skies of this rather life like picture.  In the
 +
center you see something move.  It looks to be a little green dragon."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
extra{"green dragon","dragon","green"}
 +
"An intelligent looking dragon is sitting perched on a large chair watching you."
 +
west to portal descr "You see a small room.";
  
</SECT1>
+
east to office descr "You see what looks to be an office.";
<sect1 id="rmdebug">
+
end
<TITLE>Compiling and debugging your first room</TITLE>
 
<PARA>It is time we put the zone header information together with
 
your first zone and compile it into a format the <ACRONYM>VME</ACRONYM> server can
 
use.  This is done by using the <ACRONYM>VMC</ACRONYM> compiler.  Depending on if you
 
are doing this on your own Linux server or if you are building for a
 
<ACRONYM>VME</ACRONYM> already set up you will have to use the compiler access
 
method they have defined.  No matter if you are compiling by email,
 
ftp, or at the command line with <ACRONYM>VMC</ACRONYM> the error messages will all be
 
the same. Since I have no idea how your particular set up is
 
designed I will explain the errors that the compiler will return and
 
you will have to ask your system administrator how to access the
 
compiler.  The rest of this section is written as if you have your
 
own <ACRONYM>VME</ACRONYM> running on your own Linux box using the <ACRONYM>VMC</ACRONYM> at the command
 
line.</PARA>
 
  
<PARA>When you are working on your first zone it is always a good
+
</PROGRAMLISTING></INFORMALEXAMPLE>
idea to start with one or two rooms and compile them instead of
 
writing all the rooms and then trying to compile.  The reason is the
 
more rooms you have the more confused you can make the compiler if
 
you have a lot of errors and you may not be able to figure out where
 
your first mistake was easily.  In our case we only have our first
 
room and the header information for the zone so lets put it together
 
now and try and compile it.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</SECT1>
 +
<sect1 id="rmdebug">
 +
<TITLE>Compiling and debugging your first room</TITLE>
 +
<PARA>It is time we put the zone header information together with
 +
your first zone and compile it into a format the <ACRONYM>VME</ACRONYM> server can
 +
use.  This is done by using the <ACRONYM>VMC</ACRONYM> compiler.  Depending on if you
 +
are doing this on your own Linux server or if you are building for a
 +
<ACRONYM>VME</ACRONYM> already set up you will have to use the compiler access
 +
method they have defined.  No matter if you are compiling by email,
 +
ftp, or at the command line with <ACRONYM>VMC</ACRONYM> the error messages will all be
 +
the same.  Since I have no idea how your particular set up is
 +
designed I will explain the errors that the compiler will return and
 +
you will have to ask your system administrator how to access the
 +
compiler.  The rest of this section is written as if you have your
 +
own <ACRONYM>VME</ACRONYM> running on your own Linux box using the <ACRONYM>VMC</ACRONYM> at the command
 +
line.</PARA>
  
#include composed.h>
+
<PARA>When you are working on your first zone it is always a good
%zone dragonst
+
idea to start with one or two rooms and compile them instead of
lifespan 20
+
writing all the rooms and then trying to compile. The reason is the
reset RESET_ANYHOw
+
more rooms you have the more confused you can make the compiler if
creators {"whistler"}
+
you have a lot of errors and you may not be able to figure out where
 +
your first mistake was easily.  In our case we only have our first
 +
room and the header information for the zone so lets put it together
 +
now and try and compile it.</PARA>
  
notes
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"This is the dragon station I shortened it to dragonst for ease in
 
loading.  If you have  any questions email me at whistler@valhalla.com"
 
  
help
+
#include composed.h>
"Not sure what could help you now.  You are stuck on one of the
+
%zone dragonst
weirdest space stations you have ever seen and you smell burning
+
lifespan 20
sulfur."
+
reset RESET_ANYHOw
 +
creators {"whistler"}
  
%rooms
+
notes
 +
"This is the dragon station I shortened it to dragonst for ease in
 +
loading.  If you have  any questions email me at whistler@valhalla.com"
  
chamber
+
help
title "The middle chamber of the station
+
"Not sure what could help you now. You are stuck on one of the
descr
+
weirdest space stations you have ever seen and you smell burning
"This chamber seems to have the entire station rotating around it.
+
sulfur."
Small human size ornate chairs with dragon designs scrawled on the
 
arms and back are arranged in a triangle like setting with one large
 
chair at the front.  This must be where all station meetings are held.
 
large pictures cover the walls depicting dragons in all kinds of
 
situations.  Small passages lead of to the west and the east.
 
."
 
  
extra {"chair","chairs"}
+
%rooms
"The chairs are made of some metal you don't recognize and every inch is
 
covered with some kind of dragon."
 
  
extra  {"dragon picture","picture"}
+
chamber
"Thousands of dragons dot the skies of this rather life like pictureIn the
+
title "The middle chamber of the station
center you see something moveIt looks to be a little green dragon."
+
descr
 +
"This chamber seems to have the entire station rotating around it.
 +
Small human size ornate chairs with dragon designs scrawled on the
 +
arms and back are arranged in a triangle like setting with one large
 +
chair at the frontThis must be where all station meetings are held.
 +
large pictures cover the walls depicting dragons in all kinds of
 +
situationsSmall passages lead of to the west and the east.
 +
."
  
extra{"green dragon","dragon","green"}
+
extra {"chair","chairs"}
"An intelligent looking dragon is sitting perched on a large chair watching you."
+
"The chairs are made of some metal you don't recognize and every inch is
west to portal descr "You see a small room.";
+
covered with some kind of dragon."
  
east to office descr "You see what looks to be an office.";
+
extra  {"dragon picture","picture"}
end
+
"Thousands of dragons dot the skies of this rather life like picture.  In the
 +
center you see something move.  It looks to be a little green dragon."
  
%end
+
extra{"green dragon","dragon","green"}
 +
"An intelligent looking dragon is sitting perched on a large chair watching you."
 +
west to portal descr "You see a small room.";
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
east to office descr "You see what looks to be an office.";
<PARA>We added the %room tag to our zone header stuck our room in
+
end
and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM> server for
 
you to be able to look at it in the game.  If you downloaded our
 
example zones for this document you can compile this zone along with
 
us and fix the errors as we do for practice.  The filename is
 
''debug_rm.zon''. Just so you know the errors in this
 
zone are intentional so please don't write me an email telling me
 
there are errors in it.</PARA>
 
  
<PARA>The command to compile the zone is
+
%end
<command>VMC debug_rm.zon</command>.
 
Here is what we get when we first try and
 
compile the zone.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>We added the %room tag to our zone header stuck our room in
 +
and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM> server for
 +
you to be able to look at it in the game.  If you downloaded our
 +
example zones for this document you can compile this zone along with
 +
us and fix the errors as we do for practice.  The filename is
 +
''debug_rm.zon''.  Just so you know the errors in this
 +
zone are intentional so please don't write me an email telling me
 +
there are errors in it.</PARA>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [Apr 28 2001]
+
<PARA>The command to compile the zone is
Compiling 'debug_rm.zon'
+
<command>VMC debug_rm.zon</command>.
&lt;debug_rm.zon&gt; @ 2: Bad include argument
+
Here is what we get when we first try and
&lt;debug_rm.zon&gt; @ 48: Token too long
+
compile the zone.</PARA>
Fatal error compiling in preprocessor stage in file 'debug_rm.zon'.
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Don't worry if this looks scary, it really is much easier to read than it looks like.  
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [Apr 28 2001]
The first thing you need to realize about compiling is always fix one error
+
Compiling 'debug_rm.zon'
and compile again because it might fix two or three errors after
+
&lt;debug_rm.zon&gt; @ 2: Bad include argument
with one fix. The reason is once a compiler hits something it
+
&lt;debug_rm.zon&gt; @ 48: Token too long
doesn't understand it gets confused with the rest of the file.  It
+
Fatal error compiling in preprocessor stage in file 'debug_rm.zon'.
is sort of like if you thought the word 'water' meant 'fire' and you
 
tried to read a book it would get confusing really fast. So you have
 
to correct the definition of 'water' to understand the rest of the
 
book.</PARA>
 
  
<PARA>Lets take the first error with this in mind.  The first error
+
</PROGRAMLISTING></INFORMALEXAMPLE>
shows up on line three of the error file it says: </PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
&lt;debug_rm.zon&gt; @ 2: Bad include argument
+
<PARA>Don't worry if this looks scary, it really is much easier to read than it looks like.  
 +
The first thing you need to realize about compiling is always fix one error
 +
and compile again because it might fix two or three errors after
 +
with one fix.  The reason is once a compiler hits something it
 +
doesn't understand it gets confused with the rest of the file.  It
 +
is sort of like if you thought the word 'water' meant 'fire' and you
 +
tried to read a book it would get confusing really fast.  So you have
 +
to correct the definition of 'water' to understand the rest of the
 +
book.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Lets take the first error with this in mind.  The first error
 +
shows up on line three of the error file it says: </PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>This line is not really cryptic reading it in a more english form
+
&lt;debug_rm.zon&gt; @ 2: Bad include argument
would sound like:  In file 'debug_rm.zon' you have an error at line 2, the
 
argument to the include statement is not correct.  Not all errors will
 
be this clear but the compiler does its best to get you close to the
 
error.  Now if you look at line two in ''debug_rm.zon'',
 
you will find, we forgot to put in the '&lt;' symbol.  If you fix
 
the line to look like:
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#include &lt;composed.h&gt;
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This line is not really cryptic reading it in a more english form
Then recompile you will have fixed your first error and get a whole new
+
would sound like:  In file 'debug_rm.zon' you have an error at line 2, the
set to play withThe following is the errors we got after fixing line
+
argument to the include statement is not correct.  Not all errors will
two:</PARA>
+
be this clear but the compiler does its best to get you close to the
<INFORMALEXAMPLE><PROGRAMLISTING>
+
error.  Now if you look at line two in ''debug_rm.zon'',
 +
you will find, we forgot to put in the '&lt;' symbolIf you fix
 +
the line to look like:
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
+
#include &lt;composed.h&gt;
Compiling 'debug_rm.zon'
 
&lt;debug_rm.zon&gt; @ 47: EOF in string
 
debug_rm.zon: 4: parse error
 
  Token: 'RESET_ANYHOw'
 
debug_rm.zon: 21: parse error
 
  Token: 'This'
 
debug_rm.zon: 26: parse error
 
  Token: 'and'
 
debug_rm.zon: 26: parse error
 
  Token: '.'
 
Grave errors in file 'debug_rm.zon'.
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
Then recompile you will have fixed your first error and get a whole new
 +
set to play with.  The following is the errors we got after fixing line
 +
two:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Now this looks to be a much more interesting error file than the
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
previous oneRemember we mentioned you should always fix the
+
Compiling 'debug_rm.zon'
first error first so the compiler doesn't get confused. In this error
+
&lt;debug_rm.zon&gt; @ 47: EOF in string
file the first line is not the first error we need to fix. We have
+
debug_rm.zon: 4: parse error
to do some logical reasoning here. The first error the compiler
+
  Token: 'RESET_ANYHOw'
came across was the one on line 4 that shows up around line 4 of the
+
debug_rm.zon: 21: parse error
error file. The lines before it are letting you know somewhere
+
  Token: 'This'
else in the file there is a missing quote.  If we clean up the first
+
debug_rm.zon: 26: parse error
error however we might be able to find this missing quote much easier.
+
  Token: 'and'
So lets do that lets start by looking at line 4 which is saying the
+
debug_rm.zon: 26: parse error
compiler doesn't understand what the token 'RESET_ANYHOw' is. This
+
  Token: '.'
makes sense the token should be 'RESET_ANYHOW' and the compiler is
+
Grave errors in file 'debug_rm.zon'.
case sensitive. So all we need to do to fix this one is capitalize the
 
'w' and the error should be cleared up lets try that and recompile and
 
see what the errors look like. With that line fixed the following is
 
the errors we get.
 
</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
+
<PARA>Now this looks to be a much more interesting error file than the
Compiling 'debug_rm.zon'
+
previous oneRemember we mentioned you should always fix the
&lt;debug_rm.zon&gt; @ 47: EOF in string
+
first error first so the compiler doesn't get confused.  In this error
debug_rm.zon: 21: parse error
+
file the first line is not the first error we need to fix.  We have
  Token: 'This'
+
to do some logical reasoning here. The first error the compiler
debug_rm.zon: 26: parse error
+
came across was the one on line 4 that shows up around line 4 of the
  Token: 'and'
+
error file. The lines before it are letting you know somewhere
debug_rm.zon: 26: pars
+
else in the file there is a missing quote.  If we clean up the first
e error
+
error however we might be able to find this missing quote much easier.  
  Token: '.'
+
So lets do that lets start by looking at line 4 which is saying the
Grave errors in file 'debug_rm.zon'.
+
compiler doesn't understand what the token 'RESET_ANYHOw' is. This
 +
makes sense the token should be 'RESET_ANYHOW' and the compiler is
 +
case sensitive. So all we need to do to fix this one is capitalize the
 +
'w' and the error should be cleared up lets try that and recompile and
 +
see what the errors look like. With that line fixed the following is
 +
the errors we get.
 +
</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Again we must figure out which error message we should deal with
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
first.  As before we need to deal with the lowest number errorThe
+
Compiling 'debug_rm.zon'
error we need to fix first then is the one on line '21'. If you go
+
&lt;debug_rm.zon&gt; @ 47: EOF in string
to line '21' you will notice the line looks fine. When you run
+
debug_rm.zon: 21: parse error
into an error like this where the error is not exactly on the line
+
  Token: 'This'
scroll up to the field before the one in question and you should find the
+
debug_rm.zon: 26: parse error
problem. In this case we forgot a '"' on the 'title' line and
+
  Token: 'and'
confused the compiler because it thought the ending quote was the one
+
debug_rm.zon: 26: pars
after the 'descr' field. Therefore the compiler didn't understand the
+
e error
'This' as a field. This is one of the harder errors to find but once
+
  Token: '.'
you get used to it will come naturally and the compiler does try to
+
Grave errors in file 'debug_rm.zon'.
get you close.  Now if we add the '"' we are missing and recompile
 
the following is the output we get.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
+
<PARA>Again we must figure out which error message we should deal with
Compiling 'debug_rm.zon'
+
first.  As before we need to deal with the lowest number error.  The
<ACRONYM>VMC</ACRONYM> Done.
+
error we need to fix first then is the one on line '21'.  If you go
 +
to line '21' you will notice the line looks fine.  When you run
 +
into an error like this where the error is not exactly on the line
 +
scroll up to the field before the one in question and you should find the
 +
problem.  In this case we forgot a '"' on the 'title' line and
 +
confused the compiler because it thought the ending quote was the one
 +
after the 'descr' fieldTherefore the compiler didn't understand the
 +
'This' as a field. This is one of the harder errors to find but once
 +
you get used to it will come naturally and the compiler does try to
 +
get you close.  Now if we add the '"' we are missing and recompile
 +
the following is the output we get.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
you have now successfully compiled the zoneI want you to look at the
+
Compiling 'debug_rm.zon'
last error file and the fact that we only changed a quote to go from it
+
<ACRONYM>VMC</ACRONYM> Done.
to no errors.  This is why you always deal with one error at a time.  
 
Sometimes fixing one error can fix a lot of the weird errors that make
 
no sense.  In fact I have seen one quote cause as much as 50 errors so
 
if you jump around trying to fix errors that look like they make sense
 
you may end up making more work for yourself.
 
</PARA>
 
  
<PARA>Now that you have a compiled zone you should check and make sure
+
</PROGRAMLISTING></INFORMALEXAMPLE>
all the files are there.  When you compile a zone you will end up
 
with  three extra files. the files will have the same filename as your zone
 
with a new extension in this case you should have the following.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
debug_rm.data
+
<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means
debug_rm.err
+
you have now successfully compiled the zone. I want you to look at the
debug_rm.reset
+
last error file and the fact that we only changed a quote to go from it
debug_rm.zon
+
to no errors.  This is why you always deal with one error at a time.  
 +
Sometimes fixing one error can fix a lot of the weird errors that make
 +
no sense. In fact I have seen one quote cause as much as 50 errors so
 +
if you jump around trying to fix errors that look like they make sense
 +
you may end up making more work for yourself.
 +
</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Now that you have a compiled zone you should check and make sure
 +
all the files are there.  When you compile a zone you will end up
 +
with  three extra files. the files will have the same filename as your zone
 +
with a new extension in this case you should have the following.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>If you have all of these you are all set to go. If not then there
+
debug_rm.data
is something seriously wrong and you may want to write the <ACRONYM>VME</ACRONYM> staff for
+
debug_rm.err
help. To get your new zone in the mud all that is needed is to make
+
debug_rm.reset
sure your zone is in the zonelist in the <ACRONYM>VME</ACRONYM> etc directory and copy
+
debug_rm.zon
these files into your zone directory.  Then reboot the mud. You should
 
be able to log on your builder character and goto your zone by typing,
 
<command>goto chamber@dragonst</command>.</PARA>
 
  
<PARA>There you go you have now compiled your first zone.  Its not much
+
</PROGRAMLISTING></INFORMALEXAMPLE>
to look at but with what you already know you could make a full zone of
 
very basic rooms.  The next few sections will teach you some of the more
 
interesting things you can do when making your rooms.</PARA>
 
  
</SECT1>
+
<PARA>If you have all of these you are all set to go.  If not then there
<sect1 id="rmdilfunc">
+
is something seriously wrong and you may want to write the <ACRONYM>VME</ACRONYM> staff for
<TITLE><ACRONYM>DIL</ACRONYM> functions for rooms</TITLE>
+
help.  To get your new zone in the mud all that is needed is to make
 +
sure your zone is in the zonelist in the <ACRONYM>VME</ACRONYM> etc directory and copy
 +
these files into your zone directory.  Then reboot the mud.  You should
 +
be able to log on your builder character and goto your zone by typing,
 +
<command>goto chamber@dragonst</command>.</PARA>
  
<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own
+
<PARA>There you go you have now compiled your first zoneIts not much
special functions on rooms, NPCs, objects, PCs, and much moreThis
+
to look at but with what you already know you could make a full zone of
manual is for basic zone writing and therefore will not go into how to
+
very basic rooms.  The next few sections will teach you some of the more
write your own <ACRONYM>DIL</ACRONYM> functions.  The <ACRONYM>VME</ACRONYM> however is released with many
+
interesting things you can do when making your rooms.</PARA>
functions for you as an Administrator and your builders to use to make
 
special rooms, NPCs, and objects.  The following is a list of all room
 
functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>
 
  
 +
</SECT1>
 +
<sect1 id="rmdilfunc">
 +
<TITLE><ACRONYM>DIL</ACRONYM> functions for rooms</TITLE>
  
<variablelist id="var-roomfunc">
+
<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own
<VARLISTENTRY>
+
special functions on rooms, NPCs, objects, PCs, and much more.  This
;Death room
+
manual is for basic zone writing and therefore will not go into how to
<DICTDEF>
+
write your own <ACRONYM>DIL</ACRONYM> functions.  The <ACRONYM>VME</ACRONYM> however is released with many
<PARA><indexterm>
+
functions for you as an Administrator and your builders to use to make
<primary>Death room function</primary>
+
special rooms, NPCs, and objects.  The following is a list of all room
</indexterm></PARA>
+
functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>
  
<PARA>This function is a simple function that allows you to create a
 
room to do damage to a player. The death_room can kill them slowly like
 
a fire cave would or it can kill them quickly as if you stuck them in a
 
microwave it is all up to how you set the arguments.  It also lets you
 
see the acts the players see so this function can be used on any number
 
of death style rooms.  There is no need to understand how the function
 
works just how to use it so with that in mind the following is the
 
functions header.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//In function.zon
+
<variablelist id="var-roomfunc">
dilbegin death_room(tick: integer, damage: integer, act_s: string);
+
<VARLISTENTRY>
 +
;Death room
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Death room function</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This function is a simple function that allows you to create a
<PARA>As with any function all you have to do is 'dilcopy' the function
+
room to do damage to a player. The death_room can kill them slowly like
onto your room with the correct zone name and arguments and it will do
+
a fire cave would or it can kill them quickly as if you stuck them in a
the rest. In this <ACRONYM>DIL</ACRONYM> you have three arguments to pass The first is the
+
microwave it is all up to how you set the argumentsIt also lets you
'tick' or time which in this <ACRONYM>DIL</ACRONYM> is broken down into 'ticks' which are 4
+
see the acts the players see so this function can be used on any number
ticks per secondThus if you wanted to get something to do damage
+
of death style roomsThere is no need to understand how the function
every minute you would put '60*4' in that spot.  The next is the amount
+
works just how to use it so with that in mind the following is the
of damage you want done per your timeIf for example you want '60' hit
+
functions header.</PARA>
+points damage done each round you just put '60' as that argument.
+
<INFORMALEXAMPLE><PROGRAMLISTING>
Finally is the act shown to the character as a string in quotes.  So a
 
finished death room on your room would look like this.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy death_room@function(4*60,60,
+
//In function.zon
"Flames shoot up from the floor burning your butt.");
+
dilbegin death_room(tick: integer, damage: integer, act_s: string);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>As with any function all you have to do is 'dilcopy' the function
 +
onto your room with the correct zone name and arguments and it will do
 +
the rest.  In this <ACRONYM>DIL</ACRONYM> you have three arguments to pass The first is the
 +
'tick' or time which in this <ACRONYM>DIL</ACRONYM> is broken down into 'ticks' which are 4
 +
ticks per second.  Thus if you wanted to get something to do damage
 +
every minute you would put '60*4' in that spot.  The next is the amount
 +
of damage you want done per your time.  If for example you want '60' hit
 +
+points damage done each round you just put '60' as that argument.
 +
Finally is the act shown to the character as a string in quotes.  So a
 +
finished death room on your room would look like this.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
dilcopy death_room@function(4*60,60,
</VARLISTENTRY>
+
"Flames shoot up from the floor burning your butt.");
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;Climb
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Climb room function</primary>
 
</indexterm></PARA>
 
  
<PARA>
+
</LISTITEM>
    This special <ACRONYM>DIL</ACRONYM> is used for the climb skill and should be set on
+
</VARLISTENTRY>
    stationary objects (stationary mast, robe, tree, wall, etc). The
 
    'difficulty' is the skill-amount required to climb. A skill of 100
 
    would be a 50% chance for the expert thief / climber. The 'damage'
 
    is how much damage is given if you fail to climb the object. When
 
    you fail, you "fall" to the 'destination', so you can make gravity
 
    work correctly. The destination can be the same room in which you
 
    started but it doesn't have to be. The 'direction' is the direction
 
    in which you want the person to have to climb enclosed in quotes.</PARA>
 
 
<PARA>With all this in mind the following is the <ACRONYM>DIL</ACRONYM> definition and
 
an example use of it.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;Climb
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Climb room function</primary>
 +
</indexterm></PARA>
  
//<ACRONYM>DIL</ACRONYM> definition
+
<PARA>
dilbegin climb(destination:string, difficulty:integer,
+
    This special <ACRONYM>DIL</ACRONYM> is used for the climb skill and should be set on
                damage:integer,direction:integer);
+
    stationary objects (stationary mast, robe, tree, wall, etc). The
 +
    'difficulty' is the skill-amount required to climb. A skill of 100
 +
    would be a 50% chance for the expert thief / climber. The 'damage'
 +
    is how much damage is given if you fail to climb the object. When
 +
    you fail, you "fall" to the 'destination', so you can make gravity
 +
    work correctly. The destination can be the same room in which you
 +
    started but it doesn't have to be. The 'direction' is the direction
 +
    in which you want the person to have to climb enclosed in quotes.</PARA>
 +
 +
<PARA>With all this in mind the following is the <ACRONYM>DIL</ACRONYM> definition and
 +
an example use of it.</PARA>
  
//Example use of Climb
+
<INFORMALEXAMPLE><PROGRAMLISTING>
dilcopy climb@function("deck@ship", 17, 20, "up");
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//<ACRONYM>DIL</ACRONYM> definition
 +
dilbegin climb(destination:string, difficulty:integer,
 +
                damage:integer,direction:integer);
  
<PARA>We should note here, if you wanted the person to have to climb
+
//Example use of Climb
back down you will need to put a climb <ACRONYM>DIL</ACRONYM> on the room you are climbing
+
dilcopy climb@function("deck@ship", 17, 20, "up");
too that has the "down" directory as an argument.  This <ACRONYM>DIL</ACRONYM> also allows
 
you to link two rooms not linked by normal directions but we
 
suggest you should think before doing this because it may not make sense to not
 
have a link between the two places.</PARA>
 
</LISTITEM>
 
  
</VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
<PARA>We should note here, if you wanted the person to have to climb
;Force move
+
back down you will need to put a climb <ACRONYM>DIL</ACRONYM> on the room you are climbing
<DICTDEF>
+
too that has the "down" directory as an argument.  This <ACRONYM>DIL</ACRONYM> also allows
<PARA><indexterm>
+
you to link two rooms not linked by normal directions but we
<primary>Force move room function</primary>
+
suggest you should think before doing this because it may not make sense to not
</indexterm></PARA>
+
have a link between the two places.</PARA>
 +
</LISTITEM>
  
<PARA>This function allows you to move a player or NPC from a room to another
+
</VARLISTENTRY>
room with out having the player or NPC type or do anything.</PARA>
 
  
<PARA>The following is the definition of the force move <ACRONYM>DIL</ACRONYM></PARA>
+
<VARLISTENTRY>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
;Force move
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Force move room function</primary>
 +
</indexterm></PARA>
  
dilbegin force_move (tick: integer, strings: string, random: integer);
+
<PARA>This function allows you to move a player or NPC from a room to another
 +
room with out having the player or NPC type or do anything.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The following is the definition of the force move <ACRONYM>DIL</ACRONYM></PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The 'tick' parameter is how fast you want the force move to be
+
dilbegin force_move (tick: integer, strings: string, random: integer);
triggered.  The 'tick' is in 1/4 second increments so to get a one
 
second wait you would place a four.  The second parameter is two strings
 
the first being the symbolic name of the room you are forcing the
 
character to.  The second string is the act you want shown to the player
 
or NPC when it is moved.  The final parameter is either a one or a zero.
 
The one stands for true and it would make the timer trigger randomly
 
fifty percent of the time, while a zero would make it not random.</PARA>
 
  
<PARA>The following is what the force move would look like if you wanted it to trigger every 30 seconds and give acts of a river.</PARA>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy force_move@function(4*30,{"river2@riverzon","You float down the river."},0);
+
<PARA>The 'tick' parameter is how fast you want the force move to be
 +
triggered.  The 'tick' is in 1/4 second increments so to get a one
 +
second wait you would place a four.  The second parameter is two strings
 +
the first being the symbolic name of the room you are forcing the
 +
character to.  The second string is the act you want shown to the player
 +
or NPC when it is moved. The final parameter is either a one or a zero.
 +
The one stands for true and it would make the timer trigger randomly
 +
fifty percent of the time, while a zero would make it not random.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The following is what the force move would look like if you wanted it to trigger every 30 seconds and give acts of a river.</PARA>
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
dilcopy force_move@function(4*30,{"river2@riverzon","You float down the river."},0);
;Safe room
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Safe room function</primary>
 
</indexterm></PARA>
 
  
<PARA>This function creates a safe room where combat is not allowed.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
The following is the definition and an example of how to use it.</PARA>
+
</LISTITEM>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</VARLISTENTRY>
  
//Safe room <ACRONYM>DIL</ACRONYM> definition
+
<VARLISTENTRY>
dilbegin safe_room ();
+
;Safe room
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Safe room function</primary>
 +
</indexterm></PARA>
  
//Example use of Safe room
+
<PARA>This function creates a safe room where combat is not allowed.
dilcopy safe_room@function ();
+
The following is the definition and an example of how to use it.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//Safe room <ACRONYM>DIL</ACRONYM> definition
</LISTITEM>
+
dilbegin safe_room ();
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
</sect1>
+
//Example use of Safe room
 +
dilcopy safe_room@function ();
  
<sect1 id="rmcomplex">
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>A more complex set of rooms</TITLE>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
<PARA>In the last section you learned to make basic rooms.  In this
+
</sect1>
section we will build on what you already know to allow you to make much
 
more fancy rooms.  IN this section we will give a much better view of
 
the exits and what can be done with them including doors, hidden doors and
 
rooms inside other rooms.  We will also show some examples of the room
 
<ACRONYM>DIL</ACRONYM> functions being used that were described in the previous section.
 
Finally we will pull it all together in a completed zone for you to
 
compile and play with. </PARA>
 
  
<sect2 id="rmdoorexits">
+
<sect1 id="rmcomplex">
<TITLE>Exits with doors</TITLE>
+
<TITLE>A more complex set of rooms</TITLE>
  
<PARA>When we first defined exits we included the 'keyword' and 'open'
+
<PARA>In the last section you learned to make basic rooms.  In this
fields on a doorIn this section we will give an example of two rooms
+
section we will build on what you already know to allow you to make much
linked together with a doorThere is no new information you have
+
more fancy roomsIN this section we will give a much better view of
not already encountered so we will start with an example.</PARA>
+
the exits and what can be done with them including doors, hidden doors and
 +
rooms inside other roomsWe will also show some examples of the room
 +
<ACRONYM>DIL</ACRONYM> functions being used that were described in the previous section.
 +
Finally we will pull it all together in a completed zone for you to
 +
compile and play with. </PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<sect2 id="rmdoorexits">
 +
<TITLE>Exits with doors</TITLE>
  
hallway
+
<PARA>When we first defined exits we included the 'keyword' and 'open'
title "Module tunnel"
+
fields on a door.  In this section we will give an example of two rooms
descr "The hallway is about 50 meters long and around 100 meters from
+
linked together with a door.  There is no new information you have
side to side and top to bottom...."
+
not already encountered so we will start with an example.</PARA>
  
movement SECT_INSIDE
+
<INFORMALEXAMPLE><PROGRAMLISTING>
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
west to chamber descr
+
hallway
"The hallway opens up into a chamber.";
+
title "Module tunnel"
 +
descr "The hallway is about 50 meters long and around 100 meters from
 +
side to side and top to bottom...."
  
east to office descr
+
movement SECT_INSIDE
"You see what looks to be an office."
+
ALWAYS_LIGHT
keyword {"air lock door","air lock","door"}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
open {EX_OPEN_CLOSE, EX_CLOSED};
 
  
end
+
west to chamber descr
 +
"The hallway opens up into a chamber.";
  
office
+
east to office descr
title "The station office"
+
"You see what looks to be an office."
descr
+
keyword {"air lock door","air lock","door"}
"Large paintings fill the walls of this part of the station...."
+
open {EX_OPEN_CLOSE, EX_CLOSED};
  
movement SECT_INSIDE
+
end
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
west to hallway descr
+
office
"You see what looks to be a hallway."
+
title "The station office"
keyword {"air lock door","air lock","door"}
+
descr
open {EX_OPEN_CLOSE, EX_CLOSED};
+
"Large paintings fill the walls of this part of the station...."
end
 
  
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
west to hallway descr
 +
"You see what looks to be a hallway."
 +
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
 +
end
  
<PARA>One important thing you should notice is, whatever you put as a
 
keyword, along with the direction, is what a person must use to open
 
the door.  To make sure the door closes at reset time you will have to
 
add the doors reset to the '%reset' section.  The door resets will be
 
explained in <xref LINKEND="ch-07">.  Notice also in this example
 
we have a direction both in the room you are going to and the room you
 
came from.  This means you need a 'west' direction for every 'east'
 
direction leading to it.  If you do not put both you will end up with a
 
one way direction.</PARA>
 
  
</sect2>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<sect2>
+
<PARA>One important thing you should notice is, whatever you put as a
<TITLE>Locked exits</TITLE>
+
keyword, along with the direction, is what a person must use to open
<PARA>Now that you have making a door down, you may find that it is not
+
the door.  To make sure the door closes at reset time you will have to
safe to leave your doors unlockedWell the <ACRONYM>VME</ACRONYM> is ready for youYou
+
add the doors reset to the '%reset' sectionThe door resets will be
have already seen the 'keyword' and 'open' sections and what you can set
+
explained in <xref LINKEND="ch-07">.  Notice also in this example
in themNow lets use the 'EX_LOCKED field with them and introduce a
+
we have a direction both in the room you are going to and the room you
new macro to allow you to set the difficulty to unlock the lock with out
+
came fromThis means you need a 'west' direction for every 'east'
a key.</PARA>
+
direction leading to it.  If you do not put both you will end up with a
 +
one way direction.</PARA>
  
<PARA>First lets look at the macro that allows you to set a difficulty
+
</sect2>
on a lock.  If you set the lock with out this macro it will default to
 
0 and thus be easy to pick.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
 
#define DOOR_LOCK_DEF(north_lock, east_lock, south_lock, west_lock,\
 
up_lock, down_lock, northeast_lock, northwest_lock, southeast_lock,\
 
southwest_lock)
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<sect2>
<PARA>When using this macro you only set the value of the exit you want
+
<TITLE>Locked exits</TITLE>
to add the difficulty to, you can leave the rest of the exits '0'.  Only
+
<PARA>Now that you have making a door down, you may find that it is not
one of these macros are needed on a room no matter how many exits
+
safe to leave your doors unlocked.  Well the <ACRONYM>VME</ACRONYM> is ready for you.  You
because each of the exits are included..  If you have an exit to the
+
have already seen the 'keyword' and 'open' sections and what you can set
north that is locked and you want it to have a difficulty of 50% the
+
in themNow lets use the 'EX_LOCKED field with them and introduce a
following would be the line you would add to your room</PARA>
+
new macro to allow you to set the difficulty to unlock the lock with out
<INFORMALEXAMPLE><PROGRAMLISTING>
+
a key.</PARA>
  
DOOR_LOCK_DEF(50, 0, 0, 0, 0, 0, 0, 0, 0, 0)
+
<PARA>First lets look at the macro that allows you to set a difficulty
 +
on a lock.  If you set the lock with out this macro it will default to
 +
0 and thus be easy to pick.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
 +
 +
#define DOOR_LOCK_DEF(north_lock, east_lock, south_lock, west_lock,\
 +
up_lock, down_lock, northeast_lock, northwest_lock, southeast_lock,\
 +
southwest_lock)
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>Now lets add the macro and the locked flag to the exits and create
+
<PARA>When using this macro you only set the value of the exit you want
the room.</PARA>
+
to add the difficulty to, you can leave the rest of the exits '0'.  Only
<INFORMALEXAMPLE><PROGRAMLISTING>
+
one of these macros are needed on a room no matter how many exits
 +
because each of the exits are included..  If you have an exit to the
 +
north that is locked and you want it to have a difficulty of 50% the
 +
following would be the line you would add to your room</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
hallway
+
DOOR_LOCK_DEF(50, 0, 0, 0, 0, 0, 0, 0, 0, 0)
title "Module tunnel"
 
descr "The hallway is about 50 meters long and around 100 meters from
 
side to side and top to bottom...."
 
  
movement SECT_INSIDE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
ALWAYS_LIGHT
+
<PARA>Now lets add the macro and the locked flag to the exits and create
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
the room.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
west to chamber descr
+
hallway
"The hallway opens up into a chamber.";
+
title "Module tunnel"
 +
descr "The hallway is about 50 meters long and around 100 meters from
 +
side to side and top to bottom...."
  
DOOR_LOCK_DEF(0, 50, 0, 0, 0, 0, 0, 0, 0, 0)
+
movement SECT_INSIDE
east to office descr
+
ALWAYS_LIGHT
"You see what looks to be an office."
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
keyword {"air lock door","air lock","door"}
 
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
  
end
+
west to chamber descr
 +
"The hallway opens up into a chamber.";
  
office
+
DOOR_LOCK_DEF(0, 50, 0, 0, 0, 0, 0, 0, 0, 0)
title "The station office"
+
east to office descr
descr
+
"You see what looks to be an office."
"Large paintings fill the walls of this part of the station...."
+
keyword {"air lock door","air lock","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
  
movement SECT_INSIDE
+
end
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
DOOR_LOCK_DEF(0, 0, 0, 50, 0, 0, 0, 0, 0, 0)
+
office
west to hallway descr
+
title "The station office"
"You see what looks to be a hallway."
+
descr
keyword {"air lock door","air lock","door"}
+
"Large paintings fill the walls of this part of the station...."
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
end
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
<PARA>The only thing you may be wondering about in this example is the
+
DOOR_LOCK_DEF(0, 0, 0, 50, 0, 0, 0, 0, 0, 0)
'key' field.  I have picked 'nokey' as my value of the key.  There is no
+
west to hallway descr
key in this zone so all this does is create a key hole. If you leave
+
"You see what looks to be a hallway."
the 'key' field out totally the only way you can open the lock is by a
+
keyword {"air lock door","air lock","door"}
magical spell.  It is also important that you read about resets of door locks in
+
key nokey
<xref LINKEND="ch-07">.</PARA>
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
</sect2>
+
end
  
<sect2>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>Hidden exits</TITLE>
 
  
<PARA>Locking the doors may not be enoughIn fact sometimes you may
+
<PARA>The only thing you may be wondering about in this example is the
not want to lock the door but you might want to hide itYou can do
+
'key' field.  I have picked 'nokey' as my value of the key.  There is no
both or either with the following macro added to your exit.</PARA>
+
key in this zone so all this does is create a key holeIf you leave
<INFORMALEXAMPLE><PROGRAMLISTING>
+
the 'key' field out totally the only way you can open the lock is by a
 +
magical spellIt is also important that you read about resets of door locks in
 +
<xref LINKEND="ch-07">.</PARA>
 +
</sect2>
  
#define SECRET_DOOR_DIFFICULTY(DIR, SKILL) \
+
<sect2>
extra{SECRET_DOOR} {DIR, SKILL}\           
+
<TITLE>Hidden exits</TITLE>
""                                       
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Locking the doors may not be enough.  In fact sometimes you may
<PARA>So if you wanted a door or just a passage to the north hidden you
+
not want to lock the door but you might want to hide it.  You can do
would add this before or after your exits.</PARA>
+
both or either with the following macro added to your exit.</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
SECRET_DOOR_DIFFICULTY(NORTH, 50)
+
#define SECRET_DOOR_DIFFICULTY(DIR, SKILL) \
 +
extra{SECRET_DOOR} {DIR, SKILL}\           
 +
""                                       
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>Now lets put it all together and link two rooms together with a
+
<PARA>So if you wanted a door or just a passage to the north hidden you
hidden door.</PARA>
+
would add this before or after your exits.</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
office
+
SECRET_DOOR_DIFFICULTY(NORTH, 50)
title "The station office"
 
descr
 
"Large paintings fill the walls of this part of the station..."
 
  
movement SECT_INSIDE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
ALWAYS_LIGHT
+
<PARA>Now lets put it all together and link two rooms together with a
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
hidden door.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
west to hallway descr
+
office
"You see what looks to be a hallway."
+
title "The station office"
keyword {"air lock door","air lock","door"}
+
descr
open {EX_OPEN_CLOSE, EX_CLOSED};
+
"Large paintings fill the walls of this part of the station..."
  
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
+
movement SECT_INSIDE
south to portal_room descr
+
ALWAYS_LIGHT
"You see what looks to be a portal room."
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
keyword {"air lock door","air lock","staff","door"}
 
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
 
  
end
+
west to hallway descr
 +
"You see what looks to be a hallway."
 +
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
  
portal_room
+
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
title "Green field room"
+
south to portal_room descr
descr
+
"You see what looks to be a portal room."
"Like the other rooms on the station this one is large enough for
+
keyword {"air lock door","air lock","staff","door"}
dragons to comfortably fit in.  The strange thing about this room though
+
key nokey
is it is totally empty except for a green field right in the center.  
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
there is a door that leads to another room to the north."
 
  
movement SECT_INSIDE
+
end
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
north  to office descr
+
portal_room
"You see what looks to be an office."
+
title "Green field room"
keyword {"air lock door","air lock","door"}
+
descr
key nokey
+
"Like the other rooms on the station this one is large enough for
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
+
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.  
 +
there is a door that leads to another room to the north."
  
end
+
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
north  to office descr
 +
"You see what looks to be an office."
 +
keyword {"air lock door","air lock","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
  
</sect2>
+
end
  
<sect2>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>Rooms inside of rooms</TITLE>
 
<PARA>Now that you have normal exits down its time to take a look at
 
something a bit different.  Lets say you wanted to put a barrel in a
 
room that is also a room that has exits to other rooms.  Or maybe in my
 
case I want to put a transporter pad in the room that is also a room
 
so you can exit back into the room you came from.  In the case of the
 
teleporter I could use an object but as you will find it is much easier
 
to deal with a room for this than an object.</PARA>
 
  
<PARA>To put a room in a room it is much different than using the normal
+
</sect2>
exit fields.  The only thing needed is the 'in' keyword and the
 
room you are linking the current room into. There is no need for a
 
semi-colon.  The following is what the line would look like.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<sect2>
 +
<TITLE>Rooms inside of rooms</TITLE>
 +
<PARA>Now that you have normal exits down its time to take a look at
 +
something a bit different.  Lets say you wanted to put a barrel in a
 +
room that is also a room that has exits to other rooms.  Or maybe in my
 +
case I want to put a transporter pad in the room that is also a room
 +
so you can exit back into the room you came from.  In the case of the
 +
teleporter I could use an object but as you will find it is much easier
 +
to deal with a room for this than an object.</PARA>
  
in &lt;room that room is in&gt;
+
<PARA>To put a room in a room it is much different than using the normal
 +
exit fields.  The only thing needed is the 'in' keyword and the
 +
room you are linking the current room into. There is no need for a
 +
semi-colon.  The following is what the line would look like.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<PARA>Not too hard.  The following are two rooms one in the other.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
portal_room
+
in &lt;room that room is in&gt;
title "Green field room"
 
descr
 
"Like the other rooms on the station this one is large enough for
 
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a green field right in the center.
 
there is a door that leads to another room to the north."
 
  
movement SECT_INSIDE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
ALWAYS_LIGHT
+
<PARA>Not too hard.  The following are two rooms one in the other.</PARA>
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
extra {"green field","field"}
+
portal_room
"The field looks to be a green fog shifting and churning as you watch.  
+
title "Green field room"
if you are nuts you could probably enter it."
+
descr
 +
"Like the other rooms on the station this one is large enough for
 +
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.  
 +
there is a door that leads to another room to the north."
  
north  to office descr
+
movement SECT_INSIDE
"You see what looks to be an office."
+
ALWAYS_LIGHT
keyword {"air lock door","air lock","door"}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
  
//A link to the portal is also here
+
extra {"green field","field"}
end
+
"The field looks to be a green fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
  
room_port
+
north  to office descr
names{"green field", "field"}
+
"You see what looks to be an office."
title "Green field"
+
keyword {"air lock door","air lock","door"}
descr
+
key nokey
"Green Mist swirls about you."
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
  
movement SECT_INSIDE
+
//A link to the portal is also here
ALWAYS_LIGHT
+
end
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
in portal_room
+
room_port
end
+
names{"green field", "field"}
 +
title "Green field"
 +
descr
 +
"Green Mist swirls about you."
  
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
in portal_room
 +
end
  
<NOTE>
 
<PARA>After adding a room in a room you should note the room in the
 
description or put an 'outside_descr' on the room inside it.  In
 
our example we have chosen to add the description into the room instead
 
of using the 'outside_descr'.  Also doors and locks work the same way as before you can even hide this exit.
 
</PARA></NOTE>
 
  
</sect2>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
                  <sect2>
+
<NOTE>
  <TITLE>A room using force move.</TITLE>
+
<PARA>After adding a room in a room you should note the room in the
 
+
description or put an 'outside_descr' on the room inside it.  In
  <PARA>Sometimes you will want to help players along
+
our example we have chosen to add the description into the room instead
their path.  This could be for a river that flows strongly enough to
+
of using the 'outside_descr'Also doors and locks work the same way as before you can even hide this exit.
force a players raft down stream or maybe for a room of quick sand that
+
</PARA></NOTE>
sucks the player into another room.  In these situations we need to use
 
the force move <ACRONYM>DIL</ACRONYM>, explained in the previous sectionHere we
 
have built two rooms linked only by a forced move.
 
</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</sect2>
  
portal_room
+
                  <sect2>
title "Green field room"
+
  <TITLE>A room using force move.</TITLE>
descr
+
 
"Like the other rooms on the station this one is large enough for
+
  <PARA>Sometimes you will want to help players along
dragons to comfortably fit inThe strange thing about this room though
+
their pathThis could be for a river that flows strongly enough to
is it is totally empty except for a green field right in the center.
+
force a players raft down stream or maybe for a room of quick sand that
there is a door that leads to another room to the north."
+
sucks the player into another room.  In these situations we need to use
 +
the force move <ACRONYM>DIL</ACRONYM>, explained in the previous section.  Here we
 +
have built two rooms linked only by a forced move.
 +
</PARA>
  
movement SECT_INSIDE
+
<INFORMALEXAMPLE><PROGRAMLISTING>
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"green field","field"}
+
portal_room
"The field looks to be a green fog shifting and churning as you watch.  
+
title "Green field room"
if you are nuts you could probably enter it."
+
descr
 +
"Like the other rooms on the station this one is large enough for
 +
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.  
 +
there is a door that leads to another room to the north."
  
north  to office descr
+
movement SECT_INSIDE
"You see what looks to be an office."
+
ALWAYS_LIGHT
keyword {"air lock door","air lock","door"}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
  
//A link to the portal is also here
+
extra {"green field","field"}
 +
"The field looks to be a green fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
  
end
+
north  to office descr
ship_port
+
"You see what looks to be an office."
names{"green field", "field"}
+
keyword {"air lock door","air lock","door"}
title "Green field"
+
key nokey
descr
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
"Green Mist swirls about you."
 
  
movement SECT_INSIDE
+
//A link to the portal is also here
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
in ship
+
end
 +
ship_port
 +
names{"green field", "field"}
 +
title "Green field"
 +
descr
 +
"Green Mist swirls about you."
  
dilcopy force_move@function(
+
movement SECT_INSIDE
//Time to activation
+
ALWAYS_LIGHT
4,
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
//room and act
 
"portal_room@dragonst!You feel your body dissolving for lack of a better
 
description.&amp;nYou appear on the deck of a ship.",
 
//True or False for randomizing or not
 
FALSE);
 
  
 +
in ship
  
end                                           
+
dilcopy force_move@function(
 +
//Time to activation
 +
4,
 +
//room and act
 +
"portal_room@dragonst!You feel your body dissolving for lack of a better
 +
description.&amp;nYou appear on the deck of a ship.",
 +
//True or False for randomizing or not
 +
FALSE);
  
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
end                                           
</sect2
 
  
                  <sect2>
 
  <TITLE>A death room</TITLE>
 
  
<PARA>As a final touch to my little example zone I want to create a
+
</PROGRAMLISTING></INFORMALEXAMPLE>
room that will kill a player instantly.  I will use the <ACRONYM>DIL</ACRONYM> function
+
</sect2
Death room and the room would simply look as follows.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
deathspace
+
                  <sect2>
title"Open space"
+
  <TITLE>A death room</TITLE>
descr
 
"You see the ship and the station far off in the distance and you are in Space!"
 
  
movement SECT_INSIDE
+
<PARA>As a final touch to my little example zone I want to create a
ALWAYS_LIGHT
+
room that will kill a player instantly.  I will use the <ACRONYM>DIL</ACRONYM> function
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
Death room and the room would simply look as follows.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy death_room@function (
+
deathspace
//how often is damage done 4 would be 1 second
+
title"Open space"
4,
+
descr
//damage
+
"You see the ship and the station far off in the distance and you are in Space!"
400,
 
//act for the damage.
 
"You realize to late that was the trash disposal transporter and you feel your lungs explode.");
 
  
end
+
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
</PROGRAMLISTING></INFORMALEXAMPLE>  
+
dilcopy death_room@function (
 +
//how often is damage done 4 would be 1 second
 +
4,
 +
//damage
 +
400,
 +
//act for the damage.
 +
"You realize to late that was the trash disposal transporter and you feel your lungs explode.");
  
</SECT2>
+
end
</sect1>
 
  
<sect1>
+
</PROGRAMLISTING></INFORMALEXAMPLE>  
<TITLE>Putting the rooms together</TITLE>
 
  
<PARA>Using all you have learned so far and putting it all together into
+
</SECT2>
one zone.  You end up with a very interesting space station with some
+
</sect1>
secret rooms and traps..  The full zone all together looks like
 
this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<sect1>
 +
<TITLE>Putting the rooms together</TITLE>
  
#include &lt;composed.h&gt;
+
<PARA>Using all you have learned so far and putting it all together into
%zone dragonst
+
one zone. You end up with a very interesting space station with some
lifespan 20
+
secret rooms and traps..  The full zone all together looks like
reset RESET_ANYHOW
+
this.</PARA>
creators {"whistler"}
 
  
notes
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"This is the dragon station I shortened it to dragonst for ease in
 
loading.  If you have  any questions email me at whistler@valhalla.com"
 
  
help
+
#include &lt;composed.h&gt;
"Not sure what could help you now.  You are stuck on one of the
+
%zone dragonst
weirdest space stations you have ever seen and you smell burning
+
lifespan 20
sulfur."
+
reset RESET_ANYHOW
 +
creators {"whistler"}
  
%rooms
+
notes
 +
"This is the dragon station I shortened it to dragonst for ease in
 +
loading.  If you have  any questions email me at whistler@valhalla.com"
  
chamber
+
help
title "The middle chamber of the station"
+
"Not sure what could help you nowYou are stuck on one of the
descr
+
weirdest space stations you have ever seen and you smell burning
"This chamber seems to have the entire station rotating around itIt is
+
sulfur."
unbelievably large the ceiling seems to be a good 200 meeters high and
 
the room is perfectly cubic. Small human size ornate chairs with dragon
 
designs scrawled on the arms and back are arranged in a triangle like
 
setting with one large chair at the front.  This must be where all
 
station meetings are held. large pictures cover the walls depicting
 
dragons in all kinds of situations.  large passages lead of to the west
 
and the east.."
 
  
extra {"chair","chairs"}
+
%rooms
"The chairs are made of some metal you don't recognize and every inch is covered
 
with some kind of dragon."
 
  
extra  {"dragon picture","picture"}
+
chamber
"Thousands of dragons dot the skies of this rather life like pictureIn the
+
title "The middle chamber of the station"
center you see something moveIt looks to be a little green dragon."
+
descr
 +
"This chamber seems to have the entire station rotating around it.  It is
 +
unbelievably large the ceiling seems to be a good 200 meeters high and
 +
the room is perfectly cubic. Small human size ornate chairs with dragon
 +
designs scrawled on the arms and back are arranged in a triangle like
 +
setting with one large chair at the frontThis must be where all
 +
station meetings are held. large pictures cover the walls depicting
 +
dragons in all kinds of situationslarge passages lead of to the west
 +
and the east.."
  
extra{"green dragon","dragon","green"}
+
extra {"chair","chairs"}
"An intellegence looking dragon is sitting perched on a large chair watching you."
+
"The chairs are made of some metal you don't recognize and every inch is covered
 +
with some kind of dragon."
  
movement SECT_INSIDE
+
extra  {"dragon picture","picture"}
ALWAYS_LIGHT
+
"Thousands of dragons dot the skies of this rather life like picture.  In the
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
center you see something move.  It looks to be a little green dragon."
  
 +
extra{"green dragon","dragon","green"}
 +
"An intellegence looking dragon is sitting perched on a large chair watching you."
  
west to disposal_room descr
+
movement SECT_INSIDE
"You see a small room.";
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
east to hallway descr
 
"You see what looks to be a hallway.";
 
  
end
+
west to disposal_room descr
 +
"You see a small room.";
  
hallway
+
east to hallway descr
title "Module tunnel"
+
"You see what looks to be a hallway.";
descr "The hallway is about 50 meters long and around 100 meters from
 
side to side and top to bottom.  The hallway seems to be dust free.  The
 
walls and the floors seem to be made out of the same sterile
 
metal-plastic that all space agencies uses.  There are large plate glass
 
windows that open up into space.  The hallway is filled with a dim light
 
that seems to come from everywhere yet no where all at once.  You notice
 
a glimmer of bright light coming from the windows.  To the east you see
 
an air lock and to the west the hallway opens up into a larger room."
 
  
extra {"windows","window"}
+
end
"Your eyes are drawn to a large ship lit up with running lights sitting
 
about 1 kilometer from the station."
 
  
extra{"floor","walls","wall"}
+
hallway
"Well what can be said it looks to be in perfect conditionwhat else would you want to know?"
+
title "Module tunnel"
 +
descr "The hallway is about 50 meters long and around 100 meters from
 +
side to side and top to bottom.  The hallway seems to be dust free.  The
 +
walls and the floors seem to be made out of the same sterile
 +
metal-plastic that all space agencies uses.  There are large plate glass
 +
windows that open up into space.  The hallway is filled with a dim light
 +
that seems to come from everywhere yet no where all at onceYou notice
 +
a glimmer of bright light coming from the windows.  To the east you see
 +
an air lock and to the west the hallway opens up into a larger room."
  
extra {"large ship" ,"ship"}
+
extra {"windows","window"}
"The ship looks really big and is shaped like a dragon.  The scales
+
"Your eyes are drawn to a large ship lit up with running lights sitting
sparkle and seem to be multiple colors."
+
about 1 kilometer from the station."
  
movement SECT_INSIDE
+
extra{"floor","walls","wall"}
ALWAYS_LIGHT
+
"Well what can be said it looks to be in perfect condition.  what else would you want to know?"
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
west to chamber descr
+
extra {"large ship" ,"ship"}
"The hallway opens up into a chamber.";
+
"The ship looks really big and is shaped like a dragon.  The scales
 +
sparkle and seem to be multiple colors."
  
east to office descr
+
movement SECT_INSIDE
"You see what looks to be an office."
+
ALWAYS_LIGHT
keyword {"air lock door","air lock","door"}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
open {EX_OPEN_CLOSE, EX_CLOSED};
 
  
end
+
west to chamber descr
 +
"The hallway opens up into a chamber.";
  
office
+
east to office descr
title "The station office"
+
"You see what looks to be an office."
descr
+
keyword {"air lock door","air lock","door"}
"Large paintings fill the walls of this part of the station.  The room
+
open {EX_OPEN_CLOSE, EX_CLOSED};
is as large as the other rooms big enough for Dragons to lounge while
 
still having a desk in one corner small enough for a humanoid.  The
 
floor along the north wall is lined with some kind of fabric and seems very soft to
 
walk on, it may be some kind of dragon lounge judging by how large an
 
area it covers.  There is a passage to the west."
 
  
movement SECT_INSIDE
+
end
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"paintings","painting"}
+
office
"The paintings are of many dragons and riders in all kinds of tasks from
+
title "The station office"
combat to look outAll the figures seem to be staring at a staff
+
descr
being held by a depiction of a wizard on the south wall."
+
"Large paintings fill the walls of this part of the station.  The room
 +
is as large as the other rooms big enough for Dragons to lounge while
 +
still having a desk in one corner small enough for a humanoidThe
 +
floor along the north wall is lined with some kind of fabric and seems very soft to
 +
walk on, it may be some kind of dragon lounge judging by how large an
 +
area it covers.  There is a passage to the west."
  
extra {"wizard","staff"}
+
movement SECT_INSIDE
"The wizard has his hand stretched out and it seems there is a place
+
ALWAYS_LIGHT
you can almost grab the staff. Maybe if you searched the staff you would
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
find it."
 
  
extra {"desk"}
+
extra {"paintings","painting"}
"Its a desk alright but there doesn't seem to be any drawers and it
+
"The paintings are of many dragons and riders in all kinds of tasks from
seems totally empty."
+
combat to look out.  All the figures seem to be staring at a staff
 +
being held by a depiction of a wizard on the south wall."
  
extra{"fabric"}
+
extra {"wizard","staff"}
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
+
"The wizard has his hand stretched out and it seems there is a place
 +
you can almost grab the staff. Maybe if you searched the staff you would
 +
find it."
  
west to hallway descr
+
extra {"desk"}
"You see what looks to be a hallway."
+
"Its a desk alright but there doesn't seem to be any drawers and it
keyword {"air lock door","air lock","door"}
+
seems totally empty."
open {EX_OPEN_CLOSE, EX_CLOSED};
 
  
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
+
extra{"fabric"}
south to portal_room descr
+
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
"You see what looks to be a portal room."
 
keyword {"air lock door","air lock","staff","door"}
 
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
 
  
end
+
west to hallway descr
 +
"You see what looks to be a hallway."
 +
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
  
portal_room
+
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
title "Green field room"
+
south to portal_room descr
descr
+
"You see what looks to be a portal room."
"Like the other rooms on the station this one is large enough for
+
keyword {"air lock door","air lock","staff","door"}
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a green field right in the center.
 
there is a door that leads to another room to the north."
 
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
 
extra {"green field","field"}
 
"The field looks to be a green fog shifting and churning as you watch.
 
if you are nuts you could probably enter it."
 
 
north  to office descr
 
"You see what looks to be an office."
 
keyword {"air lock door","air lock","door"}
 
 
key nokey
 
key nokey
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
+
 
//A link to the portal is also here from room_port
 
 
end
 
end
+
 
ship_port
+
portal_room
 +
title "Green field room"
 +
descr
 +
"Like the other rooms on the station this one is large enough for
 +
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.
 +
there is a door that leads to another room to the north."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
extra {"green field","field"}
 +
"The field looks to be a green fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
 +
 +
north  to office descr
 +
"You see what looks to be an office."
 +
keyword {"air lock door","air lock","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 +
 +
//A link to the portal is also here from room_port
 +
end
 +
 +
ship_port
 +
names{"green field", "field"}
 +
title "Green field"
 +
descr
 +
"Green Mist swirls about you."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
in ship
 +
 +
dilcopy force_move@function(
 +
//Time to activation
 +
4,
 +
//room and act
 +
"portal_room@dragonst!You feel your body dissolving for lack of a better
 +
description.&amp;nYou appear on the deck of a ship.",
 +
//True or False for randomizing or not
 +
FALSE);
 +
 +
 +
end                                           
 +
 
 +
room_port
 
names{"green field", "field"}
 
names{"green field", "field"}
 
title "Green field"
 
title "Green field"
 
descr
 
descr
 
"Green Mist swirls about you."
 
"Green Mist swirls about you."
 
 
movement SECT_INSIDE
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
 
in ship
+
in portal_room
+
 
 
dilcopy force_move@function(
 
dilcopy force_move@function(
 
//Time to activation
 
//Time to activation
 
4,
 
4,
 
//room and act
 
//room and act
"portal_room@dragonst!You feel your body dissolving for lack of a better
+
"ship@dragonst!You feel your body dissolving for lack of a better
 
description.&amp;nYou appear on the deck of a ship.",
 
description.&amp;nYou appear on the deck of a ship.",
 
//True or False for randomizing or not
 
//True or False for randomizing or not
 
FALSE);
 
FALSE);
 
 
end                                           
 
  
room_port
 
names{"green field", "field"}
 
title "Green field"
 
descr
 
"Green Mist swirls about you."
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
in portal_room
+
end
  
dilcopy force_move@function(
+
disposal_room
//Time to activation
+
title "Red field room"
4,
+
descr
//room and act
+
"Like the other rooms on the station this one is large enough for
"ship@dragonst!You feel your body dissolving for lack of a better
+
dragons to comfortably fit in.  The strange thing about this room though
description.&amp;nYou appear on the deck of a ship.",
+
is it is totally empty except for a red field right in the center.
//True or False for randomizing or not
+
there is a door that leads to another room to the east."
FALSE);
 
  
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
end
+
extra {"red field","field"}
 +
"The field looks to be a red fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
  
disposal_room
+
east to chamber descr
title "Red field room"
+
"You see the main chamber.";
descr
 
"Like the other rooms on the station this one is large enough for
 
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a red field right in the center.
 
there is a door that leads to another room to the east."
 
  
movement SECT_INSIDE
+
//A link to the portal is also here from dis_port
ALWAYS_LIGHT
+
end
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"red field","field"}
+
dis_port
"The field looks to be a red fog shifting and churning as you watch.
+
names {"red field","field"}
if you are nuts you could probably enter it."
+
title "Red field"
 +
descr
 +
"Red Mist swirls about you."
  
east to chamber descr
+
movement SECT_INSIDE
"You see the main chamber.";
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
dilcopy force_move@function(
 +
//how fast to force move in seconds
 +
4,
 +
//room to force move to and act
 +
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
 +
//true or false random move or not
 +
0);
 +
in disposal_room
  
//A link to the portal is also here from dis_port
+
end
end
 
  
dis_port
+
ship
names {"red field","field"}
+
title "War dragon"
title "Red field"
+
descr
descr
+
"Blue light softly glows from con duets that line the walls of this ship.
"Red Mist swirls about you."
+
The floors beside the east and west wall have what looks to be soft
 +
fabric covering.  The south wall has small controls that seem to be made
 +
for humanoids with two small chairs that look to be pilot seats.  view
 +
portals are about 50 meters up the side of the ship on the west and east
 +
wall and some kind of electronic screen covers the south wall.  The ship
 +
seems to be a one room ship but there is a green field by the north
 +
wall."
  
movement SECT_INSIDE
+
movement SECT_INSIDE
ALWAYS_LIGHT
+
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
dilcopy force_move@function(
 
//how fast to force move in seconds
 
4,
 
//room to force move to and act
 
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
 
//true or false random move or not
 
0);
 
in disposal_room
 
  
end
+
extra {"view port"}
 +
"Sorry your not 50 meters tall maybe it is made for a dragon?"
  
ship
+
extra {"view screen","screen"}
title "War dragon"
+
"It seems to be the pilots view screen but you can't seem to see a way
descr
+
to turn it on."
"Blue light softly glows from con duets that line the walls of this ship.
 
The floors beside the east and west wall have what looks to be soft
 
fabric covering.  The south wall has small controls that seem to be made
 
for humanoids with two small chairs that look to be pilot seats.  view
 
portals are about 50 meters up the side of the ship on the west and east
 
wall and some kind of electronic screen covers the south wall.  The ship
 
seems to be a one room ship but there is a green field by the north
 
wall."
 
  
movement SECT_INSIDE
+
extra {"controls","control"}
ALWAYS_LIGHT
+
"The controls are in some weird language and your afraid if you start
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
pushing buttons you might rocket in to the station or worse slam into
 +
a planet."
  
extra {"view port"}
+
extra {"soft fabric","fabric"}
"Sorry your not 50 meters tall maybe it is made for a dragon?"
+
"It looks to be a dragon lounge area."
  
extra {"view screen","screen"}
+
//A link to the portal is also here from ship_port
"It seems to be the pilots view screen but you can't seem to see a way
+
end
to turn it on."
 
  
extra {"controls","control"}
+
deathspace
"The controls are in some weird language and your afraid if you start
+
title"Open space"
pushing buttons you might rocket in to the station or worse slam into
+
descr
a planet."
+
"You see the ship and the station far off in the distance and you are in Space!"
  
extra {"soft fabric","fabric"}
+
movement SECT_INSIDE
"It looks to be a dragon lounge area."
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
//A link to the portal is also here from ship_port
+
dilcopy death_room@function (
end
+
//how often is damage done 4 would be 1 second
 +
4,
 +
//damage
 +
400,
 +
//act for the damage.
 +
"You realize to late that was the trash disposal transporter and you feel your lungs explode.");
  
deathspace
 
title"Open space"
 
descr
 
"You see the ship and the station far off in the distance and you are in Space!"
 
  
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
dilcopy death_room@function (
+
end
//how often is damage done 4 would be 1 second
 
4,
 
//damage
 
400,
 
//act for the damage.
 
"You realize to late that was the trash disposal transporter and you feel your lungs explode.");
 
  
  
  
end
 
  
 +
%end
  
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</sect1>
 +
<sect1 id="rmexer">
 +
<TITLE>Suggested room exercises</TITLE>
  
%end
+
<orderedlist>
 +
<LISTITEM>
 +
<PARA>Create a door between the Disposal room and the main chamber
 +
of the station.  Make the new door pick-proof and magic-proof.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Create another hallway to the south of the main chamber that leads
 +
to a ship attached by an airlock.  You will need a door before the
 +
hallway and before the ship so no one gets sucked out in space.  You
 +
will need two more rooms for this one for the hallway and one for the
 +
ship. </PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using the Dragon station zone as a guide create your own zone with
 +
eight  rooms.  Don't worry to much about descriptions and extras.  Link all
 +
eight of the rooms to each of the other rooms.  This means each room
 +
should have seven exits.  If you were to map this it would look like a
 +
cube marked with 'X' on the sides.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Make a 3 room cliff that uses the climb <ACRONYM>DIL</ACRONYM> function to climb from the bottom to top.
 +
</PARA>
 +
</LISTITEM>
 +
</orderedlist>
  
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</SECT1>
</sect1>
 
<sect1 id="rmexer">
 
<TITLE>Suggested room exercises</TITLE>
 
  
<orderedlist>
+
</chapter>
<LISTITEM>
 
<PARA>Create a door between the Disposal room and the main chamber
 
of the station.  Make the new door pick-proof and magic-proof.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Create another hallway to the south of the main chamber that leads
 
to a ship attached by an airlock.  You will need a door before the
 
hallway and before the ship so no one gets sucked out in space.  You
 
will need two more rooms for this one for the hallway and one for the
 
ship. </PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using the Dragon station zone as a guide create your own zone with
 
eight  rooms.  Don't worry to much about descriptions and extras.  Link all
 
eight of the rooms to each of the other rooms.  This means each room
 
should have seven exits.  If you were to map this it would look like a
 
cube marked with 'X' on the sides.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Make a 3 room cliff that uses the climb <ACRONYM>DIL</ACRONYM> function to climb from the bottom to top.
 
</PARA>
 
</LISTITEM>
 
</orderedlist>
 
  
 +
<chapter ID="ch-05"><?dbhtml filename="ch05.html">
 +
<TITLE>The NPC section</TITLE>
  
</SECT1>
+
<PARA>Now that you have rooms down it is time to start filling your area
 +
with some life.  The NPC is the Non-player Character or mobile.  These
 +
are the things players will hunt and interact with</PARA>
  
</chapter>
+
<PARA>In order to get started building NPCs you should first be aware
 +
of the NPC fields you can use.  The <xref linkend="npcfields"> shows a full listing
 +
of all the NPC fields and their types as defined in <xref linkend="ch-03">.</PARA>
  
<chapter ID="ch-05"><?dbhtml filename="ch05.html">
+
<TABLE frame=all id="npcfields">
<TITLE>The NPC section</TITLE>
+
<TITLE>NPC fields and types</TITLE>
 +
<TGROUP align=left cols=5 colsep=1>
 +
<COLSPEC COLNAME="c1" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c2" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c3" COLWIDTH=".5in">
 +
<COLSPEC COLNAME="c4" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c5" COLWIDTH="2in">
  
<PARA>Now that you have rooms down it is time to start filling your area
+
<THEAD>
with some life.  The NPC is the Non-player Character or mobile.  These
+
<ROW>
are the things players will hunt and interact with</PARA>
+
<ENTRY COLNAME="c1">Field</ENTRY>
 +
<ENTRY COLNAME="c2">Type</ENTRY>
  
<PARA>In order to get started building NPCs you should first be aware
+
<ENTRY COLNAME="c4">Field</ENTRY>
of the NPC fields you can use.  The <xref linkend="npcfields"> shows a full listing
+
<ENTRY COLNAME="c5">Type</ENTRY>
of all the NPC fields and their types as defined in <xref linkend="ch-03">.</PARA>
+
</ROW>
 +
</THEAD>
 +
<TBODY>
  
<TABLE frame=all id="npcfields">
+
<ROW>
<TITLE>NPC fields and types</TITLE>
+
<ENTRY COLNAME="c1">Symbolic name</ENTRY>
<TGROUP align=left cols=5 colsep=1>
+
<ENTRY COLNAME="c2">Symbol</ENTRY>
<COLSPEC COLNAME="c1" COLWIDTH="2in">
+
<ENTRY morerows=17 colname="c3"></ENTRY>
<COLSPEC COLNAME="c2" COLWIDTH="2in">
+
<ENTRY COLNAME="c4">level</ENTRY>
<COLSPEC COLNAME="c3" COLWIDTH=".5in">
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<COLSPEC COLNAME="c4" COLWIDTH="2in">
+
</ROW>
<COLSPEC COLNAME="c5" COLWIDTH="2in">
 
  
<THEAD>
+
<ROW>
<ROW>
+
<ENTRY COLNAME="c1">names</ENTRY>
<ENTRY COLNAME="c1">Field</ENTRY>
+
<ENTRY COLNAME="c2">Stringlist</ENTRY>
<ENTRY COLNAME="c2">Type</ENTRY>
 
  
<ENTRY COLNAME="c4">Field</ENTRY>
+
<ENTRY COLNAME="c4">height</ENTRY>
<ENTRY COLNAME="c5">Type</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
</ROW>
+
</ROW>
</THEAD>
 
<TBODY>
 
  
<ROW>
 
<ENTRY COLNAME="c1">Symbolic name</ENTRY>
 
<ENTRY COLNAME="c2">Symbol</ENTRY>
 
<ENTRY morerows=17 colname="c3"></ENTRY>
 
<ENTRY COLNAME="c4">level</ENTRY>
 
<ENTRY COLNAME="c5">Integer</ENTRY>
 
</ROW>
 
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">names</ENTRY>
+
<ENTRY COLNAME="c1">title</ENTRY>
<ENTRY COLNAME="c2">Stringlist</ENTRY>
+
<ENTRY COLNAME="c2">String</ENTRY>
  
<ENTRY COLNAME="c4">height</ENTRY>
+
<ENTRY COLNAME="c4">race</ENTRY>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
</ROW>
+
</ROW>
  
 +
<ROW>
 +
<ENTRY COLNAME="c1">descr</ENTRY>
 +
<ENTRY COLNAME="c2">String</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">attack</ENTRY>
<ENTRY COLNAME="c1">title</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">race</ENTRY>
 
<ENTRY COLNAME="c5">Integer</ENTRY>
 
</ROW>
 
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">descr</ENTRY>
+
<ENTRY COLNAME="c1">inside_descr</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
<ENTRY COLNAME="c2">String</ENTRY>
  
<ENTRY COLNAME="c4">attack</ENTRY>
+
<ENTRY COLNAME="c4">armour</ENTRY>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
</ROW>
+
</ROW>
  
 +
<ROW>
 +
<ENTRY COLNAME="c1">extra</ENTRY>
 +
<ENTRY COLNAME="c2">Structure</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">speed</ENTRY>
<ENTRY COLNAME="c1">inside_descr</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">armour</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">manipulate</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">position</ENTRY>
<ENTRY COLNAME="c1">extra</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Structure</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">speed</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">flags</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">default</ENTRY>
<ENTRY COLNAME="c1">manipulate</ENTRY>
+
<ENTRY COLNAME="c5"> Integer</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">position</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">weight</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">ability</ENTRY>
<ENTRY COLNAME="c1">flags</ENTRY>
+
<ENTRY COLNAME="c5">two Integers</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">default</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5"> Integer</ENTRY>
+
<ENTRY COLNAME="c1">capacity</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">weapon</ENTRY>
<ENTRY COLNAME="c1">weight</ENTRY>
+
<ENTRY COLNAME="c5">two Integers</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">ability</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">two Integers</ENTRY>
+
<ENTRY COLNAME="c1">dilbegin or dilcopy</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Function pointer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">spell</ENTRY>
<ENTRY COLNAME="c1">capacity</ENTRY>
+
<ENTRY COLNAME="c5">two Integers</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">weapon</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">two Integers</ENTRY>
+
<ENTRY COLNAME="c1">defensive</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">romflags</ENTRY>
<ENTRY COLNAME="c1">dilbegin or dilcopy</ENTRY>
+
<ENTRY COLNAME="c5"> Integer</ENTRY>
<ENTRY COLNAME="c2">Function pointer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">spell</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">two Integers</ENTRY>
+
<ENTRY COLNAME="c1">offensive</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">light</ENTRY>
<ENTRY COLNAME="c1">defensive</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">romflags</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5"> Integer</ENTRY>
+
<ENTRY COLNAME="c1">mana</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">alignment</ENTRY>
<ENTRY COLNAME="c1">offensive</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">light</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">hit</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">minv</ENTRY>
<ENTRY COLNAME="c1">mana</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">alignment</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">money</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">key</ENTRY>
<ENTRY COLNAME="c1">hit</ENTRY>
+
<ENTRY COLNAME="c5">String</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">minv</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c1">exp</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">open</ENTRY>
<ENTRY COLNAME="c1">money</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
  
<ENTRY COLNAME="c4">key</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">String</ENTRY>
+
<ENTRY COLNAME="c1">sex</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ROW>
+
<ENTRY COLNAME="c4">end tag</ENTRY>
<ENTRY COLNAME="c1">exp</ENTRY>
+
<ENTRY COLNAME="c5">Symbol</ENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<ENTRY COLNAME="c4">open</ENTRY>
+
<PARA>Many of the same fields you found in rooms, as you can see from
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<xref linkend="npcfields">, can also be found in NPCs.  The fields do
</ROW>
+
not always have exactly the same use when coding rooms, NPCs, and
 +
objects but they are normally set in the same manor.  It is very
 +
important that you read and understand the differences of each field as
 +
they pertains to rooms and or NPCs.</PARA>
  
<ROW>
+
<sect1 id="npcfielddescr">
<ENTRY COLNAME="c1">sex</ENTRY>
+
<TITLE>Description of NPC fields</TITLE>
<ENTRY COLNAME="c2">Integer</ENTRY>
 
  
<ENTRY COLNAME="c4">end tag</ENTRY>
+
<variablelist id="var-npcfields">
<ENTRY COLNAME="c5">Symbol</ENTRY>
+
<VARLISTENTRY>
</ROW>
+
;symbolic name
</TBODY></TGROUP></TABLE>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC symbol</primary>
 +
</indexterm>
  
<PARA>Many of the same fields you found in rooms, as you can see from
+
The rules of the symbols has been explained in <XREF LINKEND="ch-03">, if you didn't read them yet you may want to review.
<xref linkend="npcfields">, can also be found in NPCs. The fields do
+
The important thing to realize with the NPC symbol is it is always
not always have exactly the same use when coding rooms, NPCs, and
+
good practice to give the NPC a symbol that resembles the title so
objects but they are normally set in the same manor. It is very
+
that administrators and builders can use the
important that you read and understand the differences of each field as
+
<command>load</command> and the <command>wstat</command> to easily
they pertains to rooms and or NPCs.</PARA>
+
locate, examine, and load the NPC in question.
 +
</PARA></LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;title
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC title</primary>
 +
</indexterm>
 +
The NPC title is what is shown if the NPC is being attacked or talking.
 +
It is also what is shown if the NPC can be picked up.  there should be
 +
no punctuation in the NPC title because of how it is used in the <ACRONYM>VME</ACRONYM>
 +
server.  If you add punctuation or forget to capitalize something
 +
that the <ACRONYM>VMC</ACRONYM> thinks you should it will give you a warning when you
 +
compile.</PARA>
  
<sect1 id="npcfielddescr">
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>Description of NPC fields</TITLE>
 
  
<variablelist id="var-npcfields">
+
title "a small dog"
<VARLISTENTRY>
+
title "Hansen"
;symbolic name
+
title "a black dragon"
<DICTDEF>
+
title "Drako"
<PARA><indexterm>
+
title "an elephant"
<primary>NPC symbol</primary>
 
</indexterm>
 
  
The rules of the symbols has been explained in <XREF LINKEND="ch-03">, if you didn't read them yet you may want to review.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
The important thing to realize with the NPC symbol is it is always
 
good practice to give the NPC a symbol that resembles the title so
 
that administrators and builders can use the
 
<command>load</command> and the <command>wstat</command> to easily
 
locate, examine, and load the NPC in question.
 
</PARA></LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;title
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC title</primary>
 
</indexterm>
 
The NPC title is what is shown if the NPC is being attacked or talking.
 
It is also what is shown if the NPC can be picked up.  there should be
 
no punctuation in the NPC title because of how it is used in the <ACRONYM>VME</ACRONYM>
 
server.  If you add punctuation or forget to capitalize something
 
that the <ACRONYM>VMC</ACRONYM> thinks you should it will give you a warning when you
 
compile.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
title "a small dog"
+
</LISTITEM>
title "Hansen"
+
</VARLISTENTRY>
title "a black dragon"
+
<VARLISTENTRY>
title "Drako"
+
        <TERM>descr</term>
title "an elephant"
+
        <LISTITEM>
 +
<PARA><indexterm>
 +
<primary>NPC description</primary>
 +
</indexterm>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
The description field is what the player sees when walking into the room
 +
or when looking with no arguments. The description on a NPC will only
 +
show up when the NPC is in the standing position.  All other positions
 +
will show the title and the position they are in. </PARA>
  
  
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
<VARLISTENTRY>
 
        <TERM>descr</term>
 
        <LISTITEM>
 
<PARA><indexterm>
 
<primary>NPC description</primary>
 
</indexterm>
 
  
The description field is what the player sees when walking into the room
+
descr
or when looking with no arguments. The description on a NPC will only
+
"a small fluffy dog is chasing its tail here."
show up when the NPC is in the standing position.  All other positions
+
descr
will show the title and the position they are in. </PARA>
+
"Hansen is standing here sorting the mail."
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
descr
+
</LISTITEM>
"a small fluffy dog is chasing its tail here."
+
</VARLISTENTRY>
descr
+
<VARLISTENTRY>
"Hansen is standing here sorting the mail."
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
;names
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC names</primary>
 +
</indexterm>
  
 +
The NPC name field is much more important then the room name field.  It
 +
        is what is used when players are hunting and killing and even
 +
        for administrators who are trying to use their administrator commands on a
 +
        NPC.  The names should match the title and the descr fields and
 +
        have all normal combinations of each.</PARA>
  
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
<VARLISTENTRY>
 
  
;names
+
title "a baby black dragon"
<DICTDEF>
+
descr "a tiny baby black dragon is here playing."
<PARA><indexterm>
+
names {"tiny baby black dragon", "tiny black dragon",
<primary>NPC names</primary>
+
"baby black dragon", "black dragon", "tiny dragon",
</indexterm>
+
"baby dragon","dragon"}
  
The NPC name field is much more important then the room name field. It
+
title "Hansen"
        is what is used when players are hunting and killing and even
+
descr "Hansen the post man is standing here sorting mail."
        for administrators who are trying to use their administrator commands on a
+
names{"postman","hansen"}
        NPC.  The names should match the title and the descr fields and
 
        have all normal combinations of each.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
title "a baby black dragon"
 
descr "a tiny baby black dragon is here playing."
 
names {"tiny baby black dragon", "tiny black dragon",
 
"baby black dragon", "black dragon", "tiny dragon",
 
"baby dragon","dragon"}
 
  
title "Hansen"
+
<PARA>The idea of course is to make any combination that a player may
descr "Hansen the post man is standing here sorting mail."
+
type to try and act upon your NPC.  You would not want to describe and
names{"postman","hansen"}
+
title your NPC with an entirely different theme than you created its
 +
names with because a player would not know what it is called.</PARA></LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;inside_descr
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC inside_descr</primary>
 +
</indexterm></PARA>
  
 +
<PARA>The inside description is what a player sees if it is inside the
 +
NPC.  This could be used to show the player its stomach or if on a mount
 +
it could be used to show the back of the horse.</PARA>
  
<PARA>The idea of course is to make any combination that a player may
+
<INFORMALEXAMPLE><PROGRAMLISTING>
type to try and act upon your NPC.  You would not want to describe and
 
title your NPC with an entirely different theme than you created its
 
names with because a player would not know what it is called.</PARA></LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
inside_descr
;inside_descr
+
"The lining of this stomach looks indestructible. Looks like you are in
  <DICTDEF>
+
for a long digestion cycle."
<PARA><indexterm>
 
<primary>NPC inside_descr</primary>
 
</indexterm></PARA>
 
  
<PARA>The inside description is what a player sees if it is inside the
+
</PROGRAMLISTING></INFORMALEXAMPLE>
NPC.  This could be used to show the player its stomach or if on a mount
 
it could be used to show the back of the horse.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;extra
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC extra</primary>
 +
</indexterm></PARA>
  
inside_descr
+
<PARA>The extra's on the NPC can be used to do many things.  It can be
"The lining of this stomach looks indestructibleLooks like you are in
+
used to store information for <ACRONYM>DIL</ACRONYM> programs or it can be used to show a
for a long digestion cycle."
+
part of the NPC like the room extras show a part of the roomThere is
 +
also a special extra, the NPCs description when you look at it
 +
with the look &lt;NPC&gt; command.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Lets show the NPC description extra first.  If you use an extra
 +
with no names list it will become the NPCs description when you look at
 +
any of the names on the NPC.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
extra {}
</VARLISTENTRY>
+
"The green furry hamster seems to be glowing and it doesn't seem very
<VARLISTENTRY>
+
happy."
;extra
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC extra</primary>
 
</indexterm></PARA>
 
  
<PARA>The extra's on the NPC can be used to do many things.  It can be
+
</PROGRAMLISTING></INFORMALEXAMPLE>
used to store information for <ACRONYM>DIL</ACRONYM> programs or it can be used to show a
 
part of the NPC like the room extras show a part of the room.  There is
 
also a special extra, the NPCs description when you look at it
 
with the look &lt;NPC&gt; command.</PARA>
 
  
<PARA>Lets show the NPC description extra first.  If you use an extra
+
<PARA>You can also use extras to show parts of the NPC.</PARA>
with no names list it will become the NPCs description when you look at
+
<INFORMALEXAMPLE><PROGRAMLISTING>
any of the names on the NPC.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
extra {}
+
extra {"hamster head","head"}
"The green furry hamster seems to be glowing and it doesn't seem very
+
"This human like head is covered with a lot of green fur and it looks
happy."
+
really  upset."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>You can also use extras to show parts of the NPC.</PARA>
+
<PARA>You can also use the extras to give more detailed and vivid
<INFORMALEXAMPLE><PROGRAMLISTING>
+
descriptions when the NPC is acted upon.</PARA>
  
extra {"hamster head","head"}
+
<TABLE frame=all>
"This human like head is covered with a lot of green fur and it looks
+
<TITLE>NPC special action extras</TITLE>
really  upset."
+
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Extra</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ROW>
 +
<ENTRY>$get_s</ENTRY>
 +
<ENTRY>A message shown to activator when getting a NPC.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$get_o</ENTRY>
 +
<ENTRY>A message shown to others when getting a NPC.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$drop_s</ENTRY>
 +
<ENTRY>a message shown to activator when dropping a NPC.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$drop_o</ENTRY>
 +
<ENTRY>A message shown to others when dropping an NPC.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$enter_s</ENTRY>
 +
<ENTRY>A message shown to activator When mounting</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$enter_o</ENTRY>
 +
<ENTRY>A message shown to others when mounting.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$exit_s</ENTRY>
 +
<ENTRY>A message shown to others when dismounting</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$exit_o</ENTRY>
 +
<ENTRY>a message shown to others when dismounting</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<PARA>You can also use the extras to give more detailed and vivid
+
<PARA> In the following example, $1n is the activator and $2n is the
descriptions when the NPC is acted upon.</PARA>
+
unit in question.  Assume you are defining a familiar.</PARA>
  
<TABLE frame=all>
 
<TITLE>NPC special action extras</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Extra</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
  
<ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>$get_s</ENTRY>
 
<ENTRY>A message shown to activator when getting a NPC.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$get_o</ENTRY>
 
<ENTRY>A message shown to others when getting a NPC.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$drop_s</ENTRY>
 
<ENTRY>a message shown to activator when dropping a NPC.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$drop_o</ENTRY>
 
<ENTRY>A message shown to others when dropping an NPC.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$enter_s</ENTRY>
 
<ENTRY>A message shown to activator When mounting</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$enter_o</ENTRY>
 
<ENTRY>A message shown to others when mounting.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$exit_s</ENTRY>
 
<ENTRY>A message shown to others when dismounting</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$exit_o</ENTRY>
 
<ENTRY>a message shown to others when dismounting</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA> In the following example, $1n is the activator and $2n is the
+
extra {"$get_s"}
unit in question.  Assume you are defining a familiar.</PARA>
+
"You pick up the $2n it is very warm and cuddles right up to you."
  
 +
extra {"$get_o"}
 +
"$1n picks up the $2n and you see them cuddle together."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
extra {"$get_s"}
+
<PARA>Finally you can use extras to store information for <ACRONYM>DIL</ACRONYM> programs.
"You pick up the $2n it is very warm and cuddles right up to you."
+
We will not cover this because it is a topic covered in-depth in
 +
the <ACRONYM>DIL</ACRONYM> documentation.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
extra {"$get_o"}
+
<VARLISTENTRY>
"$1n picks up the $2n and you see them cuddle together."
+
;manipulate
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC manipulate</primary>
 +
</indexterm></PARA>
 +
<PARA>The manipulate filed only has two values for NPCs The two values
 +
are 'MANIPULATE_TAKE' and 'MANIPULATE_ENTER'.  The 'MANIPULATE_TAKE'
 +
makes it possible for a NPC to be picked up this would be good for
 +
something like a familiar.  The 'MANIPULATE_ENTER' is used for things
 +
like mounts when making a mount you will also have to set the capacity
 +
so a fat player can jump on.  The following is how you set the
 +
manipulate flag.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//Make a  NPC takable.
 +
manipulate {MANIPULATE_TAKE}
  
<PARA>Finally you can use extras to store information for <ACRONYM>DIL</ACRONYM> programs.
+
//Make a NPC takable and able to be entered
We will not cover this because it is a topic covered in-depth in
+
manipulate {MANIPULATE_TAKE|MANIPULATE_ENTER}
the <ACRONYM>DIL</ACRONYM> documentation.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;manipulate
+
</LISTITEM>
<DICTDEF>
+
</VARLISTENTRY>
<PARA><indexterm>
 
<primary>NPC manipulate</primary>
 
</indexterm></PARA>
 
<PARA>The manipulate filed only has two values for NPCs The two values
 
are 'MANIPULATE_TAKE' and 'MANIPULATE_ENTER'.  The 'MANIPULATE_TAKE'
 
makes it possible for a NPC to be picked up this would be good for
 
something like a familiar.  The 'MANIPULATE_ENTER' is used for things
 
like mounts when making a mount you will also have to set the capacity
 
so a fat player can jump on.  The following is how you set the
 
manipulate flag.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//Make a  NPC takable.
 
manipulate {MANIPULATE_TAKE}
 
  
//Make a NPC takable and able to be entered
+
<VARLISTENTRY>
manipulate {MANIPULATE_TAKE|MANIPULATE_ENTER}
+
;flags
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC flags</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This field on a NPC is used to set special attributes in order to make
</LISTITEM>
+
the NPC able to be buried or not or no-teleportable and many others.  The NPC
</VARLISTENTRY>
+
flag list uses the UNIT_FL_* variables that both the objects and the
 +
rooms also use, therefore while you can set some flags on an NPC it may
 +
not have any affect unless you as a builder or administrator adds the
 +
functionality.  You can also add extras on an NPC that can be used as a
 +
special flag which you will learn as you learn to use <ACRONYM>DIL</ACRONYM>.  The
 +
following is a full list of all unit flags and how they affect NPC, if
 +
they do.
 +
        <TABLE frame=all id="unitflagsnpc">
 +
<TITLE>NPC unit flag affects</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
 +
<ROW> <ENTRY>UNIT_FL_PRIVATE</ENTRY>
 +
<ENTRY>
 +
Currently has no affect on a NPC.
 +
</ENTRY> </ROW> <ROW>
 +
<ENTRY>UNIT_FL_INVISIBLE</ENTRY> <ENTRY>Makes unit invisible</ENTRY>
 +
</ROW> <ROW> <ENTRY>UNIT_FL_NO_BURY</ENTRY>
 +
<ENTRY>Makes it so you can create NPC that can be taken like familiars or
 +
pets that can not be buried.  This flag is not needed on every NPC
 +
because the bury command will not allow you to bury an NPC outside of
 +
your inventory.
 +
</ENTRY> </ROW> <ROW>
 +
<ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes unit buried when loaded</ENTRY>
 +
</ROW> <ROW> <ENTRY>UNIT_FL_NO_TELEPORT</ENTRY>
 +
<ENTRY>
 +
Makes it so you can not summon the NPC with this flag and the NPC with
 +
this flag can not teleport.  You can still teleport to NPC with this
 +
flag the current way teleport is written.  Remember all spells are in
 +
<ACRONYM>DIL</ACRONYM> and you can modify them in ''spells.zon'' </ENTRY>
 +
</ROW> <ROW> <ENTRY>UNIT_FL_NO_MOB</ENTRY>
 +
<ENTRY>
 +
Currently has no affect on a NPC.
 +
</ENTRY> </ROW>
 +
<ROW> <ENTRY>UNIT_FL_NO_WEATHER</ENTRY>
 +
<ENTRY>
 +
Currently has no affect on a NPC.
 +
</ENTRY> </ROW> <ROW>
 +
<ENTRY>UNIT_FL_INDOORS</ENTRY>
 +
<ENTRY>
 +
Currently has no affect on NPC.
 +
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_TRANS</ENTRY>
 +
<ENTRY>Makes unit transparent If the Unit is transparent you will be able
 +
to see any other NPCs that it is carrying.  For example if a NPC was
 +
carrying a familiar you would see that as you walked into the room.  It
 +
also is used in mounts so the PC can see outside its mount.  If the
 +
flag is not set on its mount the player will not see what is in the
 +
room. </ENTRY>
 +
</ROW> <ROW> <ENTRY>UNIT_FL_NO_SAVE</ENTRY>
 +
<ENTRY>Makes it so a PC can't save with unit</ENTRY> </ROW>
 +
<ROW> <ENTRY>UNIT_FL_SACRED</ENTRY>
 +
<ENTRY>
 +
Currently has no affect on a NPC.
 +
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_MAGIC</ENTRY>
 +
<ENTRY>
 +
Currently has no affect on a NPC.
 +
</ENTRY> </ROW> </TBODY></TGROUP></TABLE>
 +
</PARA>
  
<VARLISTENTRY>
+
<PARA>If you wanted to make a NPC that a player can carry around but can
;flags
+
not save you would set the manipulate and flags as follows.</PARA>
<DICTDEF>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<PARA><indexterm>
 
<primary>NPC flags</primary>
 
</indexterm></PARA>
 
  
<PARA>This field on a NPC is used to set special attributes in order to make
+
manipulate {MANIPULATE_TAKE}
the NPC able to be buried or not or no-teleportable and many others.  The NPC
+
flags {UNIT_FL_NO_SAVE}
flag list uses the UNIT_FL_* variables that both the objects and the
 
rooms also use, therefore while you can set some flags on an NPC it may
 
not have any affect unless you as a builder or administrator adds the
 
functionality.  You can also add extras on an NPC that can be used as a
 
special flag which you will learn as you learn to use <ACRONYM>DIL</ACRONYM>.  The
 
following is a full list of all unit flags and how they affect NPC, if
 
they do.
 
        <TABLE frame=all id="unitflagsnpc">
 
<TITLE>NPC unit flag affects</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
  
<ROW> <ENTRY>UNIT_FL_PRIVATE</ENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY>
+
</LISTITEM>
Currently has no affect on a NPC.
+
</VARLISTENTRY>
</ENTRY> </ROW> <ROW>
 
<ENTRY>UNIT_FL_INVISIBLE</ENTRY> <ENTRY>Makes unit invisible</ENTRY>
 
</ROW> <ROW> <ENTRY>UNIT_FL_NO_BURY</ENTRY>
 
<ENTRY>Makes it so you can create NPC that can be taken like familiars or
 
pets that can not be buried.  This flag is not needed on every NPC
 
because the bury command will not allow you to bury an NPC outside of
 
your inventory.
 
</ENTRY> </ROW> <ROW>
 
<ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes unit buried when loaded</ENTRY>
 
</ROW> <ROW> <ENTRY>UNIT_FL_NO_TELEPORT</ENTRY>
 
<ENTRY>
 
Makes it so you can not summon the NPC with this flag and the NPC with
 
this flag can not teleport.  You can still teleport to NPC with this
 
flag the current way teleport is written.  Remember all spells are in
 
<ACRONYM>DIL</ACRONYM> and you can modify them in ''spells.zon'' </ENTRY>
 
</ROW> <ROW> <ENTRY>UNIT_FL_NO_MOB</ENTRY>
 
<ENTRY>
 
Currently has no affect on a NPC.
 
</ENTRY> </ROW>
 
<ROW> <ENTRY>UNIT_FL_NO_WEATHER</ENTRY>
 
<ENTRY>
 
Currently has no affect on a NPC.
 
</ENTRY> </ROW> <ROW>
 
<ENTRY>UNIT_FL_INDOORS</ENTRY>
 
<ENTRY>
 
Currently has no affect on NPC.
 
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_TRANS</ENTRY>
 
<ENTRY>Makes unit transparent If the Unit is transparent you will be able
 
to see any other NPCs that it is carrying.  For example if a NPC was
 
carrying a familiar you would see that as you walked into the room.  It
 
also is used in mounts so the PC can see outside its mount.  If the
 
flag is not set on its mount the player will not see what is in the
 
room. </ENTRY>
 
</ROW> <ROW> <ENTRY>UNIT_FL_NO_SAVE</ENTRY>
 
<ENTRY>Makes it so a PC can't save with unit</ENTRY> </ROW>
 
<ROW> <ENTRY>UNIT_FL_SACRED</ENTRY>
 
<ENTRY>
 
Currently has no affect on a NPC.
 
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_MAGIC</ENTRY>
 
<ENTRY>
 
Currently has no affect on a NPC.
 
</ENTRY> </ROW> </TBODY></TGROUP></TABLE>
 
</PARA>
 
  
<PARA>If you wanted to make a NPC that a player can carry around but can
+
<VARLISTENTRY>
not save you would set the manipulate and flags as follows.</PARA>
+
;romflags
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC romflags</primary>
 +
</indexterm></PARA>
  
manipulate {MANIPULATE_TAKE}
+
<PARA>Like flags these are just integer values that are used to change
flags {UNIT_FL_NO_SAVE}
+
how the NPC interacts with its environment.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
        <TABLE frame=all id="romflagsnpc">
</LISTITEM>
+
<TITLE>Room flags for NPCs</TITLE>
</VARLISTENTRY>
+
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Flag</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
<VARLISTENTRY>
+
<ROW>
;romflags
+
<ENTRY>CHAR_PROTECTED</ENTRY>
<DICTDEF>
+
<ENTRY>
<PARA><indexterm>
+
Set this flag if the character is protected by the law-system.
<primary>NPC romflags</primary>
+
</ENTRY>
</indexterm></PARA>
+
</ROW> <ROW>
 +
<ENTRY>CHAR_LEGAL_TARGET</ENTRY>
 +
<ENTRY>
 +
This flag is used by the law system and should not be set unless you are re-writing your law system.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_OUTLAW</ENTRY>
 +
<ENTRY>
 +
This flag is used by the law system and should not be set unless you are re-writing your law system.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_GROUP</ENTRY>
 +
<ENTRY>
 +
This is used by the follow and group commands and should not be set unless you are re-writing your, movement, status, and combat systems.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_BLIND</ENTRY>
 +
<ENTRY>
 +
Set this if the character is blinded.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_HIDE</ENTRY>
 +
<ENTRY>
 +
Set flag if character is hidden.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_MUTE</ENTRY>
 +
<ENTRY>
 +
Set flag if character is mute.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_SNEAK</ENTRY>
 +
<ENTRY>
 +
Set flag if character is in sneaking mode.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_ALIGN</ENTRY>
 +
<ENTRY>
 +
No actual effect on NPCs.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_INVISIBLE</ENTRY>
 +
<ENTRY>
 +
Set flag if character can see invisible units.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_MAGIC</ENTRY>
 +
<ENTRY>
 +
No actual effect on NPCs.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_POISON</ENTRY>
 +
<ENTRY>
 +
No actual effect on NPCs.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_UNDEAD</ENTRY>
 +
<ENTRY>
 +
No actual effect on NPCs.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_CURSE</ENTRY>
 +
<ENTRY>
 +
No actual effect on NPCs.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_DETECT_LIFE</ENTRY>
 +
<ENTRY>
 +
No actual effect on NPCs.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_WIMPY</ENTRY>
 +
<ENTRY>
 +
Set flag if character if wimpy. Wimpy characters flee when they are
 +
low on hit points, and they gain less experience when killing others.
 +
If a character is both wimpy and aggressive (NPC_AGGRESSIVE) it will
 +
only attack sleeping players.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>CHAR_SELF_DEFENCE</ENTRY>
 +
<ENTRY>
 +
This is an internal combat flag set this only if you create your own combat system.
 +
</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<PARA>Like flags these are just integer values that are used to change
+
<PARA>These flags are set in the same way as other flags in rooms NPCs
how the NPC interacts with its environment.</PARA>
+
and objects.  The following are a few examples.
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
        <TABLE frame=all id="romflagsnpc">
+
//wimpy and hidden
<TITLE>Room flags for NPCs</TITLE>
+
romflags {CHAR_HIDDEN, CHAR_WIMPY}
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Flag</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
  
<ROW>
+
//NPC can see invisible
<ENTRY>CHAR_PROTECTED</ENTRY>
+
romflags {CHAR_DETECT_INVISIBLE}
<ENTRY>
 
Set this flag if the character is protected by the law-system.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_LEGAL_TARGET</ENTRY>
 
<ENTRY>
 
This flag is used by the law system and should not be set unless you are re-writing your law system.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_OUTLAW</ENTRY>
 
<ENTRY>
 
This flag is used by the law system and should not be set unless you are re-writing your law system.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_GROUP</ENTRY>
 
<ENTRY>
 
This is used by the follow and group commands and should not be set unless you are re-writing your, movement, status, and combat systems.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_BLIND</ENTRY>
 
<ENTRY>
 
Set this if the character is blinded.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_HIDE</ENTRY>
 
<ENTRY>
 
Set flag if character is hidden.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_MUTE</ENTRY>
 
<ENTRY>
 
Set flag if character is mute.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_SNEAK</ENTRY>
 
<ENTRY>
 
Set flag if character is in sneaking mode.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_ALIGN</ENTRY>
 
<ENTRY>
 
No actual effect on NPCs.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_INVISIBLE</ENTRY>
 
<ENTRY>
 
Set flag if character can see invisible units.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_MAGIC</ENTRY>
 
<ENTRY>
 
No actual effect on NPCs.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_POISON</ENTRY>
 
<ENTRY>
 
No actual effect on NPCs.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_UNDEAD</ENTRY>
 
<ENTRY>
 
No actual effect on NPCs.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_CURSE</ENTRY>
 
<ENTRY>
 
No actual effect on NPCs.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_DETECT_LIFE</ENTRY>
 
<ENTRY>
 
No actual effect on NPCs.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_WIMPY</ENTRY>
 
<ENTRY>
 
Set flag if character if wimpy. Wimpy characters flee when they are
 
low on hit points, and they gain less experience when killing others.
 
If a character is both wimpy and aggressive (NPC_AGGRESSIVE) it will
 
only attack sleeping players.
 
</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>CHAR_SELF_DEFENCE</ENTRY>
 
<ENTRY>
 
This is an internal combat flag set this only if you create your own combat system.
 
</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>These flags are set in the same way as other flags in rooms NPCs
+
</PROGRAMLISTING></INFORMALEXAMPLE></PARA>
and objects.  The following are a few examples.
+
</LISTITEM>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</VARLISTENTRY>
  
//wimpy and hidden
+
<VARLISTENTRY>
romflags {CHAR_HIDDEN, CHAR_WIMPY}
+
;weight
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC weight</primary>
 +
</indexterm></PARA>
  
//NPC can see invisible
+
<PARA>The weight is the weight of the NPC in pounds.  In the future we
romflags {CHAR_DETECT_INVISIBLE}
+
may adjust this to allow you to make things lighter for example you
 +
could set it in ounces or grams.  Right now however all we have is
 +
pounds so we have some pretty heavy feathers out there.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE></PARA>
+
<PARA>To use this you just enter the 'weight' keyword and then the
</LISTITEM>
+
value.</PARA>
</VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
/80 lbs.
;weight
+
weight 80
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC weight</primary>
 
</indexterm></PARA>
 
  
<PARA>The weight is the weight of the NPC in pounds.  In the future we
+
</PROGRAMLISTING></INFORMALEXAMPLE>
may adjust this to allow you to make things lighter for example you
 
could set it in ounces or grams.  Right now however all we have is
 
pounds so we have some pretty heavy feathers out there.</PARA>
 
  
<PARA>To use this you just enter the 'weight' keyword and then the
+
<NOTE><PARA>The weight affects the NPCs natural attack damage.</PARA>
value.</PARA>
+
</NOTE>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
/80 lbs.
+
<VARLISTENTRY>
weight 80
+
;capacity
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC capacity</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This field along with the NPCs strength and dexterity decides how
 +
much a NPC can carry.  If you set the capacity to 300 lbs.  the NPC will
 +
only be able to carry that much depending if it has the strength and
 +
dexterity to carry that much.  This of course doesn't affect <ACRONYM>DIL</ACRONYM> programs
 +
that link the objects directly into the NPC.  To set the capacity you
 +
just put the keyword and the amount in your NPC.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<NOTE><PARA>The weight affects the NPCs natural attack damage.</PARA>
+
capacity  300
</NOTE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;capacity
+
</LISTITEM>
<DICTDEF>
+
</VARLISTENTRY>
<PARA><indexterm>
 
<primary>NPC capacity</primary>
 
</indexterm></PARA>
 
  
<PARA>This field along with the NPCs strength and dexterity decides how
+
<VARLISTENTRY>
much a NPC can carry.  If you set the capacity to 300 lbs.  the NPC will
+
;height
only be able to carry that much depending if it has the strength and
+
<DICTDEF>
dexterity to carry that much.  This of course doesn't affect <ACRONYM>DIL</ACRONYM> programs
+
<PARA><indexterm>
that link the objects directly into the NPC.  To set the capacity you
+
<primary>NPC height</primary>
just put the keyword and the amount in your NPC.</PARA>
+
</indexterm></PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
capacity 300
+
<PARA>The height field is the size of the NPC in centimeters. This determines
 +
the size of the equipment the NPC is wearing.  You will learn more about
 +
size and height in the object section but for now just understand this
 +
makes your NPC the right or wrong size.  To set the 'height' you just
 +
put the 'height' keyword followed by the number of centimeters.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
 
;height
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC height</primary>
 
</indexterm></PARA>
 
  
<PARA>The height field is the size of the NPC in centimeters.  This determines
+
//6 feet tall since 1 inch equals 2.54
the size of the equipment the NPC is wearing.  You will learn more about
+
height 183
size and height in the object section but for now just understand this
 
makes your NPC the right or wrong size. To set the 'height' you just
 
put the 'height' keyword followed by the number of centimeters.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
  
//6 feet tall since 1 inch equals 2.54
 
height 183
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
</LISTITEM>
+
;dilbegin or dilcopy
</VARLISTENTRY>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC dilbegin or dilcopy</primary>
 +
</indexterm></PARA>
  
 +
<PARA>The <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds.
 +
We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach
 +
you how to create your own functions that will make your rooms, NPC, and
 +
objects more than special.</PARA>
  
 +
<PARA>There are several NPC functions that come standard with the <ACRONYM>VME</ACRONYM>
 +
2.0.  The following is a list of the functions.</PARA>
  
<VARLISTENTRY>
+
<itemizedlist>
;dilbegin or dilcopy
+
<LISTITEM><PARA>Mercenary</PARA></LISTITEM>
<DICTDEF>
+
<LISTITEM><PARA>obey</PARA></LISTITEM>
<PARA><indexterm>
+
<LISTITEM><PARA>evaluate</PARA></LISTITEM>
<primary>NPC dilbegin or dilcopy</primary>
+
<LISTITEM><PARA>guard direction</PARA></LISTITEM>
</indexterm></PARA>
+
<LISTITEM><PARA>shop keeper</PARA></LISTITEM>
 +
<LISTITEM><PARA>combat magic</PARA></LISTITEM>
 +
<LISTITEM><PARA>fido</PARA></LISTITEM>
 +
<LISTITEM><PARA>zone wander</PARA></LISTITEM>
 +
<LISTITEM><PARA>global wander</PARA></LISTITEM>
 +
<LISTITEM><PARA>team work</PARA></LISTITEM>
 +
<LISTITEM><PARA>rescue</PARA></LISTITEM>
 +
<LISTITEM><PARA>agressive</PARA></LISTITEM>
 +
</itemizedlist>
  
<PARA>The <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds.
+
<PARA>These are the only NPC functions currently documented in the <ACRONYM>VME</ACRONYM>
We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach
+
2.0 release but if you go through the zones that are released with the
you how to create your own functions that will make your rooms, NPC, and
+
<ACRONYM>VME</ACRONYM> you are sure to find many more.  Hopefully with the descriptions in
objects more than special.</PARA>
+
<XREF LINKEND="npcdilfunc">. You will be able to use the functions
 +
listed here and figure out ones that are not.</PARA>
  
<PARA>There are several NPC functions that come standard with the <ACRONYM>VME</ACRONYM>
+
<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the
2.0.  The following is a list of the functions.</PARA>
+
Valhalla mud all you have to do is use the dilcopy keyword in the
 +
NPC with the function name you want to use and the arguments that
 +
function require.  The following is what you would find in the
 +
''function.zon'' for evaluate.</PARA>
  
<itemizedlist>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<LISTITEM><PARA>Mercenary</PARA></LISTITEM>
 
<LISTITEM><PARA>obey</PARA></LISTITEM>
 
<LISTITEM><PARA>evaluate</PARA></LISTITEM>
 
<LISTITEM><PARA>guard direction</PARA></LISTITEM>
 
<LISTITEM><PARA>shop keeper</PARA></LISTITEM>
 
<LISTITEM><PARA>combat magic</PARA></LISTITEM>
 
<LISTITEM><PARA>fido</PARA></LISTITEM>
 
<LISTITEM><PARA>zone wander</PARA></LISTITEM>
 
<LISTITEM><PARA>global wander</PARA></LISTITEM>
 
<LISTITEM><PARA>team work</PARA></LISTITEM>
 
<LISTITEM><PARA>rescue</PARA></LISTITEM>
 
<LISTITEM><PARA>agressive</PARA></LISTITEM>
 
</itemizedlist>
 
  
<PARA>These are the only NPC functions currently documented in the <ACRONYM>VME</ACRONYM>
+
/* Evaluate <ACRONYM>DIL</ACRONYM>. amt is the cost of evaluation in iron pieces.
2.0 release but if you go through the zones that are released with the
+
  Note: not to be confused with <function>evaluate@commands</function>, which
<ACRONYM>VME</ACRONYM> you are sure to find many more.  Hopefully with the descriptions in
+
  is a command.
<XREF LINKEND="npcdilfunc">. You will be able to use the functions
+
*/
listed here and figure out ones that are not.</PARA>
+
dilbegin aware evaluate (amt: integer);
  
<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the
+
var u1 : unitptr;
Valhalla mud all you have to do is use the dilcopy keyword in the
+
    arg: string;
NPC with the function name you want to use and the arguments that
+
    buf: string;
function require.  The following is what you would find in the
+
    cur: integer;
''function.zon'' for evaluate.</PARA>
+
    craft: integer;
 +
    category: integer;
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
    pc : unitptr;
 +
    pcn: string;
  
/* Evaluate <ACRONYM>DIL</ACRONYM>. amt is the cost of evaluation in iron pieces.
+
    arm_text  : stringlist;
  Note: not to be confused with <function>evaluate@commands</function>, which
+
    shi_text  : stringlist;
  is a command.
+
    craft_text: stringlist;
*/
+
code
dilbegin aware evaluate (amt: integer);
+
{
  
var u1 : unitptr;
+
craft_text:=  {"horrible","very bad","bad","worse than average","average",
    arg: string;
+
  "a little better than average","better than average","good","very good",
    buf: string;
+
  "supreme"};
    cur: integer;
+
arm_text:= {"clothes", "leather", "hard leather", "chain", "plate"};
    craft: integer;
+
shi_text:= {"small", "medium", "large"};
    category: integer;
 
  
    pc : unitptr;
+
heartbeat:= PULSE_SEC*3;
    pcn: string;
 
  
    arm_text  : stringlist;
+
:start:
    shi_text  : stringlist;
+
arg:= "";
    craft_text: stringlist;
+
u1:= null;
code
 
{
 
  
craft_text:=  {"horrible","very bad","bad","worse than average","average",
+
wait (SFB_CMD, command("evaluate"));
  "a little better than average","better than average","good","very good",
 
  "supreme"};
 
arm_text:= {"clothes", "leather", "hard leather", "chain", "plate"};
 
shi_text:= {"small", "medium", "large"};
 
  
heartbeat:= PULSE_SEC*3;
+
if (visible(pc, self) == FALSE)
 +
    goto start; // Pc is just trying to evaluate using the command
  
:start:
+
block;
arg:= "";
 
u1:= null;
 
  
wait (SFB_CMD, command("evaluate"));
+
pc:= activator;
 +
if (pc.type == UNIT_ST_PC) pcn := pc.name;
 +
else pcn := pc.title;
  
if (visible(pc, self) == FALSE)
+
arg:= argument;
    goto start; // Pc is just trying to evaluate using the command
 
  
block;
+
if (visible(self, pc) == FALSE)
 +
    {
 +
    exec ("say I don't do business with people I can't see.", self);
 +
    goto start;
 +
    }
  
pc:= activator;
+
if (arg == "")
if (pc.type == UNIT_ST_PC) pcn := pc.name;
+
    {
else pcn := pc.title;
+
    exec ("say Which item do you wish to evaluate, "+pcn+"?", self);
 +
    goto start;
 +
    }
  
arg:= argument;
+
u1:= findunit (pc, arg, FIND_UNIT_IN_ME, null);
  
if (visible(self, pc) == FALSE)
+
if (not u1)
    {
+
    {
    exec ("say I don't do business with people I can't see.", self);
+
    exec ("say You do not have such an item, "+pcn+".", self);
    goto start;
+
    goto start;
    }
+
    }
  
if (arg == "")
+
if ((u1.type != UNIT_ST_OBJ) or ( (u1.objecttype != ITEM_WEAPON) and
    {
+
    (u1.objecttype != ITEM_ARMOR) and (u1.objecttype != ITEM_SHIELD) ))
    exec ("say Which item do you wish to evaluate, "+pcn+"?", self);
+
    {
    goto start;
+
    exec ("say The "+u1.name+" is neither a sword, shield nor armor!", self);
    }
+
    goto start;
 +
    }
  
u1:= findunit (pc, arg, FIND_UNIT_IN_ME, null);
+
// Currency, skip for now
  
if (not u1)
+
if (not transfermoney (pc, null, amt * IRON_MULT))
    {
+
    {
    exec ("say You do not have such an item, "+pcn+".", self);
+
    exec ("say The cost is merely "+moneystring(amt*IRON_MULT, TRUE)+
    goto start;
+
        ", get them first.", self);
    }
+
    goto start;
 +
    }
  
if ((u1.type != UNIT_ST_OBJ) or ( (u1.objecttype != ITEM_WEAPON) and
+
category:= u1.value[0];
    (u1.objecttype != ITEM_ARMOR) and (u1.objecttype != ITEM_SHIELD) ))
+
craft:= u1.value[1] / 5 + 4; // / 5 + 4 is to get corresponding craft_text val
    {
 
    exec ("say The "+u1.name+" is neither a sword, shield nor armor!", self);
 
    goto start;
 
    }
 
  
// Currency, skip for now
+
if (craft < 0) craft := 0;  if (craft > 9) craft := 9;
  
if (not transfermoney (pc, null, amt * IRON_MULT))
+
// Change the following to use skill_text(craft) instead of itoa(craft)
    {
+
if (u1.objecttype == ITEM_WEAPON)
    exec ("say The cost is merely "+moneystring(amt*IRON_MULT, TRUE)+
+
    buf := "say The "+u1.name+" is a "+weapon_name(category)+" of "+
        ", get them first.", self);
+
        craft_text.[craft]+" craftmanship and material.";
    goto start;
 
    }
 
  
category:= u1.value[0];
+
if (u1.objecttype == ITEM_ARMOR)
craft:= u1.value[1] / 5 + 4; // / 5 + 4 is to get corresponding craft_text val
+
    buf := "say The "+u1.name+" is made of "+arm_text.[category]+" and is of "+
 +
        craft_text.[craft]+" craftmanship and material.";
  
if (craft < 0) craft := 0;  if (craft > 9) craft := 9;
+
if (u1.objecttype == ITEM_SHIELD)
 +
    buf := "say The "+u1.name+" is a "+shi_text.[category]+" shield of "+
 +
        craft_text.[craft]+" craftmanship and material.";
  
// Change the following to use skill_text(craft) instead of itoa(craft)
+
exec (buf, self);
if (u1.objecttype == ITEM_WEAPON)
 
    buf := "say The "+u1.name+" is a "+weapon_name(category)+" of "+
 
        craft_text.[craft]+" craftmanship and material.";
 
  
if (u1.objecttype == ITEM_ARMOR)
+
goto start;
    buf := "say The "+u1.name+" is made of "+arm_text.[category]+" and is of "+
 
        craft_text.[craft]+" craftmanship and material.";
 
  
if (u1.objecttype == ITEM_SHIELD)
+
}
    buf := "say The "+u1.name+" is a "+shi_text.[category]+" shield of "+
 
        craft_text.[craft]+" craftmanship and material.";
 
  
exec (buf, self);
+
dilend
  
goto start;
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
}
+
<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to
 +
understand it or adjust it you only have to use it.  In fact this is a
 +
really easy <ACRONYM>DIL</ACRONYM> to use.  It only has one argument which is 'amt', the integer value of money you want the evaluator to charge when a
 +
person evaluates their stuff.  So to use this function it would look
 +
like this on an NPC.</PARA>
  
dilend
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilcopy evaluate@function (5*GOLD_PIECE);
  
<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to
+
</PROGRAMLISTING></INFORMALEXAMPLE>
understand it or adjust it you only have to use it.  In fact this is a
 
really easy <ACRONYM>DIL</ACRONYM> to use.  It only has one argument which is 'amt', the integer value of money you want the evaluator to charge when a
 
person evaluates their stuff.  So to use this function it would look
 
like this on an NPC.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>this tells the evaluate <ACRONYM>DIL</ACRONYM> to charge 5 gold pieces each time a player
 +
evaluates something.  For more information on the money see the money
 +
field.</PARA>
  
dilcopy evaluate@function (5*GOLD_PIECE);
+
<PARA>All released <ACRONYM>DIL</ACRONYM> NPC functions are described in
 +
<XREF LINKEND="npcdilfunc">.
 +
Then we put some to work so you can see how
 +
to use them in <XREF LINKEND="npccomplex"></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>this tells the evaluate <ACRONYM>DIL</ACRONYM> to charge 5 gold pieces each time a player
+
<VARLISTENTRY>
evaluates something.  For more information on the money see the money
+
;defensive
field.</PARA>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC defensive</primary>
 +
</indexterm></PARA>
  
<PARA>All released <ACRONYM>DIL</ACRONYM> NPC functions are described in
 
<XREF LINKEND="npcdilfunc">.
 
Then we put some to work so you can see how
 
to use them in <XREF LINKEND="npccomplex"></PARA>
 
  
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>This field sets the NPC natural defense.  The defense is a natural
;defensive
+
bonus the NPC gets when being attacked.  If this value is set high
  <DICTDEF>
+
enough the NPC becomes almost indestructible. You should use the macro
<PARA><indexterm>
+
to set the NPC natural attack and defense in <xref
<primary>NPC defensive</primary>
+
LINKEND="npcmacroattdef">.</PARA>
</indexterm></PARA>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
 +
<VARLISTENTRY>
 +
;offensive
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC offensive</primary>
 +
</indexterm></PARA>
  
 +
<PARA>This field sets the NPC natural offense.  The offense is a natural
 +
bonus the NPC gets when being attacked.  If this value is set high
 +
enough the NPC can do some serious damage when attacking.  You should use the macro
 +
to set the NPC natural attack and defense in <xref
 +
LINKEND="npcmacroattdef">.</PARA>
  
<PARA>This field sets the NPC natural defense.  The defense is a natural
 
bonus the NPC gets when being attacked.  If this value is set high
 
enough the NPC becomes almost indestructible.  You should use the macro
 
to set the NPC natural attack and defense in <xref
 
LINKEND="npcmacroattdef">.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</LISTITEM>
;offensive
+
</VARLISTENTRY>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC offensive</primary>
 
</indexterm></PARA>
 
  
<PARA>This field sets the NPC natural offense.  The offense is a natural
 
bonus the NPC gets when being attacked.  If this value is set high
 
enough the NPC can do some serious damage when attacking.  You should use the macro
 
to set the NPC natural attack and defense in <xref
 
LINKEND="npcmacroattdef">.</PARA>
 
  
 +
<VARLISTENTRY>
 +
;mana
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC mana</primary>
 +
</indexterm></PARA>
  
</LISTITEM>
+
<PARA>This sets the NPC max mana points.  Using this field you can create
</VARLISTENTRY>
+
special NPCs that have more or less mana points than the <ACRONYM>VME</ACRONYM> server would
 +
normally give when a NPC is loaded.</PARA>
  
 +
<PARA>this field is simple all you have to do to set it is put the 'mana'
 +
keyword followed by the amount of mana points you want the NPC to have as
 +
its max.  The following definition would make an NPC with only 100 mana
 +
points no matter what level.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
mana 100
;mana
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC mana</primary>
 
</indexterm></PARA>
 
  
<PARA>This sets the NPC max mana points.  Using this field you can create
+
</PROGRAMLISTING></INFORMALEXAMPLE>
special NPCs that have more or less mana points than the <ACRONYM>VME</ACRONYM> server would
+
</LISTITEM>
normally give when a NPC is loaded.</PARA>
 
  
<PARA>this field is simple all you have to do to set it is put the 'mana'
+
</VARLISTENTRY>
keyword followed by the amount of mana points you want the NPC to have as
 
its max.  The following definition would make an NPC with only 100 mana
 
points no matter what level.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
mana 100
+
<VARLISTENTRY>
 +
;hit
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC hit</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This sets the NPC max hit points.  Using this field you can create
</LISTITEM>
+
special NPCs that have more or less hit points than the <ACRONYM>VME</ACRONYM> server would
 +
normally give when a NPC is loaded.</PARA>
  
</VARLISTENTRY>
+
<PARA>this field is simple all you have to do to set it is put the 'hit'
 +
keyword followed by the amount of hit points you want the NPC to have as
 +
its max.  The following definition would make an NPC with only 100 hit
 +
points no matter what level.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
hit 100
;hit
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC hit</primary>
 
</indexterm></PARA>
 
  
<PARA>This sets the NPC max hit points.  Using this field you can create
+
</PROGRAMLISTING></INFORMALEXAMPLE>
special NPCs that have more or less hit points than the <ACRONYM>VME</ACRONYM> server would
+
</LISTITEM>
normally give when a NPC is loaded.</PARA>
+
</VARLISTENTRY>
  
<PARA>this field is simple all you have to do to set it is put the 'hit'
+
<VARLISTENTRY>
keyword followed by the amount of hit points you want the NPC to have as
+
;money
its max.  The following definition would make an NPC with only 100 hit
+
<DICTDEF>
points no matter what level.</PARA>
+
<PARA><indexterm>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<primary>NPC money</primary>
 +
</indexterm></PARA>
  
hit 100
+
<PARA>The money field is how you give your NPC money to have while going
 +
along its marry way through your world.  The money field is an integer
 +
that tells the <ACRONYM>VME</ACRONYM> how much money the NPC is carrying.  It would however
 +
be hard to calculate the amount you want on an NPC with out the macros
 +
we have provided.  For example to put 5 gold on an NPC you would have to
 +
use the following on your NPC.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
money 25600
;money
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC money</primary>
 
</indexterm></PARA>
 
  
<PARA>The money field is how you give your NPC money to have while going
+
</PROGRAMLISTING></INFORMALEXAMPLE>
along its marry way through your world.  The money field is an integer
 
that tells the <ACRONYM>VME</ACRONYM> how much money the NPC is carrying.  It would however
 
be hard to calculate the amount you want on an NPC with out the macros
 
we have provided.  For example to put 5 gold on an NPC you would have to
 
use the following on your NPC.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>I of course am not sure this will make 5 gold pieces since I did
 +
the math in my head and with all this righting I am doing my math mind
 +
doesn't seem to be working right.  So to make life easier for you and me
 +
we have added some macros to help that are rather self
 +
explanatory.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
money 25600
+
IRON_PIECE
 +
COPPER_PIECE
 +
SILVER_PIECE
 +
GOLD_PIECE
 +
PLATINUM_PIECE
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>I of course am not sure this will make 5 gold pieces since I did
+
<PARA>Now if we wanted to make a NPC carrying five gold it would be as
the math in my head and with all this righting I am doing my math mind
+
simple as this:</PARA>
doesn't seem to be working right.  So to make life easier for you and me
+
<INFORMALEXAMPLE><PROGRAMLISTING>
we have added some macros to help that are rather self
 
explanatory.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
IRON_PIECE
+
money 5*GOLD_PIECE
COPPER_PIECE
 
SILVER_PIECE
 
GOLD_PIECE
 
PLATINUM_PIECE
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>the macro method also gains you the ability to tell the <ACRONYM>VME</ACRONYM> what
 +
amount of each coin you want on the NPC.  If you set it using a single
 +
integer the compiler would pick how many of each coin.  This of course
 +
is not what is desired in fact you want to be able to set your money
 +
however you like.  So setting more than one coin is as simple as adding
 +
a comma between the first and second coin.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Now if we wanted to make a NPC carrying five gold it would be as
+
money 5*GOLD_PIECE, 20*IRON_PIECE
simple as this:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
money 5*GOLD_PIECE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
<PARA>the macro method also gains you the ability to tell the <ACRONYM>VME</ACRONYM> what
+
;exp
amount of each coin you want on the NPC.  If you set it using a single
+
<DICTDEF>
integer the compiler would pick how many of each coinThis of course
+
<PARA><indexterm>
is not what is desired in fact you want to be able to set your money
+
<primary>NPC exp</primary>
however you likeSo setting more than one coin is as simple as adding
+
</indexterm></PARA>
a comma between the first and second coin.</PARA>
+
<PARA>By default a monster gives 100% of the experience it is worth.
<INFORMALEXAMPLE><PROGRAMLISTING>
+
This amount is calculated according to the level of the NPC verses the
 +
level of the person fighting itSometimes the amount of experience is
 +
not right since the NPC is really hard to kill for example a dragon with
 +
breath weapon and heal at the same level as a merchant with a dagger.
 +
These should of course give different experienceThe 'exp' field is
 +
designed to do just thatThe possible range for the 'exp' field is
 +
-500% to 500%.  If you put the NPC at a negative experience value it
 +
will take experience away when it is killed.  If you want the default of
 +
100% you do not even need to place this field in your NPC.</PARA>
  
money 5*GOLD_PIECE, 20*IRON_PIECE
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//add 50% to the experience gained
</LISTITEM>
+
exp 150
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
/subtract 150% from the experience gained
;exp
+
exp -50
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC exp</primary>
 
</indexterm></PARA>
 
<PARA>By default a monster gives 100% of the experience it is worth.
 
This amount is calculated according to the level of the NPC verses the
 
level of the person fighting it.  Sometimes the amount of experience is
 
not right since the NPC is really hard to kill for example a dragon with
 
breath weapon and heal at the same level as a merchant with a dagger.
 
These should of course give different experience.  The 'exp' field is
 
designed to do just that.  The possible range for the 'exp' field is
 
-500% to 500%.  If you put the NPC at a negative experience value it
 
will take experience away when it is killed.  If you want the default of
 
100% you do not even need to place this field in your NPC.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
//add 50% to the experience gained
+
<VARLISTENTRY>
exp 150
+
;sex
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC sex</primary>
 +
</indexterm></PARA>
  
/subtract 150% from the experience gained
+
<PARA>Gender, one of these:</PARA>
exp -50
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
SEX_NEUTRAL
;sex
+
SEX_MALE
<DICTDEF>
+
SEX_FEMALE
<PARA><indexterm>
 
<primary>NPC sex</primary>
 
</indexterm></PARA>
 
  
<PARA>Gender, one of these:</PARA>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>the values are pretty obvious which is which gender so all we will
 +
show here is how to set it.</PARA>
  
SEX_NEUTRAL
+
<INFORMALEXAMPLE><PROGRAMLISTING>
SEX_MALE
 
SEX_FEMALE
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//Setting a male NPC
 +
sex SEX_MALE
  
<PARA>the values are pretty obvious which is which gender so all we will
+
</PROGRAMLISTING></INFORMALEXAMPLE>
show here is how to set it.</PARA>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;level
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC level</primary>
 +
</indexterm></PARA>
  
//Setting a male NPC
+
<PARA>When  creating a NPC it must be between level 0 and  199.  The
sex SEX_MALE
+
level  of  the NPC decides how many skill points  and  ability
 +
points the NPC has.  It, along with the 'exp' percentage, determines the amount of experience gained
 +
when the NPC is killed. To set the level of the NPC you use
 +
the 'level' keyword and then follow it by the level you are
 +
setting.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
//set a NPC to level 50
;level
+
level 50
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC level</primary>
 
</indexterm></PARA>
 
  
<PARA>When  creating a NPC it must be between level 0 and  199.  The
+
</PROGRAMLISTING></INFORMALEXAMPLE>
level  of  the NPC decides how many skill points  and  ability
+
</LISTITEM>
points the NPC has.  It, along with the 'exp' percentage, determines the amount of experience gained
+
</VARLISTENTRY>
when the NPC is killed. To set the level of the NPC you use
 
the 'level' keyword and then follow it by the level you are
 
setting.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//set a NPC to level 50
+
<VARLISTENTRY>
level 50
+
;race
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC race</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The 'race' keyword is what you use to set the characters race.
</LISTITEM>
+
Races in <ACRONYM>VME</ACRONYM> are defined by using an integer that lets the spells and
</VARLISTENTRY>
+
skills act differently for each specific type.  The <ACRONYM>VME</ACRONYM> comes standard
 +
with many races defined in the ''values.h''.  For
 +
ease in access we have provided them in <xref linkend="app-c">.  For now
 +
you can look at the short list below taken from the over all
 +
race list.</PARA>
  
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
#define RACE_RAT            1102
;race
+
#define RACE_HORSE          1103
<DICTDEF>
+
#define RACE_BADGER        1104
<PARA><indexterm>
+
#define RACE_SKUNK          1105
<primary>NPC race</primary>
+
#define RACE_BOAR          1106
</indexterm></PARA>
+
#define RACE_MOUSE          1107
 +
#define RACE_MONKEY        1108
 +
#define RACE_PORCUPINE      1110
 +
#define RACE_ELEPHANT      1112
 +
#define RACE_CAMEL          1113
 +
#define RACE_FERRET        1114
  
<PARA>The 'race' keyword is what you use to set the characters race.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
Races in <ACRONYM>VME</ACRONYM> are defined by using an integer that lets the spells and
 
skills act differently for each specific type.  The <ACRONYM>VME</ACRONYM> comes standard
 
with many races defined in the ''values.h''.  For
 
ease in access we have provided them in <xref linkend="app-c">.  For now
 
you can look at the short list below taken from the over all
 
race list.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>If for example you wanted to make a monkey you could simply put
 +
the 'race' keyword and follow it by the monkey define like this:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define RACE_RAT            1102
+
race RACE_MONKEY
#define RACE_HORSE          1103
 
#define RACE_BADGER        1104
 
#define RACE_SKUNK          1105
 
#define RACE_BOAR          1106
 
#define RACE_MOUSE          1107
 
#define RACE_MONKEY         1108
 
#define RACE_PORCUPINE      1110
 
#define RACE_ELEPHANT      1112
 
#define RACE_CAMEL          1113
 
#define RACE_FERRET        1114
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>If the race your looking for doesn't exist in the
 +
''values.h'' list, you can either add one buy picking a
 +
number not already used and creating your own define in the
 +
''values.h'' or by adding the define to your zone.
 +
Defines added to a single zone will not be accessible if another builder
 +
wants to use it.  You could also just set it using a number.  The
 +
following two methods would act the same.</PARA>
  
<PARA>If for example you wanted to make a monkey you could simply put
+
<INFORMALEXAMPLE><PROGRAMLISTING>
the 'race' keyword and follow it by the monkey define like this:</PARA>
+
//add define to values.h and use in your zone
<INFORMALEXAMPLE><PROGRAMLISTING>
+
#define RACE_SPACE_TROLL  5059
 +
race RACE_SPACE_TROLL
  
race RACE_MONKEY
+
//Just plug in a number
 +
race 5059
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>If the race your looking for doesn't exist in the
 
''values.h'' list, you can either add one buy picking a
 
number not already used and creating your own define in the
 
''values.h'' or by adding the define to your zone.
 
Defines added to a single zone will not be accessible if another builder
 
wants to use it.  You could also just set it using a number.  The
 
following two methods would act the same.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>If you don't use the macros things can get confusing really fast with
//add define to values.h and use in your zone
+
the amount of races there are.</PARA>
#define RACE_SPACE_TROLL  5059
+
</LISTITEM>
race RACE_SPACE_TROLL
+
</VARLISTENTRY>
  
//Just plug in a number
+
<VARLISTENTRY>
race 5059
+
;attack
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC attack</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This field sets the NPCs natural attack type.  Do not use this
 +
field directly instead use the macro described in <xref
 +
linkend="npcmacroattarm"></PARA>
 +
</LISTITEM>
  
<PARA>If you don't use the macros things can get confusing really fast with
+
</VARLISTENTRY>
the amount of races there are.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;attack
+
;armour
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>NPC attack</primary>
+
<primary>NPC armour</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
<PARA>This field sets the NPCs natural attack type.  Do not use this
+
<PARA>This field sets the NPCs natural armour type.  Do not use this
field directly instead use the macro described in <xref
+
field directly instead use the macro described in <xref
linkend="npcmacroattarm"></PARA>
+
linkend="npcmacroattarm"></PARA>
</LISTITEM>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
</VARLISTENTRY>
+
<VARLISTENTRY>
 +
;speed
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC speed</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>Speed determines the NPCs speed.  The range is one to twelve.  You
;armour
+
should not set this when compiling an NPC since the result is really
  <DICTDEF>
+
undefined. If you have a special NPC that you want to try to make move
<PARA><indexterm>
+
faster and hit faster then you could try setting this.  This field is
<primary>NPC armour</primary>
+
mainly added so <ACRONYM>DIL</ACRONYM> can adjust speed.  The lower the number the
</indexterm></PARA>
+
faster the NPC speed.</PARA>
  
<PARA>This field sets the NPCs natural armour type.  Do not use this
+
<INFORMALEXAMPLE><PROGRAMLISTING>
field directly instead use the macro described in <xref
 
linkend="npcmacroattarm"></PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
//fastest speed.
;speed
+
speed 0
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC speed</primary>
 
</indexterm></PARA>
 
  
<PARA>Speed determines the NPCs speed.  The range is one to twelve.  You
+
//slowest speed
should not set this when compiling an NPC since the result is really
+
speed 12
undefined.  If you have a special NPC that you want to try to make move
 
faster and hit faster then you could try setting this.  This field is
 
mainly added so <ACRONYM>DIL</ACRONYM> can adjust speed.  The lower the number the
 
faster the NPC speed.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
//fastest speed.
+
</LISTITEM>
speed 0
+
</VARLISTENTRY>
  
//slowest speed
+
<VARLISTENTRY>
speed 12
+
;position
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC position</primary>
 +
</indexterm></PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This field sets the position that the NPC will be in when it is
 +
first loaded.  The following positions are recognized by the
 +
compiler.</PARA>
  
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
POSITION_DEAD
;position
+
POSITION_MORTALLYW
<DICTDEF>
+
POSITION_INCAP
<PARA><indexterm>
+
POSITION_STUNNED
<primary>NPC position</primary>
+
POSITION_SLEEPING
</indexterm></PARA>
+
POSITION_RESTING
 +
POSITION_SITTING
 +
POSITION_FIGHTING
 +
POSITION_STANDING
  
<PARA>This field sets the position that the NPC will be in when it is
+
</PROGRAMLISTING></INFORMALEXAMPLE>
first loaded.  The following positions are recognized by the
 
compiler.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Some of these positions make no sense you would not load a
 +
  NPC into a fight or you would not load an NPC that is already dead.
 +
  The positions are availible for <ACRONYM>DIL</ACRONYM> and you will need to read the <ACRONYM>DIL</ACRONYM>
 +
  manuals to find out what you would want those for.  For now the
 +
  following are enough.</PARA>
 +
 
 +
  <INFORMALEXAMPLE><PROGRAMLISTING>
 +
 
 +
  POSITION_SLEEPING
 +
POSITION_RESTING
 +
POSITION_SITTING
 +
POSITION_STANDING
  
POSITION_DEAD
+
</PROGRAMLISTING></INFORMALEXAMPLE>
POSITION_MORTALLYW
 
POSITION_INCAP
 
POSITION_STUNNED
 
POSITION_SLEEPING
 
POSITION_RESTING
 
POSITION_SITTING
 
POSITION_FIGHTING
 
POSITION_STANDING
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The position combined with the default position determines what
 +
will be shown when a player looks in the room.  If the position of the
 +
NPC matches its default position the NPC description will be shown.  If
 +
it doesn't match the NPCs title and position will be shown.  The
 +
default value for both 'position' and 'default' is 'POSITION_STANDING'</PARA>
  
<PARA>Some of these positions make no sense you would not load a
+
<PARA>To set the position like with other fields you type the 'position'
  NPC into a fight or you would not load an NPC that is already dead.
+
keyword first and follow it by the position you are setting.</PARA>
  The positions are availible for <ACRONYM>DIL</ACRONYM> and you will need to read the <ACRONYM>DIL</ACRONYM>
 
  manuals to find out what you would want those for.  For now the
 
  following are enough.</PARA>
 
 
 
  <INFORMALEXAMPLE><PROGRAMLISTING>
 
 
 
  POSITION_SLEEPING
 
POSITION_RESTING
 
POSITION_SITTING
 
POSITION_STANDING
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The position combined with the default position determines what
+
position POSITION_SITTING
will be shown when a player looks in the room.  If the position of the
 
NPC matches its default position the NPC description will be shown.  If
 
it doesn't match the NPCs title and position will be shown.  The
 
default value for both 'position' and 'default' is 'POSITION_STANDING'</PARA>
 
  
<PARA>To set the position like with other fields you type the 'position'
+
</PROGRAMLISTING></INFORMALEXAMPLE>
keyword first and follow it by the position you are setting.</PARA>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;default
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC default</primary>
 +
</indexterm></PARA>
  
position POSITION_SITTING
+
<PARA>The default position along with the position determines what is
 +
shown when a NPC is in each position.  If the position and default
 +
positions match the 'descr' field is shown.  If they do not match the
 +
NPC title is shown along with the current position information.  If
 +
'default' is not set it defaults to 'POSITION_STANDING'.  The following
 +
are possible default positions.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  <INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
+
 
</VARLISTENTRY>
+
    POSITION_DEAD
 +
POSITION_MORTALLYW
 +
POSITION_INCAP
 +
POSITION_STUNNED
 +
POSITION_SLEEPING
 +
POSITION_RESTING
 +
POSITION_SITTING
 +
POSITION_FIGHTING
 +
POSITION_STANDING
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;default
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC default</primary>
 
</indexterm></PARA>
 
  
<PARA>The default position along with the position determines what is
+
<PARA>Setting the default field is exactly like setting the 'position'
shown when a NPC is in each position.  If the position and default
+
field you place the 'default' keyword first and then the position you
positions match the 'descr' field is shown.  If they do not match the
+
want to be default like this:</PARA>
NPC title is shown along with the current position information.  If
+
<INFORMALEXAMPLE><PROGRAMLISTING>
'default' is not set it defaults to 'POSITION_STANDING'.  The following
 
are possible default positions.</PARA>
 
  
  <INFORMALEXAMPLE><PROGRAMLISTING>
+
default POSITION_RESTING
 
 
    POSITION_DEAD
 
POSITION_MORTALLYW
 
POSITION_INCAP
 
POSITION_STUNNED
 
POSITION_SLEEPING
 
POSITION_RESTING
 
POSITION_SITTING
 
POSITION_FIGHTING
 
POSITION_STANDING
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>Setting the default field is exactly like setting the 'position'
+
<VARLISTENTRY>
field you place the 'default' keyword first and then the position you
+
;ability
want to be default like this:</PARA>
+
<DICTDEF>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA><indexterm>
 +
<primary>NPC ability</primary>
 +
</indexterm></PARA>
  
default POSITION_RESTING
+
<PARA>this field is used to set each of the NPCs abilities.
 +
It should not be used directly but instead set through the macro described
 +
in <xref linkend="npcmacroability">
 +
</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;ability
+
;weapon
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>NPC ability</primary>
+
<primary>NPC weapon</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
<PARA>this field is used to set each of the NPCs abilities.  
+
<PARA>this field is used to set each of the NPCs weapon proficiencies.  
It should not be used directly but instead set through the macro described
+
It should not be used directly but instead set through the macro described
in <xref linkend="npcmacroability">
+
in <xref linkend="npcmacroweapspl"></PARA> </LISTITEM>
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;weapon
+
;spell
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>NPC weapon</primary>
+
<primary>NPC spell</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
<PARA>this field is used to set each of the NPCs weapon proficiencies.  
+
<PARA>this field is used to set each of the NPCs spells.  
It should not be used directly but instead set through the macro described
+
It should not be used directly but instead set through the macro described
in <xref linkend="npcmacroweapspl"></PARA> </LISTITEM>
+
in <xref linkend="npcmacroweapspl">
 +
</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</VARLISTENTRY>
+
<VARLISTENTRY>
 +
;light
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC light</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>The light field on NPC is not normally set.  If however you have a
;spell
+
strange creature like a 'light bug' you can set a light value on a NPC.
  <DICTDEF>
+
The default light is set to 0 which means it neither adds or subtracts
<PARA><indexterm>
+
from the rooms light. To set the light value on a NPC you just put the
<primary>NPC spell</primary>
+
'light' keyword first and then the value you want to add to the current
</indexterm></PARA>
+
light.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>this field is used to set each of the NPCs spells.
+
//add one to light in room
It should not be used directly but instead set through the macro described
+
light 1
in <xref linkend="npcmacroweapspl">
 
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
//default
;light
+
light 0
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC light</primary>
 
</indexterm></PARA>
 
  
<PARA>The light field on NPC is not normally set.  If however you have a
+
//take one away
strange creature like a 'light bug' you can set a light value on a NPC.
+
light -1
The default light is set to 0 which means it neither adds or subtracts
 
from the rooms light.  To set the light value on a NPC you just put the
 
'light' keyword first and then the value you want to add to the current
 
light.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//add one to light in room
+
</PROGRAMLISTING></INFORMALEXAMPLE>
light 1
+
</LISTITEM>
 +
</VARLISTENTRY>
  
//default
+
<VARLISTENTRY>
light 0
+
;alignment
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC alignment</primary>
 +
</indexterm></PARA>
  
//take one away
+
<PARA>This field  is  a  value between -1000 and +1000,  where  -1000  is
light -1
+
ultimate  evil, 0 is neutral and +1000 is ultimate good.  Good  is
 +
per  definition any value from +1000..+350, neutral is  any  value
 +
from  +349..-349 and evil is any value from -350..-1000. Any value
 +
in between can also be used.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
// Quite evil, maybe a Ghoul  
;alignment
+
alignment -750
  <DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC alignment</primary>
 
</indexterm></PARA>
 
  
<PARA>This field  is  a  value between -1000 and +1000,  where  -1000  is
+
// Barely evil.
ultimate  evil, 0 is neutral and +1000 is ultimate good. Good  is
+
alignment -350
per  definition any value from +1000..+350, neutral is  any  value
 
from  +349..-349 and evil is any value from -350..-1000. Any value
 
in between can also be used.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
//barely good
 +
alignment 350
  
// Quite evil, maybe a Ghoul 
+
</PROGRAMLISTING></INFORMALEXAMPLE>
alignment -750
+
</LISTITEM>
 +
</VARLISTENTRY>
  
// Barely evil.
+
<VARLISTENTRY>
alignment -350
+
;minv
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC minv</primary>
 +
</indexterm></PARA>
  
//barely good
+
<PARA>This field is the administrator invisible level of the NPC it is
alignment 350
+
set on.  This means that if you set the 'minv' to two hundred it will
 +
make it so the NPC can not be seen by anyone below the administrator
 +
level of two hundred.  This is good for hiding ghosts that only come
 +
visible when they attack.  In order for the 'minv' to be removed an
 +
administrator or a <ACRONYM>DIL</ACRONYM> function must change it.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
minv 239
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;minv
+
</LISTITEM>
<DICTDEF>
+
</VARLISTENTRY>
<PARA><indexterm>
 
<primary>NPC minv</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is the administrator invisible level of the NPC it is
+
<VARLISTENTRY>
set on.  This means that if you set the 'minv' to two hundred it will
+
;key
make it so the NPC can not be seen by anyone below the administrator
+
<DICTDEF>
level of two hundred.  This is good for hiding ghosts that only come
+
<PARA><indexterm>
visible when they attack.  In order for the 'minv' to be removed an
+
<primary>NPC key</primary>
administrator or a <ACRONYM>DIL</ACRONYM> function must change it.</PARA>
+
</indexterm></PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
minv 239
+
<PARA>Currently this field is not used in the <ACRONYM>VME</ACRONYM> 2.0 release.  It was
 +
added so in the future you wanted to add keys to a NPC for some
 +
weird reason like a living trunk then you can.  In order to set the key
 +
you first place the 'key' keyword and then add the symbolic name of the
 +
key.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//if the key is in your zone
</LISTITEM>
+
key mynpckey
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
//if the key is in some other zone
;key
+
key someoneelses@keyzone
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC key</primary>
 
</indexterm></PARA>
 
  
<PARA>Currently this field is not used in the <ACRONYM>VME</ACRONYM> 2.0 release.  It was
+
</PROGRAMLISTING></INFORMALEXAMPLE>
added so in the future you wanted to add keys to a NPC for some
+
</LISTITEM>
weird reason like a living trunk then you can.  In order to set the key
+
</VARLISTENTRY>
you first place the 'key' keyword and then add the symbolic name of the
 
key.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//if the key is in your zone
+
<VARLISTENTRY>
key mynpckey
+
;open
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC open</primary>
 +
</indexterm></PARA>
  
//if the key is in some other zone
+
<PARA>this field is not used yet in the <ACRONYM>VME</ACRONYM> 2.0 release.  The field was
key someoneelses@keyzone
+
added so you could make a NPC that can be opened, closed, locked,
 +
and everything else that a room or an object can have set on it.  For
 +
now we will not document this but if you are interested in how you could
 +
use it study the open fields on objects or rooms.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
</SECT1>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<sect1 id="npcmacros">
</LISTITEM>
+
<TITLE>NPC macros</TITLE>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<sect2 id="npcmacroattarm">
;open
+
<TITLE>The attack and armour macro</TITLE>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>NPC open</primary>
 
</indexterm></PARA>
 
  
<PARA>this field is not used yet in the <ACRONYM>VME</ACRONYM> 2.0 releaseThe field was
+
<PARA>The natural attack and armour fields allow you to set the NPC to
added so you could make a NPC that can be opened, closed, locked,
+
do damage like a certain type of weapons and to defend like a certain
and everything else that a room or an object can have set on itFor
+
type of armour respectivelyLets say you had a metal cougar it would
now we will not document this but if you are interested in how you could
+
have an attack type of claw and an armour type of plate while a normal
use it study the open fields on objects or rooms.</PARA>
+
dog would have an armour type of leather and an attack type of bite.
</LISTITEM>
+
The 'NATURAL_DEF' macro is what allows you to set these fieldsThis
</VARLISTENTRY>
+
macro is defined in ''wmacros.h'' and looks like
</VARIABLELIST>
+
this.</PARA>
</SECT1>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<sect1 id="npcmacros">
+
#define NATURAL_DEF(weapon_category, armour_category) \
<TITLE>NPC macros</TITLE>
+
  armour armour_category \
 +
  attack weapon_category
 +
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
  
<sect2 id="npcmacroattarm">
+
<PARA>The word natural can sometimes be a little confusing since you can
<TITLE>The attack and armour macro</TITLE>
+
set any of the weapons types you like on the NPC.  It doesn't exactly
 +
make sense to have a dog that attacks as if it uses a long sword but if
 +
you wish it you can do it.  The following is a short list of just the
 +
natural weapon types but you can find a full list in
 +
<xref linkend="app-d"> or in the ''values.h'' of your mud
 +
just in case you have added some weapon types.</PARA>
  
<PARA>The natural attack and armour fields allow you to set the NPC to
+
<INFORMALEXAMPLE><PROGRAMLISTING>
do damage like a certain type of weapons and to defend like a certain
 
type of armour respectively.  Lets say you had a metal cougar it would
 
have an attack type of claw and an armour type of plate while a normal
 
dog would have an armour type of leather and an attack type of bite.
 
The 'NATURAL_DEF' macro is what allows you to set these fields.  This
 
macro is defined in ''wmacros.h'' and looks like
 
this.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define NATURAL_DEF(weapon_category, armour_category) \
+
#define WPN_FIST        34
  armour armour_category \
+
#define WPN_KICK        35
  attack weapon_category
+
#define WPN_BITE        36
 
+
#define WPN_STING        37
  </PROGRAMLISTING></INFORMALEXAMPLE>
+
#define WPN_CLAW        38
 +
#define WPN_CRUSH        39
  
<PARA>The word natural can sometimes be a little confusing since you can
+
</PROGRAMLISTING></INFORMALEXAMPLE>
set any of the weapons types you like on the NPC.  It doesn't exactly
 
make sense to have a dog that attacks as if it uses a long sword but if
 
you wish it you can do it.  The following is a short list of just the
 
natural weapon types but you can find a full list in
 
<xref linkend="app-d"> or in the ''values.h'' of your mud
 
just in case you have added some weapon types.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Again you don't have to use leather for dogs as we have already
 +
mentioned with our metal cat idea you could make a cloth dragon if you
 +
really want but its up to you to keep some sanity on your <ACRONYM>VME</ACRONYM>.  The
 +
following is the list of armour types that can be set.  You will see
 +
that the list is exactly the same as the list you will find later when
 +
making armour.</PARA>
  
#define WPN_FIST        34
+
<INFORMALEXAMPLE>
#define WPN_KICK        35
+
<PROGRAMLISTING>
#define WPN_BITE        36
 
#define WPN_STING        37
 
#define WPN_CLAW        38
 
#define WPN_CRUSH        39
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
#define ARM_CLOTHES  0  /*Same as a Human in jeans and a T-shirt*/
 +
#define ARM_LEATHER  1  /* A soft flexible leather base armour  */
 +
#define ARM_HLEATHER 2  /* A hard un flexible leather base armour */
 +
#define ARM_CHAIN    3  /* A flexible armour composed of interlocking rings */
 +
#define ARM_PLATE    4  /* An un flexible plate armour. */
  
<PARA>Again you don't have to use leather for dogs as we have already
+
</PROGRAMLISTING></INFORMALEXAMPLE>
mentioned with our metal cat idea you could make a cloth dragon if you
 
really want but its up to you to keep some sanity on your <ACRONYM>VME</ACRONYM>.  The
 
following is the list of armour types that can be set.  You will see
 
that the list is exactly the same as the list you will find later when
 
making armour.</PARA>
 
  
<INFORMALEXAMPLE>
+
<PARA>Now that you have the defines to work with we will return to our
<PROGRAMLISTING>
+
metal cat and normal dog.  The definitions for them would look something
 +
like this.</PARA>
  
#define ARM_CLOTHES  0  /*Same as a Human in jeans and a T-shirt*/
+
<INFORMALEXAMPLE><PROGRAMLISTING>
#define ARM_LEATHER  1  /* A soft flexible leather base armour  */
 
#define ARM_HLEATHER 2  /* A hard un flexible leather base armour */
 
#define ARM_CHAIN    3  /* A flexible armour composed of interlocking rings */
 
#define ARM_PLATE    4  /* An un flexible plate armour. */
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//Metal Cat
 +
NATURAL_DEF(WPN_CLAW, ARM_PLATE)
  
<PARA>Now that you have the defines to work with we will return to our
+
//normal dog
metal cat and normal dog.  The definitions for them would look something
+
NATURAL_DEF(WPN_BITE, ARM_LEATHER)
like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
//Metal Cat
+
<PARA>You  should  know  that the weight of the monster  determines  the
NATURAL_DEF(WPN_CLAW, ARM_PLATE)
+
maximum  amount of damage it can give when using a natural attack.
 +
The weight is categorized as follows:</PARA>
  
//normal dog
+
<TABLE frame=all tocentry=0>
NATURAL_DEF(WPN_BITE, ARM_LEATHER)
+
<TITLE>Weight size chart</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>LBS</ENTRY>
 +
<ENTRY>Size</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>0 - 5</ENTRY>
 +
<ENTRY>Tiny</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>6 - 40</ENTRY>
 +
<ENTRY>Small</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>41 - 160</ENTRY>
 +
<ENTRY>Medium</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>161 - 500</ENTRY>
 +
<ENTRY>Large</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>500 and up</ENTRY>
 +
<ENTRY>Huge</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>By default monsters are medium.  So make sure you take this into
 +
account when you are creating your NPC.</PARA>
 +
  </sect2>
 +
 
 +
  <sect2 id="npcmacroattdef">
 +
<TITLE>The defense and offense bonus macro</TITLE>
  
<PARA>You  should  know that the weight of the monster determines the
+
<PARA>There comes a time when you may want to make your NPC super
maximum amount of damage it can give when using a natural attack.
+
naturally powerful. It is for those times that the offense and defense
The weight is categorized as follows:</PARA>
+
fields are available for you to set. Normally they default to 0 but you
 +
can set them from 0 to 5000. The higher you set the offense number the
 +
harder you will hit people you a re in combat with. The higher you set
 +
the defense the harder it will be for people to hit your NPC. The
 +
following macro allows you to set both the offense and defense.</PARA>
  
<TABLE frame=all tocentry=0>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>Weight size chart</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>LBS</ENTRY>
 
<ENTRY>Size</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>0 - 5</ENTRY>
 
<ENTRY>Tiny</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>6 - 40</ENTRY>
 
<ENTRY>Small</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>41 - 160</ENTRY>
 
<ENTRY>Medium</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>161 - 500</ENTRY>
 
<ENTRY>Large</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>500 and up</ENTRY>
 
<ENTRY>Huge</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>By default monsters are medium.  So make sure you take this into
+
#define ATTACK_DEFENSE(attack, defense) \
account when you are creating your NPC.</PARA>
+
offensive attack \
  </sect2>
+
defensive defense
 
 
  <sect2 id="npcmacroattdef">
 
<TITLE>The defense and offense bonus macro</TITLE>
 
  
<PARA>There comes a time when you may want to make your NPC super
+
</PROGRAMLISTING></INFORMALEXAMPLE>
naturally powerful.  It is for those times that the offense and defense
 
fields are available for you to set.  Normally they default to 0 but you
 
can set them from 0 to 5000.  The higher you set the offense number the
 
harder you will hit people you a re in combat with.  The higher you set
 
the defense the harder it will be for people to hit your NPC.  The
 
following macro allows you to set both the offense and defense.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Using this macro is rather easy you just put the value you want
 +
for each and your all done</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define ATTACK_DEFENSE(attack, defense) \
+
//a really hard hitting hard to kill NPC
offensive attack \
+
ATTACK_DEFENSE( 1000, 1000)
defensive defense
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</sect2>
  
<PARA>Using this macro is rather easy you just put the value you want
+
  <sect2 id="npcmacroability">
for each and your all done</PARA>
+
<TITLE>The NPc abilities macro</TITLE>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//a really hard hitting hard to kill NPC
+
<PARA>All  abilities are in the range [1..200]. Players usually  have  a
ATTACK_DEFENSE( 1000, 1000)
+
maximum of 150, modified by magic... 200 is considered divine.
 +
When  creating a monster you can not directly specify the size  of
 +
the  abilities,  instead you specify a percentage distribution  of
 +
points.  The amount of points are then distributed by the computer
 +
according  to the  specified level.  The  'MSET_ABILITY'  macro  is
 +
available for this purpose, and is defined as:</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</sect2>
 
  
  <sect2 id="npcmacroability">
+
#define MSET_ABILITY(str,dex,con,hpp,bra,cha,mag,div)  \
<TITLE>The NPc abilities macro</TITLE>
+
ability[ABIL_STR]  str  \
 +
  ability[ABIL_DEX]  dex  \
 +
  ability[ABIL_CON]  con  \
 +
  ability[ABIL_HP]  hpp  \
 +
  ability[ABIL_BRA]  bra  \
 +
  ability[ABIL_MAG]  mag  \
 +
  ability[ABIL_DIV]  div  \
 +
  ability[ABIL_CHA]  cha
 +
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>All  abilities are in the range [1..200]. Players usually  have  a
+
<NOTE><PARA>
maximum of 150, modified by magic... 200 is considered divine.
+
Note the sum of the ability values must be 100%. This is thus
When  creating a monster you can not directly specify the size  of
+
an example of an ability distribution:
the  abilities,  instead you specify a percentage distribution of
+
<INFORMALEXAMPLE><PROGRAMLISTING>
points.  The amount of points are then distributed by the computer
 
according  to  the  specified level.  The  'MSET_ABILITY'  macro  is
 
available for this purpose, and is defined as:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
    MSET_ABILITY(25,15,10,15,10,5,10,0)  /* Sum is 100% */
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</PARA></NOTE>
  
#define MSET_ABILITY(str,dex,con,hpp,bra,cha,mag,div)  \
 
ability[ABIL_STR]  str  \
 
  ability[ABIL_DEX]  dex  \
 
  ability[ABIL_CON]  con  \
 
  ability[ABIL_HP]  hpp  \
 
  ability[ABIL_BRA]  bra  \
 
  ability[ABIL_MAG]  mag  \
 
  ability[ABIL_DIV]  div  \
 
  ability[ABIL_CHA]  cha
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<NOTE><PARA>
+
<PARA>The  amount of points distributed depends directly upon the  level
Note the sum of the ability values must be 100%. This is thus
+
of the monster and the percentage.  If the percentage is too high and the
an example of an ability distribution:
+
level is also set High some ability points may be lost since a NPC gets
<INFORMALEXAMPLE><PROGRAMLISTING>
+
all abilities over 255 cut off. For example a level 199 monster with an  ability
 +
percentage  a  bit above 20% will make an ability above  the  255
 +
points maximum.  In the current combat system in the <ACRONYM>VME</ACRONYM> 2.0 it is not
 +
necessary to spend points on both 'mag' and 'div' on the NPC since only
 +
one or the other is ever used depending on which is higher.</PARA>
  
    MSET_ABILITY(25,15,10,15,10,5,10,0)  /* Sum is 100% */
+
</sect2>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  <sect2 id="npcmacroweapspl">
</PARA></NOTE>
+
<TITLE>The NPc weapon and spell macros</TITLE>
  
 +
<PARA>NPCs know about weapons and spells but not at the same detailed
 +
level as the player.  For NPCs the spell and weapon group are used.
 +
Thus the Axe hammer category defines all defence and all attack for all
 +
kinds of axes and hammers, whereas the player would have to train
 +
individually in each axe and hammer type. The same is true for spells.
 +
Thus if a monster has 25 points in the weapon sword category it will
 +
fight (and defend) with all sword-like weapons at skill 25. When you
 +
define weapon and spell skills (monsters have no skill skills) you also
 +
define these as percentages, and the program automatically distributes
 +
the points. Use the pre-defined macros:</PARA>
  
<PARA>The  amount of points distributed depends directly upon the  level
+
<INFORMALEXAMPLE><PROGRAMLISTING>
of the monster and the percentage.  If the percentage is too high and the
 
level is also set High some ability points may be lost since a NPC gets
 
all abilities over 255 cut off.  For example a level 199 monster with an  ability
 
percentage  a  bit above 20% will make an ability  above  the  255
 
points maximum.  In the current combat system in the <ACRONYM>VME</ACRONYM> 2.0 it is not
 
necessary to spend points on both 'mag' and 'div' on the NPC since only
 
one or the other is ever used depending on which is higher.</PARA>
 
  
</sect2>
+
#define MSET_WEAPON(axe_ham, sword, club_mace, pole, unarmed, special)  \
+
weapon[WPN_AXE_HAM]    axe_ham  \
  <sect2 id="npcmacroweapspl">
+
weapon[WPN_SWORD]      sword      \
<TITLE>The NPc weapon and spell macros</TITLE>
+
weapon[WPN_CLUB_MACE]  club_mace  \
 +
weapon[WPN_POLEARM]    pole \
 +
weapon[WPN_UNARMED]    unarmed    \
 +
weapon[WPN_SPECIAL]    special
  
<PARA>NPCs know about weapons and spells but not at the same detailed
+
</PROGRAMLISTING>
level as the player.  For NPCs the spell and weapon group are used.
+
</INFORMALEXAMPLE>
Thus the Axe hammer category defines all defence and all attack for all
 
kinds of axes and hammers, whereas the player would have to train
 
individually in each axe and hammer type. The same is true for spells.
 
Thus if a monster has 25 points in the weapon sword category it will
 
fight (and defend) with all sword-like weapons at skill 25. When you
 
define weapon and spell skills (monsters have no skill skills) you also
 
define these as percentages, and the program automatically distributes
 
the points. Use the pre-defined macros:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<TABLE frame=all tocentry=0>
 +
<TITLE>MSET_WEAPON arguments</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Argument</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>axe_ham</ENTRY>
 +
<ENTRY>any hammer or axe</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>sword</ENTRY>
 +
<ENTRY>any sword like weapon, including dagger and rapier, etc.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>club_mace</ENTRY>
 +
<ENTRY>any club or mace like weapon, flails,  morning star, etc.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>polearm</ENTRY>
 +
<ENTRY>any spear or pole like weapon:  spear, trident, sickle, scythe etc.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>unarmed</ENTRY>
 +
<ENTRY> Is any bite, claw, sting or other natural attack.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>special</ENTRY>
 +
<ENTRY>any very peculiar weapon, currently only whip.</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
#define MSET_WEAPON(axe_ham, sword, club_mace, pole, unarmed, special)  \
+
<INFORMALEXAMPLE><PROGRAMLISTING>
weapon[WPN_AXE_HAM]    axe_ham  \
 
weapon[WPN_SWORD]      sword      \
 
weapon[WPN_CLUB_MACE]  club_mace  \
 
weapon[WPN_POLEARM]    pole \
 
weapon[WPN_UNARMED]    unarmed    \
 
weapon[WPN_SPECIAL]    special
 
  
</PROGRAMLISTING>
+
#define MSET_SPELL(div, pro, det, sum, cre, min, hea, col, cel, int, ext)  \
</INFORMALEXAMPLE>
+
spell[SPL_DIVINE]      div  \
 +
spell[SPL_PROTECTION]  pro  \
 +
spell[SPL_DETECTION]  det  \
 +
spell[SPL_SUMMONING]  sum  \
 +
spell[SPL_CREATION]    cre  \
 +
spell[SPL_MIND]        min  \
 +
spell[SPL_HEAT]        hea  \
 +
spell[SPL_COLD]        col  \
 +
spell[SPL_CELL]        cel  \
 +
spell[SPL_INTERNAL]    int  \
 +
spell[SPL_EXTERNAL]    ext
  
<TABLE frame=all tocentry=0>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>MSET_WEAPON arguments</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Argument</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>axe_ham</ENTRY>
 
<ENTRY>any hammer or axe</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>sword</ENTRY>
 
<ENTRY>any sword like weapon, including dagger and rapier, etc.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>club_mace</ENTRY>
 
<ENTRY>any club or mace like weapon, flails,  morning star, etc.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>polearm</ENTRY>
 
<ENTRY>any spear or pole like weapon:  spear, trident, sickle, scythe etc.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>unarmed</ENTRY>
 
<ENTRY> Is any bite, claw, sting or other natural attack.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>special</ENTRY>
 
<ENTRY>any very peculiar weapon, currently only whip.</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define MSET_SPELL(div, pro, det, sum, cre, min, hea, col, cel, int, ext)  \
 
spell[SPL_DIVINE]      div  \
 
spell[SPL_PROTECTION]  pro  \
 
spell[SPL_DETECTION]  det  \
 
spell[SPL_SUMMONING]  sum  \
 
spell[SPL_CREATION]    cre  \
 
spell[SPL_MIND]        min  \
 
spell[SPL_HEAT]        hea  \
 
spell[SPL_COLD]        col  \
 
spell[SPL_CELL]        cel  \
 
spell[SPL_INTERNAL]    int  \
 
spell[SPL_EXTERNAL]    ext
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<TABLE frame=all tocentry=0>
 +
<TITLE>MSET_SPELL arguments</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Argument</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>div</ENTRY>
 +
<ENTRY>Covers all divine sphere spell.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>pro</ENTRY>
 +
<ENTRY>Covers all protection sphere spells.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>det</ENTRY>
 +
<ENTRY>Covers all detection sphere spells.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>sum</ENTRY>
 +
<ENTRY>Covers all summoning spells.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>Cre</ENTRY>
 +
<ENTRY>Covers all creation spells.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>min</ENTRY>
 +
<ENTRY>Covers all mind spells.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>hea</ENTRY>
 +
<ENTRY>Covers all heat spells (fireball, etc.)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>col</ENTRY>
 +
<ENTRY>Covers all cold spells (frostball, etc.)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>cel</ENTRY>
 +
<ENTRY>Covers all cell (electricity) spells (lightning bolt, etc.)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>int</ENTRY>
 +
<ENTRY>Covers all internal (poison) spells (toxicate, etc.)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ext</ENTRY>
 +
<ENTRY>Covers all external (acid) spells (acid ball etc).</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
 +
<NOTE><PARA>If your not sure what your weapon or spell is categorized as
 +
you can look in the ''weapons.def'' or the
 +
''spells.def'' for that you are using for your <ACRONYM>VME</ACRONYM>
 +
server.</PARA></NOTE>
 +
<PARA>The sum of all spell and weapon
 +
skills must be 100%. For example, the following would be a legal
 +
setting of weapons and spells.</PARA>
 +
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
 +
//  75%  Total,  Club/Mace  is primary
 +
      MSET_WEAPON(10,10,20,5,15,5)
  
<TABLE frame=all tocentry=0>
+
// 25%  Total,  Fire  is primary
<TITLE>MSET_SPELL arguments</TITLE>
+
      MSET_SPELL(8,0,0,3,0,3,2,3,3,3,3)
<TGROUP align=left cols=2 colsep=1>
+
 
<THEAD>
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
<ROW>
+
 
<ENTRY>Argument</ENTRY>
+
  <PARA>Remember that the groups define both attack and defence. Thus  if
<ENTRY>Description</ENTRY>
+
you  make  an Orc which has 0% in the flail group it can only  use
</ROW>
+
its  dexterity to defend itself. Likewise with spell  groups.  For
</THEAD>
+
this  reason  the groups are both "resistance" as well  as  attack
<TBODY>
+
groups.</PARA>
<ROW>
+
</sect2>
<ENTRY>div</ENTRY>
+
<ENTRY>Covers all divine sphere spell.</ENTRY>
+
  <sect2 id="npcmacrocomposed">
</ROW>
+
<TITLE>Using the composed.h</TITLE>
<ROW>
 
<ENTRY>pro</ENTRY>
 
<ENTRY>Covers all protection sphere spells.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>det</ENTRY>
 
<ENTRY>Covers all detection sphere spells.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>sum</ENTRY>
 
<ENTRY>Covers all summoning spells.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>Cre</ENTRY>
 
<ENTRY>Covers all creation spells.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>min</ENTRY>
 
<ENTRY>Covers all mind spells.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>hea</ENTRY>
 
<ENTRY>Covers all heat spells (fireball, etc.)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>col</ENTRY>
 
<ENTRY>Covers all cold spells (frostball, etc.)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>cel</ENTRY>
 
<ENTRY>Covers all cell (electricity) spells (lightning bolt, etc.)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>int</ENTRY>
 
<ENTRY>Covers all internal (poison) spells (toxicate, etc.)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ext</ENTRY>
 
<ENTRY>Covers all external (acid) spells (acid ball etc).</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<NOTE><PARA>If your not sure what your weapon or spell is categorized as
+
<PARA>The  file composed.h contains many standard monsters. It is a good
you can look in the ''weapons.def'' or the
+
idea  to  study these definitions, as they form the basis of  many
''spells.def'' for that you are using for your <ACRONYM>VME</ACRONYM>
+
different  monsters. Note that the definitions  by  no  means  are
server.</PARA></NOTE>
+
perfect,  but  we  are hoping to make a more  or  less  complete
<PARA>The sum of all spell and weapon
+
monster  compendium.  If  you create certain  (general)  monsters,
skills must be 100%. For example, the following would be a legal
+
please design it as a macro so it can be incorporated in the
setting of weapons and spells.</PARA>
+
file. The more monsters created by using these macros the easier it will
+
be for your builders to create NPCs. If you think you have a really
<INFORMALEXAMPLE><PROGRAMLISTING>
+
all inclusive Composed.h and want to share it with the rest of the <ACRONYM>VME</ACRONYM>
 +
servers running out there on the internet. Feel free to submit it to
 +
the <ACRONYM>VME</ACRONYM> staff and we will put it in the contribution directories on our
 +
release site.</PARA>
  
// 75%  Total,  Club/Mace  is primary
+
<NOTE><PARA>For more information on how to use the composed.h when
      MSET_WEAPON(10,10,20,5,15,5)
+
building your NPC see <xref linkend="npcbasic">.</PARA></NOTE>
 +
  </sect2>
 +
  </SECT1>
  
//  25%  Total,  Fire  is primary
 
      MSET_SPELL(8,0,0,3,0,3,2,3,3,3,3)
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
 
 
  <PARA>Remember that the groups define both attack and defence.  Thus  if
 
you  make  an Orc which has 0% in the flail group it can only  use
 
its  dexterity to defend itself. Likewise with spell  groups.  For
 
this  reason  the groups are both "resistance" as well  as  attack
 
groups.</PARA>
 
</sect2>
 
 
  <sect2 id="npcmacrocomposed">
 
<TITLE>Using the composed.h</TITLE>
 
  
<PARA>The  file composed.h contains many standard monsters. It is a good
+
<sect1 id="npcbasic">
idea  to  study these definitions, as they form the basis of many
+
<TITLE>Building your first NPC</TITLE>
different  monsters. Note that the definitions  by  no  means  are
+
 
perfect,  but we are hoping to make a more  or  less  complete
+
<PARA>Now that you have built your first zone with rooms its time to
monster  compendiumIf  you create certain  (general)  monsters,
+
populate it with Non playing characters for your players to hunt, kill,
please design it as a macro so it can be incorporated in the
+
and or interact with. In the last couple of sections you have looked
file. The more monsters created by using these macros the easier it will
+
through the fieldsIn this section we are going to make a nice easy
be for your builders to create NPCsIf you think you have a really
+
NPC and then show how to use the ''composed.h'' to make
all inclusive Composed.h and want to share it with the rest of the <ACRONYM>VME</ACRONYM>
+
your NPC building easierAs I have previously stated in the section on
servers running out there on the internet.  Feel free to submit it to
+
room building I like dragons so the first NPC your going to learn to
the <ACRONYM>VME</ACRONYM> staff and we will put it in the contribution directories on our
+
build is a big bad ugly dragonDon't worry if you hate dragons or you
release site.</PARA>
+
just want to build a normal world you will learn plenty from my dragon
 +
example to be able to adjust it to whatever you want.</PARA>
  
<NOTE><PARA>For more information on how to use the composed.h when
+
<PARA>When making NPCs you create the zone source file first as shown
building your NPC see <xref linkend="npcbasic">.</PARA></NOTE>
+
in <xref linkend="ch-02">.  If you only have NPCS you do not need the
  </sect2>
+
%reset, %objects, and %rooms fields.  For the examples in this chapter we
  </SECT1>
+
will use the zone we created in <xref linkend="ch-04"> and add the
 +
%mobiles section where we will put all the NPC definitions. At the end
 +
of this chapter, in <xref linkend="roomnpczone">, we will bring it all together with the rooms we have
 +
already defined and our NPCs.</PARA>
  
  
<sect1 id="npcbasic">
+
<PARA>The first part of all NPC definitions is the symbolic name it is good
<TITLE>Building your first NPC</TITLE>
+
to always pick a name that will match the name of the NPC so it
 +
will be easy to load the NPC.
 +
The reason the symbolic and name should match is when you use the
 +
command <command>wstat</command> it will only show you a
 +
list of the NPCs by symbolic name for example if you type <command>
 +
wstat zone dragon mobiles </command> You will get the following:
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Now that you have built your first zone with rooms its time to
+
List of mobiles in zone Dragon:
populate it with Non playing characters for your players to hunt, kill,
+
dragon clerk trashman
and or interact with.  In the last couple of sections you have looked
 
through the fields.  In this section we are going to make a nice easy
 
NPC and then show how to use the ''composed.h'' to make
 
your NPC building easier.  As I have previously stated in the section on
 
room building I like dragons so the first NPC your going to learn to
 
build is a big bad ugly dragon.  Don't worry if you hate dragons or you
 
just want to build a normal world you will learn plenty from my dragon
 
example to be able to adjust it to whatever you want.</PARA>
 
  
<PARA>When making NPCs you create the zone source file first as shown
+
</PROGRAMLISTING></INFORMALEXAMPLE>
in <xref linkend="ch-02">If you only have NPCS you do not need the
+
If you didn't make it clear what the NPC was by the symbolic name
%reset, %objects, and %rooms fields.  For the examples in this chapter we
+
it might look like this:
will use the zone we created in <xref linkend="ch-04"> and add the
+
<INFORMALEXAMPLE><PROGRAMLISTING>
%mobiles section where we will put all the NPC definitions.  At the end
 
of this chapter, in <xref linkend="roomnpczone">, we will bring it all together with the rooms we have
 
already defined and our NPCs.</PARA>
 
  
 +
List of mobiles in zone Dragon:
 +
npc1 npc2 npc3
  
<PARA>The first part of all NPC definitions is the symbolic name it is good
+
</PROGRAMLISTING></INFORMALEXAMPLE>
to always pick a name that will match the name of the NPC so it
+
While this might be great when you first start imagine trying to
will be easy to load the NPC.
+
remember each NPC if you have over 30 of them.</PARA>
The reason the symbolic and name should match is when you use the
 
command <command>wstat</command> it will only show you a
 
list of the NPCs by symbolic name for example if you type <command>
 
wstat zone dragon mobiles </command> You will get the following:
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
List of mobiles in zone Dragon:
+
<PARA>Now lets get started with our dragon.  As with the rooms all that is required to make a NPC is the symbolic and end fields.  That of course will make a NPC with all defaults.</PARA>
dragon clerk trashman
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
If you didn't make it clear what the NPC was by the symbolic name
 
it might look like this:
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
List of mobiles in zone Dragon:
+
bldragon
npc1 npc2 npc3
+
end
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
While this might be great when you first start imagine trying to
+
<PARA>Thats it for that dragon right?  Nope not quite that makes a NPC
remember each NPC if you have over 30 of them.</PARA>
+
with all defaults.  That means this will probably be a very wimpy human
 +
with a symbolic name of dragon and no description, in short it will be a
 +
blank when you load it.  Now lets start putting the Dragon
 +
together.</PARA>
  
<PARA>Now lets get started with our dragonAs with the rooms all that is required to make a NPC is the symbolic and end fields.  That of course will make a NPC with all defaults.</PARA>
+
<PARA>The first three things we need are the dragons title, description
 +
and names.  The description should be what you see when you do a 'look'
 +
in the roomThe title should be what you see when the NPC is talking
 +
or fighting.  Finally the names should cover everything in the title and
 +
description fields so if you wanted to kill them you can easily
 +
know what to type.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
bldragon
  
bldragon
+
title "a black dragon"
end
+
descr "A big ugly black dragon is clawing the ground here."
 +
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
 +
...
 +
end
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>Thats it for that dragon right?  Nope not quite that makes a NPC
 
with all defaults.  That means this will probably be a very wimpy human
 
with a symbolic name of dragon and no description, in short it will be a
 
blank when you load it.  Now lets start putting the Dragon
 
together.</PARA>
 
  
<PARA>The first three things we need are the dragons title, description
+
<PARA>The names, title and description shouldn't be to hard so I don't
and namesThe description should be what you see when you do a 'look'
+
think its necessary to go into any more description on the subject.
in the room.  The title should be what you see when the NPC is talking
+
Lets move onNow we have to take care of what a player sees when he or
or fightingFinally the names should cover everything in the title and
+
she looks at a NPC.  to make the main description of an NPC you place an
description fields so if you wanted to kill them you can easily
+
extra on the NPC with no names in the list.  The blank extra is a
know what to type.</PARA>
+
special extra that will be shown every time you look at anything in the
<INFORMALEXAMPLE><PROGRAMLISTING>
+
names list of the NPC.  So a description of a NPC would look something
 +
like this.</PARA>
  
bldragon
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
title "a black dragon"
+
extra {}
descr "A big ugly black dragon is clawing the ground here."
+
"The black dragons scales glitter like black granite that has been
names {"big ugly black dragon","ugly black dragon","big black dragon",
+
polished for years by water. He has a large neck and huge bat like
"black dragon","dragon"}
+
wings.  his eyes watch you as you stand before him.  One claw seems to be
...
+
tapping slightly on the ground as if the dragon is waiting for
end
+
something."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>The names, title and description shouldn't be to hard so I don't
+
<PARA>Now that you have a main description for the NPC you need to make
think its necessary to go into any more description on the subject.
+
any smaller descriptions that you want the player to be able to look at.
Lets move on.  Now we have to take care of what a player sees when he or
+
In this case the dragon eyes and claw would be good things to describe
she looks at a NPC.  to make the main description of an NPC you place an
+
and maybe a few other things just for humor.</PARA>
extra on the NPC with no names in the list.  The blank extra is a
 
special extra that will be shown every time you look at anything in the
 
names list of the NPC.  So a description of a NPC would look something
 
like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
extra {}
+
extra {"eyes","eye"}
"The black dragons scales glitter like black granite that has been
+
"The dragons eyes seem to follow you no matter where you go in the room
polished for years by water.  He has a large neck and huge bat like
+
nothing seems to escape the dragons attention."
wings.  his eyes watch you as you stand before him.  One claw seems to be
 
tapping slightly on the ground as if the dragon is waiting for
 
something."
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
extra {"claws","claw"}
 +
"The claw is big black and it looks very deadly.  It seems like the
 +
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 +
to say means the claws are about the size of short swords and long
 +
swords."
  
<PARA>Now that you have a main description for the NPC you need to make
+
extra {"scales","scale"}
any smaller descriptions that you want the player to be able to look at.
+
"Its a scale!  Haven't you ever seen a dragon before!"
In this case the dragon eyes and claw would be good things to describe
 
and maybe a few other things just for humor.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra {"bat wings","wings"}
 +
"The dragon sees you looking and flaps his wings creating one heck of a
 +
wind blast."
  
extra {"eyes","eye"}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
"The dragons eyes seem to follow you no matter where you go in the room
 
nothing seems to escape the dragons attention."
 
  
extra {"claws","claw"}
+
<PARA>Now that we have the NPC all described we should start setting
"The claw is big black and it looks very deadlyIt seems like the
+
    things like race, gender, level, height, weight, defense, offense,
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
+
    alignment, abilities, and finally skills and spells.  First we will pick a raceNormally the
to say means the claws are about the size of short swords and long
+
    list of races are in your ''values.h''.  We have
swords."
+
    the list in <xref linkend="app-c"> and I have searched for dragon
 +
    and found the race I want it is as follows.</PARA>
  
extra {"scales","scale"}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
race RACE_DRAGON_BLACK
"The dragon sees you looking and flaps his wings creating one heck of a
 
wind blast."
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>If you don't think there is any difference in dragons you can
 +
set them all to one race like you could define a race called
 +
'RACE_DRAGON' or something like that.</PARA>
 +
 +
<PARA>Now we should chose the gender of our dragon.  Make sure your
 +
descriptions match what you pick.  It would be pretty weird to have a
 +
female dragon and have the descriptions say 'he, him, or his'</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Now that we have the NPC all described we should start setting
+
    sex SEX_MALE
    things like race, gender, level, height, weight, defense, offense,
 
    alignment, abilities, and finally skills and spells.  First we will pick a race.  Normally the
 
    list of races are in your ''values.h''.  We have
 
    the list in <xref linkend="app-c"> and I have searched for dragon
 
    and found the race I want it is as follows.</PARA>
 
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>Now lets set the height and weight.  Remember you set the height
 +
in centimeters and the weight in pounds.  In the future the <ACRONYM>VME</ACRONYM> will
 +
standardize to one or the other but for now we have to play the
 +
conversion game.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 +
//20 feet  (1 inch = 2.54 cm
 +
height 625
  
race RACE_DRAGON_BLACK
+
//566 KG (1 lb. = .45359 kg)
 +
weight 1250
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>Now that we have the size of the dragon we can pick a level.
 +
My dragon is only 20 feet tall and 1250 pounds so I think maybe he
 +
is a bit young and will make his level around 70.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
level 70
 
<PARA>If you don't think there is any difference in dragons you can
 
set them all to one race like you could define a race called
 
'RACE_DRAGON' or something like that.</PARA>
 
 
<PARA>Now we should chose the gender of our dragon.  Make sure your
 
descriptions match what you pick.  It would be pretty weird to have a
 
female dragon and have the descriptions say 'he, him, or his'</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
    sex SEX_MALE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>The dragon may not wear armour but by default a dragon should
 +
have an armour equal to someone wearing plate mail.  Not only that
 +
but my dragon doesn't like to use his mouth as his natural attack
 +
and he sure can't punch with those big claws so we need to set his
 +
attack type to claw.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
NATURAL_DEF(WPN_CLAW, ARM_PLATE)
<PARA>Now lets set the height and weight.  Remember you set the height
 
in centimeters and the weight in pounds.  In the future the <ACRONYM>VME</ACRONYM> will
 
standardize to one or the other but for now we have to play the
 
conversion game.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
//20 feet  (1 inch = 2.54 cm
 
height 625
 
  
//566 KG (1 lb. = .45359 kg)
+
</PROGRAMLISTING></INFORMALEXAMPLE>
weight 1250
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
 
<PARA>Now that we have the size of the dragon we can pick a level.
 
My dragon is only 20 feet tall and 1250 pounds so I think maybe he
 
is a bit young and will make his level around 70.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
level 70
+
<PARA>Not many black dragons are good so I will pick almost totally
 +
evil, since totally evil is -1000 I will set it as follows.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
alignment -900
<PARA>The dragon may not wear armour but by default a dragon should
 
have an armour equal to someone wearing plate mail.  Not only that
 
but my dragon doesn't like to use his mouth as his natural attack
 
and he sure can't punch with those big claws so we need to set his
 
attack type to claw.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
NATURAL_DEF(WPN_CLAW, ARM_PLATE)
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>Finally we get to the hard part.  Many people have trouble
 +
setting the NPC abilities, weapons, and spells.  There really is nothing
 +
to it if you have read <xref linkend="npcmacroability"> and <xref
 +
linkend="npcmacroweapspl">.  The only thing you have to remember is the
 +
numbers you are putting are not the actual amount but a percentage of
 +
the skill points you want the game to use on your NPC when having your
 +
NPC practice as it loads and all amounts of abilities must add up to
 +
100% as well as all weapons and spells must add up to 100%.  For the
 +
dragon the following would be what the abilities, weapons, and spells
 +
would look like.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//big strong and magical most ability points on str and mag
 +
MSET_ABILITY(20,12,12,12,12,12,20,0)
  
<PARA>Not many black dragons are good so I will pick almost totally
+
//Set natural attack highest of weapons because he fights with claws
evil, since totally evil is -1000 I will set it as follows.</PARA>
+
MSET_WEAPON(10,10,10,5,30,5)
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
alignment -900
+
//black dragons have natural defense from acid set it highest
 +
MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>Finally we get to the hard part.  Many people have trouble
 
setting the NPC abilities, weapons, and spells.  There really is nothing
 
to it if you have read <xref linkend="npcmacroability"> and <xref
 
linkend="npcmacroweapspl">.  The only thing you have to remember is the
 
numbers you are putting are not the actual amount but a percentage of
 
the skill points you want the game to use on your NPC when having your
 
NPC practice as it loads and all amounts of abilities must add up to
 
100% as well as all weapons and spells must add up to 100%.  For the
 
dragon the following would be what the abilities, weapons, and spells
 
would look like.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//big strong and magical most ability points on str and mag
+
<PARA>That is all you need to make a basic dragon.  True this dragon
MSET_ABILITY(20,12,12,12,12,12,20,0)
+
will not do anything but claw you to death if you attack it but in <xref
 +
linkend="npccomplex"> we will give the dragon some more abilities with
 +
some special <ACRONYM>DIL</ACRONYM> functions.  For now lets take a look at our finished
 +
product.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
//Set natural attack highest of weapons because he fights with claws
+
bldragon
MSET_WEAPON(10,10,10,5,30,5)
 
  
//black dragons have natural defense from acid set it highest
+
title "a black dragon"
MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)
+
descr "A big ugly black dragon is clawing the ground here."
 +
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
extra {}
 +
"The black dragons scales glitter like black granite that has been
 +
polished for years by water.  He has a large neck and huge bat like
 +
wings.  his eyes watch you as you stand before him.  One claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
<PARA>That is all you need to make a basic dragon.  True this dragon
+
extra {"eyes","eye"}
will not do anything but claw you to death if you attack it but in <xref
+
"The dragons eyes seem to follow you no matter where you go in the room
linkend="npccomplex"> we will give the dragon some more abilities with
+
nothing seems to escape the dragons attention."
some special <ACRONYM>DIL</ACRONYM> functions. For now lets take a look at our finished
 
product.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
bldragon
+
extra {"claws","claw"}
 +
"The claw is big black and it looks very deadly.  It seems like the
 +
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 +
to say means the claws are about the size of short swords and long
 +
swords."
  
title "a black dragon"
+
extra {"scales","scale"}
descr "A big ugly black dragon is clawing the ground here."
+
"Its a scale!  Haven't you ever seen a dragon before!"
names {"big ugly black dragon","ugly black dragon","big black dragon",
 
"black dragon","dragon"}
 
  
extra {}
+
extra {"bat wings","wings"}
"The black dragons scales glitter like black granite that has been
+
"The dragon sees you looking and flaps his wings creating one heck of a
polished for years by water.  He has a large neck and huge bat like
+
wind blast."
wings.  his eyes watch you as you stand before him.  One claw seems to be
 
tapping slightly on the ground as if the dragon is waiting for
 
something."
 
  
extra {"eyes","eye"}
+
race RACE_DRAGON_BLACK
"The dragons eyes seem to follow you no matter where you go in the room
+
sex SEX_MALE
nothing seems to escape the dragons attention."
+
height 625
 +
weight 1250
 +
level 70
 +
NATURAL_DEF(WPN_CLAW, ARM_PLATE)
 +
alignment -900
 +
MSET_ABILITY(20,12,12,12,12,12,20,0)
 +
MSET_WEAPON(10,10,10,5,30,5)
 +
MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)
  
extra {"claws","claw"}
+
end
"The claw is big black and it looks very deadly.  It seems like the
 
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
 
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
"The dragon sees you looking and flaps his wings creating one heck of a
 
wind blast."
 
  
race RACE_DRAGON_BLACK
+
<PARA>As you can see there is a bit more to building an NPC than a room
sex SEX_MALE
+
but its really not that much harder.  Try changing some stuff and make
height 625
+
sure to practice debugging your errors the more compiling you do the
weight 1250
+
better you will get.  </PARA>
level 70
 
NATURAL_DEF(WPN_CLAW, ARM_PLATE)
 
alignment -900
 
MSET_ABILITY(20,12,12,12,12,12,20,0)
 
MSET_WEAPON(10,10,10,5,30,5)
 
MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)
 
  
end
+
</SECT1>
  
 +
<sect1 id="npcdebug">
 +
<TITLE>Compiling and debugging your first NPC</TITLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>As we have previously mentioned in <xref linkend="rmdebug"> it is
 +
always a good idea to build one or two things and then compile to make
 +
finding errors easy.  In this case we have one NPC to compile and rather
 +
than having all the rooms get in my way while compiling it I have
 +
removed them and only have the '%mobiles' section.  The following is
 +
what the zone looks like when it has only one NPC in it.</PARA>
  
<PARA>As you can see there is a bit more to building an NPC than a room
+
<INFORMALEXAMPLE><PROGRAMLISTING>
but its really not that much harder.  Try changing some stuff and make
 
sure to practice debugging your errors the more compiling you do the
 
better you will get.  </PARA>
 
  
</SECT1>
+
#include &lt;composed.h&gt;
 +
%zone dragonst
 +
lifespan 20
 +
reset RESET_ANYHOW
 +
creators {"whistler"}
  
<sect1 id="npcdebug">
+
notes
<TITLE>Compiling and debugging your first NPC</TITLE>
+
"This is the dragon station I shortened it to dragonst for ease in
 +
loading.  If you have  any questions email me at whistler@valhalla.com"
  
<PARA>As we have previously mentioned in <xref linkend="rmdebug"> it is
+
help
always a good idea to build one or two things and then compile to make
+
"Not sure what could help you nowYou are stuck on one of the
finding errors easyIn this case we have one NPC to compile and rather
+
weirdest space stations you have ever seen and you smell burning
than having all the rooms get in my way while compiling it I have
+
sulfur."
removed them and only have the '%mobiles' section.  The following is
 
what the zone looks like when it has only one NPC in it.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
%mobiles
  
#include &lt;composed.h&gt;
+
bldragon
%zone dragonst
 
lifespan 20
 
reset RESET_ANYHOW
 
creators {"whistler"}
 
  
notes
+
title "a black dragon"
"This is the dragon station I shortened it to dragonst for ease in
+
descr "A big ugly black dragon is clawing the ground here."
loading.  If you have  any questions email me at whistler@valhalla.com"
+
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
  
help
+
extra
"Not sure what could help you nowYou are stuck on one of the
+
"The black dragons scales glitter like black granite that has been
weirdest space stations you have ever seen and you smell burning
+
polished for years by water.  He has a large neck and huge bat like
sulfur."
+
wings.  his eyes watch you as you stand before himOne claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
%mobiles
+
extra {"eye","eyes"}
 +
"The dragons eyes seem to follow you no matter where you go in the room
 +
nothing seems to escape the dragons attention."
  
bldragon
+
extra {"claws","claw"}
 +
"The claw is big black and it looks very deadly.  It seems like the
 +
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 +
to say means the claws are about the size of short swords and long
 +
swords."
  
title "a black dragon"
+
extra {"scales","scale"}
descr "A big ugly black dragon is clawing the ground here."
+
"Its a scale!  Haven't you ever seen a dragon before!"
names {"big ugly black dragon","ugly black dragon","big black dragon",
 
"black dragon","dragon"}
 
  
extra
+
extra {"bat wings","wings"}
"The black dragons scales glitter like black granite that has been
+
"The dragon sees you looking and flaps his wings creating one heck of a
polished for years by water.  He has a large neck and huge bat like
+
wind blast."
wings.  his eyes watch you as you stand before him.  One claw seems to be
 
tapping slightly on the ground as if the dragon is waiting for
 
something."
 
  
extra {"eye","eyes"}
+
race RACE_DRAGON_BLACK
"The dragons eyes seem to follow you no matter where you go in the room
+
sex SEX_MALE
nothing seems to escape the dragons attention."
+
height 625
 +
weight 1250
 +
level 70
 +
NATURAL_DEF (WPN_CLAW, ARM_PLATE)
 +
alignment -900
 +
MSET_ABILITY(21,12,12,12,12,12,20,0)
 +
MSET_WEAPON(10,10,10,5,30,5)
 +
MSET_SPELL(0,0,0,0,0,0,1,0,0,0,30)
  
extra {"claws","claw"}
+
end
"The claw is big black and it looks very deadly.  It seems like the
 
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
+
%end
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
"The dragon sees you looking and flaps his wings creating one heck of a
 
wind blast."
 
  
race RACE_DRAGON_BLACK
+
<PARA>I removed the '%rooms' section added a '%mobiles' section and
sex SEX_MALE
+
stuck the dragon in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM>
height 625
+
server for you to be able to look at it in the game.  If you downloaded
weight 1250
+
our example zones for this document you can compile this zone along with
level 70
+
us and fix the errors as we do for practice.  The filename is
NATURAL_DEF (WPN_CLAW, ARM_PLATE)
+
''debug_npc.zon''.  Just so you know the errors in this
alignment -900
+
zone are intentional so please don't write me an email telling me that
MSET_ABILITY(21,12,12,12,12,12,20,0)
+
there are errors in it.</PARA>
MSET_WEAPON(10,10,10,5,30,5)
 
MSET_SPELL(0,0,0,0,0,0,1,0,0,0,30)
 
  
end
+
<PARA>The command to compile the zone is
 +
<command>VMC debug_npc.zon</command>.
 +
Here is what we get when we first try and
 +
compile the zone.</PARA>
  
%end
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
 +
Compiling 'debug_npc.zon'
 +
debug_npc.zon: 32: parse error
 +
  Token: 'extra'
 +
debug_npc.zon: 55: parse error
 +
  Token: 'alignment'
 +
Compilation aborted.
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>I removed the '%rooms' section added a '%mobiles' section and
+
<PARA>This error file doesn't look any harder than the last one we dealt
stuck the dragon in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM>
+
with when compiling our first room.  The problem is when we go to line
server for you to be able to look at it in the gameIf you downloaded
+
'32' and look for an error we don't find one.  This normally means that
our example zones for this document you can compile this zone along with
+
the error was hard for the compiler to figure outThe best way to deal
us and fix the errors as we do for practiceThe filename is
+
with an error like this is to start at the line it gives you and go up
''debug_npc.zon''.  Just so you know the errors in this
+
and look for an errorWhen we do this we notice that the extra right
zone are intentional so please don't write me an email telling me that
+
above the line that the error is on is missing '{}' so we will add them
there are errors in it.</PARA>
+
back inMost of the time you want to do one error and recompile but
 +
sometimes you can shorten the process for example in this error file
 +
the word 'alignment has been spelled wrong so we can fix that before we
 +
recompile so go to line '56' and fix that.  Now with those two errors
 +
fixed we can recompile and this is what we get:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The command to compile the zone is
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
<command>VMC debug_npc.zon</command>.
+
Compiling 'debug_npc.zon'
Here is what we get when we first try and
+
FATAL: Abilities in 'bldragon' sums up to 101,and not 100.
compile the zone.</PARA>
+
FATAL: Spells&amp;weapons in 'bldragon' sums up to 101, and not 100.
 +
WARNING: Fatal errors in zone.
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
+
<PARA>As we have said before you have to make sure that abilities add up
Compiling 'debug_npc.zon'
+
to 100 percent this error is telling us that my math sucks and that I
debug_npc.zon: 32: parse error
+
have added 1 extra percent to the abilitiesNot only that but again if
  Token: 'extra'
+
we look at both errors I have also put 1 extra on weapons and spells.  
debug_npc.zon: 55: parse error
+
So we can fix both of these at once. Notice it doesn't give a line
  Token: 'alignment'
+
number but that is not a problem because you can search for 'MSET_ABIL'
Compilation aborted.
+
and it will take you right to the problems. After I subtract one from the
</PROGRAMLISTING></INFORMALEXAMPLE>
+
abilities and one from either the spells or weapons the following is the
 +
error file I get.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>This error file doesn't look any harder than the last one we dealt
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
with when compiling our first room.  The problem is when we go to line
+
Compiling 'debug_npc.zon'
'32' and look for an error we don't find one.  This normally means that
+
<ACRONYM>VMC</ACRONYM> Done.
the error was hard for the compiler to figure out.  The best way to deal
 
with an error like this is to start at the line it gives you and go up
 
and look for an errorWhen we do this we notice that the extra right
 
above the line that the error is on is missing '{}' so we will add them
 
back in. Most of the time you want to do one error and recompile but
 
sometimes you can shorten the process for example in this error file
 
the word 'alignment has been spelled wrong so we can fix that before we
 
recompile so go to line '56' and fix that.  Now with those two errors
 
fixed we can recompile and this is what we get:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
+
</PROGRAMLISTING></INFORMALEXAMPLE>
Compiling 'debug_npc.zon'
 
FATAL: Abilities in 'bldragon' sums up to 101,and not 100.
 
FATAL: Spells&amp;weapons in 'bldragon' sums up to 101, and not 100.
 
WARNING: Fatal errors in zone.
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means that
 +
you have now successfully compiled the zone. The main thing I want to
 +
point out is that you can sometimes fix more than one error at a time
 +
but be carefull when doing this if you try to fix some errors before
 +
fixing the first you will be trying to fix things that are not broken.
 +
The safest way to compile stuff is still fix one error at a
 +
time.</PARA>
  
<PARA>As we have said before you have to make sure that abilities add up
+
<PARA>Now that you have a compiled zone you should check and make sure
to 100 percent this error is telling us that my math sucks and that I
+
that all the files are thereWhen you compile a zone you will end up
have added 1 extra percent to the abilitiesNot only that but again if
+
with  three extra files. the files will have the same filename as your zone
we look at both errors I have also put 1 extra on weapons and spells.  
+
with a new extension in this case you should have the following.</PARA>
So we can fix both of these at once.  Notice it doesn't give a line
+
<INFORMALEXAMPLE><PROGRAMLISTING>
number but that is not a problem because you can search for 'MSET_ABIL'
 
and it will take you right to the problems.  After I subtract one from the
 
abilities and one from either the spells or weapons the following is the
 
error file I get.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
+
debug_npc.data
Compiling 'debug_npc.zon'
+
debug_npc.err
<ACRONYM>VMC</ACRONYM> Done.
+
debug_npc.reset
 +
debug_rm.zon
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means that
+
<PARA>If you have all of these you are all set to go.  If not then there
you have now successfully compiled the zone. The main thing I want to
+
is something seriously wrong and you may want to write the <ACRONYM>VME</ACRONYM> staff for
point out is that you can sometimes fix more than one error at a time
+
help.</PARA>
but be carefull when doing this if you try to fix some errors before
 
fixing the first you will be trying to fix things that are not broken.
 
The safest way to compile stuff is still fix one error at a
 
time.</PARA>
 
  
<PARA>Now that you have a compiled zone you should check and make sure
+
<PARA> To get your new zone in the mud all that is needed is to make
that all the files are thereWhen you compile a zone you will end up
+
sure your zone is in the zonelist in the <ACRONYM>VME</ACRONYM> etc directory and copy
with  three extra files. the files will have the same filename as your zone
+
these files into your zone directory.  Then reboot the mudYou should
with a new extension in this case you should have the following.</PARA>
+
be able to log on your builder character and load your NPC by typing
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<command>load bldragon@dragonst</command> and
 +
you can list your zones NPCs by typing <command>wstat zone dragonst
 +
mobiles</command>.</PARA>
  
debug_npc.data
+
<PARA>There you go you have now compiled your first NPC. As you can see
debug_npc.err
+
with as little as you have learned so far you can already make a variety
debug_npc.reset
+
of monsters and NPCs of any kind. The next section will cover the <ACRONYM>DIL</ACRONYM>
debug_rm.zon
+
functions you can use with a NPC and then we will get right into some
 +
more complex examples.</PARA>
 +
</sect1>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<sect1 id="npcdilfunc">
 +
<TITLE><ACRONYM>DIL</ACRONYM> functions for NPCs</TITLE>
  
<PARA>If you have all of these you are all set to goIf not then there
+
<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own
is something seriously wrong and you may want to write the <ACRONYM>VME</ACRONYM> staff for
+
special functions on rooms, NPCs, objects, PCs, and much moreThis
help.</PARA>
+
manual is for basic zone writing and therefore will not go into how to
 +
write your own <ACRONYM>DIL</ACRONYM> functions.  The <ACRONYM>VME</ACRONYM> however is released with many
 +
functions for you as an Administrator and your builders to use to make
 +
special rooms, NPCs, and objects.  The following is a list of all NPC
 +
functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>
  
<PARA> To get your new zone in the mud all that is needed is to make
+
<variablelist id="var-npcfunc">
sure your zone is in the zonelist in the <ACRONYM>VME</ACRONYM> etc directory and copy
+
<VARLISTENTRY>
these files into your zone directory.  Then reboot the mud.  You should
+
;Mercenary
be able to log on your builder character and load your NPC by typing
+
<DICTDEF>
<command>load bldragon@dragonst</command> and
+
<PARA><indexterm>
you can list your zones NPCs by typing <command>wstat zone dragonst
+
<primary>Mercenary NPC function</primary>
mobiles</command>.</PARA>
+
</indexterm></PARA>
 +
<PARA>
 +
This function allows you to make an NPC hireable by players in the game.  You
 +
simply dilcopy this unto a mob and the player can then type 'contract &lt;character name&gt;
 +
and the mob will hunt that char for a fee. This function takes no special
 +
arguments.  the following is the function definition found in
 +
''function.zon'':</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
 +
 +
dilbegin mercenary_hire();
  
<PARA>There you go you have now compiled your first NPC.  As you can see
+
</PROGRAMLISTING></INFORMALEXAMPLE>
with as little as you have learned so far you can already make a variety
 
of monsters and NPCs of any kind.  The next section will cover the <ACRONYM>DIL</ACRONYM>
 
functions you can use with a NPC and then we will get right into some
 
more complex examples.</PARA>
 
</sect1>
 
  
<sect1 id="npcdilfunc">
+
<PARA>To use it you simply dilcopy it to your NPC as follows:</PARA>
<TITLE><ACRONYM>DIL</ACRONYM> functions for NPCs</TITLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own
+
dilcopy mercenary_hire@function();
special functions on rooms, NPCs, objects, PCs, and much more.  This
 
manual is for basic zone writing and therefore will not go into how to
 
write your own <ACRONYM>DIL</ACRONYM> functions.  The <ACRONYM>VME</ACRONYM> however is released with many
 
functions for you as an Administrator and your builders to use to make
 
special rooms, NPCs, and objects.  The following is a list of all NPC
 
functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>
 
  
<variablelist id="var-npcfunc">
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<VARLISTENTRY>
+
</LISTITEM>
;Mercenary
+
</VARLISTENTRY>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Mercenary NPC function</primary>
 
</indexterm></PARA>
 
<PARA>
 
This function allows you to make an NPC hireable by players in the game.  You
 
simply dilcopy this unto a mob and the player can then type 'contract &lt;character name&gt;
 
and the mob will hunt that char for a fee. This function takes no special
 
arguments.  the following is the function definition found in
 
''function.zon'':</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
 
dilbegin mercenary_hire();
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;Obey
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Obey NPC function</primary>
 +
</indexterm></PARA>
  
<PARA>To use it you simply dilcopy it to your NPC as follows:</PARA>
+
<PARA>This function when dilcopied on the NPC will make it obey there master.  And
<INFORMALEXAMPLE><PROGRAMLISTING>
+
example mobile of this is the familiar. Upon completing a small quest a Mage
 +
receives a familiar that will obey that player and that player only. The player
 +
can simply type <command>Tell &lt;familiar name&gt; cast heal
 +
&lt;player name&gt;</command> and it will carry out the command.  This function takes
 +
no arguments.  The following is the definition found in
 +
''function.zon'':</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy mercenary_hire@function();
+
dilbegin obey();
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
+
<PARA>To use this function simply dilcopy it to the NPC you want to be a
</VARLISTENTRY>
+
mercenary like so:</PARA>
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;Obey
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Obey NPC function</primary>
 
</indexterm></PARA>
 
  
<PARA>This function when dilcopied on the NPC will make it obey there master.  And
+
dilcopy obey@function();
example mobile of this is the familiar. Upon completing a small quest a Mage
 
receives a familiar that will obey that player and that player only. The player
 
can simply type <command>Tell &lt;familiar name&gt; cast heal
 
&lt;player name&gt;</command> and it will carry out the command.  This function takes
 
no arguments.  The following is the definition found in
 
''function.zon'':</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin obey();
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
<PARA>To use this function simply dilcopy it to the NPC you want to be a
+
;Evaluate
mercenary like so:</PARA>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Evaluate NPC function</primary>
 +
</indexterm></PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>This function when placed on an NPC allows it to evaluate items
 +
for a fee.  The function definition looks as follows:</PARA>
  
dilcopy obey@function();
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilbegin evaluate (amt:integer);
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;Evaluate
+
<PARA>The function has one argument 'amt' that lets you set the cost of
<DICTDEF>
+
the evaluation of items.  If you wanted to set the value to four gold it
<PARA><indexterm>
+
would work just like when setting the money field and look as
<primary>Evaluate NPC function</primary>
+
follows:</PARA>
</indexterm></PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>This function when placed on an NPC allows it to evaluate items
+
dilcopy evaluate@function(4*GOLD_PIECE);
for a fee.  The function definition looks as follows:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilbegin evaluate (amt:integer);
+
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
<PARA>The function has one argument 'amt' that lets you set the cost of
+
;Guard Direction
the evaluation of items. If you wanted to set the value to four gold it
+
<DICTDEF>
would work just like when setting the money field and look as
+
<PARA><indexterm>
follows:</PARA>
+
<primary>Guard Direction NPC function</primary>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</indexterm></PARA>
 +
<PARA>   This is an enhanced version of the Guard Way Function. It will allow both
 +
  certain players to enter as well as certain mobs. An optional stop <ACRONYM>DIL</ACRONYM>
 +
  can be supplied if you wish to do something special. It takes two
 +
arguments, the activator and the direction.  The following is the
 +
function definition:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>  
  
dilcopy evaluate@function(4*GOLD_PIECE);
+
dilbegin guard_dir(direction : string, excludepc : stringlist,
 +
                  excludenpc : stringlist, stopdil : string);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>This function is dilcopied onto the mob in the room that the mob is initially
 +
loaded. Thus is the mob is summoned or commanded away it will not block the
 +
directions until it is back to where it was first created. This <ACRONYM>DIL</ACRONYM> takes four
 +
arguments. The first is the direction to block. The second arguments is for those
 +
PC's you wish to allow to pass in that direction without being stopped.  The next
 +
for the NPCs you wish to allow to pass. The last is the 'act you wish the blocking
 +
mob to display to the PC's that are blocked from proceeding in the selected direction.
 +
The third and forth arguments may be 'null', this will pass the defaults to the
 +
dilcopy.  The third argument is a stringlist that tells which players
 +
or NPCs are excluded from the guard.  The forth is a <ACRONYM>DIL</ACRONYM> you can pass in
 +
to do something special to people who are stopped.  We will not show how
 +
to use the forth argument because it takes more <ACRONYM>DIL</ACRONYM> knowledge than this
 +
manual covers.  The following would be a valid dilcopy for this
 +
function:</PARA>
  
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
dilcopy guard_dir@function("south", {"papi",
;Guard Direction
+
{"rejji"}, null, null);
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Guard Direction NPC function</primary>
 
</indexterm></PARA>
 
<PARA>  This is an enhanced version of the Guard Way Function. It will allow both
 
  certain players to enter as well as certain mobs. An optional stop <ACRONYM>DIL</ACRONYM>
 
  can be supplied if you wish to do something special. It takes two
 
arguments, the activator and the direction.  The following is the
 
function definition:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin guard_dir(direction : string, excludepc : stringlist,
+
</PROGRAMLISTING></INFORMALEXAMPLE>
                  excludenpc : stringlist, stopdil : string);
+
</LISTITEM>
 +
</VARLISTENTRY>
  
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
<PARA>This function is dilcopied onto the mob in the room that the mob is initially
 
loaded. Thus is the mob is summoned or commanded away it will not block the
 
directions until it is back to where it was first created. This <ACRONYM>DIL</ACRONYM> takes four
 
arguments. The first is the direction to block. The second arguments is for those
 
PC's you wish to allow to pass in that direction without being stopped.  The next
 
for the NPCs you wish to allow to pass. The last is the 'act you wish the blocking
 
mob to display to the PC's that are blocked from proceeding in the selected direction.
 
The third and forth arguments may be 'null', this will pass the defaults to the
 
dilcopy.  The third argument is a stringlist that tells which players
 
or NPCs are excluded from the guard.  The forth is a <ACRONYM>DIL</ACRONYM> you can pass in
 
to do something special to people who are stopped.  We will not show how
 
to use the forth argument because it takes more <ACRONYM>DIL</ACRONYM> knowledge than this
 
manual covers.  The following would be a valid dilcopy for this
 
function:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;Combat magic
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Combat magic NPC function</primary>
 +
</indexterm></PARA>
 +
<PARA>This function when placed on a mobile allows it to use any of the
 +
combat spells.  The function definition is as follows: It also allows
 +
the NPC to cast heal during combat on itself. </PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy guard_dir@function("south", {"papi",
+
dilbegin combat_mag(atk_spl : string, def_spl : string,
{"rejji"}, null, null);
+
                    def_pct:integer, spd: integer);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
+
<TABLE frame=all tocentry=0>
</VARLISTENTRY>
+
<TITLE>Combat magic arguments</TITLE>
 +
<TGROUP align=left cols=3 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>argument</ENTRY>
 +
<ENTRY>Type</ENTRY>
 +
<ENTRY>description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>atk_spl</ENTRY>
 +
<ENTRY>string</ENTRY>
 +
<ENTRY>Attack spell ie "fireball" or "" for none</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>def_spl</ENTRY>
 +
<ENTRY>string</ENTRY>
 +
<ENTRY>Defense Spell ie "heal" or "" for none</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>def_pct</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>At what % of hitpoints defense spell will be cast</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>spd</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>speed at which mob will uses its attack magic, 1 for all
 +
at once (every round) to 5 for every 5 rounds. I suggest 2.</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
 +
<PARA>Defense spells take priority when the hit points fall below the % specified,
 +
after (if) the hits have been restored above that number attack magic will
 +
resume.  If def_spl is used, function automatically makes sure that it retains
 +
enough mana for at least one healing, ie it will attack 4 times if it don't
 +
need a healing.  The following would be an example of what you would put
 +
on your NPC:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
dilcopy combat_mag@function ("harm", "heal", 25, 2);
;Combat magic
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Combat magic NPC function</primary>
 
</indexterm></PARA>
 
<PARA>This function when placed on a mobile allows it to use any of the
 
combat spells.  The function definition is as follows: It also allows
 
the NPC to cast heal during combat on itself. </PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin combat_mag(atk_spl : string, def_spl : string,
+
</PROGRAMLISTING></INFORMALEXAMPLE>
                    def_pct:integer, spd: integer);
+
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
<TABLE frame=all tocentry=0>
+
;Fido
<TITLE>Combat magic arguments</TITLE>
+
<DICTDEF>
<TGROUP align=left cols=3 colsep=1>
+
<PARA><indexterm>
<THEAD>
+
<primary>Fido NPC function</primary>
<ROW>
+
</indexterm></PARA>
<ENTRY>argument</ENTRY>
+
<PARA>This function turns the NPC into a corpse eating mobile. The
<ENTRY>Type</ENTRY>
+
following is the functions definition:</PARA>
<ENTRY>description</ENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>atk_spl</ENTRY>
 
<ENTRY>string</ENTRY>
 
<ENTRY>Attack spell ie "fireball" or "" for none</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>def_spl</ENTRY>
 
<ENTRY>string</ENTRY>
 
<ENTRY>Defense Spell ie "heal" or "" for none</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>def_pct</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>At what % of hitpoints defense spell will be cast</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>spd</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>speed at which mob will uses its attack magic, 1 for all
 
at once (every round) to 5 for every 5 rounds. I suggest 2.</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>Defense spells take priority when the hit points fall below the % specified,
+
dilbegin fido(txt1:string,txt2:string);
after (if) the hits have been restored above that number attack magic will
 
resume.  If def_spl is used, function automatically makes sure that it retains
 
enough mana for at least one healing, ie it will attack 4 times if it don't
 
need a healing.  The following would be an example of what you would put
 
on your NPC:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy combat_mag@function ("harm", "heal", 25, 2);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<TABLE frame=all tocentry=0>
</LISTITEM>
+
<TITLE>Fido arguments</TITLE>
</VARLISTENTRY>
+
<TGROUP align=left cols=3 colsep=1>
 +
<THEAD>
 +
<ROW>
  
<VARLISTENTRY>
+
<ENTRY>Argument</ENTRY>
;Fido
+
<ENTRY>Type</ENTRY>
<DICTDEF>
+
<ENTRY>description</ENTRY>
<PARA><indexterm>
+
</ROW>
<primary>Fido NPC function</primary>
+
</THEAD>
</indexterm></PARA>
+
<TBODY>
<PARA>This function turns the NPC into a corpse eating mobile. The
+
<ROW>
following is the functions definition:</PARA>
+
<ENTRY>txt1</ENTRY>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<ENTRY>string</ENTRY>
 +
<ENTRY>The text shown when mob finds and eats corpses, default:
 +
                        'XXX savagely devours a corpse.'
 +
                  will be shown if txt1 is set to "".
 +
                  If txt1 is set to "stop", the mob will NOT devour corpses
 +
                  (convenient if you want your dogs to only eat food leftovers
 +
                  but not corpses).
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>txt2</ENTRY>
 +
<ENTRY>string</ENTRY>
 +
<ENTRY>
 +
The text shown when mob finds and eats ITEM_FOOD, default:
 +
                        'XXX hungrily devours YYY.'
 +
                  will be shown if txt2 is set to "".
 +
                  If txt2 is set to "stop", the mob will NOT devour
 +
                  ITEM_FOOD (convenient if you want to make a corpse-eating
 +
                  ghoul, who'd choke on normal food, etc).
 +
</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
dilbegin fido(txt1:string,txt2:string);
+
<NOTE><PARA>In both cases $1n is the mob itself, $2n is the title of the
 +
    item devoured.</PARA></NOTE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>An example of the 'fido' function on an NPC would look as
 +
follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<TABLE frame=all tocentry=0>
+
dilcopy fido@function("$1n slowly devours $2n, crunching the bones.",
<TITLE>Fido arguments</TITLE>
+
                      "$1n grabs $2n and hungrily munches it.");
<TGROUP align=left cols=3 colsep=1>
+
 
<THEAD>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ROW>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<ENTRY>Argument</ENTRY>
+
<VARLISTENTRY>
<ENTRY>Type</ENTRY>
+
;Wander zone
<ENTRY>description</ENTRY>
+
<DICTDEF>
</ROW>
+
<PARA><indexterm>
</THEAD>
+
<primary>Wander zone NPC function</primary>
<TBODY>
+
</indexterm></PARA>
<ROW>
+
<PARA>This function allows a mob to wander around more than one zone, but not all zones.
<ENTRY>txt1</ENTRY>
+
You specify what zones the mob can wander. Has optional intelligence which allows
<ENTRY>string</ENTRY>
+
the opening and closing of doors. The following is the function
<ENTRY>The text shown when mob finds and eats corpses, default:
+
definition:</PARA>
                        'XXX savagely devours a corpse.'
+
<INFORMALEXAMPLE><PROGRAMLISTING>
                  will be shown if txt1 is set to "".
 
                  If txt1 is set to "stop", the mob will NOT devour corpses
 
                  (convenient if you want your dogs to only eat food leftovers
 
                  but not corpses).
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>txt2</ENTRY>
 
<ENTRY>string</ENTRY>
 
<ENTRY>
 
The text shown when mob finds and eats ITEM_FOOD, default:
 
                        'XXX hungrily devours YYY.'
 
                  will be shown if txt2 is set to "".
 
                  If txt2 is set to "stop", the mob will NOT devour
 
                  ITEM_FOOD (convenient if you want to make a corpse-eating
 
                  ghoul, who'd choke on normal food, etc).
 
</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<NOTE><PARA>In both cases $1n is the mob itself, $2n is the title of the
+
dilbegin wander_zones(zones : string, spd : integer, doors : integer,
    item devoured.</PARA></NOTE>
+
                      lckd_doors : integer);
 +
 
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<TABLE frame=all tocentry=0>
 +
<TITLE>Zone wander arguments</TITLE>
 +
<TGROUP align=left cols=3 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>argument</ENTRY>
 +
<ENTRY>Type</ENTRY>
 +
<ENTRY>description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>zones</ENTRY>
 +
<ENTRY>string</ENTRY>
 +
<ENTRY>A string of zone names separated by spaces.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>spd</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>The speed (in seconds) at which the mob wanders.
 +
                              Minimum = 5 secs (for process time).</ENTRY>
 +
  </ROW>
 +
<ROW>
 +
<ENTRY>doors</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>Can open/close doors (0 = false, 1 = true)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>lckd_doors</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>Can open/closed locked doors (0=false, 1=true)</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<PARA>An example of the 'fido' function on an NPC would look as
+
<PARA>The options are not too hard so we will show how to use it and
follows:</PARA>
+
leave it at that</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy fido@function("$1n slowly devours $2n, crunching the bones.",
+
dilcopy wander_zones@function ("halfzon haon_dor", 5, 1);
                      "$1n grabs $2n and hungrily munches it.");
 
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;Wander zone
+
<NOTE><PARA>@loadzone option which is used by inputting @loadzone
<DICTDEF>
+
somewhere in the zones string will replace it by the zone the mob is
<PARA><indexterm>
+
loaded in like this:
<primary>Wander zone NPC function</primary>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</indexterm></PARA>
 
<PARA>This function allows a mob to wander around more than one zone, but not all zones.
 
You specify what zones the mob can wander.  Has optional intelligence which allows
 
the opening and closing of doors.  The following is the function
 
definition:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin wander_zones(zones : string, spd : integer, doors : integer,
+
dilcopy wander_zones@function ("halfzon haon_dor @loadzone", 5, 1);
                      lckd_doors : integer);
+
                     
 
+
</PROGRAMLISTING></INFORMALEXAMPLE></PARA>
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</NOTE>
<TABLE frame=all tocentry=0>
+
</LISTITEM>
<TITLE>Zone wander arguments</TITLE>
+
</VARLISTENTRY>
<TGROUP align=left cols=3 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>argument</ENTRY>
 
<ENTRY>Type</ENTRY>
 
<ENTRY>description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>zones</ENTRY>
 
<ENTRY>string</ENTRY>
 
<ENTRY>A string of zone names separated by spaces.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>spd</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>The speed (in seconds) at which the mob wanders.
 
                              Minimum = 5 secs (for process time).</ENTRY>
 
  </ROW>
 
<ROW>
 
<ENTRY>doors</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>Can open/close doors (0 = false, 1 = true)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>lckd_doors</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>Can open/closed locked doors (0=false, 1=true)</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>The options are not too hard so we will show how to use it and
+
<VARLISTENTRY>
leave it at that</PARA>
+
;Global wander
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Global wander NPC function</primary>
 +
</indexterm></PARA>
 +
<PARA>This is similar to wander_zones because it's just a modified version of it,
 +
which requires no zones argument since it moves in all zones.  The
 +
following is the function definition:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy wander_zones@function ("halfzon haon_dor", 5, 1);
+
dilbegin global_wander(spd : integer, doors : integer,
 +
                      lckd_doors :integer);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<NOTE><PARA>@loadzone option which is used by inputting @loadzone
 
somewhere in the zones string will replace it by the zone the mob is
 
loaded in like this:
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy wander_zones@function ("halfzon haon_dor @loadzone", 5, 1);
+
<TABLE frame=all tocentry=0>
                     
+
<TITLE>Global wander arguments</TITLE>
</PROGRAMLISTING></INFORMALEXAMPLE></PARA>
+
<TGROUP align=left cols=3 colsep=1>
</NOTE>
+
<THEAD>
</LISTITEM>
+
<ROW>
</VARLISTENTRY>
+
<ENTRY>argument</ENTRY>
 +
<ENTRY>Type</ENTRY>
 +
<ENTRY>description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>spd</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>The speed (in seconds) at which the mob wanders.
 +
                              Minimum = 5 seconds (for process time).</ENTRY>
 +
  </ROW>
 +
<ROW>
 +
<ENTRY>doors</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>Can open/close doors (0 = false, 1 = true)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>lckd_doors</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>Can open/closed locked doors (0=false, 1=true)</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<VARLISTENTRY>
+
<PARA>The options are not to hard so we will show how to use it and
;Global wander
+
leave it at that</PARA>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Global wander NPC function</primary>
 
</indexterm></PARA>
 
<PARA>This is similar to wander_zones because it's just a modified version of it,
 
which requires no zones argument since it moves in all zones.  The
 
following is the function definition:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin global_wander(spd : integer, doors : integer,
+
<INFORMALEXAMPLE><PROGRAMLISTING>
                      lckd_doors :integer);
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilcopy global_wander@function (60, 1, 1);
  
<TABLE frame=all tocentry=0>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>Global wander arguments</TITLE>
+
</LISTITEM>
<TGROUP align=left cols=3 colsep=1>
+
</VARLISTENTRY>
<THEAD>
 
<ROW>
 
<ENTRY>argument</ENTRY>
 
<ENTRY>Type</ENTRY>
 
<ENTRY>description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>spd</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>The speed (in seconds) at which the mob wanders.
 
                              Minimum = 5 seconds (for process time).</ENTRY>
 
  </ROW>
 
<ROW>
 
<ENTRY>doors</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>Can open/close doors (0 = false, 1 = true)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>lckd_doors</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>Can open/closed locked doors (0=false, 1=true)</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>The options are not to hard so we will show how to use it and
+
<VARLISTENTRY>
leave it at that</PARA>
+
;Team work
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Team work NPC function</primary>
 +
</indexterm></PARA>
 +
<PARA>This function when placed on a mob, located in the same room as another mob,
 +
will allow the mobile to assist the other in combat.  The following is
 +
the function definition:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilbegin aware teamwork(lst: string);
  
dilcopy global_wander@function (60, 1, 1);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This function takes one argument which is a string of the mobiles it is
</LISTITEM>
+
to protect. So if we wanted a NPC to protect both Jesper and Enver the
</VARLISTENTRY>
+
dilcopy would look as follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
dilcopy teamwork@function("jesper/enver");
;Team work
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Team work NPC function</primary>
 
</indexterm></PARA>
 
<PARA>This function when placed on a mob, located in the same room as another mob,
 
will allow the mobile to assist the other in combat.  The following is
 
the function definition:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin aware teamwork(lst: string);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<NOTE><PARA>For this to work both mobs must be in the same room or following
 +
      each other.</PARA></NOTE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>This function takes one argument which is a string of the mobiles it is
+
<VARLISTENTRY>
to protect. So if we wanted a NPC to protect both Jesper and Enver the
+
;Rescue
dilcopy would look as follows:</PARA>
+
<DICTDEF>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA><indexterm>
 +
<primary>Rescue NPC function</primary>
 +
</indexterm></PARA>
 +
<PARA>This function when placed on a mob, located in the same room as another mob,
 +
will allow the mobile to rescue the other mob if it is attacked. The
 +
function is as follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy teamwork@function("jesper/enver");
+
dilbegin aware rescue(lst: string);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<NOTE><PARA>For this to work both mobs must be in the same room or following
+
<PARA>This function takes one argument, a string of those mobiles
      each other.</PARA></NOTE>
+
you wish this NPC to assist should they be attacked.</PARA>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<NOTE><PARA>
;Rescue
+
For this to work both NPCs must be in the same room or following
<DICTDEF>
+
      each other.</PARA></NOTE>
<PARA><indexterm>
+
 
<primary>Rescue NPC function</primary>
+
  <PARA>Again we will use our test subjects Jesper and Enver and if
</indexterm></PARA>
+
we wanted an NPC to protect them and come to their aid the following
<PARA>This function when placed on a mob, located in the same room as another mob,
+
would be the dilcopy:</PARA>
will allow the mobile to rescue the other mob if it is attacked.  The
+
<INFORMALEXAMPLE><PROGRAMLISTING>
function is as follows:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin aware rescue(lst: string);
+
dilcopy teamwork@function("jesper/enver");
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>This function takes one argument, a string of those mobiles
+
<VARLISTENTRY>
you wish this NPC to assist should they be attacked.</PARA>
+
;Agressive
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Agressive NPC function</primary>
 +
</indexterm></PARA>
 +
<PARA>This function makes a Mob hostile to person(s) in the room with it, under
 +
certain conditions which are provided as arguments.
 +
In short, the all-singing, all-dancing aggression <ACRONYM>DIL</ACRONYM>.  The following is
 +
this functions definition:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<NOTE><PARA>
+
dilbegin aggressive (sx : integer, rce : integer, opp : integer,
For this to work both NPCs must be in the same room or following
+
                    levl : integer, sanc : integer, tme : integer,
      each other.</PARA></NOTE>
+
                    tar : integer, align : string, attack :
 
+
                    stringlist);
  <PARA>Again we will use our test subjects Jesper and Enver and if
+
we wanted an NPC to protect them and come to their aid the following
+
</PROGRAMLISTING></INFORMALEXAMPLE>
would be the dilcopy:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy teamwork@function("jesper/enver");
+
<TABLE frame=all tocentry=0>
 +
<TITLE>Agressive arguments</TITLE>
 +
<TGROUP align=left cols=3 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>argument</ENTRY>
 +
<ENTRY>Type</ENTRY>
 +
<ENTRY>description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>sx</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>NOTE: not the sex values in values.h.
 +
                                This decides the sex of your mob's
 +
                                victim.
 +
                                0 - Sex doesn't matter,
 +
                                1 - Attack opposite sex to self (if not
 +
                                    neutral!),
 +
                                2 - Attack SEX_MALE,
 +
                                3 - Attack SEX_FEMALE,
 +
                                4 - Attack SEX_NEUTRAL.
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ENTRY>rce</ENTRY>
</LISTITEM>
+
<ENTRY>integer</ENTRY>
</VARLISTENTRY>
+
<ENTRY>Any of the PC races from 0 to 14. A value
 +
                                of -1 means we don't care about the
 +
                                victim's race.
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>opp</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>0 - Non race specific (same as rce := -1)
 +
                                1 - Attack the specified rce,
 +
2 - Attack any pc race _but_ the specified rce.
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>levl</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>
 +
Allow level specific aggression.
 +
                                A value of 30 would make the mob hostile
 +
                                to all pcs level 30 and above.
 +
                                A value of -30 (note the -) would make the
 +
                                mob hostile to all pcs level 30 or below.
 +
                                A value of 0 means level doesn't matter.
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>sanc</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>
 +
Does this mob obey the sanc/soothe rules?
 +
                                (ie, if someone has cast sanctuary on
 +
                                themselves, will this mob recognize it, and
 +
                                not attack, or attack anyway).
 +
                                0 - Doesn't obey sanc or soothe
 +
                                1 - Obeys only sanc
 +
                                2 - Obeys only soothe
 +
                                3 - Obeys both sanc and soothe
 +
                                (SOOTHE is a new spell for ranger's guild)
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>tme</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>Time in ticks to wait before attacking (is
 +
                                automatically put to RANTIME, ie, time
 +
                                variance of time-time/2 to time+time/2).
 +
                                Values accepted are from 0 to 400 (that's
 +
                                0 - 100 seconds. Can be specified using
 +
                                PULSE_SEC).
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>tar</ENTRY>
 +
<ENTRY>integer</ENTRY>
 +
<ENTRY>
 +
This is a special value which determines
 +
                                which of the eligible victims we pick.
 +
                                -2 - Last eligible victim to into the room.
 +
                                -1 - Weakest eligible victim in room.
 +
                                0  - Random eligible victim.
 +
                                +1 - Strongest eligible victim in room.
 +
+2 - First eligible victim into the room.
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>align</ENTRY>
 +
<ENTRY>string</ENTRY>
 +
<ENTRY>
 +
The desired alignment of the victim.
 +
                                "ANY"      - We don't care about the alignment.
 +
                                "GOOD"    - Attack only good alignment.
 +
                                "EVIL"    - Attack only evil alignment.
 +
                                "NEUTRAL " - Attack only neutral alignment.
 +
                                "OPPOSITE" - Attack opposite alignment to self
 +
                                (provided self isn't neutral).
 +
"SALIGN" - Attack same alignment as self.
 +
                                "DALIGN" - Attack any alignment
 +
                                different to self.
 +
</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>attack</ENTRY>
 +
<ENTRY>stringlist</ENTRY>
 +
<ENTRY>
 +
This is a 2 string stringlist. These are
 +
                                    the messages sent to the people in the room
 +
                                    except the victim, and the victim itself,
 +
                                    in that order.
 +
                                    If the second (victim) string is "", the
 +
                                    first string will be shown to the victim,
 +
                                    as if they were anyone else in the room.
 +
                                    You can leave both blank if you wish.
 +
                                    $1n is the mob name (self), $3n is the
 +
                                    victim's name.
 +
                                    NOTE: the $ values only apply if you supply
 +
                                    BOTH string 1 and 2.
 +
</ENTRY>
 +
</ROW>
 +
</TBODY>
 +
</TGROUP>
 +
</TABLE>
  
<VARLISTENTRY>
 
;Agressive
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Agressive NPC function</primary>
 
</indexterm></PARA>
 
<PARA>This function makes a Mob hostile to person(s) in the room with it, under
 
certain conditions which are provided as arguments.
 
In short, the all-singing, all-dancing aggression <ACRONYM>DIL</ACRONYM>.  The following is
 
this functions definition:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin aggressive (sx : integer, rce : integer, opp : integer,
+
<PARA>The argument descriptions pretty much explain everything there is
                    levl : integer, sanc : integer, tme : integer,
+
to know about the agressive function and what it was so we will finish
                    tar : integer, align : string, attack :
+
off by giving an example of a dilcopy that will create a NPC that fits
                    stringlist);
+
the following description</PARA>
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<TABLE frame=all tocentry=0>
+
<PARA>Let's say our mob is a level 40 Goblin who doesn't like
<TITLE>Agressive arguments</TITLE>
+
dwarves. He's very particular in that he doesn't like evil female
<TGROUP align=left cols=3 colsep=1>
+
dwarves who are level 20 and above. He does recognize the sanctuary
<THEAD>
+
spell, but he doesn't recognize soothe, and he'll wait 10 seconds on
<ROW>
+
average before he attacks. The 2 messages sent are: "$1n savagely
<ENTRY>argument</ENTRY>
+
attacks $3n with his big axe!" and "$1n attacks you!"</PARA>
<ENTRY>Type</ENTRY>
 
<ENTRY>description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>sx</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>NOTE: not the sex values in values.h.
 
                                This decides the sex of your mob's
 
                                victim.
 
                                0 - Sex doesn't matter,
 
                                1 - Attack opposite sex to self (if not
 
                                    neutral!),
 
                                2 - Attack SEX_MALE,
 
                                3 - Attack SEX_FEMALE,
 
                                4 - Attack SEX_NEUTRAL.
 
</ENTRY>
 
</ROW>
 
<ROW>
 
  
<ENTRY>rce</ENTRY>
+
<PARA>Here's what the function call would look like:</PARA>
<ENTRY>integer</ENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>Any of the PC races from 0 to 14. A value
 
                                of -1 means we don't care about the
 
                                victim's race.
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>opp</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>0 - Non race specific (same as rce := -1)
 
                                1 - Attack the specified rce,
 
2 - Attack any pc race _but_ the specified rce.
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>levl</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>
 
Allow level specific aggression.
 
                                A value of 30 would make the mob hostile
 
                                to all pcs level 30 and above.
 
                                A value of -30 (note the -) would make the
 
                                mob hostile to all pcs level 30 or below.
 
                                A value of 0 means level doesn't matter.
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>sanc</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>
 
Does this mob obey the sanc/soothe rules?
 
                                (ie, if someone has cast sanctuary on
 
                                themselves, will this mob recognize it, and
 
                                not attack, or attack anyway).
 
                                0 - Doesn't obey sanc or soothe
 
                                1 - Obeys only sanc
 
                                2 - Obeys only soothe
 
                                3 - Obeys both sanc and soothe
 
                                (SOOTHE is a new spell for ranger's guild)
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>tme</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>Time in ticks to wait before attacking (is
 
                                automatically put to RANTIME, ie, time
 
                                variance of time-time/2 to time+time/2).
 
                                Values accepted are from 0 to 400 (that's
 
                                0 - 100 seconds. Can be specified using
 
                                PULSE_SEC).
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>tar</ENTRY>
 
<ENTRY>integer</ENTRY>
 
<ENTRY>
 
This is a special value which determines
 
                                which of the eligible victims we pick.
 
                                -2 - Last eligible victim to into the room.
 
                                -1 - Weakest eligible victim in room.
 
                                0  - Random eligible victim.
 
                                +1 - Strongest eligible victim in room.
 
+2 - First eligible victim into the room.
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>align</ENTRY>
 
<ENTRY>string</ENTRY>
 
<ENTRY>
 
The desired alignment of the victim.
 
                                "ANY"      - We don't care about the alignment.
 
                                "GOOD"    - Attack only good alignment.
 
                                "EVIL"    - Attack only evil alignment.
 
                                "NEUTRAL " - Attack only neutral alignment.
 
                                "OPPOSITE" - Attack opposite alignment to self
 
                                (provided self isn't neutral).
 
"SALIGN" - Attack same alignment as self.
 
                                "DALIGN" - Attack any alignment
 
                                different to self.
 
</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>attack</ENTRY>
 
<ENTRY>stringlist</ENTRY>
 
<ENTRY>
 
This is a 2 string stringlist. These are
 
                                    the messages sent to the people in the room
 
                                    except the victim, and the victim itself,
 
                                    in that order.
 
                                    If the second (victim) string is "", the
 
                                    first string will be shown to the victim,
 
                                    as if they were anyone else in the room.
 
                                    You can leave both blank if you wish.
 
                                    $1n is the mob name (self), $3n is the
 
                                    victim's name.
 
                                    NOTE: the $ values only apply if you supply
 
                                    BOTH string 1 and 2.
 
</ENTRY>
 
</ROW>
 
</TBODY>
 
</TGROUP>
 
</TABLE>
 
  
 +
dilcopy aggressive (3, 2, 1, 20, 2, PULSE_SEC*10, 0, "EVIL",
 +
                    {"$1n savagely attacks $3n with his big axe!",
 +
                    "$1n attacks you!"});
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>In this example, 3 (attack females), 2 (attack dwarves), 1 (just dwarves),
 +
  20 (Level 20+ victims), 2 (obey only soothe), PULSE_SEC*10
 +
(wait around 10 seconds before attacking), EVIL (attack only
 +
evil), and the strings in the stringlist are displayed to
 +
the victim and the room, in that order.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>The argument descriptions pretty much explain everything there is
+
<VARLISTENTRY>
to know about the agressive function and what it was so we will finish
+
;Janitors
off by giving an example of a dilcopy that will create a NPC that fits
+
<DICTDEF>
the following description</PARA>
+
<PARA><indexterm>
 +
<primary>Janitors NPC function</primary>
 +
</indexterm></PARA>
  
<PARA>Let's say our mob is a level 40 Goblin who doesn't like
+
<PARA>This function turns the NPC into a janitor that will pick up items left
dwarves. He's very particular in that he doesn't like evil female
+
lying around and will also tell new  players. those under level 20,
dwarves who are level 20 and above. He does recognize the sanctuary
+
where there corpse is if they come across it in there wanderings.
spell, but he doesn't recognize soothe, and he'll wait 10 seconds on
+
You must also supply the wander_zone <ACRONYM>DIL</ACRONYM> for this to work correctly.
average before he attacks. The 2 messages sent are: "$1n savagely
+
The definition for the janitor function is as follows:</PARA>
attacks $3n with his big axe!" and "$1n attacks you!"</PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Here's what the function call would look like:</PARA>
+
dilbegin janitors(rate: integer);
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy aggressive (3, 2, 1, 20, 2, PULSE_SEC*10, 0, "EVIL",
+
</PROGRAMLISTING></INFORMALEXAMPLE>
                    {"$1n savagely attacks $3n with his big axe!",
+
<PARA>The Janitor function only takes one argument and that determines
                    "$1n attacks you!"});
+
how fast the janitor will pick up stuff in seconds.</PARA>
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
 
<PARA>In this example, 3 (attack females), 2 (attack dwarves), 1 (just dwarves),
 
  20 (Level 20+ victims), 2 (obey only soothe), PULSE_SEC*10
 
(wait around 10 seconds before attacking), EVIL (attack only
 
evil), and the strings in the stringlist are displayed to
 
the victim and the room, in that order.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>To make a Janitor that will pick up stuff every thirty seconds the
;Janitors
+
following would be the dilcopy:</PARA>
<DICTDEF>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<PARA><indexterm>
 
<primary>Janitors NPC function</primary>
 
</indexterm></PARA>
 
  
<PARA>This function turns the NPC into a janitor that will pick up items left
+
dilcopy janitor@function(30);
lying around and will also tell new  players. those under level 20,
 
where there corpse is if they come across it in there wanderings.
 
You must also supply the wander_zone <ACRONYM>DIL</ACRONYM> for this to work correctly.
 
The definition for the janitor function is as follows:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin janitors(rate: integer);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
<PARA>The Janitor function only takes one argument and that determines
+
;Shop Keeper
how fast the janitor will pick up stuff in seconds.</PARA>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Shop Keeper NPC function</primary>
 +
</indexterm></PARA>
 +
<PARA>This is one of the more complex dilcopies and considered by some to be
 +
confusing. Below I will step you through the creation of the mobile,
 +
and the application of this <ACRONYM>DIL</ACRONYM> using defines to hopefully simplify the
 +
use of this function. The function is defined as:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>To make a Janitor that will pick up stuff every thirty seconds the
+
dilbegin aware shopkeeper(prod: stringlist, custom_acts : stringlist,
following would be the dilcopy:</PARA>
+
                            opentimes : stringlist, itemtype: string,
<INFORMALEXAMPLE><PROGRAMLISTING>
+
sellprofit : integer,buyprofit: integer,
 +
maxcash : integer,closedil : string,
 +
dilparams : string );
  
dilcopy janitor@function(30);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARIABLELIST>
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;Step 1
 +
<DICTDEF>
 +
<PARA>First, figure out what you want your shopkeeper to sell.  He can sell
 +
pretty much any item from any zone, as long as you know its symbolic
 +
name.
 +
For Hogan (our example shopkeeper), he is a bartender, so he sells things
 +
you would commonly find in a pub, tavern, or bar.
 +
His list of items (their symbolic names at which zone) are:</PARA>
  
<VARLISTENTRY>
 
;Shop Keeper
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Shop Keeper NPC function</primary>
 
</indexterm></PARA>
 
<PARA>This is one of the more complex dilcopies and considered by some to be
 
confusing. Below I will step you through the creation of the mobile,
 
and the application of this <ACRONYM>DIL</ACRONYM> using defines to hopefully simplify the
 
use of this function.  The function is defined as:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin aware shopkeeper(prod: stringlist, custom_acts : stringlist,
+
<INFORMALEXAMPLE><PROGRAMLISTING>
                            opentimes : stringlist, itemtype: string,
 
sellprofit : integer,buyprofit: integer,
 
maxcash : integer,closedil : string,
 
dilparams : string );
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
grain_alcohol@gobtown1
 +
pretzels@gobtown1
 +
beer_nuts@gobtown1
 +
rum_coke@gobtown1
 +
tuborg@udgaard
  
<VARIABLELIST>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<VARLISTENTRY>
 
;Step 1
 
<DICTDEF>
 
<PARA>First, figure out what you want your shopkeeper to sell.  He can sell
 
pretty much any item from any zone, as long as you know its symbolic
 
name.
 
For Hogan (our example shopkeeper), he is a bartender, so he sells things
 
you would commonly find in a pub, tavern, or bar.
 
His list of items (their symbolic names at which zone) are:</PARA>
 
  
 +
<PARA>Now, since I use defines, I make a define for Hogan's products.  I called
 +
it TAVERN_PROD (for tavern's products).  And use the following setup
 +
and just stick the names of your items in where his items are. 
 +
Each item will have a setup like this:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
"tuborg@udgaard 15 20" 
  
grain_alcohol@gobtown1
+
</PROGRAMLISTING></INFORMALEXAMPLE>
pretzels@gobtown1
 
beer_nuts@gobtown1
 
rum_coke@gobtown1
 
tuborg@udgaard
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>Now, since I use defines, I make a define for Hogan's products.  I called
+
<PARA>A symbolic name followed by two numbers, with the entire thing in
it TAVERN_PROD (for tavern's products).  And use the following setup
+
quotesWhere :</PARA>
and just stick the names of your items in where his items are.   
 
Each item will have a setup like this:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
"tuborg@udgaard 15 20
+
<itemizedlist>
 +
<LISTITEM><PARA>The "tuborg@udgaard" is your item's symbolic name</PARA></LISTITEM>
 +
<LISTITEM><PARA>The 15 (our first number in the string) is the number of that item that
 +
  will load into your shop daily</PARA></LISTITEM>
 +
<LISTITEM><PARA>The 20 (our second number in the string) is the limit available of that
 +
  item in the shop ever</PARA></LISTITEM>
 +
</itemizedlist>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>So this shop would sell tuborgs.. and every mudday, 15 tuborgs will load
 +
into our shop to replenish our stock.. and the maximum tuborgs we can have
 +
at any given time is 20.</PARA>
  
 +
<PARA>Next we place all this info into the define we created above, which would look
 +
like this:</PARA>
  
<PARA>A symbolic name followed by two numbers, with the entire thing in
+
<INFORMALEXAMPLE><PROGRAMLISTING>
quotes.  Where :</PARA>
 
  
<itemizedlist>
+
#define TAVERN_PROD \
<LISTITEM><PARA>The "tuborg@udgaard" is your item's symbolic name</PARA></LISTITEM>
+
{"grain_alcohol@gobtown1 15 20", \
<LISTITEM><PARA>The 15 (our first number in the string) is the number of that item that
+
"pretzels@gobtown1 10 15", \
  will load into your shop daily</PARA></LISTITEM>
+
"beer_nuts@gobtown1 15 20", \
<LISTITEM><PARA>The 20 (our second number in the string) is the limit available of that
+
"rum_coke@gobtown1 10 15", \
  item in the shop ever</PARA></LISTITEM>  
+
"tuborg@udgaard 15 20"}
</itemizedlist>
+
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>So this shop would sell tuborgs.. and every mudday, 15 tuborgs will load
+
<PARA>The above is my define for Hogan's products that he sells. Each one is in
into our shop to replenish our stock.. and the maximum tuborgs we can have
+
quotes and they have commas separating them. If you put each item on its
at any given time is 20.</PARA>
+
own separate line, you need to put a space and then a back slash after the
 +
comma which separates the items, like it shows above.  The entire define
 +
is enclosed in curly brackets, {}.
 +
Now we are finished with the items he sells.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>Next we place all this info into the define we created above, which would look
 
like this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 
+
;Step 2
#define TAVERN_PROD \
+
<DICTDEF>
{"grain_alcohol@gobtown1 15 20", \
+
<PARA>Now you must decide what kind of dialogue you would like your
"pretzels@gobtown1 10 15", \
+
shopkeeper to say.  There are ten separate responses you can make for your
"beer_nuts@gobtown1 15 20", \
+
shopkeeper.  They do go in a specific order and I will list what each do.</PARA>
"rum_coke@gobtown1 10 15", \
+
<VARIABLELIST>
"tuborg@udgaard 15 20"}
+
<VARLISTENTRY>
+
;Response 1
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<DICTDEF>
 
+
<PARA>The first response will be used if the shopkeeper doesn't have the
<PARA>The above is my define for Hogan's products that he sells. Each one is in
+
particular item you're trying to buy in stock, or if he doesn't sell that
quotes and they have commas separating them. If you put each item on its
+
item at all.</PARA>
own separate line, you need to put a space and then a back slash after the
+
</LISTITEM>
comma which separates the items, like it shows above. The entire define
+
</VARLISTENTRY>
is enclosed in curly brackets, {}.  
+
<VARLISTENTRY>
Now we are finished with the items he sells.</PARA>
+
;Response 2
</LISTITEM>
+
<DICTDEF>
</VARLISTENTRY>
+
<PARA>The second response is used when the player is trying to sell the
 +
shopkeeper something which the player does not have in his inventory. Items
 +
worn by the player can not be sold until removed from there worn position.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 3
 +
<DICTDEF>
 +
<PARA>The third response is used when the player is trying to sell the shopkeeper
 +
something that is not one of those of his trade types. (This will be more
 +
clear when we get to the trade type part below. Such as a player trying to sell
 +
our bartender a canoe. =)</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 4
 +
<DICTDEF>
 +
<PARA>The fourth response is used when the player tries to buy something from the
 +
shopkeeper, but doesn't have enough money to buy it.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 5
 +
<DICTDEF>
 +
<PARA>The fifth response is used when the sale was successful and the player
 +
buys something from the shopkeeper.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 6
 +
<DICTDEF>
 +
<PARA>The sixth response is again used when the sale was successful, but this
 +
time it's for when the player successfully sells something to the
 +
shopkeeper.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 7
 +
<DICTDEF>
 +
<PARA>The seventh response is used when the shopkeeper doesn't have enough of the
 +
item to sell as the player requests. Such as someone trying to buy 10
 +
tuborgs, but our bartender only has 9.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 8
 +
<DICTDEF>
 +
<PARA>The eighth response is Used when the shop is closed and a player tries to
 +
buy something from or sell something to the shopkeeper.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 9
 +
<DICTDEF>
 +
<PARA>The ninth response is used when the player tries to sell an item to the
 +
shopkeeper that the shopkeeper doesn't trade that item.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Response 10
 +
<DICTDEF>
 +
<PARA>The tenth (and last!) response is for when the shopkeeper has run out of
 +
money and can't afford to buy what the player is trying to sell him.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
 +
<PARA>Now. again, I made a define called TAVERN_MSG (for tavern messages) and I
 +
placed all my responses in it.  Don't forget, they do go in that specific
 +
order!  And below is our setup with responses in it.</PARA>
  
<VARLISTENTRY>
+
<NOTE><PARA>In the responses below, $1n refers to the shopkeeper, $2n refers
;Step 2
+
to the item being sold, bought, etc.. and $3n refers to the person dealing
<DICTDEF>
+
with the shopkeeper.</PARA></NOTE>
<PARA>Now you must decide what kind of dialogue you would like your
 
shopkeeper to say.  There are ten separate responses you can make for your
 
shopkeeper.  They do go in a specific order and I will list what each do.</PARA>
 
<VARIABLELIST>
 
<VARLISTENTRY>
 
;Response 1
 
<DICTDEF>
 
<PARA>The first response will be used if the shopkeeper doesn't have the
 
particular item you're trying to buy in stock, or if he doesn't sell that
 
item at all.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 2
 
<DICTDEF>
 
<PARA>The second response is used when the player is trying to sell the
 
shopkeeper something which the player does not have in his inventory. Items
 
worn by the player can not be sold until removed from there worn position.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 3
 
<DICTDEF>
 
<PARA>The third response is used when the player is trying to sell the shopkeeper
 
something that is not one of those of his trade types. (This will be more
 
clear when we get to the trade type part below. Such as a player trying to sell
 
our bartender a canoe. =)</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 4
 
<DICTDEF>
 
<PARA>The fourth response is used when the player tries to buy something from the
 
shopkeeper, but doesn't have enough money to buy it.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 5
 
<DICTDEF>
 
<PARA>The fifth response is used when the sale was successful and the player
 
buys something from the shopkeeper.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 6
 
<DICTDEF>
 
<PARA>The sixth response is again used when the sale was successful, but this
 
time it's for when the player successfully sells something to the
 
shopkeeper.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 7
 
<DICTDEF>
 
<PARA>The seventh response is used when the shopkeeper doesn't have enough of the
 
item to sell as the player requests. Such as someone trying to buy 10
 
tuborgs, but our bartender only has 9.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 8
 
<DICTDEF>
 
<PARA>The eighth response is Used when the shop is closed and a player tries to
 
buy something from or sell something to the shopkeeper.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 9
 
<DICTDEF>
 
<PARA>The ninth response is used when the player tries to sell an item to the
 
shopkeeper that the shopkeeper doesn't trade that item.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Response 10
 
<DICTDEF>
 
<PARA>The tenth (and last!) response is for when the shopkeeper has run out of
 
money and can't afford to buy what the player is trying to sell him.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<PARA>Now. again, I made a define called TAVERN_MSG (for tavern messages) and I
+
<INFORMALEXAMPLE><PROGRAMLISTING>
placed all my responses in it.  Don't forget, they do go in that specific
 
order!  And below is our setup with responses in it.</PARA>
 
  
<NOTE><PARA>In the responses below, $1n refers to the shopkeeper, $2n refers
+
#define TAVERN_MSG \
to the item being sold, bought, etc.. and $3n refers to the person dealing
+
{"$1n says, 'This is a tavern, I don't sell such an item as that!'", \
with the shopkeeper.</PARA></NOTE>
+
"$1n says, '$3n, you don't even have that!'", \
 +
"$1n says, 'I don't trade with things such as $2n! Just buy a beer!'", \
 +
"$1n says, '$3n, you can't afford $2n.'", \
 +
"$1n says, 'Thank you, $3n, here are %s for $2n.'", \
 +
"$1n says, 'Thank you, $3n.'", \
 +
"$1n says, 'I don't have that many $2ns in stock.'", \
 +
"$1n says, 'I'm on break, come back later.'", \
 +
"$1n says, 'I haven't got a use for $2n.'", \
 +
"$1n says, 'I'd like to buy it, but I can't afford it, sorry.'"} \
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Just like with the items, the responses are in quotes, and are separated
 +
with commas.  Since I put each on their own separate lines (for neatness
 +
sake), I put a space and a back slash, \, after each.  The entire define is
 +
enclosed in curly braces,{}.
 +
And then you're done with your shopkeeper's messages!
 +
Don't worry, it gets simpler from here.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Step 3
 +
<DICTDEF>
 +
<PARA>Now we get to decide when we want our shop to be open.  We get to use
 +
military time, so 1 refers to 1am, 6 refers to 6am, 12 refers to 12pm
 +
(noon), 18 refers to 6pm, and both 0 and 24 refer to 12am (midnight)..
 +
etc.. =)
 +
And my define for this I named TAVERN_OPEN_TIMES (for when the tavern is
 +
open) and I used the following setup:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define TAVERN_MSG \
+
#define TAVERN_OPEN_TIMES {"12","18"}
{"$1n says, 'This is a tavern, I don't sell such an item as that!'", \
 
"$1n says, '$3n, you don't even have that!'", \
 
"$1n says, 'I don't trade with things such as $2n! Just buy a beer!'", \
 
"$1n says, '$3n, you can't afford $2n.'", \
 
"$1n says, 'Thank you, $3n, here are %s for $2n.'", \
 
"$1n says, 'Thank you, $3n.'", \
 
"$1n says, 'I don't have that many $2ns in stock.'", \
 
"$1n says, 'I'm on break, come back later.'", \
 
"$1n says, 'I haven't got a use for $2n.'", \
 
"$1n says, 'I'd like to buy it, but I can't afford it, sorry.'"} \
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>Just like with the items, the responses are in quotes, and are separated
+
</PROGRAMLISTING></INFORMALEXAMPLE>
with commas.  Since I put each on their own separate lines (for neatness
 
sake), I put a space and a back slash, \, after each.  The entire define is
 
enclosed in curly braces,{}.
 
And then you're done with your shopkeeper's messages!
 
Don't worry, it gets simpler from here.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Step 3
 
<DICTDEF>
 
<PARA>Now we get to decide when we want our shop to be open.  We get to use
 
military time, so 1 refers to 1am, 6 refers to 6am, 12 refers to 12pm
 
(noon), 18 refers to 6pm, and both 0 and 24 refer to 12am (midnight)..
 
etc.. =)
 
And my define for this I named TAVERN_OPEN_TIMES (for when the tavern is
 
open) and I used the following setup:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define TAVERN_OPEN_TIMES {"12","18"}
+
<PARA>You just have to make your define and stick your times in quotes and
 +
enclose them in curly braces.  So Hogan will be opened from 1am ("1")
 +
until 11pm ("23").  He will close after 11pm and reopen again at 1am.
 +
You may also add multiple open and close times as per the following
 +
example:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
#define TAVERN_OPEN_TIMES {"1","12","16","20"}
  
<PARA>You just have to make your define and stick your times in quotes and
+
</PROGRAMLISTING></INFORMALEXAMPLE>
enclose them in curly braces. So Hogan will be opened from 1am ("1")
+
</LISTITEM>
until 11pm ("23").  He will close after 11pm and reopen again at 1am.
+
</VARLISTENTRY>
You may also add multiple open and close times as per the following
+
<VARLISTENTRY>
example:</PARA>
+
;Step 4
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<DICTDEF>
 +
<PARA>For this step you get to choose your shopkeeper's trade types.  And what
 +
you pick all depends on what kinds of things you want your shopkeeper to
 +
sell and buy.  You can find the item types in ''values.h'', but I'll also list
 +
them below.</PARA>
 +
<TABLE frame=all tocentry=0>
 +
<TITLE>Sale types</TITLE>
 +
<TGROUP align=left cols=4 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Value</ENTRY>
 +
<ENTRY>Type</ENTRY>
 +
<ENTRY>Value</ENTRY>
 +
<ENTRY>Type</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>1</ENTRY><ENTRY>ITEM_LIGHT</ENTRY><ENTRY>14</ENTRY><ENTRY>ITEM_TRAP</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>2</ENTRY><ENTRY>ITEM_SCROLL</ENTRY><ENTRY>15</ENTRY><ENTRY>ITEM_CONTAINER</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>3</ENTRY><ENTRY>ITEM_WAND</ENTRY><ENTRY>16</ENTRY><ENTRY>ITEM_NOTE</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>4</ENTRY><ENTRY>ITEM_STAFF</ENTRY><ENTRY>17</ENTRY><ENTRY>ITEM_DRINKCON</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>5</ENTRY><ENTRY>ITEM_WEAPON</ENTRY><ENTRY>18</ENTRY><ENTRY>ITEM_KEY</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>6</ENTRY><ENTRY>ITEM_FIREWEAPON</ENTRY><ENTRY>19</ENTRY><ENTRY>ITEM_FOOD</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>7</ENTRY><ENTRY>ITEM_MISSILE</ENTRY><ENTRY>20</ENTRY><ENTRY>ITEM_MONEY</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>8</ENTRY><ENTRY>ITEM_TREASURE</ENTRY><ENTRY>21</ENTRY><ENTRY>ITEM_PEN</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>9</ENTRY><ENTRY>ITEM_ARMOR</ENTRY><ENTRY>22</ENTRY><ENTRY>ITEM_BOAT</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>10</ENTRY><ENTRY>ITEM_POTION</ENTRY><ENTRY>23</ENTRY><ENTRY>ITEM_SPELL</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>11</ENTRY><ENTRY>ITEM_WORN</ENTRY><ENTRY>24</ENTRY><ENTRY>ITEM_BOOK</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>12</ENTRY><ENTRY>ITEM_OTHER</ENTRY><ENTRY>25</ENTRY><ENTRY>ITEM_SHIELD</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>13</ENTRY><ENTRY>ITEM_TRASH</ENTRY><ENTRY></ENTRY><ENTRY></ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
#define TAVERN_OPEN_TIMES {"1","12","16","20"}
+
<PARA>We are making a bartender, so he should sell food and drinks.  So I
 +
selected ITEM_FOOD, and it's corresponding number is 19.  So I made my
 +
define TAVERN_ITEM_TYPE (for our tavern's type of items) using the
 +
following setup:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
#define TAVERN_ITEM_TYPE "19"
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Step 4
 
<DICTDEF>
 
<PARA>For this step you get to choose your shopkeeper's trade types.  And what
 
you pick all depends on what kinds of things you want your shopkeeper to
 
sell and buy.  You can find the item types in ''values.h'', but I'll also list
 
them below.</PARA>
 
<TABLE frame=all tocentry=0>
 
<TITLE>Sale types</TITLE>
 
<TGROUP align=left cols=4 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Value</ENTRY>
 
<ENTRY>Type</ENTRY>
 
<ENTRY>Value</ENTRY>
 
<ENTRY>Type</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>1</ENTRY><ENTRY>ITEM_LIGHT</ENTRY><ENTRY>14</ENTRY><ENTRY>ITEM_TRAP</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>2</ENTRY><ENTRY>ITEM_SCROLL</ENTRY><ENTRY>15</ENTRY><ENTRY>ITEM_CONTAINER</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>3</ENTRY><ENTRY>ITEM_WAND</ENTRY><ENTRY>16</ENTRY><ENTRY>ITEM_NOTE</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>4</ENTRY><ENTRY>ITEM_STAFF</ENTRY><ENTRY>17</ENTRY><ENTRY>ITEM_DRINKCON</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>5</ENTRY><ENTRY>ITEM_WEAPON</ENTRY><ENTRY>18</ENTRY><ENTRY>ITEM_KEY</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>6</ENTRY><ENTRY>ITEM_FIREWEAPON</ENTRY><ENTRY>19</ENTRY><ENTRY>ITEM_FOOD</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>7</ENTRY><ENTRY>ITEM_MISSILE</ENTRY><ENTRY>20</ENTRY><ENTRY>ITEM_MONEY</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>8</ENTRY><ENTRY>ITEM_TREASURE</ENTRY><ENTRY>21</ENTRY><ENTRY>ITEM_PEN</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>9</ENTRY><ENTRY>ITEM_ARMOR</ENTRY><ENTRY>22</ENTRY><ENTRY>ITEM_BOAT</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>10</ENTRY><ENTRY>ITEM_POTION</ENTRY><ENTRY>23</ENTRY><ENTRY>ITEM_SPELL</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>11</ENTRY><ENTRY>ITEM_WORN</ENTRY><ENTRY>24</ENTRY><ENTRY>ITEM_BOOK</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>12</ENTRY><ENTRY>ITEM_OTHER</ENTRY><ENTRY>25</ENTRY><ENTRY>ITEM_SHIELD</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>13</ENTRY><ENTRY>ITEM_TRASH</ENTRY><ENTRY></ENTRY><ENTRY></ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>We are making a bartender, so he should sell food and drinks.  So I
+
</PROGRAMLISTING></INFORMALEXAMPLE>
selected ITEM_FOOD, and it's corresponding number is 19.  So I made my
+
<PARA>Now, if we had a magic shop, and wanted to sell potions and scrolls, I
define TAVERN_ITEM_TYPE (for our tavern's type of items) using the
+
would make a define called for example MAGIC_ITEM_TYPE and make it like
following setup:</PARA>
+
this:</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define TAVERN_ITEM_TYPE "19"  
+
#define MAGIC_ITEM_TYPE "2 10"
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>Now, if we had a magic shop, and wanted to sell potions and scrolls, I
+
<PARA>The 2 was our number corresponding to the scrolls, and the 10
would make a define called for example MAGIC_ITEM_TYPE and make it like
+
corresponded to the potions.  That is how you make your shopkeeper
this:</PARA>
+
sell more than one item type, just stick the corresponding numbers inside
<INFORMALEXAMPLE><PROGRAMLISTING>
+
quotes with a space separating them.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Step 5
 +
<DICTDEF>
 +
<PARA>Now you get to decide how much money your shopkeeper gets to have
 +
to buy things with.  One platinum piece is equal to 40960.  So if I wanted
 +
him to have two platinum pieces to spend on buying things from players, I
 +
would make a define called TAVERN_MAX_CASH (for the maximum amount of
 +
money our shopkeeper gets) and use the following setup:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define MAGIC_ITEM_TYPE "2 10"
+
#define TAVERN_MAX_CASH 81920
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>The 2 was our number corresponding to the scrolls, and the 10
+
<PARA>I got 81920 by multiplying the 40960 (one platinum) by 2</PARA>
corresponded to the potions.  That is how you make your shopkeeper
+
</LISTITEM>
sell more than one item type, just stick the corresponding numbers inside
+
</VARLISTENTRY>
quotes with a space separating them.</PARA>
+
<VARLISTENTRY>
</LISTITEM>
+
;Step 6
</VARLISTENTRY>
+
<DICTDEF>
<VARLISTENTRY>
+
<PARA>The sixth thing we get to do is to decide how much profit does our
;Step 5
+
shopkeeper get when he sells his items.  Items should have a cost to them
<DICTDEF>
+
already tagged on them, so their whatever their cost is, that is equal to
<PARA>Now you get to decide how much money your shopkeeper gets to have
+
100%. Now, if your shopkeeper wants to take an extra 10% on the items he's
to buy things with.  One platinum piece is equal to 40960. So if I wanted
+
selling so he can support his family, then you would make his selling
him to have two platinum pieces to spend on buying things from players, I
+
profit 110.  So I made a define called TAVERN_SELL_PROFIT (for his profit
would make a define called TAVERN_MAX_CASH (for the maximum amount of
+
when he sells things) and gave him 110% selling profit, and used the
money our shopkeeper gets) and use the following setup:</PARA>
+
following setup:</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define TAVERN_MAX_CASH 81920
+
#define TAVERN_SELL_PROFIT 110
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>I got 81920 by multiplying the 40960 (one platinum) by 2</PARA>
+
</LISTITEM>
</LISTITEM>
+
</VARLISTENTRY>
</VARLISTENTRY>
+
<VARLISTENTRY>
<VARLISTENTRY>
+
;Step 7
;Step 6
+
<DICTDEF>
<DICTDEF>
+
<PARA>This last define is almost exactly like our selling profit, but now, we're
<PARA>The sixth thing we get to do is to decide how much profit does our
+
doing our buying profit... when a player sells an item to the shopkeeper,
shopkeeper get when he sells his itemsItems should have a cost to them
+
he doesn't want to pay full price because it must be used since a player
already tagged on them, so their whatever their cost is, that is equal to
+
has itNow the item's cost is 100%, and maybe the shopkeeper only wants
100%. Now, if your shopkeeper wants to take an extra 10% on the items he's
+
to buy items for half its cost.  So I would make his buying profit 50,
selling so he can support his family, then you would make his selling
+
and use the following setup.</PARA>
profit 110.  So I made a define called TAVERN_SELL_PROFIT (for his profit
+
<INFORMALEXAMPLE><PROGRAMLISTING>
when he sells things) and gave him 110% selling profit, and used the
 
following setup:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define TAVERN_SELL_PROFIT 110
+
#define TAVERN_BUY_PROFIT 50
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Step 7
 
<DICTDEF>
 
<PARA>This last define is almost exactly like our selling profit, but now, we're
 
doing our buying profit... when a player sells an item to the shopkeeper,
 
he doesn't want to pay full price because it must be used since a player
 
has it.  Now the item's cost is 100%, and maybe the shopkeeper only wants
 
to buy items for half its cost.  So I would make his buying profit 50,
 
and use the following setup.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define TAVERN_BUY_PROFIT 50
+
<PARA>All of the previous  defines you can place anywhere in the zone.  I like
 +
to place mine before the %<ACRONYM>DIL</ACRONYM> section just to keep them somewhere where
 +
I know they all are.  You can place each one on the mob itself, but I
 +
think that looks cluttered so's why I put them where I put
 +
them.  And you're going to have a dilcopy placed on your mob also, which
 +
I'll explain in step 8.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Step 8
 +
<DICTDEF>
 +
<PARA>Okay one last step.  Now you get to place the <ACRONYM>DIL</ACRONYM> on your shopkeeper mob
 +
using all of those cute little defines you just made.  The syntax for the
 +
<ACRONYM>DIL</ACRONYM> is:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  dilcopy shopkeeper@function(products, responses, opentimes,
 +
                            tradetypes, sellprofit, buyprofit,
 +
                            maxcash, closedil, dilparams);
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>Take your defines from above the defines that you made are
 +
called:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>All of the previous  defines you can place anywhere in the zone.  I like
+
TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES, TAVERN_ITEM_TYPE,
to place mine before the %<ACRONYM>DIL</ACRONYM> section just to keep them somewhere where
+
TAVERN_SELL_PROFIT, TAVERN_BUY_PROFIT, and TAVERN_MAX_CASH.
I know they all are.  You can place each one on the mob itself, but I
 
think that looks cluttered so's why I put them where I put
 
them.  And you're going to have a dilcopy placed on your mob also, which
 
I'll explain in step 8.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Step 8
 
<DICTDEF>
 
<PARA>Okay one last step.  Now you get to place the <ACRONYM>DIL</ACRONYM> on your shopkeeper mob
 
using all of those cute little defines you just made.  The syntax for the
 
<ACRONYM>DIL</ACRONYM> is:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
  dilcopy shopkeeper@function(products, responses, opentimes,
+
</PROGRAMLISTING></INFORMALEXAMPLE>
                            tradetypes, sellprofit, buyprofit,
+
<PARA>Now all you have to do is place them in the syntax where they belong like
                            maxcash, closedil, dilparams);
+
in the below example.</PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</PROGRAMLISTING></INFORMALEXAMPLE>
 
<PARA>Take your defines from above the defines that you made are
 
called:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES, TAVERN_ITEM_TYPE,
+
dilcopy shopkeeper@function(TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES,
TAVERN_SELL_PROFIT, TAVERN_BUY_PROFIT, and TAVERN_MAX_CASH.
+
                            TAVERN_ITEM_TYPE, TAVERN_SELL_PROFIT,  
 +
                            TAVERN_BUY_PROFIT, TAVERN_MAX_CASH, "", "");
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>Now all you have to do is place them in the syntax where they belong like
+
<PARA>For the last two fields, I just put "", "" because I don't make my own
in the below example.</PARA>
+
unique <ACRONYM>DIL</ACRONYM> for those.  By just putting and empty set of quotes for each,
<INFORMALEXAMPLE><PROGRAMLISTING>
+
it makes it go to the default.
 +
And make sure you don't forget that semicolon at the end either.</PARA>
  
dilcopy shopkeeper@function(TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES,
+
<PARA>You are pretty much done now.  All you have to do is place your
                            TAVERN_ITEM_TYPE, TAVERN_SELL_PROFIT,
+
defines either up before %<ACRONYM>DIL</ACRONYM> or somewhere in %mob if you'd like, and
                            TAVERN_BUY_PROFIT, TAVERN_MAX_CASH, "", "");
+
place the dilcopy onto your mob.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST> 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Just to make sure I've completely beaten a very dead horse, this is
<PARA>For the last two fields, I just put "", "" because I don't make my own
+
what it would look like in the end.</PARA>
unique <ACRONYM>DIL</ACRONYM> for those.  By just putting and empty set of quotes for each,
+
<INFORMALEXAMPLE><PROGRAMLISTING>
it makes it go to the default.
 
And make sure you don't forget that semicolon at the end either.</PARA>
 
  
<PARA>You are pretty much done now.  All you have to do is place your
+
%zone sample_zon
defines either up before %<ACRONYM>DIL</ACRONYM> or somewhere in %mob if you'd like, and
 
place the dilcopy onto your mob.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST> 
 
  
<PARA>Just to make sure I've completely beaten a very dead horse, this is
+
#define TAVERN_PROD \
what it would look like in the end.</PARA>
+
{"grain_alcohol@gobtown1 15 20", \
<INFORMALEXAMPLE><PROGRAMLISTING>
+
"pretzels@gobtown1 10 15", \
 +
"beer_nuts@gobtown1 15 20", \
 +
"rum_coke@gobtown1 10 15", \
 +
"tuborg@udgaard 15 20"}
  
%zone sample_zon
+
#define TAVERN_MSG \
 +
{"$1n says, 'This is a tavern, I don't sell such an item as that!'", \
 +
"$1n says, '$3n, you don't even have that!'", \
 +
"$1n says, 'I don't trade with things such as $2n! Just buy a beer!'", \
 +
"$1n says, '$3n, you can't afford $2n.'", \
 +
"$1n says, 'Thank you, $3n, here are %s for $2n.'", \
 +
"$1n says, 'Thank you, $3n.'", \
 +
"$1n says, 'I don't have that many $2ns in stock.'", \
 +
"$1n says, 'I'm on break, come back later.'", \
 +
"$1n says, 'I haven't got a use for $2n.'", \
 +
"$1n says, 'I'd like to buy it, but I can't afford it, sorry.'"} \
  
#define TAVERN_PROD \
+
#define TAVERN_OPEN_TIMES {"1","23"}
{"grain_alcohol@gobtown1 15 20", \
+
#define TAVERN_ITEM_TYPE "19"  
"pretzels@gobtown1 10 15", \
+
#define TAVERN_MAX_CASH 81920
"beer_nuts@gobtown1 15 20", \
+
#define TAVERN_SELL_PROFIT 110
"rum_coke@gobtown1 10 15", \
+
#define TAVERN_BUY_PROFIT 50
"tuborg@udgaard 15 20"}
 
  
#define TAVERN_MSG \
 
{"$1n says, 'This is a tavern, I don't sell such an item as that!'", \
 
"$1n says, '$3n, you don't even have that!'", \
 
"$1n says, 'I don't trade with things such as $2n! Just buy a beer!'", \
 
"$1n says, '$3n, you can't afford $2n.'", \
 
"$1n says, 'Thank you, $3n, here are %s for $2n.'", \
 
"$1n says, 'Thank you, $3n.'", \
 
"$1n says, 'I don't have that many $2ns in stock.'", \
 
"$1n says, 'I'm on break, come back later.'", \
 
"$1n says, 'I haven't got a use for $2n.'", \
 
"$1n says, 'I'd like to buy it, but I can't afford it, sorry.'"} \
 
  
#define TAVERN_OPEN_TIMES {"1","23"}
+
%mobiles
#define TAVERN_ITEM_TYPE "19"
 
#define TAVERN_MAX_CASH 81920
 
#define TAVERN_SELL_PROFIT 110
 
#define TAVERN_BUY_PROFIT 50
 
  
 +
bartender
 +
names {"hogan","goblin","bartender"}
 +
title "Hogan"
 +
descr "Hogan stands behind the bar waiting to take your order."
 +
extra {}
 +
"He looks back at you, patiently waiting for your order."
 +
M_AVG_GOBLIN(76,SEX_MALE)
 +
alignment -1000
 +
exp 100
 +
money 2 SILVER_PIECE, 2 COPPER_PIECE
  
%mobiles
+
dilcopy shopkeeper@function(TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES,
 +
                            TAVERN_ITEM_TYPE,TAVERN_SELL_PROFIT,
 +
                            TAVERN_BUY_PROFIT, TAVERN_MAX_CASH, "", "");
 +
end
  
bartender
+
</PROGRAMLISTING></INFORMALEXAMPLE>
names {"hogan","goblin","bartender"}
+
</LISTITEM>
title "Hogan"
+
</VARLISTENTRY>
descr "Hogan stands behind the bar waiting to take your order."
 
extra {}
 
"He looks back at you, patiently waiting for your order."
 
M_AVG_GOBLIN(76,SEX_MALE)
 
alignment -1000
 
exp 100
 
money 2 SILVER_PIECE, 2 COPPER_PIECE
 
  
dilcopy shopkeeper@function(TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES,
 
                            TAVERN_ITEM_TYPE,TAVERN_SELL_PROFIT,
 
                            TAVERN_BUY_PROFIT, TAVERN_MAX_CASH, "", "");
 
end
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
</VARIABLELIST>
  
 +
</sect1>
  
</VARIABLELIST>
 
  
</sect1>
+
<sect1 id="npccomplex">
 +
<TITLE>A more complex set of NPCs</TITLE>
  
 +
<PARA>In the last sections you learned all the fields and how to make a basic NPC.
 +
In this section we will use the information from the last sections to
 +
create some more unique NPCs for our dragon station zone There is not a
 +
lot of new information here we will be using the DIL functions from the previous
 +
section and adding some flags to the NPCs to make them act
 +
different.</PARA>
  
<sect1 id="npccomplex">
+
<sect2>
<TITLE>A more complex set of NPCs</TITLE>
+
<TITLE>Magic casting NPC</TITLE>
  
<PARA>In the last sections you learned all the fields and how to make a basic NPC.
+
<PARA>The basic Dragon we made in the <xref linkend="npcbasic"> looks
In this section we will use the information from the last sections to
+
like a real dragon but it is a bit boring when you fight a dragon and
create some more unique NPCs for our dragon station zone There is not a
+
don't get toasted by an acid or fire spell or two.  in <xref
lot of new information here we will be using the DIL functions from the previous
+
linkend="npcdilfunc"> the 'combat_magic' function was described.  This
section and adding some flags to the NPCs to make them act
+
is the function you use to make all NPCs cast magic while in combat.
different.</PARA>
+
With that in mind lets take a look at how we can make our dragon a bit
 +
more interesting g.</PARA>
  
<sect2>
+
<PARA>Well lets see a black dragon is supposed to have the ability to
<TITLE>Magic casting NPC</TITLE>
+
either cast fire breath or acid breath depending on who you talk to.
 +
Once you learn <ACRONYM>DIL</ACRONYM> you could even make fire breath be a skill not a
 +
spell but for now we will stick with what we know.  I like the acts of
 +
the acid breath spell so we will use that as the spell of choice.  The
 +
NPC as we defined it before hasn't changed so the following would be the
 +
entire dragon with the combat magic function.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The basic Dragon we made in the <xref linkend="npcbasic"> looks
 
like a real dragon but it is a bit boring when you fight a dragon and
 
don't get toasted by an acid or fire spell or two.  in <xref
 
linkend="npcdilfunc"> the 'combat_magic' function was described.  This
 
is the function you use to make all NPCs cast magic while in combat.
 
With that in mind lets take a look at how we can make our dragon a bit
 
more interesting g.</PARA>
 
  
<PARA>Well lets see a black dragon is supposed to have the ability to
+
bldragon
either cast fire breath or acid breath depending on who you talk to.
 
Once you learn <ACRONYM>DIL</ACRONYM> you could even make fire breath be a skill not a
 
spell but for now we will stick with what we know.  I like the acts of
 
the acid breath spell so we will use that as the spell of choice.  The
 
NPC as we defined it before hasn't changed so the following would be the
 
entire dragon with the combat magic function.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
 +
title "a black dragon"
 +
descr "A big ugly black dragon is clawing the ground here."
 +
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
  
bldragon
+
extra {}
 +
"The black dragons scales glitter like black granite that has been
 +
polished for years by water.  He has a large neck and huge bat like
 +
wings.  his eyes watch you as you stand before him.  One claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
title "a black dragon"
+
extra {"eye","eyes"}
descr "A big ugly black dragon is clawing the ground here."
+
"The dragons eyes seem to follow you no matter where you go in the room
names {"big ugly black dragon","ugly black dragon","big black dragon",
+
nothing seems to escape the dragons attention."
"black dragon","dragon"}
 
  
extra {}
+
extra {"claws","claw"}
"The black dragons scales glitter like black granite that has been
+
"The claw is big black and it looks very deadly.  It seems like the
polished for years by water.  He has a large neck and huge bat like
+
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
wings.  his eyes watch you as you stand before him.  One claw seems to be
+
to say means the claws are about the size of short swords and long
tapping slightly on the ground as if the dragon is waiting for
+
swords."
something."
 
  
extra {"eye","eyes"}
+
extra {"scales","scale"}
"The dragons eyes seem to follow you no matter where you go in the room
+
"Its a scale!  Haven't you ever seen a dragon before!"
nothing seems to escape the dragons attention."
 
  
extra {"claws","claw"}
+
extra {"bat wings","wings"}
"The claw is big black and it looks very deadly.  It seems like the
+
"The dragon sees you looking and flaps his wings creating one heck of a
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
+
wind blast."
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
+
race RACE_DRAGON_BLACK
"Its a scale!  Haven't you ever seen a dragon before!"
+
sex SEX_MALE
 +
height 625
 +
weight 1250
 +
level 70
 +
NATURAL_DEF (WPN_CLAW, ARM_PLATE)
 +
alignment -900
 +
MSET_ABILITY(20,12,12,12,12,12,20,0)
 +
MSET_WEAPON(10,10,10,5,30,5)
 +
MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)
  
extra {"bat wings","wings"}
+
//Combat Magic added.
"The dragon sees you looking and flaps his wings creating one heck of a
+
  dilcopy combat_mag@function("acid breath", "", 25, 2);
wind blast."
+
 
 +
end
  
race RACE_DRAGON_BLACK
+
</PROGRAMLISTING></INFORMALEXAMPLE>
sex SEX_MALE
 
height 625
 
weight 1250
 
level 70
 
NATURAL_DEF (WPN_CLAW, ARM_PLATE)
 
alignment -900
 
MSET_ABILITY(20,12,12,12,12,12,20,0)
 
MSET_WEAPON(10,10,10,5,30,5)
 
MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)
 
  
//Combat Magic added.
+
<PARA>That is all there is to it. If you are wondering where I got the
  dilcopy combat_mag@function("acid breath", "", 25, 2);
+
'acid breath' part of the <ACRONYM>DIL</ACRONYM> copy all the spells names are in the
 
+
''spells.def'' or you can just pick a spell by what you
end
+
would type if you wanted to cast it yourself in the game.  Now if this
 +
still looks like a lot to do to make a dragon the dragon above could
 +
have been created with exactly the same information by using the
 +
''composed.h'' and the 'M_DRAGON_BLACK_OLD' macro.  If
 +
we use the macro the dragon would look like this</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
bldragon
  
<PARA>That is all there is to it.  If you are wondering where I got the
+
title "a black dragon"
'acid breath' part of the <ACRONYM>DIL</ACRONYM> copy all the spells names are in the
+
descr "A big ugly black dragon is clawing the ground here."
''spells.def'' or you can just pick a spell by what you
+
names {"big ugly black dragon","ugly black dragon","big black dragon",
would type if you wanted to cast it yourself in the game. Now if this
+
"black dragon","dragon"}
still looks like a lot to do to make a dragon the dragon above could
 
have been created with exactly the same information by using the
 
''composed.h'' and the 'M_DRAGON_BLACK_OLD' macro.  If
 
we use the macro the dragon would look like this</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
bldragon
+
extra {}
 +
"The black dragons scales glitter like black granite that has been
 +
polished for years by water.  He has a large neck and huge bat like
 +
wings.  his eyes watch you as you stand before him.  One claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
title "a black dragon"
+
extra {"eye","eyes"}
descr "A big ugly black dragon is clawing the ground here."
+
"The dragons eyes seem to follow you no matter where you go in the room
names {"big ugly black dragon","ugly black dragon","big black dragon",
+
nothing seems to escape the dragons attention."
"black dragon","dragon"}
 
  
extra {}
+
extra {"claws","claw"}
"The black dragons scales glitter like black granite that has been
+
"The claw is big black and it looks very deadly.  It seems like the
polished for years by water.  He has a large neck and huge bat like
+
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
wings.  his eyes watch you as you stand before him.  One claw seems to be
+
to say means the claws are about the size of short swords and long
tapping slightly on the ground as if the dragon is waiting for
+
swords."
something."
 
  
extra {"eye","eyes"}
+
extra {"scales","scale"}
"The dragons eyes seem to follow you no matter where you go in the room
+
"Its a scale!  Haven't you ever seen a dragon before!"
nothing seems to escape the dragons attention."
 
  
extra {"claws","claw"}
+
extra {"bat wings","wings"}
"The claw is big black and it looks very deadly.  It seems like the
+
"The dragon sees you looking and flaps his wings creating one heck of a
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
+
wind blast."
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
+
M_DRAGON_BLACK_OLD(SEX_MALE)
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
end
"The dragon sees you looking and flaps his wings creating one heck of a
+
</PROGRAMLISTING></INFORMALEXAMPLE>
wind blast."
 
  
M_DRAGON_BLACK_OLD(SEX_MALE)
+
<PARA>As you can see with the second way the dragon was a lot easier to
 +
make because we let the macro set all the other values we just described
 +
the NPC and set the macro.</PARA>
 +
</sect2>
  
end
+
<sect2>
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<TITLE>A wandering janitor</TITLE>
  
<PARA>As you can see with the second way the dragon was a lot easier to
+
<PARA>Our space station is nice but we wouldn't want a lot of people
make because we let the macro set all the other values we just described
+
coming to visit if we didn't have a janitor to walk around cleaning up.
the NPC and set the macro.</PARA>
+
Dragons most likely wouldn't be low life enough to be Janitors so I
</sect2>
+
think we will leave that up to a hobgoblin.  the following would be the
 +
definition of a hobgoblin wandering Janitor.</PARA>
  
<sect2>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>A wandering janitor</TITLE>
 
  
<PARA>Our space station is nice but we wouldn't want a lot of people
+
janitor
coming to visit if we didn't have a janitor to walk around cleaning up.  
+
names {"ugly janitor", "janitor", "hobgoblin"}
Dragons most likely wouldn't be low life enough to be Janitors so I
+
title "an ugly janitor"
think we will leave that up to a hobgoblin.  the following would be the
+
descr "an ugly janitor is walking around, cleaning up."
definition of a hobgoblin wandering Janitor.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra{}
 +
"This ugly green thing looks more goblin than hobgoblin but he seems
 +
intent on cleaning everything around him."
  
janitor
+
race RACE_HOBGOBLIN
names {"ugly janitor", "janitor", "hobgoblin"}
+
level 6
title "an ugly janitor"
+
sex SEX_MALE
descr "an ugly janitor is walking around, cleaning up."
+
height  130      /* cm            */
 +
weight  120      /* Pounds        */
 +
// he is sort of good for cleaning so much
 +
alignment 900
  
extra{}
+
NATURAL_DEF(WPN_FIST, ARM_LEATHER)
"This ugly green thing looks more goblin than hobgoblin but he seems
+
MSET_ABILITY(10,10,10,23,15,22,10,0)  \
intent on cleaning everything around him."
+
MSET_WEAPON(10,10,10,10,10,10)    /*  Average in everything, any wpn */
 +
MSET_SPELL(4,2,2,2,2,2,2,6,6,6,6)  /* Resistances      */
  
race RACE_HOBGOBLIN
 
level 6
 
sex SEX_MALE
 
height  130      /* cm            */
 
weight  120      /* Pounds        */
 
// he is sort of good for cleaning so much
 
alignment 900
 
  
NATURAL_DEF(WPN_FIST, ARM_LEATHER)
+
//give him some money
MSET_ABILITY(10,10,10,23,15,22,10,0)  \
+
money 5 IRON_PIECE
MSET_WEAPON(10,10,10,10,10,10)    /*  Average in everything, any wpn */
 
MSET_SPELL(4,2,2,2,2,2,2,6,6,6,6)  /* Resistances      */
 
  
 +
dilcopy janitors@function(15);
  
//give him some money
+
// only want him cleaning the station
money 5 IRON_PIECE
+
dilcopy wander_zones@function("dragonst", 20, 1, 1);
  
dilcopy janitors@function(15);
+
end
  
// only want him cleaning the station
+
</PROGRAMLISTING></INFORMALEXAMPLE>
dilcopy wander_zones@function("dragonst", 20, 1, 1);
 
  
end
+
<PARA>Like with the dragon if we wanted to create this NPC easier we
 +
would use the Hobgoblin defines in ''composed.h'' so we
 +
don't have to fill out all the information.  If we did this it would
 +
simply look as follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
janitor
 +
names {"ugly janitor", "janitor", "hobgoblin"}
 +
title "an ugly janitor"
 +
descr "an ugly janitor is walking around, cleaning up."
  
<PARA>Like with the dragon if we wanted to create this NPC easier we
+
extra{}
would use the Hobgoblin defines in ''composed.h'' so we
+
"This ugly green thing looks more goblin than hobgoblin but he seems intent
don't have to fill out all the information. If we did this it would
+
on cleaning everything around him."
simply look as follows:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
janitor
+
M_AVG_HOBGOBLIN(6, SEX_MALE)
names {"ugly janitor", "janitor", "hobgoblin"}
 
title "an ugly janitor"
 
descr "an ugly janitor is walking around, cleaning up."
 
  
extra{}
+
// he is sort of good for cleaning so much
"This ugly green thing looks more goblin than hobgoblin but he seems intent
+
alignment 900
on cleaning everything around him."
 
  
M_AVG_HOBGOBLIN(6, SEX_MALE)
+
//give him some money
 +
money 5 IRON_PIECE
  
// he is sort of good for cleaning so much
+
dilcopy janitors@function(15);
alignment 900
 
  
//give him some money
+
// only want him cleaning the station
money 5 IRON_PIECE
+
dilcopy wander_zones@function("dragonst", 20, 1, 1);
  
dilcopy janitors@function(15);
+
end
  
// only want him cleaning the station
+
</PROGRAMLISTING></INFORMALEXAMPLE>
dilcopy wander_zones@function("dragonst", 20, 1, 1);
 
  
end
+
<PARA>As you can see you can combine the DIL functions you learned in
 +
<xref linkend="npcdilfunc"> to make your NPC do more than one thing.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</sect2>
  
<PARA>As you can see you can combine the DIL functions you learned in
+
<sect2 id="specteach">
<xref linkend="npcdilfunc"> to make your NPC do more than one thing.</PARA>  
+
<TITLE>Creating a teacher</TITLE>
  
</sect2>
+
<PARA>Setting up teachers on valhalla is harder and more strict formed
 +
than most things in the game.  The reason is the way you set them up is
 +
to use an old form of functions called special.  In the future guilds
 +
will be in <ACRONYM>DIL</ACRONYM> like everything else but for now the teachers that are
 +
released with the <ACRONYM>VME</ACRONYM> are base code.  Even though the teachers are base
 +
code they still allow for you to adjust many things.  The truth is you
 +
don't have to use our teachers you could code your own in <ACRONYM>DIL</ACRONYM> but many
 +
find this easier.</PARA>
  
<sect2 id="specteach">
+
<PARA>Guild teacher definitions are actually less complex than people think
<TITLE>Creating a teacher</TITLE>
+
they are. There really are no big, mysterious secrets. The key is simply
 +
to understand the numbers and how the balance is achieved.
 +
(From here on in, GTD will refer to "guild teacher definition", and
 +
"entity" will be used to refer to the ability/spell/skill/weapon being
 +
offered by the GTD.)</PARA>
  
<PARA>Setting up teachers on valhalla is harder and more strict formed
+
<NOTE><PARA>
than most things in the game.  The reason is the way you set them up is
+
  Using TAB characters in GTDs is a very bad idea! It will have extremely
to use an old form of functions called special.  In the future guilds
+
adverse effects, including causing the mud to crash.
will be in <ACRONYM>DIL</ACRONYM> like everything else but for now the teachers that are
+
</PARA></NOTE>
released with the <ACRONYM>VME</ACRONYM> are base code.  Even though the teachers are base
 
code they still allow for you to adjust many things. The truth is you
 
don't have to use our teachers you could code your own in <ACRONYM>DIL</ACRONYM> but many
 
find this easier.</PARA>
 
  
<PARA>Guild teacher definitions are actually less complex than people think
+
<PARA>We need to tart first and explain that to use the teacher special
they are. There really are no big, mysterious secrets. The key is simply
+
functions you need to use a field not described anywhere else in the NPC
to understand the numbers and how the balance is achieved.
+
descriptions. The field is called a 'special'. The reason the
(From here on in, GTD will refer to "guild teacher definition", and
+
'special' field was not included in the field descriptions is because it
"entity" will be used to refer to the ability/spell/skill/weapon being
+
is being removed from the <ACRONYM>VME</ACRONYM> as soon as banks and teachers have been
offered by the GTD.)</PARA>
+
replaced by <ACRONYM>DIL</ACRONYM> there will be no more special functions.  For now
 +
however we need to use them for the for mentioned purposes.  The format
 +
for a special function is as follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<NOTE><PARA>
+
special &lt;Function define&gt; &lt;function arguments&gt;
  Using TAB characters in GTDs is a very bad idea! It will have extremely
 
adverse effects, including causing the mud to crash.
 
</PARA></NOTE>
 
  
<PARA>We need to tart first and explain that to use the teacher special
+
</PROGRAMLISTING></INFORMALEXAMPLE>
functions you need to use a field not described anywhere else in the NPC
+
<PARA>For teachers the function definition is 'SFUN_TEACH_INIT' and the
descriptions.  The field is called a 'special'.  The reason the
+
arguments range from who can join, what the acts of the teacher are,
'special' field was not included in the field descriptions is because it
+
and what the teacher teaches.</PARA>
is being removed from the <ACRONYM>VME</ACRONYM> as soon as banks and teachers have been
 
replaced by <ACRONYM>DIL</ACRONYM> there will be no more special functions.  For now
 
however we need to use them for the for mentioned purposes. The format
 
for a special function is as follows:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
special &lt;Function define&gt; &lt;function arguments&gt;
+
<PARA>In the first part of a SFUN_TEACH_INIT definition, there are several
 +
pieces of important information which allow the mud to know what you are
 +
trying to provide to players.  The entire set of arguments are enclosed
 +
in double quotes.  So a teacher with nothing at all in it would look
 +
like this:</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<PARA>For teachers the function definition is 'SFUN_TEACH_INIT' and the
 
arguments range from who can join, what the acts of the teacher are,
 
and what the teacher teaches.</PARA>
 
  
<PARA>In the first part of a SFUN_TEACH_INIT definition, there are several
+
special SFUN_TEACH_INIT "&lt;arguments go here&gt;"
pieces of important information which allow the mud to know what you are
 
trying to provide to players.  The entire set of arguments are enclosed
 
in double quotes.  So a teacher with nothing at all in it would look
 
like this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
special SFUN_TEACH_INIT "&lt;arguments go here&gt;"
+
<PARA>After the opening double quote ("), the first thing necessary
 +
is the text formatting code '&amp;l', which tells the compiler to ignore the
 +
standard text formatting protocols for the rest of the string or until the
 +
'&amp;f' code is given.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Immediately following the '&amp;l' code, with no spaces at all, the type of
 +
entity the function will teach is defined. It is one of the following
 +
types:</PARA>
 +
<itemizedlist>
 +
<LISTITEM><PARA>abilities</PARA></LISTITEM>
 +
<LISTITEM><PARA>spells</PARA></LISTITEM>
 +
<LISTITEM><PARA>skills</PARA></LISTITEM>
 +
<LISTITEM><PARA>weapons</PARA></LISTITEM>
 +
</itemizedlist>
  
<PARA>After the opening double quote ("), the first thing necessary
+
<PARA>The first two lines of the SFUN_TEACH_INIT looks like this:</PARA>
is the text formatting code '&amp;l', which tells the compiler to ignore the
 
standard text formatting protocols for the rest of the string or until the
 
'&amp;f' code is given.</PARA>
 
  
<PARA>Immediately following the '&amp;l' code, with no spaces at all, the type of
+
<INFORMALEXAMPLE><PROGRAMLISTING>
entity the function will teach is defined. It is one of the following
 
types:</PARA>
 
<itemizedlist>
 
<LISTITEM><PARA>abilities</PARA></LISTITEM>
 
<LISTITEM><PARA>spells</PARA></LISTITEM>
 
<LISTITEM><PARA>skills</PARA></LISTITEM>
 
<LISTITEM><PARA>weapons</PARA></LISTITEM>
 
</itemizedlist>
 
  
<PARA>The first two lines of the SFUN_TEACH_INIT looks like this:</PARA>
+
special SFUN_TEACH_INIT
 +
"&amp;labilities;0;
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
special SFUN_TEACH_INIT
+
<NOTE><PARA>The '0;' is the end of field marker that will be used
"&amp;labilities;0;
+
through out the teacher fields</PARA></NOTE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The next set of arguments to the teacher function is the acts the
 +
teacher will use when a person is trying to train.  There are seven acts
 +
total and they are as follows:</PARA>
 +
<VARIABLELIST>
 +
<TITLE>Teacher acts</TITLE>
 +
<VARLISTENTRY>
 +
;Line 1
 +
<DICTDEF>
 +
<PARA>This line is displayed when the player makes a mistake in typing
 +
        the name of an entity, whether or not it is actually offered at
 +
        the teacher.
 +
</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Line 2
 +
<DICTDEF>
 +
<PARA>This line is similar to the first, but is usually evident of
 +
        attempting to practice an entity not offered at this particular
 +
        teacher.
 +
</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Line 3
 +
<DICTDEF>
 +
<PARA>This is the act displayed when the player has insufficient funds
 +
        to practice the desired entity.
 +
</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Line 4
 +
<DICTDEF>
 +
<PARA>This is displayed when the player has not got enough ability or
 +
        skill practice points to learn the desired entity.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Line 5
 +
<DICTDEF>
 +
<PARA>Simply put, the player has exceeded the teacher's expertise in the
 +
        offered entity and must go elsewhere to learn more, if at all
 +
        possible.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Line 6
 +
<DICTDEF>
 +
<PARA>This line is displayed when the player is either wearing magical,
 +
        stat-modifying equipment or is affected by spells/skills which
 +
        modify stats.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Line 7
 +
<DICTDEF>
 +
<PARA>This line is what is shown when your armour affects you using
 +
special functions in base code.  This is rare and may never be seen.  In
 +
the future when the teachers are made in <ACRONYM>DIL</ACRONYM> this act may not be
 +
necessary.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
<NOTE><PARA>The '0;' is the end of field marker that will be used
+
<PARA>Now we can add the acts to our example it would look as
through out the teacher fields</PARA></NOTE>
+
follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The next set of arguments to the teacher function is the acts the
+
special SFUN_TEACH_INIT
teacher will use when a person is trying to train.  There are seven acts
+
"&amp;labilities;0;
total and they are as follows:</PARA>
+
$1n tells you, 'I have never heard of such an ability.'; $1n
<VARIABLELIST>
+
tells you, 'I do not know how to teach this ability.'; $1n tells you,
<TITLE>Teacher acts</TITLE>
+
'You haven't got %s for me.'; $1n tells you, 'You haven't got %d ability
<VARLISTENTRY>
+
points.'; $1n tells you, 'I can not teach you any more.'; $1n tells you,
;Line 1
+
'You must be unaffected by magic, else I can't teach you.'; $1n tells
<DICTDEF>
+
you, 'Remove all equipment, please.';
<PARA>This line is displayed when the player makes a mistake in typing
 
        the name of an entity, whether or not it is actually offered at
 
        the teacher.
 
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Line 2
 
<DICTDEF>
 
<PARA>This line is similar to the first, but is usually evident of
 
        attempting to practice an entity not offered at this particular
 
        teacher.
 
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Line 3
 
<DICTDEF>
 
<PARA>This is the act displayed when the player has insufficient funds
 
        to practice the desired entity.
 
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Line 4
 
<DICTDEF>
 
<PARA>This is displayed when the player has not got enough ability or
 
        skill practice points to learn the desired entity.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Line 5
 
<DICTDEF>
 
<PARA>Simply put, the player has exceeded the teacher's expertise in the
 
        offered entity and must go elsewhere to learn more, if at all
 
        possible.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Line 6
 
<DICTDEF>
 
<PARA>This line is displayed when the player is either wearing magical,
 
        stat-modifying equipment or is affected by spells/skills which
 
        modify stats.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Line 7
 
<DICTDEF>
 
<PARA>This line is what is shown when your armour affects you using
 
special functions in base code. This is rare and may never be seen.  In
 
the future when the teachers are made in <ACRONYM>DIL</ACRONYM> this act may not be
 
necessary.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<PARA>Now we can add the acts to our example it would look as
+
</PROGRAMLISTING></INFORMALEXAMPLE>
follows:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
special SFUN_TEACH_INIT
+
<NOTE><PARA>
"&amp;labilities;0;
+
  $1n is the substitution variable for the teacher's title (see the <ACRONYM>DIL</ACRONYM>
$1n tells you, 'I have never heard of such an ability.'; $1n
+
document for more details).</PARA>
tells you, 'I do not know how to teach this ability.'; $1n tells you,
 
'You haven't got %s for me.'; $1n tells you, 'You haven't got %d ability
 
points.'; $1n tells you, 'I can not teach you any more.'; $1n tells you,
 
'You must be unaffected by magic, else I can't teach you.'; $1n tells
 
you, 'Remove all equipment, please.';
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>%s is the amount of money the teacher  requires to teach the entity in
 +
      question.</PARA>
  
<NOTE><PARA>
+
<PARA>%d is the amount of ability or skill practice points required to
  $1n is the substitution variable for the teacher's title (see the <ACRONYM>DIL</ACRONYM>
+
      practice the given entity.</PARA>
document for more details).</PARA>
+
 
 +
<PARA>The standard GTD termination character, a semicolon (;) ends each
 +
act</PARA>
 +
</NOTE>
 +
 
 +
<PARA>about the actual GTDs, or the lines that actually define what the
 +
teachers teach and everything to do about how expensive and how high
 +
they teach it.  A GTD is a single line, composed of several fields. The data contained
 +
in these fields determines how a particular entity is practiced.</PARA>
  
<PARA>%s is the amount of money the teacher  requires to teach the entity in
+
<PARA>Here is an example of a GTD:</PARA>
      question.</PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>%d is the amount of ability or skill practice points required to
+
  0;  100; scan                          ;  9;  9000;  7;          0;
      practice the given entity.</PARA>
 
 
   
 
   
<PARA>The standard GTD termination character, a semicolon (;) ends each
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
act</PARA>
 
</NOTE>
 
  
<PARA>about the actual GTDs, or the lines that actually define what the
+
<PARA>Note that it has a lot of white space in it. It is really not necessary,
teachers teach and everything to do about how expensive and how high
+
as the field terminators are the semicolons. This means that you could just
they teach it. A GTD is a single line, composed of several fields. The data contained
+
as easily write:</PARA>
in these fields determines how a particular entity is practiced.</PARA>
 
  
<PARA>Here is an example of a GTD:</PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
  0; 100; scan                         ;   9; 9000;   7;         0;
+
0;100;scan;9;9000;7;0;
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>Note that it has a lot of white space in it. It is really not necessary,
+
</PROGRAMLISTING></INFORMALEXAMPLE>
as the field terminators are the semicolons. This means that you could just
 
as easily write:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>When making teachers most people prefer to put the white space in
 +
  to make it easier to read and find errors.  A larger example would
 +
  look as follows:</PARA>
 +
  <INFORMALEXAMPLE><PROGRAMLISTING>
 +
 
 +
  0;  100; scan                          ;  9;  9000;  7;          0;
 +
  0;  90; consider                      ;  4;  4000;  5; 10;      0;
 +
  0;  100; appraisal                    ;  9;  4000;  5;          0;
 +
  0;  100; fleeing                      ;  9;  9000;  6; 12;      0;
  
0;100;scan;9;9000;7;0;
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA> Each part of the GTD separated by a semicolon is called a
 +
field.  The following is the fields and their definitions.</PARA>
  
<PARA>When making teachers most people prefer to put the white space in
+
<VARIABLELIST>
  to make it easier to read and find errors. A larger example would
+
<VARLISTENTRY>
  look as follows:</PARA>
+
;Field 1
  <INFORMALEXAMPLE><PROGRAMLISTING>
+
<DICTDEF>
 
+
<PARA>   Field 1 is the guild level. It is simply the level at which one is
  0;  100; scan                          ;  9;  9000;  7;          0;
+
allowed to practice the particular entity in the guild. A level of 0
  0;  90; consider                      ;  4;  4000;  5; 10;      0;
+
indicates that one can practice it from the beginning.</PARA>
  0;  100; appraisal                    ;  9;  4000;  5;          0;
+
</LISTITEM>
  0;  100; fleeing                      ;  9;  9000;  6; 12;      0;
+
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Field 2
 +
<DICTDEF>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This is the maximum percentage one is allowed to practice the
 +
particular entity. It can be anywhere from 1 to 200. For abilities, it
 +
should be in increments of 2 (or divisible by 2), and for spells, skills,
 +
or weapons, in increments of 5 (or divisible by 5). This means that the
 +
effective minimum depends on whether the entity is an ability or a spell,
 +
skill or weapon.</PARA>
  
<PARA> Each part of the GTD separated by a semicolon is called a
+
<PARA>Therefore, the minimums for abilities is 2, and the minimum for spells,
field. The following is the fields and their definitions.</PARA>
+
skills or weapons is 5. Anything less will be automatically practiced to
 +
the effective minimum. This also means that putting an odd number for
 +
abilities will result in the player practicing an additional point, and
 +
for spells, skills or weapons, practicing up to the nearest 5.</PARA>
  
<VARIABLELIST>
+
<PARA>For example:    Percentage maximum for an ability is set for 95%. Player practices the
<VARLISTENTRY>
+
ability, which then becomes 96%.
;Field 1
+
  Player then decides to practice a weapon skill. It is set to 77% maximum.
<DICTDEF>
+
After practicing, the player has 80% in the weapon.
<PARA>   Field 1 is the guild level. It is simply the level at which one is
+
  It is better to simply make the ability 96% and the weapon 80% maximum
allowed to practice the particular entity in the guild. A level of 0
+
instead.</PARA>
indicates that one can practice it from the beginning.</PARA>
+
</LISTITEM>
</LISTITEM>
+
</VARLISTENTRY>
</VARLISTENTRY>
+
<VARLISTENTRY>
<VARLISTENTRY>
+
;Field 3
;Field 2
+
<DICTDEF>
<DICTDEF>
+
<PARA>Name of Entity</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Field 4
 +
<DICTDEF>
 +
<PARA>This is the practice cost minimum in Old gold pieces. Anything less than 10 here
 +
will simply be translated as 1 iron piece. Anything other than a number divisible
 +
by 10 is rounded up to the nearest iron piece.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Field 5
 +
<DICTDEF>
 +
<PARA>This is the practice cost maximum in old gold pieces. It is generally defined as
 +
being 1000 times what Field 4 is defined as:</PARA>
  
<PARA>This is the maximum percentage one is allowed to practice the
+
<PARA>The reason for this is because there is a scale related to the current
particular entity. It can be anywhere from 1 to 200. For abilities, it
+
practice percentage of the entity. The practice minimum is what the entity
should be in increments of 2 (or divisible by 2), and for spells, skills,
+
costs when it is at 0%, and the practice maximum is what it costs to
or weapons, in increments of 5 (or divisible by 5). This means that the
+
practice it to maximum percentage.</PARA>
effective minimum depends on whether the entity is an ability or a spell,
 
skill or weapon.</PARA>
 
  
<PARA>Therefore, the minimums for abilities is 2, and the minimum for spells,
+
<PARA>It is not necessary to multiply the minimum by 1000 to define the
skills or weapons is 5. Anything less will be automatically practiced to
+
maximum. It can be any number, as long as the maximum exceeds the minimum.
the effective minimum. This also means that putting an odd number for
+
Failure to do so will result in the mud crashing. It is unknown what will
abilities will result in the player practicing an additional point, and
+
happen if the fields have 0 entered in them. I warn that it could be rather
for spells, skills or weapons, practicing up to the nearest 5.</PARA>
+
unpredictable.</PARA>
  
<PARA>For example:    Percentage maximum for an ability is set for 95%. Player practices the
+
<PARA>Setting the maximum too high will only serve to dissuade players from
ability, which then becomes 96%.
+
practicing and indeed even playing. This is not to say you cannot make a
  Player then decides to practice a weapon skill. It is set to 77% maximum.
+
truly powerful entity very expensive. Just make sure that the entity is
After practicing, the player has 80% in the weapon.
+
worth the cost.</PARA>
  It is better to simply make the ability 96% and the weapon 80% maximum
+
</LISTITEM>
instead.</PARA>
+
</VARLISTENTRY>
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;Field 6
<VARLISTENTRY>
+
<DICTDEF>
;Field 3
+
<PARA>This is the only necessary practice points field. It allows one to use
<DICTDEF>
+
their skill or ability practice points to increase their character's powers.
<PARA>Name of Entity</PARA>
+
This number is generally determined by the desire of the builder to make
</LISTITEM>
+
the entity easier or harder to practice, based upon the logical
</VARLISTENTRY>
+
consideration of how this class would learn/use the entity.</PARA>
<VARLISTENTRY>
 
;Field 4
 
<DICTDEF>
 
<PARA>This is the practice cost minimum in Old gold pieces. Anything less than 10 here
 
will simply be translated as 1 iron piece. Anything other than a number divisible
 
by 10 is rounded up to the nearest iron piece.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Field 5
 
<DICTDEF>
 
<PARA>This is the practice cost maximum in old gold pieces. It is generally defined as
 
being 1000 times what Field 4 is defined as:</PARA>
 
  
<PARA>The reason for this is because there is a scale related to the current
+
<PARA>For instance, a Fighter class would find practicing "fist" to be
practice percentage of the entity. The practice minimum is what the entity
+
exceedingly easy, so they may only need 4 points to practice this skill,
costs when it is at 0%, and the practice maximum is what it costs to
+
but on the other hand, a Mage class would not have such an experience so
practice it to maximum percentage.</PARA>
+
it may cost them 15 points to practice.</PARA>
  
<PARA>It is not necessary to multiply the minimum by 1000 to define the
+
<PARA>Don't go overboard, making this field an outrageous number will mean
maximum. It can be any number, as long as the maximum exceeds the minimum.
+
that no one is likely to practice the entity, mainly because of lack of
Failure to do so will result in the mud crashing. It is unknown what will
+
points. However, like in the cost fields, it can be made expensive to
happen if the fields have 0 entered in them. I warn that it could be rather
+
reflect the power of the entity.</PARA>
unpredictable.</PARA>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Field 7 - X
 +
<DICTDEF>
 +
<PARA>You can repeat field 6 as many times as you want the player to be
 +
able to practice in one level so you can set a point cost each
 +
time. This is so each time they practice at a level you can make it
 +
more expensive.</PARA>
  
<PARA>Setting the maximum too high will only serve to dissuade players from
+
<PARA>An example of this would look as follows:</PARA>
practicing and indeed even playing. This is not to say you cannot make a
+
<INFORMALEXAMPLE><PROGRAMLISTING>
truly powerful entity very expensive. Just make sure that the entity is
 
worth the cost.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Field 6
 
<DICTDEF>
 
<PARA>This is the only necessary practice points field. It allows one to use
 
their skill or ability practice points to increase their character's powers.
 
This number is generally determined by the desire of the builder to make
 
the entity easier or harder to practice, based upon the logical
 
consideration of how this class would learn/use the entity.</PARA>
 
  
<PARA>For instance, a Fighter class would find practicing "fist" to be
+
  0;  90; consider                      ;  4;  4000;  5; 10;      0;
exceedingly easy, so they may only need 4 points to practice this skill,  
+
 
but on the other hand, a Mage class would not have such an experience so
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
it may cost them 15 points to practice.</PARA>
+
 
 +
<PARA>This example has consider being practiced at guild level 0 up to 90%,
 +
costing 4 old gold pieces minimum, 4000 old gold pieces maximum,
 +
5 practice points for the first practice per level and 10 for the
 +
second.</PARA>
  
<PARA>Don't go overboard, making this field an outrageous number will mean
+
<PARA>   For 15 points a level, the player can practice consider twice. It is
that no one is likely to practice the entity, mainly because of lack of
+
actually quite nice to be able to do this, and generally easier entities
points. However, like in the cost fields, it can be made expensive to
+
take advantage of this more often.</PARA>
reflect the power of the entity.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;Field 7 - X
 
<DICTDEF>
 
<PARA>You can repeat field 6 as many times as you want the player to be
 
able to practice in one level so you can set a point cost each
 
time.  This is so each time they practice at a level you can make it
 
more expensive.</PARA>
 
  
<PARA>An example of this would look as follows:</PARA>
+
<PARA>Each additional field is followed by a semicolon</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;Field X
 +
<DICTDEF>
 +
<PARA>This is the termination field for the GTD. It tells the compiler
 +
that the GTD is finished. In fact, if you set a practice point field to
 +
0, it would consider that Field X, and end the GTD.</PARA>
  
  0;  90; consider                      ;  4;  4000;  5; 10;      0;
+
<PARA>Every GTD line must have an end of field marker!</PARA>
 
+
</LISTITEM>
  </PROGRAMLISTING></INFORMALEXAMPLE>
+
</VARLISTENTRY>
 
+
</VARIABLELIST>
<PARA>This example has consider being practiced at guild level 0 up to 90%,
 
costing 4 old gold pieces minimum, 4000 old gold pieces maximum,
 
5 practice points for the first practice per level and 10 for the
 
second.</PARA>
 
  
<PARA>   For 15 points a level, the player can practice consider twice. It is
+
<PARA>When we refer to old gold pieces they represent the <ACRONYM>VME</ACRONYM> money system as
actually quite nice to be able to do this, and generally easier entities
+
follows:</PARA>
take advantage of this more often.</PARA>
+
<TABLE frame=all id="oldgold">
 +
<TITLE>Old to new money conversions.</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Old gold piece</ENTRY>
 +
<ENTRY>New money</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>10</ENTRY>
 +
<ENTRY>1 Iron Piece (IP)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>80</ENTRY>
 +
<ENTRY>1 copper piece (CP)</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>640</ENTRY>
 +
<ENTRY>1 silver piece (SP)</ENTRY>
  
<PARA>Each additional field is followed by a semicolon</PARA>
+
</ROW>
</LISTITEM>
+
<ROW>
</VARLISTENTRY>
+
<ENTRY>5120</ENTRY>
<VARLISTENTRY>
+
<ENTRY>1 gold piece (GP)</ENTRY>
;Field X
+
</ROW>
<DICTDEF>
+
<ROW>
<PARA>This is the termination field for the GTD. It tells the compiler
+
<ENTRY>40960</ENTRY>
that the GTD is finished. In fact, if you set a practice point field to
+
<ENTRY>1 platinum piece (PP)</ENTRY>
0, it would consider that Field X, and end the GTD.</PARA>
+
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<PARA>Every GTD line must have an end of field marker!</PARA>
+
<PARA>Of course, to finish up the entire SFUN_TEACH_INIT, you must include a
</LISTITEM>
+
closing double quotation mark ("). Failure to do so will cause no end of
</VARLISTENTRY>
+
problems for you.</PARA>
</VARIABLELIST>
 
  
<PARA>When we refer to old gold pieces they represent the <ACRONYM>VME</ACRONYM> money system as
+
<PARA>A finished teacher of ability function would look like
follows:</PARA>
+
this:</PARA>
<TABLE frame=all id="oldgold">
 
<TITLE>Old to new money conversions.</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Old gold piece</ENTRY>
 
<ENTRY>New money</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>10</ENTRY>
 
<ENTRY>1 Iron Piece (IP)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>80</ENTRY>
 
<ENTRY>1 copper piece (CP)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>640</ENTRY>
 
<ENTRY>1 silver piece (SP)</ENTRY>
 
  
</ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ROW>
 
<ENTRY>5120</ENTRY>
 
<ENTRY>1 gold piece (GP)</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>40960</ENTRY>
 
<ENTRY>1 platinum piece (PP)</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>Of course, to finish up the entire SFUN_TEACH_INIT, you must include a
+
special SFUN_TEACH_INIT
closing double quotation mark ("). Failure to do so will cause no end of
+
"&amp;labilities;0;
problems for you.</PARA>
+
$1n tells you, 'I have never heard of such an ability.';
 +
$1n tells you, 'I do not know how to teach this ability.';
 +
$1n tells you, 'You haven't got %s for me.';
 +
$1n tells you, 'You haven't got %d ability points.';
 +
$1n tells you, 'I can not teach you any more';
 +
$1n tells you, 'You must be unaffected by magic, otherwise I can't teach
 +
you.';
 +
$1n tells you, 'Remove all equipment, please.';
  
<PARA>A finished teacher of ability function would look like
+
  0;  100; Strength                      ;  4;  4000;  8;      0;
this:</PARA>
+
  0;  90; Dexterity                    ;  14; 14000;  12;      0;
 +
  0;  90; Constitution                  ;  14; 14000;  9;      0;
 +
  0;  100; Hitpoints                    ;  4;  4000;  11;      0;
 +
  2;  60; Brain                        ;  23; 23000;  14;      0;
 +
  4;  80; Charisma                      ;  18; 18000;  14;      0;
 +
"
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
special SFUN_TEACH_INIT
+
<PARA>There are two other easy to use specials that you will want to use
"&amp;labilities;0;
+
with your teacher. they are 'SFUN_GUILD_BASIS' and
$1n tells you, 'I have never heard of such an ability.';
+
'SFUN_MEMBERS_ONLY'.</PARA>
$1n tells you, 'I do not know how to teach this ability.';
 
$1n tells you, 'You haven't got %s for me.';
 
$1n tells you, 'You haven't got %d ability points.';
 
$1n tells you, 'I can not teach you any more';
 
$1n tells you, 'You must be unaffected by magic, otherwise I can't teach
 
you.';
 
$1n tells you, 'Remove all equipment, please.';
 
  
  0;  100; Strength                      ;  4;  4000;  8;      0;
+
<VARIABLELIST>
  0;  90; Dexterity                    ;  14; 14000;  12;      0;
+
<VARLISTENTRY>
  0;  90; Constitution                  ;  14; 14000;  9;      0;
+
;SFUN_GUILD_BASIS
  0;  100; Hitpoints                    ;  4;  4000;  11;      0;
+
<DICTDEF>
  2;  60; Brain                        ;  23; 23000;  14;      0;
+
<PARA>This initializes the teacher and the only argument is the guild
  4;  80; Charisma                      ;  18; 18000;  14;      0;
+
name</PARA>
"
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
special SFUN_GUILD_BASIS "Udgaard Fighter"
  
<PARA>There are two other easy to use specials that you will want to use
+
</PROGRAMLISTING></INFORMALEXAMPLE>
with your teacher.  they are 'SFUN_GUILD_BASIS' and
 
'SFUN_MEMBERS_ONLY'.</PARA>
 
  
<VARIABLELIST>
+
</LISTITEM>
<VARLISTENTRY>
+
</VARLISTENTRY>
;SFUN_GUILD_BASIS
 
<DICTDEF>
 
<PARA>This initializes the teacher and the only argument is the guild
 
name</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
special SFUN_GUILD_BASIS "Udgaard Fighter"
+
<VARLISTENTRY>
 +
;SFUN_MEMBERS_ONLY
 +
<DICTDEF>
 +
<PARA>This simply blocks anyone who is not in the guild from
 +
practicing This means the argument is the guild name. and the act
 +
separated by a '#', an example would look as follows:</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
special SFUN_MEMBERS_ONLY "Udgaard fighter#$1n says, 'Buggar ye off, $3n.'"
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>
;SFUN_MEMBERS_ONLY
+
</VARIABLELIST>
<DICTDEF>
 
<PARA>This simply blocks anyone who is not in the guild from
 
practicing This means the argument is the guild name. and the act
 
separated by a '#', an example would look as follows:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Finally we will show you what a full teacher would look like with
 +
the entire specials and the NPC definition.</PARA>
  
special SFUN_MEMBERS_ONLY "Udgaard fighter#$1n says, 'Buggar ye off, $3n.'"
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>
+
jones
</VARIABLELIST>
 
  
<PARA>Finally we will show you what a full teacher would look like with
+
names {"blacksmith", "smith", "Jones"}
the entire specials and the NPC definition.</PARA>
+
title "Jones the blacksmith"
 +
descr "The venerable Jones Blacksmith is here."
 +
extra {}
 +
"The smith is old but his arms still retain the strength of his youth.
 +
He looks as if he has retired, but he can still put you through the
 +
drills of physical training."
 +
flags {UNIT_FL_NO_TELEPORT}
 +
romflags {CHAR_PROTECTED}
 +
//Define from composed.h
 +
M_HUMAN_WARRIOR_AXE(80, SEX_MALE)
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
//negative exp to discourage killing teacher
 +
exp -100
  
jones
+
special SFUN_GUILD_BASIS GUILD_UDG_FIGHTER
 +
special SFUN_MEMBERS_ONLY GUILD_UDG_FIGHTER+"#$1n says, 'Buggar ye off, $3n.'"
  
names {"blacksmith", "smith", "Jones"}
+
special SFUN_TEACH_INIT
title "Jones the blacksmith"
+
"&amp;labilities;0;
descr "The venerable Jones Blacksmith is here."
+
$1n tells you, 'I have never heard of such an ability.';
extra {}
+
$1n tells you, 'I do not know how to teach this ability.';
"The smith is old but his arms still retain the strength of his youth.
+
$1n tells you, 'You haven't got %s for me.';
He looks as if he has retired, but he can still put you through the
+
$1n tells you, 'You haven't got %d ability points.';
drills of physical training."
+
$1n tells you, 'I can not teach you any more';
flags {UNIT_FL_NO_TELEPORT}
+
$1n tells you, 'You must be unaffected by magic, otherwise I can't teach
romflags {CHAR_PROTECTED}
+
you.';
//Define from composed.h
+
$1n tells you, 'Remove all equipment, please.';
M_HUMAN_WARRIOR_AXE(80, SEX_MALE)
 
  
//negative exp to discourage killing teacher
+
  0;  100; Strength                      ;  4;  4000;  8;      0;
exp -100
+
  0;  90; Dexterity                    ;  14; 14000;  12;      0;
 +
  0;  90; Constitution                  ;  14; 14000;  9;      0;
 +
  0;  100; Hitpoints                    ;  4;  4000;  11;      0;
 +
  2;  60; Brain                        ;  23; 23000;  14;      0;
 +
  4;  80; Charisma                      ;  18; 18000;  14;      0;
 +
"
  
special SFUN_GUILD_BASIS GUILD_UDG_FIGHTER
+
</PROGRAMLISTING></INFORMALEXAMPLE>
special SFUN_MEMBERS_ONLY GUILD_UDG_FIGHTER+"#$1n says, 'Buggar ye off, $3n.'"
 
  
special SFUN_TEACH_INIT
+
</sect2>
"&amp;labilities;0;
 
$1n tells you, 'I have never heard of such an ability.';
 
$1n tells you, 'I do not know how to teach this ability.';
 
$1n tells you, 'You haven't got %s for me.';
 
$1n tells you, 'You haven't got %d ability points.';
 
$1n tells you, 'I can not teach you any more';
 
$1n tells you, 'You must be unaffected by magic, otherwise I can't teach
 
you.';
 
$1n tells you, 'Remove all equipment, please.';
 
  
  0;  100; Strength                      ;  4;  4000;  8;      0;
+
<sect2 id="specguildmaster">
  0;  90; Dexterity                    ;  14; 14000;  12;      0;
+
<TITLE>Guild master functions</TITLE>
  0;  90; Constitution                  ;  14; 14000;  9;      0;
 
  0;  100; Hitpoints                    ;  4;  4000;  11;      0;
 
  2;  60; Brain                        ;  23; 23000;  14;      0;
 
  4;  80; Charisma                      ;  18; 18000;  14;      0;
 
"
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>When you make a guild you have to make a guild master for it.  This
 +
NPC will let people join and leave the guild and it also gives titles.
 +
To create a guild master you need to use three 'special' functions.  The
 +
functions you need are 'SFUN_GUILD_BASIS', 'SFUN_GUILD_MASTER', and
 +
'SFUN_GUILD_TITLES'.</PARA>
  
</sect2>
+
<VARIABLELIST>
 +
<VARLISTENTRY>
 +
;SFUN_GUILD_BASIS
 +
<DICTDEF>
 +
<PARA>This initializes the master and the only argument is the guild
 +
name</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<sect2 id="specguildmaster">
+
special SFUN_GUILD_BASIS "Udgaard Fighter"
<TITLE>Guild master functions</TITLE>
 
  
<PARA>When you make a guild you have to make a guild master for it.  This
+
</PROGRAMLISTING></INFORMALEXAMPLE>
NPC will let people join and leave the guild and it also gives titles.
 
To create a guild master you need to use three 'special' functions.  The
 
functions you need are 'SFUN_GUILD_BASIS', 'SFUN_GUILD_MASTER', and
 
'SFUN_GUILD_TITLES'.</PARA>
 
  
<VARIABLELIST>
+
</LISTITEM>
<VARLISTENTRY>
+
</VARLISTENTRY>
;SFUN_GUILD_BASIS
 
<DICTDEF>
 
<PARA>This initializes the master and the only argument is the guild
 
name</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
special SFUN_GUILD_BASIS "Udgaard Fighter"
+
<VARLISTENTRY>
 +
;SFUN_GUILD_MASTER
 +
<DICTDEF>
 +
<PARA>The guild master function takes 6 arguments.  Like the teacher
 +
function the arguments must be surrounded by double quotes.  The strings
 +
in the arguments must be surrounded by tilde marks (~).  The following
 +
is a description of the arguments and what they do.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARIABLELIST>
 +
<VARLISTENTRY>
 +
;Line1:
 +
<DICTDEF>
 +
<PARA>The first argument on is what the guild name is.  As in the
 +
teacher you need to pre-pend the '&amp;l' symbol so the <ACRONYM>VME</ACRONYM> doesn't
 +
mess with the formatting of the string when the guild master is
 +
compiled.</PARA>
  
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
&amp;lGuild = ~Udgaard fighter~
;SFUN_GUILD_MASTER
+
<DICTDEF>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>The guild master function takes 6 arguments.  Like the teacher
+
</LISTITEM>
function the arguments must be surrounded by double quotes.  The strings
+
</VARLISTENTRY>
in the arguments must be surrounded by tilde marks (~).  The following
+
<VARLISTENTRY>
is a description of the arguments and what they do.</PARA>
+
<term>Line 2</term>
 +
<LISTITEM>
 +
<PARA>This argument is what quest needs to be done before the character
 +
can enter the guild.</PARA>
 +
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
 +
 +
Guild Enter Quest = ~Fighter Proven~
  
<VARIABLELIST>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<VARLISTENTRY>
+
  </LISTITEM> </VARLISTENTRY>
;Line1:
+
<VARLISTENTRY>
<DICTDEF>
+
<term>Line 3</term>
<PARA>The first argument on is what the guild name is.  As in the
+
<LISTITEM>
teacher you need to pre-pend the '&amp;l' symbol so the <ACRONYM>VME</ACRONYM> doesn't
+
  <PARA>This argument is the amount it costs to enter the guild in old
mess with the formatting of the string when the guild master is
+
  gold pieces.</PARA>
compiled.</PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
Guild Enter Cost = 640
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
  </LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
<term>Line 4</term>
 +
<LISTITEM>
 +
  <PARA>this argument is the quest the player must do before leaving the
 +
  guild.  If the player has not completed this quest the guild master
 +
  will not let the player leave.</PARA>
 +
 
 +
  <INFORMALEXAMPLE><PROGRAMLISTING>
 +
 
 +
Guild Leave Quest = ~Wimp proven~
  
&amp;lGuild = ~Udgaard fighter~
+
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</LISTITEM>
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</VARLISTENTRY>
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
<term>Line 5</term>
<VARLISTENTRY>
+
<LISTITEM>
<term>Line 2</term>
+
<PARA>This argument is how much old gold pieces it will cost to quit
<LISTITEM>
+
the guild.  If the player doesn't have enough money the guild master
<PARA>This argument is what quest needs to be done before the character
+
will not let the player join.</PARA>
can enter the guild.</PARA>
+
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
+
Guild Leave Cost = 3200
Guild Enter Quest = ~Fighter Proven~
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  </LISTITEM> </VARLISTENTRY>
+
</LISTITEM>
<VARLISTENTRY>
+
</VARLISTENTRY>
<term>Line 3</term>
+
<VARLISTENTRY>
<LISTITEM>
+
<term>Line 6</term>
  <PARA>This argument is the amount it costs to enter the guild in old
+
<LISTITEM>
  gold pieces.</PARA>
+
<PARA>This argument is what guild the guild master will not accept
<INFORMALEXAMPLE><PROGRAMLISTING>
+
players from.  For example the following will make it so no Thief can
 +
be in the fighter guild.</PARA>
  
Guild Enter Cost = 640
+
<INFORMALEXAMPLE><PROGRAMLISTING>
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  </LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
<term>Line 4</term>
 
<LISTITEM>
 
  <PARA>this argument is the quest the player must do before leaving the
 
  guild.  If the player has not completed this quest the guild master
 
  will not let the player leave.</PARA>
 
 
 
  <INFORMALEXAMPLE><PROGRAMLISTING>
 
 
 
Guild Leave Quest = ~Wimp proven~
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
Guild Exclude Quest = ~Udgaard Thief Quitter~
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
<term>Line 5</term>
 
<LISTITEM>
 
<PARA>This argument is how much old gold pieces it will cost to quit
 
the guild.  If the player doesn't have enough money the guild master
 
will not let the player join.</PARA>
 
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
 
Guild Leave Cost = 3200
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
</VARIABLELIST>
<term>Line 6</term>
 
<LISTITEM>
 
<PARA>This argument is what guild the guild master will not accept
 
players from.  For example the following will make it so no Thief can
 
be in the fighter guild.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<NOTE><PARA>When we refer to old gold pieces they represent the
 +
<ACRONYM>VME</ACRONYM> money system as shown in <xref
 +
linkend="oldgold"></PARA></NOTE>
  
Guild Exclude Quest = ~Udgaard Thief Quitter~
+
<PARA>The following is what a full 'SFUN_GUILD_MASTER'
 +
function would look like</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>  
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<NOTE><PARA>When we refer to old gold pieces they represent the
+
special SFUN_GUILD_MASTER
<ACRONYM>VME</ACRONYM> money system as shown in <xref
+
"&amp;lGuild              = ~Udgaard fighter~
linkend="oldgold"></PARA></NOTE>
+
Guild Enter Quest    = ~Fighter Proven~
 +
Guild Enter Cost    = 640
 +
Guild Leave Quest    = ~Wimp proven~
 +
Guild Leave Cost    = 3200
 +
Guild Exclude Quest  = ~Udgaard Fighter Quitter~"
  
<PARA>The following is what a full 'SFUN_GUILD_MASTER'
+
</PROGRAMLISTING></INFORMALEXAMPLE>
function would look like</PARA>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<INFORMALEXAMPLE><PROGRAMLISTING>  
+
<VARLISTENTRY>
 +
;SFUN_GUILD_TITLES
 +
<DICTDEF>
  
special SFUN_GUILD_MASTER
+
<PARA>This function allows the player to request a title at the guild
"&amp;lGuild              = ~Udgaard fighter~
+
master.  A title will be given every 5 levels up to level 100 so you
Guild Enter Quest    = ~Fighter Proven~
+
have 20 titles you can set.  The title function takes one title for male
Guild Enter Cost    = 640
+
chars and one title for female chars so you have to set 40
Guild Leave Quest    = ~Wimp proven~
+
titles.</PARA>
Guild Leave Cost    = 3200
 
Guild Exclude Quest  = ~Udgaard Fighter Quitter~"
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The arguments of this function are easy.  The first thing you do is
</LISTITEM>
+
the normal '&amp;l' to let the <ACRONYM>VME</ACRONYM> know not to mess with this string.
</VARLISTENTRY>
+
Then you put the guild name.  Finally you follow it by the list of 40
 +
titles.  The following is the fighter guilds title list</PARA>
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;SFUN_GUILD_TITLES
 
<DICTDEF>
 
  
<PARA>This function allows the player to request a title at the guild
+
special SFUN_GUILD_TITLES
master.  A title will be given every 5 levels up to level 100 so you
+
"&amp;lUdgaard fighter
have 20 titles you can set.  The title function takes one title for male
+
the %s Swordpupil
chars and one title for female chars so you have to set 40
+
the %s Swordpupil
titles.</PARA>
+
the %s Recruit
 +
the %s Recruit
 +
the %s Sentry
 +
the %s Sentress
 +
the %s Fighter
 +
the %s Fighter
 +
the %s Soldier
 +
the %s Soldier
 +
the %s Warrior
 +
the %s Warrior
 +
the %s Veteran
 +
the %s Veteran
 +
the %s Swordsman
 +
the %s Swordswoman
 +
the %s Fencer
 +
the %s Fenceress
 +
the %s Combatant
 +
the %s Combatess
 +
the %s Hero
 +
the %s Heroine
 +
the %s Myrmidon
 +
the %s Myrmidon
 +
the %s Swashbuckler
 +
the %s Swashbuckleress
 +
the %s Mercenary
 +
the %s Mercenaress
 +
the %s Swordmaster
 +
the %s Swordmistress
 +
the %s Lieutenant
 +
the %s Lieutenant
 +
the %s Champion
 +
the %s Lady Champion
 +
the %s Dragoon
 +
the %s Lady Dragoon
 +
the %s Cavalier
 +
the %s Cavalier
 +
the %s Knight
 +
the %s Lady Knight"
  
<PARA>The arguments of this function are easy.  The first thing you do is
+
</PROGRAMLISTING></INFORMALEXAMPLE>
the normal '&amp;l' to let the <ACRONYM>VME</ACRONYM> know not to mess with this string.
 
Then you put the guild name.  Finally you follow it by the list of 40
 
titles.  The following is the fighter guilds title list</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
special SFUN_GUILD_TITLES
+
<PARA>Put all three of these functions on your NPC and your all set you
"&amp;lUdgaard fighter
+
have a guild master.</PARA>
the %s Swordpupil
+
</sect2>
the %s Swordpupil
 
the %s Recruit
 
the %s Recruit
 
the %s Sentry
 
the %s Sentress
 
the %s Fighter
 
the %s Fighter
 
the %s Soldier
 
the %s Soldier
 
the %s Warrior
 
the %s Warrior
 
the %s Veteran
 
the %s Veteran
 
the %s Swordsman
 
the %s Swordswoman
 
the %s Fencer
 
the %s Fenceress
 
the %s Combatant
 
the %s Combatess
 
the %s Hero
 
the %s Heroine
 
the %s Myrmidon
 
the %s Myrmidon
 
the %s Swashbuckler
 
the %s Swashbuckleress
 
the %s Mercenary
 
the %s Mercenaress
 
the %s Swordmaster
 
the %s Swordmistress
 
the %s Lieutenant
 
the %s Lieutenant
 
the %s Champion
 
the %s Lady Champion
 
the %s Dragoon
 
the %s Lady Dragoon
 
the %s Cavalier
 
the %s Cavalier
 
the %s Knight
 
the %s Lady Knight"
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<sect2 id="specbank">
 +
<TITLE>NPC banker</TITLE>
  
</LISTITEM>
+
<PARA>The banker function is the easiest 'special' function there is to
</VARLISTENTRY>
+
use.  The following placed on an NPC will make a banker:</PARA>
</VARIABLELIST>
 
  
<PARA>Put all three of these functions on your NPC and your all set you
+
<INFORMALEXAMPLE><PROGRAMLISTING>
have a guild master.</PARA>
 
</sect2>
 
  
<sect2 id="specbank">
+
special SFUN_BANK
<TITLE>NPC banker</TITLE>
 
  
<PARA>The banker function is the easiest 'special' function there is to
+
</PROGRAMLISTING></INFORMALEXAMPLE>
use.  The following placed on an NPC will make a banker:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>As you see its very simple, so we will just show you a completed banker
 +
and leave it at that.</PARA>
  
special SFUN_BANK
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
bob
  
<PARA>As you see its very simple, so we will just show you a completed banker
+
names {"Bob"}
and leave it at that.</PARA>
+
title "Bob"
 +
descr "Bob the Banker is here, sitting behind the counter."
 +
extra {}
 +
"He has a very serious look on his face."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
// define from composed.h
 +
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
  
bob
+
//discourage people from killing banker
 +
exp -500
  
names {"Bob"}
+
flags {UNIT_FL_NO_TELEPORT}
title "Bob"
 
descr "Bob the Banker is here, sitting behind the counter."
 
extra {}
 
"He has a very serious look on his face."
 
  
// define from composed.h
+
special SFUN_BANK
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
+
end
  
//discourage people from killing banker
+
</PROGRAMLISTING></INFORMALEXAMPLE>
exp -500
+
</sect2>
  
flags {UNIT_FL_NO_TELEPORT}
 
  
special SFUN_BANK
+
</SECT1>
end
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<sect1 id="roomnpczone">
</sect2>
+
<TITLE>Dragon station with rooms and NPCs</TITLE>
  
 +
<PARA>Now we will add the NPCs we have built to the zone from the
 +
previous chapter.  This is still not complete while it does compile and
 +
you can log into your zone, you still have to load your NPCs and there
 +
are no objects.  These will be added as you progress through this
 +
manual.  The following is the source file so far.</PARA>
  
</SECT1>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<sect1 id="roomnpczone">
+
#include &lt;composed.h&gt;
<TITLE>Dragon station with rooms and NPCs</TITLE>
+
%zone dragonst
 +
lifespan 20
 +
reset RESET_ANYHOW
 +
creators {"whistler"}
  
<PARA>Now we will add the NPCs we have built to the zone from the
+
notes
previous chapter.  This is still not complete while it does compile and
+
"This is the dragon station I shortened it to dragonst for ease in
you can log into your zone, you still have to load your NPCs and there
+
loadingIf you have any questions email me at whistler@valhalla.com"
are no objectsThese will be added as you progress through this
 
manual. The following is the source file so far.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
help
 +
"Not sure what could help you now.  You are stuck on one of the
 +
weirdest space stations you have ever seen and you smell burning
 +
sulfur."
  
#include &lt;composed.h&gt;
+
%rooms
%zone dragonst
 
lifespan 20
 
reset RESET_ANYHOW
 
creators {"whistler"}
 
  
notes
+
chamber
"This is the dragon station I shortened it to dragonst for ease in
+
title "The middle chamber of the station"
loadingIf you have any questions email me at whistler@valhalla.com"
+
descr
 +
"This chamber seems to have the entire station rotating around it.  It is
 +
unbelievably large the ceiling seems to be a good 200 meeters high and
 +
the room is perfectly cubic. Small human size ornate chairs with dragon
 +
designs scrawled on the arms and back are arranged in a triangle like
 +
setting with one large chair at the frontThis must be where all
 +
station meetings are held. large pictures cover the walls depicting
 +
dragons in all kinds of situations. large passages lead of to the west
 +
and the east.."
  
help
+
extra {"chair","chairs"}
"Not sure what could help you now.  You are stuck on one of the
+
"The chairs are made of some metal you don't recognize and every inch is covered
weirdest space stations you have ever seen and you smell burning
+
with some kind of dragon."
sulfur."
 
  
%rooms
+
extra  {"dragon picture","picture"}
 +
"Thousands of dragons dot the skies of this rather life like picture.  In the
 +
center you see something move.  It looks to be a little green dragon."
  
chamber
+
extra{"green dragon","dragon","green"}
title "The middle chamber of the station"
+
"An intellegence looking dragon is sitting perched on a large chair watching you."
descr
 
"This chamber seems to have the entire station rotating around it.  It is
 
unbelievably large the ceiling seems to be a good 200 meeters high and
 
the room is perfectly cubic. Small human size ornate chairs with dragon
 
designs scrawled on the arms and back are arranged in a triangle like
 
setting with one large chair at the front.  This must be where all
 
station meetings are held. large pictures cover the walls depicting
 
dragons in all kinds of situations.  large passages lead of to the west
 
and the east.."
 
  
extra {"chair","chairs"}
+
movement SECT_INSIDE
"The chairs are made of some metal you don't recognize and every inch is covered
+
ALWAYS_LIGHT
with some kind of dragon."
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
extra  {"dragon picture","picture"}
 
"Thousands of dragons dot the skies of this rather life like picture.  In the
 
center you see something move.  It looks to be a little green dragon."
 
  
extra{"green dragon","dragon","green"}
+
west to disposal_room descr
"An intellegence looking dragon is sitting perched on a large chair watching you."
+
"You see a small room.";
  
movement SECT_INSIDE
+
east to hallway descr
ALWAYS_LIGHT
+
"You see what looks to be a hallway.";
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
 +
end
  
west to disposal_room descr
+
hallway
"You see a small room.";
+
title "Module tunnel"
 +
descr "The hallway is about 50 meters long and around 100 meters from
 +
side to side and top to bottom.  The hallway seems to be dust free.  The
 +
walls and the floors seem to be made out of the same sterile
 +
metal-plastic that all space agencies uses.  There are large plate glass
 +
windows that open up into space.  The hallway is filled with a dim light
 +
that seems to come from everywhere yet no where all at once.  You notice
 +
a glimmer of bright light coming from the windows.  To the east you see
 +
an air lock and to the west the hallway opens up into a larger room."
  
east to hallway descr
+
extra {"windows","window"}
"You see what looks to be a hallway.";
+
"Your eyes are drawn to a large ship lit up with running lights sitting
 +
about 1 kilometer from the station."
  
end
+
extra{"floor","walls","wall"}
 +
"Well what can be said it looks to be in perfect condition.  What else would
 +
you want to know?"
  
hallway
+
extra {"large ship" ,"ship"}
title "Module tunnel"
+
"The ship looks really big and is shaped like a dragon.  The scales
descr "The hallway is about 50 meters long and around 100 meters from
+
sparkle and seem to be multiple colors."
side to side and top to bottom.  The hallway seems to be dust free.  The
 
walls and the floors seem to be made out of the same sterile
 
metal-plastic that all space agencies uses.  There are large plate glass
 
windows that open up into space.  The hallway is filled with a dim light
 
that seems to come from everywhere yet no where all at once.  You notice
 
a glimmer of bright light coming from the windows.  To the east you see
 
an air lock and to the west the hallway opens up into a larger room."
 
  
extra {"windows","window"}
+
movement SECT_INSIDE
"Your eyes are drawn to a large ship lit up with running lights sitting
+
ALWAYS_LIGHT
about 1 kilometer from the station."
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
extra{"floor","walls","wall"}
+
west to chamber descr
"Well what can be said it looks to be in perfect condition. What else would
+
"The hallway opens up into a chamber.";
you want to know?"
 
  
extra {"large ship" ,"ship"}
+
east to office descr
"The ship looks really big and is shaped like a dragon.  The scales
+
"You see what looks to be an office."
sparkle and seem to be multiple colors."
+
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
  
movement SECT_INSIDE
+
end
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
west to chamber descr
+
office
"The hallway opens up into a chamber.";
+
title "The station office"
 +
descr
 +
"Large paintings fill the walls of this part of the station.  The room
 +
is as large as the other rooms big enough for Dragons to lounge while
 +
still having a desk in one corner small enough for a humanoid.  The
 +
floor along the north wall is lined with some kind of fabric and seems
 +
very soft to walk on, it may be some kind of dragon lounge judging by
 +
how large an area it covers.  There is a passage to the west."
  
east to office descr
+
movement SECT_INSIDE
"You see what looks to be an office."
+
ALWAYS_LIGHT
keyword {"air lock door","air lock","door"}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
open {EX_OPEN_CLOSE, EX_CLOSED};
 
  
end
+
extra {"paintings","painting"}
 +
"The paintings are of many dragons and riders in all kinds of tasks from
 +
combat to look out.  All the figures seem to be staring at a staff
 +
being held by a depiction of a wizard on the south wall."
  
office
+
extra {"wizard","staff"}
title "The station office"
+
"The wizard has his hand stretched out and it seems there is a place
descr
+
you can almost grab the staff. Maybe if you searched the staff you would
"Large paintings fill the walls of this part of the station.  The room
+
find it."
is as large as the other rooms big enough for Dragons to lounge while
 
still having a desk in one corner small enough for a humanoid. The
 
floor along the north wall is lined with some kind of fabric and seems
 
very soft to walk on, it may be some kind of dragon lounge judging by
 
how large an area it covers.  There is a passage to the west."
 
  
movement SECT_INSIDE
+
extra {"desk"}
ALWAYS_LIGHT
+
"Its a desk alright but there doesn't seem to be any drawers and it
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
seems totally empty."
  
extra {"paintings","painting"}
+
extra{"fabric"}
"The paintings are of many dragons and riders in all kinds of tasks from
+
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
combat to look out.  All the figures seem to be staring at a staff
 
being held by a depiction of a wizard on the south wall."
 
  
extra {"wizard","staff"}
+
west to hallway descr
"The wizard has his hand stretched out and it seems there is a place
+
"You see what looks to be a hallway."
you can almost grab the staff. Maybe if you searched the staff you would
+
keyword {"air lock door","air lock","door"}
find it."
+
open {EX_OPEN_CLOSE, EX_CLOSED};
  
extra {"desk"}
+
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
"Its a desk alright but there doesn't seem to be any drawers and it
+
south to portal_room descr
seems totally empty."
+
"You see what looks to be a portal room."
 +
keyword {"air lock door","air lock","staff","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
  
extra{"fabric"}
+
end
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
 
  
west to hallway descr
+
portal_room
"You see what looks to be a hallway."
+
title "Green field room"
keyword {"air lock door","air lock","door"}
+
descr
open {EX_OPEN_CLOSE, EX_CLOSED};
+
"Like the other rooms on the station this one is large enough for
 +
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.
 +
there is a door that leads to another room to the north."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
extra {"green field","field"}
 +
"The field looks to be a green fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
 +
 +
north  to office descr
 +
"You see what looks to be an office."
 +
keyword {"air lock door","air lock","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 +
 +
//A link to the portal is also here from room_port
 +
end
 +
 +
ship_port
 +
names{"green field", "field"}
 +
title "Green field"
 +
descr
 +
"Green Mist swirls about you."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
in ship
 +
 +
dilcopy force_move@function(
 +
//Time to activation
 +
4,
 +
//room and act
 +
"portal_room@dragonst!You feel your body dissolving for lack of a better
 +
description.&amp;nYou appear on the deck of a ship.",
 +
//True or False for randomizing or not
 +
FALSE);
 +
 +
 +
end                                           
  
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
+
room_port
south to portal_room descr
+
names{"green field", "field"}
"You see what looks to be a portal room."
+
title "Green field"
keyword {"air lock door","air lock","staff","door"}
+
descr
key nokey
+
"Green Mist swirls about you."
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
+
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
end
+
in portal_room
  
portal_room
+
dilcopy force_move@function(
title "Green field room"
+
//Time to activation
 +
4,
 +
//room and act
 +
"ship@dragonst!You feel your body dissolving for lack of a better
 +
description.&amp;nYou appear on the deck of a ship.",
 +
//True or False for randomizing or not
 +
FALSE);
 +
 
 +
 
 +
end
 +
 
 +
disposal_room
 +
title "Red field room"
 
descr
 
descr
 
"Like the other rooms on the station this one is large enough for
 
"Like the other rooms on the station this one is large enough for
 
dragons to comfortably fit in.  The strange thing about this room though
 
dragons to comfortably fit in.  The strange thing about this room though
is it is totally empty except for a green field right in the center.  
+
is it is totally empty except for a red field right in the center.  
there is a door that leads to another room to the north."
+
there is a door that leads to another room to the east."
+
 
 
movement SECT_INSIDE
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
 
extra {"green field","field"}
+
extra {"red field","field"}
"The field looks to be a green fog shifting and churning as you watch.  
+
"The field looks to be a red fog shifting and churning as you watch.  
 
if you are nuts you could probably enter it."
 
if you are nuts you could probably enter it."
+
 
north  to office descr
+
east to chamber descr
"You see what looks to be an office."
+
"You see the main chamber.";
keyword {"air lock door","air lock","door"}
+
 
key nokey
+
//A link to the portal is also here from dis_port
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
 
//A link to the portal is also here from room_port
 
 
end
 
end
+
 
ship_port
+
dis_port
names{"green field", "field"}
+
names {"red field","field"}
title "Green field"
+
title "Red field"
 
descr
 
descr
"Green Mist swirls about you."
+
"Red Mist swirls about you."
+
 
 
movement SECT_INSIDE
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
in ship
 
 
 
dilcopy force_move@function(
 
dilcopy force_move@function(
//Time to activation
+
//how fast to force move in seconds
 
4,
 
4,
//room and act
+
//room to force move to and act
"portal_room@dragonst!You feel your body dissolving for lack of a better
+
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
description.&amp;nYou appear on the deck of a ship.",
+
//true or false random move or not
//True or False for randomizing or not
+
0);
FALSE);
+
in disposal_room
 
 
end                                           
 
  
room_port
+
end
names{"green field", "field"}
 
title "Green field"
 
descr
 
"Green Mist swirls about you."
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
in portal_room
+
ship
 +
title "War dragon"
 +
descr
 +
"Blue light softly glows from con duets that line the walls of this ship.
 +
The floors beside the east and west wall have what looks to be soft
 +
fabric covering.  The south wall has small controls that seem to be made
 +
for humanoids with two small chairs that look to be pilot seats.  view
 +
portals are about 50 meters up the side of the ship on the west and east
 +
wall and some kind of electronic screen covers the south wall.  The ship
 +
seems to be a one room ship but there is a green field by the north
 +
wall."
  
dilcopy force_move@function(
+
movement SECT_INSIDE
//Time to activation
+
ALWAYS_LIGHT
4,
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
//room and act
 
"ship@dragonst!You feel your body dissolving for lack of a better
 
description.&amp;nYou appear on the deck of a ship.",
 
//True or False for randomizing or not
 
FALSE);
 
  
 +
extra {"view port"}
 +
"Sorry your not 50 meters tall maybe it is made for a dragon?"
  
end
+
extra {"view screen","screen"}
 +
"It seems to be the pilots view screen but you can't seem to see a way
 +
to turn it on."
  
disposal_room
+
extra {"controls","control"}
title "Red field room"
+
"The controls are in some weird language and your afraid if you start
descr
+
pushing buttons you might rocket in to the station or worse slam into
"Like the other rooms on the station this one is large enough for
+
a planet."
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a red field right in the center.
 
there is a door that leads to another room to the east."
 
  
movement SECT_INSIDE
+
extra {"soft fabric","fabric"}
ALWAYS_LIGHT
+
"It looks to be a dragon lounge area."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"red field","field"}
+
//A link to the portal is also here from ship_port
"The field looks to be a red fog shifting and churning as you watch.
+
end
if you are nuts you could probably enter it."
 
  
east to chamber descr
+
deathspace
"You see the main chamber.";
+
title"Open space"
 +
descr
 +
"You see the ship and the station far off in the distance and you are in Space!"
  
//A link to the portal is also here from dis_port
+
movement SECT_INSIDE
end
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
dis_port
+
dilcopy death_room@function (
names {"red field","field"}
+
//how often is damage done 4 would be 1 second
title "Red field"
+
4,  
descr
+
//damage
"Red Mist swirls about you."
+
400,
 +
//act for the damage.
 +
"You realize to late that was the trash disposal transporter and you feel your
 +
lungs explode.");
  
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
dilcopy force_move@function(
 
//how fast to force move in seconds
 
4,
 
//room to force move to and act
 
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
 
//true or false random move or not
 
0);
 
in disposal_room
 
  
end
+
end
  
ship
+
%mobiles
title "War dragon"
 
descr
 
"Blue light softly glows from con duets that line the walls of this ship.
 
The floors beside the east and west wall have what looks to be soft
 
fabric covering.  The south wall has small controls that seem to be made
 
for humanoids with two small chairs that look to be pilot seats.  view
 
portals are about 50 meters up the side of the ship on the west and east
 
wall and some kind of electronic screen covers the south wall.  The ship
 
seems to be a one room ship but there is a green field by the north
 
wall."
 
  
movement SECT_INSIDE
+
bldragon
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"view port"}
+
title "a black dragon"
"Sorry your not 50 meters tall maybe it is made for a dragon?"
+
descr "A big ugly black dragon is clawing the ground here."
 +
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
  
extra {"view screen","screen"}
+
extra {}
"It seems to be the pilots view screen but you can't seem to see a way
+
"The black dragons scales glitter like black granite that has been
to turn it on."
+
polished for years by water.  He has a large neck and huge bat like
 +
wings.  his eyes watch you as you stand before him.  One claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
extra {"controls","control"}
+
extra {"eye","eyes"}
"The controls are in some weird language and your afraid if you start
+
"The dragons eyes seem to follow you no matter where you go in the room
pushing buttons you might rocket in to the station or worse slam into
+
nothing seems to escape the dragons attention."
a planet."
 
  
extra {"soft fabric","fabric"}
+
extra {"claws","claw"}
"It looks to be a dragon lounge area."
+
"The claw is big black and it looks very deadly.  It seems like the
 +
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 +
to say means the claws are about the size of short swords and long
 +
swords."
  
//A link to the portal is also here from ship_port
+
extra {"scales","scale"}
end
+
"Its a scale!  Haven't you ever seen a dragon before!"
  
deathspace
+
extra {"bat wings","wings"}
title"Open space"
+
"The dragon sees you looking and flaps his wings creating one heck of a
descr
+
wind blast."
"You see the ship and the station far off in the distance and you are in Space!"
 
  
movement SECT_INSIDE
+
M_DRAGON_BLACK_OLD(SEX_MALE)
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
dilcopy death_room@function (
+
end
//how often is damage done 4 would be 1 second
 
4,
 
//damage
 
400,
 
//act for the damage.
 
"You realize to late that was the trash disposal transporter and you feel your
 
lungs explode.");
 
  
 +
janitor
 +
names {"ugly janitor", "janitor", "hobgoblin"}
 +
title "an ugly janitor"
 +
descr "an ugly janitor is walking around, cleaning up."
  
end
+
extra{}
 +
"This ugly green thing looks more goblin than hobgoblin but he seems intent
 +
on cleaning everything around him."
  
%mobiles
+
M_AVG_HOBGOBLIN(6, SEX_MALE)
  
bldragon
+
// he is sort of good for cleaning so much
 +
alignment 900
  
title "a black dragon"
+
//give him some money
descr "A big ugly black dragon is clawing the ground here."
+
money 5 IRON_PIECE
names {"big ugly black dragon","ugly black dragon","big black dragon",
 
"black dragon","dragon"}
 
  
extra {}
+
dilcopy janitors@function(15);
"The black dragons scales glitter like black granite that has been
 
polished for years by water.  He has a large neck and huge bat like
 
wings.  his eyes watch you as you stand before him.  One claw seems to be
 
tapping slightly on the ground as if the dragon is waiting for
 
something."
 
  
extra {"eye","eyes"}
+
// only want him cleaning the station
"The dragons eyes seem to follow you no matter where you go in the room
+
dilcopy wander_zones@function("dragonst", 20, 1, 1);
nothing seems to escape the dragons attention."
 
  
extra {"claws","claw"}
+
end
"The claw is big black and it looks very deadly.  It seems like the
 
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
+
bob
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
names {"Bob"}
"The dragon sees you looking and flaps his wings creating one heck of a
+
title "Bob"
wind blast."
+
descr "Bob the Banker is here, sitting behind the counter."
 +
extra {}
 +
"He has a very serious look on his face."
  
M_DRAGON_BLACK_OLD(SEX_MALE)
+
// define from composed.h
 +
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
  
end
+
//discourage people from killing banker
 +
exp -500
  
janitor
+
flags {UNIT_FL_NO_TELEPORT}
names {"ugly janitor", "janitor", "hobgoblin"}
 
title "an ugly janitor"
 
descr "an ugly janitor is walking around, cleaning up."
 
  
extra{}
+
special SFUN_BANK
"This ugly green thing looks more goblin than hobgoblin but he seems intent
+
end
on cleaning everything around him."
 
  
M_AVG_HOBGOBLIN(6, SEX_MALE)
 
  
// he is sort of good for cleaning so much
 
alignment 900
 
  
//give him some money
 
money 5 IRON_PIECE
 
  
dilcopy janitors@function(15);
 
  
// only want him cleaning the station
 
dilcopy wander_zones@function("dragonst", 20, 1, 1);
 
  
end
 
  
bob
 
  
names {"Bob"}
+
%end
title "Bob"
 
descr "Bob the Banker is here, sitting behind the counter."
 
extra {}
 
"He has a very serious look on his face."
 
  
// define from composed.h
+
</PROGRAMLISTING></INFORMALEXAMPLE>
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
 
  
//discourage people from killing banker
+
</sect1>
exp -500
 
  
flags {UNIT_FL_NO_TELEPORT}
+
<sect1 id="npcexer">
 +
<TITLE>Suggested NPC exercises</TITLE>
  
special SFUN_BANK
+
<orderedlist>
end
+
<LISTITEM>
 +
<PARA>Using the <ACRONYM>DIL</ACRONYM> function for team work found in <xref linkend="npcdilfunc"> create a guard that will help all other guards.
 +
</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using the <ACRONYM>DIL</ACRONYM> function for rescue found in
 +
<xref linkend="npcdilfunc"> add to your guard from exercise one and make it so
 +
will now rescue as well as help.
 +
</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using the shop keeper function from <xref linkend="npcdilfunc">;
 +
make a shop keeper that sells two types of food.  The shop keeper should
 +
make 5 of them a day and it should only buy items of the food type.  For all other arguments be creative.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using the shop keeper you created from exercise three, turn your shop keeper into a global wondering sales person.
 +
</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using the <ACRONYM>DIL</ACRONYM> function for agressive found in
 +
<xref linkend="npcdilfunc"> create a Dwarf agressive to any Orc that
 +
walks into the room.</PARA>
 +
</LISTITEM>
 +
</orderedlist>
  
 +
</SECT1>
  
  
 +
</chapter>
  
 +
<chapter ID="ch-06"><?dbhtml filename="ch06.html">
 +
<TITLE>The objects section</TITLE>
  
 +
<PARA>The previous chapters would be enough for you to create an entire
 +
game of nudists with no technology and no items of any kind.  This of
 +
corse would be a very boring game of naked people fighting with no
 +
weapons.  don't worry the <ACRONYM>VME</ACRONYM> has a solution to this you can build
 +
objects to dress up the NPCs and to fill the rooms with cluttered
 +
junk.</PARA>
  
 +
<PARA>In order to get started building objects you should first be aware
 +
of the object fields you can use.  The <xref linkend="objfields"> shows a full listing
 +
of all the object fields and their types as defined in <xref
 +
linkend="ch-03">.</PARA>
  
 +
<TABLE frame=all id="objfields">
 +
<TITLE>Object fields and types</TITLE>
 +
<TGROUP align=left cols=5 colsep=1>
 +
<COLSPEC COLNAME="c1" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c2" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c3" COLWIDTH=".5in">
 +
<COLSPEC COLNAME="c4" COLWIDTH="2in">
 +
<COLSPEC COLNAME="c5" COLWIDTH="2in">
  
%end
+
<THEAD>
 +
<ROW>
 +
<ENTRY COLNAME="c1">Field</ENTRY>
 +
<ENTRY COLNAME="c2">Type</ENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ENTRY COLNAME="c4">Field</ENTRY>
 +
<ENTRY COLNAME="c5">Type</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
</sect1>
+
<ROW>
 +
<ENTRY COLNAME="c1">symbolic name</ENTRY>
 +
<ENTRY COLNAME="c2">Symbol</ENTRY>
 +
<ENTRY COLNAME="c3" morerows=10></ENTRY>
 +
<ENTRY COLNAME="c4">affect</ENTRY>
 +
<ENTRY COLNAME="c5">affect function</ENTRY>
 +
</ROW>
  
<sect1 id="npcexer">
+
<ROW>
<TITLE>Suggested NPC exercises</TITLE>
+
<ENTRY COLNAME="c1">names</ENTRY>
 +
<ENTRY COLNAME="c2">Stringlist</ENTRY>
  
<orderedlist>
+
<ENTRY COLNAME="c4">dilbegin or dilcopy</ENTRY>
<LISTITEM>
+
<ENTRY COLNAME="c5">function pointer</ENTRY>
<PARA>Using the <ACRONYM>DIL</ACRONYM> function for team work found in <xref linkend="npcdilfunc"> create a guard that will help all other guards.
+
</ROW>
</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using the <ACRONYM>DIL</ACRONYM> function for rescue found in
 
<xref linkend="npcdilfunc"> add to your guard from exercise one and make it so
 
will now rescue as well as help.
 
</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using the shop keeper function from <xref linkend="npcdilfunc">;
 
make a shop keeper that sells two types of food.  The shop keeper should
 
make 5 of them a day and it should only buy items of the food type.  For all other arguments be creative.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using the shop keeper you created from exercise three, turn your shop keeper into a global wondering sales person.
 
</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using the <ACRONYM>DIL</ACRONYM> function for agressive found in
 
<xref linkend="npcdilfunc"> create a Dwarf agressive to any Orc that
 
walks into the room.</PARA>
 
</LISTITEM>
 
</orderedlist>
 
  
</SECT1>
+
<ROW>
 +
<ENTRY COLNAME="c1">title</ENTRY>
 +
<ENTRY COLNAME="c2">String</ENTRY>
  
 +
<ENTRY COLNAME="c4">key</ENTRY>
 +
<ENTRY COLNAME="c5">String</ENTRY>
 +
</ROW>
  
</chapter>
+
<ROW>
 +
<ENTRY COLNAME="c1">descr</ENTRY>
 +
<ENTRY COLNAME="c2">String</ENTRY>
  
<chapter ID="ch-06"><?dbhtml filename="ch06.html">
+
<ENTRY COLNAME="c4">open</ENTRY>
<TITLE>The objects section</TITLE>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
 +
</ROW>
  
<PARA>The previous chapters would be enough for you to create an entire
+
<ROW>
game of nudists with no technology and no items of any kind.  This of
+
<ENTRY COLNAME="c1">inside_descr</ENTRY>
corse would be a very boring game of naked people fighting with no
+
<ENTRY COLNAME="c2">String</ENTRY>
weapons.  don't worry the <ACRONYM>VME</ACRONYM> has a solution to this you can build
 
objects to dress up the NPCs and to fill the rooms with cluttered
 
junk.</PARA>
 
  
<PARA>In order to get started building objects you should first be aware
+
<ENTRY COLNAME="c4">manipulate</ENTRY>
of the object fields you can use.  The <xref linkend="objfields"> shows a full listing
+
<ENTRY COLNAME="c5">Integer</ENTRY>
of all the object fields and their types as defined in <xref
+
</ROW>
linkend="ch-03">.</PARA>
 
  
<TABLE frame=all id="objfields">
+
<ROW>
<TITLE>Object fields and types</TITLE>
+
<ENTRY COLNAME="c1">extra</ENTRY>
<TGROUP align=left cols=5 colsep=1>
+
<ENTRY COLNAME="c2">Structure</ENTRY>
<COLSPEC COLNAME="c1" COLWIDTH="2in">
 
<COLSPEC COLNAME="c2" COLWIDTH="2in">
 
<COLSPEC COLNAME="c3" COLWIDTH=".5in">
 
<COLSPEC COLNAME="c4" COLWIDTH="2in">
 
<COLSPEC COLNAME="c5" COLWIDTH="2in">
 
  
<THEAD>
+
<ENTRY COLNAME="c4">spell</ENTRY>
<ROW>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c1">Field</ENTRY>
+
</ROW>
<ENTRY COLNAME="c2">Type</ENTRY>
 
  
<ENTRY COLNAME="c4">Field</ENTRY>
+
<ROW>
<ENTRY COLNAME="c5">Type</ENTRY>
+
<ENTRY COLNAME="c1">minv</ENTRY>
</ROW>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
</THEAD>
 
<TBODY>
 
  
<ROW>
+
<ENTRY COLNAME="c4">value</ENTRY>
<ENTRY COLNAME="c1">symbolic name</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
<ENTRY COLNAME="c2">Symbol</ENTRY>
+
</ROW>
<ENTRY COLNAME="c3" morerows=10></ENTRY>
 
<ENTRY COLNAME="c4">affect</ENTRY>
 
<ENTRY COLNAME="c5">affect function</ENTRY>
 
</ROW>
 
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">names</ENTRY>
+
<ENTRY COLNAME="c1">alignment</ENTRY>
<ENTRY COLNAME="c2">Stringlist</ENTRY>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ENTRY COLNAME="c4">dilbegin or dilcopy</ENTRY>
+
<ENTRY COLNAME="c4">cost</ENTRY>
<ENTRY COLNAME="c5">function pointer</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">title</ENTRY>
+
<ENTRY COLNAME="c1">flags</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ENTRY COLNAME="c4">key</ENTRY>
+
<ENTRY COLNAME="c4">rent</ENTRY>
<ENTRY COLNAME="c5">String</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">descr</ENTRY>
+
<ENTRY COLNAME="c1">weight</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ENTRY COLNAME="c4">open</ENTRY>
+
<ENTRY COLNAME="c4">type</ENTRY>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c5">Integer</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">inside_descr</ENTRY>
+
<ENTRY COLNAME="c1">capacity</ENTRY>
<ENTRY COLNAME="c2">String</ENTRY>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ENTRY COLNAME="c4">manipulate</ENTRY>
+
<ENTRY COLNAME="c4">end tag</ENTRY>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c5">Symbol</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY COLNAME="c1">extra</ENTRY>
+
<ENTRY COLNAME="c1">light</ENTRY>
<ENTRY COLNAME="c2">Structure</ENTRY>
+
<ENTRY COLNAME="c2">Integer</ENTRY>
  
<ENTRY COLNAME="c4">spell</ENTRY>
+
<ENTRY COLNAME="c4"></ENTRY>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<ENTRY COLNAME="c5"></ENTRY>
</ROW>
+
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
<ROW>
+
<PARA>Many of the same fields you found in rooms and NPCs, as you can see from
<ENTRY COLNAME="c1">minv</ENTRY>
+
<xref linkend="objfields">, can also be found in objects.  The fields do
<ENTRY COLNAME="c2">Integer</ENTRY>
+
not always have exactly the same use when coding rooms, NPCs, and
 +
objects but they are normally set in the same manor.  It is very
 +
important that you read and understand the differences of each field as
 +
they pertains to rooms, objects, and or NPCs.</PARA>
  
<ENTRY COLNAME="c4">value</ENTRY>
+
<sect1 id="objfielddescr">
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<TITLE>Description of object fields</TITLE>
</ROW>
 
  
<ROW>
 
<ENTRY COLNAME="c1">alignment</ENTRY>
 
<ENTRY COLNAME="c2">Integer</ENTRY>
 
  
<ENTRY COLNAME="c4">cost</ENTRY>
+
<variablelist id="var-objfields">
<ENTRY COLNAME="c5">Integer</ENTRY>
+
<VARLISTENTRY>
</ROW>
+
;symbolic name
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object symbol</primary>
 +
</indexterm></PARA>
  
<ROW>
+
<PARA>The rules of the symbols has been explained in
<ENTRY COLNAME="c1">flags</ENTRY>
+
<XREF LINKEND="ch-03">, if you didn't read them yet you may want to review.
<ENTRY COLNAME="c2">Integer</ENTRY>
+
The important thing to realize with the object symbol is it is always
 +
good practice to give the object a symbol that resembles the title and
 +
description so administrators and builders can use the
 +
<command>load</command> and the <command>wstat</command> to easily
 +
locate, examine, and load the object in question. </PARA>
  
<ENTRY COLNAME="c4">rent</ENTRY>
+
</LISTITEM>
<ENTRY COLNAME="c5">Integer</ENTRY>
+
</VARLISTENTRY>
</ROW>
+
<VARLISTENTRY>
 +
;title
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object title</primary>
 +
</indexterm></PARA>
  
<ROW>
+
<PARA>The object title is what is shown if the object is being picked
<ENTRY COLNAME="c1">weight</ENTRY>
+
up, dropped, given to someone, when you do the inventory command, , or being used in combat.
<ENTRY COLNAME="c2">Integer</ENTRY>
+
there should be no punctuation in the object title
 +
because of how it is used in the <ACRONYM>VME</ACRONYM> server.  If you add punctuation or
 +
forget to capitalize something that the <ACRONYM>VMC</ACRONYM> thinks you should it will
 +
give you a warning when you compile. The following are good examples of
 +
an object title.</PARA>
  
<ENTRY COLNAME="c4">type</ENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY COLNAME="c5">Integer</ENTRY>
 
</ROW>
 
  
<ROW>
+
title "a big rock"
<ENTRY COLNAME="c1">capacity</ENTRY>
+
title "the flame tongue"
<ENTRY COLNAME="c2">Integer</ENTRY>
+
title "a lap top"
 +
title "a garbage bag"
 +
title "an oval hover car"
  
<ENTRY COLNAME="c4">end tag</ENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY COLNAME="c5">Symbol</ENTRY>
 
</ROW>
 
  
<ROW>
+
</LISTITEM>
<ENTRY COLNAME="c1">light</ENTRY>
+
</VARLISTENTRY>
<ENTRY COLNAME="c2">Integer</ENTRY>
+
<VARLISTENTRY>
 +
        <TERM>descr</term>
 +
        <LISTITEM>
 +
<PARA><indexterm>
 +
<primary>NPC description</primary>
 +
</indexterm></PARA>
  
<ENTRY COLNAME="c4"></ENTRY>
+
<PARA>The description field is what the player sees when walking into the room
<ENTRY COLNAME="c5"></ENTRY>
+
or when looking with no arguments.  It is good practice to make this no
</ROW>
+
longer than one line not counting the 'descr' tag.</PARA>
</TBODY></TGROUP></TABLE>
 
  
<PARA>Many of the same fields you found in rooms and NPCs, as you can see from
+
<PARA>Some examples of the object description field would be as
<xref linkend="objfields">, can also be found in objects.  The fields do
+
follows:</PARA>
not always have exactly the same use when coding rooms, NPCs, and
 
objects but they are normally set in the same manor.  It is very
 
important that you read and understand the differences of each field as
 
they pertains to rooms, objects, and or NPCs.</PARA>
 
  
<sect1 id="objfielddescr">
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>Description of object fields</TITLE>
 
  
 +
descr
 +
"a green bloody sword is laying here."
  
<variablelist id="var-objfields">
+
descr
<VARLISTENTRY>
+
"A massive wooden round table sits here."
;symbolic name
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object symbol</primary>
 
</indexterm></PARA>
 
  
<PARA>The rules of the symbols has been explained in
+
descr
<XREF LINKEND="ch-03">, if you didn't read them yet you may want to review.
+
"a funny looking hammer is laying here."
The important thing to realize with the object symbol is it is always
 
good practice to give the object a symbol that resembles the title and
 
description so administrators and builders can use the
 
<command>load</command> and the <command>wstat</command> to easily
 
locate, examine, and load the object in question. </PARA>
 
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;title
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object title</primary>
 
</indexterm></PARA>
 
  
<PARA>The object title is what is shown if the object is being picked
+
</LISTITEM>
up, dropped, given to someone, when you do the inventory command, , or being used in combat.
+
</VARLISTENTRY>
there should be no punctuation in the object title
+
<VARLISTENTRY>
because of how it is used in the <ACRONYM>VME</ACRONYM> server.  If you add punctuation or
 
forget to capitalize something that the <ACRONYM>VMC</ACRONYM> thinks you should it will
 
give you a warning when you compile. The following are good examples of
 
an object title.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
;names
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>NPC names</primary>
 +
</indexterm></PARA>
  
title "a big rock"
+
<PARA>The object names are as important as the NPC names.  They are what
title "the flame tongue"
+
you act on when picking the object up, dropping it, throwing it, just
title "a lap top"
+
about anything you do to objects use these name fields.  On drink
title "a garbage bag"
+
containers you add the liquid name at the end, so people can drink the liquid.  You
title "an oval hover car"
+
always need to make sure you put every possible name that the player may
 +
use to examine or take your item.  The rule of thumb is if it is in the
 +
title or description it should be in the names list.  conversely if it is
 +
not in the title or description it shouldn't be in the names list
 +
because the players will not use it if they don't know about it.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The following is some examples of good 'names' fields with respect to
 +
        their 'title' and 'descr'.</PARA>
  
</LISTITEM>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</VARLISTENTRY>
 
<VARLISTENTRY>
 
        <TERM>descr</term>
 
        <LISTITEM>
 
<PARA><indexterm>
 
<primary>NPC description</primary>
 
</indexterm></PARA>
 
  
<PARA>The description field is what the player sees when walking into the room
+
title "a big rock"
or when looking with no arguments. It is good practice to make this no
+
descr "a big rock is here blocking the road."
longer than one line not counting the 'descr' tag.</PARA>
+
names {"big rock","rock"}
  
<PARA>Some examples of the object description field would be as
+
title "an old twisted staff"
follows:</PARA>
+
descr "An old twisted staff has been discarded here."
 +
names{"old twisted staff","twisted staff","old staff","staff"}
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
descr
+
<PARA>The idea of course is to make any combination that a player may
"a green bloody sword is laying here."
+
type to try and act upon your object.  You would not want to describe and
 +
title your object with an entirely different theme than you created its
 +
names with because a player would not know what it is called.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
descr
+
<VARLISTENTRY>
"A massive wooden round table sits here."
+
;inside_descr
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object inside_descr</primary>
 +
</indexterm></PARA>
  
descr
+
<PARA>The inside description is what a player sees if it is inside the
"a funny looking hammer is laying here."
+
object.  This is used for things like Coffins or boxes or boats that a
 +
player can climb inside.  The inside description is defined the same way
 +
the normal description is but you can make it as many lines as you want
 +
like you would with a room description.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
                                      inside_descr
</VARLISTENTRY>
+
"You are inside a black coffin with a red velvet padding - scary!"
<VARLISTENTRY>
 
  
;names
+
                                      inside_descr
  <DICTDEF>
+
"You are inside the pink time machine. a small control panel is on the
<PARA><indexterm>
+
floor and seems to be operated by stepping on it."
<primary>NPC names</primary>
 
</indexterm></PARA>
 
  
<PARA>The object names are as important as the NPC names.  They are what
+
</PROGRAMLISTING></INFORMALEXAMPLE>
you act on when picking the object up, dropping it, throwing it, just
+
</LISTITEM>
about anything you do to objects use these name fields.  On drink
+
</VARLISTENTRY>
containers you add the liquid name at the end, so people can drink the liquid.  You
+
<VARLISTENTRY>
always need to make sure you put every possible name that the player may
+
;extra
use to examine or take your item.  The rule of thumb is if it is in the
+
<DICTDEF>
title or description it should be in the names list.  conversely if it is
+
<PARA><indexterm>
not in the title or description it shouldn't be in the names list
+
<primary>Object extra</primary>
because the players will not use it if they don't know about it.</PARA>
+
</indexterm></PARA>
  
<PARA>The following is some examples of good 'names' fields with respect to
+
<PARA>The extra's on the object like the NPC, can be used to do many things.  It can be
        their 'title' and 'descr'.</PARA>
+
used to store information for <ACRONYM>DIL</ACRONYM> programs or it can be used to show a
 +
part of the object like the room extras show a part of the room.  They
 +
can even be used to create new acts when a person picks the item up,
 +
drops, or enters it.There is also a special extra that is the object's description when
 +
you look at it with the look &lt;object&gt; command.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Lets go over the object description extra first.  If you use an extra
 +
with no names list it will become the object's description when you look at
 +
any of the names on it.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
title "a big rock"
+
extra {}
descr "a big rock is here blocking the road."
+
"Its just a rock nothing special about it."
names {"big rock","rock"}
 
  
title "an old twisted staff"
+
extra {}
descr "An old twisted staff has been discarded here."
+
"The ice cube is about 40 meters perfectly cubed. It seems to be
names{"old twisted staff","twisted staff","old staff","staff"}
+
melting slightly but waiting for it to finish would be sort of like
 +
waiting for the ice age to end."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>The idea of course is to make any combination that a player may
+
<PARA>You can also use extras to show parts of the object.</PARA>
type to try and act upon your object.  You would not want to describe and
+
<INFORMALEXAMPLE><PROGRAMLISTING>
title your object with an entirely different theme than you created its
 
names with because a player would not know what it is called.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
extra {"crack"}
;inside_descr
+
"There is a big crack in the side of the ice cube. Maybe if you mess
  <DICTDEF>
+
with the crack you will be able to open it or something."
<PARA><indexterm>
 
<primary>Object inside_descr</primary>
 
</indexterm></PARA>
 
  
<PARA>The inside description is what a player sees if it is inside the
+
extra {"bed post","post"}
object.  This is used for things like Coffins or boxes or boats that a
+
"Its a big gold bed post don't you wish you could get this sucker off it
player can climb inside.  The inside description is defined the same way
+
would make you a rich adventurer indeed."
the normal description is but you can make it as many lines as you want
 
like you would with a room description.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
                                      inside_descr
+
<PARA>You can also use the extras to give more detailed and vivid
"You are inside a black coffin with a red velvet padding - scary!"
+
descriptions when the object is acted upon.</PARA>
  
                                      inside_descr
+
<TABLE frame=all>
"You are inside the pink time machine. a small control panel is on the
+
<TITLE>Object special action extras</TITLE>
floor and seems to be operated by stepping on it."
+
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Extra</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>$wear_s</ENTRY>
 +
<ENTRY>A message shown to activator when wearing (+wield/grab/hold) an
 +
item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$wear_o</ENTRY>
 +
<ENTRY>A message shown to others when wearing an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$rem_s</ENTRY>
 +
<ENTRY>A message shown to activator when removing worn stuff.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$rem_o</ENTRY>
 +
<ENTRY>A message shown to others when removing an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$get_s</ENTRY>
 +
<ENTRY>A message shown to activator when getting an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$get_o</ENTRY>
 +
<ENTRY>A message shown to others when getting an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$drop_s</ENTRY>
 +
<ENTRY>A message shown to activator when dropping an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$drop_o</ENTRY>
 +
<ENTRY>A message shown to other when dropping an object.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$enter_s</ENTRY>
 +
<ENTRY>A message shown to activator when entering an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$enter_o</ENTRY>
 +
<ENTRY>A message shown to other when entering an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$exit_s</ENTRY>
 +
<ENTRY>A message shown to activator when leaving an item.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>$exit_o</ENTRY>
 +
<ENTRY>A message shown to other when leaving an item.</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>In the following example of an ice cube, 1n is the activator and
</LISTITEM>
+
$2n is the unit in question.</PARA>
</VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<VARLISTENTRY>
 
;extra
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object extra</primary>
 
</indexterm></PARA>
 
  
<PARA>The extra's on the object like the NPC, can be used to do many things.  It can be
+
extra {"$get_s"}
used to store information for <ACRONYM>DIL</ACRONYM> programs or it can be used to show a
+
"You pick up the $2N, it is very cold and begins to melt in your hands."
part of the object like the room extras show a part of the room.  They
 
can even be used to create new acts when a person picks the item up,
 
drops, or enters it.There is also a special extra that is the object's description when
 
you look at it with the look &lt;object&gt; command.</PARA>
 
  
<PARA>Lets go over the object description extra first.  If you use an extra
+
extra {"$get_o"}
with no names list it will become the object's description when you look at
+
"$1n picks up the $2N, you notice that a drop of water hits the ground as
any of the names on it.</PARA>
+
it begins to melt in $1s hand."
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
extra {}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
"Its just a rock nothing special about it." 
 
  
extra {}
+
<PARA>Finally you can use extras to store information for <ACRONYM>DIL</ACRONYM> programs.  
"The ice cube is about 40 meters perfectly cubed. It seems to be
+
We will not cover this because it is a topic covered in-depth in
melting slightly but waiting for it to finish would be sort of like
+
the <ACRONYM>DIL</ACRONYM> documentation.</PARA>
waiting for the ice age to end."
+
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;manipulate
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object manipulate</primary>
 +
</indexterm></PARA>
  
<PARA>You can also use extras to show parts of the object.</PARA>
+
<PARA>This field is what defines the things that can be done to the
<INFORMALEXAMPLE><PROGRAMLISTING>
+
object.  For example a piece of armour should be able to be taken and
 +
worn, while a fountain should be able to be entered but not taken unless its some
 +
magical portable fountain.  There are two sets of manipulate flags even
 +
though you can use them together.  We separate them because the first
 +
two are flags that tell you if you can take or enter something while the
 +
rest of the manipulate flags are for worn positions.</PARA>
  
extra {"crack"}
+
<PARA>First the two flags for taking and entering are:</PARA>
"There is a big crack in the side of the ice cube.  Maybe if you mess
 
with the crack you will be able to open it or something."
 
  
extra {"bed post","post"}
+
<TABLE frame=all>
"Its a big gold bed post don't you wish you could get this sucker off it
+
<TITLE>Take and enter flags</TITLE>
would make you a rich adventurer indeed."
+
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Manipulate</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>MANIPULATE_TAKE</ENTRY>
 +
<ENTRY> Set this flag if the unit can be taken
 +
(picked up/moved about).</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>MANIPULATE_ENTER</ENTRY>
 +
<ENTRY> Set this flag if it is possible to
 +
enter a unit, ie set it in a coffin if you want players to be able to
 +
enter the coffin.
 +
</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>These flags are
 +
set to indicate on what body positions a particular object can be
 +
worn:</PARA>
  
<PARA>You can also use the extras to give more detailed and vivid
+
<itemizedlist>
descriptions when the object is acted upon.</PARA>
+
<LISTITEM><PARA>MANIPULATE_WEAR_FINGER</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_NECK</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_BODY</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_HEAD</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_LEGS</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_FEET</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_HANDS</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_ARMS</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_SHIELD</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_ABOUT</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_WAIST</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_WRIST</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WIELD</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_HOLD</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_EAR</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_BACK</PARA></LISTITEM>
 +
<LISTITEM><PARA>MANIPULATE_WEAR_CHEST</PARA></LISTITEM>
 +
<LISTITEM><PARA> MANIPULATE_WEAR_ANKLE</PARA></LISTITEM>
 +
</itemizedlist>
  
<TABLE frame=all>
+
<PARA>Currently you can only set one of the worn positions flags on an
<TITLE>Object special action extras</TITLE>
+
item at a time. You can set both enter and take on an item with a
<TGROUP align=left cols=2 colsep=1>
+
position or just one or the other. Some legal examples of combinations
<THEAD>
+
are as follows:</PARA>
<ROW>
 
<ENTRY>Extra</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>$wear_s</ENTRY>
 
<ENTRY>A message shown to activator when wearing (+wield/grab/hold) an
 
item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$wear_o</ENTRY>
 
<ENTRY>A message shown to others when wearing an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$rem_s</ENTRY>
 
<ENTRY>A message shown to activator when removing worn stuff.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$rem_o</ENTRY>
 
<ENTRY>A message shown to others when removing an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$get_s</ENTRY>
 
<ENTRY>A message shown to activator when getting an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$get_o</ENTRY>
 
<ENTRY>A message shown to others when getting an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$drop_s</ENTRY>
 
<ENTRY>A message shown to activator when dropping an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$drop_o</ENTRY>
 
<ENTRY>A message shown to other when dropping an object.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$enter_s</ENTRY>
 
<ENTRY>A message shown to activator when entering an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$enter_o</ENTRY>
 
<ENTRY>A message shown to other when entering an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$exit_s</ENTRY>
 
<ENTRY>A message shown to activator when leaving an item.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>$exit_o</ENTRY>
 
<ENTRY>A message shown to other when leaving an item.</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>In the following example of an ice cube, 1n is the activator and
+
<INFORMALEXAMPLE><PROGRAMLISTING>
$2n is the unit in question.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
extra {"$get_s"}
+
//An earring
"You pick up the $2N, it is very cold and begins to melt in your hands."
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_EAR}
  
extra {"$get_o"}
+
//A backpack
"$1n picks up the $2N, you notice that a drop of water hits the ground as
+
manipulate {MANIPULATE_TAKE, MANIPULATE_ENTER, MANIPULATE_WEAR_BACK}
it begins to melt in $1s hand."
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//strange true but its legal an earring pack
 +
manipulate {MANIPULATE_TAKE, MANIPULATE_ENTER, MANIPULATE_WEAR_EAR}
  
<PARA>Finally you can use extras to store information for <ACRONYM>DIL</ACRONYM> programs.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
We will not cover this because it is a topic covered in-depth in
+
</LISTITEM>
the <ACRONYM>DIL</ACRONYM> documentation.</PARA>
+
</VARLISTENTRY>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;manipulate
+
;flags
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Object manipulate</primary>
+
<primary>Object flags</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
<PARA>This field is what defines the things that can be done to the
+
<PARA>This field on an object is used to set special attributes in order to make
object.  For example a piece of armour should be able to be taken and
+
the object able to be buried or not or no-teleportable and many others.  The
worn, while a fountain should be able to be entered but not taken unless its some
+
object flag list uses the UNIT_FL_* variables that both the NPCs and
magical portable fountainThere are two sets of manipulate flags even
+
the rooms also use, therefore while you can set some flags on an object it
though you can use them togetherWe separate them because the first
+
may not have any affect unless you as a builder or administrator adds
two are flags that tell you if you can take or enter something while the
+
the functionalityYou can also add extras on an object that can be used
rest of the manipulate flags are for worn positions.</PARA>
+
as a special flag which you will learn as you learn to use <ACRONYM>DIL</ACRONYM>The
 +
following is a full list of all unit flags and how they affect objects, if
 +
they do.</PARA>
  
<PARA>First the two flags for taking and entering are:</PARA>
+
<TABLE frame=all id="unitflagsobj">
 +
<TITLE>Object unit flag affects</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
  
<TABLE frame=all>
+
<ROW>
<TITLE>Take and enter flags</TITLE>
+
<ENTRY>UNIT_FL_PRIVATE</ENTRY> <ENTRY> Currently has no affect on a NPC.
<TGROUP align=left cols=2 colsep=1>
+
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INVISIBLE</ENTRY>
<THEAD>
+
<ENTRY>Makes unit invisible</ENTRY> </ROW> <ROW>
<ROW>
+
<ENTRY>UNIT_FL_NO_BURY</ENTRY> <ENTRY>Makes it so you can create objects that
<ENTRY>Manipulate</ENTRY>
+
can not be buried for example a weapon that for some reason shouldn't be
<ENTRY>Description</ENTRY>
+
buried.</ENTRY>
</ROW>
+
</ROW> <ROW>
</THEAD>
+
<ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes
<TBODY>
+
unit buried when loaded</ENTRY> </ROW> <ROW>
<ROW>
+
<ENTRY>UNIT_FL_NO_TELEPORT</ENTRY>
<ENTRY>MANIPULATE_TAKE</ENTRY>
+
<ENTRY>Makes it so you can not teleport into this object.  This flag only
<ENTRY> Set this flag if the unit can be taken
+
works on containers.
(picked up/moved about).</ENTRY>
+
</ENTRY>
</ROW>
+
</ROW>
<ROW>
 
<ENTRY>MANIPULATE_ENTER</ENTRY>
 
<ENTRY> Set this flag if it is possible to
 
enter a unit, ie set it in a coffin if you want players to be able to
 
enter the coffin.
 
</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>These flags are
+
<ROW>
set to indicate on what body positions a particular object can be
+
<ENTRY>UNIT_FL_NO_MOB</ENTRY>
worn:</PARA>
+
<ENTRY>
 +
Currently has no affect on an object.
 +
</ENTRY>
 +
</ROW> <ROW>
 +
<ENTRY>UNIT_FL_NO_WEATHER</ENTRY>
 +
<ENTRY> Currently has no affect on a NPC.
 +
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INDOORS</ENTRY> <ENTRY>
 +
Currently has no affect on an object.
 +
</ENTRY>
 +
</ROW>
  
<itemizedlist>
+
<ROW>
<LISTITEM><PARA>MANIPULATE_WEAR_FINGER</PARA></LISTITEM>
+
<ENTRY>UNIT_FL_TRANS</ENTRY> <ENTRY>Makes unit transparent If the Unit is
<LISTITEM><PARA>MANIPULATE_WEAR_NECK</PARA></LISTITEM>
+
transparent you will be able to see any NPCs that it is carrying.
<LISTITEM><PARA>MANIPULATE_WEAR_BODY</PARA></LISTITEM>
+
For example if a canoe was carrying a familiar you would see that as you
<LISTITEM><PARA>MANIPULATE_WEAR_HEAD</PARA></LISTITEM>
+
walked into the room.  If this flag is not set and you are in a canoe you
<LISTITEM><PARA>MANIPULATE_WEAR_LEGS</PARA></LISTITEM>
+
will not see outside the canoe and no one will see in.
<LISTITEM><PARA>MANIPULATE_WEAR_FEET</PARA></LISTITEM>
+
</ENTRY>
<LISTITEM><PARA>MANIPULATE_WEAR_HANDS</PARA></LISTITEM>
+
</ROW>
<LISTITEM><PARA>MANIPULATE_WEAR_ARMS</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_SHIELD</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_ABOUT</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_WAIST</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_WRIST</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WIELD</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_HOLD</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_EAR</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_BACK</PARA></LISTITEM>
 
<LISTITEM><PARA>MANIPULATE_WEAR_CHEST</PARA></LISTITEM>
 
<LISTITEM><PARA> MANIPULATE_WEAR_ANKLE</PARA></LISTITEM>
 
</itemizedlist>
 
  
<PARA>Currently you can only set one of the worn positions flags on an
+
<ROW>
item at a time.  You can set both enter and take on an item with a
+
<ENTRY>UNIT_FL_NO_SAVE</ENTRY>
position or just one or the other.  Some legal examples of combinations
+
<ENTRY>Makes it so a PC can't save with
are as follows:</PARA>
+
unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_SACRED</ENTRY> <ENTRY>
 +
Currently has no affect on an object.
 +
</ENTRY>
 +
</ROW>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<ROW>
 +
<ENTRY>UNIT_FL_MAGIC</ENTRY>
 +
<ENTRY>This flag is used by spells to tell if the object is magic.</ENTRY>
 +
</ROW>
 +
</TBODY></TGROUP></TABLE>  
  
//An earring
+
<PARA>If you wanted to make an object that a player can carry around but can
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_EAR}
+
not save you would set the manipulate and flags as follows.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
//A backpack
+
manipulate {MANIPULATE_TAKE}
manipulate {MANIPULATE_TAKE, MANIPULATE_ENTER, MANIPULATE_WEAR_BACK}
+
flags {UNIT_FL_NO_SAVE}
  
//strange true but its legal an earring pack
+
</PROGRAMLISTING></INFORMALEXAMPLE>
manipulate {MANIPULATE_TAKE, MANIPULATE_ENTER, MANIPULATE_WEAR_EAR}
+
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
</LISTITEM>
+
;type
</VARLISTENTRY>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object type</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>This field is what you use to set the objects type.  The type
;flags
+
field is used when spells are cast or commands are executed on the
  <DICTDEF>
+
object.  You can add your own item types but they will not change the
<PARA><indexterm>
+
actions of base code commands. The following is the list of item types
<primary>Object flags</primary>
+
and what they mean when you set them.  Some are not supported with the
</indexterm></PARA>
+
current code but you can add support for them if you like by making <ACRONYM>DIL</ACRONYM>
 +
commands, which is covered in another manual.</PARA>
  
<PARA>This field on an object is used to set special attributes in order to make
+
<TABLE frame=all id="itemtypes">
the object able to be buried or not or no-teleportable and many others. The
+
<TITLE>Item types</TITLE>
object flag list uses the UNIT_FL_* variables that both the NPCs and
+
<TGROUP align=left cols=2 colsep=1>
the rooms also use, therefore while you can set some flags on an object it
+
<THEAD>
may not have any affect unless you as a builder or administrator adds
+
<ROW>
the functionality. You can also add extras on an object that can be used
+
<ENTRY>Type</ENTRY>
as a special flag which you will learn as you learn to use <ACRONYM>DIL</ACRONYM>.  The
+
<ENTRY>Description</ENTRY>
following is a full list of all unit flags and how they affect objects, if
+
</ROW>
they do.</PARA>
+
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>ITEM_LIGHT</ENTRY>
 +
<ENTRY>Items of this type can be lighted and extinguished.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_SCROLL</ENTRY>
 +
<ENTRY>Items of this type can be read as a magical scroll.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_WAND</ENTRY>
 +
<ENTRY>Items of this type can be used with the <command>use</command>
 +
command.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_STAFF</ENTRY>
 +
<ENTRY>Items of this type can be used with the <command>tap</command>
 +
command as a magical staff</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_WEAPON</ENTRY>
 +
<ENTRY>Items of this type are used as weapons.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_FIREWEAPON</ENTRY>
 +
<ENTRY>Currently not supported but could be used to classify a special type
 +
of weapon.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_MISSILE</ENTRY>
 +
<ENTRY>Currently not supported but could be used to classify a special type
 +
of weapon.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_TREASURE</ENTRY>
 +
<ENTRY>Items of this type are of some great value to sell but nothing else
 +
like a Gem or a block of gold.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_ARMOR</ENTRY>
 +
<ENTRY>Items of this type can be worn or used as armour.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_POTION</ENTRY>
 +
<ENTRY>Items of this type can be used with the <command>quaff</command> as
 +
a position.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_WORN</ENTRY>
 +
<ENTRY>Items of this type can be worn but not normally used for armour it
 +
is more for clothing.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_OTHER</ENTRY>
 +
<ENTRY>This item type is for items that don't fit any other type.  Now
 +
that you can make your own commands with the <ACRONYM>VME</ACRONYM> 2.0 you should just make
 +
your own item type instead of using this value.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_TRASH</ENTRY>
 +
<ENTRY>Items of this type are usually junk or broken equipment.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_TRAP</ENTRY>
 +
<ENTRY>Not currently supported but could be used to make a trap command by
 +
creating a trap item</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_CONTAINER</ENTRY>
 +
<ENTRY>Items that can be used as containers.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_NOTE</ENTRY>
 +
<ENTRY>Items of this type can be used to write on like paper or
 +
slates.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_DRINKCON</ENTRY>
 +
<ENTRY>Items of this type can carry liquids.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_KEY</ENTRY>
 +
<ENTRY>Items of this type can be used as a key.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_FOOD</ENTRY>
 +
<ENTRY>Items of this type can be eaten</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_MONEY</ENTRY>
 +
<ENTRY>Items of this type can be spent as currency</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>ITEM_PEN</ENTRY>
 +
<ENTRY>No longer supported but could be used to force people to have a
 +
writing instrument before writing a message.</ENTRY>
 +
</ROW>
  
<TABLE frame=all id="unitflagsobj">
+
<ROW>
<TITLE>Object unit flag affects</TITLE>
+
<ENTRY>ITEM_BOAT</ENTRY>
<TGROUP align=left cols=2 colsep=1>
+
<ENTRY>Items of this type can be used as a water craft</ENTRY>
<THEAD>
+
</ROW>
<ROW>
 
<ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
  
<ROW>
+
<ROW>
<ENTRY>UNIT_FL_PRIVATE</ENTRY> <ENTRY> Currently has no affect on a NPC.
+
<ENTRY>ITEM_SPELL</ENTRY>
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INVISIBLE</ENTRY>
+
<ENTRY>Not currently supported but it could be used to make a page in a spell book</ENTRY>
<ENTRY>Makes unit invisible</ENTRY> </ROW> <ROW>
+
</ROW>
<ENTRY>UNIT_FL_NO_BURY</ENTRY> <ENTRY>Makes it so you can create objects that
 
can not be buried for example a weapon that for some reason shouldn't be
 
buried.</ENTRY>
 
</ROW> <ROW>
 
<ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes
 
unit buried when loaded</ENTRY> </ROW> <ROW>
 
<ENTRY>UNIT_FL_NO_TELEPORT</ENTRY>
 
<ENTRY>Makes it so you can not teleport into this object.  This flag only
 
works on containers.
 
</ENTRY>
 
</ROW>
 
  
<ROW>
+
<ROW>
<ENTRY>UNIT_FL_NO_MOB</ENTRY>
+
<ENTRY>ITEM_BOOK</ENTRY>
<ENTRY>
+
<ENTRY>Not currently supported but could be used to make
Currently has no affect on an object.
+
regular and spell books.</ENTRY>
</ENTRY>
+
</ROW>
</ROW> <ROW>
 
<ENTRY>UNIT_FL_NO_WEATHER</ENTRY>
 
<ENTRY> Currently has no affect on a NPC.
 
</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INDOORS</ENTRY> <ENTRY>
 
Currently has no affect on an object.
 
</ENTRY>
 
</ROW>
 
  
<ROW>
+
<ROW>
<ENTRY>UNIT_FL_TRANS</ENTRY> <ENTRY>Makes unit transparent If the Unit is
+
<ENTRY>ITEM_SHIELD</ENTRY>
transparent you will be able to see any NPCs that it is carrying.
+
<ENTRY>Items of this type can be used as a shield.</ENTRY>
For example if a canoe was carrying a familiar you would see that as you
+
</ROW>
walked into the room.  If this flag is not set and you are in a canoe you
+
<ROW>
will not see outside the canoe and no one will see in.
+
<ENTRY>ITEM_SKIN</ENTRY>
</ENTRY>
+
<ENTRY>Not currently supported in the release but could be used to make the
</ROW>
+
skin command and create skins of animals</ENTRY>
 +
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>UNIT_FL_NO_SAVE</ENTRY>
+
<ENTRY>ITEM_BOARD</ENTRY>
<ENTRY>Makes it so a PC can't save with
+
<ENTRY>Items of this type are used for public communications in the form
unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_SACRED</ENTRY> <ENTRY>
+
of boards that can be read from and written to.</ENTRY>
Currently has no affect on an object.
+
</ROW>
</ENTRY>
 
</ROW>
 
  
<ROW>
+
</TBODY></TGROUP></TABLE>
<ENTRY>UNIT_FL_MAGIC</ENTRY>
 
<ENTRY>This flag is used by spells to tell if the object is magic.</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>  
 
  
<PARA>If you wanted to make an object that a player can carry around but can
+
<PARA>Unlike flags and manipulate fields only one item type can be set
not save you would set the manipulate and flags as follows.</PARA>
+
on an object at a time.  The format for the 'type' field is simply the
<INFORMALEXAMPLE><PROGRAMLISTING>
+
keyword followed by the value as follows:</PARA>
  
manipulate {MANIPULATE_TAKE}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
flags {UNIT_FL_NO_SAVE}
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
type ITEM_BOARD
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;type
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object type</primary>
 
</indexterm></PARA>
 
  
<PARA>This field is what you use to set the objects type.  The type
+
</LISTITEM>
field is used when spells are cast or commands are executed on the
+
</VARLISTENTRY>
object.  You can add your own item types but they will not change the
 
actions of base code commands.  The following is the list of item types
 
and what they mean when you set them.  Some are not supported with the
 
current code but you can add support for them if you like by making <ACRONYM>DIL</ACRONYM>
 
commands, which is covered in another manual.</PARA>
 
  
<TABLE frame=all id="itemtypes">
+
<VARLISTENTRY>
<TITLE>Item types</TITLE>
+
;weight
<TGROUP align=left cols=2 colsep=1>
+
<DICTDEF>
<THEAD>
+
<PARA><indexterm>
<ROW>
+
<primary>Object weight</primary>
<ENTRY>Type</ENTRY>
+
</indexterm></PARA>
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>ITEM_LIGHT</ENTRY>
 
<ENTRY>Items of this type can be lighted and extinguished.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_SCROLL</ENTRY>
 
<ENTRY>Items of this type can be read as a magical scroll.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_WAND</ENTRY>
 
<ENTRY>Items of this type can be used with the <command>use</command>
 
command.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_STAFF</ENTRY>
 
<ENTRY>Items of this type can be used with the <command>tap</command>
 
command as a magical staff</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_WEAPON</ENTRY>
 
<ENTRY>Items of this type are used as weapons.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_FIREWEAPON</ENTRY>
 
<ENTRY>Currently not supported but could be used to classify a special type
 
of weapon.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_MISSILE</ENTRY>
 
<ENTRY>Currently not supported but could be used to classify a special type
 
of weapon.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_TREASURE</ENTRY>
 
<ENTRY>Items of this type are of some great value to sell but nothing else
 
like a Gem or a block of gold.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_ARMOR</ENTRY>
 
<ENTRY>Items of this type can be worn or used as armour.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_POTION</ENTRY>
 
<ENTRY>Items of this type can be used with the <command>quaff</command> as
 
a position.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_WORN</ENTRY>
 
<ENTRY>Items of this type can be worn but not normally used for armour it
 
is more for clothing.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_OTHER</ENTRY>
 
<ENTRY>This item type is for items that don't fit any other type.  Now
 
that you can make your own commands with the <ACRONYM>VME</ACRONYM> 2.0 you should just make
 
your own item type instead of using this value.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_TRASH</ENTRY>
 
<ENTRY>Items of this type are usually junk or broken equipment.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_TRAP</ENTRY>
 
<ENTRY>Not currently supported but could be used to make a trap command by
 
creating a trap item</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_CONTAINER</ENTRY>
 
<ENTRY>Items that can be used as containers.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_NOTE</ENTRY>
 
<ENTRY>Items of this type can be used to write on like paper or
 
slates.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_DRINKCON</ENTRY>
 
<ENTRY>Items of this type can carry liquids.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_KEY</ENTRY>
 
<ENTRY>Items of this type can be used as a key.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_FOOD</ENTRY>
 
<ENTRY>Items of this type can be eaten</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_MONEY</ENTRY>
 
<ENTRY>Items of this type can be spent as currency</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>ITEM_PEN</ENTRY>
 
<ENTRY>No longer supported but could be used to force people to have a
 
writing instrument before writing a message.</ENTRY>
 
</ROW>
 
  
<ROW>
+
<PARA>The weight is the weight of the object in pounds.  In the future we
<ENTRY>ITEM_BOAT</ENTRY>
+
may adjust this to allow you to make things lighter for example you
<ENTRY>Items of this type can be used as a water craft</ENTRY>
+
could set it in ounces or grams.  Right now however all we have is
</ROW>
+
pounds so we have some pretty heavy feathers out there.</PARA>
  
<ROW>
+
<PARA>To use this you just enter the 'weight' keyword and then the
<ENTRY>ITEM_SPELL</ENTRY>
+
value.</PARA>
<ENTRY>Not currently supported but it could be used to make a page in a spell book</ENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</ROW>
 
  
<ROW>
+
/80 lbs.
<ENTRY>ITEM_BOOK</ENTRY>
+
weight 80
<ENTRY>Not currently supported but could be used to make
 
regular and spell books.</ENTRY>
 
</ROW>
 
  
<ROW>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY>ITEM_SHIELD</ENTRY>
+
</LISTITEM>
<ENTRY>Items of this type can be used as a shield.</ENTRY>
+
</VARLISTENTRY>
</ROW>
 
<ROW>
 
<ENTRY>ITEM_SKIN</ENTRY>
 
<ENTRY>Not currently supported in the release but could be used to make the
 
skin command and create skins of animals</ENTRY>
 
</ROW>
 
  
<ROW>
+
<VARLISTENTRY>
<ENTRY>ITEM_BOARD</ENTRY>
+
;capacity
<ENTRY>Items of this type are used for public communications in the form
+
<DICTDEF>
of boards that can be read from and written to.</ENTRY>
+
<PARA><indexterm>
</ROW>
+
<primary>Object capacity</primary>
 +
</indexterm></PARA>
  
</TBODY></TGROUP></TABLE>
+
<PARA>This field sets the size of a container object.  If the object does not have the manipulate enter flag set then this field doesn't have to be set.  The capacity is currently by pounds since the weight of objects is set in pounds.  In the future we may take into account size and weight but right now it goes only by weight.  The following line of code would set an item to carry 600 pounds of stuff.</PARA>
  
<PARA>Unlike flags and manipulate fields only one item type can be set
+
<INFORMALEXAMPLE><PROGRAMLISTING>
on an object at a time.  The format for the 'type' field is simply the
 
keyword followed by the value as follows:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
capacity 600
  
type ITEM_BOARD
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;key
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object key</primary>
 +
</indexterm></PARA>
  
</LISTITEM>
+
<PARA>The key field sets the key name of the key that will open the item.  This field should be set to the symbolic name of the key that opens the item it is on.  If the item is in the same zone as the key then you do not need to put the zone extension on the key name.  The following are the three possible examples of using the key field.</PARA>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;weight
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object weight</primary>
 
</indexterm></PARA>
 
  
<PARA>The weight is the weight of the object in pounds.  In the future we
+
//if object and key are in same zone.
may adjust this to allow you to make things lighter for example you
+
key brasskey
could set it in ounces or grams. Right now however all we have is
 
pounds so we have some pretty heavy feathers out there.</PARA>
 
  
<PARA>To use this you just enter the 'weight' keyword and then the
+
//if key and object are in same zone
value.</PARA>
+
key brasskey@zonename
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
/80 lbs.
+
//if key and object are not in same zone
weight 80
+
key brasskey@otherzonename
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>Notice you can put the zone name on it if the key is in the same
;capacity
+
zone but if the key is not in the same zone you must put the zone name
<DICTDEF>
+
on it.</PARA>
<PARA><indexterm>
+
</LISTITEM>
<primary>Object capacity</primary>
+
</VARLISTENTRY>
</indexterm></PARA>
 
  
<PARA>This field sets the size of a container object.  If the object does not have the manipulate enter flag set then this field doesn't have to be set.  The capacity is currently by pounds since the weight of objects is set in pounds.  In the future we may take into account size and weight but right now it goes only by weight.  The following line of code would set an item to carry 600 pounds of stuff.</PARA>
+
<VARLISTENTRY>
 +
;cost
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object cost</primary>
 +
</indexterm></PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>This is the field you set to add a cost to your object.  If you
 +
leave this field out it will default to no cost and will not be able to
 +
be sold at stores.  The system for setting cost on an item is the same
 +
as setting money on a NPC.  As with a NPC we could set it using a single
 +
number but it would not be easy to understand.  For example 5 gold
 +
pieces would be something like:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
capacity 600
+
money 25600
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>I am no more sure this will make five gold pieces than I was when
;key
+
I used this same example with the money field in NPC.  The problem is I
  <DICTDEF>
+
just did the math in my head so its not very accurate. It is much
<PARA><indexterm>
+
easier to use the defined money types to set exactly what you want as
<primary>Object key</primary>
+
follows:</PARA>
</indexterm></PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The key field sets the key name of the key that will open the item.  This field should be set to the symbolic name of the key that opens the item it is on.  If the item is in the same zone as the key then you do not need to put the zone extension on the key name.  The following are the three possible examples of using the key field.</PARA>
+
IRON_PIECE
 +
COPPER_PIECE
 +
SILVER_PIECE
 +
GOLD_PIECE
 +
PLATINUM_PIECE
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
//if object and key are in same zone.
+
<PARA>Now if we wanted to make an object costing five gold it would be as
key brasskey
+
simple as this:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
//if key and object are in same zone
+
money 5*GOLD_PIECE
key brasskey@zonename
 
  
//if key and object are not in same zone
+
</PROGRAMLISTING></INFORMALEXAMPLE>
key brasskey@otherzonename
+
<PARA>the define method also gains you the ability to tell the <ACRONYM>VME</ACRONYM> what
 +
amount of each coin you want on the NPC.  If you set it using a single
 +
integer the compiler would pick how many of each coin.  This of course
 +
is not what is desired in fact you want to be able to set your cost
 +
however you like.  So setting more than one coin is as simple as adding
 +
a comma between the first and second coin.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
money 5*GOLD_PIECE, 20*IRON_PIECE
  
<PARA>Notice you can put the zone name on it if the key is in the same
+
</PROGRAMLISTING></INFORMALEXAMPLE>
zone but if the key is not in the same zone you must put the zone name
+
</LISTITEM>
on it.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</VARLISTENTRY>
;cost
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object cost</primary>
 
</indexterm></PARA>
 
  
<PARA>This is the field you set to add a cost to your object.  If you
+
<VARLISTENTRY>
leave this field out it will default to no cost and will not be able to
+
;rent
be sold at stores.  The system for setting cost on an item is the same
+
<DICTDEF>
as setting money on a NPC.  As with a NPC we could set it using a single
+
<PARA><indexterm>
number but it would not be easy to understand.  For example 5 gold
+
<primary>Object rent</primary>
pieces would be something like:</PARA>
+
</indexterm></PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
money 25600
+
<PARA>This field tells how much it costs you to keep an item while your
 +
offline.  The rent is not always taken if the <ACRONYM>VME</ACRONYM> server is set up to
 +
not take any rent then it will not matter if you set this or not.  Also
 +
the <ACRONYM>VME</ACRONYM> can be set up to take a percentage of this field so it may not
 +
take the exact amount you et.  If the <ACRONYM>VME</ACRONYM> server is set up to take 100%
 +
of the rent then what you set will be taken.  To set this field you do
 +
the same as you do with the cost field.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>I am no more sure this will make five gold pieces than I was when
+
money 5*GOLD_PIECE, 20*IRON_PIECE
I used this same example with the money field in NPC.  The problem is I
 
just did the math in my head so its not very accurate.  It is much
 
easier to use the defined money types to set exactly what you want as
 
follows:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
IRON_PIECE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
COPPER_PIECE
 
SILVER_PIECE
 
GOLD_PIECE
 
PLATINUM_PIECE
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>Now if we wanted to make an object costing five gold it would be as
+
<VARLISTENTRY>
simple as this:</PARA>
+
;minv
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object minv</primary>
 +
</indexterm></PARA>
  
money 5*GOLD_PIECE
+
<PARA>This field is the administrator invisible level of the object it is
 +
set on.  This means that if you set the 'minv' to two hundred it will
 +
make it so the object can not be seen by anyone below the administrator
 +
level of two hundred.  This is good for hiding objects that you need for
 +
administrators but you don't want players to see.
 +
In order for the 'minv' to be removed an
 +
administrator or a <ACRONYM>DIL</ACRONYM> function must change it.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
minv 239
<PARA>the define method also gains you the ability to tell the <ACRONYM>VME</ACRONYM> what
 
amount of each coin you want on the NPC.  If you set it using a single
 
integer the compiler would pick how many of each coin.  This of course
 
is not what is desired in fact you want to be able to set your cost
 
however you like.  So setting more than one coin is as simple as adding
 
a comma between the first and second coin.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
money 5*GOLD_PIECE, 20*IRON_PIECE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</LISTITEM>
 
  
</VARLISTENTRY>
+
</LISTITEM>
  
<VARLISTENTRY>
+
</VARLISTENTRY>
;rent
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object rent</primary>
 
</indexterm></PARA>
 
  
<PARA>This field tells how much it costs you to keep an item while your
+
<VARLISTENTRY>
offline.  The rent is not always taken if the <ACRONYM>VME</ACRONYM> server is set up to
+
;alignment
not take any rent then it will not matter if you set this or not.  Also
+
<DICTDEF>
the <ACRONYM>VME</ACRONYM> can be set up to take a percentage of this field so it may not
+
<PARA><indexterm>
take the exact amount you et.  If the <ACRONYM>VME</ACRONYM> server is set up to take 100%
+
<primary>Object alignment</primary>
of the rent then what you set will be taken.  To set this field you do
+
</indexterm></PARA>
the same as you do with the cost field.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The object alignment is not currently used.  It is an integer
 +
value that can be set on an object to be used with any <ACRONYM>DIL</ACRONYM> functions.
 +
In the future it will be what determines if a good or evil person can
 +
wield an item.  The value is set by placing the 'alignment' keyword
 +
first followed by the alignment desired from -1000 to +1000.</PARA>
  
money 5*GOLD_PIECE, 20*IRON_PIECE
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
alignment -250
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</VARLISTENTRY>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;open
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object open</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>The open field is used if you want to give your object the ability
;minv
+
to be opened, closed, and or locked. If you add the open flags you need
  <DICTDEF>
+
to also add a key field which has already been explained.
<PARA><indexterm>
+
The following are all
<primary>Object minv</primary>
+
the possible open flags and what they are used for.</PARA>
</indexterm></PARA>
 
  
<PARA>This field is the administrator invisible level of the object it is
+
<VARIABLELIST>
set on.  This means that if you set the 'minv' to two hundred it will
+
<VARLISTENTRY>
make it so the object can not be seen by anyone below the administrator
+
;EX_OPEN_CLOSE
level of two hundred.  This is good for hiding objects that you need for
+
<DICTDEF>
administrators but you don't want players to see.
+
<PARA> Set this if you can open and close this object.
In order for the 'minv' to be removed an
+
</PARA>
administrator or a <ACRONYM>DIL</ACRONYM> function must change it.</PARA>
+
</LISTITEM>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;EX_CLOSED
 +
<DICTDEF>
 +
<PARA>Set this if you want the object to be closed when loaded.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;EX_LOCKED
 +
<DICTDEF>
 +
<PARA>Set this if you want the object to be locked when loaded.</PARA>
 +
<NOTE>
 +
<PARA>An interesting aspect is that if you do not specify a key, you can
 +
    only unlock this door with the 'pick' skill, 'unlock' spell or from
 +
    <ACRONYM>DIL</ACRONYM> with UnSet();</PARA>
 +
</NOTE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;EX_PICK_PROOF
 +
<DICTDEF>
 +
<PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the
 +
    lock of this object.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;EX_INSIDE_OPEN
 +
<DICTDEF>
 +
<PARA>Usable on container objects only, this enables the mobile to 'open' and
 +
    'lock' from the inside.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
minv 239
+
<PARA>The simplest use of this field is to make an object that opens
 +
and closes.  A coffin for example would have its flags set as
 +
follows:</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
 +
open {EX_OPEN_CLOSE}
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>If you wanted to set an object that is locked and closed and
 +
having a brass key that can open it, when it is loaded.  It would look as follows.</PARA>
  
</VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
open {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}
;alignment
+
key brass_key
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object alignment</primary>
 
</indexterm></PARA>
 
  
<PARA>The object alignment is not currently used.  It is an integer
+
</PROGRAMLISTING></INFORMALEXAMPLE>
value that can be set on an object to be used with any <ACRONYM>DIL</ACRONYM> functions.
 
In the future it will be what determines if a good or evil person can
 
wield an item.  The value is set by placing the 'alignment' keyword
 
first followed by the alignment desired from -1000 to +1000.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>You would have to define the key in the object section as well and
 +
the symbolic name for that key would be 'brass_key'</PARA>
  
alignment -250
+
</LISTITEM>
 +
 
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
</LISTITEM>
+
;spell
</VARLISTENTRY>
+
<DICTDEF>
<VARLISTENTRY>
+
<PARA><indexterm>
;open
+
<primary>Object spell</primary>
<DICTDEF>
+
</indexterm></PARA>
<PARA><indexterm>
 
<primary>Object open</primary>
 
</indexterm></PARA>
 
  
<PARA>The open field is used if you want to give your object the ability
+
<PARA>The spell field is the power of the objects defense against
to be opened, closed, and or lockedIf you add the open flags you need
+
spellsYou can set it from zero which is just not setting the field
to also add a key field which has already been explained.
+
all the way to 200% which means a person who has 100% in a spell will
The following are all
+
fail almost all the time. To set this field it would look as
the possible open flags and what they are used for.</PARA>
+
follows:</PARA>
  
<VARIABLELIST>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<VARLISTENTRY>
+
//Spell resistance at 150%
;EX_OPEN_CLOSE
+
spell 150
<DICTDEF>
+
 
<PARA> Set this if you can open and close this object.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;EX_CLOSED
 
<DICTDEF>
 
<PARA>Set this if you want the object to be closed when loaded.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;EX_LOCKED
 
<DICTDEF>
 
<PARA>Set this if you want the object to be locked when loaded.</PARA>
 
<NOTE>
 
<PARA>An interesting aspect is that if you do not specify a key, you can
 
    only unlock this door with the 'pick' skill, 'unlock' spell or from
 
    <ACRONYM>DIL</ACRONYM> with UnSet();</PARA>
 
</NOTE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;EX_PICK_PROOF
 
<DICTDEF>
 
<PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the
 
    lock of this object.</PARA>
 
 
</LISTITEM>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARLISTENTRY>
 +
 
<VARLISTENTRY>
 
<VARLISTENTRY>
;EX_INSIDE_OPEN
+
;value
<DICTDEF>
+
<DICTDEF>
<PARA>Usable on container objects only, this enables the mobile to 'open' and
+
<PARA><indexterm>
    'lock' from the inside.</PARA>
+
<primary>Object value</primary>
</LISTITEM>
+
</indexterm></PARA>
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<PARA>The simplest use of this field is to make an object that opens
+
<PARA>The object values are used for just about any special item from
and closesA coffin for example would have its flags set as
+
armour to drink containers.  They should not be set directly unless you
follows:</PARA>
+
have a reason to do so, like a special <ACRONYM>DIL</ACRONYM> command that checks a
 +
value on an itemYou also have to be carefull not to over write what a
 +
value is already used for example value one is already used on
 +
weapons and armours for craftsman ship that will be explained later in
 +
<xref linkend="objmacros">.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>If you find you need to set the values there are a total of five
 +
of them and they can be set to any integer value as follows:</PARA>
  
open {EX_OPEN_CLOSE}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  value[0]  5
+
  value[1] 16
<PARA>If you wanted to set an object that is locked and closed and
+
  value[2] -2
having a brass key that can open it, when it is loaded.  It would look as follows.</PARA>
+
  value[3] -10
 +
  value[4] 12 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
  
open {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED}
+
</VARLISTENTRY>
key brass_key
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;affect
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object affect</primary>
 +
</indexterm></PARA>
  
<PARA>You would have to define the key in the object section as well and
+
<PARA>The affect field should not be set directly, instead you should
the symbolic name for that key would be 'brass_key'</PARA>
+
use the macros defined in <xref linkend="objmacros">.</PARA>  
  
</LISTITEM>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
</VARLISTENTRY>
+
<VARLISTENTRY>
 +
;dilbegin or dilcopy
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Object dilbegin or dilcopy</primary>
 +
</indexterm></PARA>
  
<VARLISTENTRY>
+
<PARA>As has been mentioned in previous sections the <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds.
;spell
+
We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach
<DICTDEF>
+
you how to create your own functions that will make your rooms, NPC, and
<PARA><indexterm>
+
objects more than special.</PARA>
<primary>Object spell</primary>
 
</indexterm></PARA>
 
  
<PARA>The spell field is the power of the objects defense against
+
<PARA>There are several object functions that come standard with the <ACRONYM>VME</ACRONYM>
spellsYou can set it from zero which is just not setting the field
+
2.0The following is a list of those functions.</PARA>
all the way to 200% which means a person who has 100% in a spell will
 
fail almost all the time. To set this field it would look as
 
follows:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<itemizedlist>
//Spell resistance at 150%
+
<LISTITEM><PARA>Guild restrict</PARA></LISTITEM>
spell 150
+
<LISTITEM><PARA>Anti-guild restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Quest restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Quests restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Alignment restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Level restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Virtual level restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Race restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Ability restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Skill restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Spell restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Weapon restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Gender restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>Player restrict</PARA></LISTITEM>
 +
<LISTITEM><PARA>boards</PARA></LISTITEM>
 +
<LISTITEM><PARA>tuborg/dilbegin</PARA></LISTITEM>
 +
</itemizedlist>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>These are the only object functions currently documented in the <ACRONYM>VME</ACRONYM>
</LISTITEM>
+
2.0 release but if you go through the zones that are released with the
</VARLISTENTRY>
+
<ACRONYM>VME</ACRONYM> you are sure to find many more.  Hopefully with the descriptions in
 +
<XREF LINKEND="objdilfunc">.  You will be able to use the functions
 +
listed here and figure out ones that are not.</PARA>
  
<VARLISTENTRY>
+
<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the
;value
+
Valhalla mud all you have to do is use the dilcopy keyword in the
<DICTDEF>
+
NPC with the function name you want to use and the arguments that
<PARA><indexterm>
+
function requires.  The following is what you would find in the
<primary>Object value</primary>
+
''function.zon'' for tuborgs.</PARA>
</indexterm></PARA>
 
  
<PARA>The object values are used for just about any special item from
+
<INFORMALEXAMPLE><PROGRAMLISTING>
armour to drink containers.  They should not be set directly unless you
 
have a reason to do so, like a special <ACRONYM>DIL</ACRONYM> command that checks a
 
value on an item.  You also have to be carefull not to over write what a
 
value is already used for example value one is already used on
 
weapons and armours for craftsman ship that will be explained later in
 
<xref linkend="objmacros">.</PARA>
 
  
<PARA>If you find you need to set the values there are a total of five
+
dilbegin tuborg(s:string);
of them and they can be set to any integer value as follows:</PARA>
+
external
 +
sub_drink_info@commands(d:unitptr);
 +
var
 +
  u : unitptr;
 +
code
 +
{
 +
  :start:
 +
  wait(SFB_CMD, ( (command("drink")) or
 +
                (command("sip")) or
 +
  (command("taste")) ) );
 +
u := activator;
 +
secure (u,start);
 +
if (findunit (activator,argument,FIND_UNIT_INVEN|FIND_UNIT_SURRO,null)!=self)
 +
goto start;
 +
if ( command("sip") or command("taste") )
 +
{
 +
  block;
 +
  act("$1n tastes $2n enjoying every drop.", A_HIDEINV, u, self, null,
 +
        TO_ROOM);
 +
    act("The taste of the $2N is nothing less than divine.", A_HIDEINV, u, self,
 +
    null, TO_CHAR);
 +
  goto start;
 +
  }
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
if ( u.thirst >20 )
 +
{
 +
  block;
 +
act("Your not thirsty.", A_HIDEINV, u, null, null, TO_CHAR);
 +
    goto start;
 +
}
 +
block;
 +
  act ("You drink $2n and it makes you feel more energetic!", A_HIDEINV, u, self,
 +
      null, TO_CHAR);
 +
  act ("$1n drinks $2n and looks more energetic!", A_HIDEINV, u, self,
 +
      null, TO_ROOM);
  
  value[0]  5
+
u.thirst := u.thirst + 10;
  value[1] 16
+
u.full := u.full + 10;
  value[2] -2
+
if (u.thirst > 24)
  value[3] -10
+
{
  value[4] 12 
+
  u.thirst := 24;
 +
}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
if (u.full > 24)
</LISTITEM>
+
{
 +
  u.full := 24;
 +
}
 +
u.endurance := u.endurance+50;
 +
if (u.endurance > u.max_endurance)
 +
{
 +
  u.endurance := u.max_endurance;
 +
}
 +
sub_drink_info@commands(self);
 +
quit;
 +
}
 +
dilend
  
</VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to
;affect
+
understand it or adjust it you only have to use it.  In fact this is a
<DICTDEF>
+
really easy <ACRONYM>DIL</ACRONYM> to use.  The argument on the tuborg function is not used
<PARA><indexterm>
+
yet so all you have to do is pass in a blank string or any string for
<primary>Object affect</primary>
+
that matter.  So if you wanted to make a tuborg in the game you would
</indexterm></PARA>
+
just add this to your drink container.</PARA>
  
<PARA>The affect field should not be set directly, instead you should
+
<INFORMALEXAMPLE><PROGRAMLISTING>
use the macros defined in <xref linkend="objmacros">.</PARA>  
 
  
</LISTITEM>
+
dilcopy tuborg@function ("");
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;dilbegin or dilcopy
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Object dilbegin or dilcopy</primary>
 
</indexterm></PARA>
 
  
<PARA>As has been mentioned in previous sections the <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds.
+
<PARA>All of the above listed <ACRONYM>DIL</ACRONYM> object functions are described in
We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach
+
<XREF LINKEND="objdilfunc">.
you how to create your own functions that will make your rooms, NPC, and
+
Then we put some to work so you can see how
objects more than special.</PARA>
+
to use them in <XREF LINKEND="objcomplex"></PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>There are several object functions that come standard with the <ACRONYM>VME</ACRONYM>
+
</VARIABLELIST>
2.0.  The following is a list of those functions.</PARA>
 
  
<itemizedlist>
+
</SECT1>
<LISTITEM><PARA>Guild restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Anti-guild restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Quest restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Quests restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Alignment restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Level restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Virtual level restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Race restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Ability restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Skill restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Spell restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Weapon restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Gender restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>Player restrict</PARA></LISTITEM>
 
<LISTITEM><PARA>boards</PARA></LISTITEM>
 
<LISTITEM><PARA>tuborg/dilbegin</PARA></LISTITEM>
 
</itemizedlist>
 
  
<PARA>These are the only object functions currently documented in the <ACRONYM>VME</ACRONYM>
+
<sect1 id="objmacros">
2.0 release but if you go through the zones that are released with the
+
<TITLE>Object macros</TITLE>
<ACRONYM>VME</ACRONYM> you are sure to find many more.  Hopefully with the descriptions in
 
<XREF LINKEND="objdilfunc">.  You will be able to use the functions
 
listed here and figure out ones that are not.</PARA>
 
  
<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the
+
  <PARA>To make the creation of some objects easier we have provided a
Valhalla mud all you have to do is use the dilcopy keyword in the
+
set of Macros.  The macros range from general armour and weapons macros
NPC with the function name you want to use and the arguments that
+
to macros that help you create special affects on all items.  We will
function requires.  The following is what you would find in the
+
first cover what craftsmanship and magical modifiers are in <xref
''function.zon'' for tuborgs.</PARA>
+
linkend="objcraft"> and <xref linkend="objmag"> respectively.  After
 +
which we will show the use of craftsmanship and magical modifiers in
 +
<xref linkend="objmacroweapon"> and <xref
 +
linkend="objmacroarmour">.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilbegin tuborg(s:string);
 
external
 
sub_drink_info@commands(d:unitptr);
 
var
 
  u : unitptr;
 
code
 
{
 
  :start:
 
  wait(SFB_CMD, ( (command("drink")) or
 
                (command("sip")) or
 
  (command("taste")) ) );
 
u := activator;
 
secure (u,start);
 
if (findunit (activator,argument,FIND_UNIT_INVEN|FIND_UNIT_SURRO,null)!=self)
 
goto start;
 
if ( command("sip") or command("taste") )
 
{
 
  block;
 
  act("$1n tastes $2n enjoying every drop.", A_HIDEINV, u, self, null,
 
        TO_ROOM);
 
    act("The taste of the $2N is nothing less than divine.", A_HIDEINV, u, self,
 
    null, TO_CHAR);
 
  goto start;
 
  }
 
  
if ( u.thirst >20 )
+
 
{
+
<sect2 id="objcraft">
  block;
+
<TITLE>Weapon and armour craftsmanship</TITLE>
act("Your not thirsty.", A_HIDEINV, u, null, null, TO_CHAR);
 
    goto start;
 
}
 
block;
 
  act ("You drink $2n and it makes you feel more energetic!", A_HIDEINV, u, self,
 
      null, TO_CHAR);
 
  act ("$1n drinks $2n and looks more energetic!", A_HIDEINV, u, self,
 
      null, TO_ROOM);
 
  
u.thirst := u.thirst + 10;
+
<PARA>The craftsmanship is a way of expressing the overall quality of  a
u.full := u.full + 10;
+
piece of armour or weapon. The quality on the <ACRONYM>VME</ACRONYM> servers currently
if (u.thirst > 24)
+
means the amount of hit points given to an item. The craftsmanship
{
+
ranges from 25 to -25 and the hit points range from 125 to 6000. The craftsmanship can be looked at as how tough or good the armour
  u.thirst := 24;
+
or weapon is. The following table should help you in deciding how tough
}
+
your armour or weapon should be.</PARA>
  
if (u.full > 24)
+
<TABLE frame=all tocentry=0>
{
+
<TITLE>Approximate hit points verses craftsmanship</TITLE>
  u.full := 24;
+
<TGROUP align=left cols=2 colsep=1>
}
+
<THEAD>
u.endurance := u.endurance+50;
+
<ROW>
if (u.endurance > u.max_endurance)
+
<ENTRY>Craftsmanship</ENTRY>
{
+
<ENTRY>Hit points</ENTRY>
  u.endurance := u.max_endurance;
+
</ROW>
}
+
</THEAD>
sub_drink_info@commands(self);
+
<TBODY>
quit;
+
<ROW>
}
+
<ENTRY>25</ENTRY>
dilend
+
<ENTRY>6000</ENTRY>
 +
</ROW>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ROW>
 +
<ENTRY>20</ENTRY>
 +
<ENTRY>5000</ENTRY>
 +
</ROW>
  
<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to
+
<ROW>
understand it or adjust it you only have to use it.  In fact this is a
+
<ENTRY>15</ENTRY>
really easy <ACRONYM>DIL</ACRONYM> to use.  The argument on the tuborg function is not used
+
<ENTRY>4000</ENTRY>
yet so all you have to do is pass in a blank string or any string for
+
</ROW>
that matter.  So if you wanted to make a tuborg in the game you would
 
just add this to your drink container.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<ROW>
 +
<ENTRY>10</ENTRY>
 +
<ENTRY>3000</ENTRY>
 +
</ROW>
  
dilcopy tuborg@function ("");
+
<ROW>
 +
<ENTRY>5</ENTRY>
 +
<ENTRY>2000</ENTRY>
 +
</ROW>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ROW>
 +
<ENTRY>0</ENTRY>
 +
<ENTRY>1000</ENTRY>
 +
</ROW>
  
<PARA>All of the above listed <ACRONYM>DIL</ACRONYM> object functions are described in
+
<ROW>
<XREF LINKEND="objdilfunc">.
+
<ENTRY>-5</ENTRY>
Then we put some to work so you can see how
+
<ENTRY>875</ENTRY>
to use them in <XREF LINKEND="objcomplex"></PARA>
+
</ROW>
</LISTITEM>
 
</VARLISTENTRY>
 
  
</VARIABLELIST>
+
<ROW>
 +
<ENTRY>-10</ENTRY>
 +
<ENTRY>650</ENTRY>
 +
</ROW>
  
</SECT1>
+
<ROW>
 +
<ENTRY>-15</ENTRY>
 +
<ENTRY>425</ENTRY>
 +
</ROW>
  
<sect1 id="objmacros">
+
<ROW>
<TITLE>Object macros</TITLE>
+
<ENTRY>-20</ENTRY>
 +
<ENTRY>300</ENTRY>
 +
</ROW>
  
  <PARA>To make the creation of some objects easier we have provided a
+
<ROW>
set of Macros.  The macros range from general armour and weapons macros
+
<ENTRY>-25</ENTRY>
to macros that help you create special affects on all items.  We will
+
<ENTRY>125</ENTRY>
first cover what craftsmanship and magical modifiers are in <xref
+
</ROW>
linkend="objcraft"> and <xref linkend="objmag"> respectively.  After
+
</TBODY></TGROUP></TABLE>
which we will show the use of craftsmanship and magical modifiers in
 
<xref linkend="objmacroweapon"> and <xref
 
linkend="objmacroarmour">.</PARA>
 
  
 +
<PARA>It is suggested the higher the craftsmanship the higher the cost
 +
of the weapon should be.  This is not a must but it goes with out saying
 +
the quality of an item should be represented in the cost of it.  Of
 +
corse there is the time you would want to sell your players poor quality
 +
items at a high cost just to make them think they are getting something
 +
cool.</PARA>
  
 +
</sect2>
  
 
+
<sect2 id="objmag">
<sect2 id="objcraft">
+
<TITLE>Magical modifier</TITLE>
<TITLE>Weapon and armour craftsmanship</TITLE>
 
  
<PARA>The craftsmanship is a way of expressing the overall quality of  a
+
<PARA>The magical modifier can be said to modify damage done to an
piece of armour or weaponThe quality on the <ACRONYM>VME</ACRONYM> servers currently
+
opponentIn a combat the damage is calculated and then the magical
means the amount of hit points given to an item.  The craftsmanship
+
bonuses on armour or weapons is added inThis is best explained by an
ranges from 25 to -25 and the hit points range from 125 to 6000.  The craftsmanship can be looked at as how tough or good the armour
+
example.</PARA>
or weapon is.  The following table should help you in deciding how tough
 
your armour or weapon should be.</PARA>
 
  
<TABLE frame=all tocentry=0>
+
<PARA>Lets say that you were about to give 25 hit points of damage to a
<TITLE>Approximate hit points verses craftsmanship</TITLE>
+
person.  Your sword has a plus 25% in magical bonus.  The bonus is added to
<TGROUP align=left cols=2 colsep=1>
+
your damage to make it a total of 50 hit points of damage.  The player
<THEAD>
+
you are hitting however has a +25% magical bonus on his armour that you
<ROW>
+
are about to hit him on.  That will reduce the damage back to its 25%
<ENTRY>Craftsmanship</ENTRY>
+
hit points originally done.  This is just a nice way to add a bit of
<ENTRY>Hit points</ENTRY>
+
damage for a special weapon.</PARA>
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>25</ENTRY>
 
<ENTRY>6000</ENTRY>
 
</ROW>
 
  
<ROW>
+
<PARA>The magical modifier ranges from 25 to -25.  It affects both the
<ENTRY>20</ENTRY>
+
damage being given to a player and the damage being given to a weapon or
<ENTRY>5000</ENTRY>
+
a piece of armour.</PARA>
</ROW>
 
  
<ROW>
+
<PARA>It is suggested that you modify the costs of your objects to fit
<ENTRY>15</ENTRY>
+
the amount of magical bonus along with adding the magical flag tot he
<ENTRY>4000</ENTRY>
+
objects flag list so an identify spell can pick up that there is
</ROW>
+
magic about the object.  This is not a must but your players will love
 +
you for it.</PARA>
 +
</sect2>
 +
<sect2 id="objmacroweapon">
 +
<TITLE>Setting weapon fields</TITLE>
 +
 
 +
  <PARA>To create a weapon you only need three pieces of information.
 +
The weapons craftsmanship and magical modifiers defined in <xref
 +
linkend="objcraft"> and <xref linkend="objmag"> and the weapon type.
 +
You have seen the weapon types before when defining a NPCs natural
 +
attack type in <xref linkend="npcmacroattarm">.  The full list of weapon
 +
types that are released with the <ACRONYM>VME</ACRONYM> 2.0 can be found in <xref
 +
linkend="app-d">.  With craftsmanship, magical modifier and the weapon
 +
type all you need to do is pick from one of the following macros and
 +
insert your numbers.</PARA>
  
<ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>10</ENTRY>
 
<ENTRY>3000</ENTRY>
 
</ROW>
 
  
<ROW>
+
#define WEAPONSZ_DEF(weapon_category, craftsmanship, magic_bonus, hgt)  \
<ENTRY>5</ENTRY>
+
  WEAPON_DEF(weapon_category, craftsmanship, magic_bonus)\
<ENTRY>2000</ENTRY>
+
  height hgt
</ROW>
 
  
<ROW>
+
#define SHIELD_DEF(shield_type, craftsmanship, magic_bonus)  \
<ENTRY>0</ENTRY>
+
  manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_SHIELD} \
<ENTRY>1000</ENTRY>
+
  type ITEM_SHIELD            \
</ROW>
+
  value[0] shield_type        \
 +
  value[1] craftsmanship      \
 +
  value[2] magic_bonus
  
<ROW>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY>-5</ENTRY>
 
<ENTRY>875</ENTRY>
 
</ROW>
 
  
<ROW>
+
<PARA>As you can see the first macro uses the second macro so the only
<ENTRY>-10</ENTRY>
+
difference between them is the first one sets the height field.  Using
<ENTRY>650</ENTRY>
+
the first macro will force your weapon to be a certain size when loaded.
</ROW>
+
While not setting the height field by using the second macro would let
 +
the <ACRONYM>VME</ACRONYM> server set the size of the weapon by what NPC it is loaded
 +
on.</PARA>
  
<ROW>
+
<PARA> A  flail (two handed) of non-pure iron (-3%), a little better than
<ENTRY>-15</ENTRY>
+
average craftsmanship (5%) and no magic bonuses would have:</PARA>
<ENTRY>425</ENTRY>
 
</ROW>
 
  
<ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>-20</ENTRY>
+
    WEAPON_DEF(WPN_FLAIL, +2, 0)
<ENTRY>300</ENTRY>
 
</ROW>
 
  
<ROW>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY>-25</ENTRY>
 
<ENTRY>125</ENTRY>
 
</ROW>
 
</TBODY></TGROUP></TABLE>
 
  
<PARA>It is suggested the higher the craftsmanship the higher the cost
+
<PARA>A  rusty (-5%) mean sacrificial dagger by a skilled smithy  (+5%)
of the weapon should be. This is not a must but it goes with out saying
+
and magically enchanted might be:</PARA>
the quality of an item should be represented in the cost of it.  Of
 
corse there is the time you would want to sell your players poor quality
 
items at a high cost just to make them think they are getting something
 
cool.</PARA>
 
  
</sect2>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<sect2 id="objmag">
+
    flags {UNIT_FL_MAGIC}
<TITLE>Magical modifier</TITLE>
+
    WEAPON_DEF(WPN_DAGGER, 0, +5)
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>The magical modifier can be said to modify damage done to an
+
<PARA>An old shaky wooden stick made for a 400 cm tall person could
opponent.  In a combat the damage is calculated and then the magical
+
    be:</PARA>
bonuses on armour or weapons is added in.  This is best explained by an
 
example.</PARA>
 
  
<PARA>Lets say that you were about to give 25 hit points of damage to a
+
<INFORMALEXAMPLE><PROGRAMLISTING>
person.  Your sword has a plus 25% in magical bonus.  The bonus is added to
+
your damage to make it a total of 50 hit points of damage.  The player
+
WEAPONSZ_DEF(WPN_CLUB, -5, 0,400)
you are hitting however has a +25% magical bonus on his armour that you
+
 
are about to hit him on.  That will reduce the damage back to its 25%
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
hit points originally done.  This is just a nice way to add a bit of
+
 
damage for a special weapon.</PARA>
+
<PARA>A wooden bastard sword would have considerable less craftsmanship
 +
than listed since wood prevents the slashing effect, also it would be
 +
non-sense to apply better than average craftsmanship in this
 +
case.</PARA>
  
<PARA>The magical modifier ranges from 25 to -25.  It affects both the
+
<INFORMALEXAMPLE><PROGRAMLISTING>
damage being given to a player and the damage being given to a weapon or
 
a piece of armour.</PARA>
 
  
<PARA>It is suggested that you modify the costs of your objects to fit
+
    WEAPON_DEF(WPN_BROAD_SWORD, -15, 0)
the amount of magical bonus along with adding the magical flag tot he
+
objects flag list so an identify spell can pick up that there is
+
</PROGRAMLISTING></INFORMALEXAMPLE>
magic about the object.  This is not a must but your players will love
+
</sect2>  
you for it.</PARA>
+
  <sect2 id="objmacroarmour">
</sect2>
+
<TITLE>Setting armour fields</TITLE>
<sect2 id="objmacroweapon">
 
<TITLE>Setting weapon fields</TITLE>
 
 
 
  <PARA>To create a weapon you only need three pieces of information.
 
The weapons craftsmanship and magical modifiers defined in <xref
 
linkend="objcraft"> and <xref linkend="objmag"> and the weapon type.
 
You have seen the weapon types before when defining a NPCs natural
 
attack type in <xref linkend="npcmacroattarm">.  The full list of weapon
 
types that are released with the <ACRONYM>VME</ACRONYM> 2.0 can be found in <xref
 
linkend="app-d">.  With craftsmanship, magical modifier and the weapon
 
type all you need to do is pick from one of the following macros and
 
insert your numbers.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>When designing armour it is no more difficult then when designing
 +
weapons.  There is five main armour types.  The types don't define the
 +
material type for example if you wanted to create a wooden pair of
 +
armour that protected like plate armour you could do this by defining
 +
the armour type as plate and then adding the material as defined in
 +
<xref linkend="objmacromattype">.  The five armour types are as
 +
follows:</PARA>
  
#define WEAPONSZ_DEF(weapon_category, craftsmanship, magic_bonus, hgt)  \
+
<itemizedlist>
  WEAPON_DEF(weapon_category, craftsmanship, magic_bonus)\
+
<LISTITEM><PARA>Clothes</PARA></LISTITEM>
  height hgt
+
<LISTITEM><PARA>Leather</PARA></LISTITEM>
 +
<LISTITEM><PARA>Hard leather</PARA></LISTITEM>
 +
<LISTITEM><PARA>Chain</PARA></LISTITEM>
 +
<LISTITEM><PARA>Plate</PARA></LISTITEM>
 +
</itemizedlist>
  
#define SHIELD_DEF(shield_type, craftsmanship, magic_bonus)  \
+
<PARA>The armours macros are almost the same as the weapons macro it looks
  manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_SHIELD} \
+
as follows.</PARA>
  type ITEM_SHIELD            \
 
  value[0] shield_type        \
 
  value[1] craftsmanship      \
 
  value[2] magic_bonus
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As you can see the first macro uses the second macro so the only
+
#define ARMOUR_DEF(atype, craftsmanship, magic_bonus) \
difference between them is the first one sets the height field.  Using
+
  manipulate {MANIPULATE_TAKE} \
the first macro will force your weapon to be a certain size when loaded.
+
  type ITEM_ARMOR              \
While not setting the height field by using the second macro would let
+
  value[0] atype
the <ACRONYM>VME</ACRONYM> server set the size of the weapon by what NPC it is loaded
+
      value[1] craftsmanship      \
on.</PARA>
+
  value[2] magic_bonus
  
<PARA> A  flail (two handed) of non-pure iron (-3%), a little better than
+
#define ARMOURSZ_DEF(atype, craftsmanship, magic_bonus, hgt)\
average craftsmanship (5%) and no magic bonuses would have:</PARA>
+
  ARMOUR_DEF(atype,craftsmanship, magic_bonus) \
 +
  height hgt
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
    WEAPON_DEF(WPN_FLAIL, +2, 0)
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The craftsmanship and magical modifier fields have already been
 +
explained so the only thing new that you need to pass into these macros
 +
is the 'atype' which stands for armour type.  As we have mentioned there
 +
are five different armour types.  The following are the defines for
 +
each:</PARA>
  
<PARA>A  rusty  (-5%) mean sacrificial dagger by a skilled smithy  (+5%)
+
<itemizedlist>
and magically enchanted might be:</PARA>
+
<LISTITEM><PARA>ARMOUR_CLOTHES</PARA></LISTITEM>
 +
<LISTITEM><PARA>ARMOUR_LEATHER</PARA></LISTITEM>
 +
<LISTITEM><PARA>ARMOUR_HLEATHER</PARA></LISTITEM>
 +
<LISTITEM><PARA>ARMOUR_CHAIN</PARA></LISTITEM>
 +
<LISTITEM><PARA>ARMOUR_PLATE</PARA></LISTITEM>
 +
</itemizedlist>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The armour type defines how different weapons and spells are
 +
defended against for example plate would be better against acid maybe
 +
and worse against electricity.  You as a <ACRONYM>VME</ACRONYM>
 +
administrator will have to decide which armours are better at what by
 +
changing your ''weapons.def'' and
 +
''spells.def''</PARA>
  
    flags {UNIT_FL_MAGIC}
+
<PARA>This explains the entire armour define but there is some more to
    WEAPON_DEF(WPN_DAGGER, 0, +5)
+
it.  The rest will be covered in <xref linkend="objarmour"> For now an
+
example use of the armour define would be as follows:</PARA>
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>An old shaky wooden stick made for a 400 cm tall person could
 
    be:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
 
WEAPONSZ_DEF(WPN_CLUB, -5, 0,400)
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
 
 
<PARA>A wooden bastard sword would have considerable less craftsmanship
 
than listed since wood prevents the slashing effect, also it would be
 
non-sense to apply better than average craftsmanship in this
 
case.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
flags {UNIT_FL_MAGIC}
 +
ARMOR_DEF(ARM_PLATE,+15,+5)
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
</sect2>
  
    WEAPON_DEF(WPN_BROAD_SWORD, -15, 0)
+
  <sect2 id="objmacroshield">
+
<TITLE>Setting shield fields</TITLE>
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</sect2> 
 
  <sect2 id="objmacroarmour">
 
<TITLE>Setting armour fields</TITLE>
 
  
<PARA>When designing armour it is no more difficult then when designing
+
<PARA>We have tried to keep the interface of making armours, weapons, and shields the sameIf you have already looked through the defines for weapons and armours you will find that there is very little difference here.  The following is the define for the macro that sets the shield values.</PARA>
weapons.  There is five main armour types.  The types don't define the
 
material type for example if you wanted to create a wooden pair of
 
armour that protected like plate armour you could do this by defining
 
the armour type as plate and then adding the material as defined in
 
<xref linkend="objmacromattype">. The five armour types are as
 
follows:</PARA>
 
  
<itemizedlist>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<LISTITEM><PARA>Clothes</PARA></LISTITEM>
 
<LISTITEM><PARA>Leather</PARA></LISTITEM>
 
<LISTITEM><PARA>Hard leather</PARA></LISTITEM>
 
<LISTITEM><PARA>Chain</PARA></LISTITEM>
 
<LISTITEM><PARA>Plate</PARA></LISTITEM>
 
</itemizedlist>
 
  
<PARA>The armours macros are almost the same as the weapons macro it looks
+
#define SHIELD_DEF(shield_type, craftsmanship, magic_bonus)  \
as follows.</PARA>
+
  manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_SHIELD} \
 +
  type ITEM_SHIELD            \
 +
  value[0] shield_type        \
 +
  value[1] craftsmanship      \
 +
  value[2] magic_bonus
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
#define SHIELDSZ_DEF(shield_type, craftsmanship, magic_bonus, hgt)  \
 +
  SHIELD_DEF(shield_type, craftsmanship, magic_bonus)\
 +
  height hgt
 +
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
 +
 
 +
  <PARA>You have already seen the craftsmanship and magical modifiers
 +
in <xref linkend="objcraft"> and <xref linkend="objmag">, so the only
 +
thing different here is the shield type.  There are three shield
 +
types available in the current combat system and they are categorized by
 +
size.  the three sizes are small, medium, and large.  to set the type
 +
you use the defines from ''vme.h'' which define the
 +
following:</PARA>
 +
 
 +
<itemizedlist>
 +
<LISTITEM><PARA>SHIELD_SMALL</PARA></LISTITEM>
 +
<LISTITEM><PARA>SHIELD_MEDIUM</PARA></LISTITEM>
 +
<LISTITEM><PARA>SHIELD_LARGE</PARA></LISTITEM>
 +
</itemizedlist>
  
#define ARMOUR_DEF(atype, craftsmanship, magic_bonus) \
+
<PARA>the larger the shield the better chance of blocking an attack.
  manipulate {MANIPULATE_TAKE} \
+
You may want to remember to add weight as you add size to your shield so
  type ITEM_ARMOR              \
+
players are weighted down and can not carry the best of everything
  value[0] atype
+
but that is up to the administrator of the <ACRONYM>VME</ACRONYM> server.</PARA>
      value[1] craftsmanship      \
 
  value[2] magic_bonus
 
  
#define ARMOURSZ_DEF(atype, craftsmanship, magic_bonus, hgt)\
+
<PARA>A small magical wooden shield could be assigned:</PARA>
  ARMOUR_DEF(atype,craftsmanship, magic_bonus) \
 
  height hgt
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The craftsmanship and magical modifier fields have already been
+
    flags {UNIT_FL_MAGIC}
explained so the only thing new that you need to pass into these macros
+
    SHIELD_DEF(SHIELD_SMALL, 0, +5)
is the 'atype' which stands for armour type.  As we have mentioned there
+
are five different armour types.  The following are the defines for
+
</PROGRAMLISTING></INFORMALEXAMPLE>
each:</PARA>
+
  </sect2>  
 +
 
 +
  <sect2 id="objmacromattype">
 +
<TITLE>Setting material types</TITLE>
  
<itemizedlist>
+
<PARA>Currently Material types are not used greatly in spells or skills
<LISTITEM><PARA>ARMOUR_CLOTHES</PARA></LISTITEM>
+
but in the future we hope to add more functionality for materials.  For
<LISTITEM><PARA>ARMOUR_LEATHER</PARA></LISTITEM>
+
example in the future if you are hit by an acid spell we want your
<LISTITEM><PARA>ARMOUR_HLEATHER</PARA></LISTITEM>
+
armour to be damaged depending on the material it is.  The material
<LISTITEM><PARA>ARMOUR_CHAIN</PARA></LISTITEM>
+
doesn't have any affect on damage given or taken it is just a way you can
<LISTITEM><PARA>ARMOUR_PLATE</PARA></LISTITEM>
+
check in <ACRONYM>DIL</ACRONYM> what the weapon is made out of.  The following is the list
</itemizedlist>
+
you would find in ''wmacros.h'' of in the <ACRONYM>VME</ACRONYM> 2.0
 +
release.</PARA>
  
<PARA>The armour type defines how different weapons and spells are
+
<INFORMALEXAMPLE><PROGRAMLISTING>
defended against for example plate would be better against acid maybe
 
and worse against electricity.  You as a <ACRONYM>VME</ACRONYM>
 
administrator will have to decide which armours are better at what by
 
changing your ''weapons.def'' and
 
''spells.def''</PARA>
 
  
<PARA>This explains the entire armour define but there is some more to
+
#define MATERIAL_WOOD(DESCR)    extra {"$material", "$mat_wood"} DESCR
it.  The rest will be covered in <xref linkend="objarmour"> For now an
+
#define MATERIAL_METAL(DESCR)  extra {"$material", "$mat_metal"} DESCR
example use of the armour define would be as follows:</PARA>
+
#define MATERIAL_STONE(DESCR)  extra {"$material", "$mat_stone"} DESCR
 +
#define MATERIAL_CLOTH(DESCR)  extra {"$material", "$mat_cloth"} DESCR
 +
#define MATERIAL_LEATHER(DESCR) extra {"$material", "$mat_leather"} DESCR
 +
#define MATERIAL_SKIN(DESCR) extra {"$material", "$mat_skin"} DESCR
 +
#define MATERIAL_ORGANIC(DESCR) extra {"$material", "$mat_organic"} DESCR
 +
#define MATERIAL_GLASS(DESCR)  extra {"$material", "$mat_glass"} DESCR
 +
#define MATERIAL_FIRE(DESCR)    extra {"$material", "$mat_fire"} DESCR
 +
#define MATERIAL_WATER(DESCR)  extra {"$material", "$mat_water"} DESCR
 +
#define MATERIAL_EARTH(DESCR)  extra {"$material", "$mat_earth"} DESCR
 +
#define MATERIAL_MAGIC(DESCR)  extra {"$material", "$mat_magic"} DESCR
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
<PARA>Therefore if you had a wooden staff you could add the following to
 +
your weapon so spells would know what it was made out of.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
flags {UNIT_FL_MAGIC}
+
MATERIAL_WOOD("a hard oak")
ARMOR_DEF(ARM_PLATE,+15,+5)
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
 
</sect2>
 
  
  <sect2 id="objmacroshield">
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>Setting shield fields</TITLE>
+
</sect2> 
 +
  <sect2 id="objmacroliqcont">
 +
<TITLE>Drink container macros</TITLE>
  
<PARA>We have tried to keep the interface of making armours, weapons, and shields the same.  If you have already looked through the defines for weapons and armours you will find that there is very little difference here.  The following is the define for the macro that sets the shield values.</PARA>
+
<PARA>There are two different kinds of macros for drink containers.  The
 +
one you use depends on the need at the time.  The harder macro is made
 +
so you can create a drink of any kind.  If however you want normal
 +
drinks like water, beer, or even lemonade there are more simple macros
 +
already defined for you to use in ''liquid.h''.  The
 +
following is a couple of the macros from the
 +
''liquid.h'' for a full listing see
 +
<xref linkend="app-e">.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define SHIELD_DEF(shield_type, craftsmanship, magic_bonus) \
+
#define LIQ_WATER(WEIGHT,CAPACITY,INSIDE,POISON) \
  manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_SHIELD} \
+
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,10,1,0,POISON)
  type ITEM_SHIELD            \
+
#define LIQ_BEER(WEIGHT,CAPACITY,INSIDE,POISON) \
  value[0] shield_type        \
+
LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,3,POISON)
  value[1] craftsmanship      \
+
#define LIQ_WINE(WEIGHT,CAPACITY,INSIDE,POISON) \
  value[2] magic_bonus
+
LIQ_DEF("red", WEIGHT,CAPACITY,INSIDE,5,2,5,POISON)
 +
#define LIQ_COFFEE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
#define SHIELDSZ_DEF(shield_type, craftsmanship, magic_bonus, hgt)  \
+
<PARA>To use these macros the arguments are pretty simple.</PARA>
  SHIELD_DEF(shield_type, craftsmanship, magic_bonus)\
+
<VARIABLELIST>
  height hgt
+
<VARLISTENTRY>
 
+
;weight
  </PROGRAMLISTING></INFORMALEXAMPLE>
+
<DICTDEF>
 
+
<PARA>The first argument just says how heavy your drink container is when
  <PARA>You have already seen the craftsmanship and magical modifiers
+
emptyLike a barrel might be 15 pounds and a glass might be 1 pound.
in <xref linkend="objcraft"> and <xref linkend="objmag">, so the only
+
You may be thinking there is no way the glasses in your kitchen are one
thing different here is the shield typeThere are three shield
+
poundThe truth is if we had less than a pound then we would set the
types available in the current combat system and they are categorized by
+
glass to less but currently all units are measured in pounds so the
size.  the three sizes are small, medium, and large.  to set the type
+
least we can make it is a poundIn the future of the
you use the defines from ''vme.h'' which define the
+
<ACRONYM>VME</ACRONYM> we will be converting to smaller measurements
following:</PARA>
+
like grams or ounces.</PARA>
 
+
</LISTITEM>
<itemizedlist>
+
</VARLISTENTRY>
<LISTITEM><PARA>SHIELD_SMALL</PARA></LISTITEM>
+
<LISTITEM><PARA>SHIELD_MEDIUM</PARA></LISTITEM>
+
<VARLISTENTRY>
<LISTITEM><PARA>SHIELD_LARGE</PARA></LISTITEM>
+
<term>capacity</term>
</itemizedlist>
+
<LISTITEM>
 +
<PARA>The second argument is what your container can carry weight wise.
 +
So if your barrel is 15 pounds and your barrel can carry 35 pounds of a
 +
liquid then the total weight when full would be 50 pounds, if my math
 +
is working today.  To make a container with infinity liquid like a
 +
fountain you just set capacity to '-1'.</PARA>
 +
<NOTE><PARA>Making capacities ridiculously large can cause weight bugs.
 +
If your going to allow ridiculous amounts you might just want to give
 +
them the infinite amount or really work on your drink and pour
 +
functions</PARA></NOTE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>the larger the shield the better chance of blocking an attack.
+
  <VARLISTENTRY>
You may want to remember to add weight as you add size to your shield so
+
  <term>inside</term>
players are weighted down and can not carry the best of everything
+
<LISTITEM>
but that is up to the administrator of the <ACRONYM>VME</ACRONYM> server.</PARA>
+
  <PARA>The third argument is how much liquid by weight your container
 +
  has inside.  This value should not be greater than the capacity but if
 +
  you mess up it will be fixed when the player tries to drink from it.
 +
  The total weight of the drink container and the liquid it contains
 +
  will be the weight added to this value.</PARA>
 +
  </LISTITEM>
 +
  </VARLISTENTRY>
  
<PARA>A small magical wooden shield could be assigned:</PARA>
+
<VARLISTENTRY>
 +
<term>poison</term>
 +
<LISTITEM>
 +
<PARA>the forth argument is the amount of poison in your drink.  There
 +
is no limit on the amount of poison but understand that a value of ten
 +
would be a very high poison value.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
 +
<PARA>So if you wanted to make a simple small glass of water you would
 +
use the water macro and it would look like this:</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
    flags {UNIT_FL_MAGIC}
+
LIQ_WATER(1,2,2,0)
    SHIELD_DEF(SHIELD_SMALL, 0, +5)
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  </sect2> 
 
 
 
  <sect2 id="objmacromattype">
 
<TITLE>Setting material types</TITLE>
 
  
<PARA>Currently Material types are not used greatly in spells or skills
+
</PROGRAMLISTING></INFORMALEXAMPLE>
but in the future we hope to add more functionality for materials.  For
 
example in the future if you are hit by an acid spell we want your
 
armour to be damaged depending on the material it is.  The material
 
doesn't have any affect on damage given or taken it is just a way you can
 
check in <ACRONYM>DIL</ACRONYM> what the weapon is made out of.  The following is the list
 
you would find in ''wmacros.h'' of in the <ACRONYM>VME</ACRONYM> 2.0
 
release.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>You are probably wondering what it takes to fill a player from
 +
empty.  The players thirst ranges from -24 which is dieing of
 +
thirst all the way to positive 24 which is full.  So if you have a
 +
barrel that can hold 24 capacity one full barrel can take a person from
 +
zero thirst to full.</PARA>
  
#define MATERIAL_WOOD(DESCR)    extra {"$material", "$mat_wood"} DESCR
+
<PARA>Now lets say you want to make something more exotic.  All the
#define MATERIAL_METAL(DESCR)  extra {"$material", "$mat_metal"} DESCR
+
                          normal drinks are made or at least a great
#define MATERIAL_STONE(DESCR)  extra {"$material", "$mat_stone"} DESCR
+
                          number of them are in the
#define MATERIAL_CLOTH(DESCR)  extra {"$material", "$mat_cloth"} DESCR
+
                          ''liquid.h'' but what if
#define MATERIAL_LEATHER(DESCR) extra {"$material", "$mat_leather"} DESCR
+
                          you had a race from outer space that drank
#define MATERIAL_SKIN(DESCR) extra {"$material", "$mat_skin"} DESCR
+
                          nothing but silicone oil.  This obviously is
#define MATERIAL_ORGANIC(DESCR) extra {"$material", "$mat_organic"} DESCR
+
                          not covered in our liquid file so you would
#define MATERIAL_GLASS(DESCR)  extra {"$material", "$mat_glass"} DESCR
+
                          have to make one yourself or use the more
#define MATERIAL_FIRE(DESCR)    extra {"$material", "$mat_fire"} DESCR
+
                          complex macro.</PARA>
#define MATERIAL_WATER(DESCR)  extra {"$material", "$mat_water"} DESCR
 
#define MATERIAL_EARTH(DESCR)  extra {"$material", "$mat_earth"} DESCR
 
#define MATERIAL_MAGIC(DESCR)  extra {"$material", "$mat_magic"} DESCR
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  <INFORMALEXAMPLE><PROGRAMLISTING>
<PARA>Therefore if you had a wooden staff you could add the following to
 
your weapon so spells would know what it was made out of.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
#define LIQ_DEF(color, wgt, max_cap, inside,thirst,full,drunk,poison) \
 +
  type ITEM_DRINKCON          \
 +
  weight (wgt)+(inside) \
 +
  capacity max_cap \
 +
  value[0] inside        \
 +
  value[3] poison \
 +
  extra {"$drink_color"}color \
 +
  extra {"$drink_thirst"} #thirst \
 +
  extra {"$drink_full"} #full \
 +
  extra {"$drink_drunk"} #drunk
 +
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
  
MATERIAL_WOOD("a hard oak")
+
<PARA>As you can see this define has much more information you need to
 +
pass it but it really is not that hard.  The following are the arguments
 +
and what they do.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARIABLELIST>
</sect2> 
 
  <sect2 id="objmacroliqcont">
 
<TITLE>Drink container macros</TITLE>
 
  
<PARA>There are two different kinds of macros for drink containersThe
+
<VARLISTENTRY>
one you use depends on the need at the time.  The harder macro is made
+
;color
so you can create a drink of any kind.  If however you want normal
+
<DICTDEF>
drinks like water, beer, or even lemonade there are more simple macros
+
<PARA>the first argument is the color of the liquidthis color will be
already defined for you to use in ''liquid.h''.  The
+
shown when you look at the liquid in the container.</PARA>
following is a couple of the macros from the
 
''liquid.h'' for a full listing see
 
<xref linkend="app-e">.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
#define LIQ_WATER(WEIGHT,CAPACITY,INSIDE,POISON) \
+
<VARLISTENTRY>
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,10,1,0,POISON)
+
;wgt
#define LIQ_BEER(WEIGHT,CAPACITY,INSIDE,POISON) \
+
<DICTDEF>
LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,3,POISON)
+
<PARA>The second argument is the weight of the container as in the last
#define LIQ_WINE(WEIGHT,CAPACITY,INSIDE,POISON) \
+
macros.  It is what the container would weigh empty.</PARA> </LISTITEM> </VARLISTENTRY>
LIQ_DEF("red", WEIGHT,CAPACITY,INSIDE,5,2,5,POISON)
 
#define LIQ_COFFEE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>To use these macros the arguments are pretty simple.</PARA>
+
<VARLISTENTRY>
<VARIABLELIST>
+
;max_cap
<VARLISTENTRY>
+
<DICTDEF>
;weight
+
<PARA>The third argument is the maximum capacity of the container.  If
<DICTDEF>
+
the value is set to 15 and the container is fulled it will contain 15
<PARA>The first argument just says how heavy your drink container is when
+
pounds of liquid which adds to the base weight to get the total weight
emptyLike a barrel might be 15 pounds and a glass might be 1 pound.
+
of the containerIf you want a container to have unlimited contents
You may be thinking there is no way the glasses in your kitchen are one
+
then you set the capacity to '-1' and the weight will be that of the
pound.  The truth is if we had less than a pound then we would set the
+
'wgt' field.</PARA>
glass to less but currently all units are measured in pounds so the
+
</LISTITEM>
least we can make it is a pound.  In the future of the
+
</VARLISTENTRY>
<ACRONYM>VME</ACRONYM> we will be converting to smaller measurements
 
like grams or ounces.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
 
<VARLISTENTRY>
 
<term>capacity</term>
 
<LISTITEM>
 
<PARA>The second argument is what your container can carry weight wise.
 
So if your barrel is 15 pounds and your barrel can carry 35 pounds of a
 
liquid then the total weight when full would be 50 pounds, if my math
 
is working todayTo make a container with infinity liquid like a
 
fountain you just set capacity to '-1'.</PARA>
 
<NOTE><PARA>Making capacities ridiculously large can cause weight bugs.
 
If your going to allow ridiculous amounts you might just want to give
 
them the infinite amount or really work on your drink and pour
 
functions</PARA></NOTE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
  <VARLISTENTRY>
+
<VARLISTENTRY>
  <term>inside</term>
+
;inside
<LISTITEM>
+
<DICTDEF>
  <PARA>The third argument is how much liquid by weight your container
+
<PARA>The forth argument is the amount of liquid the container starts
  has inside.  This value should not be greater than the capacity but if
+
with.  This amount should not be greater than the 'max_cap' field, but
  you mess up it will be fixed when the player tries to drink from it.
+
if it is it will be corrected when the player takes a drink or acts on
  The total weight of the drink container and the liquid it contains
+
the container.</PARA>
  will be the weight added to this value.</PARA>
+
</LISTITEM>
  </LISTITEM>
+
</VARLISTENTRY>
  </VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
<term>poison</term>
+
;thirst
<LISTITEM>
+
<DICTDEF>
<PARA>the forth argument is the amount of poison in your drinkThere
+
<PARA>The fifth field is how much thirst this gives per pound of liquid
is no limit on the amount of poison but understand that a value of ten
+
consumedFor example if you have a glass of water and it only has a
would be a very high poison value.</PARA>
+
capacity of 1 with 1 inside.  this value will be added once to the players
</LISTITEM>
+
thirst field.</PARA>
</VARLISTENTRY>
 
</VARIABLELIST>
 
 
<PARA>So if you wanted to make a simple small glass of water you would
 
use the water macro and it would look like this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>this can be a bit confusing so lets first explain that the thirst
 +
field can be anything from 0 to 10 or even greater but we suggest only 10
 +
max.  With that in mind know that we set water at 10 because it is one
 +
of the best thirst quenchers known to man.  Therefore a glass with 1
 +
capacity and 1 quantity inside will give a player +10 to his thirst so if
 +
the player was down to zero thirst value one drink will give them 10.
 +
remember that a players thirst ranges from -24 to +24 so with three
 +
drinks of water a person could fill his thirst need entirely.</PARA>
  
LIQ_WATER(1,2,2,0)
+
<PARA>With that in mind when setting this field you have to think what
 +
kind of thirst quencher is my drink.  If for example it is vodka it would
 +
have little to know thirst quenching power so you would set this field
 +
to 0 or 1.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</LISTITEM> </VARLISTENTRY>
  
<PARA>You are probably wondering what it takes to fill a player from
+
<VARLISTENTRY>
empty.  The players thirst ranges from -24 which is dieing of
+
;full
thirst all the way to positive 24 which is full.  So if you have a
+
<DICTDEF>
barrel that can hold 24 capacity one full barrel can take a person from
+
<PARA>The sixth field like the thirst field sets how the drink will
zero thirst to full.</PARA>
+
affect the chars fullness.  The chars fullness field is normally set
 +
when a player is eating but as you know drinking some drinks will also
 +
give you the feeling of being fullOne drink like this would be milk.
 +
The chars fullness field ranges from -24 to 24 like the thirst field and
 +
the argument you are setting on this field should range from 0 to 10
 +
unless you have a pro teen drink that fills them like food.  Milk might
 +
have a fullness of something like 5.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>Now lets say you want to make something more exoticAll the
+
<VARLISTENTRY>
                          normal drinks are made or at least a great
+
;drunk
                          number of them are in the
+
<DICTDEF>
                          ''liquid.h'' but what if
+
<PARA>the seventh field like thirst and full deals with the Drunkenness of
                          you had a race from outer space that drank
+
a characterA character can range from 0 (not drunk) all the way up to
                          nothing but silicone oil. This obviously is
+
24 (smashed).  The drunk field on this macro sets how much drunk is
                          not covered in our liquid file so you would
+
added for each quantity of the liquid is consumed. Therefore something
                          have to make one yourself or use the more
+
like vodka should have a value of 10 while something like water should
                          complex macro.</PARA>
+
be down at 0 unless you have some weird race that gets drunk from
 +
water.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
  <INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define LIQ_DEF(color, wgt, max_cap, inside,thirst,full,drunk,poison) \
+
<VARLISTENTRY>
  type ITEM_DRINKCON          \
+
;poison
  weight (wgt)+(inside) \
+
<DICTDEF>
  capacity max_cap \
+
<PARA>The eighth and final field is again like the last macro we looked
  value[0] inside        \
+
at it sets the poison factor of a liquid.  The value ranges from 0 (no
  value[3] poison \
+
poison) to whatever you want but understand that 10 is an extreme poison
  extra {"$drink_color"}color \
+
factor and a player drinking this will most likely die quickly.</PARA>
  extra {"$drink_thirst"} #thirst \
+
</LISTITEM>
  extra {"$drink_full"} #full \
+
</VARLISTENTRY>
  extra {"$drink_drunk"} #drunk
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>As you can see this define has much more information you need to
+
</VARIABLELIST>
pass it but it really is not that hard.  The following are the arguments
 
and what they do.</PARA>
 
  
<VARIABLELIST>
+
<PARA>So with the definitions of each arguments in mind lets return to
 +
the example of making a silicone oil based liquid.  We will first
 +
show what it would look like using the hard macro then what the new
 +
easy macro that you could create would look like.</PARA>
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;color
 
<DICTDEF>
 
<PARA>the first argument is the color of the liquid.  this color will be
 
shown when you look at the liquid in the container.</PARA>
 
  
</LISTITEM>
+
LIQ_DEF("blue",5,10,10,5,1,0,0)
</VARLISTENTRY>
+
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>Now if you want to make this a liquid your going to use a lot
 +
you would define your own easier macro like this.</PARA>
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;wgt
 
<DICTDEF>
 
<PARA>The second argument is the weight of the container as in the last
 
macros.  It is what the container would weigh empty.</PARA> </LISTITEM> </VARLISTENTRY>
 
  
<VARLISTENTRY>
+
#define LIQ_SILICONE(WEIGHT,CAPACITY,INSIDE,POISON) \
;max_cap
+
LIQ_DEF("blue", WEIGHT,CAPACITY,INSIDE,5,1,0,POISON)
<DICTDEF>
 
<PARA>The third argument is the maximum capacity of the container.  If
 
the value is set to 15 and the container is fulled it will contain 15
 
pounds of liquid which adds to the base weight to get the total weight
 
of the container.  If you want a container to have unlimited contents
 
then you set the capacity to '-1' and the weight will be that of the
 
'wgt' field.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;inside
 
<DICTDEF>
 
<PARA>The forth argument is the amount of liquid the container starts
 
with.  This amount should not be greater than the 'max_cap' field, but
 
if it is it will be corrected when the player takes a drink or acts on
 
the container.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>That covers the use of the macros but for more information on the
;thirst
+
drink containers see <xref linkend="objdrink">.</PARA>
<DICTDEF>
+
</sect2>
<PARA>The fifth field is how much thirst this gives per pound of liquid
 
consumed.  For example if you have a glass of water and it only has a
 
capacity of 1 with 1 inside.  this value will be added once to the players
 
thirst field.</PARA>
 
  
<PARA>this can be a bit confusing so lets first explain that the thirst
+
<sect2 id="objmacrofood">
field can be anything from 0 to 10 or even greater but we suggest only 10
+
<TITLE>The food macros</TITLE>
max.  With that in mind know that we set water at 10 because it is one
 
of the best thirst quenchers known to man.  Therefore a glass with 1
 
capacity and 1 quantity inside will give a player +10 to his thirst so if
 
the player was down to zero thirst value one drink will give them 10.
 
remember that a players thirst ranges from -24 to +24 so with three
 
drinks of water a person could fill his thirst need entirely.</PARA>
 
  
<PARA>With that in mind when setting this field you have to think what
+
<PARA>The food macro is much easier than that of the drink macro so if
kind of thirst quencher is my drinkIf for example it is vodka it would
+
you have drink containers down you will have no problem making food to
have little to know thirst quenching power so you would set this field
+
go with your beverageThe players fullness value ranges from -24 to 24
to 0 or 1.</PARA>
+
as we have already learned when making drink containers and in the
 +
current food system on the <ACRONYM>VME</ACRONYM> server we do not allow thirst to be
 +
modified by food.  Therefore the only thing you have to set is the
 +
amount of fullness and the poison factor if there is any.  The following
 +
is what the define for food looks like.</PARA>
  
</LISTITEM> </VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
#define FOOD_DEF(food_amount, poison_factor)  \
;full
+
  type ITEM_FOOD        \
<DICTDEF>
+
  value[0] food_amount  \
<PARA>The sixth field like the thirst field sets how the drink will
+
  value[3] poison_factor
affect the chars fullness.  The chars fullness field is normally set
+
 
when a player is eating but as you know drinking some drinks will also
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
give you the feeling of being full.  One drink like this would be milk.
+
 
The chars fullness field ranges from -24 to 24 like the thirst field and
+
  <PARA>Therefore if you wanted to make sure that only one of your
the argument you are setting on this field should range from 0 to 10
+
foods that you were creating would fill a player entirely in one bite
unless you have a pro teen drink that fills them like food.  Milk might
+
you would set it like this:</PARA>
have a fullness of something like 5.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;drunk
 
<DICTDEF>
 
<PARA>the seventh field like thirst and full deals with the Drunkenness of
 
a character.  A character can range from 0 (not drunk) all the way up to
 
24 (smashed).  The drunk field on this macro sets how much drunk is
 
added for each quantity of the liquid is consumed.  Therefore something
 
like vodka should have a value of 10 while something like water should
 
be down at 0 unless you have some weird race that gets drunk from
 
water.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
FOOD_DEF(50,0)
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;poison
 
<DICTDEF>
 
<PARA>The eighth and final field is again like the last macro we looked
 
at it sets the poison factor of a liquid.  The value ranges from 0 (no
 
poison) to whatever you want but understand that 10 is an extreme poison
 
factor and a player drinking this will most likely die quickly.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
</VARIABLELIST>
+
<PARA>It is recommended that you only set the value between 1 and 10 so
 +
that players have to eat a bit as if they were eating in the real
 +
world.</PARA>
 +
  </sect2>
 +
     
 +
  <sect2 id="objmacrolight">
 +
<TITLE>Light object macro</TITLE>
  
<PARA>So with the definitions of each arguments in mind lets return to
+
<PARA>The light macro is very simply to use it only has two values
the example of making a silicone oil based liquidWe will first
+
duration and brightness of lightThe macro is defined as
show what it would look like using the hard macro then what the new
+
follows:</PARA>
easy macro that you could create would look like.</PARA>
 
  
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
  
LIQ_DEF("blue",5,10,10,5,1,0,0)
+
#define LIGHT_DEF(hours, how_bright)  \
+
  type ITEM_LIGHT    \
 +
  value[0] hours      \
 +
  value[1] how_bright
 +
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
<PARA>Now if you want to make this a liquid your going to use a lot
 
you would define your own easier macro like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The first argument is the duration in mud hours which is about 5
 +
  minutes per mud hour.  The second argument is how bright the object
 +
  is 0 would be stupid cause it would give off no light but you never
 +
  know maybe you want to do something like that.  One, two, and three
 +
  would be small torch, large torch, and lantern respectively.  You
 +
  could set a brightness greater than 3 but you should be carefull not
 +
  to over light your characters or you may cause light bugs.</PARA>
  
#define LIQ_SILICONE(WEIGHT,CAPACITY,INSIDE,POISON) \
+
  </sect2>
LIQ_DEF("blue", WEIGHT,CAPACITY,INSIDE,5,1,0,POISON)
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  <sect2 id="objmacrocontainer">
 +
  <TITLE>Container macro</TITLE>
  
<PARA>That covers the use of the macros but for more information on the
+
<PARA> The container macro is a simple macro that just sets two fields.
drink containers see <xref linkend="objdrink">.</PARA>
+
The only information you have to give it is the capacity of the
</sect2>
+
container.  Remember that capacity of an item is in weight not size.
 +
Therefore if some ones corpse weighs 230 pounds you will need a container
 +
that has a capacity of 230 to fit the corpse in it.  The following is
 +
the macros definition as found in ''wmacros.h'':</PARA>
  
<sect2 id="objmacrofood">
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>The food macros</TITLE>
 
  
<PARA>The food macro is much easier than that of the drink macro so if
+
#define CONTAINER_DEF(max_capacity) \
you have drink containers down you will have no problem making food to
+
  type ITEM_CONTAINER              \
go with your beverage. The players fullness value ranges from -24 to 24
+
  capacity max_capacity
as we have already learned when making drink containers and in the
 
current food system on the <ACRONYM>VME</ACRONYM> server we do not allow thirst to be
 
modified by food.  Therefore the only thing you have to set is the
 
amount of fullness and the poison factor if there is any.  The following
 
is what the define for food looks like.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
#define FOOD_DEF(food_amount, poison_factor)  \
+
<PARA>If you wanted to create a coffin that could carry any normal human
  type ITEM_FOOD        \
+
  corpse you could set it something like this:</PARA>
  value[0] food_amount  \
 
  value[3] poison_factor
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
 
 
  <PARA>Therefore if you wanted to make sure that only one of your
 
foods that you were creating would fill a player entirely in one bite
 
you would set it like this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
FOOD_DEF(50,0)
+
container_def(300)
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
    </sect2>
  
<PARA>It is recommended that you only set the value between 1 and 10 so
+
<sect2 id="objmacromoney">
that players have to eat a bit as if they were eating in the real
+
<TITLE>Money macro</TITLE>
world.</PARA>
 
  </sect2>
 
     
 
  <sect2 id="objmacrolight">
 
<TITLE>Light object macro</TITLE>
 
  
<PARA>The light macro is very simply to use it only has two values
+
<PARA>Money is one of the simplest objects you can make on the <ACRONYM>VME</ACRONYM>
duration and brightness of light.  The macro is defined as
+
server.  With this macro all you need is the symbolic before the macro
follows:</PARA>
+
and the end keyword after the macro and you have 1 piece of money or a whole pile.  The macro is defined in the ''wmacros.h'' and looks exactly as follows:</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#define LIGHT_DEF(hours, how_bright)   \
+
#define MONEY(coin_type, coins) \
  type ITEM_LIGHT    \
+
  type ITEM_MONEY \
  value[0] hours      \
+
  manipulate MANIPULATE_TAKE \
  value[1] how_bright
+
  title coin_type \
 
+
  value[0] coins
</PROGRAMLISTING></INFORMALEXAMPLE>
+
 
 
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
<PARA>The first argument is the duration in mud hours which is about 5
+
 
  minutes per mud hour.  The second argument is how bright the object
+
  <PARA>The arguments are simple the first argument is the type of money the five possible values are:</PARA>
  is 0 would be stupid cause it would give off no light but you never
+
  <itemizedlist>
  know maybe you want to do something like thatOne, two, and three
+
  <LISTITEM><PARA>IRON_PIECE</PARA></LISTITEM>
  would be small torch, large torch, and lantern respectively.  You
+
  <LISTITEM><PARA>COPPER_PIECE</PARA></LISTITEM>
  could set a brightness greater than 3 but you should be carefull not
+
  <LISTITEM><PARA>SILVER_PIECE</PARA></LISTITEM>
  to over light your characters or you may cause light bugs.</PARA>
+
  <LISTITEM><PARA>GOLD_PIECE</PARA></LISTITEM>
 +
  <LISTITEM><PARA>PLATINUM_PIECE</PARA></LISTITEM>
 +
  </itemizedlist>
 +
 
 +
  <PARA>The second argument is the amount of coins.  If you set it to
 +
zero then it will still make exactly 1 of the coinsThe following
 +
would be what one platinum piece would be like in a zone file.</PARA>
 +
 
 +
  <INFORMALEXAMPLE><PROGRAMLISTING>
 +
 
 +
platinum_piece
  
  </sect2>
+
MONEY(PLATINUM_PIECE, 0)
 +
/* Rest of values are inserted at runtime */
  
  <sect2 id="objmacrocontainer">
+
end
  <TITLE>Container macro</TITLE>
 
  
<PARA> The container macro is a simple macro that just sets two fields.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
The only information you have to give it is the capacity of the
 
container.  Remember that capacity of an item is in weight not size.
 
Therefore if some ones corpse weighs 230 pounds you will need a container
 
that has a capacity of 230 to fit the corpse in it.  The following is
 
the macros definition as found in ''wmacros.h'':</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Now if you want to make a whole pile of money it would look like this:</PARA>
  
#define CONTAINER_DEF(max_capacity)  \
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  type ITEM_CONTAINER              \
 
  capacity max_capacity
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
platinum_pile
  
<PARA>If you wanted to create a coffin that could carry any normal human
+
MONEY(PLATINUM_PIECE, 80)
  corpse you could set it something like this:</PARA>
+
/* Rest of values are inserted at runtime */
 +
extra {}
 +
"Holy cow thats a stash."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
end
  
container_def(300)
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
  </sect2>
    </sect2>
 
  
<sect2 id="objmacromoney">
+
  <sect2 id="objmacrocurse">
<TITLE>Money macro</TITLE>
+
  <TITLE>Cursed objects macro</TITLE>
  
<PARA>Money is one of the simplest objects you can make on the <ACRONYM>VME</ACRONYM>
+
<PARA>Sometimes when making special objects you want to make an item
server.  With this macro all you need is the symbolic before the macro
+
that a person can wear but can't remove.  With the cursed object macro
and the end keyword after the macro and you have 1 piece of money or a whole pile.  The macro is defined in the ''wmacros.h'' and looks exactly as follows:</PARA>
+
this is a simple thing.  The cursed object macro is defined in
 +
''wmacros.h'' and looks as follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
#define CURSED_OBJECT \
 +
affect \
 +
  id ID_CURSE \
 +
  duration -1 \
 +
  firstf TIF_NONE \
 +
  tickf  TIF_NONE \
 +
  lastf  TIF_NONE \
 +
  applyf APF_MOD_OBJ_FLAGS \
 +
  data[0] OBJ_NO_UNEQUIP;
 +
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
 +
 
 +
      <PARA>to use this macro it is simply a matter of putting the define
 +
in your object like this:</PARA>
  
#define MONEY(coin_type, coins) \
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  type ITEM_MONEY \
 
  manipulate MANIPULATE_TAKE \
 
  title coin_type \
 
  value[0] coins
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
 
 
  <PARA>The arguments are simple the first argument is the type of money the five possible values are:</PARA>
 
  <itemizedlist>
 
  <LISTITEM><PARA>IRON_PIECE</PARA></LISTITEM>
 
  <LISTITEM><PARA>COPPER_PIECE</PARA></LISTITEM>
 
  <LISTITEM><PARA>SILVER_PIECE</PARA></LISTITEM>
 
  <LISTITEM><PARA>GOLD_PIECE</PARA></LISTITEM>
 
  <LISTITEM><PARA>PLATINUM_PIECE</PARA></LISTITEM>
 
  </itemizedlist>
 
 
 
  <PARA>The second argument is the amount of coins.  If you set it to
 
zero then it will still make exactly 1 of the coins.  The following
 
would be what one platinum piece would be like in a zone file.</PARA>
 
 
 
  <INFORMALEXAMPLE><PROGRAMLISTING>
 
 
 
platinum_piece
 
  
MONEY(PLATINUM_PIECE, 0)
+
CURSED_OBJECT   
/* Rest of values are inserted at runtime */
 
  
end
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>When you set this macro on an object it adds an affect that can
 +
only be removed by the 'set' command or by the 'remove curse
 +
spell'.</PARA>
 +
  </sect2>
  
<PARA>Now if you want to make a whole pile of money it would look like this:</PARA>
+
  <sect2 id="objmacropws">
 +
  <TITLE>Potion, wand, and staff macros</TITLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The macros for potions, scrolls, wands, and staffs are almost the
 +
same.  In fact there is only two differences. The first  is the potions and scrolls can cast three
 +
spells while wands can only cast two, The second is wands and staffs
 +
have multiple charges possible while scrolls and potions only can be
 +
used once.  The following are the macros
 +
for all four as found in ''wmacros.h''.</PARA>
  
platinum_pile
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
MONEY(PLATINUM_PIECE, 80)
+
#define POTION_DEF(power,spell1,spell2,spell3) \
/* Rest of values are inserted at runtime */
+
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
extra {}
+
  flags {UNIT_FL_MAGIC} \
"Holy cow thats a stash."
+
  spell power      \
 +
  type ITEM_POTION \
 +
  value[0] power  \
 +
  value[1] spell1  \
 +
  value[2] spell2  \
 +
  value[3] spell3
  
end
+
#define SCROLL_DEF(power,spell1,spell2,spell3)  \
 +
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
 +
  flags {UNIT_FL_MAGIC} \
 +
  spell power      \
 +
  type ITEM_SCROLL \
 +
  value[0] power  \
 +
  value[1] spell1  \
 +
  value[2] spell2  \
 +
  value[3] spell3
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
#define WAND_DEF(power,charge,spell1,spell2)  \
 +
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
 +
  flags {UNIT_FL_MAGIC} \
 +
  spell power      \
 +
  type ITEM_WAND \
 +
  value[0] power  \
 +
  value[1] charge  \
 +
  value[2] spell1  \
 +
  value[3] spell2  \
 +
  value[4] charge  /* The max charge */
  
  </sect2>
+
#define STAFF_DEF(power,charge,spell1,spell2)  \
 +
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
 +
  flags {UNIT_FL_MAGIC} \
 +
  spell power      \
 +
  type ITEM_STAFF  \
 +
  value[0] power  \
 +
  value[1] charge  \
 +
  value[2] spell1  \
 +
  value[3] spell2  \
 +
  value[4] charge  /* The max charge */
 +
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
  
  <sect2 id="objmacrocurse">
+
<PARA>The arguments are as follows for the macros.</PARA>
  <TITLE>Cursed objects macro</TITLE>
 
  
<PARA>Sometimes when making special objects you want to make an item
+
<VARIABLELIST>
that a person can wear but can't removeWith the cursed object macro
+
<VARLISTENTRY>
this is a simple thing.  The cursed object macro is defined in
+
;power
''wmacros.h'' and looks as follows:</PARA>
+
<DICTDEF>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The first argument on potions, scrolls, wands, and staff is the
 +
power the spell will be cast atYou can have the power set in the
 +
range 1-200.  The spell power works the same as a player training in the
 +
spell.  The higher the number the more powerfull the cast.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
#define CURSED_OBJECT \
+
<VARLISTENTRY>
affect \
+
;charge
  id ID_CURSE \
+
<DICTDEF>
  duration -1 \
+
<PARA>The second argument on the staffs and wands is how many charges it
  firstf TIF_NONE \
+
has.</PARA>
  tickf  TIF_NONE \
+
</LISTITEM>
  lastf  TIF_NONE \
+
</VARLISTENTRY>
  applyf APF_MOD_OBJ_FLAGS \
 
  data[0] OBJ_NO_UNEQUIP;
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
 
 
      <PARA>to use this macro it is simply a matter of putting the define
 
in your object like this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;spell#
 +
<DICTDEF>
 +
<PARA>On potions and scrolls you can set up to 2 spells you do not have
 +
to set them both the one you don't want set to 0.  On staffs and wands
 +
you can set three spells.  Again if you want only one or two you can
 +
leave the one you do not want set to 0.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
</sect2>
 +
 
 +
 
 +
  <sect2 id="objmacrotransfers">
 +
<TITLE>Magical transfer macros</TITLE>
  
CURSED_OBJECT   
+
<PARA>There are times when you want to give a player a bonus in a
 +
ability, weapon, skill, and or weapon.  There is even times when you
 +
want to adjust a characters speed or add a flag to a player when they
 +
wear an item.  The following macros are what you would use to do any of
 +
those when a person uses an item.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<itemizedlist>
 +
<LISTITEM><PARA>CHAR_FLAG_TRANSFER(_MFLAGS)</PARA></LISTITEM>
 +
<LISTITEM><PARA>SKILL_TRANSFER(skill, amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>WEAPON_TRANSFER(weapon, amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>SPELL_TRANSFER(spell, amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>STR_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>DEX_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>CON_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>CHA_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>BRA_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>MAG_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>DIV_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>HIT_TRANSFER(amount)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>SPEED_TRANSFER(newspeed)</PARA></LISTITEM> 
 +
<LISTITEM><PARA>SLOW_TRANSFER(amount)</PARA></LISTITEM>
 +
</itemizedlist>
  
<PARA>When you set this macro on an object it adds an affect that can
+
<NOTE><PARA>For the full definitions of the transfer macros see
only be removed by the 'set' command or by the 'remove curse
+
<xref linkend="app-f"> or the header file ''wmacros.h''.</PARA></NOTE>
spell'.</PARA>
 
  </sect2>
 
  
  <sect2 id="objmacropws">
+
<PARA>The transfer macros can be broken down into three groups those
  <TITLE>Potion, wand, and staff macros</TITLE>
+
which transfer percentage, flags, and speed.  The skill, weapons,
 +
spells, and ability macros transfer the amount of percentage you put.
 +
If you give a negative percentage it will take that much away from the
 +
player or NPC in that catagory.  The character flag transfer actually
 +
adds the flag to the player while the player is using the item.  The
 +
speed transfer macros add or subtract the amount of speed you give them.
 +
The range for speed is from zero to twelve with twelve being the
 +
slowest.</PARA>
 +
  </sect2>
 +
  </sect1>
  
<PARA>The macros for potions, scrolls, wands, and staffs are almost the
+
<sect1 id="objbasic">
same.  In fact there is only two differences. The first is the potions and scrolls can cast three
+
<TITLE>Building your first object</TITLE>
spells while wands can only cast two, The second is wands and staffs
 
have multiple charges possible while scrolls and potions only can be
 
used once.  The following are the macros
 
for all four as found in ''wmacros.h''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Now that you have learned how to make rooms and NPCs its time to
 +
make the objects for your little world.
 +
In the last couple of sections you have looked
 +
through the fields.  In this section we are going to make a nice easy
 +
object.  There is really not that much new from what you have learned
 +
with rooms and NPCs so this should be a real quick section.  As always
 +
we will start with something I like which as you remember is dragons.
 +
So the first object we will make is a dragon head.  I didn't say I liked
 +
them alive now did I?  Anyway this will be a nice simple object that
 +
your player can pick up and carry around.</PARA>
  
#define POTION_DEF(power,spell1,spell2,spell3) \
+
<PARA>When making objects you create the zone source file first as shown
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
+
in <xref linkend="ch-02">.  If you only have objects you do not need the
  flags {UNIT_FL_MAGIC} \
+
%reset, %mobiles, and %rooms fields. For the examples in this chapter we
  spell power      \
+
will use the zone we created in <xref linkend="ch-04"> and add the
  type ITEM_POTION \
+
%objects section where we will put all the object definitions. At the end
  value[0] power  \
+
of this chapter, in <xref linkend="roomnpcobjzone">, we will bring it
  value[1] spell1 \
+
all together with the rooms and NPCs we have defined already.</PARA>
  value[2] spell2  \
 
  value[3] spell3
 
  
#define SCROLL_DEF(power,spell1,spell2,spell3)  \
+
<PARA>The first part of all object definitions is the symbolic name it is good
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
+
to always pick a name that will match the name of the object so it
  flags {UNIT_FL_MAGIC} \
+
will be easy to load the object.
  spell power      \
+
The reason the symbolic and name should match is when you use the
  type ITEM_SCROLL \
+
command <command>wstat</command> it will only show you a
  value[0] power  \
+
list of the objects by symbolic name for example if you type <command>
  value[1] spell1  \
+
wstat zone dragon objects</command> You will get the following:
  value[2] spell2  \
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  value[3] spell3
 
  
#define WAND_DEF(power,charge,spell1,spell2)  \
+
List of objects in zone Dragon:
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
+
claw info_board dragon_head
  flags {UNIT_FL_MAGIC} \
 
  spell power      \
 
  type ITEM_WAND \
 
  value[0] power  \
 
  value[1] charge  \
 
  value[2] spell1  \
 
  value[3] spell2  \
 
  value[4] charge  /* The max charge */
 
  
#define STAFF_DEF(power,charge,spell1,spell2)  \
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \
+
If you didn't make it clear what the object was by the symbolic name
  flags {UNIT_FL_MAGIC} \
+
it might look like this:
  spell power      \
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  type ITEM_STAFF  \
 
  value[0] power  \
 
  value[1] charge  \
 
  value[2] spell1  \
 
  value[3] spell2  \
 
  value[4] charge  /* The max charge */
 
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>The arguments are as follows for the macros.</PARA>
+
List of objects in zone Dragon:
 +
obj1 a_obj2 o3
  
<VARIABLELIST>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<VARLISTENTRY>
+
While this might be great when you first start imagine trying to
;power
+
remember each object if you have over 30 of them.</PARA>
<DICTDEF>
 
<PARA>The first argument on potions, scrolls, wands, and staff is the
 
power the spell will be cast at.  You can have the power set in the
 
range 1-200.  The spell power works the same as a player training in the
 
spell.  The higher the number the more powerfull the cast.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>Now lets get started with our dragon head. As with the rooms and
;charge
+
npcs all that is required to make an object is the symbolic and end fields.
  <DICTDEF>
+
That of course will make a NPC with all defaults.</PARA>
<PARA>The second argument on the staffs and wands is how many charges it
 
has.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;spell#
 
<DICTDEF>
 
<PARA>On potions and scrolls you can set up to 2 spells you do not have
 
to set them both the one you don't want set to 0.  On staffs and wands
 
you can set three spells.  Again if you want only one or two you can
 
leave the one you do not want set to 0.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
</sect2>
 
 
 
 
 
  <sect2 id="objmacrotransfers">
 
<TITLE>Magical transfer macros</TITLE>
 
  
<PARA>There are times when you want to give a player a bonus in a
+
dragon_head
ability, weapon, skill, and or weapon.  There is even times when you
+
end
want to adjust a characters speed or add a flag to a player when they
 
wear an item.  The following macros are what you would use to do any of
 
those when a person uses an item.</PARA>
 
  
<itemizedlist>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<LISTITEM><PARA>CHAR_FLAG_TRANSFER(_MFLAGS)</PARA></LISTITEM>
 
<LISTITEM><PARA>SKILL_TRANSFER(skill, amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>WEAPON_TRANSFER(weapon, amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>SPELL_TRANSFER(spell, amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>STR_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>DEX_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>CON_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>CHA_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>BRA_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>MAG_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>DIV_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>HIT_TRANSFER(amount)</PARA></LISTITEM> 
 
<LISTITEM><PARA>SPEED_TRANSFER(newspeed)</PARA></LISTITEM> 
 
<LISTITEM><PARA>SLOW_TRANSFER(amount)</PARA></LISTITEM>
 
</itemizedlist>
 
  
<NOTE><PARA>For the full definitions of the transfer macros see
+
<PARA>Thats it for that dragon head right?  Nope not quite, like before
<xref linkend="app-f"> or the header file ''wmacros.h''.</PARA></NOTE>
+
with NPCs, that makes an object with all defaults.  That means this will probably be
 +
a very blank spot on the screen with no names and no way your players
 +
can interact with it.
 +
Now lets start putting the
 +
Dragon heads other more interesting fields on.</PARA>
  
<PARA>The transfer macros can be broken down into three groups those
+
<PARA>Like with rooms and NPCs, the first three things we need are the
which transfer percentage, flags, and speed.  The skill, weapons,
+
dragon heads title, description and names.  The description should be what you
spells, and ability macros transfer the amount of percentage you put.
+
see when you do a 'look' in the room.  The title should be what you see
If you give a negative percentage it will take that much away from the
+
when the object is in your inventory or you are whacking someone over the
player or NPC in that catagory.  The character flag transfer actually
+
head with itSince we are not making a weapon though the title is what
adds the flag to the player while the player is using the itemThe
+
will be shown when you are picking up or dropping the object.
speed transfer macros add or subtract the amount of speed you give them.
+
Finally the names should cover everything
The range for speed is from zero to twelve with twelve being the
+
in the title and description fields so if your player wants to pick
slowest.</PARA>
+
the object up or wear it will be easy to figure out what the names
  </sect2>
+
are.</PARA>
  </sect1>
 
  
<sect1 id="objbasic">
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>Building your first object</TITLE>
 
  
<PARA>Now that you have learned how to make rooms and NPCs its time to
+
dragon_head
make the objects for your little world.
 
In the last couple of sections you have looked
 
through the fields.  In this section we are going to make a nice easy
 
object.  There is really not that much new from what you have learned
 
with rooms and NPCs so this should be a real quick section.  As always
 
we will start with something I like which as you remember is dragons.
 
So the first object we will make is a dragon head.  I didn't say I liked
 
them alive now did I?  Anyway this will be a nice simple object that
 
your player can pick up and carry around.</PARA>
 
  
<PARA>When making objects you create the zone source file first as shown
+
title "a gold dragon head"
in <xref linkend="ch-02">.  If you only have objects you do not need the
 
%reset, %mobiles, and %rooms fields.  For the examples in this chapter we
 
will use the zone we created in <xref linkend="ch-04"> and add the
 
%objects section where we will put all the object definitions.  At the end
 
of this chapter, in <xref linkend="roomnpcobjzone">, we will bring it
 
all together with the rooms and NPCs we have defined already.</PARA>
 
  
<PARA>The first part of all object definitions is the symbolic name it is good
+
descr "A large golden dragon head is laying here looking sad."
to always pick a name that will match the name of the object so it
 
will be easy to load the object.
 
The reason the symbolic and name should match is when you use the
 
command <command>wstat</command> it will only show you a
 
list of the objects by symbolic name for example if you type <command>
 
wstat zone dragon objects</command> You will get the following:
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
List of objects in zone Dragon:
+
names {"large golden dragon head","large gold dragon head",
claw info_board dragon_head
+
      "golden dragon head","large dragon head","gold dragon head",
 +
      "dragon head","large head", "sad head","head"}
 +
...
 +
end
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
If you didn't make it clear what the object was by the symbolic name
 
it might look like this:
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
List of objects in zone Dragon:
+
<PARA>The names, title and description shouldn't be to hard so I don't
obj1 a_obj2 o3
+
think its necessary to go into any more description on the subject.
 +
Lets move on.  Now we have to take care of what a player sees when he or
 +
she looks at an object.  to make the main description of an NPC you place an
 +
extra on the NPC with no names in the list.  The blank extra is a
 +
special extra that will be shown every time you look at anything in the
 +
names list of the object.  So a description of an object would look something
 +
like this.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
While this might be great when you first start imagine trying to
 
remember each object if you have over 30 of them.</PARA>
 
  
<PARA>Now lets get started with our dragon head.  As with the rooms and
+
extra {}
npcs all that is required to make an object is the symbolic and end fields.
+
"The head is large and beautiful, at least as beautiful as a dead
That of course will make a NPC with all defaults.</PARA>
+
dragon head can beThere is an extreme look of sorrow on the dragons
 +
face and it seems to be for much more than its own death."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dragon_head
+
<PARA>Now that you have a main description for the object you need to make
end
+
any smaller descriptions that you want the player to be able to look at.
 +
In this case it may be good to give some secret information if the
 +
player looks at the face of the head directly.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Thats it for that dragon head right?  Nope not quite, like before
+
extra {"gold dragon head face","dragon head face","head face","face"}
with NPCs, that makes an object with all defaults.  That means this will probably be
+
"Looking into the dragons face your eyes are drawn to the eyes of the
a very blank spot on the screen with no names and no way your players
+
dead dragon. Could there be something there?"
can interact with it.
 
Now lets start putting the
 
Dragon heads other more interesting fields on.</PARA>
 
  
<PARA>Like with rooms and NPCs, the first three things we need are the
+
extra {"eyes","eye"}
dragon heads title, description and names.  The description should be what you
+
"A world of blue skies and no storms is visible through the eyes and it
see when you do a 'look' in the room.  The title should be what you see
+
seems to be moving as if you were watching the world from space."
when the object is in your inventory or you are whacking someone over the
 
head with it.  Since we are not making a weapon though the title is what
 
will be shown when you are picking up or dropping the object.
 
Finally the names should cover everything
 
in the title and description fields so if your player wants to pick
 
the object up or wear it will be easy to figure out what the names
 
are.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dragon_head
+
<PARA>Now that we have the object all described we only need to give the
 +
    object the manipulate flags it needs, weight, height, and maybe
 +
    some extras that will make some cool acts when a player picks it up
 +
    or drops it.</PARA>
 +
 +
<PARA>First thing to do though is pick the manipulate flags you
 +
want on the object.  This is not a weapon or armour so all the
 +
player really needs to be able to do with it is pick it up and maybe
 +
hold it if you want and I do.  The flags would then be as follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
title "a gold dragon head"
+
manipulate {MANIPULATE_TAKE,MANIPULATE_HOLD}
  
descr "A large golden dragon head is laying here looking sad."
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>If you were feeling a little weird you could even make the
 +
person be able to wear the dragon head on his head but that would
 +
just be strange.  of course its always good to know you have
 +
options.</PARA>
 +
 +
<PARA>Now lets set the height and weight.  Remember you set the height
 +
in centimeters and the weight in pounds.  In the future the <ACRONYM>VME</ACRONYM> will
 +
standardize to one or the other but for now we have to play the
 +
conversion game.</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
names {"large golden dragon head","large gold dragon head",
+
//20 feet  (1 inch = 2.54 cm
      "golden dragon head","large dragon head","gold dragon head",
+
height 33
      "dragon head","large head", "sad head","head"}
 
...
 
end
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//566 KG (1 lb. = .45359 kg)
 +
weight 50
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
 +
<PARA>The final touch to our little dragon head is some cute acts
 +
when the player picks it up or drops it.  If you remember from the extra
 +
fields in <xref linkend="objfielddescr">, there are some special extras
 +
that are made just for this purpose.</PARA>
  
<PARA>The names, title and description shouldn't be to hard so I don't
+
<INFORMALEXAMPLE><PROGRAMLISTING>
think its necessary to go into any more description on the subject.
 
Lets move on.  Now we have to take care of what a player sees when he or
 
she looks at an object.  to make the main description of an NPC you place an
 
extra on the NPC with no names in the list.  The blank extra is a
 
special extra that will be shown every time you look at anything in the
 
names list of the object.  So a description of an object would look something
 
like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra {"$get_s"}
 +
"You suddenly feel very sad for a world that you don't even know."
  
extra {}
+
extra {"$get_o"}
"The head is large and beautiful, at least as beautiful as a dead
+
"A strange look of sadness crosses $1ns face."
dragon head can be.  There is an extreme look of sorrow on the dragons
 
face and it seems to be for much more than its own death."
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
extra {"$drop_s"}
 +
"You feel much happier but you remember a feeling of great sorrow."
  
<PARA>Now that you have a main description for the object you need to make
+
extra {"drop_o"}
any smaller descriptions that you want the player to be able to look at.
+
"$1n seems to cheer up a bit."
In this case it may be good to give some secret information if the
 
player looks at the face of the head directly.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
extra {"gold dragon head face","dragon head face","head face","face"}
+
<PARA>There are other things we could add to this item but I want to
"Looking into the dragons face your eyes are drawn to the eyes of the
+
keep this first object simpleThe finished head would then look like
dead dragonCould there be something there?"
+
this:</PARA>
  
extra {"eyes","eye"}
 
"A world of blue skies and no storms is visible through the eyes and it
 
seems to be moving as if you were watching the world from space."
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
 
<PARA>Now that we have the object all described we only need to give the
 
    object the manipulate flags it needs, weight, height, and maybe
 
    some extras that will make some cool acts when a player picks it up
 
    or drops it.</PARA>
 
 
<PARA>First thing to do though is pick the manipulate flags you
 
want on the object.  This is not a weapon or armour so all the
 
player really needs to be able to do with it is pick it up and maybe
 
hold it if you want and I do.  The flags would then be as follows:</PARA>
 
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
  
manipulate {MANIPULATE_TAKE,MANIPULATE_HOLD}
+
dragon_head
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
title "a gold dragon head"
 
<PARA>If you were feeling a little weird you could even make the
 
person be able to wear the dragon head on his head but that would
 
just be strange.  of course its always good to know you have
 
options.</PARA>
 
 
<PARA>Now lets set the height and weight.  Remember you set the height
 
in centimeters and the weight in pounds.  In the future the <ACRONYM>VME</ACRONYM> will
 
standardize to one or the other but for now we have to play the
 
conversion game.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//20 feet  (1 inch = 2.54 cm
+
descr "A large golden dragon head is laying here looking sad."
height 33
 
  
//566 KG (1 lb. = .45359 kg)
+
names {"large golden dragon head","large gold dragon head",
weight 50
+
      "golden dragon head","large dragon head","gold dragon head",
+
      "dragon head","large head", "sad head","head"}
</PROGRAMLISTING></INFORMALEXAMPLE>
+
 
+
  extra {}
<PARA>The final touch to our little dragon head is some cute acts
+
"The head is large and beautiful, at least as beautiful as a dead
when the player picks it up or drops itIf you remember from the extra
+
dragon head can beThere is an extreme look of sorrow on the dragons
fields in <xref linkend="objfielddescr">, there are some special extras
+
face and it seems to be for much more than its own death."
that are made just for this purpose.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
extra {"$get_s"}
+
extra {"gold dragon head face","dragon head face","head face","face"}
"You suddenly feel very sad for a world that you don't even know."
+
"Looking into the dragons face your eyes are drawn to the eyes of the
 +
dead dragon. Could there be something there?"
  
extra {"$get_o"}
+
extra {"eyes","eye"}
"A strange look of sadness crosses $1ns face."
+
"A world of blue skies and no storms is visible through the eyes and it
 +
seems to be moving as if you were watching the world from space."
  
extra {"$drop_s"}
+
manipulate {MANIPULATE_TAKE,MANIPULATE_HOLD}
"You feel much happier but you remember a feeling of great sorrow."
 
  
extra {"drop_o"}
+
height 33
"$1n seems to cheer up a bit."
+
weight 50
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
extra {"$get_s"}
 +
"You suddenly feel very sad for a world that you don't even know."
  
<PARA>There are other things we could add to this item but I want to
+
extra {"$get_o"}
keep this first object simple. The finished head would then look like
+
"A strange look of sadness crosses $1ns face."
this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra {"$drop_s"}
 +
"You feel much happier but you remember a feeling of great sorrow."
  
dragon_head
+
extra {"drop_o"}
 +
"$1n seems to cheer up a bit."
  
title "a gold dragon head"
+
end
  
descr "A large golden dragon head is laying here looking sad."
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
names {"large golden dragon head","large gold dragon head",
 
      "golden dragon head","large dragon head","gold dragon head",
 
      "dragon head","large head", "sad head","head"}
 
 
 
  extra {}
 
"The head is large and beautiful, at least as beautiful as a dead
 
dragon head can be.  There is an extreme look of sorrow on the dragons
 
face and it seems to be for much more than its own death."
 
  
  
extra {"gold dragon head face","dragon head face","head face","face"}
+
<PARA>Thats all there is to making regular items.  The rest is just
"Looking into the dragons face your eyes are drawn to the eyes of the
+
adding functionality to what you already know.  We will get much deeper
dead dragon. Could there be something there?"
+
into what you can do with items in <xref linkend="objcomplex"> but first
 +
we will go over a debugging example and then all the special DIL functions made
 +
for objects.</PARA>
  
extra {"eyes","eye"}
+
</SECT1>
"A world of blue skies and no storms is visible through the eyes and it
+
<sect1 id="objdebug">
seems to be moving as if you were watching the world from space."
+
<TITLE>Compiling and Debugging your first object</TITLE>
  
manipulate {MANIPULATE_TAKE,MANIPULATE_HOLD}
+
<PARA>As we have previously mentioned in <xref linkend="rmdebug"> and
 +
<xref linkend="npcdebug"> it is always a good idea to build one or two
 +
things and then compile to make finding errors easy.  In this case we
 +
have one object to compile and rather than having all the rooms and NPCS
 +
get in my way while compiling it I have removed them and only have the
 +
'%objects' section.  The following is what the zone looks like when it
 +
has only one object in it.</PARA>
  
height 33
+
<INFORMALEXAMPLE><PROGRAMLISTING>
weight 50
 
  
extra {"$get_s"}
+
#include &lt;composed.h&gt;
"You suddenly feel very sad for a world that you don't even know."
+
%zone dragonst
 +
lifespan 20
 +
reset RESET_ANYHOW
 +
creator {"whistler"}
  
extra {"$get_o"}
+
notes
"A strange look of sadness crosses $1ns face."
+
"This is the dragon station I shortened it to dragonst for ease in
 +
loading.  If you have  any questions email me at whistler@valhalla.com"
  
extra {"$drop_s"}
+
help
"You feel much happier but you remember a feeling of great sorrow."
+
"Not sure what could help you now.  You are stuck on one of the
 +
weirdest space stations you have ever seen and you smell burning
 +
sulfur."
  
extra {"drop_o"}
+
%objects
"$1n seems to cheer up a bit."
 
  
end
+
dragon_head
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
title "a gold dragon head"
  
 +
descr "A large golden dragon head is laying here looking sad."
  
 +
names {"large golden dragon head","large gold dragon head,
 +
      "golden dragon head","large dragon head","gold dragon head",
 +
      "dragon head","large head", "sad head","head"}
 +
 
 +
  extra {}
 +
"The head is large and beautiful, at least as beautiful as a dead
 +
dragon head can be.  There is an extreme look of sorrow on the dragons
 +
face and it seems to be for much more than its own death."
  
<PARA>Thats all there is to making regular items.  The rest is just
 
adding functionality to what you already know.  We will get much deeper
 
into what you can do with items in <xref linkend="objcomplex"> but first
 
we will go over a debugging example and then all the special DIL functions made
 
for objects.</PARA>
 
  
</SECT1>
+
extra {"gold dragon head face","dragon head face","head face","face"}
<sect1 id="objdebug">
+
"Looking into the dragons face your eyes are drawn to the eyes of the
<TITLE>Compiling and Debugging your first object</TITLE>
+
dead dragon.  Could there be something there?"
  
<PARA>As we have previously mentioned in <xref linkend="rmdebug"> and
+
extra {"eyes","eye"}
<xref linkend="npcdebug"> it is always a good idea to build one or two
+
"A world of blue skies and no storms is visible through the eyes and it
things and then compile to make finding errors easy.  In this case we
+
seems to be moving as if you were watching the world from space."
have one object to compile and rather than having all the rooms and NPCS
 
get in my way while compiling it I have removed them and only have the
 
'%objects' section.  The following is what the zone looks like when it
 
has only one object in it.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
manipulate MANIPULATE_TAKE,MANIPULATE_HOLD
  
#include &lt;composed.h&gt;
+
height 33
%zone dragonst
+
weight 50
lifespan 20
 
reset RESET_ANYHOW
 
creator {"whistler"}
 
  
notes
+
extra {"$get_s"}
"This is the dragon station I shortened it to dragonst for ease in
+
"You suddenly feel very sad for a world that you don't even know."
loading.  If you have  any questions email me at whistler@valhalla.com"
 
  
help
+
extra {"$get_o"}
"Not sure what could help you now.  You are stuck on one of the
+
"A strange look of sadness crosses $1ns face."
weirdest space stations you have ever seen and you smell burning
 
sulfur."
 
  
%objects
+
extra {"$drop_s"}
 +
"You feel much happier but you remember a feeling of great sorrow."
  
dragon_head
+
extra {"drop_o"}
 +
"$1n seems to cheer up a bit."
  
title "a gold dragon head"
+
end
  
descr "A large golden dragon head is laying here looking sad."
+
%end
  
names {"large golden dragon head","large gold dragon head,
+
</PROGRAMLISTING></INFORMALEXAMPLE>
      "golden dragon head","large dragon head","gold dragon head",
 
      "dragon head","large head", "sad head","head"}
 
 
 
  extra {}
 
"The head is large and beautiful, at least as beautiful as a dead
 
dragon head can be.  There is an extreme look of sorrow on the dragons
 
face and it seems to be for much more than its own death."
 
  
 +
<PARA>I removed the '%rooms' and '%mobiles' sections added a '%objects' section and
 +
stuck the dragon head in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM>
 +
server for you to be able to look at it in the game.  If you downloaded
 +
our example zones for this document you can compile this zone along with
 +
us and fix the errors as we do for practice.  The filename is
 +
''debug_obj.zon''.  Just so you know the errors in this
 +
zone are intentional so please don't write me an email telling me that
 +
there are errors in it.</PARA>
  
extra {"gold dragon head face","dragon head face","head face","face"}
+
<PARA>The command to compile the zone is
"Looking into the dragons face your eyes are drawn to the eyes of the
+
<command>VMC debug_obj.zon</command>.
dead dragon. Could there be something there?"
+
Here is what we get when we first try and
 +
compile the zone.</PARA>
  
extra {"eyes","eye"}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"A world of blue skies and no storms is visible through the eyes and it
 
seems to be moving as if you were watching the world from space."
 
  
manipulate MANIPULATE_TAKE,MANIPULATE_HOLD
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
 +
Compiling 'debug_obj.zon'
 +
&lt;debug_obj.zon&gt; @ 65: EOF in string
 +
debug_obj.zon: 5: parse error
 +
  Token: '{'
 +
debug_obj.zon: 25: parse error
 +
  Token: 'golden'
 +
Grave errors in file 'debug_obj.zon'.
  
height 33
+
</PROGRAMLISTING></INFORMALEXAMPLE>
weight 50
 
  
extra {"$get_s"}
+
<PARA>This error file doesn't look any harder than the last one we dealt
"You suddenly feel very sad for a world that you don't even know."
+
with when compiling our first room or NPC.  We can not stress enough
 +
always fix the smallest numbered error first.  In this case the lowest
 +
numbered error shows up in line five of the zone.  The error says
 +
something is wrong with the '{' but looking at the line it is obvious
 +
the compiler got confused because I forgot 's' at the end of 'creators'.
 +
If we fix line five and recompile this is what we get:</PARA>
 +
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
 +
 +
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
 +
Compiling 'debug_obj.zon'
 +
&lt;debug_obj.zon&gt; @ 65: EOF in string
 +
debug_obj.zon: 25: parse error
 +
  Token: 'golden'
 +
Grave errors in file 'debug_obj.zon'.
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
extra {"$get_o"}
+
<PARA>Now we have come to another one of those weird errors.  If you
"A strange look of sadness crosses $1ns face."
+
look at line 25 you will find that the line looks like it is correct.
 +
As we have said before when you find an error like this it most likely
 +
means that you are missing a quote or a '{}'.  The only way to find the
 +
problem is start at the quote or '{}' before the word in the error and
 +
go backwards through the file till you find a missing one.  Lucky for us
 +
the missing one is in the very next string. If you add a double quote
 +
just before the ending comma on line 24 and recompile you will get the
 +
following:</PARA>
  
extra {"$drop_s"}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"You feel much happier but you remember a feeling of great sorrow."
 
  
extra {"drop_o"}
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
"$1n seems to cheer up a bit."
+
Compiling 'debug_obj.zon'
 +
debug_obj.zon: 42: parse error
 +
  Token: ','
 +
Compilation aborted.
  
end
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
%end
+
<PARA>This error is a little tricky.  It seems to be pointing at the ','
 +
as the problem.  If you look at the line though and remember what you
 +
need for a manipulate field you will notice that the surrounding '{}' are
 +
missing.  The reason the compiler is pointing at the comma is because it
 +
doesn't understand what to do with the comma with out the '{}' grouping
 +
symbols.  Fixing these and recompiling results in the following message
 +
from the compiler.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>I removed the '%rooms' and '%mobiles' sections added a '%objects' section and
+
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
stuck the dragon head in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM>
+
Compiling 'debug_obj.zon'
server for you to be able to look at it in the game.  If you downloaded
+
<ACRONYM>VMC</ACRONYM> Done.
our example zones for this document you can compile this zone along with
 
us and fix the errors as we do for practiceThe filename is
 
''debug_obj.zon''.  Just so you know the errors in this
 
zone are intentional so please don't write me an email telling me that
 
there are errors in it.</PARA>
 
  
<PARA>The command to compile the zone is
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<command>VMC debug_obj.zon</command>.
 
Here is what we get when we first try and
 
compile the zone.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means that
 +
you have now successfully compiled the zone.  This is the last debugging
 +
walk through in the manual.  If you still have a lot of trouble figuring
 +
out errors don't stress compiling is an art the more you do it the
 +
easier it will get.  We suggest you take the zones we have provided in
 +
our release and create errors so you can get used to the messages
 +
you will see when you are making your own zones.  Never be afraid to
 +
ask for help from someone else sometimes a bug is so simple you will
 +
over look it and sometimes it just takes a second person a single glance
 +
to find it.  Another trick to finding errors if you have been looking
 +
for more than 5 minutes take a break and come back in 10 minutes
 +
sometimes that short relaxing time will help you find the
 +
problem.</PARA>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
+
<PARA>You have now compiled your first objectThe steps are the same
Compiling 'debug_obj.zon'
+
to get it into the game as it was for the rooms and NPCs. We will not
&lt;debug_obj.zon&gt; @ 65: EOF in string
+
go over them again except to say copy your files that the compiler made
debug_obj.zon: 5: parse error
+
over into the zone directory of your mud and reboot. From there log on
  Token: '{'
+
and you should be able to <command>wstat</command> and
debug_obj.zon: 25: parse error
+
<command>load</command> your object by using its full symbolic
  Token: 'golden'
+
name. It would be a good idea to try and get this zone into your server
Grave errors in file 'debug_obj.zon'.
+
and lay with the object a bit so when you get to <xref
 +
linkend="objcomplex"> you will be ready for anything.</PARA>
 +
</SECT1>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<sect1 id="objdilfunc">
 +
<TITLE><ACRONYM>DIL</ACRONYM> functions for objects</TITLE>
  
<PARA>This error file doesn't look any harder than the last one we dealt
+
<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own
with when compiling our first room or NPC.  We can not stress enough
+
special functions on rooms, NPCs, objects, PCs, and much moreThis
always fix the smallest numbered error firstIn this case the lowest
+
manual is for basic zone writing and therefore will not go into how to
numbered error shows up in line five of the zone.  The error says
+
write your own <ACRONYM>DIL</ACRONYM> functions.  The <ACRONYM>VME</ACRONYM> however is released with many
something is wrong with the '{' but looking at the line it is obvious
+
functions for you as an Administrator and your builders to use to make
the compiler got confused because I forgot 's' at the end of 'creators'.
+
special rooms, NPCs, and objects.  The following sections contain a full list of all object
If we fix line five and recompile this is what we get:</PARA>
+
functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
 
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
 
Compiling 'debug_obj.zon'
 
&lt;debug_obj.zon&gt; @ 65: EOF in string
 
debug_obj.zon: 25: parse error
 
  Token: 'golden'
 
Grave errors in file 'debug_obj.zon'.
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>Now we have come to another one of those weird errors.  If you
+
<sect2 id="objdilrestrict">
look at line 25 you will find that the line looks like it is correct.
+
<TITLE>Restriction functions</TITLE>
As we have said before when you find an error like this it most likely
 
means that you are missing a quote or a '{}'.  The only way to find the
 
problem is start at the quote or '{}' before the word in the error and
 
go backwards through the file till you find a missing one.  Lucky for us
 
the missing one is in the very next string.  If you add a double quote
 
just before the ending comma on line 24 and recompile you will get the
 
following:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The desire to have different equipment comes from every players
 +
desire to be different.  The restrict functions were designed to help
 +
make this a reality by only allowing certain groups of players to wear
 +
some items.  The restrict functions can be used alone or together to
 +
make a greater restricted item.  for example you could make an item,
 +
restricted to only females or you could make an item, restricted to females that had a strength greater than 20 and who have
 +
done a certain quest.</PARA>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001]
+
<PARA>All restrict functions have a name that describes what the
Compiling 'debug_obj.zon'
+
restriction function is for and four other argumentsthe 2nd, 3rd, and
debug_obj.zon: 42: parse error
+
4th argument is the exact same for all restrict functions only the name
  Token: ','
+
of the restrict and the first argument changes. The format for the
Compilation aborted.
+
restrict functions is as follows.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>This error is a little tricky.  It seems to be pointing at the ','
+
dilcopy &lt;function name&gt; (arg 1, &lt;max damage&gt;,
as the problem.  If you look at the line though and remember what you
+
    &lt;percentage&gt;,&lt;Optional <ACRONYM>DIL</ACRONYM>&gt;);
need for a manipulate field you will notice that the surrounding '{}' are
 
missing.  The reason the compiler is pointing at the comma is because it
 
doesn't understand what to do with the comma with out the '{}' grouping
 
symbols.  Fixing these and recompiling results in the following message
 
from the compiler.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May  9 2001]
+
<PARA>We will skip the function name and the first argument and get back
Compiling 'debug_obj.zon'
+
to them later.</PARA>
<ACRONYM>VMC</ACRONYM> Done.
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARIABLELIST>
  
<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means that
+
<VARLISTENTRY>
you have now successfully compiled the zone.  This is the last debugging
+
;max damage and percentage
walk through in the manual.  If you still have a lot of trouble figuring
+
<DICTDEF>
out errors don't stress compiling is an art the more you do it the
 
easier it will get.  We suggest you take the zones we have provided in
 
our release and create errors so you can get used to the messages
 
you will see when you are making your own zones.  Never be afraid to
 
ask for help from someone else sometimes a bug is so simple you will
 
over look it and sometimes it just takes a second person a single glance
 
to find it.  Another trick to finding errors if you have been looking
 
for more than 5 minutes take a break and come back in 10 minutes
 
sometimes that short relaxing time will help you find the
 
problem.</PARA>
 
  
<PARA>You have now compiled your first object. The steps are the same
+
<PARA>The second and third arguments set the damage done when the wrong player
to get it into the game as it was for the rooms and NPCs.  We will not
+
wears an object. The reason we are explaining them together is they can
go over them again except to say copy your files that the compiler made
+
work together or separately depending on how you set them.
over into the zone directory of your mud and reboot.  From there log on
+
The second argument is the max damage the third argument is the
and you should be able to <command>wstat</command> and
+
percentage damage.</PARA>
<command>load</command> your object by using its full symbolic
 
name. It would be a good idea to try and get this zone into your server
 
and lay with the object a bit so when you get to <xref
 
linkend="objcomplex"> you will be ready for anything.</PARA>
 
</SECT1>
 
  
<sect1 id="objdilfunc">
+
<PARA>When both arguments are set to 0 no damage will be
<TITLE><ACRONYM>DIL</ACRONYM> functions for objects</TITLE>
+
done when the item is illegally worn.  When the second argument is set
 +
to a number like 100 and the third argument is set to 0, exactly 100
 +
damage will be done to the player no matter how many hit points he/she
 +
has.  So by setting the second argument to a number and setting the
 +
third to 0 you could possibly kill your victim since it will remove the
 +
amount specified no matter how much the player has.</PARA>
  
<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own
+
<PARA> If you do not want
special functions on rooms, NPCs, objects, PCs, and much moreThis
+
to possibly kill your victim the Third argument should be usedIf you
manual is for basic zone writing and therefore will not go into how to
+
set the second argument to 0 and the third argument to a number it will
write your own <ACRONYM>DIL</ACRONYM> functions. The <ACRONYM>VME</ACRONYM> however is released with many
+
do a percent of damage to the player. for example if The third argument
functions for you as an Administrator and your builders to use to make
+
was set to 25 it would do 25 % damage to a player.</PARA>
special rooms, NPCs, and objects.  The following sections contain a full list of all object
 
functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>
 
  
<sect2 id="objdilrestrict">
+
<PARA> You can also use the second and third argument together if you want to set a max amount of
<TITLE>Restriction functions</TITLE>
+
damage without possibly killing them.  for example if you set the second
 +
argument to 100 and third to 25.  The item will do 25% damage up to 100
 +
hit points of damage. This all might be a bit confusing so let me show
 +
you a few examples and tell you what they would do.</PARA>
  
<PARA>The desire to have different equipment comes from every players
+
<VARIABLELIST>
desire to be different.  The restrict functions were designed to help
 
make this a reality by only allowing certain groups of players to wear
 
some items.  The restrict functions can be used alone or together to
 
make a greater restricted item.  for example you could make an item,
 
restricted to only females or you could make an item, restricted to females that had a strength greater than 20 and who have
 
done a certain quest.</PARA>
 
  
<PARA>All restrict functions have a name that describes what the
+
<VARLISTENTRY>
restriction function is for and four other arguments. the 2nd, 3rd, and
+
;second= 0 third = 25
4th argument is the exact same for all restrict functions only the name
+
<DICTDEF>
of the restrict and the first argument changes. The format for the
+
<PARA>This would
restrict functions is as follows.</PARA>
+
do 25% damage to a player. second =100 third = 0 this would do 100
 
+
damage to a player no matter his amount of hit points.</PARA>
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</LISTITEM>
 
+
</VARLISTENTRY>
dilcopy &lt;function name&gt; (arg 1, &lt;max damage&gt;,
+
<VARLISTENTRY>
    &lt;percentage&gt;,&lt;Optional <ACRONYM>DIL</ACRONYM>&gt;);
+
;second = 25 third = 25
 +
<DICTDEF>
 +
<PARA>This would do 25 % damage to a player up to 25 hit points.
 +
So if a player had 150 hit points the max that could be removed is 25
 +
hit points.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;optional <ACRONYM>DIL</ACRONYM>
 +
<DICTDEF>
 +
<PARA>All restrict DIL functions have a default set of acts.  If you want to make
 +
your own set of acts you have to create your own <ACRONYM>DIL</ACRONYM> that does nothing
 +
more than act.  If you don't understand how this works.  You may want to
 +
look in the <ACRONYM>DIL</ACRONYM> manual about passing DIL functions as arguments.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
<PARA>We will skip the function name and the first argument and get back
+
<PARA>Now we should get back to the first argument and function name
to them later.</PARA>
+
since they are what control the restricts.  The function name has been
 +
chosen so you can easily tell what the restrict was created for
 +
while the first argument changes depending on which restrict you use.
 +
The following are what each function restricts name is and what the function
 +
name and first argument are.</PARA>
  
<VARIABLELIST>
+
<VARIABLELIST>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;max damage and percentage
+
<TERM>Guild Restrict</term>
  <DICTDEF>
+
<LISTITEM> <PARA>
 +
<indexterm>
 +
  <primary>Guild Restrict Object function</primary>
 +
  </indexterm></PARA>
 +
 
 +
  <PARA>This function restricts an object to players in a certain
 +
guild or guilds.  Anyone not in the guild or guilds, will have the damage done as set in the
 +
2nd and 3rd arguments unless none is set.  Even if no damage is set the
 +
object will be removed off of the players equipment and placed in their
 +
inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
<PARA>The second and third arguments set the damage done when the wrong player
+
<INFORMALEXAMPLE><PROGRAMLISTING>
wears an object. The reason we are explaining them together is they can
 
work together or separately depending on how you set them.
 
The second argument is the max damage the third argument is the
 
percentage damage.</PARA>
 
  
<PARA>When both arguments are set to 0 no damage will be
+
dilbegin guild_restrict
done when the item is illegally worn.  When the second argument is set
+
(guilds:stringlist,damage:integer,percent:integer,action:string);
to a number like 100 and the third argument is set to 0, exactly 100
 
damage will be done to the player no matter how many hit points he/she
 
has.  So by setting the second argument to a number and setting the
 
third to 0 you could possibly kill your victim since it will remove the
 
amount specified no matter how much the player has.</PARA>
 
  
<PARA> If you do not want
+
</PROGRAMLISTING></INFORMALEXAMPLE>
to possibly kill your victim the Third argument should be used.  If you
 
set the second argument to 0 and the third argument to a number it will
 
do a percent of damage to the player. for example if The third argument
 
was set to 25 it would do 25 % damage to a player.</PARA>
 
  
<PARA> You can also use the second and third argument together if you want to set a max amount of
+
<PARA>As the definition indicates the first argument is a stringlistThis
damage without possibly killing themfor example if you set the second
+
means you can restrict this item to more than one guildAll guilds in
argument to 100 and third to 25The item will do 25% damage up to 100
+
the string list will be able to wear this object. If we wanted to make
hit points of damage. This all might be a bit confusing so let me show
+
an item that only Paladins and sorcerers could wear it would look like
you a few examples and tell you what they would do.</PARA>
+
this.</PARA>
  
<VARIABLELIST>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<VARLISTENTRY>
+
dilcopy guild_restrict@function ({"Midgaard Paladin",
;second= 0 third = 25
+
                        "Midgaard Sorcerer"},0,25,"");
<DICTDEF>
 
<PARA>This would
 
do 25% damage to a player. second =100 third = 0 this would do 100
 
damage to a player no matter his amount of hit points.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;second = 25 third = 25
 
<DICTDEF>
 
<PARA>This would do 25 % damage to a player up to 25 hit points.
 
So if a player had 150 hit points the max that could be removed is 25
 
hit points.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
</LISTITEM>
 
</VARLISTENTRY> 
 
  
<VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
;optional <ACRONYM>DIL</ACRONYM>
+
</LISTITEM>
<DICTDEF>
 
<PARA>All restrict DIL functions have a default set of acts.  If you want to make
 
your own set of acts you have to create your own <ACRONYM>DIL</ACRONYM> that does nothing
 
more than act.  If you don't understand how this works.  You may want to
 
look in the <ACRONYM>DIL</ACRONYM> manual about passing DIL functions as arguments.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<PARA>Now we should get back to the first argument and function name
+
</VARLISTENTRY>
since they are what control the restricts.  The function name has been
+
<VARLISTENTRY>
chosen so you can easily tell what the restrict was created for
+
;Anti-guild Restrict
while the first argument changes depending on which restrict you use.
+
<DICTDEF>
The following are what each function restricts name is and what the function
+
<PARA><indexterm>
name and first argument are.</PARA>
+
<primary>Anti-guild Restrict Object function</primary>
 +
</indexterm></PARA>
  
<VARIABLELIST>
+
  <PARA>This function restricts an object to players not in a certain
 +
guild or guilds.  Anyone not in the guild or guilds listed, will have the damage done as set in the
 +
2nd and 3rd arguments unless none is set.  Even if no damage is set the
 +
object will be removed off of the players equipment and placed in their
 +
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TERM>Guild Restrict</term>
 
<LISTITEM> <PARA>
 
<indexterm>
 
  <primary>Guild Restrict Object function</primary>
 
  </indexterm></PARA>
 
 
 
  <PARA>This function restricts an object to players in a certain
 
guild or guilds.  Anyone not in the guild or guilds, will have the damage done as set in the
 
2nd and 3rd arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilbegin anti_guild_restrict
 +
(guilds:stringlist,damage:integer,percent:integer,action:string);
  
dilbegin guild_restrict
+
</PROGRAMLISTING></INFORMALEXAMPLE>
(guilds:stringlist,damage:integer,percent:integer,action:string);
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>As the definition indicates the first argument is a stringlist.  This
 +
means you can restrict this item from more than one guild.  All guilds in
 +
the string list will not be able to wear this object.  If we wanted to make
 +
an item that only Paladins and sorcerers could not wear it would look like
 +
this.</PARA>
  
<PARA>As the definition indicates the first argument is a stringlist.  This
+
<INFORMALEXAMPLE><PROGRAMLISTING>
means you can restrict this item to more than one guild.  All guilds in
 
the string list will be able to wear this object.  If we wanted to make
 
an item that only Paladins and sorcerers could wear it would look like
 
this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilcopy anti_guild_restrict@function ({"Midgaard Paladin",
 +
                              "Midgaard Sorcerer"},0,25,"");
  
dilcopy guild_restrict@function ({"Midgaard Paladin",
+
</PROGRAMLISTING></INFORMALEXAMPLE>
                        "Midgaard Sorcerer"},0,25,"");
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</LISTITEM>
 
  
</VARLISTENTRY>
+
</LISTITEM>
<VARLISTENTRY>
 
;Anti-guild Restrict
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Anti-guild Restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players not in a certain
+
</VARLISTENTRY>
guild or guilds.  Anyone not in the guild or guilds listed, will have the damage done as set in the
 
2nd and 3rd arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;Quest Restrict
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Quest Restrict Object function</primary>
 +
</indexterm></PARA>
  
dilbegin anti_guild_restrict
+
  <PARA>This function restricts an object to players who have done a
(guilds:stringlist,damage:integer,percent:integer,action:string);
+
certain quest.  Any  player who has not done the quest,
 +
will have the damage done as set in the 2nd and 3rd arguments unless
 +
none is set.  Even if no damage is set the object will be removed off of
 +
the players equipment and placed in their inventory.  The following is
 +
the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first argument is a stringlist.  This
+
dilbegin quest_restrict
means you can restrict this item from more than one guild.  All guilds in
+
(qst:string,damage:integer,percent:integer,action:string);
the string list will not be able to wear this object.  If we wanted to make
 
an item that only Paladins and sorcerers could not wear it would look like
 
this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilcopy anti_guild_restrict@function ({"Midgaard Paladin",
+
<PARA>As the definition indicates the first argument is a string.  The
                              "Midgaard Sorcerer"},0,25,"");
+
quest restrict is only made to restrict the by one quest at a time.  If
 +
you want the item to have multiple quests restrictions you just add
 +
another dilcopy to it.  The following Would be an object
 +
restricted to one quest.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
 +
dilcopy quest_restrict@function ("Eagles quest complete",0,25,"");
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
  
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;Quest Restrict
+
;Quests Restrict
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Quest Restrict Object function</primary>
+
<primary>Quests Restrict Object function</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
  <PARA>This function restricts an object to players who have done a
+
  <PARA>This function restricts an object to players who have a certain
certain quest.  Any  player who has not done the quest,
+
quest or questsAnyone not having all quests in the list of quests, will have the damage done as set in the
will have the damage done as set in the 2nd and 3rd arguments unless
+
2nd and 3rd arguments unless none is set.  Even if no damage is set the
none is set.  Even if no damage is set the object will be removed off of
+
object will be removed off of the players equipment and placed in their
the players equipment and placed in their inventory.  The following is
+
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
the definition of the <ACRONYM>DIL</ACRONYM> as found in
+
''function.zon''.</PARA>
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilbegin quest_restrict
+
dilbegin quests_restrict
(qst:string,damage:integer,percent:integer,action:string);
+
(qsts:stringlist,damage:integer,percent:integer,action:string);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>As the definition indicates the first argument is a stringThe
+
<PARA>As the definition indicates the first argument is a stringlistThis
quest restrict is only made to restrict the by one quest at a timeIf
+
means you can restrict this item to more than one quest.  Players that
you want the item to have multiple quests restrictions you just add
+
have not done every quest will not be able to use the object.
another dilcopy to itThe following Would be an object
+
If we wanted to make an item that only players that have finished both
restricted to one quest.</PARA>
+
the 'Eagles quest complete' and the 'Feather fall quest complete' could
 +
wearIt would look like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy quest_restrict@function ("Eagles quest complete",0,25,"");
+
dilcopy quests_restrict@function ({"Eagles quest complete",
 +
                          "Feather fall quest complete"},0,25,"");
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
 
  
</VARLISTENTRY>
+
</LISTITEM>
  
<VARLISTENTRY>
+
</VARLISTENTRY>
;Quests Restrict
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Quests Restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players who have a certain
+
<VARLISTENTRY>
quest or quests.  Anyone not having all quests in the list of quests, will have the damage done as set in the
+
;Alignment Restrict
2nd and 3rd arguments unless none is set.  Even if no damage is set the
+
<DICTDEF>
object will be removed off of the players equipment and placed in their
+
<PARA><indexterm>
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
+
<primary>Alignment Restrict Object function</primary>
''function.zon''.</PARA>
+
</indexterm></PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
  <PARA>This function restricts an object to players with a certain
 +
alignment range.
 +
Anyone not in the alignment range,
 +
will have the damage done as set in the 3nd and 4th arguments unless
 +
none is set.  Even if no damage is set the object will be removed off of
 +
the players equipment and placed in their inventory.</PARA>
  
dilbegin quests_restrict
+
<PARA>We said at the beginning of this section that all restricts have
(qsts:stringlist,damage:integer,percent:integer,action:string);
+
only 4 arguments.  This was a bit of a lie since this restrict has five
 +
arguments.  The reason we didn't count this one is because the first and
 +
second argument in the alignment restrict function are used together and
 +
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first argument is a stringlist.  This
+
dilbegin ali_restrict
means you can restrict this item to more than one quest.  Players that
+
(max:integer,min:integer,damage:integer,percent:integer,action:string);
have not done every quest will not be able to use the object.
 
If we wanted to make an item that only players that have finished both
 
the 'Eagles quest complete' and the 'Feather fall quest complete' could
 
wear.  It would look like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilcopy quests_restrict@function ({"Eagles quest complete",
+
<PARA>As the definition indicates the first and second arguments are two
                          "Feather fall quest complete"},0,25,"");
+
integers.  the first is the max alignment that can wear or use this
 +
object and the second is the minimum alignment.  So if we wanted to
 +
restrict an item to only good players it would look like this.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
dilcopy ali_restrict@function (1000,350,0,25,"");
  
</VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
</LISTITEM>
;Alignment Restrict
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Alignment Restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players with a certain
+
</VARLISTENTRY>
alignment range.
 
Anyone not in the alignment range,
 
will have the damage done as set in the 3nd and 4th arguments unless
 
none is set.  Even if no damage is set the object will be removed off of
 
the players equipment and placed in their inventory.</PARA>
 
  
<PARA>We said at the beginning of this section that all restricts have
+
<VARLISTENTRY>
only 4 arguments.  This was a bit of a lie since this restrict has five
+
;Level restrict
arguments.  The reason we didn't count this one is because the first and
+
<DICTDEF>
second argument in the alignment restrict function are used together and
+
<PARA><indexterm>
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
+
<primary>Level restrict Object function</primary>
''function.zon''.</PARA>
+
</indexterm></PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
  <PARA>This function restricts an object to players above or equal to
 +
a certain level.  Any player not at least the level or higher, will
 +
have the damage done as set in the 2nd and 3rd arguments unless none is
 +
set.  Even if no damage is set the object will be removed off of the
 +
players equipment and placed in their inventory.  This restrict works in
 +
the old level system from one to fifty which means if the level restrict
 +
is set higher than fifty no player will be able to wear or use this
 +
object.  This is good if you have objects that only your administrators
 +
should be able to use.  If you want to restrict an object to greater
 +
than level fifty for players you need to use the 'vlevel' restrict.  The
 +
following is the definition of the <ACRONYM>DIL</ACRONYM> as found in ''function.zon''.</PARA>
  
dilbegin ali_restrict
+
<INFORMALEXAMPLE><PROGRAMLISTING>
(max:integer,min:integer,damage:integer,percent:integer,action:string);
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilbegin level_restrict
 +
(lvl:integer,damage:integer,percent:integer,action:string);
  
<PARA>As the definition indicates the first and second arguments are two
+
</PROGRAMLISTING></INFORMALEXAMPLE>
integers.  the first is the max alignment that can wear or use this
 
object and the second is the minimum alignment.  So if we wanted to
 
restrict an item to only good players it would look like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy ali_restrict@function (1000,350,0,25,"");
+
<PARA>As the definition indicates the first argument is an integer.  The
 +
integer for the level restrict can range from 1 to 255.  Thus if we
 +
wanted to make an object that only administrator could wear or use it would
 +
look like this</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
dilcopy level_restrict@function (51, 0,25,"");
  
</VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
</LISTITEM>
;Level restrict
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Level restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players above or equal to
+
</VARLISTENTRY>
a certain level.  Any player not at least the level or higher, will
 
have the damage done as set in the 2nd and 3rd arguments unless none is
 
set.  Even if no damage is set the object will be removed off of the
 
players equipment and placed in their inventory.  This restrict works in
 
the old level system from one to fifty which means if the level restrict
 
is set higher than fifty no player will be able to wear or use this
 
object.  This is good if you have objects that only your administrators
 
should be able to use.  If you want to restrict an object to greater
 
than level fifty for players you need to use the 'vlevel' restrict.  The
 
following is the definition of the <ACRONYM>DIL</ACRONYM> as found in ''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;Virtual Level Restrict
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Virtual Level Restrict Object function</primary>
 +
</indexterm></PARA>
  
dilbegin level_restrict
+
  <PARA>This function restricts an object to players above or equal to
(lvl:integer,damage:integer,percent:integer,action:string);
+
a certain level.  Any player not at least the level or higher, will
 +
have the damage done as set in the 2nd and 3rd arguments unless none is
 +
set.  Even if no damage is set the object will be removed off of the
 +
players equipment and placed in their inventory.  This restrict works in
 +
the new level system from one to infinity.
 +
The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in ''function.zon''.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
 +
dilbegin vlevel_restrict
 +
(lvl:integer,damage:integer,percent:integer,action:string);
  
<PARA>As the definition indicates the first argument is an integer.  The
+
</PROGRAMLISTING></INFORMALEXAMPLE>
integer for the level restrict can range from 1 to 255.  Thus if we
 
wanted to make an object that only administrator could wear or use it would
 
look like this</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>As the definition indicates the first argument is an integer.  The
 +
integer for the level restrict can range from 1 to infinite.  Thus if we
 +
wanted to make an object that only players that have reached the level
 +
of 5000 could wear or use, it would look like this.</PARA>
  
dilcopy level_restrict@function (51, 0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilcopy vlevel_restrict@function (5000, 0,25,"");
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
</LISTITEM>
;Virtual Level Restrict
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Virtual Level Restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players above or equal to
+
</VARLISTENTRY>
a certain level.  Any player not at least the level or higher, will
 
have the damage done as set in the 2nd and 3rd arguments unless none is
 
set.  Even if no damage is set the object will be removed off of the
 
players equipment and placed in their inventory.  This restrict works in
 
the new level system from one to infinity.
 
The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in ''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;Race restrict
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Race restrict Object function</primary>
 +
</indexterm></PARA>
  
dilbegin vlevel_restrict
+
  <PARA>This function restricts an object from players of a certain
(lvl:integer,damage:integer,percent:integer,action:string);
+
race. Any player not of the selected race, will have the damage done as set
 +
in the 2nd and 3rd arguments unless none is set.  Even if no damage is
 +
set the object will be removed off of the players equipment and placed
 +
in their inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found
 +
in ''function.zon''.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first argument is an integer.  The
+
dilbegin race_restrict
integer for the level restrict can range from 1 to infinite.  Thus if we
+
(rc:integer,damage:integer,percent:integer,action:string);
wanted to make an object that only players that have reached the level
 
of 5000 could wear or use, it would look like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilcopy vlevel_restrict@function (5000, 0,25,"");
+
<PARA>As the definition indicates the first argument is an integer.  The
 +
integer being passed in should be the race you want to restrict the
 +
object from.  You can pass in the defines as listed in <xref
 +
linkend="app-c"> or if you have added races you will find the list of
 +
races in ''values.h''.  If we wanted to restrict an
 +
object from humans the following is what it would look like.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
 +
dilcopy race_restrict@function (RACE_HUMAN,0,25,"");
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</VARLISTENTRY>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;Race restrict
+
;Gender restrict
<DICTDEF>
+
<DICTDEF>
<PARA><indexterm>
+
<PARA><indexterm>
<primary>Race restrict Object function</primary>
+
<primary>Gender restrict Object function</primary>
</indexterm></PARA>
+
</indexterm></PARA>
  
  <PARA>This function restricts an object from players of a certain
+
  <PARA>This function restricts an object to players of a certain
race. Any player not of the selected race, will have the damage done as set
+
gender. Anyone not of the gender, will have the damage done as set in the
in the 2nd and 3rd arguments unless none is set.  Even if no damage is
+
2nd and 3rd arguments unless none is set.  Even if no damage is set the
set the object will be removed off of the players equipment and placed
+
object will be removed off of the players equipment and placed in their
in their inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found
+
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
in ''function.zon''.</PARA>
+
''function.zon''.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilbegin race_restrict
+
dilbegin sex_restrict
(rc:integer,damage:integer,percent:integer,action:string);
+
(sx:integer,damage:integer,percent:integer,action:string);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>As the definition indicates the first argument is an integer.  The
+
<PARA>As the definition indicates the first argument is an integer.  The
integer being passed in should be the race you want to restrict the
+
integer you should pass in is one of the defines from
object from.  You can pass in the defines as listed in <xref
+
''vme.h''.  The gender defines are as follows.</PARA>
linkend="app-c"> or if you have added races you will find the list of
 
races in ''values.h''.  If we wanted to restrict an
 
object from humans the following is what it would look like.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilcopy race_restrict@function (RACE_HUMAN,0,25,"");
+
#define SEX_NEUTRAL  0
 +
#define SEX_MALE      1
 +
#define SEX_FEMALE    2
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</LISTITEM>
+
<PARA>If we wanted to make an item that could only be worn by a female
</VARLISTENTRY>
+
player, it would look like this.</PARA>
  
<VARLISTENTRY>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
;Gender restrict
 
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Gender restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players of a certain
+
dilcopy sex_restrict (SEX_FEMALE,0,25,"");
gender.  Anyone not of the gender, will have the damage done as set in the
 
2nd and 3rd arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.  The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilbegin sex_restrict
+
</LISTITEM>
(sx:integer,damage:integer,percent:integer,action:string);
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</VARLISTENTRY>
  
<PARA>As the definition indicates the first argument is an integer.  The
+
<VARLISTENTRY>
integer you should pass in is one of the defines from
+
;Player restrict
''vme.h''.  The gender defines are as follows.</PARA>
+
<DICTDEF>                     
 +
<PARA><indexterm>
 +
<primary>Player restrict Object function</primary>
 +
</indexterm></PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
  <PARA>This function restricts an object to players who have a
 +
specific name. Any player of the wrong name, will have the damage done as set in the 2nd and 3rd arguments unless
 +
none is set.  Even if no damage is set the object will be removed off of
 +
the players equipment and placed in their inventory.  The following is
 +
the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
#define SEX_NEUTRAL  0
+
<INFORMALEXAMPLE><PROGRAMLISTING>
#define SEX_MALE      1
 
#define SEX_FEMALE    2
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilbegin ply_restrict
 +
(pname:string,damage:integer,percent:integer,action:string);
  
<PARA>If we wanted to make an item that could only be worn by a female
+
</PROGRAMLISTING></INFORMALEXAMPLE>
player, it would look like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>As the definition indicates the first argument is a string.  The
 +
quest restrict is only made to restrict the quest to one person at a
 +
time.  While this <ACRONYM>DIL</ACRONYM> was designed to be put on when a player receives a
 +
quest item and thus was made to be dilcopied in a <ACRONYM>DIL</ACRONYM> you can still put
 +
it on when you first create the object if you are making special items
 +
for administrators or players that you know in advance.  If you want more
 +
information about copying a <ACRONYM>DIL</ACRONYM> from with in another <ACRONYM>DIL</ACRONYM> you will have
 +
to read the <ACRONYM>DIL</ACRONYM> manual If however you want to restrict this to a single
 +
player at compile time of your zone it would look something like
 +
this.</PARA>
  
dilcopy sex_restrict (SEX_FEMALE,0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilcopy ply_restrict@function ("Whistler",0,25,"");
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</VARLISTENTRY>
+
</LISTITEM>
  
<VARLISTENTRY>
+
</VARLISTENTRY>
;Player restrict
 
<DICTDEF>                     
 
<PARA><indexterm>
 
<primary>Player restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object to players who have a
+
<VARLISTENTRY>
specific name. Any player of the wrong name, will have the damage done as set in the 2nd and 3rd arguments unless
+
;Ability restrict
none is set.  Even if no damage is set the object will be removed off of
+
<DICTDEF>
the players equipment and placed in their inventory.  The following is
+
<PARA><indexterm>
the definition of the <ACRONYM>DIL</ACRONYM> as found in
+
<primary>Ability restrict Object function</primary>
''function.zon''.</PARA>
+
</indexterm></PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
  <PARA>This function restricts an object from a player with less than
 +
a certain amount of a certain ability. Any player not having the correct
 +
amount of a certain ability, will have the damage done as set in the 3nd
 +
and 4th arguments unless none is set.  Even if no damage is set the
 +
object will be removed off of the players equipment and placed in their
 +
inventory.</PARA>
  
dilbegin ply_restrict
+
<PARA>We said at the beginning of this section that all restricts have
(pname:string,damage:integer,percent:integer,action:string);
+
only 4 arguments.  This was a bit of a lie since this restrict has five
 +
arguments.  The reason we didn't count this one is because the first and
 +
second argument in the ability restrict function are used together and
 +
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first argument is a string.  The
+
dilbegin abi_restrict
quest restrict is only made to restrict the quest to one person at a
+
(abi:integer,min_abi:integer,damage:integer,percent:integer,action:string);
time.  While this <ACRONYM>DIL</ACRONYM> was designed to be put on when a player receives a
 
quest item and thus was made to be dilcopied in a <ACRONYM>DIL</ACRONYM> you can still put
 
it on when you first create the object if you are making special items
 
for administrators or players that you know in advance.  If you want more
 
information about copying a <ACRONYM>DIL</ACRONYM> from with in another <ACRONYM>DIL</ACRONYM> you will have
 
to read the <ACRONYM>DIL</ACRONYM> manual If however you want to restrict this to a single
 
player at compile time of your zone it would look something like
 
this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilcopy ply_restrict@function ("Whistler",0,25,"");
+
<PARA>As the definition indicates the first and second arguments are two
 +
integers.  the first is the ability type and the second is the amount of
 +
that ability the player needs to have or greater to wear or use the
 +
item.  the ability types can be found in ''vme.h'' and
 +
are listed here for convenience.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</LISTITEM>
+
#define ABIL_MAG              0
 +
#define ABIL_DIV              1
 +
#define ABIL_STR              2
 +
#define ABIL_DEX              3
 +
#define ABIL_CON              4
 +
#define ABIL_CHA              5
 +
#define ABIL_BRA              6
 +
#define ABIL_HP                7
  
</VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
<PARA>If you wanted to restrict an object to people having more than 50%
;Ability restrict
+
strength it would look like this:</PARA>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Ability restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object from a player with less than
+
<INFORMALEXAMPLE><PROGRAMLISTING>
a certain amount of a certain ability. Any player not having the correct
 
amount of a certain ability, will have the damage done as set in the 3nd
 
and 4th arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.</PARA>
 
  
<PARA>We said at the beginning of this section that all restricts have
+
dilcopy abi_restrict@function (ABIL_STR,50,0,25,"");
only 4 arguments.  This was a bit of a lie since this restrict has five
 
arguments.  The reason we didn't count this one is because the first and
 
second argument in the ability restrict function are used together and
 
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilbegin abi_restrict
+
<PARA>If you want to restrict an object to more than one ability you
(abi:integer,min_abi:integer,damage:integer,percent:integer,action:string);
+
only need to add another restrict to the item.  For example if you
 +
wanted to restrict it to people having greater than or equal to 50%
 +
divine and 30% brain.  The item would have these two lines.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first and second arguments are two
+
dilcopy abi_restrict@function (ABIL_DIV,50,0,25,"");
integers.  the first is the ability type and the second is the amount of
+
dilcopy abi_restrict@function (ABIL_BRA,30,0,25,"");
that ability the player needs to have or greater to wear or use the
 
item.  the ability types can be found in ''vme.h'' and
 
are listed here for convenience.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
  
#define ABIL_MAG              0
+
</LISTITEM>
#define ABIL_DIV              1
+
</VARLISTENTRY>
#define ABIL_STR              2
 
#define ABIL_DEX              3
 
#define ABIL_CON              4
 
#define ABIL_CHA              5
 
#define ABIL_BRA              6
 
#define ABIL_HP                7
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;Skill restrict
 +
<DICTDEF>
 +
<PARA><indexterm>
 +
<primary>Skill restrict Object function</primary>
 +
</indexterm></PARA>
  
<PARA>If you wanted to restrict an object to people having more than 50%
+
  <PARA>This function restricts an object from a player with less than
strength it would look like this:</PARA>
+
a certain amount of a certain skill. Any player not having the correct
 +
amount of a certain skill, will have the damage done as set in the 3nd
 +
and 4th arguments unless none is set.  Even if no damage is set the
 +
object will be removed off of the players equipment and placed in their
 +
inventory.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>We said at the beginning of this section that all restricts have
 +
only 4 arguments.  This was a bit of a lie since this restrict has five
 +
arguments.  The reason we didn't count this one is because the first and
 +
second argument in the skill restrict function are used together and
 +
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
dilcopy abi_restrict@function (ABIL_STR,50,0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilbegin ski_restrict
 +
(ski:integer,min_ski:integer,damage:integer,percent:integer,action:string);
  
<PARA>If you want to restrict an object to more than one ability you
+
</PROGRAMLISTING></INFORMALEXAMPLE>
only need to add another restrict to the item.  For example if you
 
wanted to restrict it to people having greater than or equal to 50%
 
divine and 30% brain.  The item would have these two lines.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>As the definition indicates the first and second arguments are two
 +
integers.  the first is the skill and the second is the amount of
 +
that skill the player needs to have or greater to wear or use the
 +
item.  the skills can be found in <xref linkend="app-g"> and
 +
''values.h''. We have also included the first five skills
 +
here for convenience in explaining how the function works.</PARA>
  
dilcopy abi_restrict@function (ABIL_DIV,50,0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
dilcopy abi_restrict@function (ABIL_BRA,30,0,25,"");
 
  
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
+
#define SKI_TURN_UNDEAD        0
 +
#define SKI_SCROLL_USE        1
 +
#define SKI_WAND_USE          2
 +
#define SKI_CONSIDER          3
 +
#define SKI_DIAGNOSTICS        4
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>If you wanted to restrict an object to people having more than 50%
;Skill restrict
+
'turn undead' it would look like this:</PARA>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Skill restrict Object function</primary>
 
</indexterm></PARA>
 
  
  <PARA>This function restricts an object from a player with less than
+
<INFORMALEXAMPLE><PROGRAMLISTING>
a certain amount of a certain skill. Any player not having the correct
 
amount of a certain skill, will have the damage done as set in the 3nd
 
and 4th arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.</PARA>
 
  
<PARA>We said at the beginning of this section that all restricts have
+
dilcopy ski_restrict@function (ASKI_TURN_UNDEAD,50,0,25,"");
only 4 arguments.  This was a bit of a lie since this restrict has five
 
arguments.  The reason we didn't count this one is because the first and
 
second argument in the skill restrict function are used together and
 
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilbegin ski_restrict
+
<PARA>If you want to restrict an object to more than one skill you
(ski:integer,min_ski:integer,damage:integer,percent:integer,action:string);
+
only need to add another restrict to the item.  For example if you
 +
wanted to restrict it to people having greater than or equal to 50%
 +
in 'turn undead' and 30% in 'scroll use'.  The item would have these two lines.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first and second arguments are two
+
dilcopy ski_restrict@function (SKI_TURN_UNDEAD,50,0,25,"");
integers.  the first is the skill and the second is the amount of
+
dilcopy ski_restrict@function (SKI_SCROLL_USE,30,0,25,"");
that skill the player needs to have or greater to wear or use the
 
item.  the skills can be found in <xref linkend="app-g"> and
 
''values.h''. We have also included the first five skills
 
here for convenience in explaining how the function works.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
  
#define SKI_TURN_UNDEAD        0
+
</VARLISTENTRY>
#define SKI_SCROLL_USE        1
 
#define SKI_WAND_USE          2
 
#define SKI_CONSIDER          3
 
#define SKI_DIAGNOSTICS        4
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;Spell restrict
 +
<DICTDEF>
  
<PARA>If you wanted to restrict an object to people having more than 50%
+
  <PARA>This function restricts an object from a player with less than
'turn undead' it would look like this:</PARA>
+
a certain amount of a certain spell. Any player not having the correct
 +
amount of a certain spell, will have the damage done as set in the 3nd
 +
and 4th arguments unless none is set.  Even if no damage is set the
 +
object will be removed off of the players equipment and placed in their
 +
inventory.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>We said at the beginning of this section that all restricts have
 +
only 4 arguments.  This was a bit of a lie since this restrict has five
 +
arguments.  The reason we didn't count this one is because the first and
 +
second argument in the spell restrict function are used together and
 +
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
dilcopy ski_restrict@function (ASKI_TURN_UNDEAD,50,0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilbegin sp_restrict
 +
(spl:integer,min_sp:integer,damage:integer,percent:integer,action:string);
  
<PARA>If you want to restrict an object to more than one skill you
+
</PROGRAMLISTING></INFORMALEXAMPLE>
only need to add another restrict to the item.  For example if you
 
wanted to restrict it to people having greater than or equal to 50%
 
in 'turn undead' and 30% in 'scroll use'.  The item would have these two lines.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>As the definition indicates the first and second arguments are two
 +
integers.  the first is the spell and the second is the amount of
 +
that spell the player needs to have or greater to wear or use the
 +
item.  the spells can be found in <xref linkend="app-h"> and
 +
''values.h''. We have also included the first five
 +
spells here for convenience in explaining how the function works.</PARA>
  
dilcopy ski_restrict@function (SKI_TURN_UNDEAD,50,0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
dilcopy ski_restrict@function (SKI_SCROLL_USE,30,0,25,"");
 
  
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
+
#define SPL_LOCK              52
</LISTITEM>
+
#define SPL_UNLOCK            53
 +
#define SPL_DROWSE            54
 +
#define SPL_SLOW              55
 +
#define SPL_DUST_DEVIL        56
  
</VARLISTENTRY>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
<PARA>If you wanted to restrict an object to people having more than 50%
;Spell restrict
+
'lock' spell, it would look like this:</PARA>
<DICTDEF>
 
  
  <PARA>This function restricts an object from a player with less than
+
<INFORMALEXAMPLE><PROGRAMLISTING>
a certain amount of a certain spell. Any player not having the correct
 
amount of a certain spell, will have the damage done as set in the 3nd
 
and 4th arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.</PARA>
 
  
<PARA>We said at the beginning of this section that all restricts have
+
dilcopy sp_restrict@function (ASPL_LOCK,50,0,25,"");
only 4 arguments.  This was a bit of a lie since this restrict has five
 
arguments.  The reason we didn't count this one is because the first and
 
second argument in the spell restrict function are used together and
 
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
dilbegin sp_restrict
+
<PARA>If you want to restrict an object to more than one spell you
(spl:integer,min_sp:integer,damage:integer,percent:integer,action:string);
+
only need to add another restrict to the item.  For example if you
 +
wanted to restrict it to people having greater than or equal to 50%
 +
in 'lock' and 30% in 'unlock' spells.  The item would have these two lines.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>As the definition indicates the first and second arguments are two
+
dilcopy sp_restrict@function (SPL_LOCK,50,0,25,"");
integers.  the first is the spell and the second is the amount of
+
dilcopy SPL_restrict@function (SPL_LOCK,30,0,25,"");
that spell the player needs to have or greater to wear or use the
 
item.  the spells can be found in <xref linkend="app-h"> and
 
''values.h''. We have also included the first five
 
spells here for convenience in explaining how the function works.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
#define SPL_LOCK              52
+
<VARLISTENTRY>
#define SPL_UNLOCK            53
+
;Weapon restrict
#define SPL_DROWSE            54
+
<DICTDEF>
#define SPL_SLOW              55
+
<PARA><indexterm>
#define SPL_DUST_DEVIL        56
+
<primary>Weapon restrict Object function</primary>
 +
</indexterm></PARA>
 +
  <PARA>This function restricts an object from a player with less than
 +
a certain amount of a certain weapon. Any player not having the correct
 +
amount of a certain weapon, will have the damage done as set in the 3nd
 +
and 4th arguments unless none is set.  Even if no damage is set the
 +
object will be removed off of the players equipment and placed in their
 +
inventory.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>We said at the beginning of this section that all restricts have
 +
only 4 arguments.  This was a bit of a lie since this restrict has five
 +
arguments.  The reason we didn't count this one is because the first and
 +
second argument in the weapon restrict function are used together and
 +
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 +
''function.zon''.</PARA>
  
<PARA>If you wanted to restrict an object to people having more than 50%
+
<INFORMALEXAMPLE><PROGRAMLISTING>
'lock' spell, it would look like this:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilbegin weap_restrict
 +
(wpn:integer,min_wpn:integer,damage:integer,percent:integer,action:string);
  
dilcopy sp_restrict@function (ASPL_LOCK,50,0,25,"");
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>As the definition indicates the first and second arguments are two
 +
integers.  the first is the weapon and the second is the amount of
 +
that weapon the player needs to have or greater to wear or use the
 +
item.  the weapons can be found in <xref linkend="app-d"> and
 +
''values.h''. We have also included the first five
 +
weapons here for convenience in explaining how the function works.</PARA>
  
<PARA>If you want to restrict an object to more than one spell you
+
<INFORMALEXAMPLE><PROGRAMLISTING>
only need to add another restrict to the item.  For example if you
 
wanted to restrict it to people having greater than or equal to 50%
 
in 'lock' and 30% in 'unlock' spells.  The item would have these two lines.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
#define WPN_BATTLE_AXE    7  /* Two Handed */
 +
#define WPN_HAND_AXE      8
 +
#define WPN_WAR_MATTOCK  9  /* Two Handed */
 +
#define WPN_WAR_HAMMER  10
 +
#define WPN_GREAT_SWORD  11  /* Two Handed */
  
dilcopy sp_restrict@function (SPL_LOCK,50,0,25,"");
 
dilcopy SPL_restrict@function (SPL_LOCK,30,0,25,"");
 
  
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<PARA>If you wanted to restrict an object to people having more than 50%
;Weapon restrict
+
'battle axe', it would look like this:</PARA>
<DICTDEF>
 
<PARA><indexterm>
 
<primary>Weapon restrict Object function</primary>
 
</indexterm></PARA>
 
  <PARA>This function restricts an object from a player with less than
 
a certain amount of a certain weapon. Any player not having the correct
 
amount of a certain weapon, will have the damage done as set in the 3nd
 
and 4th arguments unless none is set.  Even if no damage is set the
 
object will be removed off of the players equipment and placed in their
 
inventory.</PARA>
 
  
<PARA>We said at the beginning of this section that all restricts have
+
<INFORMALEXAMPLE><PROGRAMLISTING>
only 4 arguments.  This was a bit of a lie since this restrict has five
 
arguments.  The reason we didn't count this one is because the first and
 
second argument in the weapon restrict function are used together and
 
thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in
 
''function.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilcopy weap_restrict@function (WPN_BATTLE_AXE,50,0,25,"");
  
dilbegin weap_restrict
+
</PROGRAMLISTING></INFORMALEXAMPLE>
(wpn:integer,min_wpn:integer,damage:integer,percent:integer,action:string);
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>If you want to restrict an object to more than one weapon you
 +
only need to add another restrict to the item.  For example if you
 +
wanted to restrict it to people having greater than or equal to 50%
 +
in 'hand axe' and 30% in 'battle axe' spells.  The item would have these two lines.</PARA>
  
<PARA>As the definition indicates the first and second arguments are two
+
<INFORMALEXAMPLE><PROGRAMLISTING>
integers.  the first is the weapon and the second is the amount of
 
that weapon the player needs to have or greater to wear or use the
 
item.  the weapons can be found in <xref linkend="app-d"> and
 
''values.h''. We have also included the first five
 
weapons here for convenience in explaining how the function works.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilcopy weap_restrict@function (WPN_HAND_AXE,50,0,25,"");
 +
dilcopy weap_restrict@function (WPN_BATTLE_AXE,30,0,25,"");
  
#define WPN_BATTLE_AXE    7  /* Two Handed */
+
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
#define WPN_HAND_AXE      8
+
</LISTITEM>
#define WPN_WAR_MATTOCK  9  /* Two Handed */
 
#define WPN_WAR_HAMMER  10
 
#define WPN_GREAT_SWORD  11  /* Two Handed */
 
  
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</VARIABLELIST>
  
<PARA>If you wanted to restrict an object to people having more than 50%
+
</sect2>
'battle axe', it would look like this:</PARA>
+
<sect2 id="objdiltuborg">
 +
<TITLE>Tuborg function</TITLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>What game would be complete with out the Denmark water!  With that
 +
in mind the <ACRONYM>VME</ACRONYM> 2.0 has a tuborg function that makes a drink give
 +
endurance and health when drank.  The function is defined in
 +
''function.zon'' as follows:</PARA>
  
dilcopy weap_restrict@function (WPN_BATTLE_AXE,50,0,25,"");
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
dilbegin tuborg (s:string);
  
<PARA>If you want to restrict an object to more than one weapon you
+
</PROGRAMLISTING></INFORMALEXAMPLE>
only need to add another restrict to the item.  For example if you
 
wanted to restrict it to people having greater than or equal to 50%
 
in 'hand axe' and 30% in 'battle axe' spells.  The item would have these two lines.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>As the definition indicates the tuborg function only has one
 +
argument.  The real surprise is that the argument is not used yet in the
 +
<ACRONYM>DIL</ACRONYM> so no matter what you set it to it doesn't matter.  In the future
 +
this argument is going to allow different kinds of tuborgs to be made
 +
but for now its just a place holder and all that is needed is a set of
 +
double quotes.</PARA>
  
dilcopy weap_restrict@function (WPN_HAND_AXE,50,0,25,"");
+
<PARA>To create a tuborg you just add the following line to your drink
dilcopy weap_restrict@function (WPN_BATTLE_AXE,30,0,25,"");
+
container.</PARA>
  
                                                    </PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
</LISTITEM>
 
  
</VARLISTENTRY>
+
dilcopy tuborg@function ("");
  
</VARIABLELIST>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</sect2>
  
</sect2>
+
<sect2 id="objdilboard">
<sect2 id="objdiltuborg">
+
<TITLE>Message board</TITLE>
<TITLE>Tuborg function</TITLE>
 
  
<PARA>What game would be complete with out the Denmark water! With that
+
<PARA>Every game needs a way for Administrators and players to exchange
in mind the <ACRONYM>VME</ACRONYM> 2.0 has a tuborg function that makes a drink give
+
ideas.  The message boards have been designed for this purpose. The
endurance and health when drank.  The function is defined in
+
boards function can be easy to use or more difficult depending on what
''function.zon'' as follows:</PARA>
+
all you want them to do.  The board function is defined in
 +
''boards.zon'' as follows.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
dilbegin tuborg (s:string);
+
dilbegin board
 +
(idxfile:string,l_res:string,r_res:string,p_res:string,bmax:integer);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>As the definition indicates the tuborg function only has one
+
<PARA>This looks pretty hard I know but to make a normal board we have
argumentThe real surprise is that the argument is not used yet in the
+
made it as simple as possible while allowing for the boards to be used
<ACRONYM>DIL</ACRONYM> so no matter what you set it to it doesn't matterIn the future
+
in almost any situationAfter you make your first board it is pretty
this argument is going to allow different kinds of tuborgs to be made
+
much block and copy and change the first argument.  The arguments are as
but for now its just a place holder and all that is needed is a set of
+
follows:</PARA>
double quotes.</PARA>
 
  
<PARA>To create a tuborg you just add the following line to your drink
+
<VARIABLELIST>
container.</PARA>
+
<VARLISTENTRY>
 +
;idxfile
 +
<DICTDEF>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The first argument is the board index filename.  It tells the
 +
board <ACRONYM>DIL</ACRONYM> what name to store the board under so if you create more
 +
boards with the same name they will all be pointing to the same
 +
messages.  You can put any legal symbolic name in this string and it
 +
will work with no problems.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
dilcopy tuborg@function ("");
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
</sect2>
+
;l_res
 +
<DICTDEF>
  
<sect2 id="objdilboard">
+
<PARA>the second argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to
<TITLE>Message board</TITLE>
+
see if the player looking at the board is allowed to.  This requires
 +
some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the
 +
''boards.zon''.</PARA>
  
<PARA>Every game needs a way for Administrators and players to exchange
+
<INFORMALEXAMPLE><PROGRAMLISTING>
ideas.  The message boards have been designed for this purpose.  The
 
boards function can be easy to use or more difficult depending on what
 
all you want them to do.  The board function is defined in
 
''boards.zon'' as follows.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
//used to restrict players access to a board
 +
dilbegin string admin_res (u:unitptr,v:unitptr);
  
dilbegin board
+
//used to restrict non-admin from removing posts
(idxfile:string,l_res:string,r_res:string,p_res:string,bmax:integer);
+
dilbegin string rem_res (u:unitptr, v:unitptr);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>This looks pretty hard I know but to make a normal board we have
+
<PARA>So with the 'admin_res' you could do something like
made it as simple as possible while allowing for the boards to be used
+
this:</PARA>
in almost any situation.  After you make your first board it is pretty
+
<INFORMALEXAMPLE><PROGRAMLISTING>
much block and copy and change the first argument.  The arguments are as
 
follows:</PARA>
 
  
<VARIABLELIST>
+
dilcopy board@boards ("wizbrd","admin_res@boards"...);
<VARLISTENTRY>
 
;idxfile
 
<DICTDEF>
 
  
<PARA>The first argument is the board index filename.  It tells the
+
</PROGRAMLISTING></INFORMALEXAMPLE>
board <ACRONYM>DIL</ACRONYM> what name to store the board under so if you create more
 
boards with the same name they will all be pointing to the same
 
messages.  You can put any legal symbolic name in this string and it
 
will work with no problems.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
<PARA>Putting the 'admin_res' function in the second argument would make
 +
it so only administrators could look at the board.  If you put an empty
 +
string or two double quotes as the argument it will let anyone look at
 +
the board.</PARA>
  
<VARLISTENTRY>
+
</LISTITEM>
;l_res
+
</VARLISTENTRY>
<DICTDEF>
 
  
<PARA>the second argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to
 
see if the player looking at the board is allowed to.  This requires
 
some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the
 
''boards.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;r_res
 +
<DICTDEF>
 +
<PARA>the third argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to
 +
see if the player trying to remove a post at the board is allowed to.  This requires
 +
some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the
 +
''boards.zon''</PARA>
  
//used to restrict players access to a board
+
<INFORMALEXAMPLE><PROGRAMLISTING>
dilbegin string admin_res (u:unitptr,v:unitptr);
 
  
//used to restrict non-admin from removing posts
+
//used to restrict players access to a board
dilbegin string rem_res (u:unitptr, v:unitptr);
+
dilbegin string admin_res (u:unitptr,v:unitptr);
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//used to restrict non-admin from removing posts
 +
dilbegin string rem_res (u:unitptr, v:unitptr);
  
<PARA>So with the 'admin_res' you could do something like
 
this:</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy board@boards ("wizbrd","admin_res@boards"...);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>So with the 'rem_res' you could do something like
 +
this:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Putting the 'admin_res' function in the second argument would make
+
dilcopy board@boards ("citizen","","rem_res@boards",...);
it so only administrators could look at the board. If you put an empty
 
string or two double quotes as the argument it will let anyone look at
 
the board.</PARA>
 
  
</LISTITEM>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</VARLISTENTRY>
 
  
 +
<PARA>With the 'rem_res' in the third argument only administrators can
 +
now remove from this board but anyone can look at it because of the empty
 +
string in the second argument.  Putting an empty string in the third
 +
argument will make it so anyone can remove from this board.</PARA>
  
<VARLISTENTRY>
+
</LISTITEM>
;r_res
+
</VARLISTENTRY>
<DICTDEF>
 
<PARA>the third argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to
 
see if the player trying to remove a post at the board is allowed to.  This requires
 
some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the
 
''boards.zon''</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
//used to restrict players access to a board
+
<VARLISTENTRY>
dilbegin string admin_res (u:unitptr,v:unitptr);
+
;p_res
 +
<DICTDEF>
  
//used to restrict non-admin from removing posts
+
<PARA>the forth argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to
dilbegin string rem_res (u:unitptr, v:unitptr);
+
see if the player trying to post at the board is allowed to.  This requires
 +
some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the
 +
''boards.zon''.</PARA>
  
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
//used to restrict players access to a board
 +
dilbegin string admin_res (u:unitptr,v:unitptr);
  
<PARA>So with the 'rem_res' you could do something like
+
//used to restrict non-admin from removing posts
this:</PARA>
+
dilbegin string rem_res (u:unitptr, v:unitptr);
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy board@boards ("citizen","","rem_res@boards",...);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>As you can see we haven't made a post restriction <ACRONYM>DIL</ACRONYM> because as of
 +
yet we haven't found a need for one.  If you have a need for one just
 +
look over the two restrict DIL functions we have already mentioned and you will
 +
find it is really easy to make.  We want to allow anyone to post so our
 +
dilcopy looks like this:</PARA>
  
<PARA>With the 'rem_res' in the third argument only administrators can
+
<INFORMALEXAMPLE><PROGRAMLISTING>
now remove from this board but anyone can look at it because of the empty
 
string in the second argument.  Putting an empty string in the third
 
argument will make it so anyone can remove from this board.</PARA>
 
  
</LISTITEM>
+
dilcopy board@boards ("citizen","","rem_res@boards","",...);
</VARLISTENTRY>
 
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARLISTENTRY>
+
<PARA>With the 'rem_res' in the third argument only administrators can
;p_res
+
now remove from this board but anyone can post to it because of the empty
  <DICTDEF>
+
string in the forth argument. The empty string again in the second
 +
argument also allows everyone to look at the board.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>the forth argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to
 
see if the player trying to post at the board is allowed to.  This requires
 
some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the
 
''boards.zon''.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARLISTENTRY>
 +
;max
 +
<DICTDEF>
 +
<PARA>The fifth argument is simply the amount of posts that you want to
 +
allow to be posted before the board is full.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
//used to restrict players access to a board
+
<PARA>To make a free for all board where everyone can post, remove
dilbegin string admin_res (u:unitptr,v:unitptr);
+
posts, look at what posts are on the board, and have a max of 50 posts it would simply be as
 +
follows:</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
//used to restrict non-admin from removing posts
+
dilcopy board@boards("citizen","","","",50);
dilbegin string rem_res (u:unitptr, v:unitptr);
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>As you can see we haven't made a post restriction <ACRONYM>DIL</ACRONYM> because as of
+
<PARA>When making a board for players to post concerns to the
yet we haven't found a need for one.  If you have a need for one just
+
administrators and only have the administrators be able to remove them,
look over the two restrict DIL functions we have already mentioned and you will
+
wile still allowing everyone to read them it would look like
find it is really easy to make.  We want to allow anyone to post so our
+
this.</PARA>
dilcopy looks like this:</PARA>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
dilcopy board@boards("citizen","","rem_res@boards","",100);
  
dilcopy board@boards ("citizen","","rem_res@boards","",...);
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</sect2>
 +
</sect1>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>With the 'rem_res' in the third argument only administrators can
+
<sect1 id="objcomplex">
now remove from this board but anyone can post to it because of the empty
+
<TITLE>More complex objects</TITLE>
string in the forth argument.  The empty string again in the second
 
argument also allows everyone to look at the board.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
 +
<PARA>In the last sections you learned all the fields and how to make a
 +
basic object. In this section we will use the information from the last
 +
sections to create some more unique objects for our dragon station zone
 +
There is not a lot of new information here we will be using the DIL functions,
 +
fields, and flags to make objects we have only mentioned before.</PARA>
  
<VARLISTENTRY>
+
<sect2 id="objboard">
;max
+
<TITLE>Making a communication board</TITLE>
<DICTDEF>
 
<PARA>The fifth argument is simply the amount of posts that you want to
 
allow to be posted before the board is full.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
<PARA>To make a free for all board where everyone can post, remove
+
<PARA>In <xref linkend="objdilboard"> you learned all there you need to
posts, look at what posts are on the board, and have a max of 50 posts it would simply be as
+
know about the boards <ACRONYM>DIL</ACRONYM> to create a board.  In this small section we
follows:</PARA>
+
are going to show you the rest of a board and what a finished one looks
<INFORMALEXAMPLE><PROGRAMLISTING>
+
like.</PARA>
  
dilcopy board@boards("citizen","","","",50);
+
<PARA>As with all objects the first step is to fully describe and name
 +
your board.  We will stick with the space station theme since our goal
 +
is to have a complete example zone for you.  The boards symbolic, names, title,
 +
description and extra turned out like this.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>When making a board for players to post concerns to the
+
info_board
administrators and only have the administrators be able to remove them,
 
wile still allowing everyone to read them it would look like
 
this.</PARA>
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
dilcopy board@boards("citizen","","rem_res@boards","",100);
+
title "a merchant information board"
 +
descr "A merchant information Board is mounted on a wall here."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
names {"merchant information board","information board","merchant
</sect2>
+
board","board"}
</sect1>
 
  
 +
extra {} "A large flashy black steal board."
  
<sect1 id="objcomplex">
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>More complex objects</TITLE>
 
  
<PARA>In the last sections you learned all the fields and how to make a
+
<PARA>Just incase the <ACRONYM>VME</ACRONYM> server we have has a spell that can damage
basic object. In this section we will use the information from the last
+
inanimate objects we will give this board a material type.</PARA>
sections to create some more unique objects for our dragon station zone
 
There is not a lot of new information here we will be using the DIL functions,
 
fields, and flags to make objects we have only mentioned before.</PARA>
 
  
<sect2 id="objboard">
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>Making a communication board</TITLE>
 
  
<PARA>In <xref linkend="objdilboard"> you learned all there you need to
+
MATERIAL_METAL("A very fine quality black steel")
know about the boards <ACRONYM>DIL</ACRONYM> to create a board.  In this small section we
 
are going to show you the rest of a board and what a finished one looks
 
like.</PARA>
 
  
<PARA>As with all objects the first step is to fully describe and name
+
</PROGRAMLISTING></INFORMALEXAMPLE>
your board.  We will stick with the space station theme since our goal
 
is to have a complete example zone for you.  The boards symbolic, names, title,
 
description and extra turned out like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Now for the special stuff for the board.  We need to give the
 +
board a type and copy the board <ACRONYM>DIL</ACRONYM> to it.</PARA>
  
info_board
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
title "a merchant information board"
+
type ITEM_BOARD
descr "A merchant information Board is mounted on a wall here."
+
dilcopy board@boards("info","","rem_res@boards","",100);
  
names {"merchant information board","information board","merchant
+
</PROGRAMLISTING></INFORMALEXAMPLE>
board","board"}
 
  
extra {} "A large flashy black steal board."
+
<PARA>There you go nothing to it you have just created your first board.
 +
Now lets bring it all together and tag on an end symbol and we are all
 +
finished.</PARA>
 +
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
info_board
 +
title "a merchant information board"
 +
descr "A merchant information Board is mounted on a wall here."
 +
names {"merchant information board","information board","merchant
 +
board","board"}
  
<PARA>Just incase the <ACRONYM>VME</ACRONYM> server we have has a spell that can damage
+
extra {}
inanimate objects we will give this board a material type.</PARA>
+
"A large flashy black steal board."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
MATERIAL_METAL("A very fine quality black steel")
 +
type ITEM_BOARD
 +
dilcopy board@boards("info","","rem_res@boards","",100);
  
MATERIAL_METAL("A very fine quality black steel")
+
end
 +
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</sect2>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>Now for the special stuff for the board.  We need to give the
+
<sect2 id="objcontainer">
board a type and copy the board <ACRONYM>DIL</ACRONYM> to it.</PARA>
+
<TITLE>Making a container</TITLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>I thought it would be cool to have a small weapons locker on the
 +
space station not to mention event hough we went over the container
 +
macro in <xref linkend="objmacrocontainer">, we didn't cover everything
 +
you need in fact the macro eaves a few things out because you may or may
 +
not want to set them.</PARA>
  
type ITEM_BOARD
+
<PARA>As with all objects we start right off by describing the item.
dilcopy board@boards("info","","rem_res@boards","",100);
+
There is nothing new here so we will just show it to you and go
 +
on.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>There you go nothing to it you have just created your first board.
+
wpn_locker
Now lets bring it all together and tag on an end symbol and we are all
 
finished.</PARA>
 
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
info_board
+
title "a weapons locker"
title "a merchant information board"
+
names {"weapons locker","weapon locker","locker"}
descr "A merchant information Board is mounted on a wall here."
 
names {"merchant information board","information board","merchant
 
board","board"}
 
  
extra {}
+
descr "a small weapons locker hangs on the wall here."
"A large flashy black steal board."
 
  
MATERIAL_METAL("A very fine quality black steel")
+
extra {}
type ITEM_BOARD
+
"It is an ordinary weapons locker that looks like it holds any illegal
dilcopy board@boards("info","","rem_res@boards","",100);
+
weapons that are taken on the station."
  
end
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</sect2>
 
  
 +
<PARA>Now we need to put in all the information that makes this item a
 +
container that can't be taken but it can be opened and it is
 +
locked.</PARA>
  
<sect2 id="objcontainer">
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<TITLE>Making a container</TITLE>
 
  
<PARA>I thought it would be cool to have a small weapons locker on the
+
manipulate {MANIPULATE_ENTER}
space station not to mention event hough we went over the container
+
CONTAINER_DEF(500)
macro in <xref linkend="objmacrocontainer">, we didn't cover everything
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
you need in fact the macro eaves a few things out because you may or may
+
key black_key
not want to set them.</PARA>
 
  
<PARA>As with all objects we start right off by describing the item.
+
</PROGRAMLISTING></INFORMALEXAMPLE>
There is nothing new here so we will just show it to you and go
 
on.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Notice we didn't make the item 'MANIPULATE_TAKE' because
 +
we don't want people to be able to walk off with our weapons locker.
 +
One final touch and we are all finished with the weapons locker.  It is
 +
always nice to put a material type on your items so a spell or a skill
 +
can tell if you can do anything with them.  So with our material added
 +
in the full locker would look like this.</PARA>
  
wpn_locker
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
title "a weapons locker"
+
wpn_locker
names {"weapons locker","weapon locker","locker"}
 
  
descr "a small weapons locker hangs on the wall here."
+
title "a weapons locker"
 +
names {"weapons locker","weapon locker","locker"}
 +
descr "a small weapons locker hangs on the wall here."
  
extra {}
+
extra {}
"It is an ordinary weapons locker that looks like it holds any illegal
+
"It is an ordinary weapons locker that looks like it holds any illegal
weapons that are taken on the station."
+
weapons that are taken on the station."
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
MATERIAL_METAL("A very fine quality steel")
  
<PARA>Now we need to put in all the information that makes this item a
+
manipulate {MANIPULATE_ENTER}
container that can't be taken but it can be opened and it is
+
CONTAINER_DEF(500)
locked.</PARA>
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 +
key black_key
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
end
  
manipulate {MANIPULATE_ENTER}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
CONTAINER_DEF(500)
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 
key black_key
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<PARA>Notice we didn't make the item 'MANIPULATE_TAKE' because
+
</sect2>
we don't want people to be able to walk off with our weapons locker.
 
One final touch and we are all finished with the weapons locker.  It is
 
always nice to put a material type on your items so a spell or a skill
 
can tell if you can do anything with them.  So with our material added
 
in the full locker would look like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<sect2 id="objdrink">
 +
<TITLE>Creating drinks</TITLE>
  
wpn_locker
+
<PARA>In <xref linkend="objmacroliqcont">, we covered how to set the size and weight of the container and its content but now we need to talk about some other special things about a drink container verses other objects.</PARA>
  
title "a weapons locker"
+
<PARA>The drink container is one of the few objects that has rules on
names {"weapons locker","weapon locker","locker"}
+
how you set the title, description and names fields.  The title and
descr "a small weapons locker hangs on the wall here."
+
description fields should ot have anything to do with the liquid inside
 +
the container.  This means if you have a barrel full of water you do not
 +
put the word water in the title or the description.  In our case we have
 +
a bag full of wine so we do not put wine in either the title or
 +
description.  The reason for this is if the player drinks the bag empty
 +
and then fills it with water and we had put wine in the title or
 +
description it would still be there but the bag would now be full of
 +
water..  Our symbolic, title, and description would then look like
 +
this.</PARA>
  
extra {}
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"It is an ordinary weapons locker that looks like it holds any illegal
 
weapons that are taken on the station."
 
  
MATERIAL_METAL("A very fine quality steel")
+
liq_ration
  
manipulate {MANIPULATE_ENTER}
+
title "a red bag"
CONTAINER_DEF(500)
+
descr "A red bag has been gently placed here."
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 
key black_key
 
  
end
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>The names on the other hand MUST have the drink name as the last
 +
name in the name list.  The reason it must be the last one is when a
 +
player drinks or pours out the liquid the name is removed.  If a player
 +
then refills the container the name of the new liquid is added to the
 +
last name.  The bag we are making is full of wine so our names list would
 +
look like this.</PARA>
  
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</sect2>
+
names {"red bag", "bag", "wine"}
  
<sect2 id="objdrink">
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<TITLE>Creating drinks</TITLE>
 
  
<PARA>In <xref linkend="objmacroliqcont">, we covered how to set the size and weight of the container and its content but now we need to talk about some other special things about a drink container verses other objects.</PARA>
+
<PARA>Now we add the liquid define for wine</PARA>
  
<PARA>The drink container is one of the few objects that has rules on
+
<INFORMALEXAMPLE><PROGRAMLISTING>
how you set the title, description and names fields.  The title and
 
description fields should ot have anything to do with the liquid inside
 
the container.  This means if you have a barrel full of water you do not
 
put the word water in the title or the description.  In our case we have
 
a bag full of wine so we do not put wine in either the title or
 
description.  The reason for this is if the player drinks the bag empty
 
and then fills it with water and we had put wine in the title or
 
description it would still be there but the bag would now be full of
 
water..  Our symbolic, title, and description would then look like
 
this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
LIQ_WINE(1,2,2,0)
  
liq_ration
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
title "a red bag"
+
<PARA>Finally we add the material type for the bag, the cost to buy the
descr "A red bag has been gently placed here."
+
container, an extra players can look at, and finally an identify extra so
 +
if a player casts either the identify or improved identify spell on the
 +
bag they will se it.  with all that added The finished drink container
 +
looks like this.</PARA>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>The names on the other hand MUST have the drink name as the last
+
liq_ration
name in the name list.  The reason it must be the last one is when a
+
names {"red bag", "bag", "wine"}
player drinks or pours out the liquid the name is removed.  If a player
+
title "a red bag"
then refills the container the name of the new liquid is added to the
+
descr "A red bag has been gently placed here."
last name.  The bag we are making is full of wine so our names list would
 
look like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra {}
 +
"A small label reads Tassel Grove's finest.  Year 321"
  
names {"red bag", "bag", "wine"}
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
MATERIAL_ORGANIC("a soft plastic")
 +
manipulate {MANIPULATE_TAKE}
 +
LIQ_WINE(1,2,2,0)
 +
cost 2 IRON_PIECE
  
<PARA>Now we add the liquid define for wine</PARA>
+
extra {"$identify"}
 +
"Its the special wine from Tassel grove a small halfling village on the
 +
planet Valhalla.  It seems like a great vintage wine."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
end
  
LIQ_WINE(1,2,2,0)
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</sect2>
  
<PARA>Finally we add the material type for the bag, the cost to buy the
+
<sect2 id="objfood">
container, an extra players can look at, and finally an identify extra so
+
<TITLE>Creating food</TITLE>
if a player casts either the identify or improved identify spell on the
 
bag they will se it.  with all that added The finished drink container
 
looks like this.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The food is very simple to make its just a regular item with the
 +
macros you learned in <xref linkend="objmacrofood">.  In fact making
 +
food is so simple we almost left it out.  I am only adding this to show
 +
how simple it is to change a regular item like the dragon head we showed
 +
you in <xref linkend="objbasic"> into a food item.  Now only a sick
 +
person would make a dragon head into food but if you wanted to you just
 +
add the 'FOOD_DEF(...)' and your all set.  here is a basic food that you
 +
might find laying around a space station.</PARA>
  
liq_ration
+
<INFORMALEXAMPLE><PROGRAMLISTING>
names {"red bag", "bag", "wine"}
 
title "a red bag"
 
descr "A red bag has been gently placed here."
 
  
extra {}
+
beef_stick
"A small label reads Tassel Grove's finest.  Year 321"
 
  
 +
title "a tough leathery stick"
 +
descr "A tough leathery looking stick is laying here."
 +
names {"tough leathery stick","tough leather stick","leathery stick",
 +
"leather stick","tough stick","stick"}
  
MATERIAL_ORGANIC("a soft plastic")
+
extra {}
manipulate {MANIPULATE_TAKE}
+
"This has the word BEEF burnt into it."
LIQ_WINE(1,2,2,0)
 
cost 2 IRON_PIECE
 
  
extra {"$identify"}
+
manipulate {MANIPULATE_TAKE}
"Its the special wine from Tassel grove a small halfling village on the
+
FOOD_DEF(5,0)
planet Valhalla.  It seems like a great vintage wine."
+
weight 1
 +
cost 1 COPPER_PIECE
 +
MATERIAL_ORGANIC("tough beef")
  
end
+
end
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</sect2>
+
</sect2>
  
<sect2 id="objfood">
+
<sect2 id="objweapon">
<TITLE>Creating food</TITLE>
+
<TITLE>Making a weapon</TITLE>
  
<PARA>The food is very simple to make its just a regular item with the
+
<PARA>Whats a game with out some kind of weapon to chop or bash things
macros you learned in <xref linkend="objmacrofood">.  In fact making
+
into little pieces.  We examined how to set the weapon fields in <xref
food is so simple we almost left it out.  I am only adding this to show
+
linkend="objmacroweapon">, the object transfers in <xref
how simple it is to change a regular item like the dragon head we showed
+
linkend="objmacrotransfers">, and the restriction DIL functions in <xref
you in <xref linkend="objbasic"> into a food item.  Now only a sick
+
linkend="objdilrestrict">.  Now we will pull all we have learned together
person would make a dragon head into food but if you wanted to you just
+
and make a pretty nifty little stiletto.</PARA>
add the 'FOOD_DEF(...)' and your all set.  here is a basic food that you
 
might find laying around a space station.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The first part as with all our example objects is to set up the
 +
symbolic, names, title, description, object extra, and material type.  this is no
 +
different from any other object so here is what we ended up with</PARA>
  
beef_stick
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
title "a tough leathery stick"
+
w_stiletto
descr "A tough leathery looking stick is laying here."
+
title "a stiletto"
names {"tough leathery stick","tough leather stick","leathery stick",
+
names {"stiletto", "dagger"}
"leather stick","tough stick","stick"}
+
descr
 +
"A deadly looking stiletto has been left here."
  
extra {}
+
extra{}
"This has the word BEEF burnt into it."
+
"This looks like a thieves dream come true. "
  
manipulate {MANIPULATE_TAKE}
+
MATERIAL_METAL("A very fine quality steel")
FOOD_DEF(5,0)
 
weight 1
 
cost 1 COPPER_PIECE
 
MATERIAL_ORGANIC("tough beef")
 
  
end
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>Now lets add the defines and DIL functions that make this a special weapon
 +
along with the manipulate flags that makes it able to be wielded.  We will give
 +
it a bonus in magic and good craftsmanship along with a plus in
 +
backstab for all those assassins on the game.</PARA>
  
</sect2>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<sect2 id="objweapon">
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
<TITLE>Making a weapon</TITLE>
+
WEAPON_DEF(WPN_DAGGER, 1, 2)
 +
SKILL_TRANSFER(SKI_BACKSTAB, 2)
 +
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
  
<PARA>Whats a game with out some kind of weapon to chop or bash things
+
</PROGRAMLISTING></INFORMALEXAMPLE>
into little pieces.  We examined how to set the weapon fields in <xref
 
linkend="objmacroweapon">, the object transfers in <xref
 
linkend="objmacrotransfers">, and the restriction DIL functions in <xref
 
linkend="objdilrestrict">.  Now we will pull all we have learned together
 
and make a pretty nifty little stiletto.</PARA>
 
  
<PARA>The first part as with all our example objects is to set up the
+
<PARA>to finish it off we will give the weapon a cost, rent, and finally
symbolic, names, title, description, object extra, and material typethis is no
+
two identifies for the two identify spellsNow that we have it all
different from any other object so here is what we ended up with</PARA>
+
defined we pull it together and it looks like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
w_stiletto
+
w_stiletto
title "a stiletto"
+
title "a stiletto"
names {"stiletto", "dagger"}
+
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
descr
+
descr
"A deadly looking stiletto has been left here."
+
"A deadly looking stiletto has been left here."
  
extra{}
+
extra{}
"This looks like a thieves dream come true. "
+
"This looks like a thieves dream come true. "
  
MATERIAL_METAL("A very fine quality steel")
+
MATERIAL_METAL("A very fine quality steel")
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
 +
WEAPON_DEF(WPN_DAGGER, 1, 2)
 +
SKILL_TRANSFER(SKI_BACKSTAB, 2)
 +
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
 +
weight 2
 +
cost 2 GOLD_PIECE
 +
rent 1 COPPER_PIECE
  
<PARA>Now lets add the defines and DIL functions that make this a special weapon
+
extra {"$identify"}
along with the manipulate flags that makes it able to be wielded.  We will give
+
"The stiletto looks magical in nature and seems really sharp.  You can
it a bonus in magic and good craftsmanship along with a plus in
+
tell if you wield it you would be able to backstab someone really easy."
backstab for all those assassins on the game.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra{"$improved identify"}
 +
"The stiletto gives you a magical bonus of +1 and has a quality of +2.
 +
It also raises your back stabbing skill  by 2%.  You have to have at
 +
least 10% in dex before you can wield this magical weapon."
  
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
+
end
WEAPON_DEF(WPN_DAGGER, 1, 2)
 
SKILL_TRANSFER(SKI_BACKSTAB, 2)
 
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</sect2>
 +
<sect2 id="objarmour">
 +
<TITLE>Making armour</TITLE>
  
<PARA>to finish it off we will give the weapon a cost, rent, and finally
+
<PARA>In <xref linkend="objmacroarmour"> we explained how to set the
two identifies for the two identify spells.  Now that we have it all
+
          armour fields now we will finish off by adding some more
defined we pull it together and it looks like this.</PARA>
+
          important information about armour in general.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
  <PARA>The most important thing to realize is that not all wear
 +
          positions on the <ACRONYM>VME</ACRONYM> server are armour positions.  In fact
 +
          only seven of the wear positions count as armour the rest are
 +
          non-armour positions which we will cover next in <xref
 +
          linkend="objnon-armour">.  The following are the armour
 +
          positions and their defines.</PARA>
 +
 
 +
<TABLE frame=all>
 +
<TITLE>Armour positions</TITLE>
 +
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Position</ENTRY>
 +
<ENTRY>Define</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>head</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_HEAD</ENTRY>
 +
</ROW>
  
w_stiletto
+
<ROW>
title "a stiletto"
+
<ENTRY>hands</ENTRY>
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
+
<ENTRY>MANIPULATE_WEAR_HANDS</ENTRY>
descr
+
</ROW>
"A deadly looking stiletto has been left here."
 
  
extra{}
+
<ROW>
"This looks like a thieves dream come true. "
+
<ENTRY>arms</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_ARMS</ENTRY>
 +
</ROW>
  
MATERIAL_METAL("A very fine quality steel")
 
  
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
+
<ROW>
WEAPON_DEF(WPN_DAGGER, 1, 2)
+
<ENTRY>body</ENTRY>
SKILL_TRANSFER(SKI_BACKSTAB, 2)
+
<ENTRY>MANIPULATE_WEAR_BODY</ENTRY>
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
+
</ROW>
weight 2
 
cost 2 GOLD_PIECE
 
rent 1 COPPER_PIECE
 
  
extra {"$identify"}
+
<ROW>
"The stiletto looks magical in nature and seems really sharp.  You can
+
<ENTRY>legs</ENTRY>
tell if you wield it you would be able to backstab someone really easy."
+
<ENTRY>MANIPULATE_WEAR_LEGS</ENTRY>
 +
</ROW>
  
extra{"$improved identify"}
+
<ROW>
"The stiletto gives you a magical bonus of +1 and has a quality of +2.
+
<ENTRY>feet</ENTRY>
It also raises your back stabbing skill  by 2%.  You have to have at
+
<ENTRY>MANIPULATE_WEAR_FEET</ENTRY>
least 10% in dex before you can wield this magical weapon."
+
</ROW>
  
end
+
<ROW>
 +
<ENTRY>cloak</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_ABOUT</ENTRY>
 +
</ROW>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</TBODY></TGROUP></TABLE>
</sect2>
 
<sect2 id="objarmour">
 
<TITLE>Making armour</TITLE>
 
  
<PARA>In <xref linkend="objmacroarmour"> we explained how to set the
+
<NOTE><PARA>There is one more field that works as armour, 'MANIPULATE_WEAR_SHIELD' but since that uses another define it is not
          armour fields now we will finish off by adding some more
+
shown here.  We will leave that for an exercise for you to do
          important information about armour in general.</PARA>
+
later.</PARA></NOTE>
  
  <PARA>The most important thing to realize is that not all wear
+
<PARA>First we do the same as we have for every other item, pick the
          positions on the <ACRONYM>VME</ACRONYM> server are armour positions.  In fact
+
symbolic, title, description, extra description, and material type for the plate.</PARA>
          only seven of the wear positions count as armour the rest are
 
          non-armour positions which we will cover next in <xref
 
          linkend="objnon-armour">.  The following are the armour
 
          positions and their defines.</PARA>
 
 
 
<TABLE frame=all>
 
<TITLE>Armour positions</TITLE>
 
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Position</ENTRY>
 
<ENTRY>Define</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>head</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_HEAD</ENTRY>
 
</ROW>
 
  
<ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>hands</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_HANDS</ENTRY>
 
</ROW>
 
  
<ROW>
+
pol_plate
<ENTRY>arms</ENTRY>
+
names {"polished breast plate","polished plate","breast plate","plate"}
<ENTRY>MANIPULATE_WEAR_ARMS</ENTRY>
+
title "a polished breast plate"
</ROW>
+
descr "A polished breast plate has been left here."
 +
MATERIAL_METAL("A high luster silver colored metal")
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<ROW>
+
<PARA>Now we pick the armour type in this case I want it to be made like
<ENTRY>body</ENTRY>
+
plate mail and I want it to have a magical bonus and a high
<ENTRY>MANIPULATE_WEAR_BODY</ENTRY>
+
craftsmanship.  Obviously since this is a plate we will pick the body
</ROW>
+
position.</PARA>
  
<ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>legs</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_LEGS</ENTRY>
 
</ROW>
 
  
<ROW>
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
<ENTRY>feet</ENTRY>
+
ARMOUR_DEF(ARM_PLATE,5,9)
<ENTRY>MANIPULATE_WEAR_FEET</ENTRY>
 
</ROW>
 
  
<ROW>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY>cloak</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_ABOUT</ENTRY>
 
</ROW>
 
  
</TBODY></TGROUP></TABLE>
+
<PARA>All that is left is to add the cost, rent, the identify extras,
 +
and I felt like putting a 40% strength restriction on the armour.  With
 +
all that added together we finish up with the following piece of
 +
armour.</PARA>
  
<NOTE><PARA>There is one more field that works as armour, 'MANIPULATE_WEAR_SHIELD' but since that uses another define it is not
+
<INFORMALEXAMPLE><PROGRAMLISTING>
shown here.  We will leave that for an exercise for you to do
 
later.</PARA></NOTE>
 
  
<PARA>First we do the same as we have for every other item, pick the
+
pol_plate
symbolic, title, description, extra description, and material type for the plate.</PARA>
+
names {"polished breast plate","polished plate","breast plate","plate"}
 +
title "a polished breast plate"
 +
descr "A polished breast plate has been left here."
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra{}
 +
"This is one shiny plate it seems to be made out of one perfect piece of
 +
metal.  There doesn't even seem to be any markings of owner ship."
  
pol_plate
+
MATERIAL_METAL("A high luster silver colored metal")
names {"polished breast plate","polished plate","breast plate","plate"}
 
title "a polished breast plate"
 
descr "A polished breast plate has been left here."
 
MATERIAL_METAL("A high luster silver colored metal")
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
 +
ARMOUR_DEF(ARM_PLATE,5,9)
  
<PARA>Now we pick the armour type in this case I want it to be made like
+
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
plate mail and I want it to have a magical bonus and a high
+
cost 2 GOLD_PIECE
craftsmanship.  Obviously since this is a plate we will pick the body
+
rent 3 COPPER_PIECE weight 25
position.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
extra{"$identify"}
 +
"This is a high quality plate with a magical feeling."
  
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
+
extra{"$improved identify"}
ARMOUR_DEF(ARM_PLATE,5,9)
+
"The plate has a magical bonus to your defence of a +5 and a quality of
 +
+9.  You need 40% in strength to be able to wear it."
 +
end
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>All that is left is to add the cost, rent, the identify extras,
+
</sect2>
and I felt like putting a 40% strength restriction on the armour.  With
 
all that added together we finish up with the following piece of
 
armour.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<sect2 id="objnon-armour">
 +
<TITLE>Making non-armour worn objects</TITLE>
  
pol_plate
+
<PARA>In the previous section we defined armour that actually protects
names {"polished breast plate","polished plate","breast plate","plate"}
+
the char in combat.  Here we will learn how to make the clothing and
title "a polished breast plate"
+
jewelery that may not do anything directly to combat but it can give
descr "A polished breast plate has been left here."
+
your characters bonuses that help in combat in the long run.  We will
 +
start by listing all the non-armour worn positions and their manipulate
 +
defines and then we will give a simple ring object.</PARA>
  
extra{}
+
<TABLE frame=all>
"This is one shiny plate it seems to be made out of one perfect piece of
+
<TITLE>Non-armour positions</TITLE>
metal.  There doesn't even seem to be any markings of owner ship."
+
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Position</ENTRY>
 +
<ENTRY>define</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>ear</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_EAR</ENTRY>
 +
</ROW>
  
MATERIAL_METAL("A high luster silver colored metal")
+
<ROW>
 +
<ENTRY>neck</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_NECK</ENTRY>
 +
</ROW>
  
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
+
<ROW>
ARMOUR_DEF(ARM_PLATE,5,9)
+
<ENTRY>wrist</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_WRIST</ENTRY>
 +
</ROW>
  
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
+
<ROW>
cost 2 GOLD_PIECE
+
<ENTRY>finger</ENTRY>
rent 3 COPPER_PIECE weight 25
+
<ENTRY>MANIPULATE_WEAR_FINGER</ENTRY>
 +
</ROW>
  
extra{"$identify"}
+
<ROW>
"This is a high quality plate with a magical feeling."
+
<ENTRY>chest</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_CHEST</ENTRY>
 +
</ROW>
  
extra{"$improved identify"}
+
<ROW>
"The plate has a magical bonus to your defence of a +5 and a quality of
+
<ENTRY>back</ENTRY>
+9.  You need 40% in strength to be able to wear it."
+
<ENTRY>MANIPULATE_WEAR_BACK</ENTRY>
end
+
</ROW>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<ROW>
 +
<ENTRY>waist</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_WAIST</ENTRY>
 +
</ROW>
  
</sect2>
+
<ROW>
 +
<ENTRY>ankle</ENTRY>
 +
<ENTRY>MANIPULATE_WEAR_ANKLE</ENTRY>
 +
</ROW>
  
<sect2 id="objnon-armour">
+
</TBODY></TGROUP></TABLE>
<TITLE>Making non-armour worn objects</TITLE>
 
  
<PARA>In the previous section we defined armour that actually protects
+
<NOTE><PARA>When giving ability, skill, weapon, or spell bonuses make
the char in combat.  Here we will learn how to make the clothing and
+
sure you realize that positions like ear, neck, wrist, and ankle can all
jewelery that may not do anything directly to combat but it can give
+
have two on a playerThis means any bonuses you give can be doubled if
your characters bonuses that help in combat in the long runWe will
+
the player gets two of them</PARA></NOTE>
start by listing all the non-armour worn positions and their manipulate
 
defines and then we will give a simple ring object.</PARA>
 
  
<TABLE frame=all>
+
<PARA>I don't want to beat a dead horse so since I have already
<TITLE>Non-armour positions</TITLE>
+
explained armour in <xref linkend="objarmour"> the only difference here
<TGROUP align=left cols=2 colsep=1>
+
is there is no 'ARMOUR_DEF' everything else is the same.  The following
<THEAD>
+
was one of the first items my wife made as a new builder and I have
<ROW>
+
always liked it.  I know, I am a lush but this way I don't have to write
<ENTRY>Position</ENTRY>
+
an example.</PARA>
<ENTRY>define</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>ear</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_EAR</ENTRY>
 
</ROW>
 
  
<ROW>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
<ENTRY>neck</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_NECK</ENTRY>
 
</ROW>
 
  
<ROW>
+
  maskwa
<ENTRY>wrist</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_WRIST</ENTRY>
 
</ROW>
 
  
<ROW>
+
names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
<ENTRY>finger</ENTRY>
+
title "a Maskwa ring"
<ENTRY>MANIPULATE_WEAR_FINGER</ENTRY>
+
descr "A Maskwa platinum ring is laying here."
</ROW>
+
MATERIAL_METAL("Platinum, and other precious metals")
 +
extra {}
 +
"The ring has a large bear head.  Could this be the legendary head of
 +
Maskwa?  Any thing formed with its head on it is said to strengthen the
 +
wearer."
 +
type ITEM_WORN
 +
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
 +
cost 100 COPPER_PIECE
 +
rent 50 IRON_PIECE
 +
weight 1
 +
STR_TRANSFER(+1)
 +
end
  
<ROW>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<ENTRY>chest</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_CHEST</ENTRY>
 
</ROW>
 
  
<ROW>
+
<NOTE><PARA>One last thing I forgot to mention.  The item type also
<ENTRY>back</ENTRY>
+
changes but then that is not hard to understand since this is not armour
<ENTRY>MANIPULATE_WEAR_BACK</ENTRY>
+
it should be some other thing.  In the case of non-armour worn items the
</ROW>
+
item type is 'ITEM_WORN'.</PARA></NOTE>
 +
</sect2>
  
<ROW>
+
</SECT1>
<ENTRY>waist</ENTRY>
 
<ENTRY>MANIPULATE_WEAR_WAIST</ENTRY>
 
</ROW>
 
  
<ROW>
+
<sect1 id="roomnpcobjzone">
<ENTRY>ankle</ENTRY>
+
<TITLE>Dragon station with rooms, NPCs, and objects</TITLE>
<ENTRY>MANIPULATE_WEAR_ANKLE</ENTRY>
 
</ROW>
 
  
</TBODY></TGROUP></TABLE>
+
<PARA>Now we will add the objects we have built to the zone from the
 +
previous chapter.  This is still not complete while it does compile and
 +
you can log into your zone, you still have to load your NPCs and objects
 +
but they do not load themselves and they are not dressed with their
 +
armour.  This will be taken care of in <xref linkend="ch-07"> and you
 +
will finally have a finished zone.  The following is the source file so
 +
far.</PARA>
  
<NOTE><PARA>When giving ability, skill, weapon, or spell bonuses make
+
<INFORMALEXAMPLE><PROGRAMLISTING>
sure you realize that positions like ear, neck, wrist, and ankle can all
 
have two on a player.  This means any bonuses you give can be doubled if
 
the player gets two of them</PARA></NOTE>
 
  
<PARA>I don't want to beat a dead horse so since I have already
+
#include &lt;composed.h&gt;
explained armour in <xref linkend="objarmour"> the only difference here
+
%zone dragonst
is there is no 'ARMOUR_DEF' everything else is the same.  The following
+
lifespan 20
was one of the first items my wife made as a new builder and I have
+
reset RESET_ANYHOW
always liked it.  I know, I am a lush but this way I don't have to write
+
creators {"whistler"}
an example.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
notes
 +
"This is the dragon station I shortened it to dragonst for ease in
 +
loading.  If you have  any questions email me at whistler@valhalla.com"
  
  maskwa
+
help
 +
"Not sure what could help you now.  You are stuck on one of the
 +
weirdest space stations you have ever seen and you smell burning
 +
sulfur."
  
names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
+
%rooms
title "a Maskwa ring"
 
descr "A Maskwa platinum ring is laying here."
 
MATERIAL_METAL("Platinum, and other precious metals")
 
extra {}
 
"The ring has a large bear head.  Could this be the legendary head of
 
Maskwa?  Any thing formed with its head on it is said to strengthen the
 
wearer."
 
type ITEM_WORN
 
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
 
cost 100 COPPER_PIECE
 
rent 50 IRON_PIECE
 
weight 1
 
STR_TRANSFER(+1)
 
end
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
chamber
 +
title "The middle chamber of the station"
 +
descr
 +
"This chamber seems to have the entire station rotating around it.  It is
 +
unbelievably large the ceiling seems to be a good 200 meeters high and
 +
the room is perfectly cubic. Small human size ornate chairs with dragon
 +
designs scrawled on the arms and back are arranged in a triangle like
 +
setting with one large chair at the front.  This must be where all
 +
station meetings are held. large pictures cover the walls depicting
 +
dragons in all kinds of situations.  large passages lead of to the west
 +
and the east.."
  
<NOTE><PARA>One last thing I forgot to mention.  The item type also
+
extra {"chair","chairs"}
changes but then that is not hard to understand since this is not armour
+
"The chairs are made of some metal you don't recognize and every inch is covered
it should be some other thing.  In the case of non-armour worn items the
+
with some kind of dragon."
item type is 'ITEM_WORN'.</PARA></NOTE>
 
</sect2>
 
  
</SECT1>
+
extra  {"dragon picture","picture"}
 +
"Thousands of dragons dot the skies of this rather life like picture.  In the
 +
center you see something move.  It looks to be a little green dragon."
  
<sect1 id="roomnpcobjzone">
+
extra{"green dragon","dragon","green"}
<TITLE>Dragon station with rooms, NPCs, and objects</TITLE>
+
"An intellegence looking dragon is sitting perched on a large chair watching you."
  
<PARA>Now we will add the objects we have built to the zone from the
+
movement SECT_INSIDE
previous chapter.  This is still not complete while it does compile and
+
ALWAYS_LIGHT
you can log into your zone, you still have to load your NPCs and objects
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
but they do not load themselves and they are not dressed with their
 
armour.  This will be taken care of in <xref linkend="ch-07"> and you
 
will finally have a finished zone.  The following is the source file so
 
far.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#include &lt;composed.h&gt;
+
west to disposal_room descr
%zone dragonst
+
"You see a small room.";
lifespan 20
 
reset RESET_ANYHOW
 
creators {"whistler"}
 
  
notes
+
east to hallway descr
"This is the dragon station I shortened it to dragonst for ease in
+
"You see what looks to be a hallway.";
loading.  If you have  any questions email me at whistler@valhalla.com"
 
  
help
+
end
"Not sure what could help you now.  You are stuck on one of the
 
weirdest space stations you have ever seen and you smell burning
 
sulfur."
 
  
%rooms
+
hallway
 +
title "Module tunnel"
 +
descr "The hallway is about 50 meters long and around 100 meters from
 +
side to side and top to bottom.  The hallway seems to be dust free.  The
 +
walls and the floors seem to be made out of the same sterile
 +
metal-plastic that all space agencies uses.  There are large plate glass
 +
windows that open up into space.  The hallway is filled with a dim light
 +
that seems to come from everywhere yet no where all at once.  You notice
 +
a glimmer of bright light coming from the windows.  To the east you see
 +
an air lock and to the west the hallway opens up into a larger room."
  
chamber
+
extra {"windows","window"}
title "The middle chamber of the station"
+
"Your eyes are drawn to a large ship lit up with running lights sitting
descr
+
about 1 kilometer from the station."
"This chamber seems to have the entire station rotating around it.  It is
 
unbelievably large the ceiling seems to be a good 200 meeters high and
 
the room is perfectly cubic. Small human size ornate chairs with dragon
 
designs scrawled on the arms and back are arranged in a triangle like
 
setting with one large chair at the front.  This must be where all
 
station meetings are held. large pictures cover the walls depicting
 
dragons in all kinds of situations.  large passages lead of to the west
 
and the east.."
 
  
extra {"chair","chairs"}
+
extra{"floor","walls","wall"}
"The chairs are made of some metal you don't recognize and every inch is covered
+
"Well what can be said it looks to be in perfect condition.  what else would
with some kind of dragon."
+
you want to know?"
  
extra {"dragon picture","picture"}
+
extra {"large ship" ,"ship"}
"Thousands of dragons dot the skies of this rather life like pictureIn the
+
"The ship looks really big and is shaped like a dragonThe scales
center you see something move.  It looks to be a little green dragon."
+
sparkle and seem to be multiple colors."
  
extra{"green dragon","dragon","green"}
+
movement SECT_INSIDE
"An intellegence looking dragon is sitting perched on a large chair watching you."
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
movement SECT_INSIDE
+
west to chamber descr
ALWAYS_LIGHT
+
"The hallway opens up into a chamber.";
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
 +
east to office descr
 +
"You see what looks to be an office."
 +
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
  
west to disposal_room descr
+
end
"You see a small room.";
 
  
east to hallway descr
+
office
"You see what looks to be a hallway.";
+
title "The station office"
 +
descr
 +
"Large paintings fill the walls of this part of the station.  The room
 +
is as large as the other rooms big enough for Dragons to lounge while
 +
still having a desk in one corner small enough for a humanoid.  The
 +
floor along the north wall is lined with some kind of fabric and seems very
 +
soft to walk on, it may be some kind of dragon lounge judging by how large an
 +
area it covers.  There is a passage to the west."
  
end
+
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
hallway
+
extra {"paintings","painting"}
title "Module tunnel"
+
"The paintings are of many dragons and riders in all kinds of tasks from
descr "The hallway is about 50 meters long and around 100 meters from
+
combat to look outAll the figures seem to be staring at a staff
side to side and top to bottomThe hallway seems to be dust free.  The
+
being held by a depiction of a wizard on the south wall."
walls and the floors seem to be made out of the same sterile
 
metal-plastic that all space agencies uses.  There are large plate glass
 
windows that open up into space.  The hallway is filled with a dim light
 
that seems to come from everywhere yet no where all at once.  You notice
 
a glimmer of bright light coming from the windows.  To the east you see
 
an air lock and to the west the hallway opens up into a larger room."
 
  
extra {"windows","window"}
+
extra {"wizard","staff"}
"Your eyes are drawn to a large ship lit up with running lights sitting
+
"The wizard has his hand stretched out and it seems there is a place
about 1 kilometer from the station."
+
you can almost grab the staff. Maybe if you searched the staff you would
 +
find it."
  
extra{"floor","walls","wall"}
+
extra {"desk"}
"Well what can be said it looks to be in perfect condition. what else would
+
"Its a desk alright but there doesn't seem to be any drawers and it
you want to know?"
+
seems totally empty."
  
extra {"large ship" ,"ship"}
+
extra{"fabric"}
"The ship looks really big and is shaped like a dragon.  The scales
+
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
sparkle and seem to be multiple colors."
 
  
movement SECT_INSIDE
+
west to hallway descr
ALWAYS_LIGHT
+
"You see what looks to be a hallway."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
  
west to chamber descr
+
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
"The hallway opens up into a chamber.";  
+
south to portal_room descr
 +
"You see what looks to be a portal room."
 +
keyword {"air lock door","air lock","staff","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
  
east to office descr
+
end
"You see what looks to be an office."
 
keyword {"air lock door","air lock","door"}
 
open {EX_OPEN_CLOSE, EX_CLOSED};
 
  
end
+
portal_room
 +
title "Green field room"
 +
descr
 +
"Like the other rooms on the station this one is large enough for
 +
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.
 +
there is a door that leads to another room to the north."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
extra {"green field","field"}
 +
"The field looks to be a green fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
 +
 +
north  to office descr
 +
"You see what looks to be an office."
 +
keyword {"air lock door","air lock","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 +
 +
//A link to the portal is also here from room_port
 +
end
 +
 +
ship_port
 +
names{"green field", "field"}
 +
title "Green field"
 +
descr
 +
"Green Mist swirls about you."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
in ship
 +
 +
dilcopy force_move@function(
 +
//Time to activation
 +
4,
 +
//room and act
 +
"portal_room@dragonst!You feel your body dissolving for lack of a better
 +
description.&amp;nYou appear on the deck of a ship.",
 +
//True or False for randomizing or not
 +
FALSE);
 +
 +
 +
end                                           
  
office
+
room_port
title "The station office"
+
names{"green field", "field"}
descr
+
title "Green field"
"Large paintings fill the walls of this part of the station. The room
+
descr
is as large as the other rooms big enough for Dragons to lounge while
+
"Green Mist swirls about you."
still having a desk in one corner small enough for a humanoid.  The
+
movement SECT_INSIDE
floor along the north wall is lined with some kind of fabric and seems very
+
ALWAYS_LIGHT
soft to walk on, it may be some kind of dragon lounge judging by how large an
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
area it covers.  There is a passage to the west."
 
  
movement SECT_INSIDE
+
in portal_room
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"paintings","painting"}
+
dilcopy force_move@function(
"The paintings are of many dragons and riders in all kinds of tasks from
+
//Time to activation
combat to look out. All the figures seem to be staring at a staff
+
4,
being held by a depiction of a wizard on the south wall."
+
//room and act
 
+
"ship@dragonst!You feel your body dissolving for lack of a better
extra {"wizard","staff"}
+
description.&amp;nYou appear on the deck of a ship.",
"The wizard has his hand stretched out and it seems there is a place
+
//True or False for randomizing or not
you can almost grab the staff. Maybe if you searched the staff you would
+
FALSE);
find it."
 
  
extra {"desk"}
 
"Its a desk alright but there doesn't seem to be any drawers and it
 
seems totally empty."
 
  
extra{"fabric"}
+
end
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
 
  
west to hallway descr
+
disposal_room
"You see what looks to be a hallway."
+
title "Red field room"
keyword {"air lock door","air lock","door"}
 
open {EX_OPEN_CLOSE, EX_CLOSED};
 
 
 
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
 
south to portal_room descr
 
"You see what looks to be a portal room."
 
keyword {"air lock door","air lock","staff","door"}
 
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
 
 
 
end
 
 
 
portal_room
 
title "Green field room"
 
 
descr
 
descr
 
"Like the other rooms on the station this one is large enough for
 
"Like the other rooms on the station this one is large enough for
 
dragons to comfortably fit in.  The strange thing about this room though
 
dragons to comfortably fit in.  The strange thing about this room though
is it is totally empty except for a green field right in the center.  
+
is it is totally empty except for a red field right in the center.  
there is a door that leads to another room to the north."
+
there is a door that leads to another room to the east."
+
 
 
movement SECT_INSIDE
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
 
extra {"green field","field"}
+
extra {"red field","field"}
"The field looks to be a green fog shifting and churning as you watch.  
+
"The field looks to be a red fog shifting and churning as you watch.  
 
if you are nuts you could probably enter it."
 
if you are nuts you could probably enter it."
+
 
north  to office descr
+
east to chamber descr
"You see what looks to be an office."
+
"You see the main chamber.";
keyword {"air lock door","air lock","door"}
+
 
key nokey
+
//A link to the portal is also here from dis_port
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
 
//A link to the portal is also here from room_port
 
 
end
 
end
+
 
ship_port
+
dis_port
names{"green field", "field"}
+
names {"red field","field"}
title "Green field"
+
title "Red field"
 
descr
 
descr
"Green Mist swirls about you."
+
"Red Mist swirls about you."
+
 
 
movement SECT_INSIDE
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
in ship
 
 
 
dilcopy force_move@function(
 
dilcopy force_move@function(
//Time to activation
+
//how fast to force move in seconds
 
4,
 
4,
//room and act
+
//room to force move to and act
"portal_room@dragonst!You feel your body dissolving for lack of a better
+
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
description.&amp;nYou appear on the deck of a ship.",
+
//true or false random move or not
//True or False for randomizing or not
+
0);
FALSE);
+
in disposal_room
 
 
end                                           
 
  
room_port
+
end
names{"green field", "field"}
 
title "Green field"
 
descr
 
"Green Mist swirls about you."
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
in portal_room
+
ship
 +
title "War dragon"
 +
descr
 +
"Blue light softly glows from con duets that line the walls of this ship.
 +
The floors beside the east and west wall have what looks to be soft
 +
fabric covering.  The south wall has small controls that seem to be made
 +
for humanoids with two small chairs that look to be pilot seats.  view
 +
portals are about 50 meters up the side of the ship on the west and east
 +
wall and some kind of electronic screen covers the south wall.  The ship
 +
seems to be a one room ship but there is a green field by the north
 +
wall."
  
dilcopy force_move@function(
+
movement SECT_INSIDE
//Time to activation
+
ALWAYS_LIGHT
4,
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
//room and act
 
"ship@dragonst!You feel your body dissolving for lack of a better
 
description.&amp;nYou appear on the deck of a ship.",
 
//True or False for randomizing or not
 
FALSE);
 
  
 +
extra {"view port"}
 +
"Sorry your not 50 meters tall maybe it is made for a dragon?"
  
end
+
extra {"view screen","screen"}
 +
"It seems to be the pilots view screen but you can't seem to see a way
 +
to turn it on."
  
disposal_room
+
extra {"controls","control"}
title "Red field room"
+
"The controls are in some weird language and your afraid if you start
descr
+
pushing buttons you might rocket in to the station or worse slam into
"Like the other rooms on the station this one is large enough for
+
a planet."
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a red field right in the center.
 
there is a door that leads to another room to the east."
 
  
movement SECT_INSIDE
+
extra {"soft fabric","fabric"}
ALWAYS_LIGHT
+
"It looks to be a dragon lounge area."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"red field","field"}
+
//A link to the portal is also here from ship_port
"The field looks to be a red fog shifting and churning as you watch.
+
end
if you are nuts you could probably enter it."
 
  
east to chamber descr
+
deathspace
"You see the main chamber.";
+
title"Open space"
 +
descr
 +
"You see the ship and the station far off in the distance and you are in Space!"
  
//A link to the portal is also here from dis_port
+
movement SECT_INSIDE
end
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
dis_port
+
dilcopy death_room@function (
names {"red field","field"}
+
//how often is damage done 4 would be 1 second
title "Red field"
+
4,  
descr
+
//damage
"Red Mist swirls about you."
+
400,
 +
//act for the damage.
 +
"You realize to late that was the trash disposal transporter and you feel
 +
your lungs explode.");
  
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
dilcopy force_move@function(
 
//how fast to force move in seconds
 
4,
 
//room to force move to and act
 
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
 
//true or false random move or not
 
0);
 
in disposal_room
 
  
end
+
end
  
ship
+
%mobiles
title "War dragon"
 
descr
 
"Blue light softly glows from con duets that line the walls of this ship.
 
The floors beside the east and west wall have what looks to be soft
 
fabric covering.  The south wall has small controls that seem to be made
 
for humanoids with two small chairs that look to be pilot seats.  view
 
portals are about 50 meters up the side of the ship on the west and east
 
wall and some kind of electronic screen covers the south wall.  The ship
 
seems to be a one room ship but there is a green field by the north
 
wall."
 
  
movement SECT_INSIDE
+
bldragon
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"view port"}
+
title "a black dragon"
"Sorry your not 50 meters tall maybe it is made for a dragon?"
+
descr "A big ugly black dragon is clawing the ground here."
 +
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
  
extra {"view screen","screen"}
+
extra {}
"It seems to be the pilots view screen but you can't seem to see a way
+
"The black dragons scales glitter like black granite that has been
to turn it on."
+
polished for years by water.  He has a large neck and huge bat like
 +
wings.  his eyes watch you as you stand before him.  One claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
extra {"controls","control"}
+
extra {"eye","eyes"}
"The controls are in some weird language and your afraid if you start
+
"The dragons eyes seem to follow you no matter where you go in the room
pushing buttons you might rocket in to the station or worse slam into
+
nothing seems to escape the dragons attention."
a planet."
 
  
extra {"soft fabric","fabric"}
+
extra {"claws","claw"}
"It looks to be a dragon lounge area."
+
"The claw is big black and it looks very deadly.  It seems like the
 +
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 +
to say means the claws are about the size of short swords and long
 +
swords."
  
//A link to the portal is also here from ship_port
+
extra {"scales","scale"}
end
+
"Its a scale!  Haven't you ever seen a dragon before!"
  
deathspace
+
extra {"bat wings","wings"}
title"Open space"
+
"The dragon sees you looking and flaps his wings creating one heck of a
descr
+
wind blast."
"You see the ship and the station far off in the distance and you are in Space!"
 
  
movement SECT_INSIDE
+
M_DRAGON_BLACK_OLD(SEX_MALE)
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
dilcopy death_room@function (
+
end
//how often is damage done 4 would be 1 second
 
4,
 
//damage
 
400,
 
//act for the damage.
 
"You realize to late that was the trash disposal transporter and you feel
 
your lungs explode.");
 
  
 +
janitor
 +
names {"ugly janitor", "janitor", "hobgoblin"}
 +
title "an ugly janitor"
 +
descr "an ugly janitor is walking around, cleaning up."
  
end
+
extra{}
 +
"This ugly green thing looks more goblin than hobgoblin but he seems intent on
 +
cleaning everything around him."
  
%mobiles
+
M_AVG_HOBGOBLIN(6, SEX_MALE)
  
bldragon
+
// he is sort of good for cleaning so much
 +
alignment 900
  
title "a black dragon"
+
//give him some money
descr "A big ugly black dragon is clawing the ground here."
+
money 5 IRON_PIECE
names {"big ugly black dragon","ugly black dragon","big black dragon",
 
"black dragon","dragon"}
 
  
extra {}
+
dilcopy janitors@function(15);
"The black dragons scales glitter like black granite that has been
 
polished for years by water.  He has a large neck and huge bat like
 
wings.  his eyes watch you as you stand before him.  One claw seems to be
 
tapping slightly on the ground as if the dragon is waiting for
 
something."
 
  
extra {"eye","eyes"}
+
// only want him cleaning the station
"The dragons eyes seem to follow you no matter where you go in the room
+
dilcopy wander_zones@function("dragonst", 20, 1, 1);
nothing seems to escape the dragons attention."
 
  
extra {"claws","claw"}
+
end
"The claw is big black and it looks very deadly.  It seems like the
 
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
+
bob
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
names {"Bob"}
"The dragon sees you looking and flaps his wings creating one heck of a
+
title "Bob"
wind blast."
+
descr "Bob the Banker is here, sitting behind the counter."
 +
extra {}
 +
"He has a very serious look on his face."
  
M_DRAGON_BLACK_OLD(SEX_MALE)
+
// define from composed.h
 +
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
  
end
+
//discourage people from killing banker
 +
exp -500
  
janitor
+
flags {UNIT_FL_NO_TELEPORT}
names {"ugly janitor", "janitor", "hobgoblin"}
 
title "an ugly janitor"
 
descr "an ugly janitor is walking around, cleaning up."
 
  
extra{}
+
special SFUN_BANK
"This ugly green thing looks more goblin than hobgoblin but he seems intent on
+
end
cleaning everything around him."
 
  
M_AVG_HOBGOBLIN(6, SEX_MALE)
+
%objects
  
// he is sort of good for cleaning so much
+
info_board
alignment 900
 
  
//give him some money
+
title "a merchant information board"
money 5 IRON_PIECE
+
descr "A merchant information Board is mounted on a wall here."
 +
names {"merchant information board","information board","merchant
 +
board","board"} extra {} "A large flashy black steal board."
  
dilcopy janitors@function(15);
+
MATERIAL_METAL("A very fine quality black steel")
 +
type ITEM_BOARD
 +
dilcopy board@boards("info","","rem_res@boards","",100);
  
// only want him cleaning the station
+
end
dilcopy wander_zones@function("dragonst", 20, 1, 1);
 
  
end
+
w_stiletto
 +
title "a stiletto"
 +
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
 +
descr "A deadly looking stiletto has been left here."
  
bob
+
MATERIAL_METAL("A very fine quality steel")
 +
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
 +
WEAPON_DEF(WPN_DAGGER, 1, 2)
 +
weight 2
 +
cost 2 GOLD_PIECE
 +
rent 1 COPPER_PIECE
  
names {"Bob"}
+
SKILL_TRANSFER(SKI_BACKSTAB, 2)
title "Bob"
+
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
descr "Bob the Banker is here, sitting behind the counter."
 
extra {}
 
"He has a very serious look on his face."
 
  
// define from composed.h
+
extra{}
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
+
"This looks like a thief dream come true. "
  
//discourage people from killing banker
+
extra {"$identify"}
exp -500
+
"The stiletto looks magical in nature and seems really sharp.  You can
 +
tell if you wield it you would be able to backstab someone really easy."
  
flags {UNIT_FL_NO_TELEPORT}
+
extra{"$improved identify"}
 +
"The stiletto gives you a magic bonus of +1 and has a quality of +2.
 +
It also raises your back stabbing skill  by 2%.  You have to have at
 +
least 10% in dex before you can wield this magical weapon."
  
special SFUN_BANK
+
end
end
 
  
%objects
+
wpn_locker
  
info_board
+
title "a weapons locker"
 +
names {"weapons locker","weapon locker","locker"}
  
title "a merchant information board"
+
descr "a small weapons locker hangs on the wall here."
descr "A merchant information Board is mounted on a wall here."
+
manipulate {MANIPULATE_ENTER}
names {"merchant information board","information board","merchant
+
CONTAINER_DEF(500)
board","board"} extra {} "A large flashy black steal board."
+
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 +
weight 400
 +
MATERIAL_METAL("A very fine quality steel")
  
MATERIAL_METAL("A very fine quality black steel")
+
extra {}
type ITEM_BOARD
+
"It is an ordinary weapons locker that looks like it holds any illegal
dilcopy board@boards("info","","rem_res@boards","",100);
+
weapons that are taken on the station."
  
end
+
end
  
w_stiletto
+
pol_plate
title "a stiletto"
+
names {"polished breast plate","polished plate","breast plate","plate"}
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
+
title "a polished breast plate"
descr "A deadly looking stiletto has been left here."
+
descr "A polished breast plate has been left here."
 +
extra{}
 +
"This is one shiny plate it seems to be made out of one perfect piece of
 +
metal.  There doesn't even seem to be any markings of owner ship."
 +
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_PLATE(5,9)
  
MATERIAL_METAL("A very fine quality steel")
+
MATERIAL_METAL("A high luster silver colored metal")
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
 
WEAPON_DEF(WPN_DAGGER, 1, 2)
 
weight 2
 
cost 2 GOLD_PIECE
 
rent 1 COPPER_PIECE
 
  
SKILL_TRANSFER(SKI_BACKSTAB, 2)
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
+
ARMOUR_DEF(ARM_PLATE,5,9)
 +
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
 +
cost 2 GOLD_PIECE
 +
rent 3 COPPER_PIECE
 +
weight 25
  
extra{}
+
extra{"$identify"}
"This looks like a thief dream come true. "
+
"This is a high quality plate with a magical feeling."
  
extra {"$identify"}
+
extra{"$improved identify"}
"The stiletto looks magical in nature and seems really sharp. You can
+
"The plate has a magical bonus to your defence of a +5 and a quality of
tell if you wield it you would be able to backstab someone really easy."
+
+9. You need 40% in strength to be able to wear it."
 +
end
  
extra{"$improved identify"}
+
liq_ration
"The stiletto gives you a magic bonus of +1 and has a quality of +2.
+
names {"red bag", "bag", "wine"}
It also raises your back stabbing skill  by 2%.  You have to have at
+
title "a red bag"
least 10% in dex before you can wield this magical weapon."
+
descr "A red bag has been gently placed here."
  
end
+
MATERIAL_ORGANIC("a soft plastic")
 +
manipulate {MANIPULATE_TAKE}
  
wpn_locker
+
LIQ_WINE(1,2,2,0)
 +
cost 2 IRON_PIECE
 +
extra {}
 +
"A small label reads Tassel Grove's finest.  Year 321"
  
title "a weapons locker"
+
extra {"$identify"}
names {"weapons locker","weapon locker","locker"}
+
"Its the special wine from Tassel grove a small halfling village on the
 +
planet Valhalla.  It seems like a great vintage wine."
  
descr "a small weapons locker hangs on the wall here."
+
end
manipulate {MANIPULATE_ENTER}
 
CONTAINER_DEF(500)
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 
weight 400
 
MATERIAL_METAL("A very fine quality steel")
 
  
extra {}
+
beef_stick
"It is an ordinary weapons locker that looks like it holds any illegal
 
weapons that are taken on the station."
 
  
end
+
title "a tough leathery stick"
 +
descr "A tough leathery looking stick is laying here."
 +
names {"tough leathery stick","tough leather stick","leathery stick",
 +
"leather stick","tough stick","stick"}
  
pol_plate
+
extra {}
names {"polished breast plate","polished plate","breast plate","plate"}
+
"This has the word BEEF burnt into it."
title "a polished breast plate"
 
descr "A polished breast plate has been left here."
 
extra{}
 
"This is one shiny plate it seems to be made out of one perfect piece of
 
metal.  There doesn't even seem to be any markings of owner ship."
 
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_PLATE(5,9)
 
  
MATERIAL_METAL("A high luster silver colored metal")
+
manipulate {MANIPULATE_TAKE}
 +
FOOD_DEF(5,0)
 +
weight 1
 +
cost 1 COPPER_PIECE
 +
MATERIAL_ORGANIC("tough beef")
 +
end
  
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
+
  maskwa
ARMOUR_DEF(ARM_PLATE,5,9)
 
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
 
cost 2 GOLD_PIECE
 
rent 3 COPPER_PIECE
 
weight 25
 
  
extra{"$identify"}
+
names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
"This is a high quality plate with a magical feeling."
+
title "a Maskwa ring"
 +
descr "A Maskwa platinum ring is laying here."
 +
MATERIAL_METAL("Platinum, and other precious metals")
 +
extra {}
 +
"The ring has a large bear head.  Could this be the legendary head of
 +
Maskwa?  Any thing formed with its head on it is said to strengthen the
 +
wearer."
 +
type ITEM_WORN
 +
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
 +
cost 100 COPPER_PIECE
 +
rent 50 IRON_PIECE
 +
weight 1
 +
STR_TRANSFER(+1)
 +
end
  
extra{"$improved identify"}
+
%end
"The plate has a magical bonus to your defence of a +5 and a quality of
 
+9. You need 40% in strength to be able to wear it."
 
end
 
  
liq_ration
+
</PROGRAMLISTING></INFORMALEXAMPLE>
names {"red bag", "bag", "wine"}
 
title "a red bag"
 
descr "A red bag has been gently placed here."
 
  
MATERIAL_ORGANIC("a soft plastic")
+
</sect1>
manipulate {MANIPULATE_TAKE}
 
  
LIQ_WINE(1,2,2,0)
 
cost 2 IRON_PIECE
 
extra {}
 
"A small label reads Tassel Grove's finest.  Year 321"
 
  
extra {"$identify"}
+
<sect1 id="objexer">
"Its the special wine from Tassel grove a small halfling village on the
+
<TITLE>Suggested object exercises</TITLE>
planet Valhalla.  It seems like a great vintage wine."
+
<orderedlist>
 +
<LISTITEM>
 +
<PARA>Using information you learned in <xref linkend="objcraft">,
 +
<xref linkend="objmag">, <xref linkend="objmacroshield">, and
 +
<xref linkend="objarmour"> create a large shield.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using information you learned in <xref linkend="objnon-armour">
 +
and <xref linkend="objmacrotransfers"> create a ring that gives a person
 +
5% strength bonus and removes 5% magic ability.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using information you learned from <xref linkend="objmacroliqcont"> and <xref
 +
linkend="objdrink"> create a beer or soda from your local area.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using information you learned in <xref linkend="objmacrolight">;
 +
make an object that gives off a bright light and will never run
 +
out.</PARA>
 +
</LISTITEM>
 +
<LISTITEM>
 +
<PARA>Using the macros found in <xref linkend="objmacroliqcont">,
 +
<xref linkend="objmacrofood">, <xref linkend="objmacromoney">, and
 +
<xref linkend="objmacrocontainer"> along with information found in
 +
<xref linkend="objfood"> and <xref linkend="objdrink">; create a chest that
 +
can be locked that contains food, drink, a pile of silver pieces, and a
 +
pile of iron pieces. </PARA>
 +
</LISTITEM>
 +
</orderedlist>
  
end
+
</SECT1>
  
beef_stick
+
</chapter>
  
title "a tough leathery stick"
+
<chapter ID="ch-07"><?dbhtml filename="ch07.html">
descr "A tough leathery looking stick is laying here."
+
<TITLE>The reset section</TITLE>
names {"tough leathery stick","tough leather stick","leathery stick",
 
"leather stick","tough stick","stick"}
 
  
extra {}
+
<PARA>Once you have learned to build rooms, objects and NPCs, you will
"This has the word BEEF burnt into it."
+
find one main missing thing, while you have created NPCs and objects
 +
they don't exist in the game unless you load them.  When developing the
 +
<ACRONYM>VME</ACRONYM> we found that logging on and loading everything for the players to
 +
interact with, became a very difficult thing to do when we got over 30
 +
items.  After many seconds of thought we came up with the idea of a
 +
reset section that would do all of this work for us.  In fact the reset
 +
takes care of closing doors after players have opened them, loading NPCs
 +
and their equipment, loading objects by themselves in rooms or even
 +
loaded objects in objects.</PARA>
  
manipulate {MANIPULATE_TAKE}
+
<PARA>Everything inside the reset section activates once at boot time and
FOOD_DEF(5,0)
+
then again when the reset time is up and the reset flag is true.  These
weight 1
+
two fields were described in <xref linkend="zoneinfo"> and are included
cost 1 COPPER_PIECE
+
in the zone header.  The reset section is denoted by the symbol '%reset' and can placed
MATERIAL_ORGANIC("tough beef")
+
anywhere but we try to keep it at the end of our zone files.  There is
end
+
no set order you must reset your doors, objects, and NPCs in but I like
 +
to do doors first, special reset commands second, objects in rooms third, objects with objects in them
 +
forth, NPCs fifth,
 +
and finally NPCs.  You may find that you have a better way of sorting
 +
them and again it is up to you.</PARA>
  
  maskwa
+
<sect1 id="doorreset">
 +
<TITLE>Door resets</TITLE>
  
names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
+
<PARA>To show how the door resets work we will revisit an old room
title "a Maskwa ring"
+
example from <xref linkend="rmdoorexits">. The following two rooms are
descr "A Maskwa platinum ring is laying here."
+
linked with a door and at boot time they are reset to closed.  When the
MATERIAL_METAL("Platinum, and other precious metals")
+
mud boots the door flags set on the room are the door flags that are
extra {}
+
usedAfter boot up time the reset section is where the <ACRONYM>VME</ACRONYM> gets its
"The ring has a large bear headCould this be the legendary head of
+
information about what to do with the door.</PARA>
Maskwa?  Any thing formed with its head on it is said to strengthen the
 
wearer."
 
type ITEM_WORN
 
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
 
cost 100 COPPER_PIECE
 
rent 50 IRON_PIECE
 
weight 1
 
STR_TRANSFER(+1)
 
end
 
  
%end
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
hallway
 +
title "Module tunnel"
 +
descr "The hallway is about 50 meters long and around 100 meters from
 +
side to side and top to bottom...."
  
</sect1>
+
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
 +
west to chamber descr
 +
"The hallway opens up into a chamber.";
  
<sect1 id="objexer">
+
east to office descr
<TITLE>Suggested object exercises</TITLE>
+
"You see what looks to be an office."
<orderedlist>
+
keyword {"air lock door","air lock","door"}
<LISTITEM>
+
open {EX_OPEN_CLOSE, EX_CLOSED};
<PARA>Using information you learned in <xref linkend="objcraft">,
 
<xref linkend="objmag">, <xref linkend="objmacroshield">, and
 
<xref linkend="objarmour"> create a large shield.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using information you learned in <xref linkend="objnon-armour">
 
and <xref linkend="objmacrotransfers"> create a ring that gives a person
 
5% strength bonus and removes 5% magic ability.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using information you learned from <xref linkend="objmacroliqcont"> and <xref
 
linkend="objdrink"> create a beer or soda from your local area.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using information you learned in <xref linkend="objmacrolight">;
 
make an object that gives off a bright light and will never run
 
out.</PARA>
 
</LISTITEM>
 
<LISTITEM>
 
<PARA>Using the macros found in <xref linkend="objmacroliqcont">,
 
<xref linkend="objmacrofood">, <xref linkend="objmacromoney">, and
 
<xref linkend="objmacrocontainer"> along with information found in
 
<xref linkend="objfood"> and <xref linkend="objdrink">; create a chest that
 
can be locked that contains food, drink, a pile of silver pieces, and a
 
pile of iron pieces. </PARA>
 
</LISTITEM>
 
</orderedlist>
 
  
</SECT1>
+
end
  
</chapter>
+
office
 +
title "The station office"
 +
descr
 +
"Large paintings fill the walls of this part of the station...."
  
<chapter ID="ch-07"><?dbhtml filename="ch07.html">
+
movement SECT_INSIDE
<TITLE>The reset section</TITLE>
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
<PARA>Once you have learned to build rooms, objects and NPCs, you will
+
west to hallway descr
find one main missing thing, while you have created NPCs and objects
+
"You see what looks to be a hallway."
they don't exist in the game unless you load them.  When developing the
+
keyword {"air lock door","air lock","door"}
<ACRONYM>VME</ACRONYM> we found that logging on and loading everything for the players to
+
open {EX_OPEN_CLOSE, EX_CLOSED};
interact with, became a very difficult thing to do when we got over 30
+
end
items. After many seconds of thought we came up with the idea of a
 
reset section that would do all of this work for us.  In fact the reset
 
takes care of closing doors after players have opened them, loading NPCs
 
and their equipment, loading objects by themselves in rooms or even
 
loaded objects in objects.</PARA>
 
  
<PARA>Everything inside the reset section activates once at boot time and
+
</PROGRAMLISTING></INFORMALEXAMPLE>
then again when the reset time is up and the reset flag is true.  These
 
two fields were described in <xref linkend="zoneinfo"> and are included
 
in the zone header.  The reset section is denoted by the symbol '%reset' and can placed
 
anywhere but we try to keep it at the end of our zone files.  There is
 
no set order you must reset your doors, objects, and NPCs in but I like
 
to do doors first, special reset commands second, objects in rooms third, objects with objects in them
 
forth, NPCs fifth,
 
and finally NPCs.  You may find that you have a better way of sorting
 
them and again it is up to you.</PARA>
 
  
<sect1 id="doorreset">
 
<TITLE>Door resets</TITLE>
 
  
<PARA>To show how the door resets work we will revisit an old room
+
<PARA>Now that we have two rooms lets define the reset command and how
example from <xref linkend="rmdoorexits">. The following two rooms are
+
it works.  All reset commands have a keyword and then a set of
linked with a door and at boot time they are reset to closed.  When the
+
argumentsThe door reset command is simply 'door' followed by a set of
mud boots the door flags set on the room are the door flags that are
+
arguments that tell the <ACRONYM>VME</ACRONYM> where the door is, which door in that
usedAfter boot up time the reset section is where the <ACRONYM>VME</ACRONYM> gets its
+
location, and what you want to do with the door.  The command looks like
information about what to do with the door.</PARA>
+
this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
hallway
+
door &lt;room symbol&gt; &lt;Direction number&gt; {&lt;door flags&gt;}
title "Module tunnel"
 
descr "The hallway is about 50 meters long and around 100 meters from
 
side to side and top to bottom...."
 
  
movement SECT_INSIDE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
west to chamber descr
+
<VARIABLELIST>
"The hallway opens up into a chamber.";
+
<TITLE>Door argument explanation</TITLE>
 +
<VARLISTENTRY>
 +
;room symbolic
 +
<DICTDEF>
 +
<PARA>As the name indicates this is the room that the door is located
 +
in.  If you are resetting a door not in the zone the reset
 +
command is in you will need to use a full symbolic name with the zone
 +
extension.  The following would be two valid examples.</PARA>
  
east to office descr
+
<INFORMALEXAMPLE><PROGRAMLISTING>
"You see what looks to be an office."
 
keyword {"air lock door","air lock","door"}
 
open {EX_OPEN_CLOSE, EX_CLOSED};
 
  
end
+
//room symbolic in  this zone
 +
door myroom ...
  
office
+
//room symbolic in another zone
title "The station office"
+
door out_room@frogwart ...
descr
 
"Large paintings fill the walls of this part of the station...."
 
  
movement SECT_INSIDE
+
</PROGRAMLISTING></INFORMALEXAMPLE>
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
west to hallway descr
+
</LISTITEM>
"You see what looks to be a hallway."
+
</VARLISTENTRY>
keyword {"air lock door","air lock","door"}
 
open {EX_OPEN_CLOSE, EX_CLOSED};
 
end
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;direction number
 +
<DICTDEF>
 +
<PARA>The direction number can be one of the pre-defined direction
 +
numbers in the file ''vme.h''.  shown here so you don't
 +
have to go flipping file to file.</PARA>
  
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<PARA>Now that we have two rooms lets define the reset command and how
+
#define NORTH 0
it works. All reset commands have a keyword and then a set of
+
#define EAST 1
arguments. The door reset command is simply 'door' followed by a set of
+
#define SOUTH 2
arguments that tell the <ACRONYM>VME</ACRONYM> where the door is, which door in that
+
#define WEST 3
location, and what you want to do with the door. The command looks like
+
#define UP    4
this.</PARA>
+
#define DOWN 5
 +
#define NORTHEAST 6
 +
#define NORTHWEST 7
 +
#define SOUTHEAST 8
 +
#define SOUTHWEST 9
  
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
door &lt;room symbol&gt; &lt;Direction number&gt; {&lt;door flags&gt;}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 +
;door flags
 +
<DICTDEF>
  
<VARIABLELIST>
+
<PARA>These flags, surrounded by '{}', describe the state of the door after the reset.  The following is the
<TITLE>Door argument explanation</TITLE>
+
list of possible door flags.</PARA>
<VARLISTENTRY>
 
;room symbolic
 
<DICTDEF>
 
<PARA>As the name indicates this is the room that the door is located
 
in.  If you are resetting a door not in the zone the reset
 
command is in you will need to use a full symbolic name with the zone
 
extension.  The following would be two valid examples.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<VARIABLELIST>
 
+
<VARLISTENTRY>
//room symbolic in  this zone
+
;EX_OPEN_CLOSE
door myroom ...
+
<DICTDEF>
 
+
<PARA> Set this if you can open and close this exit, be it a door, gate or
//room symbolic in another zone
+
    otherwise.</PARA>
door out_room@frogwart ...
+
</LISTITEM>
 
+
</VARLISTENTRY>
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<VARLISTENTRY>
 
+
;EX_CLOSED
</LISTITEM>
+
<DICTDEF>
</VARLISTENTRY>
+
<PARA>Set this if you want the exit to be closed at reset time.</PARA>
 
 
<VARLISTENTRY>
 
;direction number
 
<DICTDEF>
 
<PARA>The direction number can be one of the pre-defined direction
 
numbers in the file ''vme.h''.  shown here so you don't
 
have to go flipping file to file.</PARA>
 
 
 
<INFORMALEXAMPLE><PROGRAMLISTING>
 
 
 
#define NORTH 0
 
#define EAST  1
 
#define SOUTH 2
 
#define WEST  3
 
#define UP    4
 
#define DOWN  5
 
#define NORTHEAST 6
 
#define NORTHWEST 7
 
#define SOUTHEAST 8
 
#define SOUTHWEST 9
 
 
 
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
</LISTITEM>
 
</VARLISTENTRY>
 
 
 
<VARLISTENTRY>
 
;door flags
 
<DICTDEF>
 
 
 
<PARA>These flags, surrounded by '{}', describe the state of the door after the reset.  The following is the
 
list of possible door flags.</PARA>
 
 
 
<VARIABLELIST>
 
<VARLISTENTRY>
 
;EX_OPEN_CLOSE
 
<DICTDEF>
 
<PARA> Set this if you can open and close this exit, be it a door, gate or
 
    otherwise.</PARA>
 
 
</LISTITEM>
 
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
<VARLISTENTRY>
;EX_CLOSED
+
;EX_LOCKED
<DICTDEF>
+
<DICTDEF>
<PARA>Set this if you want the exit to be closed at reset time.</PARA>
+
<PARA>Set this if you want the exit to be locked at reset time.</PARA>
</LISTITEM>
+
<NOTE>
</VARLISTENTRY>
+
<PARA>An interesting aspect is that if you do not specify a key, you can
<VARLISTENTRY>
+
    only unlock this door with the 'pick' skill, 'unlock' spell or from
;EX_LOCKED
+
    <ACRONYM>DIL</ACRONYM> with UnSet();</PARA>
<DICTDEF>
+
</NOTE>
<PARA>Set this if you want the exit to be locked at reset time.</PARA>
+
</LISTITEM>
<NOTE>
+
</VARLISTENTRY>
<PARA>An interesting aspect is that if you do not specify a key, you can
+
<VARLISTENTRY>
    only unlock this door with the 'pick' skill, 'unlock' spell or from
+
;EX_PICK_PROOF
    <ACRONYM>DIL</ACRONYM> with UnSet();</PARA>
+
<DICTDEF>
</NOTE>
+
<PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the
 +
    lock of this exit.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;EX_HIDDEN
 +
<DICTDEF>
 +
<PARA>If this bit is set, the exit is hidden until the mobile has successfully
 +
    searched for it, using the 'search'-command.</PARA>  
 
</LISTITEM>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARLISTENTRY>
<VARLISTENTRY>
+
</VARIABLELIST>
;EX_PICK_PROOF
 
<DICTDEF>
 
<PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the
 
    lock of this exit.</PARA>
 
 
</LISTITEM>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARLISTENTRY>
<VARLISTENTRY>
+
</VARIABLELIST>
;EX_HIDDEN
 
<DICTDEF>
 
<PARA>If this bit is set, the exit is hidden until the mobile has successfully
 
    searched for it, using the 'search'-command.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
  
<PARA>Now that we have all the information we need we can close the door
+
<PARA>Now that we have all the information we need we can close the door
after the reset time expires.  For our two rooms the door reset would
+
after the reset time expires.  For our two rooms the door reset would
look like this.</PARA>
+
look like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED}  
+
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED}  
door office WEST {EX_OPEN_CLOSE, EX_CLOSED}
+
door office WEST {EX_OPEN_CLOSE, EX_CLOSED}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<NOTE><PARA>As you can see from the example it is very important to
+
<NOTE><PARA>As you can see from the example it is very important to
close both sides of the door.  If you do not close both sides you will
+
close both sides of the door.  If you do not close both sides you will
get very weird and undefined errors when players are trying to open and
+
get very weird and undefined errors when players are trying to open and
close them</PARA></NOTE>
+
close them</PARA></NOTE>
  
<PARA>Another thing that you can do with the door reset command is
+
<PARA>Another thing that you can do with the door reset command is
change the doors status.  In our previous example we reset the door to
+
change the doors status.  In our previous example we reset the door to
its status that it has when it first is loaded into the game.  If
+
its status that it has when it first is loaded into the game.  If
however we wanted to change the door to a locked door we could do that
+
however we wanted to change the door to a locked door we could do that
by adding the locked flag like this.</PARA>
+
by adding the locked flag like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}  
+
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}  
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
+
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
</sect1>
+
</sect1>
  
<sect1 id="resetloadobjnpc">
+
<sect1 id="resetloadobjnpc">
<TITLE>Loading objects and NPCs</TITLE>
+
<TITLE>Loading objects and NPCs</TITLE>
  
<PARA>Time to start loading your zone with its life and all the other
+
<PARA>Time to start loading your zone with its life and all the other
strange things you have built.  There is two commands that do all the
+
strange things you have built.  There is two commands that do all the
loading and equipping of objects.  Oddly enough the commands are called
+
loading and equipping of objects.  Oddly enough the commands are called
'load' and 'equip'.  The format of the commands are almost the same
+
'load' and 'equip'.  The format of the commands are almost the same
but equip must be used inside a NPC grouping.  With that in mind lets
+
but equip must be used inside a NPC grouping.  With that in mind lets
start with simple loads and work our way up.</PARA>
+
start with simple loads and work our way up.</PARA>
  
<PARA>The command to load an object or an NPC into a room is as
+
<PARA>The command to load an object or an NPC into a room is as
follows:</PARA>
+
follows:</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
load &lt;object or NPC&gt; [into] [&lt;room&lt;] [&lt;load amount&gt;]
+
load &lt;object or NPC&gt; [into] [&lt;room&lt;] [&lt;load amount&gt;]
  [{Other loads and equip commands}]
+
  [{Other loads and equip commands}]
 
+
 
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<VARIABLELIST>
+
<VARIABLELIST>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;object or NPC
+
;object or NPC
<DICTDEF>
+
<DICTDEF>
<PARA>The first argument to the load command is the object or NPC
+
<PARA>The first argument to the load command is the object or NPC
symbolic name that you want to load.  The first argument is the only one
+
symbolic name that you want to load.  The first argument is the only one
that must be included in all load commands.</PARA>
+
that must be included in all load commands.</PARA>
  
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;into
+
;into
<DICTDEF>
+
<DICTDEF>
<PARA>This is just a symbol that tells the reset that we are loading the
+
<PARA>This is just a symbol that tells the reset that we are loading the
object or NPC into some other unit.</PARA>
+
object or NPC into some other unit.</PARA>
  
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;object, NPC, and room
+
;object, NPC, and room
<DICTDEF>
+
<DICTDEF>
<PARA>The third argument is the symbolic name of the place where you are loading the object
+
<PARA>The third argument is the symbolic name of the place where you are loading the object
and the NPC.</PARA>
+
and the NPC.</PARA>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;load amount
+
;load amount
<DICTDEF>
+
<DICTDEF>
<PARA>the fourth argument is an optional argument that tells the reset
+
<PARA>the fourth argument is an optional argument that tells the reset
how many of the objects are allowed in the world, zone, or locally.  The
+
how many of the objects are allowed in the world, zone, or locally.  The
possible values for this field are as follows:</PARA>
+
possible values for this field are as follows:</PARA>
  
<VARIABLELIST>
+
<VARIABLELIST>
<VARLISTENTRY>
+
<VARLISTENTRY>
;max &lt;num&gt;
+
;max &lt;num&gt;
<DICTDEF>
+
<DICTDEF>
<PARA>This  command  is  always  part  of  another reset command (load,
+
<PARA>This  command  is  always  part  of  another reset command (load,
equip, etc.).  At reset time the entire world is scanned for occurences
+
equip, etc.).  At reset time the entire world is scanned for occurences
of the loaded unit - only if the currently existing number is less than
+
of the loaded unit - only if the currently existing number is less than
&lt;num&gt; will the command be executed.</PARA>
+
&lt;num&gt; will the command be executed.</PARA>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;local &lt;num&gt;
+
;local &lt;num&gt;
<DICTDEF>
+
<DICTDEF>
<PARA>This command is always  part  of  another  reset  command  (load,
+
<PARA>This command is always  part  of  another  reset  command  (load,
equip, etc.).  At reset time the location of which the unit is to
+
equip, etc.).  At reset time the location of which the unit is to
be loaded into is scanned for occurences of the loaded unit only  if  the currently
+
be loaded into is scanned for occurences of the loaded unit only  if  the currently
existing number is less than &lt;num&gt; will the
+
existing number is less than &lt;num&gt; will the
command be executed.</PARA>
+
command be executed.</PARA>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
<VARLISTENTRY>
+
<VARLISTENTRY>
;zonemax &lt;num&gt;
+
;zonemax &lt;num&gt;
<DICTDEF>
+
<DICTDEF>
<PARA>This command is always  part  of  another  reset  command  (load,
+
<PARA>This command is always  part  of  another  reset  command  (load,
equip,  etc.).  At  reset  time  the  entire zone being reset is
+
equip,  etc.).  At  reset  time  the  entire zone being reset is
scanned for occurences of the loaded unit - only if the currently
+
scanned for occurences of the loaded unit - only if the currently
existing number is less than &lt;num&gt; will the command be
+
existing number is less than &lt;num&gt; will the command be
executed.</PARA>
+
executed.</PARA>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
</VARIABLELIST>
+
</VARIABLELIST>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;Optional grouping
+
;Optional grouping
<DICTDEF>
+
<DICTDEF>
  
<PARA>Any reset command may be followed by a pair of curly brackets {}
+
<PARA>Any reset command may be followed by a pair of curly brackets {}
containing  more reset commands. The commands inside the brackets
+
containing  more reset commands. The commands inside the brackets
will only be executed in case the associated command was successful.</PARA>
+
will only be executed in case the associated command was successful.</PARA>
  
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
</VARIABLELIST>
+
</VARIABLELIST>
  
<PARA>Don't be alarmed if this sounds a bit hard.  It all gets much
+
<PARA>Don't be alarmed if this sounds a bit hard.  It all gets much
more clear as some examples are explained.  Lets take a look at the
+
more clear as some examples are explained.  Lets take a look at the
following example and see if we can't make this much more clear.</PARA>
+
following example and see if we can't make this much more clear.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
load udgaard/fido into midgaard/temple max 1
+
load udgaard/fido into midgaard/temple max 1
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>This example is pretty simple it says load the fido into the
+
<PARA>This example is pretty simple it says load the fido into the
temple only if there isn't already 1 in the world.  Now lets get a bit
+
temple only if there isn't already 1 in the world.  Now lets get a bit
more complicated.</PARA>
+
more complicated.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
load udgaard/fido into midgaard/temple max 1
+
load udgaard/fido into midgaard/temple max 1
{
+
{
  load bone
+
  load bone
  load excrement into midgaard/temple
+
  load excrement into midgaard/temple
}
+
}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>Now we have said again load the fido into the temple if there is
+
<PARA>Now we have said again load the fido into the temple if there is
not already one in the world.  Then if fido loads fill his inventory
+
not already one in the world.  Then if fido loads fill his inventory
with a bone and load excrement into the temple as well.</PARA>
+
with a bone and load excrement into the temple as well.</PARA>
  
<PARA>We can get even more complicated but still just using the load
+
<PARA>We can get even more complicated but still just using the load
commands by doing the following</PARA>
+
commands by doing the following</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
load udgaard/fido into midgaard/temple max 1
+
load udgaard/fido into midgaard/temple max 1
{
+
{
  load bone
+
  load bone
  load excrement into midgaard/temple
+
  load excrement into midgaard/temple
      load bag
+
      load bag
  {
+
  {
      load apple max 1
+
      load apple max 1
  }
+
  }
}
+
}
  
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>now we still have the fido loading if there isn't one already in
+
<PARA>now we still have the fido loading if there isn't one already in
the world then the bone and the excrement and finally we load a bag.  
+
the world then the bone and the excrement and finally we load a bag.  
If there isn't an apple already in the world we load the bag with a
+
If there isn't an apple already in the world we load the bag with a
apple in it other wise the bag will be empty.</PARA>
+
apple in it other wise the bag will be empty.</PARA>
  
<PARA>Well that should be enough load examples for now but we will get
+
<PARA>Well that should be enough load examples for now but we will get
right back to them in a bit.  Now we should introduce another reset
+
right back to them in a bit.  Now we should introduce another reset
command called the 'equip' command that we have already mentioned.  The
+
command called the 'equip' command that we have already mentioned.  The
'equip' command works a lot like load but has much simpler arguments.  
+
'equip' command works a lot like load but has much simpler arguments.  
The 'equip' command is as follows.</PARA>
+
The 'equip' command is as follows.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
equip &lt;symbol&gt; position [load amount &lt;num&gt;]
+
equip &lt;symbol&gt; position [load amount &lt;num&gt;]
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
<VARIABLELIST>
+
<VARIABLELIST>
<VARLISTENTRY>
+
<VARLISTENTRY>
;symbol
+
;symbol
<DICTDEF>
+
<DICTDEF>
<PARA>The first argument is just the symbolic name of the item  
+
<PARA>The first argument is just the symbolic name of the item  
being worn by the NPC.</PARA>
+
being worn by the NPC.</PARA>
  
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;position
+
;position
<DICTDEF>
+
<DICTDEF>
<PARA>The position is any of the positions available in the
+
<PARA>The position is any of the positions available in the
''vme.h''.  The following are all the positions along
+
''vme.h''.  The following are all the positions along
side there defines as found in the ''vme.h''.</PARA>
+
side there defines as found in the ''vme.h''.</PARA>
  
<TABLE frame=all>
+
<TABLE frame=all>
<TITLE>Wear positions</TITLE>
+
<TITLE>Wear positions</TITLE>
<TGROUP align=left cols=2 colsep=1>
+
<TGROUP align=left cols=2 colsep=1>
<THEAD>
+
<THEAD>
<ROW>
+
<ROW>
<ENTRY>Position</ENTRY>
+
<ENTRY>Position</ENTRY>
<ENTRY>Define(s)</ENTRY>
+
<ENTRY>Define(s)</ENTRY>
</ROW>
+
</ROW>
</THEAD>
+
</THEAD>
<TBODY>
+
<TBODY>
<ROW>
+
<ROW>
<ENTRY>head</ENTRY>
+
<ENTRY>head</ENTRY>
<ENTRY>WEAR_HEAD</ENTRY>
+
<ENTRY>WEAR_HEAD</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>hands</ENTRY>
+
<ENTRY>hands</ENTRY>
<ENTRY>WEAR_HANDS</ENTRY>
+
<ENTRY>WEAR_HANDS</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>arms</ENTRY>
+
<ENTRY>arms</ENTRY>
<ENTRY>WEAR_ARMS</ENTRY>
+
<ENTRY>WEAR_ARMS</ENTRY>
</ROW>
+
</ROW>
  
  
<ROW>
+
<ROW>
<ENTRY>body</ENTRY>
+
<ENTRY>body</ENTRY>
<ENTRY>WEAR_BODY</ENTRY>
+
<ENTRY>WEAR_BODY</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>legs</ENTRY>
+
<ENTRY>legs</ENTRY>
<ENTRY>WEAR_LEGS</ENTRY>
+
<ENTRY>WEAR_LEGS</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>feet</ENTRY>
+
<ENTRY>feet</ENTRY>
<ENTRY>WEAR_FEET</ENTRY>
+
<ENTRY>WEAR_FEET</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>cloak</ENTRY>
+
<ENTRY>cloak</ENTRY>
<ENTRY>WEAR_ABOUT</ENTRY>
+
<ENTRY>WEAR_ABOUT</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>shield</ENTRY>
+
<ENTRY>shield</ENTRY>
<ENTRY>WEAR_SHIELD</ENTRY>
+
<ENTRY>WEAR_SHIELD</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>hold</ENTRY>
+
<ENTRY>hold</ENTRY>
<ENTRY>WEAR_HOLD</ENTRY>
+
<ENTRY>WEAR_HOLD</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>wield</ENTRY>
+
<ENTRY>wield</ENTRY>
<ENTRY>WEAR_WIELD</ENTRY>
+
<ENTRY>WEAR_WIELD</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>ear</ENTRY>
+
<ENTRY>ear</ENTRY>
<ENTRY>WEAR_EAR_R and WEAR_EAR_L</ENTRY>
+
<ENTRY>WEAR_EAR_R and WEAR_EAR_L</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>neck</ENTRY>
+
<ENTRY>neck</ENTRY>
<ENTRY>WEAR_NECK_1 and WEAR_NECK_2</ENTRY>
+
<ENTRY>WEAR_NECK_1 and WEAR_NECK_2</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>wrist</ENTRY>
+
<ENTRY>wrist</ENTRY>
<ENTRY>WEAR_WRIST_R and WEAR_WRIST_L</ENTRY>
+
<ENTRY>WEAR_WRIST_R and WEAR_WRIST_L</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>finger</ENTRY>
+
<ENTRY>finger</ENTRY>
<ENTRY>WEAR_FINGER_R and WEAR_FINGER_L</ENTRY>
+
<ENTRY>WEAR_FINGER_R and WEAR_FINGER_L</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>chest</ENTRY>
+
<ENTRY>chest</ENTRY>
<ENTRY>MANIPULATE_WEAR_CHEST</ENTRY>
+
<ENTRY>MANIPULATE_WEAR_CHEST</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>back</ENTRY>
+
<ENTRY>back</ENTRY>
<ENTRY>MANIPULATE_WEAR_BACK</ENTRY>
+
<ENTRY>MANIPULATE_WEAR_BACK</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>waist</ENTRY>
+
<ENTRY>waist</ENTRY>
<ENTRY>MANIPULATE_WEAR_WAIST</ENTRY>
+
<ENTRY>MANIPULATE_WEAR_WAIST</ENTRY>
</ROW>
+
</ROW>
  
<ROW>
+
<ROW>
<ENTRY>ankle</ENTRY>
+
<ENTRY>ankle</ENTRY>
<ENTRY>WEAR_ANKLE_R and WEAR_ANKLE_L</ENTRY>
+
<ENTRY>WEAR_ANKLE_R and WEAR_ANKLE_L</ENTRY>
</ROW>
+
</ROW>
  
</TBODY></TGROUP></TABLE>
+
</TBODY></TGROUP></TABLE>
  
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
  
<VARLISTENTRY>
+
<VARLISTENTRY>
  
;load amount
+
;load amount
<DICTDEF>
+
<DICTDEF>
<PARA>the fourth argument is an optional argument that tells the reset
+
<PARA>the fourth argument is an optional argument that tells the reset
how many of the objects are allowed in the world, zone, or locally.  The
+
how many of the objects are allowed in the world, zone, or locally.  The
possible values for this field are as follows:</PARA>
+
possible values for this field are as follows:</PARA>
  
<VARIABLELIST>
+
<VARIABLELIST>
<VARLISTENTRY>
+
<VARLISTENTRY>
;max &lt;num&gt;
+
;max &lt;num&gt;
<DICTDEF>
+
<DICTDEF>
<PARA>This  command  is  always  part  of  another reset command (load,
+
<PARA>This  command  is  always  part  of  another reset command (load,
equip, etc.).  At reset time the entire world is scanned for occurences
+
equip, etc.).  At reset time the entire world is scanned for occurences
of the loaded unit - only if the currently existing number is less than
+
of the loaded unit - only if the currently existing number is less than
&lt;num&gt; will the command be executed.</PARA>
+
&lt;num&gt; will the command be executed.</PARA>
</LISTITEM>
+
</LISTITEM>
</VARLISTENTRY>
+
</VARLISTENTRY>
 
 
<VARLISTENTRY>
 
;local &lt;num&gt;
 
<DICTDEF>
 
<PARA>This command is always  part  of  another  reset  command  (load,
 
equip, etc.).  At reset time the location of which the unit is to
 
be loaded into is scanned for occurences of the loaded unit - only  if  the currently
 
existing number is less than &lt;num&gt; will the
 
command be executed.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
<VARLISTENTRY>
 
;zonemax &lt;num&gt;
 
<DICTDEF>
 
<PARA>This command is always  part  of  another  reset  command  (load,
 
equip,  etc.).  At  reset  time  the  entire zone being reset is
 
scanned for occurences of the loaded unit - only if the currently
 
existing number is less than &lt;num&gt; will the command be
 
executed.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
</VARIABLELIST>
+
<VARLISTENTRY>
 +
;local &lt;num&gt;
 +
<DICTDEF>
 +
<PARA>This command is always  part  of  another  reset  command  (load,
 +
equip, etc.).  At reset time the location of which the unit is to
 +
be loaded into is scanned for occurences of the loaded unit - only  if  the currently
 +
existing number is less than &lt;num&gt; will the
 +
command be executed.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;zonemax &lt;num&gt;
 +
<DICTDEF>
 +
<PARA>This command is always  part  of  another  reset  command  (load,
 +
equip,  etc.).  At  reset  time  the  entire zone being reset is
 +
scanned for occurences of the loaded unit - only if the currently
 +
existing number is less than &lt;num&gt; will the command be
 +
executed.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>Now with the equipment command you can now get your NPCs dressed
+
</VARIABLELIST>
and ready for battle.  The 'load' and 'equip' commands are not the
 
easiest though so lets go through some simple examples.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Now with the equipment command you can now get your NPCs dressed
 +
and ready for battle.  The 'load' and 'equip' commands are not the
 +
easiest though so lets go through some simple examples.</PARA>
  
load guard into jail
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  {
 
  equip helmet WEAR_HEAD
 
  equip plate WEAR_BODY
 
  equip pants WEAR_LEGS
 
  equip specialsword max 1
 
  load brass_key
 
  } 
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
load guard into jail
 +
  {
 +
  equip helmet WEAR_HEAD
 +
  equip plate WEAR_BODY
 +
  equip pants WEAR_LEGS
 +
  equip specialsword max 1
 +
  load brass_key
 +
  } 
  
<PARA>This is how you would equip a NPC with all items from the current
+
</PROGRAMLISTING></INFORMALEXAMPLE>
zone.  As you can see we didn't need full symbolics because the server
 
knows to grab the items from the zone the resets are in.</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>This is how you would equip a NPC with all items from the current
 +
zone.  As you can see we didn't need full symbolics because the server
 +
knows to grab the items from the zone the resets are in.</PARA>
  
load guard into safe_room max 2
+
<INFORMALEXAMPLE><PROGRAMLISTING>
{
 
equip plate WEAR_BODY
 
load powersword max1
 
  {
 
  load silver_pile into safe_room
 
  }
 
}   
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
load guard into safe_room max 2
 +
{
 +
equip plate WEAR_BODY
 +
load powersword max1
 +
  {
 +
  load silver_pile into safe_room
 +
  }
 +
}   
  
<PARA>In this example we only load the silver pile if the guard loads
+
</PROGRAMLISTING></INFORMALEXAMPLE>
and if the power sword loads which may or may not happen since there is
 
only a max of one sword allowed while there is a max of 2 guards
 
allowed.  What will happen in this case is at the first reset there will
 
be one guard and one pile of silver.  The next reset there will still
 
only be one pile of silver but now there will be two guards.</PARA>
 
  
<PARA>Hopefully you have got the basic resets downIf not don't worry
+
<PARA>In this example we only load the silver pile if the guard loads
there are plenty more examples to come and we still have to make the
+
and if the power sword loads which may or may not happen since there is
resets for our dragon station zone.</PARA>
+
only a max of one sword allowed while there is a max of 2 guards
</sect1>
+
allowedWhat will happen in this case is at the first reset there will
 +
be one guard and one pile of silver.  The next reset there will still
 +
only be one pile of silver but now there will be two guards.</PARA>
  
 +
<PARA>Hopefully you have got the basic resets down.  If not don't worry
 +
there are plenty more examples to come and we still have to make the
 +
resets for our dragon station zone.</PARA>
 +
</sect1>
  
<sect1 id="resetfunction">
 
<TITLE>Special reset functions</TITLE>
 
  
<PARA>Now that we have gone over the basic load and equip commands we
+
<sect1 id="resetfunction">
have some special commands that you can add to them to make them do more
+
<TITLE>Special reset functions</TITLE>
interesting things.  Sometimes when doing resets you don't always want
 
items or NPCs to load or sometimes you want them to load but only if a
 
certain amount of other things correctly load.  There are also times you
 
want to clear the rooms or reload an entire object after removing the
 
old one.  All these things and more can be accomplished with the reset
 
section. </PARA>
 
  
<sect2 id="resetcomplete">
+
<PARA>Now that we have gone over the basic load and equip commands we
<TITLE>The complete directive.</TITLE>
+
have some special commands that you can add to them to make them do more
 +
interesting things.  Sometimes when doing resets you don't always want
 +
items or NPCs to load or sometimes you want them to load but only if a
 +
certain amount of other things correctly load.  There are also times you
 +
want to clear the rooms or reload an entire object after removing the
 +
old one.  All these things and more can be accomplished with the reset
 +
section. </PARA>
  
<PARA>The 'load' and 'equip' commands have one more argument that can be
+
<sect2 id="resetcomplete">
placed at the end of them to make them act a bit different.the complete
+
<TITLE>The complete directive.</TITLE>
directive. In the case where this directive is placed at the end
 
of a 'load or 'equip' command, the unit is only loaded in case all immediate commands inside
 
its nesting are executed successfully.  For example:</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The 'load' and 'equip' commands have one more argument that can be
 +
placed at the end of them to make them act a bit different.the complete
 +
directive. In the case where this directive is placed at the end
 +
of a 'load or 'equip' command, the unit is only loaded in case all immediate commands inside
 +
its nesting are executed successfully.  For example:</PARA>
  
load captain into jail_room complete
+
<INFORMALEXAMPLE><PROGRAMLISTING>
{
 
  equip magic_sword position WEAR_WIELD max 1
 
  load bag
 
  {
 
      load ruby_ring max 1
 
  }
 
}
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
load captain into jail_room complete
 +
{
 +
  equip magic_sword position WEAR_WIELD max 1
 +
  load bag
 +
  {
 +
      load ruby_ring max 1
 +
  }
 +
}
  
<PARA>In this case the captain is only loaded if the objects magic_sword
+
</PROGRAMLISTING></INFORMALEXAMPLE>
and bag are successfully loaded. if the ruby_ring is not loaded,
 
it will have no effect on the complete directive. To make the ruby_ring
 
affect to captains complete directive, the bag must also have specified a
 
complete directive (because the bag would then not be complete, and thus the
 
captain would not be complete). </PARA>
 
  
</sect2>
+
<PARA>In this case the captain is only loaded if the objects magic_sword
 +
and bag are successfully loaded. if the ruby_ring is not loaded,
 +
it will have no effect on the complete directive. To make the ruby_ring
 +
affect to captains complete directive, the bag must also have specified a
 +
complete directive (because the bag would then not be complete, and thus the
 +
captain would not be complete). </PARA>
  
<sect2>
+
</sect2>
<TITLE>The follow command</TITLE>
 
  
<PARA>Once you load a NPC you may want that NPC to follow another NPC.
+
<sect2>
  That is what the 'follow' command is for.  The following is the format
+
<TITLE>The follow command</TITLE>
  of the 'follow' command</PARA>
 
  
  <INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>Once you load a NPC you may want that NPC to follow another NPC.
 
+
  That is what the 'follow' command is for.  The following is the format
  follow &lt;symbol&gt; &lt;load amount #&gt; &lt;complete&gt;
+
  of the 'follow' command</PARA>
 
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
  
<VARIABLELIST>
+
  <INFORMALEXAMPLE><PROGRAMLISTING>
<VARLISTENTRY>
+
 
;symbol
+
  follow &lt;symbol&gt; &lt;load amount #&gt; &lt;complete&gt;
<DICTDEF>
+
 
<PARA>The first argument to the follow command is the symbolic name of
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
the NPC to follow the NPC of the outer grouping.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARIABLELIST>
;load amount
+
<VARLISTENTRY>
<DICTDEF>
+
;symbol
<PARA>the second argument is an optional argument that tells the reset
+
<DICTDEF>
how many of the NPC followers of this type  are allowed in the world, zone, or locally.  The
+
<PARA>The first argument to the follow command is the symbolic name of
possible values for this field are as follows:</PARA>
+
the NPC to follow the NPC of the outer grouping.</PARA>
    <VARIABLELIST>
+
</LISTITEM>
<VARLISTENTRY>
+
</VARLISTENTRY>
;max &lt;num&gt;
 
<DICTDEF>
 
<PARA>This  command is always  part  of another reset command (load,
 
equip, etc.).  At reset time the entire world is scanned for occurences
 
of the loaded unit - only if the currently existing number is less than
 
&lt;num&gt; will the command be executed.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;local &lt;num&gt;
+
;load amount
<DICTDEF>
+
<DICTDEF>
<PARA>This command is always  part  of  another  reset  command  (load,
+
<PARA>the second argument is an optional argument that tells the reset
equip, etc.)At reset time the location of which the unit is to
+
how many of the NPC followers of this type are allowed in the world, zone, or locallyThe
be loaded into is scanned for occurences of the loaded unit - only  if  the currently existing number is less than &lt;num&gt; will the
+
possible values for this field are as follows:</PARA>
command be executed.</PARA>
+
    <VARIABLELIST>
</LISTITEM>
+
<VARLISTENTRY>
</VARLISTENTRY>
+
;max &lt;num&gt;
<VARLISTENTRY>
+
<DICTDEF>
;zonemax &lt;num&gt;
+
<PARA>This command is always  part  of  another reset command (load,
<DICTDEF>
+
equip, etc.). At reset time the entire world is scanned for occurences
<PARA>This command is always  part  of  another reset command (load,
+
of the loaded unit - only if the currently existing number is less than
equip, etc.).   At reset time the entire zone being reset is
+
&lt;num&gt; will the command be executed.</PARA>
scanned for occurences of the loaded unit - only if the currently
+
</LISTITEM>
existing number is less than &lt;num&gt; will the command be
+
</VARLISTENTRY>
executed.</PARA>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<VARLISTENTRY>
;complete
+
;local &lt;num&gt;
<DICTDEF>
+
<DICTDEF>
<PARA>This only makes the NPC follow if all the other things in the
+
<PARA>This command is always  part  of  another  reset  command  (load,
grouping finishes completelyFor a better description of how this
+
equip, etc.).  At reset time the location of which the unit is to
directive works see <xref linkend="resetcomplete">.</PARA>
+
be loaded into is scanned for occurences of the loaded unit - only if the currently existing number is less than &lt;num&gt; will the
</LISTITEM>
+
command be executed.</PARA>
</VARLISTENTRY>
+
</LISTITEM>
</VARIABLELIST>
+
</VARLISTENTRY>
 +
<VARLISTENTRY>
 +
;zonemax &lt;num&gt;
 +
<DICTDEF>
 +
<PARA>This command is always  part  of  another  reset  command  (load,
 +
equip,  etc.).   At  reset  time  the entire zone being reset is
 +
scanned for occurences of the loaded unit - only if the currently
 +
existing number is less than &lt;num&gt; will the command be
 +
executed.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
<PARA>The follow command is always used nested inside a loaded
+
<VARLISTENTRY>
NPC to force the NPC &lt;symbol&gt; to follow the NPC of the outer
+
;complete
grouping.  The following would be a correct use of the follow
+
<DICTDEF>
command.</PARA>
+
<PARA>This only makes the NPC follow if all the other things in the
 +
grouping finishes completelyFor a better description of how this
 +
directive works see <xref linkend="resetcomplete">.</PARA>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<PARA>The follow command is always used nested inside a loaded
 +
NPC to force the NPC &lt;symbol&gt; to follow the NPC of the outer
 +
grouping.  The following would be a correct use of the follow
 +
command.</PARA>
  
load captain into jail
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  {
+
 
  follow guard max 4
+
load captain into jail
    {
+
  {
equip guard_helmet WEAR_HEAD
 
equip guard_plate WEAR_BODY
 
equip guard_legs WEAR_LEGS
 
equip guard_boots WEAR_FEET
 
}
 
 
  follow guard max 4
 
  follow guard max 4
    {
+
    {
equip guard_helmet WEAR_HEAD
+
equip guard_helmet WEAR_HEAD
equip guard_plate WEAR_BODY
+
equip guard_plate WEAR_BODY
equip guard_legs WEAR_LEGS
+
equip guard_legs WEAR_LEGS
equip guard_boots WEAR_FEET
+
equip guard_boots WEAR_FEET
}  
+
}
  }  
+
  follow guard max 4
 
+
    {
  </PROGRAMLISTING></INFORMALEXAMPLE>
+
equip guard_helmet WEAR_HEAD
 
+
equip guard_plate WEAR_BODY
  <PARA>This example would load two guards that are fully dressed and
+
equip guard_legs WEAR_LEGS
they would start following the captain which is also loaded.</PARA>
+
equip guard_boots WEAR_FEET
</sect2>
+
}  
<sect2>
+
  }  
<TITLE>The purge command</TITLE>
+
 
 +
  </PROGRAMLISTING></INFORMALEXAMPLE>
 +
 
 +
  <PARA>This example would load two guards that are fully dressed and
 +
they would start following the captain which is also loaded.</PARA>
 +
</sect2>
 +
<sect2>
 +
<TITLE>The purge command</TITLE>
  
<PARA>There are times when you want to clean up a room.  This can be
+
<PARA>There are times when you want to clean up a room.  This can be
done very easy by using the <command>purge</command>.  The following is
+
done very easy by using the <command>purge</command>.  The following is
the format of the purge command.</PARA>
+
the format of the purge command.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
purge &lt;symbol&gt;
+
purge &lt;symbol&gt;
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
  
<PARA>This command doesn't take much description.  The symbol is the
+
<PARA>This command doesn't take much description.  The symbol is the
room you want to empty of all objects and NPCs.  If you wanted to get
+
room you want to empty of all objects and NPCs.  If you wanted to get
rid of all objects and NPCs from a room with the symbolic name of jail
+
rid of all objects and NPCs from a room with the symbolic name of jail
it would look like this.</PARA>
+
it would look like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
purge jail
+
purge jail
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</sect2>
+
</sect2>
<sect2>
+
<sect2>
<TITLE>The random command</TITLE>
+
<TITLE>The random command</TITLE>
  
<PARA>If you ever want to load something only some of the time.  There
+
<PARA>If you ever want to load something only some of the time.  There
is a built in <command>random</command> command that allows you to pick
+
is a built in <command>random</command> command that allows you to pick
the percentage of the time that the item will load.  The random command
+
the percentage of the time that the item will load.  The random command
has the following format.</PARA>
+
has the following format.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
random &lt;num&gt;
+
random &lt;num&gt;
  {group or single set of resets}
+
  {group or single set of resets}
 
+
 
  </PROGRAMLISTING></INFORMALEXAMPLE>
+
  </PROGRAMLISTING></INFORMALEXAMPLE>
 
+
 
  <PARA>It is important to point out this is done by a random percentage
+
  <PARA>It is important to point out this is done by a random percentage
chance where as 1% of the time would be almost not at all and 100% of
+
chance where as 1% of the time would be almost not at all and 100% of
the time would be all the time.  If we wanted to load a group of things
+
the time would be all the time.  If we wanted to load a group of things
only 80% of the time it would look like this.</PARA>
+
only 80% of the time it would look like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
random 80
+
random 80
  {
+
  {
  load captain into jail_room complete
+
  load captain into jail_room complete
    {
+
    {
    equip magic_sword position WEAR_WIELD max 1
+
    equip magic_sword position WEAR_WIELD max 1
    load bag
+
    load bag
      {
+
      {
      load ruby_ring max 1
+
      load ruby_ring max 1
      }
+
      }
    }
+
    }
}
+
}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
</sect2>
+
</sect2>
<sect2>
+
<sect2>
<TITLE>The remove command</TITLE>
+
<TITLE>The remove command</TITLE>
  
<PARA>Many times players take items out of containers like chests or
+
<PARA>Many times players take items out of containers like chests or
steal items from your NPCs and leave them naked.  If the NPC is not dead
+
steal items from your NPCs and leave them naked.  If the NPC is not dead
the resets don't reload them therefore your NPCs will stand there empty
+
the resets don't reload them therefore your NPCs will stand there empty
and so will your chests.  This is fine if that is what you want but
+
and so will your chests.  This is fine if that is what you want but
sometimes you want them to get dressed or refilled again at reset time.  that is
+
sometimes you want them to get dressed or refilled again at reset time.  that is
what the <command>remove</command> command is for.  The following is the
+
what the <command>remove</command> command is for.  The following is the
format of the remove command.</PARA>
+
format of the remove command.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
remove &lt;symbol1&gt; in &lt;symbol2&gt;
+
remove &lt;symbol1&gt; in &lt;symbol2&gt;
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>Again the remove command is a simple command and it only has two
+
<PARA>Again the remove command is a simple command and it only has two
arguments, the item and where it is to remove it from.  If you
+
arguments, the item and where it is to remove it from.  If you
wanted to have a cabinet that at every reset it would have a knife and a
+
wanted to have a cabinet that at every reset it would have a knife and a
bag of sugar in it would look like this.</PARA>
+
bag of sugar in it would look like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
remove cabinet in kitchen
+
remove cabinet in kitchen
load cabinet into kitchen
+
load cabinet into kitchen
{
+
{
load sugarbag
+
load sugarbag
load knife
+
load knife
}
+
}
+
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
  
  
</sect2>
+
</sect2>
</sect1>
+
</sect1>
<sect1 id="resetdragon">
+
<sect1 id="resetdragon">
<TITLE>Reset walk through</TITLE>
+
<TITLE>Reset walk through</TITLE>
  
<PARA>The dragon station is almost finished.  All you have to do now is
+
<PARA>The dragon station is almost finished.  All you have to do now is
create the resets for it.  We don't have a lot of stuff in the zone but
+
create the resets for it.  We don't have a lot of stuff in the zone but
we have enough to make a decent example of how the resets work.  As I
+
we have enough to make a decent example of how the resets work.  As I
mentioned at the start of the chapter on resets I like to do the doors
+
mentioned at the start of the chapter on resets I like to do the doors
first, the objects in rooms second, then the NPCs.  again this is
+
first, the objects in rooms second, then the NPCs.  again this is
nothing we force you to do but I find it helps me keep track of my items
+
nothing we force you to do but I find it helps me keep track of my items
and NPCs.</PARA>
+
and NPCs.</PARA>
  
<PARA>With that in mind we will start by resetting our doors.  In the
+
<PARA>With that in mind we will start by resetting our doors.  In the
zone there is two doors.  One is a regular door that is closed when the
+
zone there is two doors.  One is a regular door that is closed when the
mud reboots and the other is a hidden and locked door when the mud
+
mud reboots and the other is a hidden and locked door when the mud
reboots.  We will not block the rooms in and show you them again but
+
reboots.  We will not block the rooms in and show you them again but
if you want to you can see the rooms in <xref linkend="finishedzone">.  
+
if you want to you can see the rooms in <xref linkend="finishedzone">.  
the resets for these doors would look like this.</PARA>
+
the resets for these doors would look like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
//Office door reset
+
//Office door reset
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}  
+
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}  
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
+
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
  
  
//secret door reset
+
//secret door reset
door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN}
+
door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN}
door portal_room  NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
+
door portal_room  NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<NOTE><PARA>Both sides of the door don't have to have the exact same
+
<NOTE><PARA>Both sides of the door don't have to have the exact same
flags the door in the office is hidden but the one on the ship is
+
flags the door in the office is hidden but the one on the ship is
not.</PARA></NOTE>
+
not.</PARA></NOTE>
  
  
<PARA>The next thing to build resets for is the two items we are loading
+
<PARA>The next thing to build resets for is the two items we are loading
directly into rooms and their contents if they have any.  The two items
+
directly into rooms and their contents if they have any.  The two items
we are loading into rooms are the board and the weapons locker.  I am
+
we are loading into rooms are the board and the weapons locker.  I am
just going to stick the board in the main chamber and the weapons locker
+
just going to stick the board in the main chamber and the weapons locker
in the office.  The reset for these two items looks like this.</PARA>
+
in the office.  The reset for these two items looks like this.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
load info_board into chamber
+
load info_board into chamber
  
load wpn_locker into office
+
load wpn_locker into office
  {
+
  {
  load w_stiletto  
+
  load w_stiletto  
  }
+
  }
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>Notice we also loaded a stiletto into the weapons locker and it will
+
<PARA>Notice we also loaded a stiletto into the weapons locker and it will
only load once a reboot since the cabinet will never be removed and
+
only load once a reboot since the cabinet will never be removed and
unless the cabinet reloads the stiletto will not reload.</PARA>
+
unless the cabinet reloads the stiletto will not reload.</PARA>
  
<PARA>finally we get to the NPcs and their equipment.  We only have 3
+
<PARA>finally we get to the NPcs and their equipment.  We only have 3
NPCs in our zone so it shouldn't be any problem especially since we don't
+
NPCs in our zone so it shouldn't be any problem especially since we don't
have that much close.  I am going to load the dragon into the ship on a
+
have that much close.  I am going to load the dragon into the ship on a
percentage chance basis and then load the Janitor into the station so he
+
percentage chance basis and then load the Janitor into the station so he
can get to cleaning it up.  Finally I will load Bob into the office so
+
can get to cleaning it up.  Finally I will load Bob into the office so
he can sit and count his money.</PARA>
+
he can sit and count his money.</PARA>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
load bob into office
+
load bob into office
  {
 
  equip pol_plate WEAR_BODY
 
  }
 
 
 
  load janitor into chamber
 
    {
 
equip pol_plate WEAR_BODY
 
}
 
 
random 50
 
 
  {
 
  {
  load bldragon
+
  equip pol_plate WEAR_BODY
      {
+
  }
  load maskwa
+
 
  }
+
  load janitor into chamber
  }    
+
    {
 
+
equip pol_plate WEAR_BODY
</PROGRAMLISTING></INFORMALEXAMPLE>
+
}
 +
 +
random 50
 +
  {
 +
  load bldragon
 +
      {
 +
  load maskwa
 +
  }
 +
  }    
 +
 
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
<PARA>Only a couple final things to point out.  It doesn't matter if you
+
<PARA>Only a couple final things to point out.  It doesn't matter if you
load the same type of plate or same type of clothing on every NPC.  It
+
load the same type of plate or same type of clothing on every NPC.  It
would look pretty silly if everyone was wearing the same clothes but I
+
would look pretty silly if everyone was wearing the same clothes but I
wanted to make sure you understood you didn't have to make one set for
+
wanted to make sure you understood you didn't have to make one set for
everyone.  Also you don't have to equip wearable things you can load
+
everyone.  Also you don't have to equip wearable things you can load
them into the inventory like we did with the ring on the dragon.  That
+
them into the inventory like we did with the ring on the dragon.  That
about covers it all.  The resets are now done and we can now put them
+
about covers it all.  The resets are now done and we can now put them
all together with the zone and complete our dragon station.</PARA>
+
all together with the zone and complete our dragon station.</PARA>
  
  
</sect1>
+
</sect1>
  
<sect1 id="finishedzone">
+
<sect1 id="finishedzone">
<TITLE>The complete dragon station</TITLE>
+
<TITLE>The complete dragon station</TITLE>
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
#include &lt;composed.h&gt;
+
#include &lt;composed.h&gt;
%zone dragonst
+
%zone dragonst
lifespan 20
+
lifespan 20
reset RESET_ANYHOW
+
reset RESET_ANYHOW
creators {"whistler"}
+
creators {"whistler"}
  
notes
+
notes
"This is the dragon station I shortened it to dragonst for ease in
+
"This is the dragon station I shortened it to dragonst for ease in
loading.  If you have  any questions email me at whistler@valhalla.com"
+
loading.  If you have  any questions email me at whistler@valhalla.com"
  
help
+
help
"Not sure what could help you now.  You are stuck on one of the
+
"Not sure what could help you now.  You are stuck on one of the
weirdest space stations you have ever seen and you smell burning
+
weirdest space stations you have ever seen and you smell burning
sulfur."
+
sulfur."
  
%rooms
+
%rooms
  
chamber
+
chamber
title "The middle chamber of the station"
+
title "The middle chamber of the station"
descr
+
descr
"This chamber seems to have the entire station rotating around it.  It is
+
"This chamber seems to have the entire station rotating around it.  It is
unbelievably large the ceiling seems to be a good 200 meeters high and
+
unbelievably large the ceiling seems to be a good 200 meeters high and
the room is perfectly cubic. Small human size ornate chairs with dragon
+
the room is perfectly cubic. Small human size ornate chairs with dragon
designs scrawled on the arms and back are arranged in a triangle like
+
designs scrawled on the arms and back are arranged in a triangle like
setting with one large chair at the front.  This must be where all
+
setting with one large chair at the front.  This must be where all
station meetings are held. large pictures cover the walls depicting
+
station meetings are held. large pictures cover the walls depicting
dragons in all kinds of situations.  large passages lead of to the west
+
dragons in all kinds of situations.  large passages lead of to the west
and the east.."
+
and the east.."
  
extra {"chair","chairs"}
+
extra {"chair","chairs"}
"The chairs are made of some metal you don't recognize and every inch is covered
+
"The chairs are made of some metal you don't recognize and every inch is covered
with some kind of dragon."
+
with some kind of dragon."
  
extra  {"dragon picture","picture"}
+
extra  {"dragon picture","picture"}
"Thousands of dragons dot the skies of this rather life like picture.  In the
+
"Thousands of dragons dot the skies of this rather life like picture.  In the
center you see something move.  It looks to be a little green dragon."
+
center you see something move.  It looks to be a little green dragon."
  
extra{"green dragon","dragon","green"}
+
extra{"green dragon","dragon","green"}
"An intellegence looking dragon is sitting perched on a large chair watching you."
+
"An intellegence looking dragon is sitting perched on a large chair watching you."
  
movement SECT_INSIDE
+
movement SECT_INSIDE
ALWAYS_LIGHT
+
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
  
west to disposal_room descr
+
west to disposal_room descr
"You see a small room.";
+
"You see a small room.";
  
east to hallway descr
+
east to hallway descr
"You see what looks to be a hallway.";
+
"You see what looks to be a hallway.";
  
end
+
end
  
hallway
+
hallway
title "Module tunnel"
+
title "Module tunnel"
descr "The hallway is about 50 meters long and around 100 meters from
+
descr "The hallway is about 50 meters long and around 100 meters from
side to side and top to bottom.  The hallway seems to be dust free.  The
+
side to side and top to bottom.  The hallway seems to be dust free.  The
walls and the floors seem to be made out of the same sterile
+
walls and the floors seem to be made out of the same sterile
metal-plastic that all space agencies uses.  There are large plate glass
+
metal-plastic that all space agencies uses.  There are large plate glass
windows that open up into space.  The hallway is filled with a dim light
+
windows that open up into space.  The hallway is filled with a dim light
that seems to come from everywhere yet no where all at once.  You notice
+
that seems to come from everywhere yet no where all at once.  You notice
a glimmer of bright light coming from the windows.  To the east you see
+
a glimmer of bright light coming from the windows.  To the east you see
an air lock and to the west the hallway opens up into a larger room."
+
an air lock and to the west the hallway opens up into a larger room."
  
extra {"windows","window"}
+
extra {"windows","window"}
"Your eyes are drawn to a large ship lit up with running lights sitting
+
"Your eyes are drawn to a large ship lit up with running lights sitting
about 1 kilometer from the station."
+
about 1 kilometer from the station."
  
extra{"floor","walls","wall"}
+
extra{"floor","walls","wall"}
"Well what can be said it looks to be in perfect condition.  What else would
+
"Well what can be said it looks to be in perfect condition.  What else would
you want to know?"
+
you want to know?"
  
extra {"large ship" ,"ship"}
+
extra {"large ship" ,"ship"}
"The ship looks really big and is shaped like a dragon.  The scales
+
"The ship looks really big and is shaped like a dragon.  The scales
sparkle and seem to be multiple colors."
+
sparkle and seem to be multiple colors."
  
movement SECT_INSIDE
+
movement SECT_INSIDE
ALWAYS_LIGHT
+
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
west to chamber descr
+
west to chamber descr
"The hallway opens up into a chamber.";  
+
"The hallway opens up into a chamber.";  
  
east to office descr
+
east to office descr
"You see what looks to be an office."
+
"You see what looks to be an office."
keyword {"air lock door","air lock","door"}
+
keyword {"air lock door","air lock","door"}
open {EX_OPEN_CLOSE, EX_CLOSED};
+
open {EX_OPEN_CLOSE, EX_CLOSED};
  
end
+
end
  
office
+
office
title "The station office"
+
title "The station office"
descr
+
descr
"Large paintings fill the walls of this part of the station.  The room
+
"Large paintings fill the walls of this part of the station.  The room
is as large as the other rooms big enough for Dragons to lounge while
+
is as large as the other rooms big enough for Dragons to lounge while
still having a desk in one corner small enough for a humanoid.  The
+
still having a desk in one corner small enough for a humanoid.  The
floor along the north wall is lined with some kind of fabric and seems
+
floor along the north wall is lined with some kind of fabric and seems
very soft to walk on, it may be some kind of dragon lounge judging by
+
very soft to walk on, it may be some kind of dragon lounge judging by
how large an area it covers.  There is a passage to the west."
+
how large an area it covers.  There is a passage to the west."
 +
 
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
movement SECT_INSIDE
+
extra {"paintings","painting"}
ALWAYS_LIGHT
+
"The paintings are of many dragons and riders in all kinds of tasks from
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
combat to look out.  All the figures seem to be staring at a staff
 +
being held by a depiction of a wizard on the south wall."
  
extra {"paintings","painting"}
+
extra {"wizard","staff"}
"The paintings are of many dragons and riders in all kinds of tasks from
+
"The wizard has his hand stretched out and it seems there is a place
combat to look out. All the figures seem to be staring at a staff
+
you can almost grab the staff. Maybe if you searched the staff you would
being held by a depiction of a wizard on the south wall."
+
find it."
  
extra {"wizard","staff"}
+
extra {"desk"}
"The wizard has his hand stretched out and it seems there is a place
+
"Its a desk alright but there doesn't seem to be any drawers and it
you can almost grab the staff. Maybe if you searched the staff you would
+
seems totally empty."
find it."
 
  
extra {"desk"}
+
extra{"fabric"}
"Its a desk alright but there doesn't seem to be any drawers and it
+
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
seems totally empty."
 
  
extra{"fabric"}
+
west to hallway descr
"Wussshhhhh you bound across the comfortable floor wasn't that fun."
+
"You see what looks to be a hallway."
 +
keyword {"air lock door","air lock","door"}
 +
open {EX_OPEN_CLOSE, EX_CLOSED};
  
west to hallway descr
+
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
"You see what looks to be a hallway."
+
south to portal_room descr
keyword {"air lock door","air lock","door"}
+
"You see what looks to be a portal room."
open {EX_OPEN_CLOSE, EX_CLOSED};
+
keyword {"air lock door","air lock","staff","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
  
SECRET_DOOR_DIFFICULTY(SOUTH, 50)
+
end
south to portal_room descr
 
"You see what looks to be a portal room."
 
keyword {"air lock door","air lock","staff","door"}
 
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};
 
  
end
+
portal_room
 +
title "Green field room"
 +
descr
 +
"Like the other rooms on the station this one is large enough for
 +
dragons to comfortably fit in.  The strange thing about this room though
 +
is it is totally empty except for a green field right in the center.
 +
there is a door that leads to another room to the north."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
extra {"green field","field"}
 +
"The field looks to be a green fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
 +
 +
north  to office descr
 +
"You see what looks to be an office."
 +
keyword {"air lock door","air lock","door"}
 +
key nokey
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 +
 +
//A link to the portal is also here from room_port
 +
end
 +
 +
ship_port
 +
names{"green field", "field"}
 +
title "Green field"
 +
descr
 +
"Green Mist swirls about you."
 +
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
 +
in ship
 +
 +
dilcopy force_move@function(
 +
//Time to activation
 +
4,
 +
//room and act
 +
"portal_room@dragonst!You feel your body dissolving for lack of a better
 +
description.&amp;You appear on the deck of a ship.",
 +
//True or False for randomizing or not
 +
FALSE);
 +
 +
 +
end                                           
  
portal_room
+
room_port
title "Green field room"
+
names{"green field", "field"}
 +
title "Green field"
 
descr
 
descr
"Like the other rooms on the station this one is large enough for
+
"Green Mist swirls about you."
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a green field right in the center.
 
there is a door that leads to another room to the north."
 
 
 
movement SECT_INSIDE
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
 
extra {"green field","field"}
+
in portal_room
"The field looks to be a green fog shifting and churning as you watch.
+
 
if you are nuts you could probably enter it."
 
 
north  to office descr
 
"You see what looks to be an office."
 
keyword {"air lock door","air lock","door"}
 
key nokey
 
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};
 
 
//A link to the portal is also here from room_port
 
end
 
 
ship_port
 
names{"green field", "field"}
 
title "Green field"
 
descr
 
"Green Mist swirls about you."
 
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
 
in ship
 
 
 
dilcopy force_move@function(
 
dilcopy force_move@function(
 
//Time to activation
 
//Time to activation
 
4,
 
4,
 
//room and act
 
//room and act
"portal_room@dragonst!You feel your body dissolving for lack of a better
+
"ship@dragonst!You feel your body dissolving for lack of a better
 
description.&amp;You appear on the deck of a ship.",
 
description.&amp;You appear on the deck of a ship.",
 
//True or False for randomizing or not
 
//True or False for randomizing or not
 
FALSE);
 
FALSE);
 
 
end                                           
 
  
room_port
 
names{"green field", "field"}
 
title "Green field"
 
descr
 
"Green Mist swirls about you."
 
movement SECT_INSIDE
 
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
in portal_room
+
end
  
dilcopy force_move@function(
+
disposal_room
//Time to activation
+
title "Red field room"
4,
+
descr
//room and act
+
"Like the other rooms on the station this one is large enough for
"ship@dragonst!You feel your body dissolving for lack of a better
+
dragons to comfortably fit in.  The strange thing about this room though
description.&amp;You appear on the deck of a ship.",
+
is it is totally empty except for a red field right in the center.
//True or False for randomizing or not
+
there is a door that leads to another room to the east."
FALSE);
 
  
 +
movement SECT_INSIDE
 +
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
end
+
extra {"red field","field"}
 +
"The field looks to be a red fog shifting and churning as you watch.
 +
if you are nuts you could probably enter it."
  
disposal_room
+
east to chamber descr
title "Red field room"
+
"You see the main chamber.";
descr
 
"Like the other rooms on the station this one is large enough for
 
dragons to comfortably fit in.  The strange thing about this room though
 
is it is totally empty except for a red field right in the center.
 
there is a door that leads to another room to the east."
 
  
movement SECT_INSIDE
+
//A link to the portal is also here from dis_port
ALWAYS_LIGHT
+
end
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
extra {"red field","field"}
+
dis_port
"The field looks to be a red fog shifting and churning as you watch.
+
names {"red field","field"}
if you are nuts you could probably enter it."
+
title "Red field"
 +
descr
 +
"Red Mist swirls about you."
  
east to chamber descr
+
movement SECT_INSIDE
"You see the main chamber.";
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 +
dilcopy force_move@function(
 +
//how fast to force move in seconds
 +
4,
 +
//room to force move to and act
 +
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
 +
//true or false random move or not
 +
0);
 +
in disposal_room
  
//A link to the portal is also here from dis_port
+
end
end
 
  
dis_port
+
ship
names {"red field","field"}
+
title "War dragon"
title "Red field"
+
descr
descr
+
"Blue light softly glows from con duets that line the walls of this ship.
"Red Mist swirls about you."
+
The floors beside the east and west wall have what looks to be soft
 +
fabric covering.  The south wall has small controls that seem to be made
 +
for humanoids with two small chairs that look to be pilot seats.  view
 +
portals are about 50 meters up the side of the ship on the west and east
 +
wall and some kind of electronic screen covers the south wall.  The ship
 +
seems to be a one room ship but there is a green field by the north
 +
wall."
  
movement SECT_INSIDE
+
movement SECT_INSIDE
ALWAYS_LIGHT
+
ALWAYS_LIGHT
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
dilcopy force_move@function(
 
//how fast to force move in seconds
 
4,
 
//room to force move to and act
 
"deathspace@dragonst!You feel your body dissolving for lack of a better description.",
 
//true or false random move or not
 
0);
 
in disposal_room
 
  
end
+
extra {"view port"}
 +
"Sorry your not 50 meters tall maybe it is made for a dragon?"
  
ship
+
extra {"view screen","screen"}
title "War dragon"
+
"It seems to be the pilots view screen but you can't seem to see a way
descr
+
to turn it on."
"Blue light softly glows from con duets that line the walls of this ship.
 
The floors beside the east and west wall have what looks to be soft
 
fabric covering.  The south wall has small controls that seem to be made
 
for humanoids with two small chairs that look to be pilot seats.  view
 
portals are about 50 meters up the side of the ship on the west and east
 
wall and some kind of electronic screen covers the south wall.  The ship
 
seems to be a one room ship but there is a green field by the north
 
wall."
 
  
movement SECT_INSIDE
+
extra {"controls","control"}
ALWAYS_LIGHT
+
"The controls are in some weird language and your afraid if you start
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
+
pushing buttons you might rocket in to the station or worse slam into
 +
a planet."
  
extra {"view port"}
+
extra {"soft fabric","fabric"}
"Sorry your not 50 meters tall maybe it is made for a dragon?"
+
"It looks to be a dragon lounge area."
  
extra {"view screen","screen"}
+
//A link to the portal is also here from ship_port
"It seems to be the pilots view screen but you can't seem to see a way
+
end
to turn it on."
 
  
extra {"controls","control"}
+
deathspace
"The controls are in some weird language and your afraid if you start
+
title"Open space"
pushing buttons you might rocket in to the station or worse slam into
+
descr
a planet."
+
"You see the ship and the station far off in the distance and you are in Space!"
  
extra {"soft fabric","fabric"}
+
movement SECT_INSIDE
"It looks to be a dragon lounge area."
+
ALWAYS_LIGHT
 +
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
  
//A link to the portal is also here from ship_port
+
dilcopy death_room@function (
end
+
//how often is damage done 4 would be 1 second
 +
4,
 +
//damage
 +
400,
 +
//act for the damage.
 +
"You realize to late that was the trash disposal transporter and you feel your lungs explode.");
  
deathspace
 
title"Open space"
 
descr
 
"You see the ship and the station far off in the distance and you are in Space!"
 
  
movement SECT_INSIDE
+
end
ALWAYS_LIGHT
 
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
 
  
dilcopy death_room@function (
+
%mobiles
//how often is damage done 4 would be 1 second
 
4,
 
//damage
 
400,
 
//act for the damage.
 
"You realize to late that was the trash disposal transporter and you feel your lungs explode.");
 
  
 +
bldragon
  
end
+
title "a black dragon"
 +
descr "A big ugly black dragon is clawing the ground here."
 +
names {"big ugly black dragon","ugly black dragon","big black dragon",
 +
"black dragon","dragon"}
  
%mobiles
+
extra {}
 +
"The black dragons scales glitter like black granite that has been
 +
polished for years by water.  He has a large neck and huge bat like
 +
wings.  his eyes watch you as you stand before him.  One claw seems to be
 +
tapping slightly on the ground as if the dragon is waiting for
 +
something."
  
bldragon
+
extra {"eye","eyes"}
 +
"The dragons eyes seem to follow you no matter where you go in the room
 +
nothing seems to escape the dragons attention."
  
title "a black dragon"
+
extra {"claws","claw"}
descr "A big ugly black dragon is clawing the ground here."
+
"The claw is big black and it looks very deadly.  It seems like the
names {"big ugly black dragon","ugly black dragon","big black dragon",
+
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
"black dragon","dragon"}
+
to say means the claws are about the size of short swords and long
 +
swords."
  
extra {}
+
extra {"scales","scale"}
"The black dragons scales glitter like black granite that has been
+
"Its a scale! Haven't you ever seen a dragon before!"
polished for years by water.  He has a large neck and huge bat like
 
wings. his eyes watch you as you stand before him.  One claw seems to be
 
tapping slightly on the ground as if the dragon is waiting for
 
something."
 
  
extra {"eye","eyes"}
+
extra {"bat wings","wings"}
"The dragons eyes seem to follow you no matter where you go in the room
+
"The dragon sees you looking and flaps his wings creating one heck of a
nothing seems to escape the dragons attention."
+
wind blast."
  
extra {"claws","claw"}
+
M_DRAGON_BLACK_OLD(SEX_MALE)
"The claw is big black and it looks very deadly.  It seems like the
 
dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which
 
to say means the claws are about the size of short swords and long
 
swords."
 
  
extra {"scales","scale"}
+
end
"Its a scale!  Haven't you ever seen a dragon before!"
 
  
extra {"bat wings","wings"}
+
janitor
"The dragon sees you looking and flaps his wings creating one heck of a
+
names {"ugly janitor", "janitor", "hobgoblin"}
wind blast."
+
title "an ugly janitor"
 +
descr "an ugly janitor is walking around, cleaning up."
  
M_DRAGON_BLACK_OLD(SEX_MALE)
+
extra{}
 +
"This ugly green thing looks more goblin than hobgoblin but he seems intent
 +
on cleaning everything around him."
  
end
+
M_AVG_HOBGOBLIN(6, SEX_MALE)
  
janitor
+
// he is sort of good for cleaning so much
names {"ugly janitor", "janitor", "hobgoblin"}
+
alignment 900
title "an ugly janitor"
 
descr "an ugly janitor is walking around, cleaning up."
 
  
extra{}
+
//give him some money
"This ugly green thing looks more goblin than hobgoblin but he seems intent
+
money 5 IRON_PIECE
on cleaning everything around him."
 
  
M_AVG_HOBGOBLIN(6, SEX_MALE)
+
dilcopy janitors@function(15);
  
// he is sort of good for cleaning so much
+
// only want him cleaning the station
alignment 900
+
dilcopy wander_zones@function("dragonst", 20, 1, 1);
  
//give him some money
+
end
money 5 IRON_PIECE
 
  
dilcopy janitors@function(15);
+
bob
  
// only want him cleaning the station
+
names {"Bob"}
dilcopy wander_zones@function("dragonst", 20, 1, 1);
+
title "Bob"
 +
descr "Bob the Banker is here, sitting behind the counter."
 +
extra {}
 +
"He has a very serious look on his face."
  
end
+
// define from composed.h
 +
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
  
bob
+
//discourage people from killing banker
 +
exp -500
  
names {"Bob"}
+
flags {UNIT_FL_NO_TELEPORT}
title "Bob"
 
descr "Bob the Banker is here, sitting behind the counter."
 
extra {}
 
"He has a very serious look on his face."
 
  
// define from composed.h
+
special SFUN_BANK
M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)
+
end
  
//discourage people from killing banker
+
%objects
exp -500
 
  
flags {UNIT_FL_NO_TELEPORT}
+
info_board
  
special SFUN_BANK
+
title "a merchant information board"
end
+
descr "A merchant information Board is mounted on a wall here."
 +
names {"merchant information board","information board","merchant
 +
board","board"} extra {} "A large flashy black steal board."
  
%objects
+
MATERIAL_METAL("A very fine quality black steel")
 +
type ITEM_BOARD
 +
dilcopy board@boards("info","","rem_res@boards","",100);
  
info_board
+
end
  
title "a merchant information board"
+
w_stiletto
descr "A merchant information Board is mounted on a wall here."
+
title "a stiletto"
names {"merchant information board","information board","merchant
+
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
board","board"} extra {} "A large flashy black steal board."
+
descr "A deadly looking stiletto has been left here."
  
MATERIAL_METAL("A very fine quality black steel")
+
MATERIAL_METAL("A very fine quality steel")
type ITEM_BOARD
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
dilcopy board@boards("info","","rem_res@boards","",100);
+
WEAPON_DEF(WPN_DAGGER, 1, 2)
 +
weight 2
 +
cost 2 GOLD_PIECE
 +
rent 1 COPPER_PIECE
  
end
+
SKILL_TRANSFER(SKI_BACKSTAB, 2)
 +
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
  
w_stiletto
+
extra{}
title "a stiletto"
+
"This looks like a thieves dream come true. "
names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"}
 
descr "A deadly looking stiletto has been left here."
 
  
MATERIAL_METAL("A very fine quality steel")
+
extra {"$identify"}
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
+
"The stiletto looks magical in nature and seems really sharp.  You can
WEAPON_DEF(WPN_DAGGER, 1, 2)
+
tell if you wield it you would be able to backstab someone really easy."
weight 2
 
cost 2 GOLD_PIECE
 
rent 1 COPPER_PIECE
 
  
SKILL_TRANSFER(SKI_BACKSTAB, 2)
+
extra{"$improved identify"}
dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");
+
"The stiletto gives you a magical bonus of +1 and has a quality of +2.
 +
It also raises your back stabbing skill  by 2%.  You have to have at
 +
least 10% in dex before you can wield this magical weapon."
  
extra{}
+
end
"This looks like a thieves dream come true. "
 
  
extra {"$identify"}
+
wpn_locker
"The stiletto looks magical in nature and seems really sharp.  You can
 
tell if you wield it you would be able to backstab someone really easy."
 
  
extra{"$improved identify"}
+
title "a weapons locker"
"The stiletto gives you a magical bonus of +1 and has a quality of +2.
+
names {"weapons locker","weapon locker","locker"}
It also raises your back stabbing skill  by 2%.  You have to have at
 
least 10% in dex before you can wield this magical weapon."
 
  
end
+
descr "a small weapons locker hangs on the wall here."
 +
manipulate {MANIPULATE_ENTER}
 +
CONTAINER_DEF(500)
 +
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 +
weight 400
 +
MATERIAL_METAL("A very fine quality steel")
  
wpn_locker
+
extra {}
 +
"It is an ordinary weapons locker that looks like it holds any illegal
 +
weapons that are taken on the station."
  
title "a weapons locker"
+
end
names {"weapons locker","weapon locker","locker"}
 
  
descr "a small weapons locker hangs on the wall here."
+
pol_plate
manipulate {MANIPULATE_ENTER}
+
names {"polished breast plate","polished plate","breast plate","plate"}
CONTAINER_DEF(500)
+
title "a polished breast plate"
open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
+
descr "A polished breast plate has been left here."
weight 400
+
extra{}
MATERIAL_METAL("A very fine quality steel")
+
"This is one shiny plate it seems to be made out of one perfect piece of
 +
metal.  There doesn't even seem to be any markings of owner ship." manipulate
 +
{MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_PLATE(5,9)
  
extra {}
+
MATERIAL_METAL("A high luster silver colored metal")
"It is an ordinary weapons locker that looks like it holds any illegal
 
weapons that are taken on the station."
 
  
end
+
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
 +
ARMOUR_DEF(ARM_PLATE,5,9)
 +
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
 +
cost 2 GOLD_PIECE
 +
rent 3 COPPER_PIECE
 +
weight 25
  
pol_plate
+
extra{"$identify"}
names {"polished breast plate","polished plate","breast plate","plate"}
+
"This is a high quality plate with a magical feeling."
title "a polished breast plate"
 
descr "A polished breast plate has been left here."
 
extra{}
 
"This is one shiny plate it seems to be made out of one perfect piece of
 
metal.  There doesn't even seem to be any markings of owner ship." manipulate
 
{MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_PLATE(5,9)
 
  
MATERIAL_METAL("A high luster silver colored metal")
+
extra{"$improved identify"}
 +
"The plate has a magical bonus to your defence of a +5 and a quality of
 +
+9.  You need 40% in strength to be able to wear it."
 +
end
  
manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY}
+
liq_ration
ARMOUR_DEF(ARM_PLATE,5,9)
+
names {"red bag", "bag", "wine"}
dilcopy abi_restrict@function (ABIL_STR,40,0,25,"");
+
title "a red bag"
cost 2 GOLD_PIECE
+
descr "A red bag has been gently placed here."
rent 3 COPPER_PIECE
 
weight 25
 
  
extra{"$identify"}
+
MATERIAL_ORGANIC("a soft plastic")
"This is a high quality plate with a magical feeling."
+
manipulate {MANIPULATE_TAKE}
  
extra{"$improved identify"}
+
LIQ_WINE(1,2,2,0)
"The plate has a magical bonus to your defence of a +5 and a quality of
+
cost 2 IRON_PIECE
+9You need 40% in strength to be able to wear it."
+
extra {}
end
+
"A small label reads Tassel Grove's finestYear 321"
  
liq_ration
+
extra {"$identify"}
names {"red bag", "bag", "wine"}
+
"Its the special wine from Tassel grove a small halfling village on the
title "a red bag"
+
planet Valhalla.  It seems like a great vintage wine."
descr "A red bag has been gently placed here."
 
  
MATERIAL_ORGANIC("a soft plastic")
+
end
manipulate {MANIPULATE_TAKE}
 
  
LIQ_WINE(1,2,2,0)
+
beef_stick
cost 2 IRON_PIECE
 
extra {}
 
"A small label reads Tassel Grove's finest.  Year 321"
 
  
extra {"$identify"}
+
title "a tough leathery stick"
"Its the special wine from Tassel grove a small halfling village on the
+
descr "A tough leathery looking stick is laying here."
planet Valhalla.  It seems like a great vintage wine."
+
names {"tough leathery stick","tough leather stick","leathery stick",
 +
"leather stick","tough stick","stick"}
  
end
+
extra {}
 +
"This has the word BEEF burnt into it."
  
beef_stick
+
manipulate {MANIPULATE_TAKE}
 +
FOOD_DEF(5,0)
 +
weight 1
 +
cost 1 COPPER_PIECE
 +
MATERIAL_ORGANIC("tough beef")
 +
end
  
title "a tough leathery stick"
+
  maskwa
descr "A tough leathery looking stick is laying here."
 
names {"tough leathery stick","tough leather stick","leathery stick",
 
"leather stick","tough stick","stick"}
 
  
extra {}
+
names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
"This has the word BEEF burnt into it."
+
title "a Maskwa ring"
 +
descr "A Maskwa platinum ring is laying here."
 +
MATERIAL_METAL("Platinum, and other precious metals")
 +
extra {}
 +
"The ring has a large bear head.  Could this be the legendary head of
 +
Maskwa?  Any thing formed with its head on it is said to strengthen the
 +
wearer."
 +
type ITEM_WORN
 +
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
 +
cost 100 COPPER_PIECE
 +
rent 50 IRON_PIECE
 +
weight 1
 +
STR_TRANSFER(+1)
 +
end
  
manipulate {MANIPULATE_TAKE}
+
%reset
FOOD_DEF(5,0)
 
weight 1
 
cost 1 COPPER_PIECE
 
MATERIAL_ORGANIC("tough beef")
 
end
 
  
  maskwa
+
//Office door reset
 +
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 +
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
  
names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"}
 
title "a Maskwa ring"
 
descr "A Maskwa platinum ring is laying here."
 
MATERIAL_METAL("Platinum, and other precious metals")
 
extra {}
 
"The ring has a large bear head.  Could this be the legendary head of
 
Maskwa?  Any thing formed with its head on it is said to strengthen the
 
wearer."
 
type ITEM_WORN
 
manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER}
 
cost 100 COPPER_PIECE
 
rent 50 IRON_PIECE
 
weight 1
 
STR_TRANSFER(+1)
 
end
 
  
%reset
+
//secret door reset
 +
door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN}
 +
door portal_room  NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
  
//Office door reset
 
door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 
door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
 
  
 +
load info_board into chamber
  
//secret door reset
+
load wpn_locker into office
door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN}
+
  {
door portal_room  NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}
+
  load w_stiletto
 +
  }
 +
 
 +
  load bob into office
 +
  {
 +
  equip pol_plate WEAR_BODY
 +
  }
 +
 
 +
  load janitor into chamber
 +
    {
 +
equip pol_plate WEAR_BODY
 +
}
  
  
load info_board into chamber
 
  
load wpn_locker into office
+
random 50
  {
+
  {
  load w_stiletto
+
  load bldragon
  }
+
      {
 
+
  load maskwa
  load bob into office
+
  }
  {
+
  }  
  equip pol_plate WEAR_BODY
 
  }
 
 
 
  load janitor into chamber
 
    {
 
equip pol_plate WEAR_BODY
 
}
 
  
 +
%end
  
 +
</PROGRAMLISTING></INFORMALEXAMPLE>
  
random 50
+
</sect1>
  {
+
</chapter>
  load bldragon
 
      {
 
  load maskwa
 
  }
 
  }  
 
  
%end
+
<chapter ID="ch-08"><?dbhtml filename="ch08.html">
 +
<TITLE>Color and formatting codes</title>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<para>Now that you have got a handle on how to build rooms, objects, and
 +
NPCs, we will now give you the ability to format text the way you want
 +
it formatted and color it as well.  Currently the VME doesn't support
 +
all the ASCII characters but if we get enough people wanting this
 +
ability it will be added.</para>
  
</sect1>
+
<sect1 id="escapecode">
</chapter>
+
<title>The escape character</title>
  
<chapter ID="ch-08"><?dbhtml filename="ch08.html">
+
<para>When working with colors or formatting there are always two parts
<TITLE>Color and formatting codes</title>
+
to a formatting command. The first part we call the escape character
 +
which is the '&amp;' character.  Thus all formatting and color commands
 +
would look as follows:</para>
  
<para>Now that you have got a handle on how to build rooms, objects, and
+
<programlisting>
NPCs, we will now give you the ability to format text the way you want
 
it formatted and color it as well.  Currently the VME doesn't support
 
all the ASCII characters but if we get enough people wanting this
 
ability it will be added.</para>
 
  
<sect1 id="escapecode">
+
&amp;&lt;color or formating command&gt;
<title>The escape character</title>
 
  
<para>When working with colors or formatting there are always two parts
+
</programlisting>
to a formatting command.  The first part we call the escape character
 
which is the '&amp;' character.  Thus all formatting and color commands
 
would look as follows:</para>
 
  
<programlisting>
+
</sect1>
  
&amp;&lt;color or formating command&gt;
+
<sect1>
 +
<title>Formatting codes</title>
  
</programlisting>
+
<para>As you may have noticed the string fields on the VME are formatted
 +
  in an english paragraph style.  What that means is all text is
 +
  formatted with he following rules:</para>
 +
 
 +
  <itemizedlist>
 +
  <listitem><para>
 +
  All leading blanks are stripped away. For room descriptions
 +
    3 leading spaces are added. This way we ensure a consistent
 +
    formatting of the displayed room descriptions.
 +
  </para></listitem>
 +
  <listitem><para>
  
</sect1>
+
Spaces and blanks (newlines) are contracted to single spaces
 +
    yielding a correctly 'wrapped' text for any sentence.
 +
  </para></listitem>
 +
  <listitem><para>
 +
If a '.' is encountered followed by a blank, a total of two
 +
    spaces are inserted after the '.'.
 +
  </para></listitem>
 +
  </itemizedlist>
  
<sect1>
+
<para>These formatting rules are great for normal descriptions and
<title>Formatting codes</title>
+
extras but what if you want to make a sign or a map.  You don't always
 +
want the text to be rapped, if the server rapped your sign it would turn
 +
out looking like a jumble of punctuation in the form of a paragraph.
 +
<xref linkend="formattable"> contains a list of all formatting
 +
characters and a short description of them.
 +
<xref linkend="formatdescr"> contains a more in depth discussion of each
 +
format command with examples and <xref linkend="colordescr"> deals with
 +
the color commands.</para>
  
<para>As you may have noticed the string fields on the VME are formatted
+
<TABLE frame=all id="formattable">
  in an english paragraph style.  What that means is all text is
+
<title>Formatting and color codes</title>
  formatted with he following rules:</para>
+
<TGROUP align=left cols=2 colsep=1>
 
 
  <itemizedlist>
 
  <listitem><para>
 
  All leading blanks are stripped away. For room descriptions
 
    3 leading spaces are added. This way we ensure a consistent
 
    formatting of the displayed room descriptions.
 
  </para></listitem>
 
  <listitem><para>
 
  
Spaces and blanks (newlines) are contracted to single spaces
+
<thead>
    yielding a correctly 'wrapped' text for any sentence.
+
<row>
  </para></listitem>
+
<entry>Code</entry>
  <listitem><para>
+
<entry>Description</entry>
If a '.' is encountered followed by a blank, a total of two
+
</row>
    spaces are inserted after the '.'.
+
</thead>
  </para></listitem>
 
  </itemizedlist>
 
  
<para>These formatting rules are great for normal descriptions and
+
<tbody>
extras but what if you want to make a sign or a map.  You don't always
+
<row>
want the text to be rapped, if the server rapped your sign it would turn
+
<entry>&amp;</entry>
out looking like a jumble of punctuation in the form of a paragraph.
+
<entry>Used to make an &amp; character instead of an escape code.</entry>
<xref linkend="formattable"> contains a list of all formatting
+
</row>
characters and a short description of them.
 
<xref linkend="formatdescr"> contains a more in depth discussion of each
 
format command with examples and <xref linkend="colordescr"> deals with
 
the color commands.</para>
 
  
<TABLE frame=all id="formattable">
 
<title>Formatting and color codes</title>
 
<TGROUP align=left cols=2 colsep=1>
 
  
<thead>
+
<row>
<row>
+
<entry>l</entry>
<entry>Code</entry>
+
<entry>
<entry>Description</entry>
+
Text from this point forward will not be formatted. It will
</row>
+
              be interpreted literally with newlines, spaces, etc.
</thead>
+
              Useful when making a sign or a map.
 +
</entry>
 +
</row>
  
<tbody>
+
<row>
<row>
+
<entry>f</entry>
<entry>&amp;</entry>
+
<entry>
<entry>Used to make an &amp; character instead of an escape code.</entry>
+
Text from this point forward will be formatted. This option
</row>
+
              is the reverse of &amp;l and is default on any section of text.
 +
</entry>
 +
</row>
  
 +
<row>
 +
<entry>s&lt;#&gt;</entry>
 +
<entry>
 +
Force a singe space character (or &lt;#&gt; if specified, may
 +
              come in handy, instead of having to toggle formatting).
 +
  </entry>
 +
  </row>
  
<row>
+
<row>
<entry>l</entry>
+
<entry>n</entry>
<entry>
+
<entry>
Text from this point forward will not be formatted. It will
+
Force a new line, very handy instead of toggling the &amp;l
              be interpreted literally with newlines, spaces, etc.
+
              formatting switch.  
              Useful when making a sign or a map.
+
</entry>
</entry>
+
</row>  
</row>
 
  
<row>
+
<row>
<entry>f</entry>
+
<entry>h</entry>
<entry>
+
<entry>
Text from this point forward will be formatted. This option
+
Clears the screen if the terminal of the user supports it.
              is the reverse of &amp;l and is default on any section of text.
+
</entry>
</entry>
+
</row>
</row>
 
  
<row>
+
<row>
<entry>s&lt;#&gt;</entry>
+
<entry>x</entry>
<entry>
+
<entry>
Force a singe space character (or &lt;#&gt; if specified, may
+
A file new line used for split so that you can split a file into lines
              come in handy, instead of having to toggle formatting).
+
</entry>
  </entry>
+
</row>
  </row>
 
  
<row>
+
<row>
<entry>n</entry>
+
<entry>c&lt;color&gt;</entry>
<entry>
+
<entry>
Force a new line, very handy instead of toggling the &amp;l
+
Set the foreground color.
              formatting switch.  
+
</entry>
</entry>
+
</row>
</row>  
+
<row>
 +
<entry>b&lt;color&gt;</entry>
 +
<entry>
 +
Set the background color.
 +
</entry>
 +
</row>
 +
<row>
 +
<entry>[&lt;color&gt;]</entry>
 +
<entry>
 +
Set a preset foreground and background color.
 +
</entry>
 +
</row>
 +
</tbody>
 +
</tgroup>
 +
</table>
 +
</sect1>
  
<row>
+
<sect1 id="formatdescr"
<entry>h</entry>
+
<title>Formatting code descriptions and examples</title>
<entry>
+
<VARIABLELIST>
Clears the screen if the terminal of the user supports it.
+
<VARLISTENTRY>
</entry>
+
;&amp;&amp;
</row>
+
<DICTDEF>
 +
<para>If you want a single '&' you must let the <ACRONYM>VME</ACRONYM>
 +
know that you don't want a formatting or a color code.  You do this by
 +
doubling the '&amp;' sign.  The following is a couple examples:</para>
  
<row>
+
<INFORMALTABLE frame=all>
<entry>x</entry>
+
<TGROUP align=left cols=2 colsep=1>
<entry>
 
A file new line used for split so that you can split a file into lines
 
</entry>
 
</row>
 
  
<row>
+
<thead>
<entry>c&lt;color&gt;</entry>
+
<row>
<entry>
+
<entry>text</entry>
Set the foreground color.
+
<entry>Result</entry>
</entry>
+
</row>
</row>
+
</thead>
<row>
+
<tbody>
<entry>b&lt;color&gt;</entry>
+
<row>
<entry>
+
<entry>&amp;&amp;</entry>
Set the background color.
+
<entry>&amp;</entry>
</entry>
+
</row>
</row>
+
<row>
<row>
+
<entry>&amp;&&amp;&amp;</entry>
<entry>[&lt;color&gt;]</entry>
+
<entry>&amp;&amp;</entry>
<entry>
+
</row>
Set a preset foreground and background color.
 
</entry>
 
</row>
 
</tbody>
 
</tgroup>
 
</table>
 
</sect1>
 
  
<sect1 id="formatdescr"
 
<title>Formatting code descriptions and examples</title>
 
<VARIABLELIST>
 
<VARLISTENTRY>
 
;&amp;&amp;
 
<DICTDEF>
 
<para>If you want a single '&' you must let the <ACRONYM>VME</ACRONYM>
 
know that you don't want a formatting or a color code.  You do this by
 
doubling the '&amp;' sign.  The following is a couple examples:</para>
 
  
<INFORMALTABLE frame=all>
+
<row>
<TGROUP align=left cols=2 colsep=1>
+
<entry>&amp;&amp;&amp;&amp;&amp;&amp;</entry>
 +
<entry>&amp;&amp;&amp;</entry>
 +
</row>
 +
</tbody>
 +
</tgroup>
 +
</INFORMALTABLE>
  
<thead>
+
</LISTITEM>
<row>
+
</VARLISTENTRY>
<entry>text</entry>
 
<entry>Result</entry>
 
</row>
 
</thead>
 
<tbody>
 
<row>
 
<entry>&amp;&amp;</entry>
 
<entry>&amp;</entry>
 
</row>
 
<row>
 
<entry>&amp;&&amp;&amp;</entry>
 
<entry>&amp;&amp;</entry>
 
</row>
 
  
 +
<VARLISTENTRY>
 +
;&amp;l
 +
<DICTDEF>
  
<row>
+
<para>When you want to turn off the formatting you use this formatting
<entry>&amp;&amp;&amp;&amp;&amp;&amp;</entry>
+
code.  Everything after the '&amp;l' will be shown exactly as you put it
<entry>&amp;&amp;&amp;</entry>
+
in the string.</para>
</row>
 
</tbody>
 
</tgroup>
 
</INFORMALTABLE>
 
  
</LISTITEM>
+
<programlisting>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
&amp;l
;&amp;l
+
*    *
<DICTDEF>
+
*  *
 +
  * *
 +
  *
 +
  * *
 +
*  *
 +
*    *
 +
               
 +
</programlisting>
  
<para>When you want to turn off the formatting you use this formatting
+
</LISTITEM>
code.  Everything after the '&amp;l' will be shown exactly as you put it
+
</VARLISTENTRY>
in the string.</para>
 
  
<programlisting>
+
<VARLISTENTRY>
 +
;&amp;f
 +
<DICTDEF>
 +
<para>The formatted text as we have already said is default.  If you
 +
want to turn the formatted text back on after some literal text you will
 +
have to use the '&amp;f' code.  The following is an example of some
 +
literal text followed by a short bit of formatted text.</para>
  
&amp;l
+
<Programlisting>
*    *
 
*  *
 
  * *
 
  *
 
  * *
 
*  *
 
*    *
 
               
 
</programlisting>
 
  
</LISTITEM>
+
&amp;l
</VARLISTENTRY>
+
*    *
 +
*  *
 +
  * *
 +
  *
 +
  * *
 +
*  *
 +
*    *
  
<VARLISTENTRY>
+
&amp;fThe X marks the spot!  
;&amp;f
 
<DICTDEF>
 
<para>The formatted text as we have already said is default.  If you
 
want to turn the formatted text back on after some literal text you will
 
have to use the '&amp;f' code. The following is an example of some
 
literal text followed by a short bit of formatted text.</para>
 
  
<Programlisting>
+
</programlisting>
  
&amp;l
+
</LISTITEM>
*    *
+
</VARLISTENTRY>
*  *
 
  * *
 
  *
 
  * *
 
*  *
 
*    *
 
  
&amp;fThe X marks the spot! 
 
  
</programlisting>
+
<VARLISTENTRY>
 +
;&amp;s&lt;#&gt;
 +
<DICTDEF>
  
</LISTITEM>
+
<para>If you want to input extra spaces in a sentence with out using the
</VARLISTENTRY>
+
'&amp;l' you can add them one at a time or multiple by using the
 +
'&amp;s' code.</para>
  
 +
<programlisting>
  
<VARLISTENTRY>
+
This sentence has 10 spaces&amp;s10before the first word before.
;&amp;s&lt;#&gt;
 
<DICTDEF>
 
  
<para>If you want to input extra spaces in a sentence with out using the
+
</programlisting>
'&amp;l' you can add them one at a time or multiple by using the
+
</LISTITEM>
'&amp;s' code.</para>
+
</VARLISTENTRY>
  
<programlisting>
 
  
This sentence has 10 spaces&amp;s10before the first word before.
+
<VARLISTENTRY>
 +
;&amp;n
 +
<DICTDEF>
  
</programlisting>
+
<para>If you want to input some blank lines with out using the literal
</LISTITEM>
+
code you can add a '&amp;n'for each line you want.</para>
</VARLISTENTRY>
 
  
 +
<programlisting>
  
<VARLISTENTRY>
+
This sentence&amp;n&amp;n&amp;n would look like this:
;&amp;n
 
<DICTDEF>
 
  
<para>If you want to input some blank lines with out using the literal
 
code you can add a '&amp;n'for each line you want.</para>
 
  
<programlisting>
+
This sentence
  
This sentence&amp;n&amp;n&amp;n would look like this:
 
  
 +
would look like this:
  
This sentence
+
</programlisting>
  
 +
</LISTITEM>
 +
</VARLISTENTRY>
  
would look like this:
+
<VARLISTENTRY>
 +
;&amp;x
 +
<DICTDEF>
  
</programlisting>
+
<para>The line break is made for use with the <ACRONYM>DIL</ACRONYM> language.  You will
 +
not need it to do regular text formatting.  It was added so a
 +
<ACRONYM>DIL</ACRONYM> could split a string that is loaded from a file.  If you
 +
don't understand the following example don't worry it is explained more
 +
in the <ACRONYM>DIL</ACRONYM> reference.</para>
  
</LISTITEM>
+
<programlisting>
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
mystrlist:=split(string,"&amp;");
;&amp;x
 
<DICTDEF>
 
  
<para>The line break is made for use with the <ACRONYM>DIL</ACRONYM> language.  You will
+
</programlisting>
not need it to do regular text formatting.  It was added so a
+
</LISTITEM>
<ACRONYM>DIL</ACRONYM> could split a string that is loaded from a file.  If you
+
</VARLISTENTRY>
don't understand the following example don't worry it is explained more
 
in the <ACRONYM>DIL</ACRONYM> reference.</para>
 
  
<programlisting>
+
<VARLISTENTRY>
 +
;&amp;h
 +
<DICTDEF>
  
mystrlist:=split(string,"&amp;");
+
<para>On terminals that can handle it the '&amp;h' will clear the
 +
screen.  If you wanted a sign that would clear the screen before
 +
displaying when a character looked at it would look like this.</para>
  
</programlisting>
+
<programlisting>
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
&amp;h&amp;l
;&amp;h
+
*    *
<DICTDEF>
+
*  *
 +
  * *
 +
  *
 +
  * *
 +
*  *
 +
*    *
  
<para>On terminals that can handle it the '&amp;h' will clear the
+
&amp;fThe X marks the spot!  
screen. If you wanted a sign that would clear the screen before
 
displaying when a character looked at it would look like this.</para>
 
  
<programlisting>
+
</programlisting>
 +
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
  
&amp;h&amp;l
+
</sect1>
*    *
 
*  *
 
  * *
 
  *
 
  * *
 
*  *
 
*    *
 
  
&amp;fThe X marks the spot! 
+
<sect1 id="colordescr">
 +
<title>Color code descriptions and examples</title>
  
</programlisting>
 
</LISTITEM>
 
</VARLISTENTRY>
 
</VARIABLELIST>
 
  
</sect1>
+
<VARIABLELIST>
 +
<VARLISTENTRY>
 +
;&amp;c and &amp;b
 +
<DICTDEF>
  
<sect1 id="colordescr">
+
<para>In order to allow you to change the colors there are two codes.  One is
<title>Color code descriptions and examples</title>
+
for the foreground color (&amp;c) and the other is for the background
 +
color (&amp;b).  '&amp;c' is used with one or two
 +
arguments depending on brightness, while the '&amp;b' s only used with
 +
one because it has only one brightness.  They both have the forms as follows:</para>
  
 +
<programlisting>
  
<VARIABLELIST>
+
&amp;c&lt;bright&gt;&lt;color&gt;
<VARLISTENTRY>
+
&amp;b&lt;color&gt;
;&amp;c and &amp;b
 
<DICTDEF>
 
  
<para>In order to allow you to change the colors there are two codes.  One is
+
</programlisting>
for the foreground color (&amp;c) and the other is for the background
 
color (&amp;b).  '&amp;c' is used with one or two
 
arguments depending on brightness, while the '&amp;b' s only used with
 
one because it has only one brightness.  They both have the forms as follows:</para>
 
  
<programlisting>
+
<para>It is important to set both the foreground and background color
 +
because if a player has his default background color set to blue and you
 +
use blue as a foreground color it will make the letters invisible to the
 +
player.  It is also important to set the colors back to the default
 +
color when done.  this is done by using the following command:</para>
  
&amp;c&lt;bright&gt;&lt;color&gt;
+
<programlisting>
&amp;b&lt;color&gt;
 
  
</programlisting>
+
&amp;[default]
  
<para>It is important to set both the foreground and background color
+
</programlisting>
because if a player has his default background color set to blue and you
 
use blue as a foreground color it will make the letters invisible to the
 
player.  It is also important to set the colors back to the default
 
color when done.  this is done by using the following command:</para>
 
  
<programlisting>
+
<note><para>The '&amp;[default]' command will be described in the next
 +
section.  It is enough to know for now that it will return the players
 +
colors to their default colors.</para></note>
  
&amp;[default]
+
<para>Before we give some color examples we should now define the
 +
symbols for brightness and the symbols for each color and what they
 +
are.</para>
  
</programlisting>
+
<TABLE frame=all>
 +
<title>Colors</title>
 +
<TGROUP align=left cols=2 colsep=1>
  
<note><para>The '&amp;[default]' command will be described in the next
+
<thead>
section.  It is enough to know for now that it will return the players
+
<row>
colors to their default colors.</para></note>
+
<entry>Code</entry>
 +
<entry>Color</entry>
 +
</row>
 +
</thead>
 +
<tbody>
 +
<row>
 +
<entry>n</entry>
 +
<entry>Black</entry>
 +
</row>
  
<para>Before we give some color examples we should now define the
+
<row>
symbols for brightness and the symbols for each color and what they
+
<entry>r</entry>
are.</para>
+
<entry>Red</entry>
 +
</row>
  
<TABLE frame=all>
+
<row>
<title>Colors</title>
+
<entry>g </entry>
<TGROUP align=left cols=2 colsep=1>
+
<entry>Green</entry>
 +
</row>
  
<thead>
+
<row>
<row>
+
<entry>y</entry>
<entry>Code</entry>
+
<entry>Yellow</entry>
<entry>Color</entry>
+
</row>
</row>
 
</thead>
 
<tbody>
 
<row>
 
<entry>n</entry>
 
<entry>Black</entry>
 
</row>
 
  
<row>
+
<row>
<entry>r</entry>
+
<entry>b</entry>
<entry>Red</entry>
+
<entry>Blue</entry>
</row>
+
</row>
  
<row>
+
<row>
<entry>g </entry>
+
<entry>m</entry>
<entry>Green</entry>
+
<entry>Magenta</entry>
</row>
+
</row>
  
<row>
+
<row>
<entry>y</entry>
+
<entry>c</entry>
<entry>Yellow</entry>
+
<entry>Cyan</entry>
</row>
+
</row>
  
<row>
+
<row>
<entry>b</entry>
+
<entry>w</entry>
<entry>Blue</entry>
+
<entry>White</entry>
</row>
+
</row>
 +
</tbody>
 +
</tgroup>
 +
</table>
  
<row>
+
<TABLE frame=all>
<entry>m</entry>
+
<title>Sample Color codes</title>
<entry>Magenta</entry>
+
<TGROUP align=left cols=2 colsep=1>
</row>
+
<thead>
 +
<row>
 +
<entry>Code</entry>
 +
<entry>Resulting Colors</entry>
 +
</row>
 +
</thead>
 +
<tbody>
 +
<row>
 +
<entry>&amp;cb&amp;bw</entry>
 +
<entry></entry>
 +
</row>
  
<row>
+
<row>
<entry>c</entry>
+
<entry>&amp;+g&amp;bn</entry>
<entry>Cyan</entry>
+
<entry></entry>
</row>
+
</row>
  
<row>
 
<entry>w</entry>
 
<entry>White</entry>
 
</row>
 
</tbody>
 
</tgroup>
 
</table>
 
  
<TABLE frame=all>
+
<row>
<title>Sample Color codes</title>
+
<entry>&amp;c+w&amp;r</entry>
<TGROUP align=left cols=2 colsep=1>
+
<entry></entry>
<thead>
+
</row>
<row>
 
<entry>Code</entry>
 
<entry>Resulting Colors</entry>
 
</row>
 
</thead>
 
<tbody>
 
<row>
 
<entry>&amp;cb&amp;bw</entry>
 
<entry></entry>
 
</row>
 
  
<row>
 
<entry>&amp;+g&amp;bn</entry>
 
<entry></entry>
 
</row>
 
  
 +
<row>
 +
<entry>&amp;c+w&amp;bn</entry>
 +
<entry></entry>
 +
</row>
  
<row>
+
</tbody>
<entry>&amp;c+w&amp;r</entry>
+
</tgroup>
<entry></entry>
+
</table>
</row>
+
</LISTITEM>
 +
</VARLISTENTRY>
  
 +
<VARLISTENTRY>
 +
<TERM>&amp;[&lt;color&gt;]</TERM>
 +
<LISTITEM>
  
<row>
+
<para>As we have said in the previous section if you are not careful you
<entry>&amp;c+w&amp;bn</entry>
+
can make your text not visible by the player by setting the foreground to
<entry></entry>
+
the same color as the background.  In order to make it possible for you
</row>
+
to easily change how the color looks and to even match it with the way
 +
players have their colors set already we have created colors that the
 +
players can set.  and you can use.  The <acronym>VME</acronym> comes
 +
with a default list of colors which can be added to by either the
 +
''color.def'' or even by a <acronym>DIL</acronym>
 +
program on line.  The default colors are as follows:</para>
 +
<INFORMALTABLE frame=all>
 +
<TGROUP align=left cols=3 colsep=1>
 +
<tbody>
 +
<row>
 +
<entry>death</entry>
 +
<entry>default</entry>
 +
<entry>exit</entry>
 +
</row>
 +
<row>
 +
<entry>group</entry>
 +
<entry>hit_me</entry>
 +
<entry>hit_opponent</entry>
 +
</row>
 +
<row>
 +
<entry>hit_other</entry>
 +
<entry>immort_descr</entry>
 +
<entry>immort_title</entry>
 +
</row>
 +
<row>
 +
<entry>log</entry>
 +
<entry>miss_me</entry>
 +
<entry>miss_opponent</entry>
 +
</row>
 +
<row>
 +
<entry>miss_other</entry>
 +
<entry>nodam_me</entry>
 +
<entry>nodam_opponent</entry>
 +
</row>
 +
<row>
 +
<entry>nodam_other</entry>
 +
<entry>npc_descr</entry>
 +
<entry>npc_title</entry>
 +
</row>
 +
<row>
 +
<entry>obj_descr</entry>
 +
<entry>obj_title</entry>
 +
<entry>pc_descr</entry>
 +
</row>
 +
<row>
 +
<entry>pc_title</entry>
 +
<entry>prompt</entry>
 +
<entry>respond</entry>
 +
</row>
 +
<row>
 +
<entry>room_descr</entry>
 +
<entry>broom_title</entry>
 +
<entry>say_other</entry>
 +
</row>
 +
<row>
 +
<entry>say_self</entry>
 +
<entry>shield_me</entry>
 +
<entry>shield_opponent</entry>
 +
</row>
 +
<row>
 +
<entry>shield_other</entry>
 +
<entry>shout_other</entry>
 +
<entry>shout_self</entry>
 +
</row>
 +
<row>
 +
<entry>social_other</entry>
 +
<entry>social_self</entry>
 +
<entry>spells</entry>
 +
</row>
 +
<row>
 +
<entry>tell_other</entry>
 +
<entry>tell_self</entry>
 +
<entry>time</entry>
 +
</row>
 +
<row>
 +
<entry>weather</entry>
 +
<entry>whisper</entry>
 +
<entry>who</entry>
 +
</row>
 +
<row>
 +
<entry>who_guild</entry>
 +
<entry>who_inv</entry>
 +
<entry>who_name</entry>
 +
</row>
 +
<row>
 +
<entry>who_title</entry>
 +
<entry>wiz</entry>
 +
<entry>xpgain</entry>
 +
</row>
 +
</tbody>
 +
</tgroup>
 +
</informaltable>
  
</tbody>
+
<para>To use these colors all you have to do is use the following formatting command:</para>
</tgroup>
 
</table>
 
</LISTITEM>
 
</VARLISTENTRY>
 
  
<VARLISTENTRY>
+
<programlisting>
<TERM>&amp;[&lt;color&gt;]</TERM>
 
<LISTITEM>
 
  
<para>As we have said in the previous section if you are not careful you
+
&amp;[color]
can make your text not visible by the player by setting the foreground to
 
the same color as the background.  In order to make it possible for you
 
to easily change how the color looks and to even match it with the way
 
players have their colors set already we have created colors that the
 
players can set.  and you can use.  The <acronym>VME</acronym> comes
 
with a default list of colors which can be added to by either the
 
''color.def'' or even by a <acronym>DIL</acronym>
 
program on line.  The default colors are as follows:</para>
 
<INFORMALTABLE frame=all>
 
<TGROUP align=left cols=3 colsep=1>
 
<tbody>
 
<row>
 
<entry>death</entry>
 
<entry>default</entry>
 
<entry>exit</entry>
 
</row>
 
<row>
 
<entry>group</entry>
 
<entry>hit_me</entry>
 
<entry>hit_opponent</entry>
 
</row>
 
<row>
 
<entry>hit_other</entry>
 
<entry>immort_descr</entry>
 
<entry>immort_title</entry>
 
</row>
 
<row>
 
<entry>log</entry>
 
<entry>miss_me</entry>
 
<entry>miss_opponent</entry>
 
</row>
 
<row>
 
<entry>miss_other</entry>
 
<entry>nodam_me</entry>
 
<entry>nodam_opponent</entry>
 
</row>
 
<row>
 
<entry>nodam_other</entry>
 
<entry>npc_descr</entry>
 
<entry>npc_title</entry>
 
</row>
 
<row>
 
<entry>obj_descr</entry>
 
<entry>obj_title</entry>
 
<entry>pc_descr</entry>
 
</row>
 
<row>
 
<entry>pc_title</entry>
 
<entry>prompt</entry>
 
<entry>respond</entry>
 
</row>
 
<row>
 
<entry>room_descr</entry>
 
<entry>broom_title</entry>
 
<entry>say_other</entry>
 
</row>
 
<row>
 
<entry>say_self</entry>
 
<entry>shield_me</entry>
 
<entry>shield_opponent</entry>
 
</row>
 
<row>
 
<entry>shield_other</entry>
 
<entry>shout_other</entry>
 
<entry>shout_self</entry>
 
</row>
 
<row>
 
<entry>social_other</entry>
 
<entry>social_self</entry>
 
<entry>spells</entry>
 
</row>
 
<row>
 
<entry>tell_other</entry>
 
<entry>tell_self</entry>
 
<entry>time</entry>
 
</row>
 
<row>
 
<entry>weather</entry>
 
<entry>whisper</entry>
 
<entry>who</entry>
 
</row>
 
<row>
 
<entry>who_guild</entry>
 
<entry>who_inv</entry>
 
<entry>who_name</entry>
 
</row>
 
<row>
 
<entry>who_title</entry>
 
<entry>wiz</entry>
 
<entry>xpgain</entry>
 
</row>
 
</tbody>
 
</tgroup>
 
</informaltable>
 
  
<para>To use these colors all you have to do is use the following formatting command:</para>
+
</programlisting>
  
<programlisting>
+
<para>The color that will be shown is the color that the player has set
 +
for the color in question.  If for example the player has his or her
 +
'death' color set to bright red with a black background and you have a
 +
description as follows:</para>
  
&amp;[color]
+
<programlisting>
  
</programlisting>
+
descr
 +
"This is a &amp;[death]death&amp;[room_descr]room"
  
<para>The color that will be shown is the color that the player has set
+
</programlisting>
for the color in question.  If for example the player has his or her
 
'death' color set to bright red with a black background and you have a
 
description as follows:</para>
 
  
<programlisting>
+
<para>The description would be in the players 'room_descr' color while
 +
the word death would be in his or hers 'death' color.  You should note
 +
we had to set the color back to the room description color so that the
 +
rest of the description was not in the 'death' color.</para>
  
descr
+
<para>To change the players color to the default out put color which is the color that is
"This is a &amp;[death]death&amp;[room_descr]room"
+
used when no color is specified by the server then you use
 +
'default'.  You probably won't use this in normal zone building but it
 +
is very important to know it exists when you start making spells,
 +
skills, and commands with <acronym>DIL</acronym></para>
  
</programlisting>
+
</LISTITEM>
 +
</VARLISTENTRY>
 +
</VARIABLELIST>
 +
</sect1>
  
<para>The description would be in the players 'room_descr' color while
+
</chapter>
the word death would be in his or hers 'death' color.  You should note
 
we had to set the color back to the room description color so that the
 
rest of the description was not in the 'death' color.</para>
 
  
<para>To change the players color to the default out put color which is the color that is
+
<chapter ID="ch-09"><?dbhtml filename="ch09.html">
used when no color is specified by the server then you use
+
<TITLE>The <ACRONYM>DIL</ACRONYM> section</TITLE>
'default'. You probably won't use this in normal zone building but it
 
is very important to know it exists when you start making spells,
 
skills, and commands with <acronym>DIL</acronym></para>
 
  
</LISTITEM>
+
<PARA>When I first thought of writing this manual I had planned to leave
</VARLISTENTRY>
+
<ACRONYM>DIL</ACRONYM> totally out of it.  The <ACRONYM>DIL</ACRONYM> language always confuses new Builders
</VARIABLELIST>  
+
and complicates teaching simple rooms, objects, and NPCs.  It became
</sect1>
+
clear to me though that <ACRONYM>DIL</ACRONYM> is such a part of the server that I at least
 +
had to mention it hear so builders would know where to look and
 +
what <ACRONYM>DIL</ACRONYM> could do for them when they got to the point where they were
 +
ready to use it.</PARA>
  
</chapter>
+
<sect1 id="dilsect">
 +
<TITLE>What is <ACRONYM>DIL</ACRONYM>?</TITLE>
  
<chapter ID="ch-09"><?dbhtml filename="ch09.html">
+
<PARA><ACRONYM>DIL</ACRONYM> is short for, Data-based instructional language. Not to be
<TITLE>The <ACRONYM>DIL</ACRONYM> section</TITLE>
+
confused with Database since <ACRONYM>DIL</ACRONYM> is nothing like a database.  Data-based
 +
means that the language works on a fixed set of units like objects,
 +
NPCS, and rooms and is designed to give them a life of their own.
 +
Unlike on many of the mud servers on the internet <ACRONYM>DIL</ACRONYM> is not an
 +
interpreted language it is a compiled language which gives you the user
 +
much more safe guards against crashes and slow code.</PARA>
  
<PARA>When I first thought of writing this manual I had planned to leave
+
<PARA><ACRONYM>DIL</ACRONYM> also provides a full set of data types to allow you to do
<ACRONYM>DIL</ACRONYM> totally out of it.  The <ACRONYM>DIL</ACRONYM> language always confuses new Builders
+
calculations or store information from players.  The <ACRONYM>DIL</ACRONYM> language can
and complicates teaching simple rooms, objects, and NPCsIt became
+
even deal with file access and it can add fields and information to the
clear to me though that <ACRONYM>DIL</ACRONYM> is such a part of the server that I at least
+
players if neededIn short the <ACRONYM>VME</ACRONYM> server has its own internal
had to mention it hear so builders would know where to look and
+
functional language that will allow you to do just about anything you
what <ACRONYM>DIL</ACRONYM> could do for them when they got to the point where they were
+
want to.</PARA>
ready to use it.</PARA>
 
  
<sect1 id="dilsect">
+
</sect1>
<TITLE>What is <ACRONYM>DIL</ACRONYM>?</TITLE>
 
  
<PARA><ACRONYM>DIL</ACRONYM> is short for, Data-based instructional language.  Not to be
+
<sect1 id="diluse">
confused with Database since <ACRONYM>DIL</ACRONYM> is nothing like a database. Data-based
+
<TITLE>What can <ACRONYM>DIL</ACRONYM> be used for?</TITLE>
means that the language works on a fixed set of units like objects,
+
<PARA>...</PARA>
NPCS, and rooms and is designed to give them a life of their own.  
 
Unlike on many of the mud servers on the internet <ACRONYM>DIL</ACRONYM> is not an
 
interpreted language it is a compiled language which gives you the user
 
much more safe guards against crashes and slow code.</PARA>
 
  
<PARA><ACRONYM>DIL</ACRONYM> also provides a full set of data types to allow you to do
+
<PARA>It is hard to explain what all <ACRONYM>DIL</ACRONYM> can be used for with out just
calculations or store information from players.  The <ACRONYM>DIL</ACRONYM> language can
+
writing a list of things that have already been done in <ACRONYM>DIL</ACRONYM> so here is the
even deal with file access and it can add fields and information to the
+
list.</PARA>
players if needed.  In short the <ACRONYM>VME</ACRONYM> server has its own internal
 
functional language that will allow you to do just about anything you
 
want to.</PARA>
 
  
</sect1>
+
<itemizedlist>
 +
<LISTITEM><PARA>All spells</PARA></LISTITEM>
 +
<LISTITEM><PARA>60% of the commands and skills and growing</PARA></LISTITEM>
 +
<LISTITEM><PARA>Administrator commands</PARA></LISTITEM>
 +
<LISTITEM><PARA>Movement commands</PARA></LISTITEM>
 +
<LISTITEM><PARA>look commands</PARA></LISTITEM>
 +
<LISTITEM><PARA>200+ quests and growing</PARA></LISTITEM> <LISTITEM><PARA>Message
 +
boards</PARA></LISTITEM> <LISTITEM><PARA>Mail system</PARA></LISTITEM>
 +
<LISTITEM><PARA>Clan system</PARA></LISTITEM> <LISTITEM><PARA>Automated
 +
Newbie guides</PARA></LISTITEM> <LISTITEM><PARA>object
 +
restrictions</PARA></LISTITEM> <LISTITEM><PARA>Death
 +
Sequence</PARA></LISTITEM> <LISTITEM><PARA>Magical combat
 +
system</PARA></LISTITEM> <LISTITEM><PARA>NPC agressive
 +
functions</PARA></LISTITEM> <LISTITEM><PARA>personalized
 +
Familiars</PARA></LISTITEM> <LISTITEM><PARA>personalized
 +
pets</PARA></LISTITEM> <LISTITEM><PARA>Deck of cards</PARA></LISTITEM>
 +
<LISTITEM><PARA>Chess board</PARA></LISTITEM>
 +
<LISTITEM><PARA>dice</PARA></LISTITEM>
 +
<LISTITEM><PARA>online AD&amp;D game playing system</PARA></LISTITEM>
 +
<LISTITEM><PARA>Communication channels</PARA></LISTITEM>
 +
<LISTITEM><PARA>automated wedding chapel</PARA></LISTITEM>
 +
</itemizedlist>
  
<sect1 id="diluse">
+
<PARA>Realize this is only a small list of things that can be done in
<TITLE>What can <ACRONYM>DIL</ACRONYM> be used for?</TITLE>
+
<ACRONYM>DIL</ACRONYM>.  In the future we hope to be able to add the ability to easily
<PARA>...</PARA>
+
change combat and all the character update features using <ACRONYM>DIL</ACRONYM>.  These
 +
things can be currently done with <ACRONYM>DIL</ACRONYM> but it takes a lot of knowledge
 +
and work which we hope to simplify.</PARA>
 +
</sect1>
  
<PARA>It is hard to explain what all <ACRONYM>DIL</ACRONYM> can be used for with out just
+
<sect1 id="moredilinfo">
writing a list of things that have already been done in <ACRONYM>DIL</ACRONYM> so here is the
+
<TITLE>Where do I get more information on <ACRONYM>DIL</ACRONYM></TITLE>
list.</PARA>
 
  
<itemizedlist>
+
<PARA>The online <ACRONYM>DIL</ACRONYM> reference guide is the most authoritative guide
<LISTITEM><PARA>All spells</PARA></LISTITEM>
+
currently for <ACRONYM>DIL</ACRONYM>.  It can be found at
<LISTITEM><PARA>60% of the commands and skills and growing</PARA></LISTITEM>
+
<ulink url="http://www.valhalla.com">http://www.valhalla.com</ulink> and follow the builders links.</PARA>
<LISTITEM><PARA>Administrator commands</PARA></LISTITEM>
 
<LISTITEM><PARA>Movement commands</PARA></LISTITEM>
 
<LISTITEM><PARA>look commands</PARA></LISTITEM>
 
<LISTITEM><PARA>200+ quests and growing</PARA></LISTITEM> <LISTITEM><PARA>Message
 
boards</PARA></LISTITEM> <LISTITEM><PARA>Mail system</PARA></LISTITEM>
 
<LISTITEM><PARA>Clan system</PARA></LISTITEM> <LISTITEM><PARA>Automated
 
Newbie guides</PARA></LISTITEM> <LISTITEM><PARA>object
 
restrictions</PARA></LISTITEM> <LISTITEM><PARA>Death
 
Sequence</PARA></LISTITEM> <LISTITEM><PARA>Magical combat
 
system</PARA></LISTITEM> <LISTITEM><PARA>NPC agressive
 
functions</PARA></LISTITEM> <LISTITEM><PARA>personalized
 
Familiars</PARA></LISTITEM> <LISTITEM><PARA>personalized
 
pets</PARA></LISTITEM> <LISTITEM><PARA>Deck of cards</PARA></LISTITEM>
 
<LISTITEM><PARA>Chess board</PARA></LISTITEM>
 
<LISTITEM><PARA>dice</PARA></LISTITEM>
 
<LISTITEM><PARA>online AD&amp;D game playing system</PARA></LISTITEM>
 
<LISTITEM><PARA>Communication channels</PARA></LISTITEM>
 
<LISTITEM><PARA>automated wedding chapel</PARA></LISTITEM>
 
</itemizedlist>
 
  
<PARA>Realize this is only a small list of things that can be done in
+
<PARA>In the near future we hope to have an entire new <ACRONYM>DIL</ACRONYM> manual that
<ACRONYM>DIL</ACRONYM>.  In the future we hope to be able to add the ability to easily
+
will teach, a person who has never coded all the way to people who are
change combat and all the character update features using <ACRONYM>DIL</ACRONYM>.  These
+
already professional coders, to use <ACRONYM>DIL</ACRONYM>.  For now if you can not find
things can be currently done with <ACRONYM>DIL</ACRONYM> but it takes a lot of knowledge
+
what you need in the <ACRONYM>DIL</ACRONYM> reference manual you can join the <ACRONYM>DIL</ACRONYM> email list
and work which we hope to simplify.</PARA
+
at <email>dil-request@valhalla.com</email> or you can send a mail to
</sect1>
+
<email>whistler@valhalla.com</email>.  Until and even after the new <ACRONYM>DIL</ACRONYM>
 +
manual is written we will always try to help you as much as possible
 +
while you are getting startedIt is important that you at least try
 +
and look through the <ACRONYM>DIL</ACRONYM> reference before asking a lot of questions
 +
because many of the questions may be answered already.</PARA>
  
<sect1 id="moredilinfo">
+
</sect1>
<TITLE>Where do I get more information on <ACRONYM>DIL</ACRONYM></TITLE>
+
</chapter>
  
<PARA>The online <ACRONYM>DIL</ACRONYM> reference guide is the most authoritative guide
+
<appendix id="app-a"><TITLE>VMC command line options</TITLE>
currently for <ACRONYM>DIL</ACRONYM>.  It can be found at
 
<ulink url="http://www.valhalla.com">http://www.valhalla.com</ulink> and follow the builders links.</PARA>
 
  
<PARA>In the near future we hope to have an entire new <ACRONYM>DIL</ACRONYM> manual that
+
<PARA>
will teach, a person who has never coded all the way to people who are
+
The argument string is processed from left to right. Options may
already professional coders, to use <ACRONYM>DIL</ACRONYM>For now if you can not find
+
appear  between filenames, but it should be noted that an option
what you need in the <ACRONYM>DIL</ACRONYM> reference manual you can join the <ACRONYM>DIL</ACRONYM> email list
+
only takes effect when it is encountered. In most cases, options
at <email>dil-request@valhalla.com</email> or you can send a mail to
+
should be placed to the left of the filename arguments.
<email>whistler@valhalla.com</email>. Until and even after the new <ACRONYM>DIL</ACRONYM>
+
</PARA>
manual is written we will always try to help you as much as possible
 
while you are getting startedIt is important that you at least try
 
and look through the <ACRONYM>DIL</ACRONYM> reference before asking a lot of questions
 
because many of the questions may be answered already.</PARA>
 
  
</sect1>
+
<INFORMALTABLE frame=none pgwide=1>
</chapter>
+
<TGROUP align=left cols=2 colsep=1>
 +
<THEAD>
 +
<ROW>
 +
<ENTRY>Option</ENTRY>
 +
<ENTRY>Description</ENTRY>
 +
</ROW>
 +
</THEAD>
 +
<TBODY>
 +
<ROW>
 +
<ENTRY>-m</ENTRY>
 +
<ENTRY>The location of the money file.  Normally etc/money.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>-v</ENTRY>
 +
<ENTRY>Verbose compiler output shows much more information about objects and NPC</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>-M</ENTRY>
 +
<ENTRY>Make option. Only compile source files if they have been modified more recently than the corresponding output files.</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>-p</ENTRY>
 +
<ENTRY>Pre process the file only</ENTRY>
 +
</ROW>
 +
<ROW>
 +
<ENTRY>-s</ENTRY>
 +
<ENTRY>Suppress the generation of output files.</ENTRY>
 +
</ROW>
  
<appendix id="app-a"><TITLE>VMC command line options</TITLE>
+
</TBODY></TGROUP>
 +
</informaltable>
  
<PARA>
+
<PARA>
The argument string is processed from left to right. Options  may
+
These options are not available to the email or FTP compiler, but
appear  between  filenames, but it should be noted that an option
+
normally you should not bother with them - they are probably
only takes effect when it is encountered. In most cases,  options
+
set automatically.</PARA>
should be placed to the left of the filename arguments.
 
</PARA>
 
  
<INFORMALTABLE frame=none pgwide=1>
+
</appendix>
<TGROUP align=left cols=2 colsep=1>
 
<THEAD>
 
<ROW>
 
<ENTRY>Option</ENTRY>
 
<ENTRY>Description</ENTRY>
 
</ROW>
 
</THEAD>
 
<TBODY>
 
<ROW>
 
<ENTRY>-m</ENTRY>
 
<ENTRY>The location of the money file.  Normally etc/money.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>-v</ENTRY>
 
<ENTRY>Verbose compiler output shows much more information about objects and NPC</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>-M</ENTRY>
 
<ENTRY>Make option. Only compile source files if they have been modified more recently than the corresponding output files.</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>-p</ENTRY>
 
<ENTRY>Pre process the file only</ENTRY>
 
</ROW>
 
<ROW>
 
<ENTRY>-s</ENTRY>
 
<ENTRY>Suppress the generation of output files.</ENTRY>
 
</ROW>
 
  
</TBODY></TGROUP>
+
<appendix id="app-b"><TITLE>Reserved keyword listing</TITLE>
</informaltable>
 
  
<PARA>
+
<informaltable frame=none pgwide=1>
These options are not available to the email or FTP compiler, but
+
<TGROUP align=left cols=8 colsep=4 rowsep=0>
normally you should not bother with them - they are probably
+
<TBODY>
set automatically.</PARA>
+
<ROW>
 +
<ENTRY>ability</ENTRY>
 +
<ENTRY>affect</ENTRY>
 +
<ENTRY>alignment</ENTRY>
 +
<ENTRY>applyf</ENTRY>
 +
<ENTRY>armour</ENTRY>
 +
<ENTRY>attack</ENTRY>
 +
<ENTRY>bits</ENTRY>
 +
<ENTRY>bright</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>capacity</ENTRY>
 +
<ENTRY>complete</ENTRY>
 +
<ENTRY>cost</ENTRY>
 +
<ENTRY>creators</ENTRY>
 +
<ENTRY>data</ENTRY>
 +
<ENTRY>default</ENTRY>
 +
<ENTRY>defensive</ENTRY>
 +
<ENTRY>descr</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>dilcopy</ENTRY>
 +
<ENTRY>door</ENTRY>
 +
<ENTRY>duration</ENTRY>
 +
<ENTRY>end</ENTRY>
 +
<ENTRY>equip</ENTRY>
 +
<ENTRY>exit</ENTRY>
 +
<ENTRY>exp</ENTRY>
 +
<ENTRY>extra</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>firstf</ENTRY>
 +
<ENTRY>flags</ENTRY>
 +
<ENTRY>follow</ENTRY>
 +
<ENTRY>height</ENTRY>
 +
<ENTRY>help</ENTRY>
 +
<ENTRY>hit</ENTRY>
 +
<ENTRY>id</ENTRY>
 +
<ENTRY>in</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>inside_descr</ENTRY>
 +
<ENTRY>into</ENTRY>
 +
<ENTRY>key</ENTRY>
 +
<ENTRY>keyword</ENTRY>
 +
<ENTRY>lastf</ENTRY>
 +
<ENTRY>level</ENTRY>
 +
<ENTRY>lifespan</ENTRY>
 +
<ENTRY>light</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>link</ENTRY>
 +
<ENTRY>load</ENTRY>
 +
<ENTRY>local</ENTRY>
 +
<ENTRY>mana</ENTRY>
 +
<ENTRY>manipulate</ENTRY>
 +
<ENTRY>max</ENTRY>
 +
<ENTRY>minv</ENTRY>
 +
<ENTRY>money</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>movement</ENTRY>
 +
<ENTRY>names</ENTRY>
 +
<ENTRY>nop</ENTRY>
 +
<ENTRY>notes</ENTRY>
 +
<ENTRY>npcflags</ENTRY>
 +
<ENTRY>offensive</ENTRY>
 +
<ENTRY>open</ENTRY>
 +
<ENTRY>outside_descr</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>position</ENTRY>
 +
<ENTRY>purge</ENTRY>
 +
<ENTRY>race</ENTRY>
 +
<ENTRY>random</ENTRY>
 +
<ENTRY>remove</ENTRY>
 +
<ENTRY>rent</ENTRY>
 +
<ENTRY>reset</ENTRY>
 +
<ENTRY>romflags</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>sex</ENTRY>
 +
<ENTRY>special</ENTRY>
 +
<ENTRY>speed</ENTRY>
 +
<ENTRY>spell</ENTRY>
 +
<ENTRY>string</ENTRY>
 +
<ENTRY>tickf</ENTRY>
 +
<ENTRY>time</ENTRY>
 +
<ENTRY>title</ENTRY>
 +
</ROW><ROW>
 +
<ENTRY>to</ENTRY>
 +
<ENTRY>type</ENTRY>
 +
<ENTRY>value</ENTRY>
 +
<ENTRY>weapon</ENTRY>
 +
<ENTRY>weather</ENTRY>
 +
<ENTRY>weight</ENTRY>
 +
<ENTRY>zonemax</ENTRY>
 +
<ENTRY></ENTRY>
 +
</ROW>
 +
</TBODY>
 +
</TGROUP>
 +
</informaltable>
  
</appendix>
 
  
<appendix id="app-b"><TITLE>Reserved keyword listing</TITLE>
+
</appendix>
  
<informaltable frame=none pgwide=1>
+
<appendix id="app-c">
<TGROUP align=left cols=8 colsep=4 rowsep=0>
+
<TITLE>Race Definitions in values.h</TITLE>
<TBODY>
 
<ROW>
 
<ENTRY>ability</ENTRY>
 
<ENTRY>affect</ENTRY>
 
<ENTRY>alignment</ENTRY>
 
<ENTRY>applyf</ENTRY>
 
<ENTRY>armour</ENTRY>
 
<ENTRY>attack</ENTRY>
 
<ENTRY>bits</ENTRY>
 
<ENTRY>bright</ENTRY>
 
</ROW><ROW>
 
<ENTRY>capacity</ENTRY>
 
<ENTRY>complete</ENTRY>
 
<ENTRY>cost</ENTRY>
 
<ENTRY>creators</ENTRY>
 
<ENTRY>data</ENTRY>
 
<ENTRY>default</ENTRY>
 
<ENTRY>defensive</ENTRY>
 
<ENTRY>descr</ENTRY>
 
</ROW><ROW>
 
<ENTRY>dilcopy</ENTRY>
 
<ENTRY>door</ENTRY>
 
<ENTRY>duration</ENTRY>
 
<ENTRY>end</ENTRY>
 
<ENTRY>equip</ENTRY>
 
<ENTRY>exit</ENTRY>
 
<ENTRY>exp</ENTRY>
 
<ENTRY>extra</ENTRY>
 
</ROW><ROW>
 
<ENTRY>firstf</ENTRY>
 
<ENTRY>flags</ENTRY>
 
<ENTRY>follow</ENTRY>
 
<ENTRY>height</ENTRY>
 
<ENTRY>help</ENTRY>
 
<ENTRY>hit</ENTRY>
 
<ENTRY>id</ENTRY>
 
<ENTRY>in</ENTRY>
 
</ROW><ROW>
 
<ENTRY>inside_descr</ENTRY>
 
<ENTRY>into</ENTRY>
 
<ENTRY>key</ENTRY>
 
<ENTRY>keyword</ENTRY>
 
<ENTRY>lastf</ENTRY>
 
<ENTRY>level</ENTRY>
 
<ENTRY>lifespan</ENTRY>
 
<ENTRY>light</ENTRY>
 
</ROW><ROW>
 
<ENTRY>link</ENTRY>
 
<ENTRY>load</ENTRY>
 
<ENTRY>local</ENTRY>
 
<ENTRY>mana</ENTRY>
 
<ENTRY>manipulate</ENTRY>
 
<ENTRY>max</ENTRY>
 
<ENTRY>minv</ENTRY>
 
<ENTRY>money</ENTRY>
 
</ROW><ROW>
 
<ENTRY>movement</ENTRY>
 
<ENTRY>names</ENTRY>
 
<ENTRY>nop</ENTRY>
 
<ENTRY>notes</ENTRY>
 
<ENTRY>npcflags</ENTRY>
 
<ENTRY>offensive</ENTRY>
 
<ENTRY>open</ENTRY>
 
<ENTRY>outside_descr</ENTRY>
 
</ROW><ROW>
 
<ENTRY>position</ENTRY>
 
<ENTRY>purge</ENTRY>
 
<ENTRY>race</ENTRY>
 
<ENTRY>random</ENTRY>
 
<ENTRY>remove</ENTRY>
 
<ENTRY>rent</ENTRY>
 
<ENTRY>reset</ENTRY>
 
<ENTRY>romflags</ENTRY>
 
</ROW><ROW>
 
<ENTRY>sex</ENTRY>
 
<ENTRY>special</ENTRY>
 
<ENTRY>speed</ENTRY>
 
<ENTRY>spell</ENTRY>
 
<ENTRY>string</ENTRY>
 
<ENTRY>tickf</ENTRY>
 
<ENTRY>time</ENTRY>
 
<ENTRY>title</ENTRY>
 
</ROW><ROW>
 
<ENTRY>to</ENTRY>
 
<ENTRY>type</ENTRY>
 
<ENTRY>value</ENTRY>
 
<ENTRY>weapon</ENTRY>
 
<ENTRY>weather</ENTRY>
 
<ENTRY>weight</ENTRY>
 
<ENTRY>zonemax</ENTRY>
 
<ENTRY></ENTRY>
 
</ROW>
 
</TBODY>
 
</TGROUP>
 
</informaltable>
 
  
 +
<PARA>The following list was extracted from the
 +
''values.h''</PARA>
  
</appendix>
+
<PROGRAMLISTING>
  
<appendix id="app-c">
+
#define RACE_HUMAN          0    /* PC race */
<TITLE>Race Definitions in values.h</TITLE>
+
#define RACE_ELF            1    /* PC race */
 +
#define RACE_DWARF          2    /* PC race */
 +
#define RACE_HALFLING        3    /* PC race */
 +
#define RACE_GNOME          4    /* PC race */
 +
#define RACE_HALF_ORC        5
 +
#define RACE_HALF_OGRE      6
 +
#define RACE_HALF_ELF        7
 +
#define RACE_BROWNIE        8
 +
#define RACE_GROLL          9
 +
#define RACE_DARK_ELF      10
 +
#define RACE_SKAVEN        120
 +
#define RACE_GNOLL          121
 +
#define RACE_GOBLIN        122
 +
#define RACE_HOBGOBLIN      123
 +
#define RACE_KOBOLD        124
 +
#define RACE_NIXIE          125
 +
#define RACE_NYMPH          126
 +
#define RACE_OGRE          127
 +
#define RACE_ORC            128
 +
#define RACE_SATYR          129
 +
#define RACE_FAUN          130
 +
#define RACE_SPRITE        131
 +
#define RACE_DRYAD          132
 +
#define RACE_LEPRECHAUN    133
 +
#define RACE_PIXIE          134
 +
#define RACE_SYLPH          135
 +
#define RACE_HERMIT        136
 +
#define RACE_SHARGUGH      137
 +
#define RACE_GIANT          138
 +
#define RACE_WARDEN        139  /* Warden???            */
 +
#define RACE_TROLL          140
 +
#define RACE_NORSE_GOD      142  /* Hmmmm. probably need better categories */
 +
#define RACE_MERMAID        145
 +
#define RACE_SIREN          146
 +
#define RACE_NAIAD          147
 +
#define RACE_MERMAN        148
 +
#define RACE_MINOTAUR      149
 +
#define RACE_YETI          150
 +
#define RACE_OTHER_HUMANOID 999
  
<PARA>The following list was extracted from the
+
#define RACE_BEAR          1000
''values.h''</PARA>
+
#define RACE_DOG            1001
 +
#define RACE_WOLF          1002
 +
#define RACE_FOX            1003
 +
#define RACE_CAT            1004
 +
#define RACE_RABBIT        1005
 +
#define RACE_DEER          1006
 +
#define RACE_COW            1007
 +
#define RACE_HARE          1008
 +
#define RACE_GOAT          1009
 +
#define RACE_EAGLE          1010
 +
#define RACE_PIG            1011
  
<PROGRAMLISTING>
+
#define RACE_DUCK          1100  /* This will interest the biologists... */
 +
#define RACE_BIRD          1101  /* This will interest the biologists... */
 +
#define RACE_RAT            1102
 +
#define RACE_HORSE          1103
 +
#define RACE_BADGER        1104
 +
#define RACE_SKUNK          1105
 +
#define RACE_BOAR          1106
 +
#define RACE_MOUSE          1107
 +
#define RACE_MONKEY        1108
 +
#define RACE_PORCUPINE      1110
 +
#define RACE_ELEPHANT      1112
 +
#define RACE_CAMEL          1113
 +
#define RACE_FERRET        1114
 +
#define RACE_VULTURE        1115
 +
#define RACE_SQUIRREL      1116
 +
#define RACE_OWL            1117
 +
#define RACE_LEMURE        1118  /* Half-monkey (Makier) */
 +
#define RACE_ELK            1119  /* Larger deer (Whapiti-deer) */
 +
#define RACE_LION          1120
 +
#define RACE_TIGER          1121
 +
#define RACE_LEOPARD        1122
 +
#define RACE_OTHER_MAMMAL  1999
  
#define RACE_HUMAN           0    /* PC race */
+
#define RACE_TREE           2000
#define RACE_ELF            1    /* PC race */
+
#define RACE_VINE           2001
#define RACE_DWARF          2    /* PC race */
+
#define RACE_FLOWER         2002
#define RACE_HALFLING        3    /* PC race */
+
#define RACE_SEAWEED       2003
#define RACE_GNOME          4    /* PC race */
+
#define RACE_CACTUS         2004
#define RACE_HALF_ORC        5
 
#define RACE_HALF_OGRE      6
 
#define RACE_HALF_ELF        7
 
#define RACE_BROWNIE        8
 
#define RACE_GROLL           9
 
#define RACE_DARK_ELF      10
 
#define RACE_SKAVEN        120
 
#define RACE_GNOLL          121
 
#define RACE_GOBLIN        122
 
#define RACE_HOBGOBLIN      123
 
#define RACE_KOBOLD         124
 
#define RACE_NIXIE          125
 
#define RACE_NYMPH          126
 
#define RACE_OGRE          127
 
#define RACE_ORC            128
 
#define RACE_SATYR          129
 
#define RACE_FAUN          130
 
#define RACE_SPRITE        131
 
#define RACE_DRYAD          132
 
#define RACE_LEPRECHAUN    133
 
#define RACE_PIXIE          134
 
#define RACE_SYLPH          135
 
#define RACE_HERMIT        136
 
#define RACE_SHARGUGH      137
 
#define RACE_GIANT          138
 
#define RACE_WARDEN        139  /* Warden???            */
 
#define RACE_TROLL          140
 
#define RACE_NORSE_GOD      142  /* Hmmmm. probably need better categories */
 
#define RACE_MERMAID       145
 
#define RACE_SIREN          146
 
#define RACE_NAIAD          147
 
#define RACE_MERMAN         148
 
#define RACE_MINOTAUR      149
 
#define RACE_YETI          150
 
#define RACE_OTHER_HUMANOID 999
 
  
#define RACE_BEAR          1000
+
#define RACE_OTHER_PLANT    2999
#define RACE_DOG            1001
 
#define RACE_WOLF          1002
 
#define RACE_FOX            1003
 
#define RACE_CAT            1004
 
#define RACE_RABBIT        1005
 
#define RACE_DEER          1006
 
#define RACE_COW            1007
 
#define RACE_HARE          1008
 
#define RACE_GOAT          1009
 
#define RACE_EAGLE          1010
 
#define RACE_PIG            1011
 
  
#define RACE_DUCK          1100  /* This will interest the biologists... */
+
#define RACE_MAGGOT        3000
#define RACE_BIRD          1101  /* This will interest the biologists... */
+
#define RACE_BEETLE         3001
#define RACE_RAT            1102
+
#define RACE_SPIDER         3002
#define RACE_HORSE          1103
+
#define RACE_COCKROACH     3003
#define RACE_BADGER         1104
+
#define RACE_BUTTERFLY      3004
#define RACE_SKUNK          1105
+
#define RACE_ANT           3005
#define RACE_BOAR          1106
+
#define RACE_WORM           3006
#define RACE_MOUSE          1107
+
#define RACE_LEECH         3008
#define RACE_MONKEY         1108
+
#define RACE_DRAGONFLY      3009
#define RACE_PORCUPINE     1110
+
#define RACE_MOSQUITO      3010
#define RACE_ELEPHANT      1112
 
#define RACE_CAMEL          1113
 
#define RACE_FERRET        1114
 
#define RACE_VULTURE        1115
 
#define RACE_SQUIRREL      1116
 
#define RACE_OWL           1117
 
#define RACE_LEMURE        1118  /* Half-monkey (Makier) */
 
#define RACE_ELK            1119  /* Larger deer (Whapiti-deer) */
 
#define RACE_LION           1120
 
#define RACE_TIGER         1121
 
#define RACE_LEOPARD        1122
 
#define RACE_OTHER_MAMMAL  1999
 
  
#define RACE_TREE          2000
+
#define RACE_OTHER_INSECT  3999
#define RACE_VINE          2001
 
#define RACE_FLOWER        2002
 
#define RACE_SEAWEED        2003
 
#define RACE_CACTUS        2004
 
  
#define RACE_OTHER_PLANT    2999
+
#define RACE_LIZARD        4000
 +
#define RACE_SNAKE          4001
 +
#define RACE_FROG          4002
 +
#define RACE_ALLIGATOR      4004
 +
#define RACE_DINOSAUR      4005
 +
#define RACE_CHAMELEON      4006
 +
#define RACE_SCORPION      4007
 +
#define RACE_TURTLE        4008
 +
#define RACE_BAT            4009
 +
#define RACE_TOAD          4010
  
#define RACE_MAGGOT        3000
+
#define RACE_OTHER_REPTILE  4999
#define RACE_BEETLE        3001
 
#define RACE_SPIDER        3002
 
#define RACE_COCKROACH      3003
 
#define RACE_BUTTERFLY      3004
 
#define RACE_ANT            3005
 
#define RACE_WORM          3006
 
#define RACE_LEECH          3008
 
#define RACE_DRAGONFLY      3009
 
#define RACE_MOSQUITO      3010
 
  
#define RACE_OTHER_INSECT   3999
+
#define RACE_CAVE_WIGHT    5001  /* Some kind a creature... */
 +
#define RACE_UR_VILE        5002  /* Some kind a creature... */
 +
#define RACE_STONE_RENDER   5003  /* Some kind a creature... */
 +
#define RACE_VAMPIRE        5005
 +
#define RACE_SLIME          5006
 +
#define RACE_WYRM          5007
 +
#define RACE_AUTOMATON      5008
 +
#define RACE_UNICORN        5009
  
#define RACE_LIZARD        4000
+
#define RACE_DRAGON_MIN    5010  /* For use with special object */
#define RACE_SNAKE          4001
+
#define RACE_DRAGON_BLACK  5010
#define RACE_FROG          4002
+
#define RACE_DRAGON_BLUE    5011
#define RACE_ALLIGATOR      4004
+
#define RACE_DRAGON_GREEN  5012
#define RACE_DINOSAUR      4005
+
#define RACE_DRAGON_RED    5013
#define RACE_CHAMELEON      4006
+
#define RACE_DRAGON_WHITE  5014
#define RACE_SCORPION      4007
+
#define RACE_DRAGON_SILVER  5015
#define RACE_TURTLE        4008
+
#define RACE_DRAGON_TURTLE  5016
#define RACE_BAT            4009
+
#define RACE_DRAGON_LAVA    5017
#define RACE_TOAD          4010
+
#define RACE_DRAGON_SHADOW  5018
 +
#define RACE_DRAGON_LIZARD  5019
 +
#define RACE_DRAGON_MAX    5020  /* For use with special object */
  
#define RACE_OTHER_REPTILE 4999
+
#define RACE_LESSER_DEMON  5020 /* Approx. Level < 100          */
 +
#define RACE_GREATER_DEMON  5021  /* Approx. Level > 100          */
 +
#define RACE_SERVANT_DEMON  5022  /* Approx. < level 20          */
 +
#define RACE_PRINCE_DEMON  5023  /* Almost god, max level 149 (no more!) */
 +
#define RACE_LESSER_DEVIL  5025  /* Approx. Level < 100 */
 +
#define RACE_GREATER_DEVIL  5026  /* Approx. Level > 100 */
 +
#define RACE_SHADOW_DEVIL  5027
 +
#define RACE_ARCH_DEVIL    5028
  
#define RACE_CAVE_WIGHT    5001  /* Some kind a creature... */
+
#define RACE_MEDUSA        5030
#define RACE_UR_VILE        5002  /* Some kind a creature... */
+
#define RACE_WINGED_HORSE   5031
#define RACE_STONE_RENDER   5003  /* Some kind a creature... */
+
#define RACE_GARGOYLE      5033
#define RACE_VAMPIRE        5005
+
#define RACE_GOLEM         5034
#define RACE_SLIME         5006
+
#define RACE_YOGOLOTH      5035
#define RACE_WYRM          5007
+
#define RACE_MIST_DWELLER  5036
#define RACE_AUTOMATON      5008
 
#define RACE_UNICORN        5009
 
  
#define RACE_DRAGON_MIN    5010  /* For use with special object */
+
#define RACE_WEREWOLF      5037
#define RACE_DRAGON_BLACK  5010
+
#define RACE_WERERAT        5038
#define RACE_DRAGON_BLUE    5011
 
#define RACE_DRAGON_GREEN  5012
 
#define RACE_DRAGON_RED    5013
 
#define RACE_DRAGON_WHITE  5014
 
#define RACE_DRAGON_SILVER  5015
 
#define RACE_DRAGON_TURTLE  5016
 
#define RACE_DRAGON_LAVA    5017
 
#define RACE_DRAGON_SHADOW  5018
 
#define RACE_DRAGON_LIZARD  5019
 
#define RACE_DRAGON_MAX    5020  /* For use with special object */
 
  
#define RACE_LESSER_DEMON   5020  /* Approx. Level < 100          */
+
#define RACE_ELEMENTAL_AIR   5040
#define RACE_GREATER_DEMON  5021  /* Approx. Level > 100          */
+
#define RACE_ELEMENTAL_EARTH 5041
#define RACE_SERVANT_DEMON 5022  /* Approx. < level 20          */
+
#define RACE_ELEMENTAL_FIRE 5042
#define RACE_PRINCE_DEMON  5023  /* Almost god, max level 149 (no more!) */
+
#define RACE_ELEMENTAL_FROST 5043
#define RACE_LESSER_DEVIL  5025  /* Approx. Level < 100 */
+
#define RACE_ELEMENTAL_WATER 5044
#define RACE_GREATER_DEVIL  5026  /* Approx. Level > 100 */
+
#define RACE_ELEMENTAL_LIGHT 5045
#define RACE_SHADOW_DEVIL  5027
 
#define RACE_ARCH_DEVIL    5028
 
  
#define RACE_MEDUSA        5030
+
#define RACE_DEVOURER       5600
#define RACE_WINGED_HORSE  5031
+
#define RACE_DANALEK        5601
#define RACE_GARGOYLE      5033
 
#define RACE_GOLEM          5034
 
#define RACE_YOGOLOTH       5035
 
#define RACE_MIST_DWELLER  5036
 
  
#define RACE_WEREWOLF       5037
+
#define RACE_FAMILIAR       5900 /* Weirdo race... */
#define RACE_WERERAT        5038
+
#define RACE_OTHER_CREATURE 5999
  
#define RACE_ELEMENTAL_AIR  5040
+
#define RACE_ZOMBIE        6000
#define RACE_ELEMENTAL_EARTH 5041
+
#define RACE_LICH          6001
#define RACE_ELEMENTAL_FIRE  5042
+
#define RACE_GHOUL          6002
#define RACE_ELEMENTAL_FROST 5043
+
#define RACE_SKELETON      6003
#define RACE_ELEMENTAL_WATER 5044
+
#define RACE_GHOST          6004
#define RACE_ELEMENTAL_LIGHT 5045
+
#define RACE_SPIRIT        6005
 +
#define RACE_MUMMIE        6006
 +
#define RACE_BANSHEE        6007
 +
#define RACE_NAGA_SOUL      6008
 +
#define RACE_OTHER_UNDEAD  6999
  
#define RACE_DEVOURER      5600
+
#define RACE_CRAB          7000
#define RACE_DANALEK       5601
+
#define RACE_SAND_SPIDER    7002
 +
#define RACE_RIVER_LEECH    7003
 +
#define RACE_SAND_CRAWLER  7004
 +
#define RACE_SEA_HORSE      7005
 +
#define RACE_SHARK          7006
 +
#define RACE_LAMPREY        7007
 +
#define RACE_MANTA_RAY      7008
 +
#define RACE_CLIFF_HUGGER  7009
 +
#define RACE_ALGAE_MAN      7010
 +
#define RACE_WHELK          7011
 +
#define RACE_OYSTER        7012
 +
#define RACE_KRAKEN        7013
 +
#define RACE_CAVE_FISHER    7014 /* Tiamat: lobster / spider breed */
 +
#define RACE_OCTOPUS        7015
 +
#define RACE_WHALE          7016
 +
#define RACE_DOLPHIN       7017
 +
#define RACE_EEL            7018
  
#define RACE_FAMILIAR      5900 /* Weirdo race... */
+
#define RACE_FISH          7998
#define RACE_OTHER_CREATURE 5999
+
#define RACE_OTHER_MARINE  7999
  
#define RACE_ZOMBIE        6000
+
</PROGRAMLISTING>
#define RACE_LICH          6001
 
#define RACE_GHOUL          6002
 
#define RACE_SKELETON      6003
 
#define RACE_GHOST          6004
 
#define RACE_SPIRIT        6005
 
#define RACE_MUMMIE        6006
 
#define RACE_BANSHEE        6007
 
#define RACE_NAGA_SOUL      6008
 
#define RACE_OTHER_UNDEAD  6999
 
  
#define RACE_CRAB          7000
 
#define RACE_SAND_SPIDER    7002
 
#define RACE_RIVER_LEECH    7003
 
#define RACE_SAND_CRAWLER  7004
 
#define RACE_SEA_HORSE      7005
 
#define RACE_SHARK          7006
 
#define RACE_LAMPREY        7007
 
#define RACE_MANTA_RAY      7008
 
#define RACE_CLIFF_HUGGER  7009
 
#define RACE_ALGAE_MAN      7010
 
#define RACE_WHELK          7011
 
#define RACE_OYSTER        7012
 
#define RACE_KRAKEN        7013
 
#define RACE_CAVE_FISHER    7014 /* Tiamat: lobster / spider breed */
 
#define RACE_OCTOPUS        7015
 
#define RACE_WHALE          7016
 
#define RACE_DOLPHIN        7017
 
#define RACE_EEL            7018
 
  
#define RACE_FISH          7998
 
#define RACE_OTHER_MARINE  7999
 
  
</PROGRAMLISTING>
+
</appendix>
 +
<appendix id="app-d"><TITLE>weapon definitions in values.h</TITLE>
  
 +
<PARA>The following list was extracted from the
 +
''values.h''</PARA>
  
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</appendix>
+
#define WPN_BATTLE_AXE    7  /* Two Handed */
<appendix id="app-d"><TITLE>weapon definitions in values.h</TITLE>
+
#define WPN_HAND_AXE      8
 +
#define WPN_WAR_MATTOCK  9  /* Two Handed */
 +
#define WPN_WAR_HAMMER  10
 +
#define WPN_GREAT_SWORD  11  /* Two Handed */
 +
#define WPN_SCIMITAR    12
 +
#define WPN_KATANA      13
 +
#define WPN_FALCHION    14
 +
#define WPN_KOPESH      15
 +
#define WPN_BROAD_SWORD  16
 +
#define WPN_LONG_SWORD  17
 +
#define WPN_RAPIER      18
 +
#define WPN_SHORT_SWORD  19
 +
#define WPN_DAGGER      20
 +
#define WPN_BATTLE_MACE  21  /* Two Handed */
 +
#define WPN_MACE        22
 +
#define WPN_BATTLE_CLUB  23  /* Two handed */
 +
#define WPN_CLUB        24
 +
#define WPN_MORNING_STAR 25
 +
#define WPN_FLAIL        26
 +
#define WPN_QUARTERSTAFF 27
 +
#define WPN_SPEAR        28
 +
#define WPN_HALBERD      29
 +
#define WPN_BARDICHE    30
 +
#define WPN_SICKLE      31
 +
#define WPN_SCYTHE      32  /* Two handed */
 +
#define WPN_TRIDENT      33
 +
#define WPN_FIST        34
 +
#define WPN_KICK        35
 +
#define WPN_BITE        36
 +
#define WPN_STING        37
 +
#define WPN_CLAW        38
 +
#define WPN_CRUSH        39
 +
#define WPN_WHIP        40
 +
#define WPN_WAKIZASHI    41
 +
#define WPN_BOW          42 /* Here down to Staff are Rangers Guild Jan 98 */
 +
#define WPN_CROSSBOW    43
 +
#define WPN_SLING        44
 +
#define WPN_FIGHTING_STAFF 45 /* Two handed */
 +
#define WPN_SABER        46
 +
#define WPN_CUTLASS      47
 +
#define WPN_MACHETE      48
 +
#define WPN_LANCE        49
 +
#define WPN_SHOCK_LANCE  50
 +
#define WPN_PIKE        51
 +
#define WPN_GREAT_AXE    52
 +
#define WPN_BATTLE_SWORD 53
  
<PARA>The following list was extracted from the
+
</PROGRAMLISTING></INFORMALEXAMPLE>
''values.h''</PARA>
 
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</appendix>
  
#define WPN_BATTLE_AXE    7  /* Two Handed */
+
<appendix id="app-e">
#define WPN_HAND_AXE      8
+
<TITLE>Liquid macros file</TITLE>
#define WPN_WAR_MATTOCK  9  /* Two Handed */
 
#define WPN_WAR_HAMMER  10
 
#define WPN_GREAT_SWORD  11  /* Two Handed */
 
#define WPN_SCIMITAR    12
 
#define WPN_KATANA      13
 
#define WPN_FALCHION    14
 
#define WPN_KOPESH      15
 
#define WPN_BROAD_SWORD  16
 
#define WPN_LONG_SWORD  17
 
#define WPN_RAPIER      18
 
#define WPN_SHORT_SWORD  19
 
#define WPN_DAGGER      20
 
#define WPN_BATTLE_MACE  21  /* Two Handed */
 
#define WPN_MACE        22
 
#define WPN_BATTLE_CLUB  23  /* Two handed */
 
#define WPN_CLUB        24
 
#define WPN_MORNING_STAR 25
 
#define WPN_FLAIL        26
 
#define WPN_QUARTERSTAFF 27
 
#define WPN_SPEAR        28
 
#define WPN_HALBERD      29
 
#define WPN_BARDICHE    30
 
#define WPN_SICKLE      31
 
#define WPN_SCYTHE      32  /* Two handed */
 
#define WPN_TRIDENT      33
 
#define WPN_FIST        34
 
#define WPN_KICK        35
 
#define WPN_BITE        36
 
#define WPN_STING        37
 
#define WPN_CLAW        38
 
#define WPN_CRUSH        39
 
#define WPN_WHIP        40
 
#define WPN_WAKIZASHI    41
 
#define WPN_BOW          42 /* Here down to Staff are Rangers Guild Jan 98 */
 
#define WPN_CROSSBOW    43
 
#define WPN_SLING        44
 
#define WPN_FIGHTING_STAFF 45 /* Two handed */
 
#define WPN_SABER        46
 
#define WPN_CUTLASS      47
 
#define WPN_MACHETE      48
 
#define WPN_LANCE        49
 
#define WPN_SHOCK_LANCE  50
 
#define WPN_PIKE        51
 
#define WPN_GREAT_AXE    52
 
#define WPN_BATTLE_SWORD 53
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</appendix>
+
#define LIQ_WATER(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,10,1,0,POISON)
 +
#define LIQ_BEER(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,3,POISON)
 +
#define LIQ_WINE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,5,2,5,POISON)
 +
#define LIQ_ALE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,2,POISON)
 +
#define LIQ_DARK_ALE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("dark brown", WEIGHT,CAPACITY,INSIDE,5,2,1,POISON)
 +
#define LIQ_WISKEY(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("golden",WEIGHT ,CAPACITY,INSIDE,4,1,6,POISON)
 +
#define LIQ_WHISKY(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("golden",WEIGHT ,CAPACITY,INSIDE,4,1,6,POISON)
  
<appendix id="app-e">
+
#define LIQ_LEMONADE(WEIGHT,CAPACITY,INSIDE,POISON) \
<TITLE>Liquid macros file</TITLE>
+
LIQ_DEF("red", WEIGHT, CAPACITY, INSIDE, 8, 1, 0,POISON)
 +
#define LIQ_FIREBRT(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("green", WEIGHT,CAPACITY,INSIDE,0,0,10,POISON)
 +
#define LIQ_LOCALSPC(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("clear", WEIGHT, CAPACITY, INSIDE, 3, 3, 3,POISON)
 +
#define LIQ_SLIME(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("light green", WEIGHT,CAPACITY,INSIDE,8,4,0,POISON)
 +
#define LIQ_MILK(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("white", WEIGHT, CAPACITY, INSIDE, 6, 3, 0,POISON)
 +
#define LIQ_TEA(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("brown", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 +
#define LIQ_COFFEE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 +
#define LIQ_COFFE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 +
 +
#define LIQ_BLOOD(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("red", WEIGHT, CAPACITY, INSIDE, -1, 2, 0, POISON)
 +
#define LIQ_SALTWAT(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("clear", WEIGHT, CAPACITY, INSIDE, 2, 1, 0, POISON)
 +
#define LIQ_COKE(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 5, 1, 0,POISON)
 +
#define LIQ_VODKA(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,0,0,10,POISON)
 +
#define LIQ_BRANDY(WEIGHT,CAPACITY,INSIDE,POISON) \
 +
LIQ_DEF("golden", WEIGHT,CAPACITY,INSIDE,4,1,6,POISON)
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
</PROGRAMLISTING></INFORMALEXAMPLE>
  
#define LIQ_WATER(WEIGHT,CAPACITY,INSIDE,POISON) \
+
</appendix>
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,10,1,0,POISON)
 
#define LIQ_BEER(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,3,POISON)
 
#define LIQ_WINE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,5,2,5,POISON)
 
#define LIQ_ALE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,2,POISON)
 
#define LIQ_DARK_ALE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("dark brown", WEIGHT,CAPACITY,INSIDE,5,2,1,POISON)
 
#define LIQ_WISKEY(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("golden",WEIGHT ,CAPACITY,INSIDE,4,1,6,POISON)
 
#define LIQ_WHISKY(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("golden",WEIGHT ,CAPACITY,INSIDE,4,1,6,POISON)
 
  
#define LIQ_LEMONADE(WEIGHT,CAPACITY,INSIDE,POISON) \
+
<appendix id="app-f">
LIQ_DEF("red", WEIGHT, CAPACITY, INSIDE, 8, 1, 0,POISON)
+
<TITLE>Complete magical transfers macros listing</TITLE>
#define LIQ_FIREBRT(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("green", WEIGHT,CAPACITY,INSIDE,0,0,10,POISON)
 
#define LIQ_LOCALSPC(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("clear", WEIGHT, CAPACITY, INSIDE, 3, 3, 3,POISON)
 
#define LIQ_SLIME(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("light green", WEIGHT,CAPACITY,INSIDE,8,4,0,POISON)
 
#define LIQ_MILK(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("white", WEIGHT, CAPACITY, INSIDE, 6, 3, 0,POISON)
 
#define LIQ_TEA(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("brown", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 
#define LIQ_COFFEE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 
#define LIQ_COFFE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)
 
 
#define LIQ_BLOOD(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("red", WEIGHT, CAPACITY, INSIDE, -1, 2, 0, POISON)
 
#define LIQ_SALTWAT(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("clear", WEIGHT, CAPACITY, INSIDE, 2, 1, 0, POISON)
 
#define LIQ_COKE(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 5, 1, 0,POISON)
 
#define LIQ_VODKA(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,0,0,10,POISON)
 
#define LIQ_BRANDY(WEIGHT,CAPACITY,INSIDE,POISON) \
 
LIQ_DEF("golden", WEIGHT,CAPACITY,INSIDE,4,1,6,POISON)
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
<PARA>This listing of macros was taken from
 +
''wmacros.h''.  When building your objects you should
 +
check the macros file to make sure you have the most up to date
 +
macros.</PARA>
  
</appendix>
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  
<appendix id="app-f">
+
#define CHAR_FLAG_TRANSFER(_MFLAGS) \
<TITLE>Complete magical transfers macros listing</TITLE>
+
flags {UNIT_FL_MAGIC}      \
 +
affect                            \
 +
  id ID_TRANSFER_CHARFLAGS      \
 +
  duration -1                    \
 +
  data[0] _MFLAGS                \
 +
  firstf TIF_EYES_TINGLE        \
 +
  tickf TIF_NONE                \
 +
  lastf TIF_EYES_TINGLE          \
 +
  applyf APF_MOD_CHAR_FLAGS;
  
<PARA>This listing of macros was taken from
+
/* skill MUST be one of SKI_XXX, amount in -10 to +10 */
''wmacros.h''. When building your objects you should
+
#define SKILL_TRANSFER(skill, amount) \
check the macros file to make sure you have the most up to date
+
flags {UNIT_FL_MAGIC}        \
macros.</PARA>
+
affect                      \
 +
  id ID_SKILL_TRANSFER      \
 +
  duration -1              \
 +
  data[0] skill            \
 +
  data[1] amount            \
 +
  firstf TIF_SKI_INC      \
 +
  tickf  TIF_NONE          \
 +
  lastf  TIF_SKI_DEC      \
 +
  applyf  APF_SKILL_ADJ;
  
<INFORMALEXAMPLE><PROGRAMLISTING>
+
/* weapon MUST be one of WPN_XXX, amount in -10 to +10 */
 +
#define WEAPON_TRANSFER(weapon, amount) \
 +
flags {UNIT_FL_MAGIC}        \
 +
affect                      \
 +
  id ID_WEAPON_TRANSFER    \
 +
  duration -1              \
 +
  data[0] weapon            \
 +
  data[1] amount            \
 +
  firstf  TIF_WPN_INC      \
 +
  tickf  TIF_NONE          \
 +
  lastf  TIF_WPN_DEC      \
 +
  applyf  APF_WEAPON_ADJ;
  
#define CHAR_FLAG_TRANSFER(_MFLAGS) \
+
/* spell MUST be one of SPL_XXX, amount in -10 to +10 */
flags {UNIT_FL_MAGIC}       \
+
#define SPELL_TRANSFER(spell, amount) \
affect                           \
+
flags {UNIT_FL_MAGIC}       \
  id ID_TRANSFER_CHARFLAGS      \
+
affect                       \
  duration -1                   \
+
  id ID_SPELL_TRANSFER      \
  data[0] _MFLAGS                \
+
  duration -1               /* Must be permanent in the object */  \
  firstf TIF_EYES_TINGLE        \
+
  data[0] spell            /* It is a spell SPL_XXX transfer  */  \
  tickf TIF_NONE                 \
+
  data[1] amount            /* Amount of better spell skill    */  \
  lastf TIF_EYES_TINGLE          \
+
  firstf TIF_SPL_INC      \
  applyf APF_MOD_CHAR_FLAGS;
+
  tickf   TIF_NONE         \
 +
  lastf   TIF_SPL_DEC      \
 +
  applyf APF_SPELL_ADJ;
  
/* skill MUST be one of SKI_XXX, amount in -10 to +10 */
+
#define STR_TRANSFER(amount) \
#define SKILL_TRANSFER(skill, amount) \
+
flags {UNIT_FL_MAGIC}       \
flags {UNIT_FL_MAGIC}       \
+
affect                      \
affect                      \
+
  id ID_TRANSFER_STR        \
  id ID_SKILL_TRANSFER      \
+
  duration -1               /* Must be permanent in the object */  \
  duration -1               \
+
  data[0] ABIL_STR          /* It is a strength function      */  \
  data[0] skill            \
+
  data[1] amount             /* Amount of better strength      */  \
  data[1] amount           \
+
  firstf  TIF_STR_INC       \
  firstf  TIF_SKI_INC       \
+
  tickf  TIF_NONE          \
  tickf  TIF_NONE          \
+
  lastf  TIF_STR_DEC       \
  lastf  TIF_SKI_DEC       \
+
  applyf  APF_ABILITY;
  applyf  APF_SKILL_ADJ;
 
  
/* weapon MUST be one of WPN_XXX, amount in -10 to +10 */
+
#define DEX_TRANSFER(amount) \
#define WEAPON_TRANSFER(weapon, amount) \
+
flags {UNIT_FL_MAGIC}       \
flags {UNIT_FL_MAGIC}       \
+
affect                      \
affect                      \
+
  id ID_TRANSFER_DEX        \
  id ID_WEAPON_TRANSFER    \
+
  duration -1                 /* Must be permanent in the object */  \
  duration -1               \
+
  data[0] ABIL_DEX            /* It is a dex function           */  \
  data[0] weapon           \
+
  data[1] amount             /* Amount of better dex           */  \
  data[1] amount            \
+
  firstf  TIF_DEX_INC       \
  firstf  TIF_WPN_INC       \
+
  tickf  TIF_NONE          \
  tickf  TIF_NONE          \
+
  lastf  TIF_DEX_DEC       \
  lastf  TIF_WPN_DEC       \
+
  applyf  APF_ABILITY;
  applyf  APF_WEAPON_ADJ;
 
  
/* spell MUST be one of SPL_XXX, amount in -10 to +10 */
+
#define CON_TRANSFER(amount) \
#define SPELL_TRANSFER(spell, amount) \
+
flags {UNIT_FL_MAGIC}       \
flags {UNIT_FL_MAGIC}       \
+
affect                      \
affect                      \
+
  id ID_TRANSFER_CON        \
  id ID_SPELL_TRANSFER      \
+
  duration -1                 /* Must be permanent in the object */  \
  duration -1               /* Must be permanent in the object */  \
+
  data[0] ABIL_CON            /* It is a con function            */  \
  data[0] spell            /* It is a spell SPL_XXX transfer  */  \
+
  data[1] amount             /* Amount of better con            */  \
  data[1] amount           /* Amount of better spell skill    */  \
+
  firstf  TIF_CON_INC       \
  firstf  TIF_SPL_INC       \
+
  tickf  TIF_NONE          \
  tickf  TIF_NONE          \
+
  lastf  TIF_CON_DEC       \
  lastf  TIF_SPL_DEC       \
+
  applyf  APF_ABILITY;
  applyf  APF_SPELL_ADJ;
 
  
#define STR_TRANSFER(amount) \
+
#define CHA_TRANSFER(amount) \
flags {UNIT_FL_MAGIC}       \
+
flags {UNIT_FL_MAGIC}       \
affect                      \
+
affect                      \
  id ID_TRANSFER_STR       \
+
  id ID_TRANSFER_CHA       \
  duration -1               /* Must be permanent in the object */  \
+
  duration -1                 /* Must be permanent in the object */  \
  data[0] ABIL_STR          /* It is a strength function       */  \
+
  data[0] ABIL_CHA            /* It is a cha function           */  \
  data[1] amount             /* Amount of better strength      */  \
+
  data[1] amount             /* Amount of better cha            */  \
  firstf  TIF_STR_INC       \
+
  firstf  TIF_CHA_INC       \
  tickf  TIF_NONE          \
+
  tickf  TIF_NONE          \
  lastf  TIF_STR_DEC       \
+
  lastf  TIF_CHA_DEC       \
  applyf  APF_ABILITY;
+
  applyf  APF_ABILITY;
  
#define DEX_TRANSFER(amount) \
+
#define BRA_TRANSFER(amount) \
flags {UNIT_FL_MAGIC}      \
+
flags {UNIT_FL_MAGIC}      \
affect                      \
+
affect                      \
  id ID_TRANSFER_DEX       \
+
  id ID_TRANSFER_BRA       \
  duration -1                /* Must be permanent in the object */  \
+
  duration -1                /* Must be permanent in the object */  \
  data[0] ABIL_DEX           /* It is a dex function            */  \
+
  data[0] ABIL_BRA           /* It is a bra function            */  \
  data[1] amount              /* Amount of better dex           */  \
+
  data[1] amount              /* Amount of better bra           */  \
  firstf  TIF_DEX_INC       \
+
  firstf  TIF_BRA_INC       \
  tickf  TIF_NONE          \
+
  tickf  TIF_NONE          \
  lastf  TIF_DEX_DEC       \
+
  lastf  TIF_BRA_DEC       \
  applyf  APF_ABILITY;
+
  applyf  APF_ABILITY;
  
#define CON_TRANSFER(amount) \
 
flags {UNIT_FL_MAGIC}      \
 
affect                      \
 
  id ID_TRANSFER_CON        \
 
  duration -1                /* Must be permanent in the object */  \
 
  data[0] ABIL_CON            /* It is a con function            */  \
 
  data[1] amount              /* Amount of better con            */  \
 
  firstf  TIF_CON_INC      \
 
  tickf  TIF_NONE          \
 
  lastf  TIF_CON_DEC      \
 
  applyf  APF_ABILITY;
 
  
#define CHA_TRANSFER(amount) \
+
#define MAG_TRANSFER(amount) \
flags {UNIT_FL_MAGIC}       \
+
flags {UNIT_FL_MAGIC}       \
affect                      \
+
affect                      \
  id ID_TRANSFER_CHA       \
+
  id ID_TRANSFER_MAG       \
  duration -1                /* Must be permanent in the object */  \
+
  duration -1                /* Must be permanent in the object */  \
  data[0] ABIL_CHA           /* It is a cha function            */  \
+
  data[0] ABIL_MAG           /* It is a mag function            */  \
  data[1] amount              /* Amount of better cha           */  \
+
  data[1] amount              /* Amount of better mag           */  \
  firstf  TIF_CHA_INC       \
+
  firstf  TIF_MAG_INC       \
  tickf  TIF_NONE          \
+
  tickf  TIF_NONE          \
  lastf  TIF_CHA_DEC       \
+
  lastf  TIF_MAG_DEC       \
  applyf  APF_ABILITY;
+
  applyf  APF_ABILITY;
  
#define BRA_TRANSFER(amount) \
 
flags {UNIT_FL_MAGIC}      \
 
affect                      \
 
  id ID_TRANSFER_BRA        \
 
  duration -1                /* Must be permanent in the object */  \
 
  data[0] ABIL_BRA            /* It is a bra function            */  \
 
  data[1] amount              /* Amount of better bra            */  \
 
  firstf  TIF_BRA_INC      \
 
  tickf  TIF_NONE          \
 
  lastf  TIF_BRA_DEC      \
 
  applyf  APF_ABILITY;
 
  
 +
#define DIV_TRANSFER(amount) \
 +
flags {UNIT_FL_MAGIC}      \
 +
affect                      \
 +
  id ID_TRANSFER_DIV        \
 +
  duration -1                /* Must be permanent in the object */  \
 +
  data[0] ABIL_DIV            /* It is a div function            */  \
 +
  data[1] amount              /* Amount of better div            */  \
 +
  firstf  TIF_DIV_INC      \
 +
  tickf  TIF_NONE          \
 +
  lastf  TIF_DIV_DEC      \
 +
  applyf  APF_ABILITY;
  
#define MAG_TRANSFER(amount) \
+
#define HIT_TRANSFER(amount) \
flags {UNIT_FL_MAGIC}      \
+
flags {UNIT_FL_MAGIC}      \
affect                      \
+
affect                      \
  id ID_TRANSFER_MAG       \
+
  id ID_TRANSFER_HPP       \
  duration -1                 /* Must be permanent in the object */  \
+
  duration -1               /* Must be permanent in the object */  \
  data[0] ABIL_MAG           /* It is a mag function           */  \
+
  data[0] ABIL_HP           /* It is a hit point function       */  \
  data[1] amount             /* Amount of better mag            */  \
+
  data[1] amount             /* Amount of better strength      */  \
  firstf  TIF_MAG_INC       \
+
  firstf  TIF_HIT_INC       \
  tickf  TIF_NONE          \
+
  tickf  TIF_NONE          \
  lastf  TIF_MAG_DEC       \
+
  lastf  TIF_HIT_DEC       \
  applyf  APF_ABILITY;
+
  applyf  APF_ABILITY;
  
 +
#define SPEED_TRANSFER(newspeed) \
 +
flags {UNIT_FL_MAGIC}      \
 +
affect                      \
 +
  id ID_TRANSFER_SPEED      \
 +
  duration -1                /* Must be permanent in the object */  \
 +
  data[0] newspeed          \
 +
  firstf  TIF_SPEED_BETTER  \
 +
  tickf  TIF_NONE          \
 +
  lastf  TIF_SPEED_WORSE  \
 +
  applyf  APF_SPEED;
  
#define DIV_TRANSFER(amount) \
+
#define SLOW_TRANSFER(amount) \
flags {UNIT_FL_MAGIC}       \
+
flags {UNIT_FL_MAGIC}         \
affect                       \
+
affect                       \
  id ID_TRANSFER_DIV        \
+
  id ID_TRANSFER_SPEED      \
  duration -1                 /* Must be permanent in the object */  \
+
  duration -1               \
  data[0] ABIL_DIV            /* It is a div function            */  \
+
  data[0] newspeed          \
  data[1] amount              /* Amount of better div            */  \
+
  firstf  TIF_SPEED_WORSE    \
  firstf  TIF_DIV_INC      \
+
  tickf  TIF_NONE           \
  tickf  TIF_NONE         \
+
  lastf  TIF_SPEED_BETTER  \
  lastf  TIF_DIV_DEC      \
+
  applyf  APF_SPEED;
  applyf  APF_ABILITY;
 
  
#define HIT_TRANSFER(amount) \
+
</PROGRAMLISTING></INFORMALEXAMPLE>
flags {UNIT_FL_MAGIC}      \
+
</appendix>
affect                      \
 
  id ID_TRANSFER_HPP        \
 
  duration -1                /* Must be permanent in the object */  \
 
  data[0] ABIL_HP            /* It is a hit point function      */ \
 
  data[1] amount            /* Amount of better strength      */  \
 
  firstf  TIF_HIT_INC      \
 
  tickf  TIF_NONE          \
 
  lastf  TIF_HIT_DEC      \
 
  applyf  APF_ABILITY;
 
  
#define SPEED_TRANSFER(newspeed) \
+
<appendix id="app-g">
flags {UNIT_FL_MAGIC}      \
+
<TITLE>Skill definitions in values.h</TITLE>
affect                      \
 
  id ID_TRANSFER_SPEED      \
 
  duration -1                /* Must be permanent in the object */ \
 
  data[0] newspeed          \
 
  firstf  TIF_SPEED_BETTER  \
 
  tickf  TIF_NONE          \
 
  lastf  TIF_SPEED_WORSE  \
 
  applyf  APF_SPEED;
 
  
#define SLOW_TRANSFER(amount) \
+
<PARA>The following list was extracted from the
flags {UNIT_FL_MAGIC}        \
+
''values.h''</PARA>
affect                        \
+
<INFORMALEXAMPLE><PROGRAMLISTING>
  id ID_TRANSFER_SPEED      \
 
  duration -1                \
 
  data[0] newspeed          \
 
  firstf  TIF_SPEED_WORSE    \
 
  tickf  TIF_NONE          \
 
  lastf  TIF_SPEED_BETTER  \
 
  applyf  APF_SPEED;
 
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
#define SKI_TURN_UNDEAD        0
</appendix>
+
#define SKI_SCROLL_USE        1
 +
#define SKI_WAND_USE          2
 +
#define SKI_CONSIDER          3
 +
#define SKI_DIAGNOSTICS        4
 +
#define SKI_APPRAISAL          5
 +
#define SKI_VENTRILOQUATE      6
 +
#define SKI_WEATHER_WATCH      7
 +
#define SKI_FLEE              8
 +
#define SKI_SNEAK              9
 +
#define SKI_BACKSTAB          10
 +
#define SKI_HIDE              11
 +
#define SKI_FIRST_AID        12
 +
#define SKI_PICK_LOCK        13
 +
#define SKI_STEAL            14
 +
#define SKI_RESCUE            15
 +
#define SKI_SEARCH            16
 +
#define SKI_LEADERSHIP        17
 +
#define SKI_KICK              18
 +
#define SKI_SWIMMING          19
 +
#define SKI_BASH              20
 +
#define SKI_CLIMB            21
 +
#define SKI_SHIELD            22
 +
#define SKI_TRIP              23
 +
#define SKI_DUAL_WIELD        24
 +
#define SKI_CUFF              25
 +
#define SKI_RESIZE_CLOTHES    26
 +
#define SKI_RESIZE_LEATHER    27
 +
#define SKI_RESIZE_METAL      28
 +
#define SKI_EVALUATE          29 /* "Fake skill to simulate combinations */
 +
#define SKI_PEEK              30
 +
#define SKI_PICK_POCKETS      31
 +
#define SKI_FILCH            32
 +
#define SKI_DISARM            33
 +
#define SKI_SKIN            34
 +
#define SKI_SHELTER          35
 +
#define SKI_SOOTHE            36
 +
#define SKI_AMBUSH            37
 +
#define SKI_CURARE            38
 +
#define SKI_FASHION          39
 +
#define SKI_BUTCHER          40
 +
#define SKI_LAY_TRAP          41
 +
#define SKI_SHOOT            42
 +
#define SKI_HERBS            43
 +
#define SKI_FORAGE            44
 +
#define SKI_DOWSE            45
 +
#define SKI_TRACK            46
 +
#define SKI_HUNT              47
 +
#define SKI_THROW            48
 +
#define SKI_COOK              49
 +
#define SKI_SCAN              50
 +
#define SKI_SLIP              51
 +
#define SKI_PALM              52
 +
#define SKI_PLANT            53
 +
#define SKI_STALK            54
 +
#define SKI_KNEE              55
 +
#define SKI_ELBOW            56
 +
#define SKI_HIT              57
 +
#define SKI_PUNCH            58
 +
#define SKI_GLANCE            59
  
<appendix id="app-g">
 
<TITLE>Skill definitions in values.h</TITLE>
 
  
<PARA>The following list was extracted from the
+
</PROGRAMLISTING></INFORMALEXAMPLE>
''values.h''</PARA>
+
</appendix>
<INFORMALEXAMPLE><PROGRAMLISTING>
 
  
#define SKI_TURN_UNDEAD        0
+
<appendix id="app-h">
#define SKI_SCROLL_USE        1
+
<TITLE>Spell definitions in values.h</TITLE>
#define SKI_WAND_USE          2
 
#define SKI_CONSIDER          3
 
#define SKI_DIAGNOSTICS        4
 
#define SKI_APPRAISAL          5
 
#define SKI_VENTRILOQUATE      6
 
#define SKI_WEATHER_WATCH      7
 
#define SKI_FLEE              8
 
#define SKI_SNEAK              9
 
#define SKI_BACKSTAB          10
 
#define SKI_HIDE              11
 
#define SKI_FIRST_AID        12
 
#define SKI_PICK_LOCK        13
 
#define SKI_STEAL            14
 
#define SKI_RESCUE            15
 
#define SKI_SEARCH            16
 
#define SKI_LEADERSHIP        17
 
#define SKI_KICK              18
 
#define SKI_SWIMMING          19
 
#define SKI_BASH              20
 
#define SKI_CLIMB            21
 
#define SKI_SHIELD            22
 
#define SKI_TRIP              23
 
#define SKI_DUAL_WIELD        24
 
#define SKI_CUFF              25
 
#define SKI_RESIZE_CLOTHES    26
 
#define SKI_RESIZE_LEATHER    27
 
#define SKI_RESIZE_METAL      28
 
#define SKI_EVALUATE          29 /* "Fake skill to simulate combinations */
 
#define SKI_PEEK              30
 
#define SKI_PICK_POCKETS      31
 
#define SKI_FILCH            32
 
#define SKI_DISARM            33
 
#define SKI_SKIN            34
 
#define SKI_SHELTER          35
 
#define SKI_SOOTHE            36
 
#define SKI_AMBUSH            37
 
#define SKI_CURARE            38
 
#define SKI_FASHION          39
 
#define SKI_BUTCHER          40
 
#define SKI_LAY_TRAP          41
 
#define SKI_SHOOT            42
 
#define SKI_HERBS            43
 
#define SKI_FORAGE            44
 
#define SKI_DOWSE            45
 
#define SKI_TRACK            46
 
#define SKI_HUNT              47
 
#define SKI_THROW            48
 
#define SKI_COOK              49
 
#define SKI_SCAN              50
 
#define SKI_SLIP              51
 
#define SKI_PALM              52
 
#define SKI_PLANT            53
 
#define SKI_STALK            54
 
#define SKI_KNEE              55
 
#define SKI_ELBOW            56
 
#define SKI_HIT              57
 
#define SKI_PUNCH            58
 
#define SKI_GLANCE            59
 
  
 +
<PARA>The following list was extracted from the
 +
''values.h''</PARA>
 +
<INFORMALEXAMPLE><PROGRAMLISTING>
  
</PROGRAMLISTING></INFORMALEXAMPLE>
+
#define SPL_CALL_LIGHTNING    12  /* Cell Group  */
</appendix>
+
#define SPL_BLESS            13  /* D I V I N E */
 +
#define SPL_CURSE            14
 +
#define SPL_REMOVE_CURSE      15
 +
#define SPL_CURE_WOUNDS_1    16
 +
#define SPL_CURE_WOUNDS_2    17
 +
#define SPL_CURE_WOUNDS_3    18
 +
#define SPL_CAUSE_WOUNDS_1    19
 +
#define SPL_CAUSE_WOUNDS_2    20
 +
#define SPL_CAUSE_WOUNDS_3    21
 +
#define SPL_DISPEL_EVIL      22
 +
#define SPL_REPEL_UNDEAD_1    23
 +
#define SPL_REPEL_UNDEAD_2    24
 +
#define SPL_BLIND            25
 +
#define SPL_CURE_BLIND        26
 +
#define SPL_LOCATE_OBJECT    27
 +
#define SPL_LOCATE_CHAR      28
  
<appendix id="app-h">
+
#define SPL_RAISE_MAG        29  /* P R O T E C T I O N */
<TITLE>Spell definitions in values.h</TITLE>
+
#define SPL_RAISE_DIV        30
 +
#define SPL_RAISE_STR        31
 +
#define SPL_RAISE_DEX        32
 +
#define SPL_RAISE_CON        33
 +
#define SPL_RAISE_CHA        34
 +
#define SPL_RAISE_BRA        35
 +
#define SPL_SUN_RAY          36
 +
#define SPL_DIVINE_RESIST    37
 +
#define SPL_QUICKEN          38
 +
#define SPL_HASTE            39
 +
#define SPL_RAISE_SUMMONING  40
 +
#define SPL_AWAKEN            41
 +
#define SPL_MIND_SHIELD      42
 +
#define SPL_HEAT_RESI        43
 +
#define SPL_COLD_RESI        44
 +
#define SPL_ELECTRICITY_RESI  45
 +
#define SPL_POISON_RESI      46
 +
#define SPL_ACID_RESI        47
 +
#define SPL_PRO_EVIL          48
 +
#define SPL_SANCTUARY        49
 +
#define SPL_DISPEL_MAGIC      50
 +
#define SPL_SUSTAIN          51
 +
#define SPL_LOCK              52
 +
#define SPL_UNLOCK            53
 +
#define SPL_DROWSE            54
 +
#define SPL_SLOW              55
 +
#define SPL_DUST_DEVIL        56
 +
#define SPL_DET_ALIGN        57  /* D E T E C T I O N */
 +
#define SPL_DET_INVISIBLE    58
 +
#define SPL_DET_MAGIC        59
 +
#define SPL_DET_POISON        60
 +
#define SPL_DET_UNDEAD        61
 +
#define SPL_DET_CURSE        62
 +
#define SPL_SENSE_LIFE        63
 +
#define SPL_IDENTIFY_1        64
 +
#define SPL_IDENTIFY_2        65
  
<PARA>The following list was extracted from the
+
#define SPL_RANDOM_TELEPORT  66  /* S U M M O N I N G */
''values.h''</PARA>
+
#define SPL_CLEAR_SKIES      67
<INFORMALEXAMPLE><PROGRAMLISTING>
+
#define SPL_STORM_CALL        68
 +
#define SPL_WORD_OF_RECALL    69
 +
#define SPL_CONTROL_TELEPORT  70
 +
#define SPL_MINOR_GATE        71
 +
#define SPL_GATE              72
 +
#define SPL_CREATE_FOOD      73  /* C R E A T I O N */
 +
#define SPL_CREATE_WATER      74
 +
#define SPL_LIGHT_1          75
 +
#define SPL_LIGHT_2          76
 +
#define SPL_DARKNESS_1        77
 +
#define SPL_DARKNESS_2        78
 +
#define SPL_STUN              79
 +
#define SPL_HOLD              80
 +
#define SPL_ANIMATE_DEAD      81
 +
#define SPL_LEATHER_SKIN      82
 +
#define SPL_BARK_SKIN        83
 +
#define SPL_CONTROL_UNDEAD    84
 +
#define SPL_BONE_SKIN        85
 +
#define SPL_STONE_SKIN        86
 +
#define SPL_AID              87
 +
#define SPL_COLOURSPRAY_1    88  /* M I N D */
 +
#define SPL_COLOURSPRAY_2    89
 +
#define SPL_COLOURSPRAY_3    90
 +
#define SPL_INVISIBILITY      91
 +
#define SPL_WIZARD_EYE        92
 +
#define SPL_FEAR              93
 +
#define SPL_CONFUSION        94
 +
#define SPL_SLEEP            95
 +
#define SPL_XRAY_VISION      96
 +
#define SPL_SUMMER_RAIN      97
 +
#define SPL_COMMAND          98
 +
#define SPL_LEAVING          99
 +
#define SPL_FIREBALL_1      100  /* H E A T */
 +
#define SPL_FIREBALL_2      101
 +
#define SPL_FIREBALL_3      102
  
#define SPL_CALL_LIGHTNING    12  /* Cell Group  */
+
#define SPL_FROSTBALL_1      103 /* C O L D */
#define SPL_BLESS            13 /* D I V I N E */
+
#define SPL_FROSTBALL_2      104
#define SPL_CURSE            14
+
#define SPL_FROSTBALL_3     105
#define SPL_REMOVE_CURSE     15
 
#define SPL_CURE_WOUNDS_1    16
 
#define SPL_CURE_WOUNDS_2    17
 
#define SPL_CURE_WOUNDS_3    18
 
#define SPL_CAUSE_WOUNDS_1    19
 
#define SPL_CAUSE_WOUNDS_2    20
 
#define SPL_CAUSE_WOUNDS_3    21
 
#define SPL_DISPEL_EVIL      22
 
#define SPL_REPEL_UNDEAD_1    23
 
#define SPL_REPEL_UNDEAD_2    24
 
#define SPL_BLIND            25
 
#define SPL_CURE_BLIND        26
 
#define SPL_LOCATE_OBJECT    27
 
#define SPL_LOCATE_CHAR      28
 
  
#define SPL_RAISE_MAG        29 /* P R O T E C T I O N */
+
#define SPL_LIGHTNING_1      106 /* C E L L */
#define SPL_RAISE_DIV        30
+
#define SPL_LIGHTNING_2      107
#define SPL_RAISE_STR        31
+
#define SPL_LIGHTNING_3     108
#define SPL_RAISE_DEX        32
 
#define SPL_RAISE_CON        33
 
#define SPL_RAISE_CHA        34
 
#define SPL_RAISE_BRA        35
 
#define SPL_SUN_RAY          36
 
#define SPL_DIVINE_RESIST    37
 
#define SPL_QUICKEN          38
 
#define SPL_HASTE            39
 
#define SPL_RAISE_SUMMONING  40
 
#define SPL_AWAKEN            41
 
#define SPL_MIND_SHIELD      42
 
#define SPL_HEAT_RESI        43
 
#define SPL_COLD_RESI        44
 
#define SPL_ELECTRICITY_RESI  45
 
#define SPL_POISON_RESI      46
 
#define SPL_ACID_RESI        47
 
#define SPL_PRO_EVIL          48
 
#define SPL_SANCTUARY        49
 
#define SPL_DISPEL_MAGIC     50
 
#define SPL_SUSTAIN          51
 
#define SPL_LOCK              52
 
#define SPL_UNLOCK            53
 
#define SPL_DROWSE            54
 
#define SPL_SLOW              55
 
#define SPL_DUST_DEVIL        56
 
#define SPL_DET_ALIGN        57  /* D E T E C T I O N */
 
#define SPL_DET_INVISIBLE    58
 
#define SPL_DET_MAGIC        59
 
#define SPL_DET_POISON        60
 
#define SPL_DET_UNDEAD        61
 
#define SPL_DET_CURSE        62
 
#define SPL_SENSE_LIFE        63
 
#define SPL_IDENTIFY_1        64
 
#define SPL_IDENTIFY_2        65
 
  
#define SPL_RANDOM_TELEPORT  66 /* S U M M O N I N G */
+
#define SPL_STINKING_CLOUD_1 109 /* I N T E R N A L */
#define SPL_CLEAR_SKIES      67
+
#define SPL_STINKING_CLOUD_2 110
#define SPL_STORM_CALL        68
+
#define SPL_STINKING_CLOUD_3 111
#define SPL_WORD_OF_RECALL   69
+
#define SPL_POISON          112
#define SPL_CONTROL_TELEPORT  70
+
#define SPL_REMOVE_POISON   113
#define SPL_MINOR_GATE       71
+
#define SPL_ENERGY_DRAIN    114
#define SPL_GATE              72
+
#define SPL_DISEASE_1        115
#define SPL_CREATE_FOOD       73 /* C R E A T I O N */
+
#define SPL_DISEASE_2       116
#define SPL_CREATE_WATER     74
+
#define SPL_REM_DISEASE      117
#define SPL_LIGHT_1          75
+
#define SPL_ACIDBALL_1       118 /* E X T E R N A L */
#define SPL_LIGHT_2          76
+
#define SPL_ACIDBALL_2      119
#define SPL_DARKNESS_1        77
+
#define SPL_ACIDBALL_3      120
#define SPL_DARKNESS_2        78
+
#define SPL_FIND_PATH        121  /* Divine  */
#define SPL_STUN              79
+
#define SPL_DISPEL_GOOD      122
#define SPL_HOLD              80
+
#define SPL_PRO_GOOD        123
#define SPL_ANIMATE_DEAD     81
+
#define SPL_TRANSPORT        124
#define SPL_LEATHER_SKIN     82
+
#define SPL_FIRE_BREATH      125
#define SPL_BARK_SKIN        83
+
#define SPL_FROST_BREATH    126
#define SPL_CONTROL_UNDEAD   84
+
#define SPL_LIGHTNING_BREATH 127
#define SPL_BONE_SKIN         85
+
#define SPL_ACID_BREATH     128
#define SPL_STONE_SKIN        86
+
#define SPL_GAS_BREATH      129
#define SPL_AID              87
+
#define SPL_LIGHT_BREATH    130
#define SPL_COLOURSPRAY_1     88  /* M I N D */
+
#define SPL_HOLD_MONSTER    131
#define SPL_COLOURSPRAY_2     89
+
#define SPL_HOLD_UNDEAD      132
#define SPL_COLOURSPRAY_3     90
+
#define SPL_RAISE_DEAD      133
#define SPL_INVISIBILITY     91
+
#define SPL_RESURRECTION    134
#define SPL_WIZARD_EYE        92
+
#define SPL_UNDEAD_DOOR     135
#define SPL_FEAR              93
+
#define SPL_LIFE_PROTECTION  136
#define SPL_CONFUSION        94
+
#define SPL_ENERGY_BOLT     137
#define SPL_SLEEP            95
+
#define SPL_CLENCHED_FIST    138
#define SPL_XRAY_VISION      96
+
#define SPL_METEOR_SHOWER   139
#define SPL_SUMMER_RAIN      97
+
#define SPL_SUN_BEAM         140
#define SPL_COMMAND          98
+
#define SPL_SOLAR_FLARE      141
#define SPL_LEAVING          99
+
#define SPL_SUMMON_DEVIL    142
#define SPL_FIREBALL_1       100 /* H E A T */
+
#define SPL_SUMMON_DEMON     143
#define SPL_FIREBALL_2      101
+
#define SPL_SUMMON_FIRE      144
#define SPL_FIREBALL_3      102
+
#define SPL_SUMMON_WATER     145
 +
#define SPL_SUMMON_AIR      146
 +
#define SPL_SUMMON_EARTH     147
 +
#define SPL_CHARGE_WAND     148
 +
#define SPL_CHARGE_STAFF    149
 +
#define SPL_MENDING          150
 +
#define SPL_REPAIR          151
 +
#define SPL_RECONSTRUCT      152
 +
#define SPL_SENDING          153
 +
#define SPL_REFIT            154
 +
#define SPL_FIND_WANTED      155
 +
#define SPL_LOCATE_WANTED    156
 +
#define SPL_SUN_GLOBE        157
 +
#define SPL_MAGIC_CANDLE    158
 +
#define SPL_SONIC_BREATH    159
 +
#define SPL_SHARD_BREATH    160
 +
#define SPL_CONE_SHARD      161
 +
#define SPL_RAISE_HPP        162
 +
#define SPL_MANA_BOOST       163 /* Creation */
 +
#define SPL_TOTAL_RECALL    164
 +
#define LAST_SPELL          165
  
#define SPL_FROSTBALL_1      103  /* C O L D */
 
#define SPL_FROSTBALL_2      104
 
#define SPL_FROSTBALL_3      105
 
  
#define SPL_LIGHTNING_1      106  /* C E L L */
+
</PROGRAMLISTING></INFORMALEXAMPLE>
#define SPL_LIGHTNING_2      107
+
        </appendix>
#define SPL_LIGHTNING_3      108
+
</book>
 
 
#define SPL_STINKING_CLOUD_1 109  /* I N T E R N A L */
 
#define SPL_STINKING_CLOUD_2 110
 
#define SPL_STINKING_CLOUD_3 111
 
#define SPL_POISON          112
 
#define SPL_REMOVE_POISON    113
 
#define SPL_ENERGY_DRAIN    114
 
#define SPL_DISEASE_1        115
 
#define SPL_DISEASE_2        116
 
#define SPL_REM_DISEASE      117
 
#define SPL_ACIDBALL_1      118  /* E X T E R N A L */
 
#define SPL_ACIDBALL_2      119
 
#define SPL_ACIDBALL_3      120
 
#define SPL_FIND_PATH        121  /* Divine  */
 
#define SPL_DISPEL_GOOD      122
 
#define SPL_PRO_GOOD        123
 
#define SPL_TRANSPORT        124
 
#define SPL_FIRE_BREATH      125
 
#define SPL_FROST_BREATH    126
 
#define SPL_LIGHTNING_BREATH 127
 
#define SPL_ACID_BREATH      128
 
#define SPL_GAS_BREATH      129
 
#define SPL_LIGHT_BREATH    130
 
#define SPL_HOLD_MONSTER    131
 
#define SPL_HOLD_UNDEAD      132
 
#define SPL_RAISE_DEAD      133
 
#define SPL_RESURRECTION    134
 
#define SPL_UNDEAD_DOOR      135
 
#define SPL_LIFE_PROTECTION  136
 
#define SPL_ENERGY_BOLT      137
 
#define SPL_CLENCHED_FIST    138
 
#define SPL_METEOR_SHOWER    139
 
#define SPL_SUN_BEAM        140
 
#define SPL_SOLAR_FLARE      141
 
#define SPL_SUMMON_DEVIL    142
 
#define SPL_SUMMON_DEMON    143
 
#define SPL_SUMMON_FIRE      144
 
#define SPL_SUMMON_WATER    145
 
#define SPL_SUMMON_AIR      146
 
#define SPL_SUMMON_EARTH    147
 
#define SPL_CHARGE_WAND      148
 
#define SPL_CHARGE_STAFF    149
 
#define SPL_MENDING          150
 
#define SPL_REPAIR          151
 
#define SPL_RECONSTRUCT      152
 
#define SPL_SENDING          153
 
#define SPL_REFIT            154
 
#define SPL_FIND_WANTED      155
 
#define SPL_LOCATE_WANTED    156
 
#define SPL_SUN_GLOBE        157
 
#define SPL_MAGIC_CANDLE    158
 
#define SPL_SONIC_BREATH    159
 
#define SPL_SHARD_BREATH    160
 
#define SPL_CONE_SHARD      161
 
#define SPL_RAISE_HPP        162
 
#define SPL_MANA_BOOST      163  /* Creation */
 
#define SPL_TOTAL_RECALL    164
 
#define LAST_SPELL          165
 
 
 
 
 
</PROGRAMLISTING></INFORMALEXAMPLE>
 
        </appendix>
 
</book>
 

Revision as of 13:39, 24 May 2020

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <BOOK ID="basiczone"><?dbhtml filename="index.html"> <bookinfo> <TITLE>VME basic zone writing manual</TITLE> <author> <firstname>Ken</firstname> <surname>Perry</surname> </author> <copyright><year>2001</year><holder>Ken Perry</holder></copyright> </bookinfo>

<CHAPTER ID="ch-intro"><?dbhtml filename="ch00.html"> <TITLE>Introduction</TITLE>

<SECT1><TITLE>Giving credit where credit is due!</TITLE>

<PARA>The, basic zone writing manual, you are reading now, didn't just come flying out of this authors head. In fact it is a conglomeration of several old texts which are no longer used. I had first thought about quoting and giving credit to each person who had ever modified or created portions of the first documentation but because of the nature of the way they were built it was impossible to know who did what. I therefore have decided to create a list here of everyone who has ever worked on or had a hand in the development of the basic zone writing documentation and references. I will also give a short summary for each. I would also like to thank those listed below for their contribution to the development of one of the best mud servers on the internet today.

<VARIABLELIST id="var-credits"> <VARLISTENTRY> ;Original DIKU coding Team <DICTDEF> <PARA><itemizedlist> <LISTITEM><PARA>Hans Henrik Staerfeldt</PARA></LISTITEM> <LISTITEM><PARA>Sebastian Hammer</PARA></LISTITEM> <LISTITEM><PARA>Michael Seifert</PARA></LISTITEM> <LISTITEM><PARA>Katja Nyboe</PARA></LISTITEM> <LISTITEM><PARA>Tom Madsen</PARA></LISTITEM> <LISTITEM><PARA>Lars Balker Rasmussen</PARA></LISTITEM> </itemizedlist>

You should all know these people they are not only the original DIKU mud developers but a few of them designed and developed the new <ACRONYM>VME</ACRONYM> server. One or more of the previous mentioned people were the authors of the following texts that have been swallowed up by this book. <itemizedlist> <LISTITEM><PARA>abilities.txt</PARA></LISTITEM> <LISTITEM><PARA>guild.txt</PARA></LISTITEM> <LISTITEM><PARA>monster.txt</PARA></LISTITEM> <LISTITEM><PARA>objects.txt</PARA></LISTITEM> <LISTITEM><PARA>rooms.txt</PARA></LISTITEM> <LISTITEM><PARA>vmc.txt</PARA></LISTITEM> </itemizedlist></PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Andrew Cowan <DICTDEF>

<PARA>One of the original administrators of Valhalla mud and now the administrator of the mud connector. Andrew created the first zone tutorial, which was later included into the vmc.txt to clear up some things missing in the old vmc.txt. Again my thanks go out to Andrew for his contributions not only to this document but to the growth of the <ACRONYM>DIL</ACRONYM> programming language.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Ryan Holliday <DICTDEF>

<PARA>Made major updates to the tutorial.txt created by Andrew Cowan, which became version two of the tutorial.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Peter Ryskin <DICTDEF> <PARA>Wrote the original explanation of how to define exits.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY>

;John Clare <DICTDEF>

<PARA>Made major updates to the tutorial.txt created by Andrew Cowan and updated by Ryan Holliday, which became version three of the tutorial.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Marc Bellemare <DICTDEF>

<PARA>An editor and an author Marc combined and revised the tutorial and the vmc.txt into one document making it less Valhalla specific and more for any mud running the <ACRONYM>VME</ACRONYM> server.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Jennifer Garuba <DICTDEF> <para>Created the first document on how to create shop keepers. She also was one of the first builders to have the insite and to make it clear that a manual like this was needed.</para> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;Brian Spanton <DICTDEF>

<PARA>Converted the original vmc.txt into HTMl, while at the same time fixing many inconsistencies and typos in it.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Kathy Perry <DICTDEF>

<PARA>Wrote the original compiler howto to make it easier for new builders to compile their zone. She was also the first builder to open my eyes to the fact we needed a true manual on how to build.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Mark Pringle <DICTDEF> <para>Main editor, which spell checked and looked over my major grammer mistakes. I am sure he didn't catch them all but at least the ugly ones were caught.</para> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;Morgan Shafer <DICTDEF>

<PARA>Wrote the guild definition primer which explained teachers.</PARA> </LISTITEM> </VARLISTENTRY>


</VARIABLELIST></PARA>

</SECT1>

<SECT1> <TITLE> Who should read this book?</TITLE>

<PARA>This book was designed to be read by anyone who is thinking of writing areas for a <ACRONYM>VME</ACRONYM> server. If you have wrote for other mud servers you will still need to at least skim every chapter because the <ACRONYM>VME</ACRONYM> is like no other mud engine and has some very interesting differences.</PARA>

</SECT1>

<SECT1> <TITLE>What does this book cover?</TITLE>

<PARA>The topics covered in this book are everything to do with writing an area for the <ACRONYM>VME</ACRONYM> server. While we do cover using <ACRONYM>DIL</ACRONYM> functions to make your monsters, Rooms, and objects better and smarter we do not cover how to write the <ACRONYM>DIL</ACRONYM> functions covered in the <ACRONYM>DIL</ACRONYM> manual. The following are topics covered by this book. <itemizedlist> <LISTITEM><PARA>compiling and debugging</PARA></LISTITEM> <LISTITEM><PARA>Macros using the CPP</PARA></LISTITEM> <LISTITEM><PARA>Overall Zone structure</PARA></LISTITEM> <LISTITEM><PARA>Writing rooms</PARA></LISTITEM> <LISTITEM><PARA>Writing Objects</PARA></LISTITEM> <LISTITEM><PARA>Writing Monsters</PARA></LISTITEM> <LISTITEM><PARA>Doing the resets</PARA></LISTITEM> </itemizedlist></PARA>

</SECT1> </chapter>

<chapter ID="ch-01"><?dbhtml filename="ch01.html"> <TITLE>General compiler information</TITLE>

<PARA>In order to get your zone onto a valhalla Mud Engine (<ACRONYM>VME</ACRONYM>) server you must convert your zone from readable english text to binary form the server can understand. The way you do this is with a compiler. No don't freak out you don't have to be a skilled programmer to use a compiler. The only thing you have to do is format your rooms, objects, and Non-player characters (NPC) in a form which the compiler can understand. The great thing about the <ACRONYM>VME</ACRONYM> is you can do all your zone writing in your favorite editor with out having to log on to code. For those of you who have coded for other mud servers and are used to coding online this may be a new experience to you but you will find you can plan out better and more well designed areas offline than you can on line.</PARA>

<NOTE> <PARA>In the future the <ACRONYM>VME</ACRONYM> coding team is thinking of adding an online coding module for those mud administrators that can not live with out it. If you are one of these make sure you write <email>whistler@valhalla.com</email> and express your desires so you can be counted. </PARA> </NOTE>

<PARA>This chapter will mainly cover the Valhalla Mud Compiler (<ACRONYM>VMC</ACRONYM>), how it works, and the Valhalla Mud pre processor (<ACRONYM>VMC</ACRONYM> -p) works. We will also throw in some debugging hints but debugging will be covered more as you begin creating parts of your areas in the following chapters. </PARA>

<SECT1><TITLE>The compiler</TITLE>

<PARA>VMC is the Valhalla Mud Engine Compiler. for <ACRONYM>VME</ACRONYM> servers. A compiler takes a source file or better described as your areas input file and converts it to a binary file the server can then load and use online. In the <ACRONYM>VME</ACRONYM> we call areas you build 'zones', therefore the source file for a zone has the extension 'zon'. In order to make this more clear we will start with our first example.</PARA>

<PARA>Lets say you were making a Zone of dragons. You may want to call the file something resembling its contents like, dragon.zon. Notice we have appended the '.zon' extension. The compiler requires all zones to end in '.zon' in order for it to know this is a zone source file.</PARA>

<PARA>Now lets say we have completed writing our first zone and want to compile it. The command is simply: <command> VMC> dragon.zon </command> If the zone compiles correctly it will indicate success by printing a message to the screen and outputting two files both with the same root name as the original zone source file but with different extensions. In this case there would be the following: <VARIABLELIST> <VARLISTENTRY> ;dragon.data <DICTDEF>

<PARA>The file holding the binary version of the zone</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;dragon.reset <DICTDEF>

<PARA>The file containing the reset information for the zone.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> If the zone doesn't compile correctly and you have errors it will print a list of the errors and the location where they can be found so you can fix them. The debugging process will be explained more as you learn how to create rooms, monsters, and objects.</PARA>

</SECT1>

<SECT1><TITLE>The VMC pre-processor</TITLE>

<PARA>The <ACRONYM>VMC</ACRONYM> Pre-Processor (<ACRONYM>VMC</ACRONYM> -p) can be thought of as a powerful search and replace tool used by the compiler before it converts the zone to its binary form. This tool gives you the builder the ability to add comments, create short hand expressions for repeated items, include other files in your zone, and even to do some minor calculations when necessary.</PARA>

<NOTE> <PARA>If you have coded in C or c++ before the Pre Processor the <ACRONYM>VMC</ACRONYM> uses is no different and you can skip this section.</PARA> </NOTE>

<sect2><TITLE>Commenting your zone</TITLE>

<PARA>The practice of adding comments to your zone is a good thing to get into so the administrators and other builders can help you with your zone and know what you were trying to do if there are problems. Comments aren't as important when writing the zone as they will be when you start writing your own special <ACRONYM>DIL</ACRONYM> functions but it is important to know how comments work and that you can use them if you need to. A comment is a block of text the compiler will never see and is there only for you and who ever reads the file. In order to make it so the compiler will not see the block of text you must surround it by a set of symbols that tell the CPP to strip it out before passing the zone on to the compiler. These symbols are the '/*' and the '*/' symbols or the '//' symbols together in front of a single line.</PARA>

<PARA>In order to best explain how comments work we will give you a some what strange example. First we will start by showing you a very basic line you will see time and time again in rooms.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

title "this is a title"

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>This is a title it will show up in everything from rooms, to objects and even NPCs. Now lets see what a commented line would look like.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

//I am going to make a title now title /* I put the keyword first*/ "this is a title/*then the title*/

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>This of course is very ugly but the point is not to be pretty it is to show you both the first way and the second way will look exactly the same to the compiler because all comments are removed before the compiler ever gets it. A better use of a comment in a zone however would be something like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

/* The following ten rooms are the vineyards, there are 97 rooms in the zone. */

//Zone first created 1994

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>You will find comments will make coding large zones much easier because you can add text meant just for the builders eyes.</PARA>

<NOTE><PARA>You will have to decide if you want a multi-line comment or a single line comment and use the '//' or the '/**/' respectively. The rule of thumb is if the comment is longer than 1 line it is easier to put the '/**/' around the comment than to comment each individual line.</PARA></NOTE>

</sect2> <sect2><TITLE>Macros and what they can do for you</TITLE>


<PARA>When making a zone you will find there are things you use more than once. In fact you may find things you want others to use or things you want to use in multiple zones. Its true you could block and copy and stick them everywhere. in fact that is what I did when I first started building. I soon found my zone file was extremely large and hard to upkeep. With a few minor changes and a lot of deleting I used short hand or better known in the world of coding as macros to make my zone readable.</PARA>

<PARA>Lets say you had some flags you were going to set in fifty rooms and you knew they would all be the same. You could type the following line 50 times.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>With the macros however you could make this much easier by just doing the following at the beginning of your zone.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER, UNIT_FL_CAN_BURY}

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>Then where ever you want the flags you just type DIRTFLOOR. You are probably thinking, yeah big deal I can do that with block and copy. True but there is another benefit to this. Lets say later you wanted to also make these 50 rooms no teleport. All you would have to change is the define like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT}

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Now when you recompile all 50 rooms are changed and you didn't even have to do a search and replace.</PARA>

<PARA>You can also make macros that take arguments. The ability to take arguments is where macros take a leap and a bound out in front of your favorite editor to allow you to do things you can not do easily with search and replace. Lets say you have an exit descr you want to use in 50 swamp rooms because heck everything looks the same in a swamp when you look one direction to the next.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

east to swamp1 descr "You see the swamp stretch out for miles";

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>This could be made into a macro like:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

#define sexit(direction, place) direction to place descr \ "You see the swamp stretch out for miles.";

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>Then all you need to use it is:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

SEXIT(east,swamp1) SEXIT(north,swamp2) SEXIT(south,swamp3)

</PROGRAMLISTING> </INFORMALEXAMPLE> <NOTE><PARA>There is no space between 'SEXIT' and '(' that is important because the CPP sees 'SEXIT(' and 'SEXIT (' as two different things. It is also important to notice all defines must start at the beginning of the line and be either one line long or have a '\' telling the Pre Processor that it should continue with the next line as if it was this line.</PARA></NOTE>

<PARA>You can also combine macros together so you have a set of macros like:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

#define DIRTFLOOR flags {UNIT_FL_NO_WEATHER,UNIT_FL_CAN_BURY,UNIT_FL_NO_TELEPORT} #define DIRTSECT movement SECT_INSIDE \ DIRTFLOOR

</PROGRAMLISTING> </INFORMALEXAMPLE>

<PARA>You may have noticed I capitalize all macros. This is not a must but it is suggested so you can easily tell what is a macro and what is not.</PARA>

</sect2> <sect2><TITLE>Including other files in your zone</TITLE>

<PARA>Another function of the <ACRONYM>VMC</ACRONYM> Pre Processor, '#include', allows you to include other files in your zone file. The <ACRONYM>VME</ACRONYM> comes with some basic include files you can use the macros out of and use as examples on how to make your own include files. These files are the composed.h,, vme.h, values.h, base.h, liquid.h, and wmacros.h. Including composed.h will include all the rest of the include files into your zone because it has include statements that use all the others.</PARA>

<NOTE><PARA>You will want to include the files at the beginning of your zone file because all defines you use must be defined before you use them.</PARA></NOTE>

</sect2> <sect2><TITLE>Doing minor calculations</TITLE>

<PARA> You can also do minor calculations in a macro. Lets say you wanted to make it so the higher level an NPC was the heavier he was and the taller he was. This would be simple with a macro.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

#define MLEVEL(lvl) \ level lvl \ height lvl+72 \ weight lvl*9

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>This macro would increase the height and weight depending on what level you made the NPC pretty simple. There is much more a macro can do for you but the Pre Processor and all its uses go far beyond the scope of this manual. If you are really interested in all the neat things it can do type the following command at the '$' prompt on your Linux box. <command>man cpp</command> The C-Pre Processor is what the <ACRONYM>VMC</ACRONYM> Pre Processor is based on and most if not all functions of the CPP work in the <ACRONYM>VMC</ACRONYM>. </PARA> </sect2>

</SECT1> </chapter>

<chapter ID="ch-02"><?dbhtml filename="ch02.html"> <TITLE>Zone source file</TITLE>

<PARA>In this chapter we will define all the sections of a zone file and go in-depth on the zone info section. Once complete with this chapter you should be able to create an empty yet compilable zone.</PARA>

<PARA>A zone source file is split up into 6 sections. A zone-declaration section, a mobile (NPC) section, an object section, a room section, a reset section, and the <ACRONYM>DIL</ACRONYM> section. The zone section is the only section that has to be in the file, and they may appear in any order.</PARA>

<PARA>Each section is preceded by a section header. These are the six possible headers: <itemizedlist> <LISTITEM><PARA>%zone</PARA></LISTITEM> <LISTITEM><PARA>%rooms</PARA></LISTITEM> <LISTITEM><PARA>%mobiles</PARA></LISTITEM> <LISTITEM><PARA>%objects</PARA></LISTITEM> <LISTITEM><PARA>%reset</PARA></LISTITEM> <LISTITEM><PARA>%<ACRONYM>DIL</ACRONYM></PARA></LISTITEM> </itemizedlist> The first four sections may be considered lists of definitions. The reset section can be considered a program in a simple programming language. And the <ACRONYM>DIL</ACRONYM> section is a bit special - it includes the zone templates (DIL functions that can be used from any zone, on anything, as opposed to "specialized" DIL functions placed inside a unit's definitions). After all sections you are using are defined you must tell the compiler you are done the special symbol '%end' must be placed at the end of the zone for this reason. </PARA>

<SECT1><TITLE>Definition types</TITLE>

<PARA>When creating your zone there are six main building blocks. We call these definition types. Each type represents some kind of data you want the compiler to be able to recognize. These data definitions take the basic form:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

field value

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>Where field is the name of a data field, and value is some value. Values are of one of 6 types: <VARIABLELIST> <VARLISTENTRY> ;integer <DICTDEF> <PARA><indexterm> <primary>Number</primary> </indexterm>

A whole number or if you are in practice of using Hex you can use the C style hex numbers in either upper or lower case (i.e 0X0f3 0x0f3)</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;string <DICTDEF> <PARA><indexterm> <primary>String</primary> </indexterm>

Text enclosed in Double Quotes. The string can span more than one line as it would in a description.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

title "The dark dragon altar" descr "There are many things you can see and there are many things that can't be seen but this is still a description none the less."

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;stringlist <DICTDEF> <PARA><indexterm> <primary>Stringlist</primary> </indexterm>

A set of strings, it can be a single string or multiple depending on your needs. These are used in names, extras, creators, and special keywords all to be defined later in their respective places. These are defined in the following manor.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

<fieldname> {"string1","string2","string3", ...}

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;intlist <DICTDEF> <PARA><indexterm> <primary>Intlist</primary></indexterm>

A list of numbers which can be used with an extra. This type works like the stringlist but doesn't need the quotes.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

extra {"mynumberlist"} {1,2,3,4,5,6,7,...} "This is a number list attached to an extra"

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;flags <DICTDEF> <PARA><indexterm> <primary>Flags</primary> </indexterm>

Like the Intlist the flag is defined with a list of numbers. The list of numbers is not taken literally however it is combined to create one number by binary oring the number list together. If that confuses you don't worry, it takes some getting used to. These types are used for Manipulation, flags, and positions.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

flags {2,8} manipulate {8}

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>In the previous example the 'flags' value after this zone compiles would be 10 because binary oring the two flags together is a lot like adding. The two numbers probably make no sense so most flags you use will have defines if I used the defines found in vme.h the previous example would look like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

flags {UNIT_FL_INVISIBILE,UNIT_FL_BURIED} manipulate {WEAR_BODY}

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>We will cover this more in-depth later but it was necessary to give a good overview so you understand this field type enough to recognize what it is when you see it.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;symbol <DICTDEF> <PARA><indexterm> <primary>Symbol</primary> </indexterm>

A label you reference from other parts in your zones. Every unit (room,object,room) and even the zone itself has a unique label that can be referenced. It is important to make symbol names that are clear so the Administrators of the mud know what each item is when using the online administration commands.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

dark_sword /*good symbol*/ rm_5892 /*Bad symbol*/

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>When loading items online the zone symbol and the item symbol are combined to create a reference to the item. For example if our zone name was 'dragon' and our item was 'dark_sword' the symbolic name for this item would be 'dark_sword@dragon'. Using symbols will be covered more in the <ACRONYM>DIL</ACRONYM> manual and in the administration manuals for loading objects online. For now it is enough to understand symbols must follow the following rules when being defined.</PARA> <itemizedlist> <LISTITEM><PARA>The first letter of the symbol must be a letter of the alphabet or a '_' character</PARA></LISTITEM> <LISTITEM><PARA>Characters following the first can be numbers, alphabet letters, and '_' characters</PARA></LISTITEM> <LISTITEM><PARA>The name can be no longer than 15 characters</PARA></LISTITEM> <LISTITEM><PARA>No reserved keywords can be used as a name <XREF LINKEND="app-b"></PARA></LISTITEM> </itemizedlist>

<NOTE><PARA>the end tag that ends all unit definitions is also considered a symbol it is just a symbol that must be included with</PARA></NOTE> </LISTITEM> </VARLISTENTRY> </VARIABLELIST></PARA>

<PARA>There are two other field types that can not be defined as a regular field type. These are the function reference and the Structure. The function reference can be either a reference to a <ACRONYM>DIL</ACRONYM> function or a special function called from the base code.</para>

<NOTE><PARA>Special functions are being replaced with <ACRONYM>DIL</ACRONYM> for better performance and should only be used when no <ACRONYM>DIL</ACRONYM> functions exist to replace them</PARA></NOTE>

<para>The Structure field types are a combination of other field types to make a special field type for the unit being defined. A good example of this is a 'exit' for a room. The exit has everything from flag, string, stringlist, and even description fields. The exit field will be defined much more in-depth in the chapter on rooms but it is important to know some fields are considered Structure fields because they can have many values. The only two Structure fields are the exit and extra fields which will both be defined more later because they can be used differently depending on what you are using them for.</PARA>

</SECT1>

<SECT1 id="zoneinfo"> <TITLE>Zone information section</TITLE>

<PARA>The zone information section is the only section that must exist in the source file of your area. With out this section the compiler is unable to create the zone because frankly it doesn't know what to call it. It is also the easiest of the sections to learn because there is only a few possible fields. The Zone-section defines the global parameters for the current zone. It is usually wise to place this section in the top of the source file to make it easy to find the zone information when editing the file.</PARA>

<TITLE>Zone section field descriptions</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>Field</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>creators</ENTRY> <ENTRY>Stringlist</ENTRY> <ENTRY> This field is where you place the creators of the zone. With this field filled out the Administrators and builders can easily find out who the zone was written by and be able to contact them if there are problems. </ENTRY></ROW> <ROW> <ENTRY>lifespan</ENTRY> <ENTRY>Number</ENTRY> <ENTRY> This defines the interval between resets for this zone, in minutes. Default is 60 if this field is left out of the information section. </ENTRY></ROW> <ROW> <ENTRY>notes</ENTRY> <ENTRY>String</ENTRY> <ENTRY> This is a plain text description of the zone for administrators and builders. It is often a good idea to include your e-mail address in the notes so you can be reached easily by the administrators. </ENTRY></ROW> <ROW> <ENTRY>reset</ENTRY> <ENTRY>Number</ENTRY> <ENTRY> This combined with 'lifespan' defines if the zone will be reset. This field gives the condition that must be met to reset the zones you should use the defines in the vme.h, RESET_NOT, RESET_IFEMPTY, and RESET_ANYHOW. Default is RESET_ANYHOW, which means, the zone will be reset even if players are present within it. </ENTRY></ROW> <ROW> <ENTRY>title</ENTRY> <ENTRY>String</ENTRY> <ENTRY> This is the title of the zone, for example Dragons Nest, Dark station, and creators hide out. It is used mainly for the areas command so players can get a list of all the areas in the game. It can however be accessed by the 'zoneptr' variable type in <ACRONYM>DIL</ACRONYM>. If you have a zone that spans across multiple source files you only need to define the title once. If you put the title in all source files it will show up multiple times in the area listing. You would also leave this blank if the zone should not be on the areas list like an administration zone. </ENTRY></ROW> <ROW> <ENTRY>weather</ENTRY> <ENTRY>Integer</ENTRY> <ENTRY> This field sets the humidity level of the zone. If for example you want a hot desert like zone you would want to set this to its highest value. The range of this field is 1000 to -1000. This is an optional field and will not be covered else where because it is simple to use. </ENTRY></ROW> <ROW> <ENTRY>%zone</ENTRY> <ENTRY>Symbol</ENTRY> <ENTRY> This entry defines the name of the zone. Default is the preceding component of the current filename, minus the trailing ".zon". Note, the symbol should be added after the %zone tag, which should always be put, even if you do not add a symbol after it. </ENTRY></ROW> </TBODY> </TGROUP>


<PARA>The only field that must exist when you go to create the zone information section is the '%zone'. Leaving the '%zone' field out will cause an error when you try to compile it. We suggest you not only put the '%zone' field but you also add a symbol or as I call it a zone name. The following are three legal examples of a Zone information header. You be the judge of which is more informative.</PARA>

<INFORMALEXAMPLE> <PROGRAMLISTING>

/*very bad*/ %zone

/*bad but better than nothing*/ %zone bug_planet

/*The way it should be done!*/ %zone dragonst lifespan 20 reset RESET_ANYHOW creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

</PROGRAMLISTING> </INFORMALEXAMPLE>

<PARA>If you felt like it you could add a '%end' to the proceeding examples and compile them. They would create an empty zone so wouldn't be very exciting but at least its possible. We will not go into any compiling until we have at least one unit type to compile because it is pretty useless to do. the next chapters will define the basic unit building blocks you will use for rooms, objects, and NPCs and start you off on compiling.</PARA> </SECT1>

</chapter>

<chapter ID="ch-03"><?dbhtml filename="ch03.html"> <TITLE>Unit building blocks</TITLE>

<PARA>When creating your zone you will find some basic structures are used in all three unit types rooms, objects, and NPCs. In this chapter we will define the main building blocks of all units along with some helpful hints </PARA>

<PARA>No matter which unit type you are dealing with there is a simple basic structure that lets the compiler know not only what unit type it is dealing with but where one unit begins and where it ends. The way the compiler tells what unit type it is dealing with is by the section header '%rooms', '%objects', and '%mobiles'. All rooms must be defined under the '%rooms' header and likewise objects and NPCS under their respective headers. Each unit starts with a symbolic name called the unit symbol and ends with the keyword end. The following would be a legal definition of any unit type:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

symbol_name end

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>If you define a unit like this when it loads it will be blank, while this is not extremely useful it is good to know you can leave out any field you don't feel you need.</PARA>


<VARIABLELIST> <TITLE>Unit building blocks</TITLE> <VARLISTENTRY> ;symbol field <DICTDEF> <PARA><indexterm> <primary>symbol field</primary> </indexterm>

In the last chapter we defined the different field types and the rules you must follow when defining a symbol. It is important enough to relist these rules here so you do not run into problems when creating your units. <itemizedlist> <LISTITEM><PARA>The first letter of the symbol must be a letter of the alphabet or a '_' character</PARA></LISTITEM> <LISTITEM><PARA>Characters following the first can be numbers, alphabet letters, and '_' characters</PARA></LISTITEM> <LISTITEM><PARA>The symbol can be no longer than 15 characters</PARA></LISTITEM> <LISTITEM><PARA>No reserved keywords can be used as a symbol<XREF LINKEND="app-b"></PARA></LISTITEM> </itemizedlist></PARA>

<NOTE><PARA>It is also important to know currently it is hard to deal with units having capital letters in them, this may be fixed in the future but it is good practice to use all lower case characters in the symbols.</PARA></NOTE>

<PARA>Another thing you should think about when defining your symbol names is to be clear about what the unit is. When you list units on the <ACRONYM>VME</ACRONYM> server with <command>wstat</command> the symbolic names are shown if you were to see the list: <computeroutput> i6853 b2419 l1854 </computeroutput> You would have no idea what those three items were unless you personally built them recently, therefore it is a much better coding practice to name things what they are like: <computeroutput> long_sword healer_hut dog </computeroutput> </PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;title field <DICTDEF> <PARA><indexterm> <primary>title field</primary> </indexterm>

The title field is probably the easiest field on all units it is what is shown on the first line of a room when you enter and it is the name shown when you get an object or attack a NPC. There is only two important things to look at when defining titles one is punctuation and the other is capitalization. Room titles need to be capitalized and so do proper names but the first letter of an object title or a NPC title do not normally need to be capitalized. this is best explained by some examples.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

title "The dragons in."/*good*/ title "a big bull dog."/*bad has a period at the end*/ title "Bill the destroyer"/*good*/ title "A long dagger"/*bad capital 'a'*/

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>Now to show why some of those are good we will demonstrate by some sample output in the game. <computeroutput>

prompt: l The Dragons Inn You are standing in a moldy inn.

prompt: get A long dagger You get A long dagger.

prompt kick dog You kick a bull dog. in the head. </computeroutput> Notice the 'A' and the extra period do not really look right where they end up appearing in the game. These may be minor nit picky details but if you do it right the first time you won't have to deal with the english major that just happens to be playing on your mud.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;names field <DICTDEF> <PARA><indexterm> <primary>names field</primary> </indexterm>

The 'names' field defines the names everything in the game can use to interact with your unit. For rooms the names are used as teleport or goto points for characters and NPCs or they are sometimes used for special DIL functions on objects to trigger in certain rooms. On NPCs and objects names can be used for anything from poking a player to giving a player an object. The names field is very flexible it has even been used to store what a container is holding in order to have quick access to the names in the container. it</PARA>

<PARA>When making rooms it is not necessary to put room names. In fact it is a good way of making sure players can't teleport to certain rooms because if the room doesn't have a name the person can't teleport to it. Objects and NPCs must have names because if you leave names off of them you can not pick them up or kill them depending on which you are dealing with. It is also good practice to use all combinations of the object or NPCs title so a player will know exactly what to type to use the item for example:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

bad_obj title a small dog" names{"small dog","small","dog"} end

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>It is up to you as a builder if you want to use names like 'small' in your names list since you would not 'get small' in real life it may not have to be added to the names list. It is important however to define your extras from big to small because of how the <ACRONYM>VME</ACRONYM> command interpreter handles names of things. For example if you had the following names:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

small_item title "a small item" names {"small","item","small item"}

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>When you try to <command>give small item Bill</command>. The interpreter would try to give small to item and that would not be what you wanted to do. Don't worry the compiler will catch this and give you an error something like: <computeroutput>

Fatal name ordering on line ###.

</computeroutput></PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;descr field <DICTDEF> <PARA><indexterm> <primary>descr field</primary> </indexterm>

The description building block is used in many places. You will find description fields on extras, exits, rooms, NPCs, objects, and as you have already seen the help and the notes field of the zone information section are also description fields.</PARA>

<PARA> Depending on what you are working on description fields can mean totally different things to the person looking in the room. A description field on a room can be the inside or outside of the rooms description. A description on extras can be an NPCs descr or an extra description on the room like if you looked at a 'rug' or a 'chair'. On an exit the descr field describes what you see when you look in that direction from the room you are in. The important thing right now is no matter where you use them they all work the same.</PARA>

<PARA>description fields like the title field have a tag or unlike the title field can have a set of tags before them like in extras or exits but like titles they are just a string surrounded by quotes. You can make multiple line descriptions if the description is on a NPC you may not want to since it is the description shown when you walk into the room. The following would be some examples of room descriptions.</PARA>

<INFORMALEXAMPLE> <PROGRAMLISTING>

descr "this is how you would define a room descr and as you can see it can be much longer than a line if you like."

extra {"basic extra"} "This is a description field on an extra."

extra{"more advanced","extra"}{1,2,3,4,5,6} "This is still the description field. Like the room description or any description field for that matter this can be longer than a line."

east to bathroom descr "You see one big toilet!";

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;extra fields <DICTDEF> <PARA><indexterm> <primary>extra fields</primary> </indexterm>

The extra field is the work horse for the builder. It is the building block that most brings your zone to life. You can use it to describe body parts or items in a room. When you use <ACRONYM>DIL</ACRONYM> you will use extras to store information like quest information or special information you need later. Extras also store the main description on NPCs since the descr field on NPCs is really the long title shown in the room which will be explained later in <xref linkend="ch-05">.</PARA>

<PARA>The extra Is the first structure definition you have run into so it may take some playing with to figure it out. The extra has actually 4 fields three of them must be there in some form. The first is the identifier that tells the compiler that this is an extra, the second is a stringlist, the third is an Optional Intlist, and the final one is the extra description field. If the extra had all the fields it would look like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

extra {"small chair","chair"} {1,2,3,4,5} "Its a chair."

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>If the previous wasn't an example we would have left out the Intlist because it is not necessary to put the Intlist on a chair unless you want it there for some special <ACRONYM>DIL</ACRONYM> you are creating. the Intlist is the only field that can be totally left out but you can leave the string list blank when you want to make the extra the default description when the object, room, or NPC is being looked at, like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

extra {} "This would be what you see when you look at any of the names in the names list."

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>We will go more in-depth into why you want to do this in the following chapters. </PARA></LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>You are now ready to put these building blocks to work. You have only to learn how to put these fields to work for each of the three unit types and you will be off and running.</PARA>

</chapter>

<chapter ID="ch-04"><?dbhtml filename="ch04.html"> <TITLE>The room section</TITLE>

<PARA> The previous chapter gave you the basic building blocks that will be used all through creating rooms, NPCs, and objects. If you jumped straight to this chapter without reading about the general building blocks you might want to return to <XREF LINKEND="ch-03"> first. This chapter will deal with all the fields of rooms what they are and how to use them but with out the previous chapter you may get lost.</PARA>

<PARA>In order to get started building rooms you should first be aware of the room fields you can use. The <xref linkend="rmfields"> shows a full listing of all the room fields and their types as defined in <xref linkend="ch-03">.</PARA>

<TITLE>Room fields and types listing</TITLE> <TGROUP align=left cols=5 colsep=1> <COLSPEC COLNAME="c1" COLWIDTH="2in"> <COLSPEC COLNAME="c2" COLWIDTH="2in"> <COLSPEC COLNAME="c3" COLWIDTH=".5in"> <COLSPEC COLNAME="c4" COLWIDTH="2in"> <COLSPEC COLNAME="c5" COLWIDTH="2in"> <THEAD> <ROW> <ENTRY COLNAME="c1">Field</ENTRY> <ENTRY COLNAME="c2">Type</ENTRY> <entry></entry> <ENTRY COLNAME="c4">Field</ENTRY> <ENTRY COLNAME="c5">Type</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY COLNAME="c1">symbolic name</ENTRY> <ENTRY COLNAME="c2">Symbol</ENTRY> <ENTRY morerows=9 colname="c3"></ENTRY> <ENTRY COLNAME="c4">manipulate</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">names</ENTRY> <ENTRY COLNAME="c2">Stringlist</ENTRY> <ENTRY COLNAME="c4">alignment</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">title</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">flags</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">descr</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">weight</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">outside_descr</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">capacity</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">extra</ENTRY> <ENTRY COLNAME="c2">Structure</ENTRY> <ENTRY COLNAME="c4">light</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">minv</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">exit</ENTRY> <ENTRY COLNAME="c5">Structure</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">key</ENTRY> <ENTRY COLNAME="c2">string</ENTRY> <ENTRY COLNAME="c4">movement</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">spell</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">end</ENTRY> <ENTRY COLNAME="c5">Symbol</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">dilbegin or dilcopy</ENTRY> <ENTRY COLNAME="c2">Function pointer</ENTRY> <ENTRY COLNAME="c4"></ENTRY> <ENTRY COLNAME="c5"></ENTRY> </ROW> </TBODY> </TGROUP>


<PARA>As you can see there is not a whole lot of fields you have to learn in order to make a room. In fact as you will see shortly some of these fields are not even used on rooms. In <xref linkend=" rmfielddescr"> we will expand your knowledge from just knowing what the field types are to how to set them as well.</PARA>

<sect1 id="rmfielddescr"> <TITLE>Description of room fields</TITLE>

<variablelist id="var-rmfields"> <VARLISTENTRY> ;symbolic name <DICTDEF> <PARA><indexterm> <primary>Room symbol</primary> </indexterm>

The rules of the symbols has been explained in <XREF LINKEND="ch-03">, if you didn't read them yet you may want to review. The important thing to realize with the room symbol is it is always good practice to give the room a symbol resembling the title so administrators and builders can use the <command>goto</command> and the <command>wstat</command> to easily goto the room in question. </PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;title <DICTDEF> <PARA><indexterm> <primary>Room title</primary> </indexterm>

The room title field should start with a capital and depending on your preference the compiler will not complain if you add punctuation at the end. The following are good examples of a room title.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

title "The Post Office" title "The deep dark jungle floor:" title "The Dragon Station control room"

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>It is really up to you weather you want to use punctuation or not, it is more administrator personal opinion than anything. </PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;names <DICTDEF> <PARA><indexterm> <primary>Room names</primary> </indexterm>

The names field on the rooms are not that important and only should be used if the builder wishes the room to be accessed by the players by a teleport command. If the room has no names no one will be able to teleport to it. On some muds there will be no teleport spell so the only use for this field will be for <ACRONYM>DIL</ACRONYM> functions the administrator creates. If a builder wants the room to be accessible by teleport then the names should match the title since that is what the player will try to teleport to. A few good examples of names on a room would look as follows.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

title "The Post Office" Names {"post office","office"}

title "the thrown room" names {"thrown room","thrown"}

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;descr <DICTDEF> <PARA><indexterm> <primary>Room description</primary> </indexterm>

The description field is what the player sees when walking into the room or when looking with no arguments. </PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;outside_descr <DICTDEF> <PARA><indexterm> <primary>Room outside description</primary> </indexterm>

This field is what is shown to a char if the room is loaded inside another room. For example if you had a room linked inside another room and called a barrel this would be the description that lets the character know it is a barrel. An example would be like:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

outside_descr "a big old barrel is laying here on its side."

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>This allows a builder to make a room that looks like an object inside another room. </PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;movement <DICTDEF> <PARA><indexterm> <primary>movement</primary> </indexterm>

The movement field defines the endurance cost to a character when moving through this room. In the future these fields will be adjustable by the use of a define file. Currently all movement fields are constants and are defined in the vme.h The following is the movement sector types and their values.

<TITLE>Sector movement values</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>Symbol</ENTRY> <ENTRY>Name</ENTRY> <ENTRY>Endurance Cost</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>SECT_INSIDE</ENTRY> <ENTRY>inside</ENTRY> <ENTRY>1</ENTRY> </ROW> <ROW> <ENTRY>SECT_CITY</ENTRY> <ENTRY>city</ENTRY> <ENTRY>1</ENTRY> </ROW> <ROW> <ENTRY>SECT_FIELD</ENTRY> <ENTRY>field</ENTRY> <ENTRY>2</ENTRY> </ROW> <ROW> <ENTRY>SECT_FOREST</ENTRY> <ENTRY>forest</ENTRY> <ENTRY>3</ENTRY> </ROW> <ROW> <ENTRY>SECT_HILLS</ENTRY> <ENTRY>hills</ENTRY> <ENTRY>4</ENTRY> </ROW> <ROW> <ENTRY>SECT_MOUNTAIN</ENTRY> <ENTRY>mountain</ENTRY> <ENTRY>6</ENTRY> </ROW> <ROW> <ENTRY>SECT_DESERT</ENTRY> <ENTRY>desert</ENTRY> <ENTRY>8</ENTRY> </ROW> <ROW> <ENTRY>SECT_SWAMP</ENTRY> <ENTRY>swamp</ENTRY> <ENTRY>8</ENTRY> </ROW> <ROW> <ENTRY>SECT_WATER_SWIM</ENTRY> <ENTRY>water-swim</ENTRY> <ENTRY>4</ENTRY> </ROW> <ROW> <ENTRY>SECT_WATER_SAIL</ENTRY> <ENTRY>water-sail</ENTRY> <ENTRY>50</ENTRY> </ROW> <ROW> <ENTRY>SECT_UNDER_WATER</ENTRY> <ENTRY>under-water</ENTRY> <ENTRY>8</ENTRY> </ROW> <ROW> <ENTRY>SECT_SNOW</ENTRY> <ENTRY>snow</ENTRY> <ENTRY>8</ENTRY> </ROW> <ROW> <ENTRY>SECT_SLUSH</ENTRY> <ENTRY>slush</ENTRY> <ENTRY>6</ENTRY> </ROW> <ROW> <ENTRY>SECT_ICE</ENTRY> <ENTRY>ice</ENTRY> <ENTRY>10</ENTRY> </ROW> </TBODY></TGROUP>

The movement is simply defined by placing the 'movement' keyword first followed by the type of sector you desire. For example a few movement fields would look as follows:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

movement SECT_FOREST movement SECT_HILLS

</PROGRAMLISTING> </INFORMALEXAMPLE> <NOTE><PARA>Only one movement is needed for a room if you put more than one the last one added will be the one used.</PARA></NOTE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;flags <DICTDEF> <PARA><indexterm> <primary>Room flags</primary> </indexterm>

This field on a room is used to set special attributes in order to make the room private or no-teleportable and many others. The following is the list of possible already defined flags. Extras can also be used to create special room flags.

<TITLE>Room unit flag affects</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>UNIT_FL_PRIVATE</ENTRY> <ENTRY>When this flag is set on a room it marks it as a private room. Commands that honor the private flag will not let more than 2 players into this room. Commands like <command>goto</command> and direction commands are a few commands that do honor this flag.</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INVISIBLE</ENTRY> <ENTRY>Makes unit invisible</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_BURY</ENTRY> <ENTRY>Makes a hard floor so items can't be buried.</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes unit buried when loaded</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_TELEPORT</ENTRY> <ENTRY>makes unit so no one can teleport to it</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_MOB</ENTRY> <ENTRY>Makes it so no mobile will enter the unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_WEATHER</ENTRY> <ENTRY>keeps weather and natural light out of unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INDOORS</ENTRY> <ENTRY>Makes unit inside and doesn't affect weather</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_TRANS</ENTRY> <ENTRY>Makes unit transparent</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_SAVE</ENTRY> <ENTRY>Makes it so you can't save with unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_SACRED</ENTRY> <ENTRY>Makes unit a double gain unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_MAGIC</ENTRY> <ENTRY>Marks a unit to be magic</ENTRY> </ROW> </TBODY></TGROUP>

</PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;extra <DICTDEF> <PARA><indexterm> <primary>Room extras</primary> </indexterm> </PARA>

<PARA>Extras are the work horse of the <ACRONYM>VME</ACRONYM>. Extras are used in everything from <ACRONYM>DIL</ACRONYM> to just normal extra descriptions on rooms. The first job for an extra was to hold extra description information on a room. For example if you had a computer room and you described it might look something like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

descr "This small room houses the computer power of the <ACRONYM>VME</ACRONYM> development team. All four walls are lined with various pieces of computer equipment old pizza boxes and plenty of empty soda cans."

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>The problem is as a player if you saw this description you might want to know what kind of pizza we eat or maybe you would want to see what kind of soda we drink. Or heaven forbid you might want to know what kinds of computer equipment is scattered about the room. In the <ACRONYM>VME</ACRONYM> servers we do this by adding extra descriptions to the room. In this case the builder of the zone may do something like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

descr "This small room houses the computer power of the <ACRONYM>VME</ACRONYM> development team. All four walls are lined with various pieces of computer equipment old pizza boxes and plenty of empty soda cans."

extra {"soda cans", "cans", "soda", "can"} "These cans are all Canadian blue. Maybe the Valhalla team hates American beer. Strange all of them look to have strange indentations."

extra {"strange indentations", "strange indentation","indentation"} "They are human bite marks. Is this what happens when code doesn't work right?"

extra {"pizza boxes","pizza","boxes","box"} "Dominos could make a fortune from all these boxes and probably already have from the <ACRONYM>VME</ACRONYM> team. you notice all the boxes are empty at least they finish what they start."

extra {"computer pieces","computer parts", "equipment","hardware", "pieces", "parts"} "I bet you thought you would see what we have running. Yeah right you might come over and rob us if we told you that. All you see is an old XT."

extra {"xt"} "Its a hunk of junk really!"

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>There is a lot to notice in the previous examples. First we will start with extras when defined on rooms, NPC, and objects must be in length order for the names. There are a few reasons for this but lets just say the most important reason is we wanted it this way. If you don't put them in order the <ACRONYM>VMC</ACRONYM> will give you a fatal error and will not compile your zone.</PARA>

<PARA>The next thing you should notice is we have used an extra to describe something in another extra. We actually did this twice once for the beer cans and once for the computer parts. That way you can actually give quest information but make the person really have to explore your rooms descriptions to find it.</PARA>

<PARA>The previous example is what we consider normal extras in a room. There are also extras that hold information for DIL functions. These special extras can have extra fields and they can be hidden to the players eyes. Here are some examples of special extras.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

extra {"$rockcount"} "5"

extra {"$playerkill"} "0"

extra {"$coke","$milk","$water"}{1,5,10} "Drinks and amounts"

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>These extras all have the '$' sign appended to the front of the names in order to tell the look command the player shouldn't be able to look at the extra. If you have not already seen <ACRONYM>DIL</ACRONYM> coding you may not understand why you would want extras players can't see. The <ACRONYM>DIL</ACRONYM> language can manipulate these extras by reading and writing them in order to change the way a command or another function works. For example the last <ACRONYM>DIL</ACRONYM> could be used for a shopkeeper to tell how many of each type of drink he has. Notice the drink extra also has something you haven't seen yet, an added integer list after the namelist. all extras can have these but only extras being used with DIL functions really need them.</PARA>

<PARA>Some of these special functions are supported already in the code and the ones that affect the rooms are as follows. In the following $1n is the activator and $2n is the unit in question.</PARA>

<PARA>There is only one special extra already supported for rooms and that would be the '$get'. As we have previously mentioned the extras that start with a dollar sign are not seen by the players. This one however is shown to the player when the person types get on the other names in the extras list. This easier to describe in an example than in words so the following would be a good example.:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

extra {"$get", "statues", "statue"} "You attempt to pick up a statue but quickly discover your feeble attempts will never work."

{"$get", "red roses", "roses"} "You bend down to pick a rose, but then decide to leave the beautiful flower to itself."

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>With this one special extra we have made it so you don't need to make millions of items so the person can act upon them. You can just make the acts as if the items were in the room.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Exits <DICTDEF> <PARA><indexterm> <primary>Exits</primary> </indexterm> </PARA>

<PARA> Every room has ten possible exits; North, East, South, West, Northeast, Southeast, Southwest, Northwest, Up and Down. To enable mobile use of these commands, you must specify these exits as outlined below:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

exit <direction> [to <destination>] [open {<infoflags>}] [key <keyname>] [keyword {<keywords>}] descr <description> ;

</PROGRAMLISTING> </INFORMALEXAMPLE>

<VARIABLELIST> <VARLISTENTRY> ;exit <directions> <DICTDEF> <PARA>Is the direction the exit leads, ie. one of north, south .. up, down.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <TERM>to <destinations></TERM> <LISTITEM> <PARA>The symbolic reference to the room, you want this exit to lead to. If you reference a room within another zone, post pend the name with @<zone name></PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

to myotherroom

to hisotherroom@hiszone

</PROGRAMLISTING> </INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <TERM>open <info flags></TERM> <LISTITEM>

<PARA>These flags describe the state of the door. The following is the list of possible door flags.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;EX_OPEN_CLOSE <DICTDEF> <PARA> Set this if you can open and close this exit, be it a door, gate or otherwise.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_CLOSED <DICTDEF> <PARA>Set this if you want the exit to be closed at boot time.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_LOCKED <DICTDEF> <PARA>Set this if you want the exit to be clocked at boot time.</PARA> <NOTE> <PARA>An interesting aspect is, if you do not specify a key, you can only unlock this door with the 'pick' skill, 'unlock' spell or from <ACRONYM>DIL</ACRONYM> with UnSet();</PARA> </NOTE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_PICK_PROOF <DICTDEF> <PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the lock of this exit.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;EX_HIDDEN <DICTDEF> <PARA>If this bit is set, the exit is hidden until the mobile has successfully searched for it, using the 'search'-command.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;key <keyname> <DICTDEF> <PARA>The symbolic name of a key object used for unlocking this exit.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

key mykey@myzone

</PROGRAMLISTING> </INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;keyword { <stringlist> } <DICTDEF> <PARA>This stringlist holds all the names of the exit, you specify to manipulate the exit. If the exit is hidden exit, these are the keywords the mobile can search for.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

keyword {"wooden door","door"}

keyword {"hidden door","door","hatch","floor"}

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;descr <description> <DICTDEF> <PARA>This string is the description of what you see if you look in the direction of the exit.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;; <DICTDEF> <PARA>Every exit statement needs to be terminated with a semi-colon. </PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<NOTE> <TITLE>General notes</TITLE> <PARA>Even though you do not need an exit in all directions, you can use it to place descriptions of the direction.</PARA> </NOTE> <INFORMALEXAMPLE> <PROGRAMLISTING>

exit north descr "An unsurmountable mountain blocks your way.";

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;minv <DICTDEF> <PARA><indexterm> <primary>Room minv</primary> </indexterm></PARA>

<PARA>This field is rarely used on rooms. It could however be used to make a room invisible inside another room. Or it could be used to store numbered values on a room. The reason this field is on a room is it is part of the base object which all objects are derived from. If the room is going to be inside another room and you don't want it visible the following would make it invisible to all players below the level of 20.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

minv 20

</PROGRAMLISTING> </INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;key <DICTDEF> <PARA><indexterm> <primary>Room key</primary> </indexterm></PARA>

<PARA>This field is not used normally on a room. It is a string that can be used for anything you desire. The reason it exists on rooms is it is a part of the base object all unitptrs (unit pointers like, rooms, objects, and NPCs) are derived from.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;manipulate <DICTDEF> <PARA><indexterm> <primary>Room manipulate</primary> </indexterm></PARA>

<PARA>This field is not used normally on a room. It is an integer that can be used for anything you desire. The reason it exists on rooms is it is a part of the base object all unitptrs are derived from.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;alignment <DICTDEF> <PARA><indexterm> <primary>Room alignment</primary> </indexterm></PARA>

<PARA>This field is not used normally on a room. It is an integer that can be used for anything you desire. The reason it exists on rooms is it is a part of the base object all unitptrs are derived from.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;weight <DICTDEF> <PARA><indexterm> <primary>Room weight</primary> </indexterm></PARA>

<PARA>This field is not used normally on a room. It is an integer that can be used for anything you desire. The reason it exists on rooms is it is a part of the base object all unitptrs are derived from.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;capacity <DICTDEF> <PARA><indexterm> <primary>Room capacity</primary> </indexterm></PARA>

<PARA>This field is not used normally on a room. It is an integer that can be used for anything you desire. The reason it exists on rooms is it is a part of the base object all unitptrs are derived from.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;light <DICTDEF> <PARA><indexterm> <primary>Room light </primary> </indexterm></PARA>

<PARA>This field sets the light on a room. Normally this is not done directly, instead it is set using macros defined in wmacros.h.</PARA>

<TITLE>Light defines</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>Define</ENTRY> <ENTRY>Light Value</ENTRY> <ENTRY>Affect</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>ALWAYS_LIGHT</ENTRY> <ENTRY>1</ENTRY> <ENTRY>Room is always light no matter time of day</ENTRY> </ROW> <ROW> <ENTRY>IN_ALWAYS_DARK </ENTRY> <ENTRY>-1</ENTRY> <ENTRY>When an inside room is always dark - both inside and outside </ENTRY> </ROW> <ROW> <ENTRY>OUT_DARK_NON_NOON </ENTRY> <ENTRY>-1</ENTRY> <ENTRY>Always a dark room, except when it is high noon </ENTRY> </ROW> <ROW> <ENTRY>OUT_ALWAYS_DARK </ENTRY> <ENTRY>-2</ENTRY> <ENTRY>Always a Dark room, no matter the time of day</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>To set natural light that changes depending on the type of day nothing is needed to be put in the light field the compiler will default to '0'. If you for some reason want to set the light to default lighting you can do so but you don't need to. You will also notice there are two macros that set the light to the exact same value. This is for compatibility with older code base and if you wish to combine these two macros or only use one it would not change the way the mud works.</PARA>

<PARA>This is probably one of the simplest fields you will have to deal with in the rooms. In order to set it all that is needed is to place the macro or the light and value on a line in the room and your all done.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

//To Set always light with macro ALWAYS_LIGHT

//To set Always light with out macro light 1

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>You can decide which is easiest for you.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;link <DICTDEF> <PARA><indexterm> <primary>Room link</primary> </indexterm></PARA> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;spell <DICTDEF> <PARA><indexterm> <primary>Room spell</primary> </indexterm></PARA> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;dilbegin or dilcopy <DICTDEF> <PARA><indexterm> <primary>Room dilbegin or dilcopy</primary> </indexterm></PARA>


<PARA>The <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds. We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach you how to create your own functions that will make your rooms, NPC, and objects more than special.</PARA>

<PARA>There are only currently three room functions that come standard with a <ACRONYM>VME</ACRONYM> in the function.zon. There are much more in the zones released with the <ACRONYM>VME</ACRONYM> but you will have to hunt for those. The three that come standard are Safe room, Death room, and forced move. The safe room makes it impossible for players to kill each other, the death room is a function that lets you make things like rock slides and quick sand, and the forced move lets you make an easy river.</PARA>

<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the Valhalla mud all you have to do is use the dilcopy keyword in the room with the function name you want to use and the arguments the function requires. The following is what you would find in the function.zon for death room.</PARA>

<INFORMALEXAMPLE> <PROGRAMLISTING>

/* Death room <ACRONYM>DIL</ACRONYM> *tick is in 4th's of seconds * Damage is damage done per tick *act_s is string shown to damaged player. */ dilbegin death_room(tick: integer, damage: integer, act_s: string);

var ext: extraptr; u : unitptr; i : integer;

code {

if (tick < 12) tick := 12;

heartbeat := tick;

if (damage < 0) damage := -damage;

if ("$death room for mobs" in self.extra) i := UNIT_ST_PC|UNIT_ST_NPC; else i := UNIT_ST_PC;

while (TRUE) { wait (SFB_TICK, TRUE);

foreach (i, u) { if (u.level >= IMMORTAL_LEVEL) continue;

if (("$no death room" in u.extra) and (u.type == UNIT_ST_NPC)) continue; // Don't allow pcs to get this flag

if (act_s != "") act ("&[hit_me]"+act_s, A_ALWAYS, u, null, null, TO_CHAR); else act ("&[hit_me]You bleed from your wounds.", A_ALWAYS, u, null, null, TO_CHAR);

u.hp := u.hp - damage; position_update (u); }

}

}

dilend

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to understand or adjust it you just have to use it. In this function it requires a time, damage, and act. So you could use this in a room definition like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

dilcopy death@function (60,25,"Flames shoot from the floor burning your rear.");

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>This says to copy the <ACRONYM>DIL</ACRONYM> from zone function with the arguments 60 seconds, damage 25% and act as shown. Pretty simple eh?</PARA>

<PARA>All released <ACRONYM>DIL</ACRONYM> room functions are described in <XREF LINKEND="rmdilfunc">. Then we put some to work so you can see how to use them in <XREF LINKEND="rmcomplex"></PARA>

</LISTITEM> </VARLISTENTRY> </VARIABLELIST>

</SECT1>

<sect1 id="rmbasic"> <TITLE>Building your first room</TITLE>

<PARA>Now you are ready! With all you have learned about room fields you are now ready to build your first room. I personally like dragons and I like space so I have chosen to make a dragon station. We will first do a simple room and build on to it in the next sections. In this section we will walk you through creating a basic room and why we choose what we do where we do.</PARA>

<PARA>When making rooms you create the zone source file first as shown in <xref linkend="ch-02">. If you only have rooms you do not need the %reset, %objects, and %mobiles. For the examples in this chapter we will use the zone we created in <xref linkend="ch-02"> and add the %room tag where we will put all the rooms. At the end of the chapter we will have the entire zone so you can see it all together.</PARA>

<PARA>The first part of all rooms is the symbolic name it is good to always pick a name that will match the title so you can use the administrator command <command>goto</command> to easily get to the room. The reason is when you use the command <command>wstat</command> it will only show you a list of the rooms by symbolic name for example if you type <command> wstat zone dragon room </command> You will get the following:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

List of rooms in zone Dragon: chamber portal office

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>If you didn't make it clear what the rooms were by the symbolic name it might look like this:</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

List of rooms in zone Dragon: st_rm1 st_rm2 st_rm3

</PROGRAMLISTING> </INFORMALEXAMPLE>

<PARA>While this might be great when you first start imagine trying to remember what all one hundred rooms are.</PARA>

<PARA>The first room we will create will be a simple chamber with nothing special. We can build on to it later if we need to.</PARA> <INFORMALEXAMPLE> <PROGRAMLISTING>

chamber end

</PROGRAMLISTING> </INFORMALEXAMPLE> <PARA>Pretty easy so far. Now lets add some life to it. The room will need a title and a description. The title should be a one line description of a room sort of like if you were walking someone around your house and telling them what each room was like this is 'My houses big bathroom' or maybe this is 'The computer room'. The description should be something you would tell an interior decorator you were talking to on the phone and asking for advice. He would want to know everything about the room you can see so he could give you good advice.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. Small passages lead of to the west and the east. ." end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>It is a matter of taste if you want the descriptions of the exits in your description or not but I like them so I put them. Now if you were reading this description to someone the person might ask you what is on the pictures or maybe even what exactly do the chairs look like so we better take care of that by adding some extras to our little room.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

extra {"chairs","chair"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intelligent looking dragon is sitting perched on a large chair watching you."

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Normally we could put a movement type for the amount of endurance lost when a person is moving through the area but we will leave it blank and go with the default which is SECT_CITY since with the fake gravity that is the closest we could come with the sector types availible. The last thing we need to finish our room is the two exits leading to the other rooms.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

west to portal descr "You see a small room.";

east to office descr "You see what looks to be an office.";

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Thats it that is all there is to making a room. In the next couple of sections we are going to add some more rooms with more advanced features and give some debugging hints for compiling your rooms but if you understand everything so far your going to have no problem. Lets take a look at our entire finished first room</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. Small passages lead of to the west and the east. ."

extra {"chairs","chair"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intelligent looking dragon is sitting perched on a large chair watching you." west to portal descr "You see a small room.";

east to office descr "You see what looks to be an office."; end

</PROGRAMLISTING></INFORMALEXAMPLE>

</SECT1> <sect1 id="rmdebug"> <TITLE>Compiling and debugging your first room</TITLE> <PARA>It is time we put the zone header information together with your first zone and compile it into a format the <ACRONYM>VME</ACRONYM> server can use. This is done by using the <ACRONYM>VMC</ACRONYM> compiler. Depending on if you are doing this on your own Linux server or if you are building for a <ACRONYM>VME</ACRONYM> already set up you will have to use the compiler access method they have defined. No matter if you are compiling by email, ftp, or at the command line with <ACRONYM>VMC</ACRONYM> the error messages will all be the same. Since I have no idea how your particular set up is designed I will explain the errors that the compiler will return and you will have to ask your system administrator how to access the compiler. The rest of this section is written as if you have your own <ACRONYM>VME</ACRONYM> running on your own Linux box using the <ACRONYM>VMC</ACRONYM> at the command line.</PARA>

<PARA>When you are working on your first zone it is always a good idea to start with one or two rooms and compile them instead of writing all the rooms and then trying to compile. The reason is the more rooms you have the more confused you can make the compiler if you have a lot of errors and you may not be able to figure out where your first mistake was easily. In our case we only have our first room and the header information for the zone so lets put it together now and try and compile it.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOw creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%rooms

chamber title "The middle chamber of the station descr "This chamber seems to have the entire station rotating around it. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. Small passages lead of to the west and the east. ."

extra {"chair","chairs"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intelligent looking dragon is sitting perched on a large chair watching you." west to portal descr "You see a small room.";

east to office descr "You see what looks to be an office."; end

%end

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>We added the %room tag to our zone header stuck our room in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM> server for you to be able to look at it in the game. If you downloaded our example zones for this document you can compile this zone along with us and fix the errors as we do for practice. The filename is debug_rm.zon. Just so you know the errors in this zone are intentional so please don't write me an email telling me there are errors in it.</PARA>

<PARA>The command to compile the zone is <command>VMC debug_rm.zon</command>. Here is what we get when we first try and compile the zone.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [Apr 28 2001] Compiling 'debug_rm.zon' <debug_rm.zon> @ 2: Bad include argument <debug_rm.zon> @ 48: Token too long Fatal error compiling in preprocessor stage in file 'debug_rm.zon'.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Don't worry if this looks scary, it really is much easier to read than it looks like. The first thing you need to realize about compiling is always fix one error and compile again because it might fix two or three errors after with one fix. The reason is once a compiler hits something it doesn't understand it gets confused with the rest of the file. It is sort of like if you thought the word 'water' meant 'fire' and you tried to read a book it would get confusing really fast. So you have to correct the definition of 'water' to understand the rest of the book.</PARA>

<PARA>Lets take the first error with this in mind. The first error shows up on line three of the error file it says: </PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

<debug_rm.zon> @ 2: Bad include argument

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This line is not really cryptic reading it in a more english form would sound like: In file 'debug_rm.zon' you have an error at line 2, the argument to the include statement is not correct. Not all errors will be this clear but the compiler does its best to get you close to the error. Now if you look at line two in debug_rm.zon, you will find, we forgot to put in the '<' symbol. If you fix the line to look like: <INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h>

</PROGRAMLISTING></INFORMALEXAMPLE> Then recompile you will have fixed your first error and get a whole new set to play with. The following is the errors we got after fixing line two:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_rm.zon' <debug_rm.zon> @ 47: EOF in string debug_rm.zon: 4: parse error Token: 'RESET_ANYHOw' debug_rm.zon: 21: parse error Token: 'This' debug_rm.zon: 26: parse error Token: 'and' debug_rm.zon: 26: parse error Token: '.' Grave errors in file 'debug_rm.zon'.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now this looks to be a much more interesting error file than the previous one. Remember we mentioned you should always fix the first error first so the compiler doesn't get confused. In this error file the first line is not the first error we need to fix. We have to do some logical reasoning here. The first error the compiler came across was the one on line 4 that shows up around line 4 of the error file. The lines before it are letting you know somewhere else in the file there is a missing quote. If we clean up the first error however we might be able to find this missing quote much easier. So lets do that lets start by looking at line 4 which is saying the compiler doesn't understand what the token 'RESET_ANYHOw' is. This makes sense the token should be 'RESET_ANYHOW' and the compiler is case sensitive. So all we need to do to fix this one is capitalize the 'w' and the error should be cleared up lets try that and recompile and see what the errors look like. With that line fixed the following is the errors we get. </PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_rm.zon' <debug_rm.zon> @ 47: EOF in string debug_rm.zon: 21: parse error Token: 'This' debug_rm.zon: 26: parse error Token: 'and' debug_rm.zon: 26: pars e error Token: '.' Grave errors in file 'debug_rm.zon'.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Again we must figure out which error message we should deal with first. As before we need to deal with the lowest number error. The error we need to fix first then is the one on line '21'. If you go to line '21' you will notice the line looks fine. When you run into an error like this where the error is not exactly on the line scroll up to the field before the one in question and you should find the problem. In this case we forgot a '"' on the 'title' line and confused the compiler because it thought the ending quote was the one after the 'descr' field. Therefore the compiler didn't understand the 'This' as a field. This is one of the harder errors to find but once you get used to it will come naturally and the compiler does try to get you close. Now if we add the '"' we are missing and recompile the following is the output we get.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_rm.zon' <ACRONYM>VMC</ACRONYM> Done.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means you have now successfully compiled the zone. I want you to look at the last error file and the fact that we only changed a quote to go from it to no errors. This is why you always deal with one error at a time. Sometimes fixing one error can fix a lot of the weird errors that make no sense. In fact I have seen one quote cause as much as 50 errors so if you jump around trying to fix errors that look like they make sense you may end up making more work for yourself. </PARA>

<PARA>Now that you have a compiled zone you should check and make sure all the files are there. When you compile a zone you will end up with three extra files. the files will have the same filename as your zone with a new extension in this case you should have the following.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

debug_rm.data debug_rm.err debug_rm.reset debug_rm.zon

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you have all of these you are all set to go. If not then there is something seriously wrong and you may want to write the <ACRONYM>VME</ACRONYM> staff for help. To get your new zone in the mud all that is needed is to make sure your zone is in the zonelist in the <ACRONYM>VME</ACRONYM> etc directory and copy these files into your zone directory. Then reboot the mud. You should be able to log on your builder character and goto your zone by typing, <command>goto chamber@dragonst</command>.</PARA>

<PARA>There you go you have now compiled your first zone. Its not much to look at but with what you already know you could make a full zone of very basic rooms. The next few sections will teach you some of the more interesting things you can do when making your rooms.</PARA>

</SECT1> <sect1 id="rmdilfunc"> <TITLE><ACRONYM>DIL</ACRONYM> functions for rooms</TITLE>

<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own special functions on rooms, NPCs, objects, PCs, and much more. This manual is for basic zone writing and therefore will not go into how to write your own <ACRONYM>DIL</ACRONYM> functions. The <ACRONYM>VME</ACRONYM> however is released with many functions for you as an Administrator and your builders to use to make special rooms, NPCs, and objects. The following is a list of all room functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>


<variablelist id="var-roomfunc"> <VARLISTENTRY> ;Death room <DICTDEF> <PARA><indexterm> <primary>Death room function</primary> </indexterm></PARA>

<PARA>This function is a simple function that allows you to create a room to do damage to a player. The death_room can kill them slowly like a fire cave would or it can kill them quickly as if you stuck them in a microwave it is all up to how you set the arguments. It also lets you see the acts the players see so this function can be used on any number of death style rooms. There is no need to understand how the function works just how to use it so with that in mind the following is the functions header.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//In function.zon dilbegin death_room(tick: integer, damage: integer, act_s: string);

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>As with any function all you have to do is 'dilcopy' the function onto your room with the correct zone name and arguments and it will do the rest. In this <ACRONYM>DIL</ACRONYM> you have three arguments to pass The first is the 'tick' or time which in this <ACRONYM>DIL</ACRONYM> is broken down into 'ticks' which are 4 ticks per second. Thus if you wanted to get something to do damage every minute you would put '60*4' in that spot. The next is the amount of damage you want done per your time. If for example you want '60' hit +points damage done each round you just put '60' as that argument. Finally is the act shown to the character as a string in quotes. So a finished death room on your room would look like this.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy death_room@function(4*60,60, "Flames shoot up from the floor burning your butt.");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Climb <DICTDEF> <PARA><indexterm> <primary>Climb room function</primary> </indexterm></PARA>

<PARA> This special <ACRONYM>DIL</ACRONYM> is used for the climb skill and should be set on stationary objects (stationary mast, robe, tree, wall, etc). The 'difficulty' is the skill-amount required to climb. A skill of 100 would be a 50% chance for the expert thief / climber. The 'damage' is how much damage is given if you fail to climb the object. When you fail, you "fall" to the 'destination', so you can make gravity work correctly. The destination can be the same room in which you started but it doesn't have to be. The 'direction' is the direction in which you want the person to have to climb enclosed in quotes.</PARA>

<PARA>With all this in mind the following is the <ACRONYM>DIL</ACRONYM> definition and an example use of it.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//<ACRONYM>DIL</ACRONYM> definition dilbegin climb(destination:string, difficulty:integer, damage:integer,direction:integer);

//Example use of Climb dilcopy climb@function("deck@ship", 17, 20, "up");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>We should note here, if you wanted the person to have to climb back down you will need to put a climb <ACRONYM>DIL</ACRONYM> on the room you are climbing too that has the "down" directory as an argument. This <ACRONYM>DIL</ACRONYM> also allows you to link two rooms not linked by normal directions but we suggest you should think before doing this because it may not make sense to not have a link between the two places.</PARA> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Force move <DICTDEF> <PARA><indexterm> <primary>Force move room function</primary> </indexterm></PARA>

<PARA>This function allows you to move a player or NPC from a room to another room with out having the player or NPC type or do anything.</PARA>

<PARA>The following is the definition of the force move <ACRONYM>DIL</ACRONYM></PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin force_move (tick: integer, strings: string, random: integer);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The 'tick' parameter is how fast you want the force move to be triggered. The 'tick' is in 1/4 second increments so to get a one second wait you would place a four. The second parameter is two strings the first being the symbolic name of the room you are forcing the character to. The second string is the act you want shown to the player or NPC when it is moved. The final parameter is either a one or a zero. The one stands for true and it would make the timer trigger randomly fifty percent of the time, while a zero would make it not random.</PARA>

<PARA>The following is what the force move would look like if you wanted it to trigger every 30 seconds and give acts of a river.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy force_move@function(4*30,{"river2@riverzon","You float down the river."},0);

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Safe room <DICTDEF> <PARA><indexterm> <primary>Safe room function</primary> </indexterm></PARA>

<PARA>This function creates a safe room where combat is not allowed. The following is the definition and an example of how to use it.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//Safe room <ACRONYM>DIL</ACRONYM> definition dilbegin safe_room ();

//Example use of Safe room dilcopy safe_room@function ();

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

</sect1>

<sect1 id="rmcomplex"> <TITLE>A more complex set of rooms</TITLE>

<PARA>In the last section you learned to make basic rooms. In this section we will build on what you already know to allow you to make much more fancy rooms. IN this section we will give a much better view of the exits and what can be done with them including doors, hidden doors and rooms inside other rooms. We will also show some examples of the room <ACRONYM>DIL</ACRONYM> functions being used that were described in the previous section. Finally we will pull it all together in a completed zone for you to compile and play with. </PARA>

<sect2 id="rmdoorexits"> <TITLE>Exits with doors</TITLE>

<PARA>When we first defined exits we included the 'keyword' and 'open' fields on a door. In this section we will give an example of two rooms linked together with a door. There is no new information you have not already encountered so we will start with an example.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom...."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station...."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED}; end


</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>One important thing you should notice is, whatever you put as a keyword, along with the direction, is what a person must use to open the door. To make sure the door closes at reset time you will have to add the doors reset to the '%reset' section. The door resets will be explained in <xref LINKEND="ch-07">. Notice also in this example we have a direction both in the room you are going to and the room you came from. This means you need a 'west' direction for every 'east' direction leading to it. If you do not put both you will end up with a one way direction.</PARA>

</sect2>

<sect2> <TITLE>Locked exits</TITLE> <PARA>Now that you have making a door down, you may find that it is not safe to leave your doors unlocked. Well the <ACRONYM>VME</ACRONYM> is ready for you. You have already seen the 'keyword' and 'open' sections and what you can set in them. Now lets use the 'EX_LOCKED field with them and introduce a new macro to allow you to set the difficulty to unlock the lock with out a key.</PARA>

<PARA>First lets look at the macro that allows you to set a difficulty on a lock. If you set the lock with out this macro it will default to 0 and thus be easy to pick.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define DOOR_LOCK_DEF(north_lock, east_lock, south_lock, west_lock,\ up_lock, down_lock, northeast_lock, northwest_lock, southeast_lock,\ southwest_lock)

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>When using this macro you only set the value of the exit you want to add the difficulty to, you can leave the rest of the exits '0'. Only one of these macros are needed on a room no matter how many exits because each of the exits are included.. If you have an exit to the north that is locked and you want it to have a difficulty of 50% the following would be the line you would add to your room</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

DOOR_LOCK_DEF(50, 0, 0, 0, 0, 0, 0, 0, 0, 0)

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Now lets add the macro and the locked flag to the exits and create the room.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom...."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

DOOR_LOCK_DEF(0, 50, 0, 0, 0, 0, 0, 0, 0, 0) east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station...."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

DOOR_LOCK_DEF(0, 0, 0, 50, 0, 0, 0, 0, 0, 0) west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}; end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The only thing you may be wondering about in this example is the 'key' field. I have picked 'nokey' as my value of the key. There is no key in this zone so all this does is create a key hole. If you leave the 'key' field out totally the only way you can open the lock is by a magical spell. It is also important that you read about resets of door locks in <xref LINKEND="ch-07">.</PARA> </sect2>

<sect2> <TITLE>Hidden exits</TITLE>

<PARA>Locking the doors may not be enough. In fact sometimes you may not want to lock the door but you might want to hide it. You can do both or either with the following macro added to your exit.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define SECRET_DOOR_DIFFICULTY(DIR, SKILL) \ extra{SECRET_DOOR} {DIR, SKILL}\ ""

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>So if you wanted a door or just a passage to the north hidden you would add this before or after your exits.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

SECRET_DOOR_DIFFICULTY(NORTH, 50)

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Now lets put it all together and link two rooms together with a hidden door.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

office title "The station office" descr "Large paintings fill the walls of this part of the station..."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

SECRET_DOOR_DIFFICULTY(SOUTH, 50) south to portal_room descr "You see what looks to be a portal room." keyword {"air lock door","air lock","staff","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};

end

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2> <TITLE>Rooms inside of rooms</TITLE> <PARA>Now that you have normal exits down its time to take a look at something a bit different. Lets say you wanted to put a barrel in a room that is also a room that has exits to other rooms. Or maybe in my case I want to put a transporter pad in the room that is also a room so you can exit back into the room you came from. In the case of the teleporter I could use an object but as you will find it is much easier to deal with a room for this than an object.</PARA>

<PARA>To put a room in a room it is much different than using the normal exit fields. The only thing needed is the 'in' keyword and the room you are linking the current room into. There is no need for a semi-colon. The following is what the line would look like.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

in <room that room is in>

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Not too hard. The following are two rooms one in the other.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"} "The field looks to be a green fog shifting and churning as you watch. if you are nuts you could probably enter it."

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

//A link to the portal is also here end

room_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in portal_room end


</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE> <PARA>After adding a room in a room you should note the room in the description or put an 'outside_descr' on the room inside it. In our example we have chosen to add the description into the room instead of using the 'outside_descr'. Also doors and locks work the same way as before you can even hide this exit. </PARA></NOTE>

</sect2>

<sect2> <TITLE>A room using force move.</TITLE>

<PARA>Sometimes you will want to help players along their path. This could be for a river that flows strongly enough to force a players raft down stream or maybe for a room of quick sand that sucks the player into another room. In these situations we need to use the force move <ACRONYM>DIL</ACRONYM>, explained in the previous section. Here we have built two rooms linked only by a forced move. </PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"} "The field looks to be a green fog shifting and churning as you watch. if you are nuts you could probably enter it."

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

//A link to the portal is also here

end ship_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in ship

dilcopy force_move@function( //Time to activation 4, //room and act "portal_room@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end


</PROGRAMLISTING></INFORMALEXAMPLE> </sect2

<sect2> <TITLE>A death room</TITLE>

<PARA>As a final touch to my little example zone I want to create a room that will kill a player instantly. I will use the <ACRONYM>DIL</ACRONYM> function Death room and the room would simply look as follows.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

deathspace title"Open space" descr "You see the ship and the station far off in the distance and you are in Space!"

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

dilcopy death_room@function ( //how often is damage done 4 would be 1 second 4, //damage 400, //act for the damage. "You realize to late that was the trash disposal transporter and you feel your lungs explode.");

end

</PROGRAMLISTING></INFORMALEXAMPLE>

</SECT2> </sect1>

<sect1> <TITLE>Putting the rooms together</TITLE>

<PARA>Using all you have learned so far and putting it all together into one zone. You end up with a very interesting space station with some secret rooms and traps.. The full zone all together looks like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOW creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%rooms

chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. It is unbelievably large the ceiling seems to be a good 200 meeters high and the room is perfectly cubic. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. large passages lead of to the west and the east.."

extra {"chair","chairs"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intellegence looking dragon is sitting perched on a large chair watching you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}


west to disposal_room descr "You see a small room.";

east to hallway descr "You see what looks to be a hallway.";

end

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom. The hallway seems to be dust free. The walls and the floors seem to be made out of the same sterile metal-plastic that all space agencies uses. There are large plate glass windows that open up into space. The hallway is filled with a dim light that seems to come from everywhere yet no where all at once. You notice a glimmer of bright light coming from the windows. To the east you see an air lock and to the west the hallway opens up into a larger room."

extra {"windows","window"} "Your eyes are drawn to a large ship lit up with running lights sitting about 1 kilometer from the station."

extra{"floor","walls","wall"} "Well what can be said it looks to be in perfect condition. what else would you want to know?"

extra {"large ship" ,"ship"} "The ship looks really big and is shaped like a dragon. The scales sparkle and seem to be multiple colors."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station. The room is as large as the other rooms big enough for Dragons to lounge while still having a desk in one corner small enough for a humanoid. The floor along the north wall is lined with some kind of fabric and seems very soft to walk on, it may be some kind of dragon lounge judging by how large an area it covers. There is a passage to the west."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"paintings","painting"} "The paintings are of many dragons and riders in all kinds of tasks from combat to look out. All the figures seem to be staring at a staff being held by a depiction of a wizard on the south wall."

extra {"wizard","staff"} "The wizard has his hand stretched out and it seems there is a place you can almost grab the staff. Maybe if you searched the staff you would find it."

extra {"desk"} "Its a desk alright but there doesn't seem to be any drawers and it seems totally empty."

extra{"fabric"} "Wussshhhhh you bound across the comfortable floor wasn't that fun."

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

SECRET_DOOR_DIFFICULTY(SOUTH, 50) south to portal_room descr "You see what looks to be a portal room." keyword {"air lock door","air lock","staff","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};

end

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"} "The field looks to be a green fog shifting and churning as you watch. if you are nuts you could probably enter it."

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

//A link to the portal is also here from room_port end

ship_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in ship

dilcopy force_move@function( //Time to activation 4, //room and act "portal_room@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

room_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you." movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in portal_room

dilcopy force_move@function( //Time to activation 4, //room and act "ship@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

disposal_room title "Red field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a red field right in the center. there is a door that leads to another room to the east."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"red field","field"} "The field looks to be a red fog shifting and churning as you watch. if you are nuts you could probably enter it."

east to chamber descr "You see the main chamber.";

//A link to the portal is also here from dis_port end

dis_port names {"red field","field"} title "Red field" descr "Red Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS} dilcopy force_move@function( //how fast to force move in seconds 4, //room to force move to and act "deathspace@dragonst!You feel your body dissolving for lack of a better description.", //true or false random move or not 0); in disposal_room

end

ship title "War dragon" descr "Blue light softly glows from con duets that line the walls of this ship. The floors beside the east and west wall have what looks to be soft fabric covering. The south wall has small controls that seem to be made for humanoids with two small chairs that look to be pilot seats. view portals are about 50 meters up the side of the ship on the west and east wall and some kind of electronic screen covers the south wall. The ship seems to be a one room ship but there is a green field by the north wall."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"view port"} "Sorry your not 50 meters tall maybe it is made for a dragon?"

extra {"view screen","screen"} "It seems to be the pilots view screen but you can't seem to see a way to turn it on."

extra {"controls","control"} "The controls are in some weird language and your afraid if you start pushing buttons you might rocket in to the station or worse slam into a planet."

extra {"soft fabric","fabric"} "It looks to be a dragon lounge area."

//A link to the portal is also here from ship_port end

deathspace title"Open space" descr "You see the ship and the station far off in the distance and you are in Space!"

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

dilcopy death_room@function ( //how often is damage done 4 would be 1 second 4, //damage 400, //act for the damage. "You realize to late that was the trash disposal transporter and you feel your lungs explode.");


end



%end


</PROGRAMLISTING></INFORMALEXAMPLE> </sect1> <sect1 id="rmexer"> <TITLE>Suggested room exercises</TITLE>

<orderedlist> <LISTITEM> <PARA>Create a door between the Disposal room and the main chamber of the station. Make the new door pick-proof and magic-proof.</PARA> </LISTITEM> <LISTITEM> <PARA>Create another hallway to the south of the main chamber that leads to a ship attached by an airlock. You will need a door before the hallway and before the ship so no one gets sucked out in space. You will need two more rooms for this one for the hallway and one for the ship. </PARA> </LISTITEM> <LISTITEM> <PARA>Using the Dragon station zone as a guide create your own zone with eight rooms. Don't worry to much about descriptions and extras. Link all eight of the rooms to each of the other rooms. This means each room should have seven exits. If you were to map this it would look like a cube marked with 'X' on the sides.</PARA> </LISTITEM> <LISTITEM> <PARA>Make a 3 room cliff that uses the climb <ACRONYM>DIL</ACRONYM> function to climb from the bottom to top. </PARA> </LISTITEM> </orderedlist>


</SECT1>

</chapter>

<chapter ID="ch-05"><?dbhtml filename="ch05.html"> <TITLE>The NPC section</TITLE>

<PARA>Now that you have rooms down it is time to start filling your area with some life. The NPC is the Non-player Character or mobile. These are the things players will hunt and interact with</PARA>

<PARA>In order to get started building NPCs you should first be aware of the NPC fields you can use. The <xref linkend="npcfields"> shows a full listing of all the NPC fields and their types as defined in <xref linkend="ch-03">.</PARA>

<TITLE>NPC fields and types</TITLE> <TGROUP align=left cols=5 colsep=1> <COLSPEC COLNAME="c1" COLWIDTH="2in"> <COLSPEC COLNAME="c2" COLWIDTH="2in"> <COLSPEC COLNAME="c3" COLWIDTH=".5in"> <COLSPEC COLNAME="c4" COLWIDTH="2in"> <COLSPEC COLNAME="c5" COLWIDTH="2in"> <THEAD> <ROW> <ENTRY COLNAME="c1">Field</ENTRY> <ENTRY COLNAME="c2">Type</ENTRY> <ENTRY COLNAME="c4">Field</ENTRY> <ENTRY COLNAME="c5">Type</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY COLNAME="c1">Symbolic name</ENTRY> <ENTRY COLNAME="c2">Symbol</ENTRY> <ENTRY morerows=17 colname="c3"></ENTRY> <ENTRY COLNAME="c4">level</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">names</ENTRY> <ENTRY COLNAME="c2">Stringlist</ENTRY> <ENTRY COLNAME="c4">height</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">title</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">race</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">descr</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">attack</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">inside_descr</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">armour</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">extra</ENTRY> <ENTRY COLNAME="c2">Structure</ENTRY> <ENTRY COLNAME="c4">speed</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">manipulate</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">position</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">flags</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">default</ENTRY> <ENTRY COLNAME="c5"> Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">weight</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">ability</ENTRY> <ENTRY COLNAME="c5">two Integers</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">capacity</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">weapon</ENTRY> <ENTRY COLNAME="c5">two Integers</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">dilbegin or dilcopy</ENTRY> <ENTRY COLNAME="c2">Function pointer</ENTRY> <ENTRY COLNAME="c4">spell</ENTRY> <ENTRY COLNAME="c5">two Integers</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">defensive</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">romflags</ENTRY> <ENTRY COLNAME="c5"> Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">offensive</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">light</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">mana</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">alignment</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">hit</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">minv</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">money</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">key</ENTRY> <ENTRY COLNAME="c5">String</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">exp</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">open</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">sex</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">end tag</ENTRY> <ENTRY COLNAME="c5">Symbol</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>Many of the same fields you found in rooms, as you can see from <xref linkend="npcfields">, can also be found in NPCs. The fields do not always have exactly the same use when coding rooms, NPCs, and objects but they are normally set in the same manor. It is very important that you read and understand the differences of each field as they pertains to rooms and or NPCs.</PARA>

<sect1 id="npcfielddescr"> <TITLE>Description of NPC fields</TITLE>

<variablelist id="var-npcfields"> <VARLISTENTRY> ;symbolic name <DICTDEF> <PARA><indexterm> <primary>NPC symbol</primary> </indexterm>

The rules of the symbols has been explained in <XREF LINKEND="ch-03">, if you didn't read them yet you may want to review. The important thing to realize with the NPC symbol is it is always good practice to give the NPC a symbol that resembles the title so that administrators and builders can use the <command>load</command> and the <command>wstat</command> to easily locate, examine, and load the NPC in question. </PARA></LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;title <DICTDEF> <PARA><indexterm> <primary>NPC title</primary> </indexterm> The NPC title is what is shown if the NPC is being attacked or talking. It is also what is shown if the NPC can be picked up. there should be no punctuation in the NPC title because of how it is used in the <ACRONYM>VME</ACRONYM> server. If you add punctuation or forget to capitalize something that the <ACRONYM>VMC</ACRONYM> thinks you should it will give you a warning when you compile.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

title "a small dog" title "Hansen" title "a black dragon" title "Drako" title "an elephant"

</PROGRAMLISTING></INFORMALEXAMPLE>


</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <TERM>descr</term> <LISTITEM> <PARA><indexterm> <primary>NPC description</primary> </indexterm>

The description field is what the player sees when walking into the room or when looking with no arguments. The description on a NPC will only show up when the NPC is in the standing position. All other positions will show the title and the position they are in. </PARA>


<INFORMALEXAMPLE><PROGRAMLISTING>

descr "a small fluffy dog is chasing its tail here." descr "Hansen is standing here sorting the mail."

</PROGRAMLISTING></INFORMALEXAMPLE>


</LISTITEM> </VARLISTENTRY> <VARLISTENTRY>

;names <DICTDEF> <PARA><indexterm> <primary>NPC names</primary> </indexterm>

The NPC name field is much more important then the room name field. It is what is used when players are hunting and killing and even for administrators who are trying to use their administrator commands on a NPC. The names should match the title and the descr fields and have all normal combinations of each.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

title "a baby black dragon" descr "a tiny baby black dragon is here playing." names {"tiny baby black dragon", "tiny black dragon", "baby black dragon", "black dragon", "tiny dragon", "baby dragon","dragon"}

title "Hansen" descr "Hansen the post man is standing here sorting mail." names{"postman","hansen"}

</PROGRAMLISTING></INFORMALEXAMPLE>


<PARA>The idea of course is to make any combination that a player may type to try and act upon your NPC. You would not want to describe and title your NPC with an entirely different theme than you created its names with because a player would not know what it is called.</PARA></LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;inside_descr <DICTDEF> <PARA><indexterm> <primary>NPC inside_descr</primary> </indexterm></PARA>

<PARA>The inside description is what a player sees if it is inside the NPC. This could be used to show the player its stomach or if on a mount it could be used to show the back of the horse.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

inside_descr "The lining of this stomach looks indestructible. Looks like you are in for a long digestion cycle."

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;extra <DICTDEF> <PARA><indexterm> <primary>NPC extra</primary> </indexterm></PARA>

<PARA>The extra's on the NPC can be used to do many things. It can be used to store information for <ACRONYM>DIL</ACRONYM> programs or it can be used to show a part of the NPC like the room extras show a part of the room. There is also a special extra, the NPCs description when you look at it with the look <NPC> command.</PARA>

<PARA>Lets show the NPC description extra first. If you use an extra with no names list it will become the NPCs description when you look at any of the names on the NPC.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

extra {} "The green furry hamster seems to be glowing and it doesn't seem very happy."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You can also use extras to show parts of the NPC.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

extra {"hamster head","head"} "This human like head is covered with a lot of green fur and it looks really upset."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You can also use the extras to give more detailed and vivid descriptions when the NPC is acted upon.</PARA>

<TITLE>NPC special action extras</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Extra</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>$get_s</ENTRY> <ENTRY>A message shown to activator when getting a NPC.</ENTRY> </ROW> <ROW> <ENTRY>$get_o</ENTRY> <ENTRY>A message shown to others when getting a NPC.</ENTRY> </ROW> <ROW> <ENTRY>$drop_s</ENTRY> <ENTRY>a message shown to activator when dropping a NPC.</ENTRY> </ROW> <ROW> <ENTRY>$drop_o</ENTRY> <ENTRY>A message shown to others when dropping an NPC.</ENTRY> </ROW> <ROW> <ENTRY>$enter_s</ENTRY> <ENTRY>A message shown to activator When mounting</ENTRY> </ROW> <ROW> <ENTRY>$enter_o</ENTRY> <ENTRY>A message shown to others when mounting.</ENTRY> </ROW> <ROW> <ENTRY>$exit_s</ENTRY> <ENTRY>A message shown to others when dismounting</ENTRY> </ROW> <ROW> <ENTRY>$exit_o</ENTRY> <ENTRY>a message shown to others when dismounting</ENTRY> </ROW> </TBODY></TGROUP>

<PARA> In the following example, $1n is the activator and $2n is the unit in question. Assume you are defining a familiar.</PARA>


<INFORMALEXAMPLE><PROGRAMLISTING>

extra {"$get_s"} "You pick up the $2n it is very warm and cuddles right up to you."

extra {"$get_o"} "$1n picks up the $2n and you see them cuddle together."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Finally you can use extras to store information for <ACRONYM>DIL</ACRONYM> programs. We will not cover this because it is a topic covered in-depth in the <ACRONYM>DIL</ACRONYM> documentation.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;manipulate <DICTDEF> <PARA><indexterm> <primary>NPC manipulate</primary> </indexterm></PARA> <PARA>The manipulate filed only has two values for NPCs The two values are 'MANIPULATE_TAKE' and 'MANIPULATE_ENTER'. The 'MANIPULATE_TAKE' makes it possible for a NPC to be picked up this would be good for something like a familiar. The 'MANIPULATE_ENTER' is used for things like mounts when making a mount you will also have to set the capacity so a fat player can jump on. The following is how you set the manipulate flag.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//Make a NPC takable. manipulate {MANIPULATE_TAKE}

//Make a NPC takable and able to be entered manipulate {MANIPULATE_TAKE|MANIPULATE_ENTER}

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;flags <DICTDEF> <PARA><indexterm> <primary>NPC flags</primary> </indexterm></PARA>

<PARA>This field on a NPC is used to set special attributes in order to make the NPC able to be buried or not or no-teleportable and many others. The NPC flag list uses the UNIT_FL_* variables that both the objects and the rooms also use, therefore while you can set some flags on an NPC it may not have any affect unless you as a builder or administrator adds the functionality. You can also add extras on an NPC that can be used as a special flag which you will learn as you learn to use <ACRONYM>DIL</ACRONYM>. The following is a full list of all unit flags and how they affect NPC, if they do.

<TITLE>NPC unit flag affects</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>UNIT_FL_PRIVATE</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INVISIBLE</ENTRY> <ENTRY>Makes unit invisible</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_BURY</ENTRY> <ENTRY>Makes it so you can create NPC that can be taken like familiars or pets that can not be buried. This flag is not needed on every NPC because the bury command will not allow you to bury an NPC outside of your inventory. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes unit buried when loaded</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_TELEPORT</ENTRY> <ENTRY> Makes it so you can not summon the NPC with this flag and the NPC with this flag can not teleport. You can still teleport to NPC with this flag the current way teleport is written. Remember all spells are in <ACRONYM>DIL</ACRONYM> and you can modify them in spells.zon </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_MOB</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_WEATHER</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INDOORS</ENTRY> <ENTRY> Currently has no affect on NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_TRANS</ENTRY> <ENTRY>Makes unit transparent If the Unit is transparent you will be able to see any other NPCs that it is carrying. For example if a NPC was carrying a familiar you would see that as you walked into the room. It also is used in mounts so the PC can see outside its mount. If the flag is not set on its mount the player will not see what is in the room. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_SAVE</ENTRY> <ENTRY>Makes it so a PC can't save with unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_SACRED</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_MAGIC</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> </TBODY></TGROUP>

</PARA>

<PARA>If you wanted to make a NPC that a player can carry around but can not save you would set the manipulate and flags as follows.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

manipulate {MANIPULATE_TAKE} flags {UNIT_FL_NO_SAVE}

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;romflags <DICTDEF> <PARA><indexterm> <primary>NPC romflags</primary> </indexterm></PARA>

<PARA>Like flags these are just integer values that are used to change how the NPC interacts with its environment.</PARA>

<TITLE>Room flags for NPCs</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>CHAR_PROTECTED</ENTRY> <ENTRY> Set this flag if the character is protected by the law-system. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_LEGAL_TARGET</ENTRY> <ENTRY> This flag is used by the law system and should not be set unless you are re-writing your law system. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_OUTLAW</ENTRY> <ENTRY> This flag is used by the law system and should not be set unless you are re-writing your law system. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_GROUP</ENTRY> <ENTRY> This is used by the follow and group commands and should not be set unless you are re-writing your, movement, status, and combat systems. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_BLIND</ENTRY> <ENTRY> Set this if the character is blinded. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_HIDE</ENTRY> <ENTRY> Set flag if character is hidden. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_MUTE</ENTRY> <ENTRY> Set flag if character is mute. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_SNEAK</ENTRY> <ENTRY> Set flag if character is in sneaking mode. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_ALIGN</ENTRY> <ENTRY> No actual effect on NPCs. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_INVISIBLE</ENTRY> <ENTRY> Set flag if character can see invisible units. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_MAGIC</ENTRY> <ENTRY> No actual effect on NPCs. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_POISON</ENTRY> <ENTRY> No actual effect on NPCs. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_UNDEAD</ENTRY> <ENTRY> No actual effect on NPCs. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_CURSE</ENTRY> <ENTRY> No actual effect on NPCs. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_DETECT_LIFE</ENTRY> <ENTRY> No actual effect on NPCs. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_WIMPY</ENTRY> <ENTRY> Set flag if character if wimpy. Wimpy characters flee when they are low on hit points, and they gain less experience when killing others. If a character is both wimpy and aggressive (NPC_AGGRESSIVE) it will only attack sleeping players. </ENTRY> </ROW> <ROW> <ENTRY>CHAR_SELF_DEFENCE</ENTRY> <ENTRY> This is an internal combat flag set this only if you create your own combat system. </ENTRY> </ROW> </TBODY></TGROUP>

<PARA>These flags are set in the same way as other flags in rooms NPCs and objects. The following are a few examples. <INFORMALEXAMPLE><PROGRAMLISTING>

//wimpy and hidden romflags {CHAR_HIDDEN, CHAR_WIMPY}

//NPC can see invisible romflags {CHAR_DETECT_INVISIBLE}

</PROGRAMLISTING></INFORMALEXAMPLE></PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;weight <DICTDEF> <PARA><indexterm> <primary>NPC weight</primary> </indexterm></PARA>

<PARA>The weight is the weight of the NPC in pounds. In the future we may adjust this to allow you to make things lighter for example you could set it in ounces or grams. Right now however all we have is pounds so we have some pretty heavy feathers out there.</PARA>

<PARA>To use this you just enter the 'weight' keyword and then the value.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

/80 lbs. weight 80

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA>The weight affects the NPCs natural attack damage.</PARA> </NOTE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;capacity <DICTDEF> <PARA><indexterm> <primary>NPC capacity</primary> </indexterm></PARA>

<PARA>This field along with the NPCs strength and dexterity decides how much a NPC can carry. If you set the capacity to 300 lbs. the NPC will only be able to carry that much depending if it has the strength and dexterity to carry that much. This of course doesn't affect <ACRONYM>DIL</ACRONYM> programs that link the objects directly into the NPC. To set the capacity you just put the keyword and the amount in your NPC.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

capacity 300

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;height <DICTDEF> <PARA><indexterm> <primary>NPC height</primary> </indexterm></PARA>

<PARA>The height field is the size of the NPC in centimeters. This determines the size of the equipment the NPC is wearing. You will learn more about size and height in the object section but for now just understand this makes your NPC the right or wrong size. To set the 'height' you just put the 'height' keyword followed by the number of centimeters.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>


//6 feet tall since 1 inch equals 2.54 height 183

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;dilbegin or dilcopy <DICTDEF> <PARA><indexterm> <primary>NPC dilbegin or dilcopy</primary> </indexterm></PARA>

<PARA>The <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds. We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach you how to create your own functions that will make your rooms, NPC, and objects more than special.</PARA>

<PARA>There are several NPC functions that come standard with the <ACRONYM>VME</ACRONYM> 2.0. The following is a list of the functions.</PARA>

<itemizedlist> <LISTITEM><PARA>Mercenary</PARA></LISTITEM> <LISTITEM><PARA>obey</PARA></LISTITEM> <LISTITEM><PARA>evaluate</PARA></LISTITEM> <LISTITEM><PARA>guard direction</PARA></LISTITEM> <LISTITEM><PARA>shop keeper</PARA></LISTITEM> <LISTITEM><PARA>combat magic</PARA></LISTITEM> <LISTITEM><PARA>fido</PARA></LISTITEM> <LISTITEM><PARA>zone wander</PARA></LISTITEM> <LISTITEM><PARA>global wander</PARA></LISTITEM> <LISTITEM><PARA>team work</PARA></LISTITEM> <LISTITEM><PARA>rescue</PARA></LISTITEM> <LISTITEM><PARA>agressive</PARA></LISTITEM> </itemizedlist>

<PARA>These are the only NPC functions currently documented in the <ACRONYM>VME</ACRONYM> 2.0 release but if you go through the zones that are released with the <ACRONYM>VME</ACRONYM> you are sure to find many more. Hopefully with the descriptions in <XREF LINKEND="npcdilfunc">. You will be able to use the functions listed here and figure out ones that are not.</PARA>

<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the Valhalla mud all you have to do is use the dilcopy keyword in the NPC with the function name you want to use and the arguments that function require. The following is what you would find in the function.zon for evaluate.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

/* Evaluate <ACRONYM>DIL</ACRONYM>. amt is the cost of evaluation in iron pieces. Note: not to be confused with <function>evaluate@commands</function>, which is a command. */ dilbegin aware evaluate (amt: integer);

var u1 : unitptr; arg: string; buf: string; cur: integer; craft: integer; category: integer;

pc : unitptr; pcn: string;

arm_text : stringlist; shi_text : stringlist; craft_text: stringlist; code {

craft_text:= {"horrible","very bad","bad","worse than average","average", "a little better than average","better than average","good","very good", "supreme"}; arm_text:= {"clothes", "leather", "hard leather", "chain", "plate"}; shi_text:= {"small", "medium", "large"};

heartbeat:= PULSE_SEC*3;

:start: arg:= ""; u1:= null;

wait (SFB_CMD, command("evaluate"));

if (visible(pc, self) == FALSE) goto start; // Pc is just trying to evaluate using the command

block;

pc:= activator; if (pc.type == UNIT_ST_PC) pcn := pc.name; else pcn := pc.title;

arg:= argument;

if (visible(self, pc) == FALSE) { exec ("say I don't do business with people I can't see.", self); goto start; }

if (arg == "") { exec ("say Which item do you wish to evaluate, "+pcn+"?", self); goto start; }

u1:= findunit (pc, arg, FIND_UNIT_IN_ME, null);

if (not u1) { exec ("say You do not have such an item, "+pcn+".", self); goto start; }

if ((u1.type != UNIT_ST_OBJ) or ( (u1.objecttype != ITEM_WEAPON) and (u1.objecttype != ITEM_ARMOR) and (u1.objecttype != ITEM_SHIELD) )) { exec ("say The "+u1.name+" is neither a sword, shield nor armor!", self); goto start; }

// Currency, skip for now

if (not transfermoney (pc, null, amt * IRON_MULT)) { exec ("say The cost is merely "+moneystring(amt*IRON_MULT, TRUE)+ ", get them first.", self); goto start; }

category:= u1.value[0]; craft:= u1.value[1] / 5 + 4; // / 5 + 4 is to get corresponding craft_text val

if (craft < 0) craft := 0; if (craft > 9) craft := 9;

// Change the following to use skill_text(craft) instead of itoa(craft) if (u1.objecttype == ITEM_WEAPON) buf := "say The "+u1.name+" is a "+weapon_name(category)+" of "+ craft_text.[craft]+" craftmanship and material.";

if (u1.objecttype == ITEM_ARMOR) buf := "say The "+u1.name+" is made of "+arm_text.[category]+" and is of "+ craft_text.[craft]+" craftmanship and material.";

if (u1.objecttype == ITEM_SHIELD) buf := "say The "+u1.name+" is a "+shi_text.[category]+" shield of "+ craft_text.[craft]+" craftmanship and material.";

exec (buf, self);

goto start;

}

dilend

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to understand it or adjust it you only have to use it. In fact this is a really easy <ACRONYM>DIL</ACRONYM> to use. It only has one argument which is 'amt', the integer value of money you want the evaluator to charge when a person evaluates their stuff. So to use this function it would look like this on an NPC.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy evaluate@function (5*GOLD_PIECE);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>this tells the evaluate <ACRONYM>DIL</ACRONYM> to charge 5 gold pieces each time a player evaluates something. For more information on the money see the money field.</PARA>

<PARA>All released <ACRONYM>DIL</ACRONYM> NPC functions are described in <XREF LINKEND="npcdilfunc">. Then we put some to work so you can see how to use them in <XREF LINKEND="npccomplex"></PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;defensive <DICTDEF> <PARA><indexterm> <primary>NPC defensive</primary> </indexterm></PARA>


<PARA>This field sets the NPC natural defense. The defense is a natural bonus the NPC gets when being attacked. If this value is set high enough the NPC becomes almost indestructible. You should use the macro to set the NPC natural attack and defense in <xref LINKEND="npcmacroattdef">.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;offensive <DICTDEF> <PARA><indexterm> <primary>NPC offensive</primary> </indexterm></PARA>

<PARA>This field sets the NPC natural offense. The offense is a natural bonus the NPC gets when being attacked. If this value is set high enough the NPC can do some serious damage when attacking. You should use the macro to set the NPC natural attack and defense in <xref LINKEND="npcmacroattdef">.</PARA>


</LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;mana <DICTDEF> <PARA><indexterm> <primary>NPC mana</primary> </indexterm></PARA>

<PARA>This sets the NPC max mana points. Using this field you can create special NPCs that have more or less mana points than the <ACRONYM>VME</ACRONYM> server would normally give when a NPC is loaded.</PARA>

<PARA>this field is simple all you have to do to set it is put the 'mana' keyword followed by the amount of mana points you want the NPC to have as its max. The following definition would make an NPC with only 100 mana points no matter what level.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

mana 100

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;hit <DICTDEF> <PARA><indexterm> <primary>NPC hit</primary> </indexterm></PARA>

<PARA>This sets the NPC max hit points. Using this field you can create special NPCs that have more or less hit points than the <ACRONYM>VME</ACRONYM> server would normally give when a NPC is loaded.</PARA>

<PARA>this field is simple all you have to do to set it is put the 'hit' keyword followed by the amount of hit points you want the NPC to have as its max. The following definition would make an NPC with only 100 hit points no matter what level.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

hit 100

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;money <DICTDEF> <PARA><indexterm> <primary>NPC money</primary> </indexterm></PARA>

<PARA>The money field is how you give your NPC money to have while going along its marry way through your world. The money field is an integer that tells the <ACRONYM>VME</ACRONYM> how much money the NPC is carrying. It would however be hard to calculate the amount you want on an NPC with out the macros we have provided. For example to put 5 gold on an NPC you would have to use the following on your NPC.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

money 25600

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>I of course am not sure this will make 5 gold pieces since I did the math in my head and with all this righting I am doing my math mind doesn't seem to be working right. So to make life easier for you and me we have added some macros to help that are rather self explanatory.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

IRON_PIECE COPPER_PIECE SILVER_PIECE GOLD_PIECE PLATINUM_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now if we wanted to make a NPC carrying five gold it would be as simple as this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

money 5*GOLD_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>the macro method also gains you the ability to tell the <ACRONYM>VME</ACRONYM> what amount of each coin you want on the NPC. If you set it using a single integer the compiler would pick how many of each coin. This of course is not what is desired in fact you want to be able to set your money however you like. So setting more than one coin is as simple as adding a comma between the first and second coin.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

money 5*GOLD_PIECE, 20*IRON_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;exp <DICTDEF> <PARA><indexterm> <primary>NPC exp</primary> </indexterm></PARA> <PARA>By default a monster gives 100% of the experience it is worth. This amount is calculated according to the level of the NPC verses the level of the person fighting it. Sometimes the amount of experience is not right since the NPC is really hard to kill for example a dragon with breath weapon and heal at the same level as a merchant with a dagger. These should of course give different experience. The 'exp' field is designed to do just that. The possible range for the 'exp' field is -500% to 500%. If you put the NPC at a negative experience value it will take experience away when it is killed. If you want the default of 100% you do not even need to place this field in your NPC.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//add 50% to the experience gained exp 150

/subtract 150% from the experience gained exp -50

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;sex <DICTDEF> <PARA><indexterm> <primary>NPC sex</primary> </indexterm></PARA>

<PARA>Gender, one of these:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

SEX_NEUTRAL SEX_MALE SEX_FEMALE

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>the values are pretty obvious which is which gender so all we will show here is how to set it.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//Setting a male NPC sex SEX_MALE

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;level <DICTDEF> <PARA><indexterm> <primary>NPC level</primary> </indexterm></PARA>

<PARA>When creating a NPC it must be between level 0 and 199. The level of the NPC decides how many skill points and ability points the NPC has. It, along with the 'exp' percentage, determines the amount of experience gained when the NPC is killed. To set the level of the NPC you use the 'level' keyword and then follow it by the level you are setting.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//set a NPC to level 50 level 50

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;race <DICTDEF> <PARA><indexterm> <primary>NPC race</primary> </indexterm></PARA>

<PARA>The 'race' keyword is what you use to set the characters race. Races in <ACRONYM>VME</ACRONYM> are defined by using an integer that lets the spells and skills act differently for each specific type. The <ACRONYM>VME</ACRONYM> comes standard with many races defined in the values.h. For ease in access we have provided them in <xref linkend="app-c">. For now you can look at the short list below taken from the over all race list.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define RACE_RAT 1102 #define RACE_HORSE 1103 #define RACE_BADGER 1104 #define RACE_SKUNK 1105 #define RACE_BOAR 1106 #define RACE_MOUSE 1107 #define RACE_MONKEY 1108 #define RACE_PORCUPINE 1110 #define RACE_ELEPHANT 1112 #define RACE_CAMEL 1113 #define RACE_FERRET 1114

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If for example you wanted to make a monkey you could simply put the 'race' keyword and follow it by the monkey define like this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

race RACE_MONKEY

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>If the race your looking for doesn't exist in the values.h list, you can either add one buy picking a number not already used and creating your own define in the values.h or by adding the define to your zone. Defines added to a single zone will not be accessible if another builder wants to use it. You could also just set it using a number. The following two methods would act the same.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING> //add define to values.h and use in your zone #define RACE_SPACE_TROLL 5059 race RACE_SPACE_TROLL

//Just plug in a number race 5059

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you don't use the macros things can get confusing really fast with the amount of races there are.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;attack <DICTDEF> <PARA><indexterm> <primary>NPC attack</primary> </indexterm></PARA>

<PARA>This field sets the NPCs natural attack type. Do not use this field directly instead use the macro described in <xref linkend="npcmacroattarm"></PARA> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;armour <DICTDEF> <PARA><indexterm> <primary>NPC armour</primary> </indexterm></PARA>

<PARA>This field sets the NPCs natural armour type. Do not use this field directly instead use the macro described in <xref linkend="npcmacroattarm"></PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;speed <DICTDEF> <PARA><indexterm> <primary>NPC speed</primary> </indexterm></PARA>

<PARA>Speed determines the NPCs speed. The range is one to twelve. You should not set this when compiling an NPC since the result is really undefined. If you have a special NPC that you want to try to make move faster and hit faster then you could try setting this. This field is mainly added so <ACRONYM>DIL</ACRONYM> can adjust speed. The lower the number the faster the NPC speed.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//fastest speed. speed 0

//slowest speed speed 12

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;position <DICTDEF> <PARA><indexterm> <primary>NPC position</primary> </indexterm></PARA>

<PARA>This field sets the position that the NPC will be in when it is first loaded. The following positions are recognized by the compiler.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

POSITION_DEAD POSITION_MORTALLYW POSITION_INCAP POSITION_STUNNED POSITION_SLEEPING POSITION_RESTING POSITION_SITTING POSITION_FIGHTING POSITION_STANDING

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Some of these positions make no sense you would not load a NPC into a fight or you would not load an NPC that is already dead. The positions are availible for <ACRONYM>DIL</ACRONYM> and you will need to read the <ACRONYM>DIL</ACRONYM> manuals to find out what you would want those for. For now the following are enough.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

POSITION_SLEEPING POSITION_RESTING POSITION_SITTING POSITION_STANDING

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The position combined with the default position determines what will be shown when a player looks in the room. If the position of the NPC matches its default position the NPC description will be shown. If it doesn't match the NPCs title and position will be shown. The default value for both 'position' and 'default' is 'POSITION_STANDING'</PARA>

<PARA>To set the position like with other fields you type the 'position' keyword first and follow it by the position you are setting.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

position POSITION_SITTING

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;default <DICTDEF> <PARA><indexterm> <primary>NPC default</primary> </indexterm></PARA>

<PARA>The default position along with the position determines what is shown when a NPC is in each position. If the position and default positions match the 'descr' field is shown. If they do not match the NPC title is shown along with the current position information. If 'default' is not set it defaults to 'POSITION_STANDING'. The following are possible default positions.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

POSITION_DEAD POSITION_MORTALLYW POSITION_INCAP POSITION_STUNNED POSITION_SLEEPING POSITION_RESTING POSITION_SITTING POSITION_FIGHTING POSITION_STANDING

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Setting the default field is exactly like setting the 'position' field you place the 'default' keyword first and then the position you want to be default like this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

default POSITION_RESTING

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;ability <DICTDEF> <PARA><indexterm> <primary>NPC ability</primary> </indexterm></PARA>

<PARA>this field is used to set each of the NPCs abilities. It should not be used directly but instead set through the macro described in <xref linkend="npcmacroability"> </PARA> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;weapon <DICTDEF> <PARA><indexterm> <primary>NPC weapon</primary> </indexterm></PARA>

<PARA>this field is used to set each of the NPCs weapon proficiencies. It should not be used directly but instead set through the macro described in <xref linkend="npcmacroweapspl"></PARA> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;spell <DICTDEF> <PARA><indexterm> <primary>NPC spell</primary> </indexterm></PARA>

<PARA>this field is used to set each of the NPCs spells. It should not be used directly but instead set through the macro described in <xref linkend="npcmacroweapspl"> </PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;light <DICTDEF> <PARA><indexterm> <primary>NPC light</primary> </indexterm></PARA>

<PARA>The light field on NPC is not normally set. If however you have a strange creature like a 'light bug' you can set a light value on a NPC. The default light is set to 0 which means it neither adds or subtracts from the rooms light. To set the light value on a NPC you just put the 'light' keyword first and then the value you want to add to the current light.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//add one to light in room light 1

//default light 0

//take one away light -1

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;alignment <DICTDEF> <PARA><indexterm> <primary>NPC alignment</primary> </indexterm></PARA>

<PARA>This field is a value between -1000 and +1000, where -1000 is ultimate evil, 0 is neutral and +1000 is ultimate good. Good is per definition any value from +1000..+350, neutral is any value from +349..-349 and evil is any value from -350..-1000. Any value in between can also be used.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

// Quite evil, maybe a Ghoul alignment -750

// Barely evil. alignment -350

//barely good alignment 350

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;minv <DICTDEF> <PARA><indexterm> <primary>NPC minv</primary> </indexterm></PARA>

<PARA>This field is the administrator invisible level of the NPC it is set on. This means that if you set the 'minv' to two hundred it will make it so the NPC can not be seen by anyone below the administrator level of two hundred. This is good for hiding ghosts that only come visible when they attack. In order for the 'minv' to be removed an administrator or a <ACRONYM>DIL</ACRONYM> function must change it.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

minv 239

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;key <DICTDEF> <PARA><indexterm> <primary>NPC key</primary> </indexterm></PARA>

<PARA>Currently this field is not used in the <ACRONYM>VME</ACRONYM> 2.0 release. It was added so in the future you wanted to add keys to a NPC for some weird reason like a living trunk then you can. In order to set the key you first place the 'key' keyword and then add the symbolic name of the key.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//if the key is in your zone key mynpckey

//if the key is in some other zone key someoneelses@keyzone

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;open <DICTDEF> <PARA><indexterm> <primary>NPC open</primary> </indexterm></PARA>

<PARA>this field is not used yet in the <ACRONYM>VME</ACRONYM> 2.0 release. The field was added so you could make a NPC that can be opened, closed, locked, and everything else that a room or an object can have set on it. For now we will not document this but if you are interested in how you could use it study the open fields on objects or rooms.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </SECT1>

<sect1 id="npcmacros"> <TITLE>NPC macros</TITLE>

<sect2 id="npcmacroattarm"> <TITLE>The attack and armour macro</TITLE>

<PARA>The natural attack and armour fields allow you to set the NPC to do damage like a certain type of weapons and to defend like a certain type of armour respectively. Lets say you had a metal cougar it would have an attack type of claw and an armour type of plate while a normal dog would have an armour type of leather and an attack type of bite. The 'NATURAL_DEF' macro is what allows you to set these fields. This macro is defined in wmacros.h and looks like this.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define NATURAL_DEF(weapon_category, armour_category) \ armour armour_category \ attack weapon_category

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The word natural can sometimes be a little confusing since you can set any of the weapons types you like on the NPC. It doesn't exactly make sense to have a dog that attacks as if it uses a long sword but if you wish it you can do it. The following is a short list of just the natural weapon types but you can find a full list in <xref linkend="app-d"> or in the values.h of your mud just in case you have added some weapon types.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define WPN_FIST 34 #define WPN_KICK 35 #define WPN_BITE 36 #define WPN_STING 37 #define WPN_CLAW 38 #define WPN_CRUSH 39

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Again you don't have to use leather for dogs as we have already mentioned with our metal cat idea you could make a cloth dragon if you really want but its up to you to keep some sanity on your <ACRONYM>VME</ACRONYM>. The following is the list of armour types that can be set. You will see that the list is exactly the same as the list you will find later when making armour.</PARA>

<INFORMALEXAMPLE> <PROGRAMLISTING>

#define ARM_CLOTHES 0 /*Same as a Human in jeans and a T-shirt*/ #define ARM_LEATHER 1 /* A soft flexible leather base armour */ #define ARM_HLEATHER 2 /* A hard un flexible leather base armour */ #define ARM_CHAIN 3 /* A flexible armour composed of interlocking rings */ #define ARM_PLATE 4 /* An un flexible plate armour. */

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now that you have the defines to work with we will return to our metal cat and normal dog. The definitions for them would look something like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//Metal Cat NATURAL_DEF(WPN_CLAW, ARM_PLATE)

//normal dog NATURAL_DEF(WPN_BITE, ARM_LEATHER)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You should know that the weight of the monster determines the maximum amount of damage it can give when using a natural attack. The weight is categorized as follows:</PARA>

<TITLE>Weight size chart</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>LBS</ENTRY> <ENTRY>Size</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>0 - 5</ENTRY> <ENTRY>Tiny</ENTRY> </ROW> <ROW> <ENTRY>6 - 40</ENTRY> <ENTRY>Small</ENTRY> </ROW> <ROW> <ENTRY>41 - 160</ENTRY> <ENTRY>Medium</ENTRY> </ROW> <ROW> <ENTRY>161 - 500</ENTRY> <ENTRY>Large</ENTRY> </ROW> <ROW> <ENTRY>500 and up</ENTRY> <ENTRY>Huge</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>By default monsters are medium. So make sure you take this into account when you are creating your NPC.</PARA> </sect2>

<sect2 id="npcmacroattdef"> <TITLE>The defense and offense bonus macro</TITLE>

<PARA>There comes a time when you may want to make your NPC super naturally powerful. It is for those times that the offense and defense fields are available for you to set. Normally they default to 0 but you can set them from 0 to 5000. The higher you set the offense number the harder you will hit people you a re in combat with. The higher you set the defense the harder it will be for people to hit your NPC. The following macro allows you to set both the offense and defense.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define ATTACK_DEFENSE(attack, defense) \ offensive attack \ defensive defense

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Using this macro is rather easy you just put the value you want for each and your all done</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//a really hard hitting hard to kill NPC ATTACK_DEFENSE( 1000, 1000)

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2>

<sect2 id="npcmacroability"> <TITLE>The NPc abilities macro</TITLE>

<PARA>All abilities are in the range [1..200]. Players usually have a maximum of 150, modified by magic... 200 is considered divine. When creating a monster you can not directly specify the size of the abilities, instead you specify a percentage distribution of points. The amount of points are then distributed by the computer according to the specified level. The 'MSET_ABILITY' macro is available for this purpose, and is defined as:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define MSET_ABILITY(str,dex,con,hpp,bra,cha,mag,div) \ ability[ABIL_STR] str \ ability[ABIL_DEX] dex \ ability[ABIL_CON] con \ ability[ABIL_HP] hpp \ ability[ABIL_BRA] bra \ ability[ABIL_MAG] mag \ ability[ABIL_DIV] div \ ability[ABIL_CHA] cha

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA> Note the sum of the ability values must be 100%. This is thus an example of an ability distribution: <INFORMALEXAMPLE><PROGRAMLISTING>

MSET_ABILITY(25,15,10,15,10,5,10,0) /* Sum is 100% */

</PROGRAMLISTING></INFORMALEXAMPLE> </PARA></NOTE>


<PARA>The amount of points distributed depends directly upon the level of the monster and the percentage. If the percentage is too high and the level is also set High some ability points may be lost since a NPC gets all abilities over 255 cut off. For example a level 199 monster with an ability percentage a bit above 20% will make an ability above the 255 points maximum. In the current combat system in the <ACRONYM>VME</ACRONYM> 2.0 it is not necessary to spend points on both 'mag' and 'div' on the NPC since only one or the other is ever used depending on which is higher.</PARA>

</sect2>

<sect2 id="npcmacroweapspl"> <TITLE>The NPc weapon and spell macros</TITLE>

<PARA>NPCs know about weapons and spells but not at the same detailed level as the player. For NPCs the spell and weapon group are used. Thus the Axe hammer category defines all defence and all attack for all kinds of axes and hammers, whereas the player would have to train individually in each axe and hammer type. The same is true for spells. Thus if a monster has 25 points in the weapon sword category it will fight (and defend) with all sword-like weapons at skill 25. When you define weapon and spell skills (monsters have no skill skills) you also define these as percentages, and the program automatically distributes the points. Use the pre-defined macros:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define MSET_WEAPON(axe_ham, sword, club_mace, pole, unarmed, special) \ weapon[WPN_AXE_HAM] axe_ham \ weapon[WPN_SWORD] sword \ weapon[WPN_CLUB_MACE] club_mace \ weapon[WPN_POLEARM] pole \ weapon[WPN_UNARMED] unarmed \ weapon[WPN_SPECIAL] special

</PROGRAMLISTING> </INFORMALEXAMPLE>

<TITLE>MSET_WEAPON arguments</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Argument</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>axe_ham</ENTRY> <ENTRY>any hammer or axe</ENTRY> </ROW> <ROW> <ENTRY>sword</ENTRY> <ENTRY>any sword like weapon, including dagger and rapier, etc.</ENTRY> </ROW> <ROW> <ENTRY>club_mace</ENTRY> <ENTRY>any club or mace like weapon, flails, morning star, etc.</ENTRY> </ROW> <ROW> <ENTRY>polearm</ENTRY> <ENTRY>any spear or pole like weapon: spear, trident, sickle, scythe etc.</ENTRY> </ROW> <ROW> <ENTRY>unarmed</ENTRY> <ENTRY> Is any bite, claw, sting or other natural attack.</ENTRY> </ROW> <ROW> <ENTRY>special</ENTRY> <ENTRY>any very peculiar weapon, currently only whip.</ENTRY> </ROW> </TBODY></TGROUP>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define MSET_SPELL(div, pro, det, sum, cre, min, hea, col, cel, int, ext) \ spell[SPL_DIVINE] div \ spell[SPL_PROTECTION] pro \ spell[SPL_DETECTION] det \ spell[SPL_SUMMONING] sum \ spell[SPL_CREATION] cre \ spell[SPL_MIND] min \ spell[SPL_HEAT] hea \ spell[SPL_COLD] col \ spell[SPL_CELL] cel \ spell[SPL_INTERNAL] int \ spell[SPL_EXTERNAL] ext

</PROGRAMLISTING></INFORMALEXAMPLE>


<TITLE>MSET_SPELL arguments</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Argument</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>div</ENTRY> <ENTRY>Covers all divine sphere spell.</ENTRY> </ROW> <ROW> <ENTRY>pro</ENTRY> <ENTRY>Covers all protection sphere spells.</ENTRY> </ROW> <ROW> <ENTRY>det</ENTRY> <ENTRY>Covers all detection sphere spells.</ENTRY> </ROW> <ROW> <ENTRY>sum</ENTRY> <ENTRY>Covers all summoning spells.</ENTRY> </ROW> <ROW> <ENTRY>Cre</ENTRY> <ENTRY>Covers all creation spells.</ENTRY> </ROW> <ROW> <ENTRY>min</ENTRY> <ENTRY>Covers all mind spells.</ENTRY> </ROW> <ROW> <ENTRY>hea</ENTRY> <ENTRY>Covers all heat spells (fireball, etc.)</ENTRY> </ROW> <ROW> <ENTRY>col</ENTRY> <ENTRY>Covers all cold spells (frostball, etc.)</ENTRY> </ROW> <ROW> <ENTRY>cel</ENTRY> <ENTRY>Covers all cell (electricity) spells (lightning bolt, etc.)</ENTRY> </ROW> <ROW> <ENTRY>int</ENTRY> <ENTRY>Covers all internal (poison) spells (toxicate, etc.)</ENTRY> </ROW> <ROW> <ENTRY>ext</ENTRY> <ENTRY>Covers all external (acid) spells (acid ball etc).</ENTRY> </ROW> </TBODY></TGROUP>

<NOTE><PARA>If your not sure what your weapon or spell is categorized as you can look in the weapons.def or the spells.def for that you are using for your <ACRONYM>VME</ACRONYM> server.</PARA></NOTE> <PARA>The sum of all spell and weapon skills must be 100%. For example, the following would be a legal setting of weapons and spells.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

// 75% Total, Club/Mace is primary MSET_WEAPON(10,10,20,5,15,5)

// 25% Total, Fire is primary MSET_SPELL(8,0,0,3,0,3,2,3,3,3,3)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Remember that the groups define both attack and defence. Thus if you make an Orc which has 0% in the flail group it can only use its dexterity to defend itself. Likewise with spell groups. For this reason the groups are both "resistance" as well as attack groups.</PARA> </sect2>

<sect2 id="npcmacrocomposed"> <TITLE>Using the composed.h</TITLE>

<PARA>The file composed.h contains many standard monsters. It is a good idea to study these definitions, as they form the basis of many different monsters. Note that the definitions by no means are perfect, but we are hoping to make a more or less complete monster compendium. If you create certain (general) monsters, please design it as a macro so it can be incorporated in the file. The more monsters created by using these macros the easier it will be for your builders to create NPCs. If you think you have a really all inclusive Composed.h and want to share it with the rest of the <ACRONYM>VME</ACRONYM> servers running out there on the internet. Feel free to submit it to the <ACRONYM>VME</ACRONYM> staff and we will put it in the contribution directories on our release site.</PARA>

<NOTE><PARA>For more information on how to use the composed.h when building your NPC see <xref linkend="npcbasic">.</PARA></NOTE> </sect2> </SECT1>


<sect1 id="npcbasic"> <TITLE>Building your first NPC</TITLE>

<PARA>Now that you have built your first zone with rooms its time to populate it with Non playing characters for your players to hunt, kill, and or interact with. In the last couple of sections you have looked through the fields. In this section we are going to make a nice easy NPC and then show how to use the composed.h to make your NPC building easier. As I have previously stated in the section on room building I like dragons so the first NPC your going to learn to build is a big bad ugly dragon. Don't worry if you hate dragons or you just want to build a normal world you will learn plenty from my dragon example to be able to adjust it to whatever you want.</PARA>

<PARA>When making NPCs you create the zone source file first as shown in <xref linkend="ch-02">. If you only have NPCS you do not need the %reset, %objects, and %rooms fields. For the examples in this chapter we will use the zone we created in <xref linkend="ch-04"> and add the %mobiles section where we will put all the NPC definitions. At the end of this chapter, in <xref linkend="roomnpczone">, we will bring it all together with the rooms we have already defined and our NPCs.</PARA>


<PARA>The first part of all NPC definitions is the symbolic name it is good to always pick a name that will match the name of the NPC so it will be easy to load the NPC. The reason the symbolic and name should match is when you use the command <command>wstat</command> it will only show you a list of the NPCs by symbolic name for example if you type <command> wstat zone dragon mobiles </command> You will get the following: <INFORMALEXAMPLE><PROGRAMLISTING>

List of mobiles in zone Dragon: dragon clerk trashman

</PROGRAMLISTING></INFORMALEXAMPLE> If you didn't make it clear what the NPC was by the symbolic name it might look like this: <INFORMALEXAMPLE><PROGRAMLISTING>

List of mobiles in zone Dragon: npc1 npc2 npc3

</PROGRAMLISTING></INFORMALEXAMPLE> While this might be great when you first start imagine trying to remember each NPC if you have over 30 of them.</PARA>

<PARA>Now lets get started with our dragon. As with the rooms all that is required to make a NPC is the symbolic and end fields. That of course will make a NPC with all defaults.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

bldragon end

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Thats it for that dragon right? Nope not quite that makes a NPC with all defaults. That means this will probably be a very wimpy human with a symbolic name of dragon and no description, in short it will be a blank when you load it. Now lets start putting the Dragon together.</PARA>

<PARA>The first three things we need are the dragons title, description and names. The description should be what you see when you do a 'look' in the room. The title should be what you see when the NPC is talking or fighting. Finally the names should cover everything in the title and description fields so if you wanted to kill them you can easily know what to type.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"} ... end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The names, title and description shouldn't be to hard so I don't think its necessary to go into any more description on the subject. Lets move on. Now we have to take care of what a player sees when he or she looks at a NPC. to make the main description of an NPC you place an extra on the NPC with no names in the list. The blank extra is a special extra that will be shown every time you look at anything in the names list of the NPC. So a description of a NPC would look something like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now that you have a main description for the NPC you need to make any smaller descriptions that you want the player to be able to look at. In this case the dragon eyes and claw would be good things to describe and maybe a few other things just for humor.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

extra {"eyes","eye"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now that we have the NPC all described we should start setting things like race, gender, level, height, weight, defense, offense, alignment, abilities, and finally skills and spells. First we will pick a race. Normally the list of races are in your values.h. We have the list in <xref linkend="app-c"> and I have searched for dragon and found the race I want it is as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

race RACE_DRAGON_BLACK

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you don't think there is any difference in dragons you can set them all to one race like you could define a race called 'RACE_DRAGON' or something like that.</PARA>

<PARA>Now we should chose the gender of our dragon. Make sure your descriptions match what you pick. It would be pretty weird to have a female dragon and have the descriptions say 'he, him, or his'</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

sex SEX_MALE

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Now lets set the height and weight. Remember you set the height in centimeters and the weight in pounds. In the future the <ACRONYM>VME</ACRONYM> will standardize to one or the other but for now we have to play the conversion game.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING> //20 feet (1 inch = 2.54 cm height 625

//566 KG (1 lb. = .45359 kg) weight 1250

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now that we have the size of the dragon we can pick a level. My dragon is only 20 feet tall and 1250 pounds so I think maybe he is a bit young and will make his level around 70.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

level 70

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>The dragon may not wear armour but by default a dragon should have an armour equal to someone wearing plate mail. Not only that but my dragon doesn't like to use his mouth as his natural attack and he sure can't punch with those big claws so we need to set his attack type to claw.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

NATURAL_DEF(WPN_CLAW, ARM_PLATE)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Not many black dragons are good so I will pick almost totally evil, since totally evil is -1000 I will set it as follows.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

alignment -900

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Finally we get to the hard part. Many people have trouble setting the NPC abilities, weapons, and spells. There really is nothing to it if you have read <xref linkend="npcmacroability"> and <xref linkend="npcmacroweapspl">. The only thing you have to remember is the numbers you are putting are not the actual amount but a percentage of the skill points you want the game to use on your NPC when having your NPC practice as it loads and all amounts of abilities must add up to 100% as well as all weapons and spells must add up to 100%. For the dragon the following would be what the abilities, weapons, and spells would look like.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//big strong and magical most ability points on str and mag MSET_ABILITY(20,12,12,12,12,12,20,0)

//Set natural attack highest of weapons because he fights with claws MSET_WEAPON(10,10,10,5,30,5)

//black dragons have natural defense from acid set it highest MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>That is all you need to make a basic dragon. True this dragon will not do anything but claw you to death if you attack it but in <xref linkend="npccomplex"> we will give the dragon some more abilities with some special <ACRONYM>DIL</ACRONYM> functions. For now lets take a look at our finished product.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eyes","eye"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

race RACE_DRAGON_BLACK sex SEX_MALE height 625 weight 1250 level 70 NATURAL_DEF(WPN_CLAW, ARM_PLATE) alignment -900 MSET_ABILITY(20,12,12,12,12,12,20,0) MSET_WEAPON(10,10,10,5,30,5) MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)

end


</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you can see there is a bit more to building an NPC than a room but its really not that much harder. Try changing some stuff and make sure to practice debugging your errors the more compiling you do the better you will get. </PARA>

</SECT1>

<sect1 id="npcdebug"> <TITLE>Compiling and debugging your first NPC</TITLE>

<PARA>As we have previously mentioned in <xref linkend="rmdebug"> it is always a good idea to build one or two things and then compile to make finding errors easy. In this case we have one NPC to compile and rather than having all the rooms get in my way while compiling it I have removed them and only have the '%mobiles' section. The following is what the zone looks like when it has only one NPC in it.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOW creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%mobiles

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eye","eyes"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

race RACE_DRAGON_BLACK sex SEX_MALE height 625 weight 1250 level 70 NATURAL_DEF (WPN_CLAW, ARM_PLATE) alignment -900 MSET_ABILITY(21,12,12,12,12,12,20,0) MSET_WEAPON(10,10,10,5,30,5) MSET_SPELL(0,0,0,0,0,0,1,0,0,0,30)

end

%end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>I removed the '%rooms' section added a '%mobiles' section and stuck the dragon in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM> server for you to be able to look at it in the game. If you downloaded our example zones for this document you can compile this zone along with us and fix the errors as we do for practice. The filename is debug_npc.zon. Just so you know the errors in this zone are intentional so please don't write me an email telling me that there are errors in it.</PARA>

<PARA>The command to compile the zone is <command>VMC debug_npc.zon</command>. Here is what we get when we first try and compile the zone.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_npc.zon' debug_npc.zon: 32: parse error Token: 'extra' debug_npc.zon: 55: parse error Token: 'alignment' Compilation aborted. </PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This error file doesn't look any harder than the last one we dealt with when compiling our first room. The problem is when we go to line '32' and look for an error we don't find one. This normally means that the error was hard for the compiler to figure out. The best way to deal with an error like this is to start at the line it gives you and go up and look for an error. When we do this we notice that the extra right above the line that the error is on is missing '{}' so we will add them back in. Most of the time you want to do one error and recompile but sometimes you can shorten the process for example in this error file the word 'alignment has been spelled wrong so we can fix that before we recompile so go to line '56' and fix that. Now with those two errors fixed we can recompile and this is what we get:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_npc.zon' FATAL: Abilities in 'bldragon' sums up to 101,and not 100. FATAL: Spells&weapons in 'bldragon' sums up to 101, and not 100. WARNING: Fatal errors in zone.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As we have said before you have to make sure that abilities add up to 100 percent this error is telling us that my math sucks and that I have added 1 extra percent to the abilities. Not only that but again if we look at both errors I have also put 1 extra on weapons and spells. So we can fix both of these at once. Notice it doesn't give a line number but that is not a problem because you can search for 'MSET_ABIL' and it will take you right to the problems. After I subtract one from the abilities and one from either the spells or weapons the following is the error file I get.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_npc.zon' <ACRONYM>VMC</ACRONYM> Done.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means that you have now successfully compiled the zone. The main thing I want to point out is that you can sometimes fix more than one error at a time but be carefull when doing this if you try to fix some errors before fixing the first you will be trying to fix things that are not broken. The safest way to compile stuff is still fix one error at a time.</PARA>

<PARA>Now that you have a compiled zone you should check and make sure that all the files are there. When you compile a zone you will end up with three extra files. the files will have the same filename as your zone with a new extension in this case you should have the following.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

debug_npc.data debug_npc.err debug_npc.reset debug_rm.zon

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you have all of these you are all set to go. If not then there is something seriously wrong and you may want to write the <ACRONYM>VME</ACRONYM> staff for help.</PARA>

<PARA> To get your new zone in the mud all that is needed is to make sure your zone is in the zonelist in the <ACRONYM>VME</ACRONYM> etc directory and copy these files into your zone directory. Then reboot the mud. You should be able to log on your builder character and load your NPC by typing <command>load bldragon@dragonst</command> and you can list your zones NPCs by typing <command>wstat zone dragonst mobiles</command>.</PARA>

<PARA>There you go you have now compiled your first NPC. As you can see with as little as you have learned so far you can already make a variety of monsters and NPCs of any kind. The next section will cover the <ACRONYM>DIL</ACRONYM> functions you can use with a NPC and then we will get right into some more complex examples.</PARA> </sect1>

<sect1 id="npcdilfunc"> <TITLE><ACRONYM>DIL</ACRONYM> functions for NPCs</TITLE>

<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own special functions on rooms, NPCs, objects, PCs, and much more. This manual is for basic zone writing and therefore will not go into how to write your own <ACRONYM>DIL</ACRONYM> functions. The <ACRONYM>VME</ACRONYM> however is released with many functions for you as an Administrator and your builders to use to make special rooms, NPCs, and objects. The following is a list of all NPC functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>

<variablelist id="var-npcfunc"> <VARLISTENTRY> ;Mercenary <DICTDEF> <PARA><indexterm> <primary>Mercenary NPC function</primary> </indexterm></PARA> <PARA> This function allows you to make an NPC hireable by players in the game. You simply dilcopy this unto a mob and the player can then type 'contract <character name> and the mob will hunt that char for a fee. This function takes no special arguments. the following is the function definition found in function.zon:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin mercenary_hire();

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>To use it you simply dilcopy it to your NPC as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy mercenary_hire@function();

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Obey <DICTDEF> <PARA><indexterm> <primary>Obey NPC function</primary> </indexterm></PARA>

<PARA>This function when dilcopied on the NPC will make it obey there master. And example mobile of this is the familiar. Upon completing a small quest a Mage receives a familiar that will obey that player and that player only. The player can simply type <command>Tell <familiar name> cast heal <player name></command> and it will carry out the command. This function takes no arguments. The following is the definition found in function.zon:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin obey();

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>To use this function simply dilcopy it to the NPC you want to be a mercenary like so:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy obey@function();

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Evaluate <DICTDEF> <PARA><indexterm> <primary>Evaluate NPC function</primary> </indexterm></PARA>

<PARA>This function when placed on an NPC allows it to evaluate items for a fee. The function definition looks as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin evaluate (amt:integer);

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>The function has one argument 'amt' that lets you set the cost of the evaluation of items. If you wanted to set the value to four gold it would work just like when setting the money field and look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy evaluate@function(4*GOLD_PIECE);

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Guard Direction <DICTDEF> <PARA><indexterm> <primary>Guard Direction NPC function</primary> </indexterm></PARA> <PARA> This is an enhanced version of the Guard Way Function. It will allow both certain players to enter as well as certain mobs. An optional stop <ACRONYM>DIL</ACRONYM> can be supplied if you wish to do something special. It takes two arguments, the activator and the direction. The following is the function definition:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin guard_dir(direction : string, excludepc : stringlist, excludenpc : stringlist, stopdil : string);

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>This function is dilcopied onto the mob in the room that the mob is initially loaded. Thus is the mob is summoned or commanded away it will not block the directions until it is back to where it was first created. This <ACRONYM>DIL</ACRONYM> takes four arguments. The first is the direction to block. The second arguments is for those PC's you wish to allow to pass in that direction without being stopped. The next for the NPCs you wish to allow to pass. The last is the 'act you wish the blocking mob to display to the PC's that are blocked from proceeding in the selected direction. The third and forth arguments may be 'null', this will pass the defaults to the dilcopy. The third argument is a stringlist that tells which players or NPCs are excluded from the guard. The forth is a <ACRONYM>DIL</ACRONYM> you can pass in to do something special to people who are stopped. We will not show how to use the forth argument because it takes more <ACRONYM>DIL</ACRONYM> knowledge than this manual covers. The following would be a valid dilcopy for this function:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy guard_dir@function("south", {"papi", {"rejji"}, null, null);

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;Combat magic <DICTDEF> <PARA><indexterm> <primary>Combat magic NPC function</primary> </indexterm></PARA> <PARA>This function when placed on a mobile allows it to use any of the combat spells. The function definition is as follows: It also allows the NPC to cast heal during combat on itself. </PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin combat_mag(atk_spl : string, def_spl : string, def_pct:integer, spd: integer);

</PROGRAMLISTING></INFORMALEXAMPLE>

<TITLE>Combat magic arguments</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>argument</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>atk_spl</ENTRY> <ENTRY>string</ENTRY> <ENTRY>Attack spell ie "fireball" or "" for none</ENTRY> </ROW> <ROW> <ENTRY>def_spl</ENTRY> <ENTRY>string</ENTRY> <ENTRY>Defense Spell ie "heal" or "" for none</ENTRY> </ROW> <ROW> <ENTRY>def_pct</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>At what % of hitpoints defense spell will be cast</ENTRY> </ROW> <ROW> <ENTRY>spd</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>speed at which mob will uses its attack magic, 1 for all at once (every round) to 5 for every 5 rounds. I suggest 2.</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>Defense spells take priority when the hit points fall below the % specified, after (if) the hits have been restored above that number attack magic will resume. If def_spl is used, function automatically makes sure that it retains enough mana for at least one healing, ie it will attack 4 times if it don't need a healing. The following would be an example of what you would put on your NPC:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy combat_mag@function ("harm", "heal", 25, 2);

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Fido <DICTDEF> <PARA><indexterm> <primary>Fido NPC function</primary> </indexterm></PARA> <PARA>This function turns the NPC into a corpse eating mobile. The following is the functions definition:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin fido(txt1:string,txt2:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<TITLE>Fido arguments</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>Argument</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>txt1</ENTRY> <ENTRY>string</ENTRY> <ENTRY>The text shown when mob finds and eats corpses, default: 'XXX savagely devours a corpse.' will be shown if txt1 is set to "". If txt1 is set to "stop", the mob will NOT devour corpses (convenient if you want your dogs to only eat food leftovers but not corpses). </ENTRY> </ROW> <ROW> <ENTRY>txt2</ENTRY> <ENTRY>string</ENTRY> <ENTRY> The text shown when mob finds and eats ITEM_FOOD, default: 'XXX hungrily devours YYY.' will be shown if txt2 is set to "". If txt2 is set to "stop", the mob will NOT devour ITEM_FOOD (convenient if you want to make a corpse-eating ghoul, who'd choke on normal food, etc). </ENTRY> </ROW> </TBODY></TGROUP>

<NOTE><PARA>In both cases $1n is the mob itself, $2n is the title of the item devoured.</PARA></NOTE>

<PARA>An example of the 'fido' function on an NPC would look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy fido@function("$1n slowly devours $2n, crunching the bones.", "$1n grabs $2n and hungrily munches it.");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Wander zone <DICTDEF> <PARA><indexterm> <primary>Wander zone NPC function</primary> </indexterm></PARA> <PARA>This function allows a mob to wander around more than one zone, but not all zones. You specify what zones the mob can wander. Has optional intelligence which allows the opening and closing of doors. The following is the function definition:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin wander_zones(zones : string, spd : integer, doors : integer, lckd_doors : integer);

</PROGRAMLISTING></INFORMALEXAMPLE>

<TITLE>Zone wander arguments</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>argument</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>zones</ENTRY> <ENTRY>string</ENTRY> <ENTRY>A string of zone names separated by spaces.</ENTRY> </ROW> <ROW> <ENTRY>spd</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>The speed (in seconds) at which the mob wanders. Minimum = 5 secs (for process time).</ENTRY> </ROW> <ROW> <ENTRY>doors</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>Can open/close doors (0 = false, 1 = true)</ENTRY> </ROW> <ROW> <ENTRY>lckd_doors</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>Can open/closed locked doors (0=false, 1=true)</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>The options are not too hard so we will show how to use it and leave it at that</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy wander_zones@function ("halfzon haon_dor", 5, 1);

</PROGRAMLISTING></INFORMALEXAMPLE> <NOTE><PARA>@loadzone option which is used by inputting @loadzone somewhere in the zones string will replace it by the zone the mob is loaded in like this: <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy wander_zones@function ("halfzon haon_dor @loadzone", 5, 1);

</PROGRAMLISTING></INFORMALEXAMPLE></PARA> </NOTE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Global wander <DICTDEF> <PARA><indexterm> <primary>Global wander NPC function</primary> </indexterm></PARA> <PARA>This is similar to wander_zones because it's just a modified version of it, which requires no zones argument since it moves in all zones. The following is the function definition:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin global_wander(spd : integer, doors : integer, lckd_doors :integer);

</PROGRAMLISTING></INFORMALEXAMPLE>

<TITLE>Global wander arguments</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>argument</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>spd</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>The speed (in seconds) at which the mob wanders. Minimum = 5 seconds (for process time).</ENTRY> </ROW> <ROW> <ENTRY>doors</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>Can open/close doors (0 = false, 1 = true)</ENTRY> </ROW> <ROW> <ENTRY>lckd_doors</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>Can open/closed locked doors (0=false, 1=true)</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>The options are not to hard so we will show how to use it and leave it at that</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy global_wander@function (60, 1, 1);

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Team work <DICTDEF> <PARA><indexterm> <primary>Team work NPC function</primary> </indexterm></PARA> <PARA>This function when placed on a mob, located in the same room as another mob, will allow the mobile to assist the other in combat. The following is the function definition:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin aware teamwork(lst: string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This function takes one argument which is a string of the mobiles it is to protect. So if we wanted a NPC to protect both Jesper and Enver the dilcopy would look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy teamwork@function("jesper/enver");

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA>For this to work both mobs must be in the same room or following each other.</PARA></NOTE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Rescue <DICTDEF> <PARA><indexterm> <primary>Rescue NPC function</primary> </indexterm></PARA> <PARA>This function when placed on a mob, located in the same room as another mob, will allow the mobile to rescue the other mob if it is attacked. The function is as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin aware rescue(lst: string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This function takes one argument, a string of those mobiles you wish this NPC to assist should they be attacked.</PARA>

<NOTE><PARA> For this to work both NPCs must be in the same room or following each other.</PARA></NOTE>

<PARA>Again we will use our test subjects Jesper and Enver and if we wanted an NPC to protect them and come to their aid the following would be the dilcopy:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy teamwork@function("jesper/enver");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Agressive <DICTDEF> <PARA><indexterm> <primary>Agressive NPC function</primary> </indexterm></PARA> <PARA>This function makes a Mob hostile to person(s) in the room with it, under certain conditions which are provided as arguments. In short, the all-singing, all-dancing aggression <ACRONYM>DIL</ACRONYM>. The following is this functions definition:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin aggressive (sx : integer, rce : integer, opp : integer, levl : integer, sanc : integer, tme : integer, tar : integer, align : string, attack : stringlist);

</PROGRAMLISTING></INFORMALEXAMPLE>

<TITLE>Agressive arguments</TITLE> <TGROUP align=left cols=3 colsep=1> <THEAD> <ROW> <ENTRY>argument</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>sx</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>NOTE: not the sex values in values.h. This decides the sex of your mob's victim. 0 - Sex doesn't matter, 1 - Attack opposite sex to self (if not neutral!), 2 - Attack SEX_MALE, 3 - Attack SEX_FEMALE, 4 - Attack SEX_NEUTRAL. </ENTRY> </ROW> <ROW> <ENTRY>rce</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>Any of the PC races from 0 to 14. A value of -1 means we don't care about the victim's race. </ENTRY> </ROW> <ROW> <ENTRY>opp</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>0 - Non race specific (same as rce := -1) 1 - Attack the specified rce, 2 - Attack any pc race _but_ the specified rce. </ENTRY> </ROW> <ROW> <ENTRY>levl</ENTRY> <ENTRY>integer</ENTRY> <ENTRY> Allow level specific aggression. A value of 30 would make the mob hostile to all pcs level 30 and above. A value of -30 (note the -) would make the mob hostile to all pcs level 30 or below. A value of 0 means level doesn't matter. </ENTRY> </ROW> <ROW> <ENTRY>sanc</ENTRY> <ENTRY>integer</ENTRY> <ENTRY> Does this mob obey the sanc/soothe rules? (ie, if someone has cast sanctuary on themselves, will this mob recognize it, and not attack, or attack anyway). 0 - Doesn't obey sanc or soothe 1 - Obeys only sanc 2 - Obeys only soothe 3 - Obeys both sanc and soothe (SOOTHE is a new spell for ranger's guild) </ENTRY> </ROW> <ROW> <ENTRY>tme</ENTRY> <ENTRY>integer</ENTRY> <ENTRY>Time in ticks to wait before attacking (is automatically put to RANTIME, ie, time variance of time-time/2 to time+time/2). Values accepted are from 0 to 400 (that's 0 - 100 seconds. Can be specified using PULSE_SEC). </ENTRY> </ROW> <ROW> <ENTRY>tar</ENTRY> <ENTRY>integer</ENTRY> <ENTRY> This is a special value which determines which of the eligible victims we pick. -2 - Last eligible victim to into the room. -1 - Weakest eligible victim in room. 0 - Random eligible victim. +1 - Strongest eligible victim in room. +2 - First eligible victim into the room. </ENTRY> </ROW> <ROW> <ENTRY>align</ENTRY> <ENTRY>string</ENTRY> <ENTRY> The desired alignment of the victim. "ANY" - We don't care about the alignment. "GOOD" - Attack only good alignment. "EVIL" - Attack only evil alignment. "NEUTRAL " - Attack only neutral alignment. "OPPOSITE" - Attack opposite alignment to self (provided self isn't neutral). "SALIGN" - Attack same alignment as self. "DALIGN" - Attack any alignment different to self. </ENTRY> </ROW> <ROW> <ENTRY>attack</ENTRY> <ENTRY>stringlist</ENTRY> <ENTRY> This is a 2 string stringlist. These are the messages sent to the people in the room except the victim, and the victim itself, in that order. If the second (victim) string is "", the first string will be shown to the victim, as if they were anyone else in the room. You can leave both blank if you wish. $1n is the mob name (self), $3n is the victim's name. NOTE: the $ values only apply if you supply BOTH string 1 and 2. </ENTRY> </ROW> </TBODY> </TGROUP>


<PARA>The argument descriptions pretty much explain everything there is to know about the agressive function and what it was so we will finish off by giving an example of a dilcopy that will create a NPC that fits the following description</PARA>

<PARA>Let's say our mob is a level 40 Goblin who doesn't like dwarves. He's very particular in that he doesn't like evil female dwarves who are level 20 and above. He does recognize the sanctuary spell, but he doesn't recognize soothe, and he'll wait 10 seconds on average before he attacks. The 2 messages sent are: "$1n savagely attacks $3n with his big axe!" and "$1n attacks you!"</PARA>

<PARA>Here's what the function call would look like:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy aggressive (3, 2, 1, 20, 2, PULSE_SEC*10, 0, "EVIL", {"$1n savagely attacks $3n with his big axe!", "$1n attacks you!"});

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>In this example, 3 (attack females), 2 (attack dwarves), 1 (just dwarves), 20 (Level 20+ victims), 2 (obey only soothe), PULSE_SEC*10 (wait around 10 seconds before attacking), EVIL (attack only evil), and the strings in the stringlist are displayed to the victim and the room, in that order.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Janitors <DICTDEF> <PARA><indexterm> <primary>Janitors NPC function</primary> </indexterm></PARA>

<PARA>This function turns the NPC into a janitor that will pick up items left lying around and will also tell new players. those under level 20, where there corpse is if they come across it in there wanderings. You must also supply the wander_zone <ACRONYM>DIL</ACRONYM> for this to work correctly. The definition for the janitor function is as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin janitors(rate: integer);

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>The Janitor function only takes one argument and that determines how fast the janitor will pick up stuff in seconds.</PARA>

<PARA>To make a Janitor that will pick up stuff every thirty seconds the following would be the dilcopy:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy janitor@function(30);

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Shop Keeper <DICTDEF> <PARA><indexterm> <primary>Shop Keeper NPC function</primary> </indexterm></PARA> <PARA>This is one of the more complex dilcopies and considered by some to be confusing. Below I will step you through the creation of the mobile, and the application of this <ACRONYM>DIL</ACRONYM> using defines to hopefully simplify the use of this function. The function is defined as:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin aware shopkeeper(prod: stringlist, custom_acts : stringlist, opentimes : stringlist, itemtype: string, sellprofit : integer,buyprofit: integer, maxcash : integer,closedil : string, dilparams : string );

</PROGRAMLISTING></INFORMALEXAMPLE>

<VARIABLELIST> <VARLISTENTRY> ;Step 1 <DICTDEF> <PARA>First, figure out what you want your shopkeeper to sell. He can sell pretty much any item from any zone, as long as you know its symbolic name. For Hogan (our example shopkeeper), he is a bartender, so he sells things you would commonly find in a pub, tavern, or bar. His list of items (their symbolic names at which zone) are:</PARA>


<INFORMALEXAMPLE><PROGRAMLISTING>

grain_alcohol@gobtown1 pretzels@gobtown1 beer_nuts@gobtown1 rum_coke@gobtown1 tuborg@udgaard

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now, since I use defines, I make a define for Hogan's products. I called it TAVERN_PROD (for tavern's products). And use the following setup and just stick the names of your items in where his items are. Each item will have a setup like this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

"tuborg@udgaard 15 20"

</PROGRAMLISTING></INFORMALEXAMPLE>


<PARA>A symbolic name followed by two numbers, with the entire thing in quotes. Where :</PARA>

<itemizedlist> <LISTITEM><PARA>The "tuborg@udgaard" is your item's symbolic name</PARA></LISTITEM> <LISTITEM><PARA>The 15 (our first number in the string) is the number of that item that will load into your shop daily</PARA></LISTITEM> <LISTITEM><PARA>The 20 (our second number in the string) is the limit available of that item in the shop ever</PARA></LISTITEM> </itemizedlist>

<PARA>So this shop would sell tuborgs.. and every mudday, 15 tuborgs will load into our shop to replenish our stock.. and the maximum tuborgs we can have at any given time is 20.</PARA>

<PARA>Next we place all this info into the define we created above, which would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_PROD \ {"grain_alcohol@gobtown1 15 20", \ "pretzels@gobtown1 10 15", \ "beer_nuts@gobtown1 15 20", \ "rum_coke@gobtown1 10 15", \ "tuborg@udgaard 15 20"}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The above is my define for Hogan's products that he sells. Each one is in quotes and they have commas separating them. If you put each item on its own separate line, you need to put a space and then a back slash after the comma which separates the items, like it shows above. The entire define is enclosed in curly brackets, {}. Now we are finished with the items he sells.</PARA> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;Step 2 <DICTDEF> <PARA>Now you must decide what kind of dialogue you would like your shopkeeper to say. There are ten separate responses you can make for your shopkeeper. They do go in a specific order and I will list what each do.</PARA> <VARIABLELIST> <VARLISTENTRY> ;Response 1 <DICTDEF> <PARA>The first response will be used if the shopkeeper doesn't have the particular item you're trying to buy in stock, or if he doesn't sell that item at all.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 2 <DICTDEF> <PARA>The second response is used when the player is trying to sell the shopkeeper something which the player does not have in his inventory. Items worn by the player can not be sold until removed from there worn position.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 3 <DICTDEF> <PARA>The third response is used when the player is trying to sell the shopkeeper something that is not one of those of his trade types. (This will be more clear when we get to the trade type part below. Such as a player trying to sell our bartender a canoe. =)</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 4 <DICTDEF> <PARA>The fourth response is used when the player tries to buy something from the shopkeeper, but doesn't have enough money to buy it.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 5 <DICTDEF> <PARA>The fifth response is used when the sale was successful and the player buys something from the shopkeeper.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 6 <DICTDEF> <PARA>The sixth response is again used when the sale was successful, but this time it's for when the player successfully sells something to the shopkeeper.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 7 <DICTDEF> <PARA>The seventh response is used when the shopkeeper doesn't have enough of the item to sell as the player requests. Such as someone trying to buy 10 tuborgs, but our bartender only has 9.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 8 <DICTDEF> <PARA>The eighth response is Used when the shop is closed and a player tries to buy something from or sell something to the shopkeeper.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 9 <DICTDEF> <PARA>The ninth response is used when the player tries to sell an item to the shopkeeper that the shopkeeper doesn't trade that item.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Response 10 <DICTDEF> <PARA>The tenth (and last!) response is for when the shopkeeper has run out of money and can't afford to buy what the player is trying to sell him.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>Now. again, I made a define called TAVERN_MSG (for tavern messages) and I placed all my responses in it. Don't forget, they do go in that specific order! And below is our setup with responses in it.</PARA>

<NOTE><PARA>In the responses below, $1n refers to the shopkeeper, $2n refers to the item being sold, bought, etc.. and $3n refers to the person dealing with the shopkeeper.</PARA></NOTE>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_MSG \ {"$1n says, 'This is a tavern, I don't sell such an item as that!'", \ "$1n says, '$3n, you don't even have that!'", \ "$1n says, 'I don't trade with things such as $2n! Just buy a beer!'", \ "$1n says, '$3n, you can't afford $2n.'", \ "$1n says, 'Thank you, $3n, here are %s for $2n.'", \ "$1n says, 'Thank you, $3n.'", \ "$1n says, 'I don't have that many $2ns in stock.'", \ "$1n says, 'I'm on break, come back later.'", \ "$1n says, 'I haven't got a use for $2n.'", \ "$1n says, 'I'd like to buy it, but I can't afford it, sorry.'"} \

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Just like with the items, the responses are in quotes, and are separated with commas. Since I put each on their own separate lines (for neatness sake), I put a space and a back slash, \, after each. The entire define is enclosed in curly braces,{}. And then you're done with your shopkeeper's messages! Don't worry, it gets simpler from here.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Step 3 <DICTDEF> <PARA>Now we get to decide when we want our shop to be open. We get to use military time, so 1 refers to 1am, 6 refers to 6am, 12 refers to 12pm (noon), 18 refers to 6pm, and both 0 and 24 refer to 12am (midnight).. etc.. =) And my define for this I named TAVERN_OPEN_TIMES (for when the tavern is open) and I used the following setup:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_OPEN_TIMES {"12","18"}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You just have to make your define and stick your times in quotes and enclose them in curly braces. So Hogan will be opened from 1am ("1") until 11pm ("23"). He will close after 11pm and reopen again at 1am. You may also add multiple open and close times as per the following example:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_OPEN_TIMES {"1","12","16","20"}

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Step 4 <DICTDEF> <PARA>For this step you get to choose your shopkeeper's trade types. And what you pick all depends on what kinds of things you want your shopkeeper to sell and buy. You can find the item types in values.h, but I'll also list them below.</PARA>

<TITLE>Sale types</TITLE> <TGROUP align=left cols=4 colsep=1> <THEAD> <ROW> <ENTRY>Value</ENTRY> <ENTRY>Type</ENTRY> <ENTRY>Value</ENTRY> <ENTRY>Type</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>1</ENTRY><ENTRY>ITEM_LIGHT</ENTRY><ENTRY>14</ENTRY><ENTRY>ITEM_TRAP</ENTRY> </ROW> <ROW> <ENTRY>2</ENTRY><ENTRY>ITEM_SCROLL</ENTRY><ENTRY>15</ENTRY><ENTRY>ITEM_CONTAINER</ENTRY> </ROW> <ROW> <ENTRY>3</ENTRY><ENTRY>ITEM_WAND</ENTRY><ENTRY>16</ENTRY><ENTRY>ITEM_NOTE</ENTRY> </ROW> <ROW> <ENTRY>4</ENTRY><ENTRY>ITEM_STAFF</ENTRY><ENTRY>17</ENTRY><ENTRY>ITEM_DRINKCON</ENTRY> </ROW> <ROW> <ENTRY>5</ENTRY><ENTRY>ITEM_WEAPON</ENTRY><ENTRY>18</ENTRY><ENTRY>ITEM_KEY</ENTRY> </ROW> <ROW> <ENTRY>6</ENTRY><ENTRY>ITEM_FIREWEAPON</ENTRY><ENTRY>19</ENTRY><ENTRY>ITEM_FOOD</ENTRY> </ROW> <ROW> <ENTRY>7</ENTRY><ENTRY>ITEM_MISSILE</ENTRY><ENTRY>20</ENTRY><ENTRY>ITEM_MONEY</ENTRY> </ROW> <ROW> <ENTRY>8</ENTRY><ENTRY>ITEM_TREASURE</ENTRY><ENTRY>21</ENTRY><ENTRY>ITEM_PEN</ENTRY> </ROW> <ROW> <ENTRY>9</ENTRY><ENTRY>ITEM_ARMOR</ENTRY><ENTRY>22</ENTRY><ENTRY>ITEM_BOAT</ENTRY> </ROW> <ROW> <ENTRY>10</ENTRY><ENTRY>ITEM_POTION</ENTRY><ENTRY>23</ENTRY><ENTRY>ITEM_SPELL</ENTRY> </ROW> <ROW> <ENTRY>11</ENTRY><ENTRY>ITEM_WORN</ENTRY><ENTRY>24</ENTRY><ENTRY>ITEM_BOOK</ENTRY> </ROW> <ROW> <ENTRY>12</ENTRY><ENTRY>ITEM_OTHER</ENTRY><ENTRY>25</ENTRY><ENTRY>ITEM_SHIELD</ENTRY> </ROW> <ROW> <ENTRY>13</ENTRY><ENTRY>ITEM_TRASH</ENTRY><ENTRY></ENTRY><ENTRY></ENTRY> </ROW> </TBODY></TGROUP>

<PARA>We are making a bartender, so he should sell food and drinks. So I selected ITEM_FOOD, and it's corresponding number is 19. So I made my define TAVERN_ITEM_TYPE (for our tavern's type of items) using the following setup:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_ITEM_TYPE "19"

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Now, if we had a magic shop, and wanted to sell potions and scrolls, I would make a define called for example MAGIC_ITEM_TYPE and make it like this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define MAGIC_ITEM_TYPE "2 10"

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>The 2 was our number corresponding to the scrolls, and the 10 corresponded to the potions. That is how you make your shopkeeper sell more than one item type, just stick the corresponding numbers inside quotes with a space separating them.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Step 5 <DICTDEF> <PARA>Now you get to decide how much money your shopkeeper gets to have to buy things with. One platinum piece is equal to 40960. So if I wanted him to have two platinum pieces to spend on buying things from players, I would make a define called TAVERN_MAX_CASH (for the maximum amount of money our shopkeeper gets) and use the following setup:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_MAX_CASH 81920

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>I got 81920 by multiplying the 40960 (one platinum) by 2</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Step 6 <DICTDEF> <PARA>The sixth thing we get to do is to decide how much profit does our shopkeeper get when he sells his items. Items should have a cost to them already tagged on them, so their whatever their cost is, that is equal to 100%. Now, if your shopkeeper wants to take an extra 10% on the items he's selling so he can support his family, then you would make his selling profit 110. So I made a define called TAVERN_SELL_PROFIT (for his profit when he sells things) and gave him 110% selling profit, and used the following setup:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_SELL_PROFIT 110

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Step 7 <DICTDEF> <PARA>This last define is almost exactly like our selling profit, but now, we're doing our buying profit... when a player sells an item to the shopkeeper, he doesn't want to pay full price because it must be used since a player has it. Now the item's cost is 100%, and maybe the shopkeeper only wants to buy items for half its cost. So I would make his buying profit 50, and use the following setup.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define TAVERN_BUY_PROFIT 50

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>All of the previous defines you can place anywhere in the zone. I like to place mine before the %<ACRONYM>DIL</ACRONYM> section just to keep them somewhere where I know they all are. You can place each one on the mob itself, but I think that looks cluttered so's why I put them where I put them. And you're going to have a dilcopy placed on your mob also, which I'll explain in step 8.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Step 8 <DICTDEF> <PARA>Okay one last step. Now you get to place the <ACRONYM>DIL</ACRONYM> on your shopkeeper mob using all of those cute little defines you just made. The syntax for the <ACRONYM>DIL</ACRONYM> is:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy shopkeeper@function(products, responses, opentimes, tradetypes, sellprofit, buyprofit, maxcash, closedil, dilparams);

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Take your defines from above the defines that you made are called:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES, TAVERN_ITEM_TYPE, TAVERN_SELL_PROFIT, TAVERN_BUY_PROFIT, and TAVERN_MAX_CASH.

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Now all you have to do is place them in the syntax where they belong like in the below example.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy shopkeeper@function(TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES, TAVERN_ITEM_TYPE, TAVERN_SELL_PROFIT, TAVERN_BUY_PROFIT, TAVERN_MAX_CASH, "", "");

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>For the last two fields, I just put "", "" because I don't make my own unique <ACRONYM>DIL</ACRONYM> for those. By just putting and empty set of quotes for each, it makes it go to the default. And make sure you don't forget that semicolon at the end either.</PARA>

<PARA>You are pretty much done now. All you have to do is place your defines either up before %<ACRONYM>DIL</ACRONYM> or somewhere in %mob if you'd like, and place the dilcopy onto your mob.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>Just to make sure I've completely beaten a very dead horse, this is what it would look like in the end.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

%zone sample_zon

#define TAVERN_PROD \ {"grain_alcohol@gobtown1 15 20", \ "pretzels@gobtown1 10 15", \ "beer_nuts@gobtown1 15 20", \ "rum_coke@gobtown1 10 15", \ "tuborg@udgaard 15 20"}

#define TAVERN_MSG \ {"$1n says, 'This is a tavern, I don't sell such an item as that!'", \ "$1n says, '$3n, you don't even have that!'", \ "$1n says, 'I don't trade with things such as $2n! Just buy a beer!'", \ "$1n says, '$3n, you can't afford $2n.'", \ "$1n says, 'Thank you, $3n, here are %s for $2n.'", \ "$1n says, 'Thank you, $3n.'", \ "$1n says, 'I don't have that many $2ns in stock.'", \ "$1n says, 'I'm on break, come back later.'", \ "$1n says, 'I haven't got a use for $2n.'", \ "$1n says, 'I'd like to buy it, but I can't afford it, sorry.'"} \

#define TAVERN_OPEN_TIMES {"1","23"} #define TAVERN_ITEM_TYPE "19" #define TAVERN_MAX_CASH 81920 #define TAVERN_SELL_PROFIT 110 #define TAVERN_BUY_PROFIT 50


%mobiles

bartender names {"hogan","goblin","bartender"} title "Hogan" descr "Hogan stands behind the bar waiting to take your order." extra {} "He looks back at you, patiently waiting for your order." M_AVG_GOBLIN(76,SEX_MALE) alignment -1000 exp 100 money 2 SILVER_PIECE, 2 COPPER_PIECE

dilcopy shopkeeper@function(TAVERN_PROD, TAVERN_MSG, TAVERN_OPEN_TIMES, TAVERN_ITEM_TYPE,TAVERN_SELL_PROFIT, TAVERN_BUY_PROFIT, TAVERN_MAX_CASH, "", ""); end

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>


</VARIABLELIST>

</sect1>


<sect1 id="npccomplex"> <TITLE>A more complex set of NPCs</TITLE>

<PARA>In the last sections you learned all the fields and how to make a basic NPC. In this section we will use the information from the last sections to create some more unique NPCs for our dragon station zone There is not a lot of new information here we will be using the DIL functions from the previous section and adding some flags to the NPCs to make them act different.</PARA>

<sect2> <TITLE>Magic casting NPC</TITLE>

<PARA>The basic Dragon we made in the <xref linkend="npcbasic"> looks like a real dragon but it is a bit boring when you fight a dragon and don't get toasted by an acid or fire spell or two. in <xref linkend="npcdilfunc"> the 'combat_magic' function was described. This is the function you use to make all NPCs cast magic while in combat. With that in mind lets take a look at how we can make our dragon a bit more interesting g.</PARA>

<PARA>Well lets see a black dragon is supposed to have the ability to either cast fire breath or acid breath depending on who you talk to. Once you learn <ACRONYM>DIL</ACRONYM> you could even make fire breath be a skill not a spell but for now we will stick with what we know. I like the acts of the acid breath spell so we will use that as the spell of choice. The NPC as we defined it before hasn't changed so the following would be the entire dragon with the combat magic function.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>


bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eye","eyes"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

race RACE_DRAGON_BLACK sex SEX_MALE height 625 weight 1250 level 70 NATURAL_DEF (WPN_CLAW, ARM_PLATE) alignment -900 MSET_ABILITY(20,12,12,12,12,12,20,0) MSET_WEAPON(10,10,10,5,30,5) MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)

//Combat Magic added. dilcopy combat_mag@function("acid breath", "", 25, 2);

end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>That is all there is to it. If you are wondering where I got the 'acid breath' part of the <ACRONYM>DIL</ACRONYM> copy all the spells names are in the spells.def or you can just pick a spell by what you would type if you wanted to cast it yourself in the game. Now if this still looks like a lot to do to make a dragon the dragon above could have been created with exactly the same information by using the composed.h and the 'M_DRAGON_BLACK_OLD' macro. If we use the macro the dragon would look like this</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eye","eyes"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

M_DRAGON_BLACK_OLD(SEX_MALE)

end </PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you can see with the second way the dragon was a lot easier to make because we let the macro set all the other values we just described the NPC and set the macro.</PARA> </sect2>

<sect2> <TITLE>A wandering janitor</TITLE>

<PARA>Our space station is nice but we wouldn't want a lot of people coming to visit if we didn't have a janitor to walk around cleaning up. Dragons most likely wouldn't be low life enough to be Janitors so I think we will leave that up to a hobgoblin. the following would be the definition of a hobgoblin wandering Janitor.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

janitor names {"ugly janitor", "janitor", "hobgoblin"} title "an ugly janitor" descr "an ugly janitor is walking around, cleaning up."

extra{} "This ugly green thing looks more goblin than hobgoblin but he seems intent on cleaning everything around him."

race RACE_HOBGOBLIN level 6 sex SEX_MALE height 130 /* cm */ weight 120 /* Pounds */ // he is sort of good for cleaning so much alignment 900

NATURAL_DEF(WPN_FIST, ARM_LEATHER) MSET_ABILITY(10,10,10,23,15,22,10,0) \ MSET_WEAPON(10,10,10,10,10,10) /* Average in everything, any wpn */ MSET_SPELL(4,2,2,2,2,2,2,6,6,6,6) /* Resistances */


//give him some money money 5 IRON_PIECE

dilcopy janitors@function(15);

// only want him cleaning the station dilcopy wander_zones@function("dragonst", 20, 1, 1);

end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Like with the dragon if we wanted to create this NPC easier we would use the Hobgoblin defines in composed.h so we don't have to fill out all the information. If we did this it would simply look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

janitor names {"ugly janitor", "janitor", "hobgoblin"} title "an ugly janitor" descr "an ugly janitor is walking around, cleaning up."

extra{} "This ugly green thing looks more goblin than hobgoblin but he seems intent on cleaning everything around him."

M_AVG_HOBGOBLIN(6, SEX_MALE)

// he is sort of good for cleaning so much alignment 900

//give him some money money 5 IRON_PIECE

dilcopy janitors@function(15);

// only want him cleaning the station dilcopy wander_zones@function("dragonst", 20, 1, 1);

end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you can see you can combine the DIL functions you learned in <xref linkend="npcdilfunc"> to make your NPC do more than one thing.</PARA>

</sect2>

<sect2 id="specteach"> <TITLE>Creating a teacher</TITLE>

<PARA>Setting up teachers on valhalla is harder and more strict formed than most things in the game. The reason is the way you set them up is to use an old form of functions called special. In the future guilds will be in <ACRONYM>DIL</ACRONYM> like everything else but for now the teachers that are released with the <ACRONYM>VME</ACRONYM> are base code. Even though the teachers are base code they still allow for you to adjust many things. The truth is you don't have to use our teachers you could code your own in <ACRONYM>DIL</ACRONYM> but many find this easier.</PARA>

<PARA>Guild teacher definitions are actually less complex than people think they are. There really are no big, mysterious secrets. The key is simply to understand the numbers and how the balance is achieved. (From here on in, GTD will refer to "guild teacher definition", and "entity" will be used to refer to the ability/spell/skill/weapon being offered by the GTD.)</PARA>

<NOTE><PARA> Using TAB characters in GTDs is a very bad idea! It will have extremely adverse effects, including causing the mud to crash. </PARA></NOTE>

<PARA>We need to tart first and explain that to use the teacher special functions you need to use a field not described anywhere else in the NPC descriptions. The field is called a 'special'. The reason the 'special' field was not included in the field descriptions is because it is being removed from the <ACRONYM>VME</ACRONYM> as soon as banks and teachers have been replaced by <ACRONYM>DIL</ACRONYM> there will be no more special functions. For now however we need to use them for the for mentioned purposes. The format for a special function is as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

special <Function define> <function arguments>

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>For teachers the function definition is 'SFUN_TEACH_INIT' and the arguments range from who can join, what the acts of the teacher are, and what the teacher teaches.</PARA>

<PARA>In the first part of a SFUN_TEACH_INIT definition, there are several pieces of important information which allow the mud to know what you are trying to provide to players. The entire set of arguments are enclosed in double quotes. So a teacher with nothing at all in it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_TEACH_INIT "<arguments go here>"

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>After the opening double quote ("), the first thing necessary is the text formatting code '&l', which tells the compiler to ignore the standard text formatting protocols for the rest of the string or until the '&f' code is given.</PARA>

<PARA>Immediately following the '&l' code, with no spaces at all, the type of entity the function will teach is defined. It is one of the following types:</PARA> <itemizedlist> <LISTITEM><PARA>abilities</PARA></LISTITEM> <LISTITEM><PARA>spells</PARA></LISTITEM> <LISTITEM><PARA>skills</PARA></LISTITEM> <LISTITEM><PARA>weapons</PARA></LISTITEM> </itemizedlist>

<PARA>The first two lines of the SFUN_TEACH_INIT looks like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_TEACH_INIT "&labilities;0;

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA>The '0;' is the end of field marker that will be used through out the teacher fields</PARA></NOTE>

<PARA>The next set of arguments to the teacher function is the acts the teacher will use when a person is trying to train. There are seven acts total and they are as follows:</PARA> <VARIABLELIST> <TITLE>Teacher acts</TITLE> <VARLISTENTRY> ;Line 1 <DICTDEF> <PARA>This line is displayed when the player makes a mistake in typing the name of an entity, whether or not it is actually offered at the teacher. </PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Line 2 <DICTDEF> <PARA>This line is similar to the first, but is usually evident of attempting to practice an entity not offered at this particular teacher. </PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Line 3 <DICTDEF> <PARA>This is the act displayed when the player has insufficient funds to practice the desired entity. </PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Line 4 <DICTDEF> <PARA>This is displayed when the player has not got enough ability or skill practice points to learn the desired entity.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Line 5 <DICTDEF> <PARA>Simply put, the player has exceeded the teacher's expertise in the offered entity and must go elsewhere to learn more, if at all possible.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Line 6 <DICTDEF> <PARA>This line is displayed when the player is either wearing magical, stat-modifying equipment or is affected by spells/skills which modify stats.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Line 7 <DICTDEF> <PARA>This line is what is shown when your armour affects you using special functions in base code. This is rare and may never be seen. In the future when the teachers are made in <ACRONYM>DIL</ACRONYM> this act may not be necessary.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>Now we can add the acts to our example it would look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_TEACH_INIT "&labilities;0; $1n tells you, 'I have never heard of such an ability.'; $1n tells you, 'I do not know how to teach this ability.'; $1n tells you, 'You haven't got %s for me.'; $1n tells you, 'You haven't got %d ability points.'; $1n tells you, 'I can not teach you any more.'; $1n tells you, 'You must be unaffected by magic, else I can't teach you.'; $1n tells you, 'Remove all equipment, please.';

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA> $1n is the substitution variable for the teacher's title (see the <ACRONYM>DIL</ACRONYM> document for more details).</PARA>

<PARA>%s is the amount of money the teacher requires to teach the entity in question.</PARA>

<PARA>%d is the amount of ability or skill practice points required to practice the given entity.</PARA>

<PARA>The standard GTD termination character, a semicolon (;) ends each act</PARA> </NOTE>

<PARA>about the actual GTDs, or the lines that actually define what the teachers teach and everything to do about how expensive and how high they teach it. A GTD is a single line, composed of several fields. The data contained in these fields determines how a particular entity is practiced.</PARA>

<PARA>Here is an example of a GTD:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

0; 100; scan ; 9; 9000; 7; 0;

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Note that it has a lot of white space in it. It is really not necessary, as the field terminators are the semicolons. This means that you could just as easily write:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

0;100;scan;9;9000;7;0;

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>When making teachers most people prefer to put the white space in to make it easier to read and find errors. A larger example would look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

0; 100; scan ; 9; 9000; 7; 0; 0; 90; consider ; 4; 4000; 5; 10; 0; 0; 100; appraisal ; 9; 4000; 5; 0; 0; 100; fleeing ; 9; 9000; 6; 12; 0;

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA> Each part of the GTD separated by a semicolon is called a field. The following is the fields and their definitions.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;Field 1 <DICTDEF> <PARA> Field 1 is the guild level. It is simply the level at which one is allowed to practice the particular entity in the guild. A level of 0 indicates that one can practice it from the beginning.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field 2 <DICTDEF>

<PARA>This is the maximum percentage one is allowed to practice the particular entity. It can be anywhere from 1 to 200. For abilities, it should be in increments of 2 (or divisible by 2), and for spells, skills, or weapons, in increments of 5 (or divisible by 5). This means that the effective minimum depends on whether the entity is an ability or a spell, skill or weapon.</PARA>

<PARA>Therefore, the minimums for abilities is 2, and the minimum for spells, skills or weapons is 5. Anything less will be automatically practiced to the effective minimum. This also means that putting an odd number for abilities will result in the player practicing an additional point, and for spells, skills or weapons, practicing up to the nearest 5.</PARA>

<PARA>For example: Percentage maximum for an ability is set for 95%. Player practices the ability, which then becomes 96%. Player then decides to practice a weapon skill. It is set to 77% maximum. After practicing, the player has 80% in the weapon. It is better to simply make the ability 96% and the weapon 80% maximum instead.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field 3 <DICTDEF> <PARA>Name of Entity</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field 4 <DICTDEF> <PARA>This is the practice cost minimum in Old gold pieces. Anything less than 10 here will simply be translated as 1 iron piece. Anything other than a number divisible by 10 is rounded up to the nearest iron piece.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field 5 <DICTDEF> <PARA>This is the practice cost maximum in old gold pieces. It is generally defined as being 1000 times what Field 4 is defined as:</PARA>

<PARA>The reason for this is because there is a scale related to the current practice percentage of the entity. The practice minimum is what the entity costs when it is at 0%, and the practice maximum is what it costs to practice it to maximum percentage.</PARA>

<PARA>It is not necessary to multiply the minimum by 1000 to define the maximum. It can be any number, as long as the maximum exceeds the minimum. Failure to do so will result in the mud crashing. It is unknown what will happen if the fields have 0 entered in them. I warn that it could be rather unpredictable.</PARA>

<PARA>Setting the maximum too high will only serve to dissuade players from practicing and indeed even playing. This is not to say you cannot make a truly powerful entity very expensive. Just make sure that the entity is worth the cost.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field 6 <DICTDEF> <PARA>This is the only necessary practice points field. It allows one to use their skill or ability practice points to increase their character's powers. This number is generally determined by the desire of the builder to make the entity easier or harder to practice, based upon the logical consideration of how this class would learn/use the entity.</PARA>

<PARA>For instance, a Fighter class would find practicing "fist" to be exceedingly easy, so they may only need 4 points to practice this skill, but on the other hand, a Mage class would not have such an experience so it may cost them 15 points to practice.</PARA>

<PARA>Don't go overboard, making this field an outrageous number will mean that no one is likely to practice the entity, mainly because of lack of points. However, like in the cost fields, it can be made expensive to reflect the power of the entity.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field 7 - X <DICTDEF> <PARA>You can repeat field 6 as many times as you want the player to be able to practice in one level so you can set a point cost each time. This is so each time they practice at a level you can make it more expensive.</PARA>

<PARA>An example of this would look as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

0; 90; consider ; 4; 4000; 5; 10; 0;

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This example has consider being practiced at guild level 0 up to 90%, costing 4 old gold pieces minimum, 4000 old gold pieces maximum, 5 practice points for the first practice per level and 10 for the second.</PARA>

<PARA> For 15 points a level, the player can practice consider twice. It is actually quite nice to be able to do this, and generally easier entities take advantage of this more often.</PARA>

<PARA>Each additional field is followed by a semicolon</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;Field X <DICTDEF> <PARA>This is the termination field for the GTD. It tells the compiler that the GTD is finished. In fact, if you set a practice point field to 0, it would consider that Field X, and end the GTD.</PARA>

<PARA>Every GTD line must have an end of field marker!</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>When we refer to old gold pieces they represent the <ACRONYM>VME</ACRONYM> money system as follows:</PARA>

<TITLE>Old to new money conversions.</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Old gold piece</ENTRY> <ENTRY>New money</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>10</ENTRY> <ENTRY>1 Iron Piece (IP)</ENTRY> </ROW> <ROW> <ENTRY>80</ENTRY> <ENTRY>1 copper piece (CP)</ENTRY> </ROW> <ROW> <ENTRY>640</ENTRY> <ENTRY>1 silver piece (SP)</ENTRY> </ROW> <ROW> <ENTRY>5120</ENTRY> <ENTRY>1 gold piece (GP)</ENTRY> </ROW> <ROW> <ENTRY>40960</ENTRY> <ENTRY>1 platinum piece (PP)</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>Of course, to finish up the entire SFUN_TEACH_INIT, you must include a closing double quotation mark ("). Failure to do so will cause no end of problems for you.</PARA>

<PARA>A finished teacher of ability function would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_TEACH_INIT "&labilities;0; $1n tells you, 'I have never heard of such an ability.'; $1n tells you, 'I do not know how to teach this ability.'; $1n tells you, 'You haven't got %s for me.'; $1n tells you, 'You haven't got %d ability points.'; $1n tells you, 'I can not teach you any more'; $1n tells you, 'You must be unaffected by magic, otherwise I can't teach you.'; $1n tells you, 'Remove all equipment, please.';

0; 100; Strength ; 4; 4000; 8; 0; 0; 90; Dexterity ; 14; 14000; 12; 0; 0; 90; Constitution ; 14; 14000; 9; 0; 0; 100; Hitpoints ; 4; 4000; 11; 0; 2; 60; Brain ; 23; 23000; 14; 0; 4; 80; Charisma ; 18; 18000; 14; 0; "

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>There are two other easy to use specials that you will want to use with your teacher. they are 'SFUN_GUILD_BASIS' and 'SFUN_MEMBERS_ONLY'.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;SFUN_GUILD_BASIS <DICTDEF> <PARA>This initializes the teacher and the only argument is the guild name</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_GUILD_BASIS "Udgaard Fighter"

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;SFUN_MEMBERS_ONLY <DICTDEF> <PARA>This simply blocks anyone who is not in the guild from practicing This means the argument is the guild name. and the act separated by a '#', an example would look as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_MEMBERS_ONLY "Udgaard fighter#$1n says, 'Buggar ye off, $3n.'"

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>Finally we will show you what a full teacher would look like with the entire specials and the NPC definition.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

jones

names {"blacksmith", "smith", "Jones"} title "Jones the blacksmith" descr "The venerable Jones Blacksmith is here." extra {} "The smith is old but his arms still retain the strength of his youth. He looks as if he has retired, but he can still put you through the drills of physical training." flags {UNIT_FL_NO_TELEPORT} romflags {CHAR_PROTECTED} //Define from composed.h M_HUMAN_WARRIOR_AXE(80, SEX_MALE)

//negative exp to discourage killing teacher exp -100

special SFUN_GUILD_BASIS GUILD_UDG_FIGHTER special SFUN_MEMBERS_ONLY GUILD_UDG_FIGHTER+"#$1n says, 'Buggar ye off, $3n.'"

special SFUN_TEACH_INIT "&labilities;0; $1n tells you, 'I have never heard of such an ability.'; $1n tells you, 'I do not know how to teach this ability.'; $1n tells you, 'You haven't got %s for me.'; $1n tells you, 'You haven't got %d ability points.'; $1n tells you, 'I can not teach you any more'; $1n tells you, 'You must be unaffected by magic, otherwise I can't teach you.'; $1n tells you, 'Remove all equipment, please.';

0; 100; Strength ; 4; 4000; 8; 0; 0; 90; Dexterity ; 14; 14000; 12; 0; 0; 90; Constitution ; 14; 14000; 9; 0; 0; 100; Hitpoints ; 4; 4000; 11; 0; 2; 60; Brain ; 23; 23000; 14; 0; 4; 80; Charisma ; 18; 18000; 14; 0; "

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2 id="specguildmaster"> <TITLE>Guild master functions</TITLE>

<PARA>When you make a guild you have to make a guild master for it. This NPC will let people join and leave the guild and it also gives titles. To create a guild master you need to use three 'special' functions. The functions you need are 'SFUN_GUILD_BASIS', 'SFUN_GUILD_MASTER', and 'SFUN_GUILD_TITLES'.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;SFUN_GUILD_BASIS <DICTDEF> <PARA>This initializes the master and the only argument is the guild name</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_GUILD_BASIS "Udgaard Fighter"

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;SFUN_GUILD_MASTER <DICTDEF> <PARA>The guild master function takes 6 arguments. Like the teacher function the arguments must be surrounded by double quotes. The strings in the arguments must be surrounded by tilde marks (~). The following is a description of the arguments and what they do.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;Line1: <DICTDEF> <PARA>The first argument on is what the guild name is. As in the teacher you need to pre-pend the '&l' symbol so the <ACRONYM>VME</ACRONYM> doesn't mess with the formatting of the string when the guild master is compiled.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

&lGuild = ~Udgaard fighter~

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <term>Line 2</term> <LISTITEM> <PARA>This argument is what quest needs to be done before the character can enter the guild.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

Guild Enter Quest = ~Fighter Proven~

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <term>Line 3</term> <LISTITEM> <PARA>This argument is the amount it costs to enter the guild in old gold pieces.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

Guild Enter Cost = 640

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <term>Line 4</term> <LISTITEM> <PARA>this argument is the quest the player must do before leaving the guild. If the player has not completed this quest the guild master will not let the player leave.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

Guild Leave Quest = ~Wimp proven~

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <term>Line 5</term> <LISTITEM> <PARA>This argument is how much old gold pieces it will cost to quit the guild. If the player doesn't have enough money the guild master will not let the player join.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

Guild Leave Cost = 3200

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <term>Line 6</term> <LISTITEM> <PARA>This argument is what guild the guild master will not accept players from. For example the following will make it so no Thief can be in the fighter guild.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

Guild Exclude Quest = ~Udgaard Thief Quitter~

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<NOTE><PARA>When we refer to old gold pieces they represent the <ACRONYM>VME</ACRONYM> money system as shown in <xref linkend="oldgold"></PARA></NOTE>

<PARA>The following is what a full 'SFUN_GUILD_MASTER' function would look like</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_GUILD_MASTER "&lGuild = ~Udgaard fighter~ Guild Enter Quest = ~Fighter Proven~ Guild Enter Cost = 640 Guild Leave Quest = ~Wimp proven~ Guild Leave Cost = 3200 Guild Exclude Quest = ~Udgaard Fighter Quitter~"

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;SFUN_GUILD_TITLES <DICTDEF>

<PARA>This function allows the player to request a title at the guild master. A title will be given every 5 levels up to level 100 so you have 20 titles you can set. The title function takes one title for male chars and one title for female chars so you have to set 40 titles.</PARA>

<PARA>The arguments of this function are easy. The first thing you do is the normal '&l' to let the <ACRONYM>VME</ACRONYM> know not to mess with this string. Then you put the guild name. Finally you follow it by the list of 40 titles. The following is the fighter guilds title list</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_GUILD_TITLES "&lUdgaard fighter the %s Swordpupil the %s Swordpupil the %s Recruit the %s Recruit the %s Sentry the %s Sentress the %s Fighter the %s Fighter the %s Soldier the %s Soldier the %s Warrior the %s Warrior the %s Veteran the %s Veteran the %s Swordsman the %s Swordswoman the %s Fencer the %s Fenceress the %s Combatant the %s Combatess the %s Hero the %s Heroine the %s Myrmidon the %s Myrmidon the %s Swashbuckler the %s Swashbuckleress the %s Mercenary the %s Mercenaress the %s Swordmaster the %s Swordmistress the %s Lieutenant the %s Lieutenant the %s Champion the %s Lady Champion the %s Dragoon the %s Lady Dragoon the %s Cavalier the %s Cavalier the %s Knight the %s Lady Knight"

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>Put all three of these functions on your NPC and your all set you have a guild master.</PARA> </sect2>

<sect2 id="specbank"> <TITLE>NPC banker</TITLE>

<PARA>The banker function is the easiest 'special' function there is to use. The following placed on an NPC will make a banker:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

special SFUN_BANK

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you see its very simple, so we will just show you a completed banker and leave it at that.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

bob

names {"Bob"} title "Bob" descr "Bob the Banker is here, sitting behind the counter." extra {} "He has a very serious look on his face."

// define from composed.h M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)

//discourage people from killing banker exp -500

flags {UNIT_FL_NO_TELEPORT}

special SFUN_BANK end

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2>


</SECT1>

<sect1 id="roomnpczone"> <TITLE>Dragon station with rooms and NPCs</TITLE>

<PARA>Now we will add the NPCs we have built to the zone from the previous chapter. This is still not complete while it does compile and you can log into your zone, you still have to load your NPCs and there are no objects. These will be added as you progress through this manual. The following is the source file so far.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOW creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%rooms

chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. It is unbelievably large the ceiling seems to be a good 200 meeters high and the room is perfectly cubic. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. large passages lead of to the west and the east.."

extra {"chair","chairs"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intellegence looking dragon is sitting perched on a large chair watching you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}


west to disposal_room descr "You see a small room.";

east to hallway descr "You see what looks to be a hallway.";

end

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom. The hallway seems to be dust free. The walls and the floors seem to be made out of the same sterile metal-plastic that all space agencies uses. There are large plate glass windows that open up into space. The hallway is filled with a dim light that seems to come from everywhere yet no where all at once. You notice a glimmer of bright light coming from the windows. To the east you see an air lock and to the west the hallway opens up into a larger room."

extra {"windows","window"} "Your eyes are drawn to a large ship lit up with running lights sitting about 1 kilometer from the station."

extra{"floor","walls","wall"} "Well what can be said it looks to be in perfect condition. What else would you want to know?"

extra {"large ship" ,"ship"} "The ship looks really big and is shaped like a dragon. The scales sparkle and seem to be multiple colors."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station. The room is as large as the other rooms big enough for Dragons to lounge while still having a desk in one corner small enough for a humanoid. The floor along the north wall is lined with some kind of fabric and seems very soft to walk on, it may be some kind of dragon lounge judging by how large an area it covers. There is a passage to the west."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"paintings","painting"} "The paintings are of many dragons and riders in all kinds of tasks from combat to look out. All the figures seem to be staring at a staff being held by a depiction of a wizard on the south wall."

extra {"wizard","staff"} "The wizard has his hand stretched out and it seems there is a place you can almost grab the staff. Maybe if you searched the staff you would find it."

extra {"desk"} "Its a desk alright but there doesn't seem to be any drawers and it seems totally empty."

extra{"fabric"} "Wussshhhhh you bound across the comfortable floor wasn't that fun."

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

SECRET_DOOR_DIFFICULTY(SOUTH, 50) south to portal_room descr "You see what looks to be a portal room." keyword {"air lock door","air lock","staff","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};

end

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"} "The field looks to be a green fog shifting and churning as you watch. if you are nuts you could probably enter it."

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

//A link to the portal is also here from room_port end

ship_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in ship

dilcopy force_move@function( //Time to activation 4, //room and act "portal_room@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

room_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you." movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in portal_room

dilcopy force_move@function( //Time to activation 4, //room and act "ship@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

disposal_room title "Red field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a red field right in the center. there is a door that leads to another room to the east."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"red field","field"} "The field looks to be a red fog shifting and churning as you watch. if you are nuts you could probably enter it."

east to chamber descr "You see the main chamber.";

//A link to the portal is also here from dis_port end

dis_port names {"red field","field"} title "Red field" descr "Red Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS} dilcopy force_move@function( //how fast to force move in seconds 4, //room to force move to and act "deathspace@dragonst!You feel your body dissolving for lack of a better description.", //true or false random move or not 0); in disposal_room

end

ship title "War dragon" descr "Blue light softly glows from con duets that line the walls of this ship. The floors beside the east and west wall have what looks to be soft fabric covering. The south wall has small controls that seem to be made for humanoids with two small chairs that look to be pilot seats. view portals are about 50 meters up the side of the ship on the west and east wall and some kind of electronic screen covers the south wall. The ship seems to be a one room ship but there is a green field by the north wall."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"view port"} "Sorry your not 50 meters tall maybe it is made for a dragon?"

extra {"view screen","screen"} "It seems to be the pilots view screen but you can't seem to see a way to turn it on."

extra {"controls","control"} "The controls are in some weird language and your afraid if you start pushing buttons you might rocket in to the station or worse slam into a planet."

extra {"soft fabric","fabric"} "It looks to be a dragon lounge area."

//A link to the portal is also here from ship_port end

deathspace title"Open space" descr "You see the ship and the station far off in the distance and you are in Space!"

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

dilcopy death_room@function ( //how often is damage done 4 would be 1 second 4, //damage 400, //act for the damage. "You realize to late that was the trash disposal transporter and you feel your lungs explode.");


end

%mobiles

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eye","eyes"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

M_DRAGON_BLACK_OLD(SEX_MALE)

end

janitor names {"ugly janitor", "janitor", "hobgoblin"} title "an ugly janitor" descr "an ugly janitor is walking around, cleaning up."

extra{} "This ugly green thing looks more goblin than hobgoblin but he seems intent on cleaning everything around him."

M_AVG_HOBGOBLIN(6, SEX_MALE)

// he is sort of good for cleaning so much alignment 900

//give him some money money 5 IRON_PIECE

dilcopy janitors@function(15);

// only want him cleaning the station dilcopy wander_zones@function("dragonst", 20, 1, 1);

end

bob

names {"Bob"} title "Bob" descr "Bob the Banker is here, sitting behind the counter." extra {} "He has a very serious look on his face."

// define from composed.h M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)

//discourage people from killing banker exp -500

flags {UNIT_FL_NO_TELEPORT}

special SFUN_BANK end





%end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect1>

<sect1 id="npcexer"> <TITLE>Suggested NPC exercises</TITLE>

<orderedlist> <LISTITEM> <PARA>Using the <ACRONYM>DIL</ACRONYM> function for team work found in <xref linkend="npcdilfunc"> create a guard that will help all other guards. </PARA> </LISTITEM> <LISTITEM> <PARA>Using the <ACRONYM>DIL</ACRONYM> function for rescue found in <xref linkend="npcdilfunc"> add to your guard from exercise one and make it so will now rescue as well as help. </PARA> </LISTITEM> <LISTITEM> <PARA>Using the shop keeper function from <xref linkend="npcdilfunc">; make a shop keeper that sells two types of food. The shop keeper should make 5 of them a day and it should only buy items of the food type. For all other arguments be creative.</PARA> </LISTITEM> <LISTITEM> <PARA>Using the shop keeper you created from exercise three, turn your shop keeper into a global wondering sales person. </PARA> </LISTITEM> <LISTITEM> <PARA>Using the <ACRONYM>DIL</ACRONYM> function for agressive found in <xref linkend="npcdilfunc"> create a Dwarf agressive to any Orc that walks into the room.</PARA> </LISTITEM> </orderedlist>

</SECT1>


</chapter>

<chapter ID="ch-06"><?dbhtml filename="ch06.html"> <TITLE>The objects section</TITLE>

<PARA>The previous chapters would be enough for you to create an entire game of nudists with no technology and no items of any kind. This of corse would be a very boring game of naked people fighting with no weapons. don't worry the <ACRONYM>VME</ACRONYM> has a solution to this you can build objects to dress up the NPCs and to fill the rooms with cluttered junk.</PARA>

<PARA>In order to get started building objects you should first be aware of the object fields you can use. The <xref linkend="objfields"> shows a full listing of all the object fields and their types as defined in <xref linkend="ch-03">.</PARA>

<TITLE>Object fields and types</TITLE> <TGROUP align=left cols=5 colsep=1> <COLSPEC COLNAME="c1" COLWIDTH="2in"> <COLSPEC COLNAME="c2" COLWIDTH="2in"> <COLSPEC COLNAME="c3" COLWIDTH=".5in"> <COLSPEC COLNAME="c4" COLWIDTH="2in"> <COLSPEC COLNAME="c5" COLWIDTH="2in"> <THEAD> <ROW> <ENTRY COLNAME="c1">Field</ENTRY> <ENTRY COLNAME="c2">Type</ENTRY> <ENTRY COLNAME="c4">Field</ENTRY> <ENTRY COLNAME="c5">Type</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY COLNAME="c1">symbolic name</ENTRY> <ENTRY COLNAME="c2">Symbol</ENTRY> <ENTRY COLNAME="c3" morerows=10></ENTRY> <ENTRY COLNAME="c4">affect</ENTRY> <ENTRY COLNAME="c5">affect function</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">names</ENTRY> <ENTRY COLNAME="c2">Stringlist</ENTRY> <ENTRY COLNAME="c4">dilbegin or dilcopy</ENTRY> <ENTRY COLNAME="c5">function pointer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">title</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">key</ENTRY> <ENTRY COLNAME="c5">String</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">descr</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">open</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">inside_descr</ENTRY> <ENTRY COLNAME="c2">String</ENTRY> <ENTRY COLNAME="c4">manipulate</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">extra</ENTRY> <ENTRY COLNAME="c2">Structure</ENTRY> <ENTRY COLNAME="c4">spell</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">minv</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">value</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">alignment</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">cost</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">flags</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">rent</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">weight</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">type</ENTRY> <ENTRY COLNAME="c5">Integer</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">capacity</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4">end tag</ENTRY> <ENTRY COLNAME="c5">Symbol</ENTRY> </ROW> <ROW> <ENTRY COLNAME="c1">light</ENTRY> <ENTRY COLNAME="c2">Integer</ENTRY> <ENTRY COLNAME="c4"></ENTRY> <ENTRY COLNAME="c5"></ENTRY> </ROW> </TBODY></TGROUP>

<PARA>Many of the same fields you found in rooms and NPCs, as you can see from <xref linkend="objfields">, can also be found in objects. The fields do not always have exactly the same use when coding rooms, NPCs, and objects but they are normally set in the same manor. It is very important that you read and understand the differences of each field as they pertains to rooms, objects, and or NPCs.</PARA>

<sect1 id="objfielddescr"> <TITLE>Description of object fields</TITLE>


<variablelist id="var-objfields"> <VARLISTENTRY> ;symbolic name <DICTDEF> <PARA><indexterm> <primary>Object symbol</primary> </indexterm></PARA>

<PARA>The rules of the symbols has been explained in <XREF LINKEND="ch-03">, if you didn't read them yet you may want to review. The important thing to realize with the object symbol is it is always good practice to give the object a symbol that resembles the title and description so administrators and builders can use the <command>load</command> and the <command>wstat</command> to easily locate, examine, and load the object in question. </PARA>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;title <DICTDEF> <PARA><indexterm> <primary>Object title</primary> </indexterm></PARA>

<PARA>The object title is what is shown if the object is being picked up, dropped, given to someone, when you do the inventory command, , or being used in combat. there should be no punctuation in the object title because of how it is used in the <ACRONYM>VME</ACRONYM> server. If you add punctuation or forget to capitalize something that the <ACRONYM>VMC</ACRONYM> thinks you should it will give you a warning when you compile. The following are good examples of an object title.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

title "a big rock" title "the flame tongue" title "a lap top" title "a garbage bag" title "an oval hover car"

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY> <TERM>descr</term> <LISTITEM> <PARA><indexterm> <primary>NPC description</primary> </indexterm></PARA>

<PARA>The description field is what the player sees when walking into the room or when looking with no arguments. It is good practice to make this no longer than one line not counting the 'descr' tag.</PARA>

<PARA>Some examples of the object description field would be as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

descr "a green bloody sword is laying here."

descr "A massive wooden round table sits here."

descr "a funny looking hammer is laying here."

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY> <VARLISTENTRY>

;names <DICTDEF> <PARA><indexterm> <primary>NPC names</primary> </indexterm></PARA>

<PARA>The object names are as important as the NPC names. They are what you act on when picking the object up, dropping it, throwing it, just about anything you do to objects use these name fields. On drink containers you add the liquid name at the end, so people can drink the liquid. You always need to make sure you put every possible name that the player may use to examine or take your item. The rule of thumb is if it is in the title or description it should be in the names list. conversely if it is not in the title or description it shouldn't be in the names list because the players will not use it if they don't know about it.</PARA>

<PARA>The following is some examples of good 'names' fields with respect to their 'title' and 'descr'.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

title "a big rock" descr "a big rock is here blocking the road." names {"big rock","rock"}

title "an old twisted staff" descr "An old twisted staff has been discarded here." names{"old twisted staff","twisted staff","old staff","staff"}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The idea of course is to make any combination that a player may type to try and act upon your object. You would not want to describe and title your object with an entirely different theme than you created its names with because a player would not know what it is called.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;inside_descr <DICTDEF> <PARA><indexterm> <primary>Object inside_descr</primary> </indexterm></PARA>

<PARA>The inside description is what a player sees if it is inside the object. This is used for things like Coffins or boxes or boats that a player can climb inside. The inside description is defined the same way the normal description is but you can make it as many lines as you want like you would with a room description.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

inside_descr "You are inside a black coffin with a red velvet padding - scary!"

inside_descr "You are inside the pink time machine. a small control panel is on the floor and seems to be operated by stepping on it."

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;extra <DICTDEF> <PARA><indexterm> <primary>Object extra</primary> </indexterm></PARA>

<PARA>The extra's on the object like the NPC, can be used to do many things. It can be used to store information for <ACRONYM>DIL</ACRONYM> programs or it can be used to show a part of the object like the room extras show a part of the room. They can even be used to create new acts when a person picks the item up, drops, or enters it.There is also a special extra that is the object's description when you look at it with the look <object> command.</PARA>

<PARA>Lets go over the object description extra first. If you use an extra with no names list it will become the object's description when you look at any of the names on it.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

extra {} "Its just a rock nothing special about it."

extra {} "The ice cube is about 40 meters perfectly cubed. It seems to be melting slightly but waiting for it to finish would be sort of like waiting for the ice age to end."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You can also use extras to show parts of the object.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

extra {"crack"} "There is a big crack in the side of the ice cube. Maybe if you mess with the crack you will be able to open it or something."

extra {"bed post","post"} "Its a big gold bed post don't you wish you could get this sucker off it would make you a rich adventurer indeed."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You can also use the extras to give more detailed and vivid descriptions when the object is acted upon.</PARA>

<TITLE>Object special action extras</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Extra</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>$wear_s</ENTRY> <ENTRY>A message shown to activator when wearing (+wield/grab/hold) an item.</ENTRY> </ROW> <ROW> <ENTRY>$wear_o</ENTRY> <ENTRY>A message shown to others when wearing an item.</ENTRY> </ROW> <ROW> <ENTRY>$rem_s</ENTRY> <ENTRY>A message shown to activator when removing worn stuff.</ENTRY> </ROW> <ROW> <ENTRY>$rem_o</ENTRY> <ENTRY>A message shown to others when removing an item.</ENTRY> </ROW> <ROW> <ENTRY>$get_s</ENTRY> <ENTRY>A message shown to activator when getting an item.</ENTRY> </ROW> <ROW> <ENTRY>$get_o</ENTRY> <ENTRY>A message shown to others when getting an item.</ENTRY> </ROW> <ROW> <ENTRY>$drop_s</ENTRY> <ENTRY>A message shown to activator when dropping an item.</ENTRY> </ROW> <ROW> <ENTRY>$drop_o</ENTRY> <ENTRY>A message shown to other when dropping an object.</ENTRY> </ROW> <ROW> <ENTRY>$enter_s</ENTRY> <ENTRY>A message shown to activator when entering an item.</ENTRY> </ROW> <ROW> <ENTRY>$enter_o</ENTRY> <ENTRY>A message shown to other when entering an item.</ENTRY> </ROW> <ROW> <ENTRY>$exit_s</ENTRY> <ENTRY>A message shown to activator when leaving an item.</ENTRY> </ROW> <ROW> <ENTRY>$exit_o</ENTRY> <ENTRY>A message shown to other when leaving an item.</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>In the following example of an ice cube, 1n is the activator and $2n is the unit in question.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

extra {"$get_s"} "You pick up the $2N, it is very cold and begins to melt in your hands."

extra {"$get_o"} "$1n picks up the $2N, you notice that a drop of water hits the ground as it begins to melt in $1s hand."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Finally you can use extras to store information for <ACRONYM>DIL</ACRONYM> programs. We will not cover this because it is a topic covered in-depth in the <ACRONYM>DIL</ACRONYM> documentation.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;manipulate <DICTDEF> <PARA><indexterm> <primary>Object manipulate</primary> </indexterm></PARA>

<PARA>This field is what defines the things that can be done to the object. For example a piece of armour should be able to be taken and worn, while a fountain should be able to be entered but not taken unless its some magical portable fountain. There are two sets of manipulate flags even though you can use them together. We separate them because the first two are flags that tell you if you can take or enter something while the rest of the manipulate flags are for worn positions.</PARA>

<PARA>First the two flags for taking and entering are:</PARA>

<TITLE>Take and enter flags</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Manipulate</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>MANIPULATE_TAKE</ENTRY> <ENTRY> Set this flag if the unit can be taken (picked up/moved about).</ENTRY> </ROW> <ROW> <ENTRY>MANIPULATE_ENTER</ENTRY> <ENTRY> Set this flag if it is possible to enter a unit, ie set it in a coffin if you want players to be able to enter the coffin. </ENTRY> </ROW> </TBODY></TGROUP>

<PARA>These flags are set to indicate on what body positions a particular object can be worn:</PARA>

<itemizedlist> <LISTITEM><PARA>MANIPULATE_WEAR_FINGER</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_NECK</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_BODY</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_HEAD</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_LEGS</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_FEET</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_HANDS</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_ARMS</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_SHIELD</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_ABOUT</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_WAIST</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_WRIST</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WIELD</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_HOLD</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_EAR</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_BACK</PARA></LISTITEM> <LISTITEM><PARA>MANIPULATE_WEAR_CHEST</PARA></LISTITEM> <LISTITEM><PARA> MANIPULATE_WEAR_ANKLE</PARA></LISTITEM> </itemizedlist>

<PARA>Currently you can only set one of the worn positions flags on an item at a time. You can set both enter and take on an item with a position or just one or the other. Some legal examples of combinations are as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//An earring manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_EAR}

//A backpack manipulate {MANIPULATE_TAKE, MANIPULATE_ENTER, MANIPULATE_WEAR_BACK}

//strange true but its legal an earring pack manipulate {MANIPULATE_TAKE, MANIPULATE_ENTER, MANIPULATE_WEAR_EAR}

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;flags <DICTDEF> <PARA><indexterm> <primary>Object flags</primary> </indexterm></PARA>

<PARA>This field on an object is used to set special attributes in order to make the object able to be buried or not or no-teleportable and many others. The object flag list uses the UNIT_FL_* variables that both the NPCs and the rooms also use, therefore while you can set some flags on an object it may not have any affect unless you as a builder or administrator adds the functionality. You can also add extras on an object that can be used as a special flag which you will learn as you learn to use <ACRONYM>DIL</ACRONYM>. The following is a full list of all unit flags and how they affect objects, if they do.</PARA>

<TITLE>Object unit flag affects</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Flag</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>UNIT_FL_PRIVATE</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INVISIBLE</ENTRY> <ENTRY>Makes unit invisible</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_BURY</ENTRY> <ENTRY>Makes it so you can create objects that can not be buried for example a weapon that for some reason shouldn't be buried.</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_BURIED</ENTRY> <ENTRY>Makes unit buried when loaded</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_TELEPORT</ENTRY> <ENTRY>Makes it so you can not teleport into this object. This flag only works on containers. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_MOB</ENTRY> <ENTRY> Currently has no affect on an object. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_WEATHER</ENTRY> <ENTRY> Currently has no affect on a NPC. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_INDOORS</ENTRY> <ENTRY> Currently has no affect on an object. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_TRANS</ENTRY> <ENTRY>Makes unit transparent If the Unit is transparent you will be able to see any NPCs that it is carrying. For example if a canoe was carrying a familiar you would see that as you walked into the room. If this flag is not set and you are in a canoe you will not see outside the canoe and no one will see in. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_NO_SAVE</ENTRY> <ENTRY>Makes it so a PC can't save with unit</ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_SACRED</ENTRY> <ENTRY> Currently has no affect on an object. </ENTRY> </ROW> <ROW> <ENTRY>UNIT_FL_MAGIC</ENTRY> <ENTRY>This flag is used by spells to tell if the object is magic.</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>If you wanted to make an object that a player can carry around but can not save you would set the manipulate and flags as follows.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

manipulate {MANIPULATE_TAKE} flags {UNIT_FL_NO_SAVE}

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;type <DICTDEF> <PARA><indexterm> <primary>Object type</primary> </indexterm></PARA>

<PARA>This field is what you use to set the objects type. The type field is used when spells are cast or commands are executed on the object. You can add your own item types but they will not change the actions of base code commands. The following is the list of item types and what they mean when you set them. Some are not supported with the current code but you can add support for them if you like by making <ACRONYM>DIL</ACRONYM> commands, which is covered in another manual.</PARA>

<TITLE>Item types</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Type</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>ITEM_LIGHT</ENTRY> <ENTRY>Items of this type can be lighted and extinguished.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_SCROLL</ENTRY> <ENTRY>Items of this type can be read as a magical scroll.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_WAND</ENTRY> <ENTRY>Items of this type can be used with the <command>use</command> command.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_STAFF</ENTRY> <ENTRY>Items of this type can be used with the <command>tap</command> command as a magical staff</ENTRY> </ROW> <ROW> <ENTRY>ITEM_WEAPON</ENTRY> <ENTRY>Items of this type are used as weapons.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_FIREWEAPON</ENTRY> <ENTRY>Currently not supported but could be used to classify a special type of weapon.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_MISSILE</ENTRY> <ENTRY>Currently not supported but could be used to classify a special type of weapon.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_TREASURE</ENTRY> <ENTRY>Items of this type are of some great value to sell but nothing else like a Gem or a block of gold.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_ARMOR</ENTRY> <ENTRY>Items of this type can be worn or used as armour.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_POTION</ENTRY> <ENTRY>Items of this type can be used with the <command>quaff</command> as a position.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_WORN</ENTRY> <ENTRY>Items of this type can be worn but not normally used for armour it is more for clothing.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_OTHER</ENTRY> <ENTRY>This item type is for items that don't fit any other type. Now that you can make your own commands with the <ACRONYM>VME</ACRONYM> 2.0 you should just make your own item type instead of using this value.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_TRASH</ENTRY> <ENTRY>Items of this type are usually junk or broken equipment.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_TRAP</ENTRY> <ENTRY>Not currently supported but could be used to make a trap command by creating a trap item</ENTRY> </ROW> <ROW> <ENTRY>ITEM_CONTAINER</ENTRY> <ENTRY>Items that can be used as containers.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_NOTE</ENTRY> <ENTRY>Items of this type can be used to write on like paper or slates.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_DRINKCON</ENTRY> <ENTRY>Items of this type can carry liquids.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_KEY</ENTRY> <ENTRY>Items of this type can be used as a key.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_FOOD</ENTRY> <ENTRY>Items of this type can be eaten</ENTRY> </ROW> <ROW> <ENTRY>ITEM_MONEY</ENTRY> <ENTRY>Items of this type can be spent as currency</ENTRY> </ROW> <ROW> <ENTRY>ITEM_PEN</ENTRY> <ENTRY>No longer supported but could be used to force people to have a writing instrument before writing a message.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_BOAT</ENTRY> <ENTRY>Items of this type can be used as a water craft</ENTRY> </ROW> <ROW> <ENTRY>ITEM_SPELL</ENTRY> <ENTRY>Not currently supported but it could be used to make a page in a spell book</ENTRY> </ROW> <ROW> <ENTRY>ITEM_BOOK</ENTRY> <ENTRY>Not currently supported but could be used to make regular and spell books.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_SHIELD</ENTRY> <ENTRY>Items of this type can be used as a shield.</ENTRY> </ROW> <ROW> <ENTRY>ITEM_SKIN</ENTRY> <ENTRY>Not currently supported in the release but could be used to make the skin command and create skins of animals</ENTRY> </ROW> <ROW> <ENTRY>ITEM_BOARD</ENTRY> <ENTRY>Items of this type are used for public communications in the form of boards that can be read from and written to.</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>Unlike flags and manipulate fields only one item type can be set on an object at a time. The format for the 'type' field is simply the keyword followed by the value as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

type ITEM_BOARD

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;weight <DICTDEF> <PARA><indexterm> <primary>Object weight</primary> </indexterm></PARA>

<PARA>The weight is the weight of the object in pounds. In the future we may adjust this to allow you to make things lighter for example you could set it in ounces or grams. Right now however all we have is pounds so we have some pretty heavy feathers out there.</PARA>

<PARA>To use this you just enter the 'weight' keyword and then the value.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

/80 lbs. weight 80

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;capacity <DICTDEF> <PARA><indexterm> <primary>Object capacity</primary> </indexterm></PARA>

<PARA>This field sets the size of a container object. If the object does not have the manipulate enter flag set then this field doesn't have to be set. The capacity is currently by pounds since the weight of objects is set in pounds. In the future we may take into account size and weight but right now it goes only by weight. The following line of code would set an item to carry 600 pounds of stuff.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

capacity 600

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;key <DICTDEF> <PARA><indexterm> <primary>Object key</primary> </indexterm></PARA>

<PARA>The key field sets the key name of the key that will open the item. This field should be set to the symbolic name of the key that opens the item it is on. If the item is in the same zone as the key then you do not need to put the zone extension on the key name. The following are the three possible examples of using the key field.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//if object and key are in same zone. key brasskey

//if key and object are in same zone key brasskey@zonename

//if key and object are not in same zone key brasskey@otherzonename

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Notice you can put the zone name on it if the key is in the same zone but if the key is not in the same zone you must put the zone name on it.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;cost <DICTDEF> <PARA><indexterm> <primary>Object cost</primary> </indexterm></PARA>

<PARA>This is the field you set to add a cost to your object. If you leave this field out it will default to no cost and will not be able to be sold at stores. The system for setting cost on an item is the same as setting money on a NPC. As with a NPC we could set it using a single number but it would not be easy to understand. For example 5 gold pieces would be something like:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

money 25600

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>I am no more sure this will make five gold pieces than I was when I used this same example with the money field in NPC. The problem is I just did the math in my head so its not very accurate. It is much easier to use the defined money types to set exactly what you want as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

IRON_PIECE COPPER_PIECE SILVER_PIECE GOLD_PIECE PLATINUM_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now if we wanted to make an object costing five gold it would be as simple as this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

money 5*GOLD_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>the define method also gains you the ability to tell the <ACRONYM>VME</ACRONYM> what amount of each coin you want on the NPC. If you set it using a single integer the compiler would pick how many of each coin. This of course is not what is desired in fact you want to be able to set your cost however you like. So setting more than one coin is as simple as adding a comma between the first and second coin.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

money 5*GOLD_PIECE, 20*IRON_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;rent <DICTDEF> <PARA><indexterm> <primary>Object rent</primary> </indexterm></PARA>

<PARA>This field tells how much it costs you to keep an item while your offline. The rent is not always taken if the <ACRONYM>VME</ACRONYM> server is set up to not take any rent then it will not matter if you set this or not. Also the <ACRONYM>VME</ACRONYM> can be set up to take a percentage of this field so it may not take the exact amount you et. If the <ACRONYM>VME</ACRONYM> server is set up to take 100% of the rent then what you set will be taken. To set this field you do the same as you do with the cost field.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

money 5*GOLD_PIECE, 20*IRON_PIECE

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;minv <DICTDEF> <PARA><indexterm> <primary>Object minv</primary> </indexterm></PARA>

<PARA>This field is the administrator invisible level of the object it is set on. This means that if you set the 'minv' to two hundred it will make it so the object can not be seen by anyone below the administrator level of two hundred. This is good for hiding objects that you need for administrators but you don't want players to see. In order for the 'minv' to be removed an administrator or a <ACRONYM>DIL</ACRONYM> function must change it.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

minv 239

</PROGRAMLISTING></INFORMALEXAMPLE>


</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;alignment <DICTDEF> <PARA><indexterm> <primary>Object alignment</primary> </indexterm></PARA>

<PARA>The object alignment is not currently used. It is an integer value that can be set on an object to be used with any <ACRONYM>DIL</ACRONYM> functions. In the future it will be what determines if a good or evil person can wield an item. The value is set by placing the 'alignment' keyword first followed by the alignment desired from -1000 to +1000.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

alignment -250

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;open <DICTDEF> <PARA><indexterm> <primary>Object open</primary> </indexterm></PARA>

<PARA>The open field is used if you want to give your object the ability to be opened, closed, and or locked. If you add the open flags you need to also add a key field which has already been explained. The following are all the possible open flags and what they are used for.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;EX_OPEN_CLOSE <DICTDEF> <PARA> Set this if you can open and close this object. </PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_CLOSED <DICTDEF> <PARA>Set this if you want the object to be closed when loaded.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_LOCKED <DICTDEF> <PARA>Set this if you want the object to be locked when loaded.</PARA> <NOTE> <PARA>An interesting aspect is that if you do not specify a key, you can only unlock this door with the 'pick' skill, 'unlock' spell or from <ACRONYM>DIL</ACRONYM> with UnSet();</PARA> </NOTE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_PICK_PROOF <DICTDEF> <PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the lock of this object.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_INSIDE_OPEN <DICTDEF> <PARA>Usable on container objects only, this enables the mobile to 'open' and 'lock' from the inside.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>The simplest use of this field is to make an object that opens and closes. A coffin for example would have its flags set as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

open {EX_OPEN_CLOSE}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you wanted to set an object that is locked and closed and having a brass key that can open it, when it is loaded. It would look as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

open {EX_OPEN_CLOSE, EX_CLOSED, EX_LOCKED} key brass_key

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You would have to define the key in the object section as well and the symbolic name for that key would be 'brass_key'</PARA>

</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;spell <DICTDEF> <PARA><indexterm> <primary>Object spell</primary> </indexterm></PARA>

<PARA>The spell field is the power of the objects defense against spells. You can set it from zero which is just not setting the field all the way to 200% which means a person who has 100% in a spell will fail almost all the time. To set this field it would look as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING> //Spell resistance at 150% spell 150

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;value <DICTDEF> <PARA><indexterm> <primary>Object value</primary> </indexterm></PARA>

<PARA>The object values are used for just about any special item from armour to drink containers. They should not be set directly unless you have a reason to do so, like a special <ACRONYM>DIL</ACRONYM> command that checks a value on an item. You also have to be carefull not to over write what a value is already used for example value one is already used on weapons and armours for craftsman ship that will be explained later in <xref linkend="objmacros">.</PARA>

<PARA>If you find you need to set the values there are a total of five of them and they can be set to any integer value as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

value[0] 5 value[1] 16 value[2] -2 value[3] -10 value[4] 12

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;affect <DICTDEF> <PARA><indexterm> <primary>Object affect</primary> </indexterm></PARA>

<PARA>The affect field should not be set directly, instead you should use the macros defined in <xref linkend="objmacros">.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;dilbegin or dilcopy <DICTDEF> <PARA><indexterm> <primary>Object dilbegin or dilcopy</primary> </indexterm></PARA>

<PARA>As has been mentioned in previous sections the <ACRONYM>DIL</ACRONYM> functions are what give <ACRONYM>VME</ACRONYM> servers the edge over all other muds. We will only give some examples here and leave it up to the <ACRONYM>DIL</ACRONYM> manual to teach you how to create your own functions that will make your rooms, NPC, and objects more than special.</PARA>

<PARA>There are several object functions that come standard with the <ACRONYM>VME</ACRONYM> 2.0. The following is a list of those functions.</PARA>

<itemizedlist> <LISTITEM><PARA>Guild restrict</PARA></LISTITEM> <LISTITEM><PARA>Anti-guild restrict</PARA></LISTITEM> <LISTITEM><PARA>Quest restrict</PARA></LISTITEM> <LISTITEM><PARA>Quests restrict</PARA></LISTITEM> <LISTITEM><PARA>Alignment restrict</PARA></LISTITEM> <LISTITEM><PARA>Level restrict</PARA></LISTITEM> <LISTITEM><PARA>Virtual level restrict</PARA></LISTITEM> <LISTITEM><PARA>Race restrict</PARA></LISTITEM> <LISTITEM><PARA>Ability restrict</PARA></LISTITEM> <LISTITEM><PARA>Skill restrict</PARA></LISTITEM> <LISTITEM><PARA>Spell restrict</PARA></LISTITEM> <LISTITEM><PARA>Weapon restrict</PARA></LISTITEM> <LISTITEM><PARA>Gender restrict</PARA></LISTITEM> <LISTITEM><PARA>Player restrict</PARA></LISTITEM> <LISTITEM><PARA>boards</PARA></LISTITEM> <LISTITEM><PARA>tuborg/dilbegin</PARA></LISTITEM> </itemizedlist>

<PARA>These are the only object functions currently documented in the <ACRONYM>VME</ACRONYM> 2.0 release but if you go through the zones that are released with the <ACRONYM>VME</ACRONYM> you are sure to find many more. Hopefully with the descriptions in <XREF LINKEND="objdilfunc">. You will be able to use the functions listed here and figure out ones that are not.</PARA>

<PARA>Since these are just <ACRONYM>DIL</ACRONYM>'s written by builders for the Valhalla mud all you have to do is use the dilcopy keyword in the NPC with the function name you want to use and the arguments that function requires. The following is what you would find in the function.zon for tuborgs.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin tuborg(s:string); external sub_drink_info@commands(d:unitptr); var u : unitptr; code { :start: wait(SFB_CMD, ( (command("drink")) or (command("sip")) or (command("taste")) ) ); u := activator; secure (u,start); if (findunit (activator,argument,FIND_UNIT_INVEN|FIND_UNIT_SURRO,null)!=self) goto start; if ( command("sip") or command("taste") ) { block; act("$1n tastes $2n enjoying every drop.", A_HIDEINV, u, self, null, TO_ROOM); act("The taste of the $2N is nothing less than divine.", A_HIDEINV, u, self, null, TO_CHAR); goto start; }

if ( u.thirst >20 ) { block; act("Your not thirsty.", A_HIDEINV, u, null, null, TO_CHAR); goto start; } block; act ("You drink $2n and it makes you feel more energetic!", A_HIDEINV, u, self, null, TO_CHAR); act ("$1n drinks $2n and looks more energetic!", A_HIDEINV, u, self, null, TO_ROOM);

u.thirst := u.thirst + 10; u.full := u.full + 10; if (u.thirst > 24) { u.thirst := 24; }

if (u.full > 24) { u.full := 24; } u.endurance := u.endurance+50; if (u.endurance > u.max_endurance) { u.endurance := u.max_endurance; } sub_drink_info@commands(self); quit; } dilend

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If this <ACRONYM>DIL</ACRONYM> function scares you don't worry you don't have to understand it or adjust it you only have to use it. In fact this is a really easy <ACRONYM>DIL</ACRONYM> to use. The argument on the tuborg function is not used yet so all you have to do is pass in a blank string or any string for that matter. So if you wanted to make a tuborg in the game you would just add this to your drink container.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy tuborg@function ("");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>All of the above listed <ACRONYM>DIL</ACRONYM> object functions are described in <XREF LINKEND="objdilfunc">. Then we put some to work so you can see how to use them in <XREF LINKEND="objcomplex"></PARA> </LISTITEM> </VARLISTENTRY>

</VARIABLELIST>

</SECT1>

<sect1 id="objmacros"> <TITLE>Object macros</TITLE>

<PARA>To make the creation of some objects easier we have provided a set of Macros. The macros range from general armour and weapons macros to macros that help you create special affects on all items. We will first cover what craftsmanship and magical modifiers are in <xref linkend="objcraft"> and <xref linkend="objmag"> respectively. After which we will show the use of craftsmanship and magical modifiers in <xref linkend="objmacroweapon"> and <xref linkend="objmacroarmour">.</PARA>



<sect2 id="objcraft"> <TITLE>Weapon and armour craftsmanship</TITLE>

<PARA>The craftsmanship is a way of expressing the overall quality of a piece of armour or weapon. The quality on the <ACRONYM>VME</ACRONYM> servers currently means the amount of hit points given to an item. The craftsmanship ranges from 25 to -25 and the hit points range from 125 to 6000. The craftsmanship can be looked at as how tough or good the armour or weapon is. The following table should help you in deciding how tough your armour or weapon should be.</PARA>

<TITLE>Approximate hit points verses craftsmanship</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Craftsmanship</ENTRY> <ENTRY>Hit points</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>25</ENTRY> <ENTRY>6000</ENTRY> </ROW> <ROW> <ENTRY>20</ENTRY> <ENTRY>5000</ENTRY> </ROW> <ROW> <ENTRY>15</ENTRY> <ENTRY>4000</ENTRY> </ROW> <ROW> <ENTRY>10</ENTRY> <ENTRY>3000</ENTRY> </ROW> <ROW> <ENTRY>5</ENTRY> <ENTRY>2000</ENTRY> </ROW> <ROW> <ENTRY>0</ENTRY> <ENTRY>1000</ENTRY> </ROW> <ROW> <ENTRY>-5</ENTRY> <ENTRY>875</ENTRY> </ROW> <ROW> <ENTRY>-10</ENTRY> <ENTRY>650</ENTRY> </ROW> <ROW> <ENTRY>-15</ENTRY> <ENTRY>425</ENTRY> </ROW> <ROW> <ENTRY>-20</ENTRY> <ENTRY>300</ENTRY> </ROW> <ROW> <ENTRY>-25</ENTRY> <ENTRY>125</ENTRY> </ROW> </TBODY></TGROUP>

<PARA>It is suggested the higher the craftsmanship the higher the cost of the weapon should be. This is not a must but it goes with out saying the quality of an item should be represented in the cost of it. Of corse there is the time you would want to sell your players poor quality items at a high cost just to make them think they are getting something cool.</PARA>

</sect2>

<sect2 id="objmag"> <TITLE>Magical modifier</TITLE>

<PARA>The magical modifier can be said to modify damage done to an opponent. In a combat the damage is calculated and then the magical bonuses on armour or weapons is added in. This is best explained by an example.</PARA>

<PARA>Lets say that you were about to give 25 hit points of damage to a person. Your sword has a plus 25% in magical bonus. The bonus is added to your damage to make it a total of 50 hit points of damage. The player you are hitting however has a +25% magical bonus on his armour that you are about to hit him on. That will reduce the damage back to its 25% hit points originally done. This is just a nice way to add a bit of damage for a special weapon.</PARA>

<PARA>The magical modifier ranges from 25 to -25. It affects both the damage being given to a player and the damage being given to a weapon or a piece of armour.</PARA>

<PARA>It is suggested that you modify the costs of your objects to fit the amount of magical bonus along with adding the magical flag tot he objects flag list so an identify spell can pick up that there is magic about the object. This is not a must but your players will love you for it.</PARA> </sect2> <sect2 id="objmacroweapon"> <TITLE>Setting weapon fields</TITLE>

<PARA>To create a weapon you only need three pieces of information. The weapons craftsmanship and magical modifiers defined in <xref linkend="objcraft"> and <xref linkend="objmag"> and the weapon type. You have seen the weapon types before when defining a NPCs natural attack type in <xref linkend="npcmacroattarm">. The full list of weapon types that are released with the <ACRONYM>VME</ACRONYM> 2.0 can be found in <xref linkend="app-d">. With craftsmanship, magical modifier and the weapon type all you need to do is pick from one of the following macros and insert your numbers.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define WEAPONSZ_DEF(weapon_category, craftsmanship, magic_bonus, hgt) \ WEAPON_DEF(weapon_category, craftsmanship, magic_bonus)\ height hgt

#define SHIELD_DEF(shield_type, craftsmanship, magic_bonus) \ manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_SHIELD} \ type ITEM_SHIELD \ value[0] shield_type \ value[1] craftsmanship \ value[2] magic_bonus

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you can see the first macro uses the second macro so the only difference between them is the first one sets the height field. Using the first macro will force your weapon to be a certain size when loaded. While not setting the height field by using the second macro would let the <ACRONYM>VME</ACRONYM> server set the size of the weapon by what NPC it is loaded on.</PARA>

<PARA> A flail (two handed) of non-pure iron (-3%), a little better than average craftsmanship (5%) and no magic bonuses would have:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING> WEAPON_DEF(WPN_FLAIL, +2, 0)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>A rusty (-5%) mean sacrificial dagger by a skilled smithy (+5%) and magically enchanted might be:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

flags {UNIT_FL_MAGIC} WEAPON_DEF(WPN_DAGGER, 0, +5)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>An old shaky wooden stick made for a 400 cm tall person could be:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

WEAPONSZ_DEF(WPN_CLUB, -5, 0,400)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>A wooden bastard sword would have considerable less craftsmanship than listed since wood prevents the slashing effect, also it would be non-sense to apply better than average craftsmanship in this case.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

WEAPON_DEF(WPN_BROAD_SWORD, -15, 0)

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2> <sect2 id="objmacroarmour"> <TITLE>Setting armour fields</TITLE>

<PARA>When designing armour it is no more difficult then when designing weapons. There is five main armour types. The types don't define the material type for example if you wanted to create a wooden pair of armour that protected like plate armour you could do this by defining the armour type as plate and then adding the material as defined in <xref linkend="objmacromattype">. The five armour types are as follows:</PARA>

<itemizedlist> <LISTITEM><PARA>Clothes</PARA></LISTITEM> <LISTITEM><PARA>Leather</PARA></LISTITEM> <LISTITEM><PARA>Hard leather</PARA></LISTITEM> <LISTITEM><PARA>Chain</PARA></LISTITEM> <LISTITEM><PARA>Plate</PARA></LISTITEM> </itemizedlist>

<PARA>The armours macros are almost the same as the weapons macro it looks as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define ARMOUR_DEF(atype, craftsmanship, magic_bonus) \ manipulate {MANIPULATE_TAKE} \ type ITEM_ARMOR \ value[0] atype value[1] craftsmanship \ value[2] magic_bonus

#define ARMOURSZ_DEF(atype, craftsmanship, magic_bonus, hgt)\ ARMOUR_DEF(atype,craftsmanship, magic_bonus) \ height hgt

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The craftsmanship and magical modifier fields have already been explained so the only thing new that you need to pass into these macros is the 'atype' which stands for armour type. As we have mentioned there are five different armour types. The following are the defines for each:</PARA>

<itemizedlist> <LISTITEM><PARA>ARMOUR_CLOTHES</PARA></LISTITEM> <LISTITEM><PARA>ARMOUR_LEATHER</PARA></LISTITEM> <LISTITEM><PARA>ARMOUR_HLEATHER</PARA></LISTITEM> <LISTITEM><PARA>ARMOUR_CHAIN</PARA></LISTITEM> <LISTITEM><PARA>ARMOUR_PLATE</PARA></LISTITEM> </itemizedlist>

<PARA>The armour type defines how different weapons and spells are defended against for example plate would be better against acid maybe and worse against electricity. You as a <ACRONYM>VME</ACRONYM> administrator will have to decide which armours are better at what by changing your weapons.def and spells.def</PARA>

<PARA>This explains the entire armour define but there is some more to it. The rest will be covered in <xref linkend="objarmour"> For now an example use of the armour define would be as follows:</PARA>


<INFORMALEXAMPLE><PROGRAMLISTING>

flags {UNIT_FL_MAGIC} ARMOR_DEF(ARM_PLATE,+15,+5)

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2 id="objmacroshield"> <TITLE>Setting shield fields</TITLE>

<PARA>We have tried to keep the interface of making armours, weapons, and shields the same. If you have already looked through the defines for weapons and armours you will find that there is very little difference here. The following is the define for the macro that sets the shield values.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define SHIELD_DEF(shield_type, craftsmanship, magic_bonus) \ manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_SHIELD} \ type ITEM_SHIELD \ value[0] shield_type \ value[1] craftsmanship \ value[2] magic_bonus

#define SHIELDSZ_DEF(shield_type, craftsmanship, magic_bonus, hgt) \ SHIELD_DEF(shield_type, craftsmanship, magic_bonus)\ height hgt

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You have already seen the craftsmanship and magical modifiers in <xref linkend="objcraft"> and <xref linkend="objmag">, so the only thing different here is the shield type. There are three shield types available in the current combat system and they are categorized by size. the three sizes are small, medium, and large. to set the type you use the defines from vme.h which define the following:</PARA>

<itemizedlist> <LISTITEM><PARA>SHIELD_SMALL</PARA></LISTITEM> <LISTITEM><PARA>SHIELD_MEDIUM</PARA></LISTITEM> <LISTITEM><PARA>SHIELD_LARGE</PARA></LISTITEM> </itemizedlist>

<PARA>the larger the shield the better chance of blocking an attack. You may want to remember to add weight as you add size to your shield so players are weighted down and can not carry the best of everything but that is up to the administrator of the <ACRONYM>VME</ACRONYM> server.</PARA>

<PARA>A small magical wooden shield could be assigned:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

flags {UNIT_FL_MAGIC} SHIELD_DEF(SHIELD_SMALL, 0, +5)

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2>

<sect2 id="objmacromattype"> <TITLE>Setting material types</TITLE>

<PARA>Currently Material types are not used greatly in spells or skills but in the future we hope to add more functionality for materials. For example in the future if you are hit by an acid spell we want your armour to be damaged depending on the material it is. The material doesn't have any affect on damage given or taken it is just a way you can check in <ACRONYM>DIL</ACRONYM> what the weapon is made out of. The following is the list you would find in wmacros.h of in the <ACRONYM>VME</ACRONYM> 2.0 release.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define MATERIAL_WOOD(DESCR) extra {"$material", "$mat_wood"} DESCR #define MATERIAL_METAL(DESCR) extra {"$material", "$mat_metal"} DESCR #define MATERIAL_STONE(DESCR) extra {"$material", "$mat_stone"} DESCR #define MATERIAL_CLOTH(DESCR) extra {"$material", "$mat_cloth"} DESCR #define MATERIAL_LEATHER(DESCR) extra {"$material", "$mat_leather"} DESCR #define MATERIAL_SKIN(DESCR) extra {"$material", "$mat_skin"} DESCR #define MATERIAL_ORGANIC(DESCR) extra {"$material", "$mat_organic"} DESCR #define MATERIAL_GLASS(DESCR) extra {"$material", "$mat_glass"} DESCR #define MATERIAL_FIRE(DESCR) extra {"$material", "$mat_fire"} DESCR #define MATERIAL_WATER(DESCR) extra {"$material", "$mat_water"} DESCR #define MATERIAL_EARTH(DESCR) extra {"$material", "$mat_earth"} DESCR #define MATERIAL_MAGIC(DESCR) extra {"$material", "$mat_magic"} DESCR

</PROGRAMLISTING></INFORMALEXAMPLE> <PARA>Therefore if you had a wooden staff you could add the following to your weapon so spells would know what it was made out of.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

MATERIAL_WOOD("a hard oak")

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2> <sect2 id="objmacroliqcont"> <TITLE>Drink container macros</TITLE>

<PARA>There are two different kinds of macros for drink containers. The one you use depends on the need at the time. The harder macro is made so you can create a drink of any kind. If however you want normal drinks like water, beer, or even lemonade there are more simple macros already defined for you to use in liquid.h. The following is a couple of the macros from the liquid.h for a full listing see <xref linkend="app-e">.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define LIQ_WATER(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,10,1,0,POISON) #define LIQ_BEER(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,3,POISON) #define LIQ_WINE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("red", WEIGHT,CAPACITY,INSIDE,5,2,5,POISON) #define LIQ_COFFEE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>To use these macros the arguments are pretty simple.</PARA> <VARIABLELIST> <VARLISTENTRY> ;weight <DICTDEF> <PARA>The first argument just says how heavy your drink container is when empty. Like a barrel might be 15 pounds and a glass might be 1 pound. You may be thinking there is no way the glasses in your kitchen are one pound. The truth is if we had less than a pound then we would set the glass to less but currently all units are measured in pounds so the least we can make it is a pound. In the future of the <ACRONYM>VME</ACRONYM> we will be converting to smaller measurements like grams or ounces.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> <term>capacity</term> <LISTITEM> <PARA>The second argument is what your container can carry weight wise. So if your barrel is 15 pounds and your barrel can carry 35 pounds of a liquid then the total weight when full would be 50 pounds, if my math is working today. To make a container with infinity liquid like a fountain you just set capacity to '-1'.</PARA> <NOTE><PARA>Making capacities ridiculously large can cause weight bugs. If your going to allow ridiculous amounts you might just want to give them the infinite amount or really work on your drink and pour functions</PARA></NOTE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> <term>inside</term> <LISTITEM> <PARA>The third argument is how much liquid by weight your container has inside. This value should not be greater than the capacity but if you mess up it will be fixed when the player tries to drink from it. The total weight of the drink container and the liquid it contains will be the weight added to this value.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> <term>poison</term> <LISTITEM> <PARA>the forth argument is the amount of poison in your drink. There is no limit on the amount of poison but understand that a value of ten would be a very high poison value.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>So if you wanted to make a simple small glass of water you would use the water macro and it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

LIQ_WATER(1,2,2,0)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>You are probably wondering what it takes to fill a player from empty. The players thirst ranges from -24 which is dieing of thirst all the way to positive 24 which is full. So if you have a barrel that can hold 24 capacity one full barrel can take a person from zero thirst to full.</PARA>

<PARA>Now lets say you want to make something more exotic. All the normal drinks are made or at least a great number of them are in the liquid.h but what if you had a race from outer space that drank nothing but silicone oil. This obviously is not covered in our liquid file so you would have to make one yourself or use the more complex macro.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define LIQ_DEF(color, wgt, max_cap, inside,thirst,full,drunk,poison) \ type ITEM_DRINKCON \ weight (wgt)+(inside) \ capacity max_cap \ value[0] inside \ value[3] poison \ extra {"$drink_color"}color \ extra {"$drink_thirst"} #thirst \ extra {"$drink_full"} #full \ extra {"$drink_drunk"} #drunk

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you can see this define has much more information you need to pass it but it really is not that hard. The following are the arguments and what they do.</PARA>

<VARIABLELIST>

<VARLISTENTRY> ;color <DICTDEF> <PARA>the first argument is the color of the liquid. this color will be shown when you look at the liquid in the container.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;wgt <DICTDEF> <PARA>The second argument is the weight of the container as in the last macros. It is what the container would weigh empty.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;max_cap <DICTDEF> <PARA>The third argument is the maximum capacity of the container. If the value is set to 15 and the container is fulled it will contain 15 pounds of liquid which adds to the base weight to get the total weight of the container. If you want a container to have unlimited contents then you set the capacity to '-1' and the weight will be that of the 'wgt' field.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;inside <DICTDEF> <PARA>The forth argument is the amount of liquid the container starts with. This amount should not be greater than the 'max_cap' field, but if it is it will be corrected when the player takes a drink or acts on the container.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;thirst <DICTDEF> <PARA>The fifth field is how much thirst this gives per pound of liquid consumed. For example if you have a glass of water and it only has a capacity of 1 with 1 inside. this value will be added once to the players thirst field.</PARA>

<PARA>this can be a bit confusing so lets first explain that the thirst field can be anything from 0 to 10 or even greater but we suggest only 10 max. With that in mind know that we set water at 10 because it is one of the best thirst quenchers known to man. Therefore a glass with 1 capacity and 1 quantity inside will give a player +10 to his thirst so if the player was down to zero thirst value one drink will give them 10. remember that a players thirst ranges from -24 to +24 so with three drinks of water a person could fill his thirst need entirely.</PARA>

<PARA>With that in mind when setting this field you have to think what kind of thirst quencher is my drink. If for example it is vodka it would have little to know thirst quenching power so you would set this field to 0 or 1.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;full <DICTDEF> <PARA>The sixth field like the thirst field sets how the drink will affect the chars fullness. The chars fullness field is normally set when a player is eating but as you know drinking some drinks will also give you the feeling of being full. One drink like this would be milk. The chars fullness field ranges from -24 to 24 like the thirst field and the argument you are setting on this field should range from 0 to 10 unless you have a pro teen drink that fills them like food. Milk might have a fullness of something like 5.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;drunk <DICTDEF> <PARA>the seventh field like thirst and full deals with the Drunkenness of a character. A character can range from 0 (not drunk) all the way up to 24 (smashed). The drunk field on this macro sets how much drunk is added for each quantity of the liquid is consumed. Therefore something like vodka should have a value of 10 while something like water should be down at 0 unless you have some weird race that gets drunk from water.</PARA> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;poison <DICTDEF> <PARA>The eighth and final field is again like the last macro we looked at it sets the poison factor of a liquid. The value ranges from 0 (no poison) to whatever you want but understand that 10 is an extreme poison factor and a player drinking this will most likely die quickly.</PARA> </LISTITEM> </VARLISTENTRY>

</VARIABLELIST>

<PARA>So with the definitions of each arguments in mind lets return to the example of making a silicone oil based liquid. We will first show what it would look like using the hard macro then what the new easy macro that you could create would look like.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

LIQ_DEF("blue",5,10,10,5,1,0,0)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now if you want to make this a liquid your going to use a lot you would define your own easier macro like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define LIQ_SILICONE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("blue", WEIGHT,CAPACITY,INSIDE,5,1,0,POISON)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>That covers the use of the macros but for more information on the drink containers see <xref linkend="objdrink">.</PARA> </sect2>

<sect2 id="objmacrofood"> <TITLE>The food macros</TITLE>

<PARA>The food macro is much easier than that of the drink macro so if you have drink containers down you will have no problem making food to go with your beverage. The players fullness value ranges from -24 to 24 as we have already learned when making drink containers and in the current food system on the <ACRONYM>VME</ACRONYM> server we do not allow thirst to be modified by food. Therefore the only thing you have to set is the amount of fullness and the poison factor if there is any. The following is what the define for food looks like.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define FOOD_DEF(food_amount, poison_factor) \ type ITEM_FOOD \ value[0] food_amount \ value[3] poison_factor

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Therefore if you wanted to make sure that only one of your foods that you were creating would fill a player entirely in one bite you would set it like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

FOOD_DEF(50,0)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>It is recommended that you only set the value between 1 and 10 so that players have to eat a bit as if they were eating in the real world.</PARA> </sect2>

<sect2 id="objmacrolight"> <TITLE>Light object macro</TITLE>

<PARA>The light macro is very simply to use it only has two values duration and brightness of light. The macro is defined as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define LIGHT_DEF(hours, how_bright) \ type ITEM_LIGHT \ value[0] hours \ value[1] how_bright

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The first argument is the duration in mud hours which is about 5 minutes per mud hour. The second argument is how bright the object is 0 would be stupid cause it would give off no light but you never know maybe you want to do something like that. One, two, and three would be small torch, large torch, and lantern respectively. You could set a brightness greater than 3 but you should be carefull not to over light your characters or you may cause light bugs.</PARA>

</sect2>

<sect2 id="objmacrocontainer"> <TITLE>Container macro</TITLE>

<PARA> The container macro is a simple macro that just sets two fields. The only information you have to give it is the capacity of the container. Remember that capacity of an item is in weight not size. Therefore if some ones corpse weighs 230 pounds you will need a container that has a capacity of 230 to fit the corpse in it. The following is the macros definition as found in wmacros.h:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define CONTAINER_DEF(max_capacity) \ type ITEM_CONTAINER \ capacity max_capacity

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you wanted to create a coffin that could carry any normal human corpse you could set it something like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

container_def(300)

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2>

<sect2 id="objmacromoney"> <TITLE>Money macro</TITLE>

<PARA>Money is one of the simplest objects you can make on the <ACRONYM>VME</ACRONYM> server. With this macro all you need is the symbolic before the macro and the end keyword after the macro and you have 1 piece of money or a whole pile. The macro is defined in the wmacros.h and looks exactly as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define MONEY(coin_type, coins) \ type ITEM_MONEY \ manipulate MANIPULATE_TAKE \ title coin_type \ value[0] coins

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The arguments are simple the first argument is the type of money the five possible values are:</PARA> <itemizedlist> <LISTITEM><PARA>IRON_PIECE</PARA></LISTITEM> <LISTITEM><PARA>COPPER_PIECE</PARA></LISTITEM> <LISTITEM><PARA>SILVER_PIECE</PARA></LISTITEM> <LISTITEM><PARA>GOLD_PIECE</PARA></LISTITEM> <LISTITEM><PARA>PLATINUM_PIECE</PARA></LISTITEM> </itemizedlist>

<PARA>The second argument is the amount of coins. If you set it to zero then it will still make exactly 1 of the coins. The following would be what one platinum piece would be like in a zone file.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

platinum_piece

MONEY(PLATINUM_PIECE, 0) /* Rest of values are inserted at runtime */

end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now if you want to make a whole pile of money it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

platinum_pile

MONEY(PLATINUM_PIECE, 80) /* Rest of values are inserted at runtime */ extra {} "Holy cow thats a stash."

end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2 id="objmacrocurse"> <TITLE>Cursed objects macro</TITLE>

<PARA>Sometimes when making special objects you want to make an item that a person can wear but can't remove. With the cursed object macro this is a simple thing. The cursed object macro is defined in wmacros.h and looks as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define CURSED_OBJECT \ affect \ id ID_CURSE \ duration -1 \ firstf TIF_NONE \ tickf TIF_NONE \ lastf TIF_NONE \ applyf APF_MOD_OBJ_FLAGS \ data[0] OBJ_NO_UNEQUIP;

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>to use this macro it is simply a matter of putting the define in your object like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

CURSED_OBJECT

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>When you set this macro on an object it adds an affect that can only be removed by the 'set' command or by the 'remove curse spell'.</PARA> </sect2>

<sect2 id="objmacropws"> <TITLE>Potion, wand, and staff macros</TITLE>

<PARA>The macros for potions, scrolls, wands, and staffs are almost the same. In fact there is only two differences. The first is the potions and scrolls can cast three spells while wands can only cast two, The second is wands and staffs have multiple charges possible while scrolls and potions only can be used once. The following are the macros for all four as found in wmacros.h.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define POTION_DEF(power,spell1,spell2,spell3) \ manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \ flags {UNIT_FL_MAGIC} \ spell power \ type ITEM_POTION \ value[0] power \ value[1] spell1 \ value[2] spell2 \ value[3] spell3

#define SCROLL_DEF(power,spell1,spell2,spell3) \ manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \ flags {UNIT_FL_MAGIC} \ spell power \ type ITEM_SCROLL \ value[0] power \ value[1] spell1 \ value[2] spell2 \ value[3] spell3

#define WAND_DEF(power,charge,spell1,spell2) \ manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \ flags {UNIT_FL_MAGIC} \ spell power \ type ITEM_WAND \ value[0] power \ value[1] charge \ value[2] spell1 \ value[3] spell2 \ value[4] charge /* The max charge */

#define STAFF_DEF(power,charge,spell1,spell2) \ manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD} \ flags {UNIT_FL_MAGIC} \ spell power \ type ITEM_STAFF \ value[0] power \ value[1] charge \ value[2] spell1 \ value[3] spell2 \ value[4] charge /* The max charge */

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The arguments are as follows for the macros.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;power <DICTDEF> <PARA>The first argument on potions, scrolls, wands, and staff is the power the spell will be cast at. You can have the power set in the range 1-200. The spell power works the same as a player training in the spell. The higher the number the more powerfull the cast.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;charge <DICTDEF> <PARA>The second argument on the staffs and wands is how many charges it has.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;spell# <DICTDEF> <PARA>On potions and scrolls you can set up to 2 spells you do not have to set them both the one you don't want set to 0. On staffs and wands you can set three spells. Again if you want only one or two you can leave the one you do not want set to 0.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </sect2>


<sect2 id="objmacrotransfers"> <TITLE>Magical transfer macros</TITLE>

<PARA>There are times when you want to give a player a bonus in a ability, weapon, skill, and or weapon. There is even times when you want to adjust a characters speed or add a flag to a player when they wear an item. The following macros are what you would use to do any of those when a person uses an item.</PARA>

<itemizedlist> <LISTITEM><PARA>CHAR_FLAG_TRANSFER(_MFLAGS)</PARA></LISTITEM> <LISTITEM><PARA>SKILL_TRANSFER(skill, amount)</PARA></LISTITEM> <LISTITEM><PARA>WEAPON_TRANSFER(weapon, amount)</PARA></LISTITEM> <LISTITEM><PARA>SPELL_TRANSFER(spell, amount)</PARA></LISTITEM> <LISTITEM><PARA>STR_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>DEX_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>CON_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>CHA_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>BRA_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>MAG_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>DIV_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>HIT_TRANSFER(amount)</PARA></LISTITEM> <LISTITEM><PARA>SPEED_TRANSFER(newspeed)</PARA></LISTITEM> <LISTITEM><PARA>SLOW_TRANSFER(amount)</PARA></LISTITEM> </itemizedlist>

<NOTE><PARA>For the full definitions of the transfer macros see <xref linkend="app-f"> or the header file wmacros.h.</PARA></NOTE>

<PARA>The transfer macros can be broken down into three groups those which transfer percentage, flags, and speed. The skill, weapons, spells, and ability macros transfer the amount of percentage you put. If you give a negative percentage it will take that much away from the player or NPC in that catagory. The character flag transfer actually adds the flag to the player while the player is using the item. The speed transfer macros add or subtract the amount of speed you give them. The range for speed is from zero to twelve with twelve being the slowest.</PARA> </sect2> </sect1>

<sect1 id="objbasic"> <TITLE>Building your first object</TITLE>

<PARA>Now that you have learned how to make rooms and NPCs its time to make the objects for your little world. In the last couple of sections you have looked through the fields. In this section we are going to make a nice easy object. There is really not that much new from what you have learned with rooms and NPCs so this should be a real quick section. As always we will start with something I like which as you remember is dragons. So the first object we will make is a dragon head. I didn't say I liked them alive now did I? Anyway this will be a nice simple object that your player can pick up and carry around.</PARA>

<PARA>When making objects you create the zone source file first as shown in <xref linkend="ch-02">. If you only have objects you do not need the %reset, %mobiles, and %rooms fields. For the examples in this chapter we will use the zone we created in <xref linkend="ch-04"> and add the %objects section where we will put all the object definitions. At the end of this chapter, in <xref linkend="roomnpcobjzone">, we will bring it all together with the rooms and NPCs we have defined already.</PARA>

<PARA>The first part of all object definitions is the symbolic name it is good to always pick a name that will match the name of the object so it will be easy to load the object. The reason the symbolic and name should match is when you use the command <command>wstat</command> it will only show you a list of the objects by symbolic name for example if you type <command> wstat zone dragon objects</command> You will get the following: <INFORMALEXAMPLE><PROGRAMLISTING>

List of objects in zone Dragon: claw info_board dragon_head

</PROGRAMLISTING></INFORMALEXAMPLE> If you didn't make it clear what the object was by the symbolic name it might look like this: <INFORMALEXAMPLE><PROGRAMLISTING>

List of objects in zone Dragon: obj1 a_obj2 o3

</PROGRAMLISTING></INFORMALEXAMPLE> While this might be great when you first start imagine trying to remember each object if you have over 30 of them.</PARA>

<PARA>Now lets get started with our dragon head. As with the rooms and npcs all that is required to make an object is the symbolic and end fields. That of course will make a NPC with all defaults.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dragon_head end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Thats it for that dragon head right? Nope not quite, like before with NPCs, that makes an object with all defaults. That means this will probably be a very blank spot on the screen with no names and no way your players can interact with it. Now lets start putting the Dragon heads other more interesting fields on.</PARA>

<PARA>Like with rooms and NPCs, the first three things we need are the dragon heads title, description and names. The description should be what you see when you do a 'look' in the room. The title should be what you see when the object is in your inventory or you are whacking someone over the head with it. Since we are not making a weapon though the title is what will be shown when you are picking up or dropping the object. Finally the names should cover everything in the title and description fields so if your player wants to pick the object up or wear it will be easy to figure out what the names are.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dragon_head

title "a gold dragon head"

descr "A large golden dragon head is laying here looking sad."

names {"large golden dragon head","large gold dragon head", "golden dragon head","large dragon head","gold dragon head", "dragon head","large head", "sad head","head"} ... end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The names, title and description shouldn't be to hard so I don't think its necessary to go into any more description on the subject. Lets move on. Now we have to take care of what a player sees when he or she looks at an object. to make the main description of an NPC you place an extra on the NPC with no names in the list. The blank extra is a special extra that will be shown every time you look at anything in the names list of the object. So a description of an object would look something like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

extra {} "The head is large and beautiful, at least as beautiful as a dead dragon head can be. There is an extreme look of sorrow on the dragons face and it seems to be for much more than its own death."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now that you have a main description for the object you need to make any smaller descriptions that you want the player to be able to look at. In this case it may be good to give some secret information if the player looks at the face of the head directly.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

extra {"gold dragon head face","dragon head face","head face","face"} "Looking into the dragons face your eyes are drawn to the eyes of the dead dragon. Could there be something there?"

extra {"eyes","eye"} "A world of blue skies and no storms is visible through the eyes and it seems to be moving as if you were watching the world from space."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now that we have the object all described we only need to give the object the manipulate flags it needs, weight, height, and maybe some extras that will make some cool acts when a player picks it up or drops it.</PARA>

<PARA>First thing to do though is pick the manipulate flags you want on the object. This is not a weapon or armour so all the player really needs to be able to do with it is pick it up and maybe hold it if you want and I do. The flags would then be as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

manipulate {MANIPULATE_TAKE,MANIPULATE_HOLD}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you were feeling a little weird you could even make the person be able to wear the dragon head on his head but that would just be strange. of course its always good to know you have options.</PARA>

<PARA>Now lets set the height and weight. Remember you set the height in centimeters and the weight in pounds. In the future the <ACRONYM>VME</ACRONYM> will standardize to one or the other but for now we have to play the conversion game.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

//20 feet (1 inch = 2.54 cm height 33

//566 KG (1 lb. = .45359 kg) weight 50

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The final touch to our little dragon head is some cute acts when the player picks it up or drops it. If you remember from the extra fields in <xref linkend="objfielddescr">, there are some special extras that are made just for this purpose.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

extra {"$get_s"} "You suddenly feel very sad for a world that you don't even know."

extra {"$get_o"} "A strange look of sadness crosses $1ns face."

extra {"$drop_s"} "You feel much happier but you remember a feeling of great sorrow."

extra {"drop_o"} "$1n seems to cheer up a bit."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>There are other things we could add to this item but I want to keep this first object simple. The finished head would then look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dragon_head

title "a gold dragon head"

descr "A large golden dragon head is laying here looking sad."

names {"large golden dragon head","large gold dragon head", "golden dragon head","large dragon head","gold dragon head", "dragon head","large head", "sad head","head"}

extra {} "The head is large and beautiful, at least as beautiful as a dead dragon head can be. There is an extreme look of sorrow on the dragons face and it seems to be for much more than its own death."


extra {"gold dragon head face","dragon head face","head face","face"} "Looking into the dragons face your eyes are drawn to the eyes of the dead dragon. Could there be something there?"

extra {"eyes","eye"} "A world of blue skies and no storms is visible through the eyes and it seems to be moving as if you were watching the world from space."

manipulate {MANIPULATE_TAKE,MANIPULATE_HOLD}

height 33 weight 50

extra {"$get_s"} "You suddenly feel very sad for a world that you don't even know."

extra {"$get_o"} "A strange look of sadness crosses $1ns face."

extra {"$drop_s"} "You feel much happier but you remember a feeling of great sorrow."

extra {"drop_o"} "$1n seems to cheer up a bit."

end

</PROGRAMLISTING></INFORMALEXAMPLE>


<PARA>Thats all there is to making regular items. The rest is just adding functionality to what you already know. We will get much deeper into what you can do with items in <xref linkend="objcomplex"> but first we will go over a debugging example and then all the special DIL functions made for objects.</PARA>

</SECT1> <sect1 id="objdebug"> <TITLE>Compiling and Debugging your first object</TITLE>

<PARA>As we have previously mentioned in <xref linkend="rmdebug"> and <xref linkend="npcdebug"> it is always a good idea to build one or two things and then compile to make finding errors easy. In this case we have one object to compile and rather than having all the rooms and NPCS get in my way while compiling it I have removed them and only have the '%objects' section. The following is what the zone looks like when it has only one object in it.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOW creator {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%objects

dragon_head

title "a gold dragon head"

descr "A large golden dragon head is laying here looking sad."

names {"large golden dragon head","large gold dragon head, "golden dragon head","large dragon head","gold dragon head", "dragon head","large head", "sad head","head"}

extra {} "The head is large and beautiful, at least as beautiful as a dead dragon head can be. There is an extreme look of sorrow on the dragons face and it seems to be for much more than its own death."


extra {"gold dragon head face","dragon head face","head face","face"} "Looking into the dragons face your eyes are drawn to the eyes of the dead dragon. Could there be something there?"

extra {"eyes","eye"} "A world of blue skies and no storms is visible through the eyes and it seems to be moving as if you were watching the world from space."

manipulate MANIPULATE_TAKE,MANIPULATE_HOLD

height 33 weight 50

extra {"$get_s"} "You suddenly feel very sad for a world that you don't even know."

extra {"$get_o"} "A strange look of sadness crosses $1ns face."

extra {"$drop_s"} "You feel much happier but you remember a feeling of great sorrow."

extra {"drop_o"} "$1n seems to cheer up a bit."

end

%end

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>I removed the '%rooms' and '%mobiles' sections added a '%objects' section and stuck the dragon head in and now its ready to be compiled and put into the <ACRONYM>VME</ACRONYM> server for you to be able to look at it in the game. If you downloaded our example zones for this document you can compile this zone along with us and fix the errors as we do for practice. The filename is debug_obj.zon. Just so you know the errors in this zone are intentional so please don't write me an email telling me that there are errors in it.</PARA>

<PARA>The command to compile the zone is <command>VMC debug_obj.zon</command>. Here is what we get when we first try and compile the zone.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_obj.zon' <debug_obj.zon> @ 65: EOF in string debug_obj.zon: 5: parse error Token: '{' debug_obj.zon: 25: parse error Token: 'golden' Grave errors in file 'debug_obj.zon'.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This error file doesn't look any harder than the last one we dealt with when compiling our first room or NPC. We can not stress enough always fix the smallest numbered error first. In this case the lowest numbered error shows up in line five of the zone. The error says something is wrong with the '{' but looking at the line it is obvious the compiler got confused because I forgot 's' at the end of 'creators'. If we fix line five and recompile this is what we get:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_obj.zon' <debug_obj.zon> @ 65: EOF in string debug_obj.zon: 25: parse error Token: 'golden' Grave errors in file 'debug_obj.zon'.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now we have come to another one of those weird errors. If you look at line 25 you will find that the line looks like it is correct. As we have said before when you find an error like this it most likely means that you are missing a quote or a '{}'. The only way to find the problem is start at the quote or '{}' before the word in the error and go backwards through the file till you find a missing one. Lucky for us the missing one is in the very next string. If you add a double quote just before the ending comma on line 24 and recompile you will get the following:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_obj.zon' debug_obj.zon: 42: parse error Token: ',' Compilation aborted.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This error is a little tricky. It seems to be pointing at the ',' as the problem. If you look at the line though and remember what you need for a manipulate field you will notice that the surrounding '{}' are missing. The reason the compiler is pointing at the comma is because it doesn't understand what to do with the comma with out the '{}' grouping symbols. Fixing these and recompiling results in the following message from the compiler.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

<ACRONYM>VMC</ACRONYM> v2.0 Copyright (C) 2001 by Valhalla [May 9 2001] Compiling 'debug_obj.zon' <ACRONYM>VMC</ACRONYM> Done.

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Notice there are no errors and it says '<ACRONYM>VMC</ACRONYM> done', this means that you have now successfully compiled the zone. This is the last debugging walk through in the manual. If you still have a lot of trouble figuring out errors don't stress compiling is an art the more you do it the easier it will get. We suggest you take the zones we have provided in our release and create errors so you can get used to the messages you will see when you are making your own zones. Never be afraid to ask for help from someone else sometimes a bug is so simple you will over look it and sometimes it just takes a second person a single glance to find it. Another trick to finding errors if you have been looking for more than 5 minutes take a break and come back in 10 minutes sometimes that short relaxing time will help you find the problem.</PARA>

<PARA>You have now compiled your first object. The steps are the same to get it into the game as it was for the rooms and NPCs. We will not go over them again except to say copy your files that the compiler made over into the zone directory of your mud and reboot. From there log on and you should be able to <command>wstat</command> and <command>load</command> your object by using its full symbolic name. It would be a good idea to try and get this zone into your server and lay with the object a bit so when you get to <xref linkend="objcomplex"> you will be ready for anything.</PARA> </SECT1>

<sect1 id="objdilfunc"> <TITLE><ACRONYM>DIL</ACRONYM> functions for objects</TITLE>

<PARA>The <ACRONYM>DIL</ACRONYM> language is the language a builder can use to make his own special functions on rooms, NPCs, objects, PCs, and much more. This manual is for basic zone writing and therefore will not go into how to write your own <ACRONYM>DIL</ACRONYM> functions. The <ACRONYM>VME</ACRONYM> however is released with many functions for you as an Administrator and your builders to use to make special rooms, NPCs, and objects. The following sections contain a full list of all object functions released with the <ACRONYM>VME</ACRONYM> 2.0 server.</PARA>

<sect2 id="objdilrestrict"> <TITLE>Restriction functions</TITLE>

<PARA>The desire to have different equipment comes from every players desire to be different. The restrict functions were designed to help make this a reality by only allowing certain groups of players to wear some items. The restrict functions can be used alone or together to make a greater restricted item. for example you could make an item, restricted to only females or you could make an item, restricted to females that had a strength greater than 20 and who have done a certain quest.</PARA>

<PARA>All restrict functions have a name that describes what the restriction function is for and four other arguments. the 2nd, 3rd, and 4th argument is the exact same for all restrict functions only the name of the restrict and the first argument changes. The format for the restrict functions is as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy <function name> (arg 1, <max damage>, <percentage>,<Optional <ACRONYM>DIL</ACRONYM>>);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>We will skip the function name and the first argument and get back to them later.</PARA>

<VARIABLELIST>

<VARLISTENTRY> ;max damage and percentage <DICTDEF>

<PARA>The second and third arguments set the damage done when the wrong player wears an object. The reason we are explaining them together is they can work together or separately depending on how you set them. The second argument is the max damage the third argument is the percentage damage.</PARA>

<PARA>When both arguments are set to 0 no damage will be done when the item is illegally worn. When the second argument is set to a number like 100 and the third argument is set to 0, exactly 100 damage will be done to the player no matter how many hit points he/she has. So by setting the second argument to a number and setting the third to 0 you could possibly kill your victim since it will remove the amount specified no matter how much the player has.</PARA>

<PARA> If you do not want to possibly kill your victim the Third argument should be used. If you set the second argument to 0 and the third argument to a number it will do a percent of damage to the player. for example if The third argument was set to 25 it would do 25 % damage to a player.</PARA>

<PARA> You can also use the second and third argument together if you want to set a max amount of damage without possibly killing them. for example if you set the second argument to 100 and third to 25. The item will do 25% damage up to 100 hit points of damage. This all might be a bit confusing so let me show you a few examples and tell you what they would do.</PARA>

<VARIABLELIST>

<VARLISTENTRY> ;second= 0 third = 25 <DICTDEF> <PARA>This would do 25% damage to a player. second =100 third = 0 this would do 100 damage to a player no matter his amount of hit points.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;second = 25 third = 25 <DICTDEF> <PARA>This would do 25 % damage to a player up to 25 hit points. So if a player had 150 hit points the max that could be removed is 25 hit points.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;optional <ACRONYM>DIL</ACRONYM> <DICTDEF> <PARA>All restrict DIL functions have a default set of acts. If you want to make your own set of acts you have to create your own <ACRONYM>DIL</ACRONYM> that does nothing more than act. If you don't understand how this works. You may want to look in the <ACRONYM>DIL</ACRONYM> manual about passing DIL functions as arguments.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>Now we should get back to the first argument and function name since they are what control the restricts. The function name has been chosen so you can easily tell what the restrict was created for while the first argument changes depending on which restrict you use. The following are what each function restricts name is and what the function name and first argument are.</PARA>

<VARIABLELIST>

<VARLISTENTRY> <TERM>Guild Restrict</term> <LISTITEM> <PARA> <indexterm> <primary>Guild Restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players in a certain guild or guilds. Anyone not in the guild or guilds, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin guild_restrict (guilds:stringlist,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is a stringlist. This means you can restrict this item to more than one guild. All guilds in the string list will be able to wear this object. If we wanted to make an item that only Paladins and sorcerers could wear it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy guild_restrict@function ({"Midgaard Paladin", "Midgaard Sorcerer"},0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY> <VARLISTENTRY> ;Anti-guild Restrict <DICTDEF> <PARA><indexterm> <primary>Anti-guild Restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players not in a certain guild or guilds. Anyone not in the guild or guilds listed, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin anti_guild_restrict (guilds:stringlist,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is a stringlist. This means you can restrict this item from more than one guild. All guilds in the string list will not be able to wear this object. If we wanted to make an item that only Paladins and sorcerers could not wear it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy anti_guild_restrict@function ({"Midgaard Paladin", "Midgaard Sorcerer"},0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>


</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Quest Restrict <DICTDEF> <PARA><indexterm> <primary>Quest Restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players who have done a certain quest. Any player who has not done the quest, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin quest_restrict (qst:string,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is a string. The quest restrict is only made to restrict the by one quest at a time. If you want the item to have multiple quests restrictions you just add another dilcopy to it. The following Would be an object restricted to one quest.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy quest_restrict@function ("Eagles quest complete",0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Quests Restrict <DICTDEF> <PARA><indexterm> <primary>Quests Restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players who have a certain quest or quests. Anyone not having all quests in the list of quests, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin quests_restrict (qsts:stringlist,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is a stringlist. This means you can restrict this item to more than one quest. Players that have not done every quest will not be able to use the object. If we wanted to make an item that only players that have finished both the 'Eagles quest complete' and the 'Feather fall quest complete' could wear. It would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy quests_restrict@function ({"Eagles quest complete", "Feather fall quest complete"},0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Alignment Restrict <DICTDEF> <PARA><indexterm> <primary>Alignment Restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players with a certain alignment range. Anyone not in the alignment range, will have the damage done as set in the 3nd and 4th arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory.</PARA>

<PARA>We said at the beginning of this section that all restricts have only 4 arguments. This was a bit of a lie since this restrict has five arguments. The reason we didn't count this one is because the first and second argument in the alignment restrict function are used together and thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin ali_restrict (max:integer,min:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first and second arguments are two integers. the first is the max alignment that can wear or use this object and the second is the minimum alignment. So if we wanted to restrict an item to only good players it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy ali_restrict@function (1000,350,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Level restrict <DICTDEF> <PARA><indexterm> <primary>Level restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players above or equal to a certain level. Any player not at least the level or higher, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. This restrict works in the old level system from one to fifty which means if the level restrict is set higher than fifty no player will be able to wear or use this object. This is good if you have objects that only your administrators should be able to use. If you want to restrict an object to greater than level fifty for players you need to use the 'vlevel' restrict. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin level_restrict (lvl:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>


<PARA>As the definition indicates the first argument is an integer. The integer for the level restrict can range from 1 to 255. Thus if we wanted to make an object that only administrator could wear or use it would look like this</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy level_restrict@function (51, 0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Virtual Level Restrict <DICTDEF> <PARA><indexterm> <primary>Virtual Level Restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players above or equal to a certain level. Any player not at least the level or higher, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. This restrict works in the new level system from one to infinity. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin vlevel_restrict (lvl:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is an integer. The integer for the level restrict can range from 1 to infinite. Thus if we wanted to make an object that only players that have reached the level of 5000 could wear or use, it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy vlevel_restrict@function (5000, 0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>


</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Race restrict <DICTDEF> <PARA><indexterm> <primary>Race restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object from players of a certain race. Any player not of the selected race, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin race_restrict (rc:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is an integer. The integer being passed in should be the race you want to restrict the object from. You can pass in the defines as listed in <xref linkend="app-c"> or if you have added races you will find the list of races in values.h. If we wanted to restrict an object from humans the following is what it would look like.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy race_restrict@function (RACE_HUMAN,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Gender restrict <DICTDEF> <PARA><indexterm> <primary>Gender restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players of a certain gender. Anyone not of the gender, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin sex_restrict (sx:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is an integer. The integer you should pass in is one of the defines from vme.h. The gender defines are as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define SEX_NEUTRAL 0 #define SEX_MALE 1 #define SEX_FEMALE 2

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If we wanted to make an item that could only be worn by a female player, it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy sex_restrict (SEX_FEMALE,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Player restrict <DICTDEF> <PARA><indexterm> <primary>Player restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object to players who have a specific name. Any player of the wrong name, will have the damage done as set in the 2nd and 3rd arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin ply_restrict (pname:string,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first argument is a string. The quest restrict is only made to restrict the quest to one person at a time. While this <ACRONYM>DIL</ACRONYM> was designed to be put on when a player receives a quest item and thus was made to be dilcopied in a <ACRONYM>DIL</ACRONYM> you can still put it on when you first create the object if you are making special items for administrators or players that you know in advance. If you want more information about copying a <ACRONYM>DIL</ACRONYM> from with in another <ACRONYM>DIL</ACRONYM> you will have to read the <ACRONYM>DIL</ACRONYM> manual If however you want to restrict this to a single player at compile time of your zone it would look something like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy ply_restrict@function ("Whistler",0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Ability restrict <DICTDEF> <PARA><indexterm> <primary>Ability restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object from a player with less than a certain amount of a certain ability. Any player not having the correct amount of a certain ability, will have the damage done as set in the 3nd and 4th arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory.</PARA>

<PARA>We said at the beginning of this section that all restricts have only 4 arguments. This was a bit of a lie since this restrict has five arguments. The reason we didn't count this one is because the first and second argument in the ability restrict function are used together and thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin abi_restrict (abi:integer,min_abi:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first and second arguments are two integers. the first is the ability type and the second is the amount of that ability the player needs to have or greater to wear or use the item. the ability types can be found in vme.h and are listed here for convenience.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define ABIL_MAG 0 #define ABIL_DIV 1 #define ABIL_STR 2 #define ABIL_DEX 3 #define ABIL_CON 4 #define ABIL_CHA 5 #define ABIL_BRA 6 #define ABIL_HP 7

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you wanted to restrict an object to people having more than 50% strength it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy abi_restrict@function (ABIL_STR,50,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you want to restrict an object to more than one ability you only need to add another restrict to the item. For example if you wanted to restrict it to people having greater than or equal to 50% divine and 30% brain. The item would have these two lines.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy abi_restrict@function (ABIL_DIV,50,0,25,""); dilcopy abi_restrict@function (ABIL_BRA,30,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Skill restrict <DICTDEF> <PARA><indexterm> <primary>Skill restrict Object function</primary> </indexterm></PARA>

<PARA>This function restricts an object from a player with less than a certain amount of a certain skill. Any player not having the correct amount of a certain skill, will have the damage done as set in the 3nd and 4th arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory.</PARA>

<PARA>We said at the beginning of this section that all restricts have only 4 arguments. This was a bit of a lie since this restrict has five arguments. The reason we didn't count this one is because the first and second argument in the skill restrict function are used together and thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin ski_restrict (ski:integer,min_ski:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first and second arguments are two integers. the first is the skill and the second is the amount of that skill the player needs to have or greater to wear or use the item. the skills can be found in <xref linkend="app-g"> and values.h. We have also included the first five skills here for convenience in explaining how the function works.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define SKI_TURN_UNDEAD 0 #define SKI_SCROLL_USE 1 #define SKI_WAND_USE 2 #define SKI_CONSIDER 3 #define SKI_DIAGNOSTICS 4

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you wanted to restrict an object to people having more than 50% 'turn undead' it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy ski_restrict@function (ASKI_TURN_UNDEAD,50,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you want to restrict an object to more than one skill you only need to add another restrict to the item. For example if you wanted to restrict it to people having greater than or equal to 50% in 'turn undead' and 30% in 'scroll use'. The item would have these two lines.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy ski_restrict@function (SKI_TURN_UNDEAD,50,0,25,""); dilcopy ski_restrict@function (SKI_SCROLL_USE,30,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY>

<VARLISTENTRY> ;Spell restrict <DICTDEF>

<PARA>This function restricts an object from a player with less than a certain amount of a certain spell. Any player not having the correct amount of a certain spell, will have the damage done as set in the 3nd and 4th arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory.</PARA>

<PARA>We said at the beginning of this section that all restricts have only 4 arguments. This was a bit of a lie since this restrict has five arguments. The reason we didn't count this one is because the first and second argument in the spell restrict function are used together and thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin sp_restrict (spl:integer,min_sp:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first and second arguments are two integers. the first is the spell and the second is the amount of that spell the player needs to have or greater to wear or use the item. the spells can be found in <xref linkend="app-h"> and values.h. We have also included the first five spells here for convenience in explaining how the function works.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define SPL_LOCK 52 #define SPL_UNLOCK 53 #define SPL_DROWSE 54 #define SPL_SLOW 55 #define SPL_DUST_DEVIL 56

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you wanted to restrict an object to people having more than 50% 'lock' spell, it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy sp_restrict@function (ASPL_LOCK,50,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you want to restrict an object to more than one spell you only need to add another restrict to the item. For example if you wanted to restrict it to people having greater than or equal to 50% in 'lock' and 30% in 'unlock' spells. The item would have these two lines.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy sp_restrict@function (SPL_LOCK,50,0,25,""); dilcopy SPL_restrict@function (SPL_LOCK,30,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Weapon restrict <DICTDEF> <PARA><indexterm> <primary>Weapon restrict Object function</primary> </indexterm></PARA> <PARA>This function restricts an object from a player with less than a certain amount of a certain weapon. Any player not having the correct amount of a certain weapon, will have the damage done as set in the 3nd and 4th arguments unless none is set. Even if no damage is set the object will be removed off of the players equipment and placed in their inventory.</PARA>

<PARA>We said at the beginning of this section that all restricts have only 4 arguments. This was a bit of a lie since this restrict has five arguments. The reason we didn't count this one is because the first and second argument in the weapon restrict function are used together and thus are only really one argument. The following is the definition of the <ACRONYM>DIL</ACRONYM> as found in function.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin weap_restrict (wpn:integer,min_wpn:integer,damage:integer,percent:integer,action:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the first and second arguments are two integers. the first is the weapon and the second is the amount of that weapon the player needs to have or greater to wear or use the item. the weapons can be found in <xref linkend="app-d"> and values.h. We have also included the first five weapons here for convenience in explaining how the function works.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define WPN_BATTLE_AXE 7 /* Two Handed */ #define WPN_HAND_AXE 8 #define WPN_WAR_MATTOCK 9 /* Two Handed */ #define WPN_WAR_HAMMER 10 #define WPN_GREAT_SWORD 11 /* Two Handed */


</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you wanted to restrict an object to people having more than 50% 'battle axe', it would look like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy weap_restrict@function (WPN_BATTLE_AXE,50,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>If you want to restrict an object to more than one weapon you only need to add another restrict to the item. For example if you wanted to restrict it to people having greater than or equal to 50% in 'hand axe' and 30% in 'battle axe' spells. The item would have these two lines.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy weap_restrict@function (WPN_HAND_AXE,50,0,25,""); dilcopy weap_restrict@function (WPN_BATTLE_AXE,30,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM>

</VARLISTENTRY>

</VARIABLELIST>

</sect2> <sect2 id="objdiltuborg"> <TITLE>Tuborg function</TITLE>

<PARA>What game would be complete with out the Denmark water! With that in mind the <ACRONYM>VME</ACRONYM> 2.0 has a tuborg function that makes a drink give endurance and health when drank. The function is defined in function.zon as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin tuborg (s:string);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As the definition indicates the tuborg function only has one argument. The real surprise is that the argument is not used yet in the <ACRONYM>DIL</ACRONYM> so no matter what you set it to it doesn't matter. In the future this argument is going to allow different kinds of tuborgs to be made but for now its just a place holder and all that is needed is a set of double quotes.</PARA>

<PARA>To create a tuborg you just add the following line to your drink container.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy tuborg@function ("");

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2>

<sect2 id="objdilboard"> <TITLE>Message board</TITLE>

<PARA>Every game needs a way for Administrators and players to exchange ideas. The message boards have been designed for this purpose. The boards function can be easy to use or more difficult depending on what all you want them to do. The board function is defined in boards.zon as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilbegin board (idxfile:string,l_res:string,r_res:string,p_res:string,bmax:integer);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This looks pretty hard I know but to make a normal board we have made it as simple as possible while allowing for the boards to be used in almost any situation. After you make your first board it is pretty much block and copy and change the first argument. The arguments are as follows:</PARA>

<VARIABLELIST> <VARLISTENTRY> ;idxfile <DICTDEF>

<PARA>The first argument is the board index filename. It tells the board <ACRONYM>DIL</ACRONYM> what name to store the board under so if you create more boards with the same name they will all be pointing to the same messages. You can put any legal symbolic name in this string and it will work with no problems.</PARA> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;l_res <DICTDEF>

<PARA>the second argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to see if the player looking at the board is allowed to. This requires some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the boards.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//used to restrict players access to a board dilbegin string admin_res (u:unitptr,v:unitptr);

//used to restrict non-admin from removing posts dilbegin string rem_res (u:unitptr, v:unitptr);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>So with the 'admin_res' you could do something like this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy board@boards ("wizbrd","admin_res@boards"...);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Putting the 'admin_res' function in the second argument would make it so only administrators could look at the board. If you put an empty string or two double quotes as the argument it will let anyone look at the board.</PARA>

</LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;r_res <DICTDEF> <PARA>the third argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to see if the player trying to remove a post at the board is allowed to. This requires some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the boards.zon</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//used to restrict players access to a board dilbegin string admin_res (u:unitptr,v:unitptr);

//used to restrict non-admin from removing posts dilbegin string rem_res (u:unitptr, v:unitptr);


</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>So with the 'rem_res' you could do something like this:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy board@boards ("citizen","","rem_res@boards",...);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>With the 'rem_res' in the third argument only administrators can now remove from this board but anyone can look at it because of the empty string in the second argument. Putting an empty string in the third argument will make it so anyone can remove from this board.</PARA>

</LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;p_res <DICTDEF>

<PARA>the forth argument is a <ACRONYM>DIL</ACRONYM> you pass in that does any checks to see if the player trying to post at the board is allowed to. This requires some knowledge in <ACRONYM>DIL</ACRONYM> but we have given some example DIL functions in the boards.zon.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//used to restrict players access to a board dilbegin string admin_res (u:unitptr,v:unitptr);

//used to restrict non-admin from removing posts dilbegin string rem_res (u:unitptr, v:unitptr);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>As you can see we haven't made a post restriction <ACRONYM>DIL</ACRONYM> because as of yet we haven't found a need for one. If you have a need for one just look over the two restrict DIL functions we have already mentioned and you will find it is really easy to make. We want to allow anyone to post so our dilcopy looks like this:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy board@boards ("citizen","","rem_res@boards","",...);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>With the 'rem_res' in the third argument only administrators can now remove from this board but anyone can post to it because of the empty string in the forth argument. The empty string again in the second argument also allows everyone to look at the board.</PARA> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;max <DICTDEF> <PARA>The fifth argument is simply the amount of posts that you want to allow to be posted before the board is full.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>To make a free for all board where everyone can post, remove posts, look at what posts are on the board, and have a max of 50 posts it would simply be as follows:</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy board@boards("citizen","","","",50);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>When making a board for players to post concerns to the administrators and only have the administrators be able to remove them, wile still allowing everyone to read them it would look like this.</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

dilcopy board@boards("citizen","","rem_res@boards","",100);

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2> </sect1>


<sect1 id="objcomplex"> <TITLE>More complex objects</TITLE>

<PARA>In the last sections you learned all the fields and how to make a basic object. In this section we will use the information from the last sections to create some more unique objects for our dragon station zone There is not a lot of new information here we will be using the DIL functions, fields, and flags to make objects we have only mentioned before.</PARA>

<sect2 id="objboard"> <TITLE>Making a communication board</TITLE>

<PARA>In <xref linkend="objdilboard"> you learned all there you need to know about the boards <ACRONYM>DIL</ACRONYM> to create a board. In this small section we are going to show you the rest of a board and what a finished one looks like.</PARA>

<PARA>As with all objects the first step is to fully describe and name your board. We will stick with the space station theme since our goal is to have a complete example zone for you. The boards symbolic, names, title, description and extra turned out like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

info_board

title "a merchant information board" descr "A merchant information Board is mounted on a wall here."

names {"merchant information board","information board","merchant board","board"}

extra {} "A large flashy black steal board."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Just incase the <ACRONYM>VME</ACRONYM> server we have has a spell that can damage inanimate objects we will give this board a material type.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

MATERIAL_METAL("A very fine quality black steel")

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now for the special stuff for the board. We need to give the board a type and copy the board <ACRONYM>DIL</ACRONYM> to it.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

type ITEM_BOARD dilcopy board@boards("info","","rem_res@boards","",100);

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>There you go nothing to it you have just created your first board. Now lets bring it all together and tag on an end symbol and we are all finished.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

info_board title "a merchant information board" descr "A merchant information Board is mounted on a wall here." names {"merchant information board","information board","merchant board","board"}

extra {} "A large flashy black steal board."

MATERIAL_METAL("A very fine quality black steel") type ITEM_BOARD dilcopy board@boards("info","","rem_res@boards","",100);

end

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2>


<sect2 id="objcontainer"> <TITLE>Making a container</TITLE>

<PARA>I thought it would be cool to have a small weapons locker on the space station not to mention event hough we went over the container macro in <xref linkend="objmacrocontainer">, we didn't cover everything you need in fact the macro eaves a few things out because you may or may not want to set them.</PARA>

<PARA>As with all objects we start right off by describing the item. There is nothing new here so we will just show it to you and go on.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

wpn_locker

title "a weapons locker" names {"weapons locker","weapon locker","locker"}

descr "a small weapons locker hangs on the wall here."

extra {} "It is an ordinary weapons locker that looks like it holds any illegal weapons that are taken on the station."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now we need to put in all the information that makes this item a container that can't be taken but it can be opened and it is locked.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

manipulate {MANIPULATE_ENTER} CONTAINER_DEF(500) open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} key black_key

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Notice we didn't make the item 'MANIPULATE_TAKE' because we don't want people to be able to walk off with our weapons locker. One final touch and we are all finished with the weapons locker. It is always nice to put a material type on your items so a spell or a skill can tell if you can do anything with them. So with our material added in the full locker would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

wpn_locker

title "a weapons locker" names {"weapons locker","weapon locker","locker"} descr "a small weapons locker hangs on the wall here."

extra {} "It is an ordinary weapons locker that looks like it holds any illegal weapons that are taken on the station."

MATERIAL_METAL("A very fine quality steel")

manipulate {MANIPULATE_ENTER} CONTAINER_DEF(500) open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} key black_key

end

</PROGRAMLISTING></INFORMALEXAMPLE>


</sect2>

<sect2 id="objdrink"> <TITLE>Creating drinks</TITLE>

<PARA>In <xref linkend="objmacroliqcont">, we covered how to set the size and weight of the container and its content but now we need to talk about some other special things about a drink container verses other objects.</PARA>

<PARA>The drink container is one of the few objects that has rules on how you set the title, description and names fields. The title and description fields should ot have anything to do with the liquid inside the container. This means if you have a barrel full of water you do not put the word water in the title or the description. In our case we have a bag full of wine so we do not put wine in either the title or description. The reason for this is if the player drinks the bag empty and then fills it with water and we had put wine in the title or description it would still be there but the bag would now be full of water.. Our symbolic, title, and description would then look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

liq_ration

title "a red bag" descr "A red bag has been gently placed here."

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>The names on the other hand MUST have the drink name as the last name in the name list. The reason it must be the last one is when a player drinks or pours out the liquid the name is removed. If a player then refills the container the name of the new liquid is added to the last name. The bag we are making is full of wine so our names list would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

names {"red bag", "bag", "wine"}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now we add the liquid define for wine</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

LIQ_WINE(1,2,2,0)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Finally we add the material type for the bag, the cost to buy the container, an extra players can look at, and finally an identify extra so if a player casts either the identify or improved identify spell on the bag they will se it. with all that added The finished drink container looks like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

liq_ration names {"red bag", "bag", "wine"} title "a red bag" descr "A red bag has been gently placed here."

extra {} "A small label reads Tassel Grove's finest. Year 321"


MATERIAL_ORGANIC("a soft plastic") manipulate {MANIPULATE_TAKE} LIQ_WINE(1,2,2,0) cost 2 IRON_PIECE

extra {"$identify"} "Its the special wine from Tassel grove a small halfling village on the planet Valhalla. It seems like a great vintage wine."

end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2 id="objfood"> <TITLE>Creating food</TITLE>

<PARA>The food is very simple to make its just a regular item with the macros you learned in <xref linkend="objmacrofood">. In fact making food is so simple we almost left it out. I am only adding this to show how simple it is to change a regular item like the dragon head we showed you in <xref linkend="objbasic"> into a food item. Now only a sick person would make a dragon head into food but if you wanted to you just add the 'FOOD_DEF(...)' and your all set. here is a basic food that you might find laying around a space station.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

beef_stick

title "a tough leathery stick" descr "A tough leathery looking stick is laying here." names {"tough leathery stick","tough leather stick","leathery stick", "leather stick","tough stick","stick"}

extra {} "This has the word BEEF burnt into it."

manipulate {MANIPULATE_TAKE} FOOD_DEF(5,0) weight 1 cost 1 COPPER_PIECE MATERIAL_ORGANIC("tough beef")

end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2 id="objweapon"> <TITLE>Making a weapon</TITLE>

<PARA>Whats a game with out some kind of weapon to chop or bash things into little pieces. We examined how to set the weapon fields in <xref linkend="objmacroweapon">, the object transfers in <xref linkend="objmacrotransfers">, and the restriction DIL functions in <xref linkend="objdilrestrict">. Now we will pull all we have learned together and make a pretty nifty little stiletto.</PARA>

<PARA>The first part as with all our example objects is to set up the symbolic, names, title, description, object extra, and material type. this is no different from any other object so here is what we ended up with</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

w_stiletto title "a stiletto" names {"stiletto", "dagger"} descr "A deadly looking stiletto has been left here."

extra{} "This looks like a thieves dream come true. "

MATERIAL_METAL("A very fine quality steel")

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now lets add the defines and DIL functions that make this a special weapon along with the manipulate flags that makes it able to be wielded. We will give it a bonus in magic and good craftsmanship along with a plus in backstab for all those assassins on the game.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD} WEAPON_DEF(WPN_DAGGER, 1, 2) SKILL_TRANSFER(SKI_BACKSTAB, 2) dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>to finish it off we will give the weapon a cost, rent, and finally two identifies for the two identify spells. Now that we have it all defined we pull it together and it looks like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

w_stiletto title "a stiletto" names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"} descr "A deadly looking stiletto has been left here."

extra{} "This looks like a thieves dream come true. "

MATERIAL_METAL("A very fine quality steel")

manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD} WEAPON_DEF(WPN_DAGGER, 1, 2) SKILL_TRANSFER(SKI_BACKSTAB, 2) dilcopy abi_restrict@function (ABIL_DEX,10,0,25,""); weight 2 cost 2 GOLD_PIECE rent 1 COPPER_PIECE

extra {"$identify"} "The stiletto looks magical in nature and seems really sharp. You can tell if you wield it you would be able to backstab someone really easy."

extra{"$improved identify"} "The stiletto gives you a magical bonus of +1 and has a quality of +2. It also raises your back stabbing skill by 2%. You have to have at least 10% in dex before you can wield this magical weapon."

end

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2> <sect2 id="objarmour"> <TITLE>Making armour</TITLE>

<PARA>In <xref linkend="objmacroarmour"> we explained how to set the armour fields now we will finish off by adding some more important information about armour in general.</PARA>

<PARA>The most important thing to realize is that not all wear positions on the <ACRONYM>VME</ACRONYM> server are armour positions. In fact only seven of the wear positions count as armour the rest are non-armour positions which we will cover next in <xref linkend="objnon-armour">. The following are the armour positions and their defines.</PARA>

<TITLE>Armour positions</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Position</ENTRY> <ENTRY>Define</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>head</ENTRY> <ENTRY>MANIPULATE_WEAR_HEAD</ENTRY> </ROW> <ROW> <ENTRY>hands</ENTRY> <ENTRY>MANIPULATE_WEAR_HANDS</ENTRY> </ROW> <ROW> <ENTRY>arms</ENTRY> <ENTRY>MANIPULATE_WEAR_ARMS</ENTRY> </ROW> <ROW> <ENTRY>body</ENTRY> <ENTRY>MANIPULATE_WEAR_BODY</ENTRY> </ROW> <ROW> <ENTRY>legs</ENTRY> <ENTRY>MANIPULATE_WEAR_LEGS</ENTRY> </ROW> <ROW> <ENTRY>feet</ENTRY> <ENTRY>MANIPULATE_WEAR_FEET</ENTRY> </ROW> <ROW> <ENTRY>cloak</ENTRY> <ENTRY>MANIPULATE_WEAR_ABOUT</ENTRY> </ROW> </TBODY></TGROUP>

<NOTE><PARA>There is one more field that works as armour, 'MANIPULATE_WEAR_SHIELD' but since that uses another define it is not shown here. We will leave that for an exercise for you to do later.</PARA></NOTE>

<PARA>First we do the same as we have for every other item, pick the symbolic, title, description, extra description, and material type for the plate.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

pol_plate names {"polished breast plate","polished plate","breast plate","plate"} title "a polished breast plate" descr "A polished breast plate has been left here." MATERIAL_METAL("A high luster silver colored metal")

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now we pick the armour type in this case I want it to be made like plate mail and I want it to have a magical bonus and a high craftsmanship. Obviously since this is a plate we will pick the body position.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_DEF(ARM_PLATE,5,9)

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>All that is left is to add the cost, rent, the identify extras, and I felt like putting a 40% strength restriction on the armour. With all that added together we finish up with the following piece of armour.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

pol_plate names {"polished breast plate","polished plate","breast plate","plate"} title "a polished breast plate" descr "A polished breast plate has been left here."

extra{} "This is one shiny plate it seems to be made out of one perfect piece of metal. There doesn't even seem to be any markings of owner ship."

MATERIAL_METAL("A high luster silver colored metal")

manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_DEF(ARM_PLATE,5,9)

dilcopy abi_restrict@function (ABIL_STR,40,0,25,""); cost 2 GOLD_PIECE rent 3 COPPER_PIECE weight 25

extra{"$identify"} "This is a high quality plate with a magical feeling."

extra{"$improved identify"} "The plate has a magical bonus to your defence of a +5 and a quality of +9. You need 40% in strength to be able to wear it." end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect2>

<sect2 id="objnon-armour"> <TITLE>Making non-armour worn objects</TITLE>

<PARA>In the previous section we defined armour that actually protects the char in combat. Here we will learn how to make the clothing and jewelery that may not do anything directly to combat but it can give your characters bonuses that help in combat in the long run. We will start by listing all the non-armour worn positions and their manipulate defines and then we will give a simple ring object.</PARA>

<TITLE>Non-armour positions</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Position</ENTRY> <ENTRY>define</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>ear</ENTRY> <ENTRY>MANIPULATE_WEAR_EAR</ENTRY> </ROW> <ROW> <ENTRY>neck</ENTRY> <ENTRY>MANIPULATE_WEAR_NECK</ENTRY> </ROW> <ROW> <ENTRY>wrist</ENTRY> <ENTRY>MANIPULATE_WEAR_WRIST</ENTRY> </ROW> <ROW> <ENTRY>finger</ENTRY> <ENTRY>MANIPULATE_WEAR_FINGER</ENTRY> </ROW> <ROW> <ENTRY>chest</ENTRY> <ENTRY>MANIPULATE_WEAR_CHEST</ENTRY> </ROW> <ROW> <ENTRY>back</ENTRY> <ENTRY>MANIPULATE_WEAR_BACK</ENTRY> </ROW> <ROW> <ENTRY>waist</ENTRY> <ENTRY>MANIPULATE_WEAR_WAIST</ENTRY> </ROW> <ROW> <ENTRY>ankle</ENTRY> <ENTRY>MANIPULATE_WEAR_ANKLE</ENTRY> </ROW> </TBODY></TGROUP>

<NOTE><PARA>When giving ability, skill, weapon, or spell bonuses make sure you realize that positions like ear, neck, wrist, and ankle can all have two on a player. This means any bonuses you give can be doubled if the player gets two of them</PARA></NOTE>

<PARA>I don't want to beat a dead horse so since I have already explained armour in <xref linkend="objarmour"> the only difference here is there is no 'ARMOUR_DEF' everything else is the same. The following was one of the first items my wife made as a new builder and I have always liked it. I know, I am a lush but this way I don't have to write an example.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

maskwa

names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"} title "a Maskwa ring" descr "A Maskwa platinum ring is laying here." MATERIAL_METAL("Platinum, and other precious metals") extra {} "The ring has a large bear head. Could this be the legendary head of Maskwa? Any thing formed with its head on it is said to strengthen the wearer." type ITEM_WORN manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER} cost 100 COPPER_PIECE rent 50 IRON_PIECE weight 1 STR_TRANSFER(+1) end

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA>One last thing I forgot to mention. The item type also changes but then that is not hard to understand since this is not armour it should be some other thing. In the case of non-armour worn items the item type is 'ITEM_WORN'.</PARA></NOTE> </sect2>

</SECT1>

<sect1 id="roomnpcobjzone"> <TITLE>Dragon station with rooms, NPCs, and objects</TITLE>

<PARA>Now we will add the objects we have built to the zone from the previous chapter. This is still not complete while it does compile and you can log into your zone, you still have to load your NPCs and objects but they do not load themselves and they are not dressed with their armour. This will be taken care of in <xref linkend="ch-07"> and you will finally have a finished zone. The following is the source file so far.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOW creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%rooms

chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. It is unbelievably large the ceiling seems to be a good 200 meeters high and the room is perfectly cubic. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. large passages lead of to the west and the east.."

extra {"chair","chairs"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intellegence looking dragon is sitting perched on a large chair watching you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}


west to disposal_room descr "You see a small room.";

east to hallway descr "You see what looks to be a hallway.";

end

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom. The hallway seems to be dust free. The walls and the floors seem to be made out of the same sterile metal-plastic that all space agencies uses. There are large plate glass windows that open up into space. The hallway is filled with a dim light that seems to come from everywhere yet no where all at once. You notice a glimmer of bright light coming from the windows. To the east you see an air lock and to the west the hallway opens up into a larger room."

extra {"windows","window"} "Your eyes are drawn to a large ship lit up with running lights sitting about 1 kilometer from the station."

extra{"floor","walls","wall"} "Well what can be said it looks to be in perfect condition. what else would you want to know?"

extra {"large ship" ,"ship"} "The ship looks really big and is shaped like a dragon. The scales sparkle and seem to be multiple colors."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station. The room is as large as the other rooms big enough for Dragons to lounge while still having a desk in one corner small enough for a humanoid. The floor along the north wall is lined with some kind of fabric and seems very soft to walk on, it may be some kind of dragon lounge judging by how large an area it covers. There is a passage to the west."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"paintings","painting"} "The paintings are of many dragons and riders in all kinds of tasks from combat to look out. All the figures seem to be staring at a staff being held by a depiction of a wizard on the south wall."

extra {"wizard","staff"} "The wizard has his hand stretched out and it seems there is a place you can almost grab the staff. Maybe if you searched the staff you would find it."

extra {"desk"} "Its a desk alright but there doesn't seem to be any drawers and it seems totally empty."

extra{"fabric"} "Wussshhhhh you bound across the comfortable floor wasn't that fun."

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

SECRET_DOOR_DIFFICULTY(SOUTH, 50) south to portal_room descr "You see what looks to be a portal room." keyword {"air lock door","air lock","staff","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};

end

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"} "The field looks to be a green fog shifting and churning as you watch. if you are nuts you could probably enter it."

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

//A link to the portal is also here from room_port end

ship_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in ship

dilcopy force_move@function( //Time to activation 4, //room and act "portal_room@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

room_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you." movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in portal_room

dilcopy force_move@function( //Time to activation 4, //room and act "ship@dragonst!You feel your body dissolving for lack of a better description.&nYou appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

disposal_room title "Red field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a red field right in the center. there is a door that leads to another room to the east."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"red field","field"} "The field looks to be a red fog shifting and churning as you watch. if you are nuts you could probably enter it."

east to chamber descr "You see the main chamber.";

//A link to the portal is also here from dis_port end

dis_port names {"red field","field"} title "Red field" descr "Red Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS} dilcopy force_move@function( //how fast to force move in seconds 4, //room to force move to and act "deathspace@dragonst!You feel your body dissolving for lack of a better description.", //true or false random move or not 0); in disposal_room

end

ship title "War dragon" descr "Blue light softly glows from con duets that line the walls of this ship. The floors beside the east and west wall have what looks to be soft fabric covering. The south wall has small controls that seem to be made for humanoids with two small chairs that look to be pilot seats. view portals are about 50 meters up the side of the ship on the west and east wall and some kind of electronic screen covers the south wall. The ship seems to be a one room ship but there is a green field by the north wall."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"view port"} "Sorry your not 50 meters tall maybe it is made for a dragon?"

extra {"view screen","screen"} "It seems to be the pilots view screen but you can't seem to see a way to turn it on."

extra {"controls","control"} "The controls are in some weird language and your afraid if you start pushing buttons you might rocket in to the station or worse slam into a planet."

extra {"soft fabric","fabric"} "It looks to be a dragon lounge area."

//A link to the portal is also here from ship_port end

deathspace title"Open space" descr "You see the ship and the station far off in the distance and you are in Space!"

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

dilcopy death_room@function ( //how often is damage done 4 would be 1 second 4, //damage 400, //act for the damage. "You realize to late that was the trash disposal transporter and you feel your lungs explode.");


end

%mobiles

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eye","eyes"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

M_DRAGON_BLACK_OLD(SEX_MALE)

end

janitor names {"ugly janitor", "janitor", "hobgoblin"} title "an ugly janitor" descr "an ugly janitor is walking around, cleaning up."

extra{} "This ugly green thing looks more goblin than hobgoblin but he seems intent on cleaning everything around him."

M_AVG_HOBGOBLIN(6, SEX_MALE)

// he is sort of good for cleaning so much alignment 900

//give him some money money 5 IRON_PIECE

dilcopy janitors@function(15);

// only want him cleaning the station dilcopy wander_zones@function("dragonst", 20, 1, 1);

end

bob

names {"Bob"} title "Bob" descr "Bob the Banker is here, sitting behind the counter." extra {} "He has a very serious look on his face."

// define from composed.h M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)

//discourage people from killing banker exp -500

flags {UNIT_FL_NO_TELEPORT}

special SFUN_BANK end

%objects

info_board

title "a merchant information board" descr "A merchant information Board is mounted on a wall here." names {"merchant information board","information board","merchant board","board"} extra {} "A large flashy black steal board."

MATERIAL_METAL("A very fine quality black steel") type ITEM_BOARD dilcopy board@boards("info","","rem_res@boards","",100);

end

w_stiletto title "a stiletto" names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"} descr "A deadly looking stiletto has been left here."

MATERIAL_METAL("A very fine quality steel") manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD} WEAPON_DEF(WPN_DAGGER, 1, 2) weight 2 cost 2 GOLD_PIECE rent 1 COPPER_PIECE

SKILL_TRANSFER(SKI_BACKSTAB, 2) dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");

extra{} "This looks like a thief dream come true. "

extra {"$identify"} "The stiletto looks magical in nature and seems really sharp. You can tell if you wield it you would be able to backstab someone really easy."

extra{"$improved identify"} "The stiletto gives you a magic bonus of +1 and has a quality of +2. It also raises your back stabbing skill by 2%. You have to have at least 10% in dex before you can wield this magical weapon."

end

wpn_locker

title "a weapons locker" names {"weapons locker","weapon locker","locker"}

descr "a small weapons locker hangs on the wall here." manipulate {MANIPULATE_ENTER} CONTAINER_DEF(500) open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} weight 400 MATERIAL_METAL("A very fine quality steel")

extra {} "It is an ordinary weapons locker that looks like it holds any illegal weapons that are taken on the station."

end

pol_plate names {"polished breast plate","polished plate","breast plate","plate"} title "a polished breast plate" descr "A polished breast plate has been left here." extra{} "This is one shiny plate it seems to be made out of one perfect piece of metal. There doesn't even seem to be any markings of owner ship." manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_PLATE(5,9)

MATERIAL_METAL("A high luster silver colored metal")

manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_DEF(ARM_PLATE,5,9) dilcopy abi_restrict@function (ABIL_STR,40,0,25,""); cost 2 GOLD_PIECE rent 3 COPPER_PIECE weight 25

extra{"$identify"} "This is a high quality plate with a magical feeling."

extra{"$improved identify"} "The plate has a magical bonus to your defence of a +5 and a quality of +9. You need 40% in strength to be able to wear it." end

liq_ration names {"red bag", "bag", "wine"} title "a red bag" descr "A red bag has been gently placed here."

MATERIAL_ORGANIC("a soft plastic") manipulate {MANIPULATE_TAKE}

LIQ_WINE(1,2,2,0) cost 2 IRON_PIECE extra {} "A small label reads Tassel Grove's finest. Year 321"

extra {"$identify"} "Its the special wine from Tassel grove a small halfling village on the planet Valhalla. It seems like a great vintage wine."

end

beef_stick

title "a tough leathery stick" descr "A tough leathery looking stick is laying here." names {"tough leathery stick","tough leather stick","leathery stick", "leather stick","tough stick","stick"}

extra {} "This has the word BEEF burnt into it."

manipulate {MANIPULATE_TAKE} FOOD_DEF(5,0) weight 1 cost 1 COPPER_PIECE MATERIAL_ORGANIC("tough beef") end

maskwa

names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"} title "a Maskwa ring" descr "A Maskwa platinum ring is laying here." MATERIAL_METAL("Platinum, and other precious metals") extra {} "The ring has a large bear head. Could this be the legendary head of Maskwa? Any thing formed with its head on it is said to strengthen the wearer." type ITEM_WORN manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER} cost 100 COPPER_PIECE rent 50 IRON_PIECE weight 1 STR_TRANSFER(+1) end

%end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect1>


<sect1 id="objexer"> <TITLE>Suggested object exercises</TITLE> <orderedlist> <LISTITEM> <PARA>Using information you learned in <xref linkend="objcraft">, <xref linkend="objmag">, <xref linkend="objmacroshield">, and <xref linkend="objarmour"> create a large shield.</PARA> </LISTITEM> <LISTITEM> <PARA>Using information you learned in <xref linkend="objnon-armour"> and <xref linkend="objmacrotransfers"> create a ring that gives a person 5% strength bonus and removes 5% magic ability.</PARA> </LISTITEM> <LISTITEM> <PARA>Using information you learned from <xref linkend="objmacroliqcont"> and <xref linkend="objdrink"> create a beer or soda from your local area.</PARA> </LISTITEM> <LISTITEM> <PARA>Using information you learned in <xref linkend="objmacrolight">; make an object that gives off a bright light and will never run out.</PARA> </LISTITEM> <LISTITEM> <PARA>Using the macros found in <xref linkend="objmacroliqcont">, <xref linkend="objmacrofood">, <xref linkend="objmacromoney">, and <xref linkend="objmacrocontainer"> along with information found in <xref linkend="objfood"> and <xref linkend="objdrink">; create a chest that can be locked that contains food, drink, a pile of silver pieces, and a pile of iron pieces. </PARA> </LISTITEM> </orderedlist>

</SECT1>

</chapter>

<chapter ID="ch-07"><?dbhtml filename="ch07.html"> <TITLE>The reset section</TITLE>

<PARA>Once you have learned to build rooms, objects and NPCs, you will find one main missing thing, while you have created NPCs and objects they don't exist in the game unless you load them. When developing the <ACRONYM>VME</ACRONYM> we found that logging on and loading everything for the players to interact with, became a very difficult thing to do when we got over 30 items. After many seconds of thought we came up with the idea of a reset section that would do all of this work for us. In fact the reset takes care of closing doors after players have opened them, loading NPCs and their equipment, loading objects by themselves in rooms or even loaded objects in objects.</PARA>

<PARA>Everything inside the reset section activates once at boot time and then again when the reset time is up and the reset flag is true. These two fields were described in <xref linkend="zoneinfo"> and are included in the zone header. The reset section is denoted by the symbol '%reset' and can placed anywhere but we try to keep it at the end of our zone files. There is no set order you must reset your doors, objects, and NPCs in but I like to do doors first, special reset commands second, objects in rooms third, objects with objects in them forth, NPCs fifth, and finally NPCs. You may find that you have a better way of sorting them and again it is up to you.</PARA>

<sect1 id="doorreset"> <TITLE>Door resets</TITLE>

<PARA>To show how the door resets work we will revisit an old room example from <xref linkend="rmdoorexits">. The following two rooms are linked with a door and at boot time they are reset to closed. When the mud boots the door flags set on the room are the door flags that are used. After boot up time the reset section is where the <ACRONYM>VME</ACRONYM> gets its information about what to do with the door.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom...."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station...."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED}; end

</PROGRAMLISTING></INFORMALEXAMPLE>


<PARA>Now that we have two rooms lets define the reset command and how it works. All reset commands have a keyword and then a set of arguments. The door reset command is simply 'door' followed by a set of arguments that tell the <ACRONYM>VME</ACRONYM> where the door is, which door in that location, and what you want to do with the door. The command looks like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

door <room symbol> <Direction number> {<door flags>}

</PROGRAMLISTING></INFORMALEXAMPLE>

<VARIABLELIST> <TITLE>Door argument explanation</TITLE> <VARLISTENTRY> ;room symbolic <DICTDEF> <PARA>As the name indicates this is the room that the door is located in. If you are resetting a door not in the zone the reset command is in you will need to use a full symbolic name with the zone extension. The following would be two valid examples.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//room symbolic in this zone door myroom ...

//room symbolic in another zone door out_room@frogwart ...

</PROGRAMLISTING></INFORMALEXAMPLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;direction number <DICTDEF> <PARA>The direction number can be one of the pre-defined direction numbers in the file vme.h. shown here so you don't have to go flipping file to file.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define NORTH 0 #define EAST 1 #define SOUTH 2 #define WEST 3 #define UP 4 #define DOWN 5 #define NORTHEAST 6 #define NORTHWEST 7 #define SOUTHEAST 8 #define SOUTHWEST 9


</PROGRAMLISTING></INFORMALEXAMPLE> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;door flags <DICTDEF>

<PARA>These flags, surrounded by '{}', describe the state of the door after the reset. The following is the list of possible door flags.</PARA>

<VARIABLELIST> <VARLISTENTRY> ;EX_OPEN_CLOSE <DICTDEF> <PARA> Set this if you can open and close this exit, be it a door, gate or otherwise.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_CLOSED <DICTDEF> <PARA>Set this if you want the exit to be closed at reset time.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_LOCKED <DICTDEF> <PARA>Set this if you want the exit to be locked at reset time.</PARA> <NOTE> <PARA>An interesting aspect is that if you do not specify a key, you can only unlock this door with the 'pick' skill, 'unlock' spell or from <ACRONYM>DIL</ACRONYM> with UnSet();</PARA> </NOTE> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_PICK_PROOF <DICTDEF> <PARA>Using this flag renders the 'pick' skill and 'unlock' spell un useable on the lock of this exit.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;EX_HIDDEN <DICTDEF> <PARA>If this bit is set, the exit is hidden until the mobile has successfully searched for it, using the 'search'-command.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>


<PARA>Now that we have all the information we need we can close the door after the reset time expires. For our two rooms the door reset would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED} door office WEST {EX_OPEN_CLOSE, EX_CLOSED}

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA>As you can see from the example it is very important to close both sides of the door. If you do not close both sides you will get very weird and undefined errors when players are trying to open and close them</PARA></NOTE>

<PARA>Another thing that you can do with the door reset command is change the doors status. In our previous example we reset the door to its status that it has when it first is loaded into the game. If however we wanted to change the door to a locked door we could do that by adding the locked flag like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect1>

<sect1 id="resetloadobjnpc"> <TITLE>Loading objects and NPCs</TITLE>

<PARA>Time to start loading your zone with its life and all the other strange things you have built. There is two commands that do all the loading and equipping of objects. Oddly enough the commands are called 'load' and 'equip'. The format of the commands are almost the same but equip must be used inside a NPC grouping. With that in mind lets start with simple loads and work our way up.</PARA>

<PARA>The command to load an object or an NPC into a room is as follows:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load <object or NPC> [into] [<room<] [<load amount>] [{Other loads and equip commands}]

</PROGRAMLISTING></INFORMALEXAMPLE>

<VARIABLELIST>

<VARLISTENTRY> ;object or NPC <DICTDEF> <PARA>The first argument to the load command is the object or NPC symbolic name that you want to load. The first argument is the only one that must be included in all load commands.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;into <DICTDEF> <PARA>This is just a symbol that tells the reset that we are loading the object or NPC into some other unit.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;object, NPC, and room <DICTDEF> <PARA>The third argument is the symbolic name of the place where you are loading the object and the NPC.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;load amount <DICTDEF> <PARA>the fourth argument is an optional argument that tells the reset how many of the objects are allowed in the world, zone, or locally. The possible values for this field are as follows:</PARA>

<VARIABLELIST> <VARLISTENTRY> ;max <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the entire world is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;local <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the location of which the unit is to be loaded into is scanned for occurences of the loaded unit only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;zonemax <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the entire zone being reset is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;Optional grouping <DICTDEF>

<PARA>Any reset command may be followed by a pair of curly brackets {} containing more reset commands. The commands inside the brackets will only be executed in case the associated command was successful.</PARA>

</LISTITEM> </VARLISTENTRY>

</VARIABLELIST>

<PARA>Don't be alarmed if this sounds a bit hard. It all gets much more clear as some examples are explained. Lets take a look at the following example and see if we can't make this much more clear.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load udgaard/fido into midgaard/temple max 1

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This example is pretty simple it says load the fido into the temple only if there isn't already 1 in the world. Now lets get a bit more complicated.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load udgaard/fido into midgaard/temple max 1 { load bone load excrement into midgaard/temple }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Now we have said again load the fido into the temple if there is not already one in the world. Then if fido loads fill his inventory with a bone and load excrement into the temple as well.</PARA>

<PARA>We can get even more complicated but still just using the load commands by doing the following</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load udgaard/fido into midgaard/temple max 1 { load bone load excrement into midgaard/temple load bag { load apple max 1 } }


</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>now we still have the fido loading if there isn't one already in the world then the bone and the excrement and finally we load a bag. If there isn't an apple already in the world we load the bag with a apple in it other wise the bag will be empty.</PARA>

<PARA>Well that should be enough load examples for now but we will get right back to them in a bit. Now we should introduce another reset command called the 'equip' command that we have already mentioned. The 'equip' command works a lot like load but has much simpler arguments. The 'equip' command is as follows.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

equip <symbol> position [load amount <num>]

</PROGRAMLISTING></INFORMALEXAMPLE> <VARIABLELIST> <VARLISTENTRY> ;symbol <DICTDEF> <PARA>The first argument is just the symbolic name of the item being worn by the NPC.</PARA>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;position <DICTDEF> <PARA>The position is any of the positions available in the vme.h. The following are all the positions along side there defines as found in the vme.h.</PARA>

<TITLE>Wear positions</TITLE> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Position</ENTRY> <ENTRY>Define(s)</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>head</ENTRY> <ENTRY>WEAR_HEAD</ENTRY> </ROW> <ROW> <ENTRY>hands</ENTRY> <ENTRY>WEAR_HANDS</ENTRY> </ROW> <ROW> <ENTRY>arms</ENTRY> <ENTRY>WEAR_ARMS</ENTRY> </ROW> <ROW> <ENTRY>body</ENTRY> <ENTRY>WEAR_BODY</ENTRY> </ROW> <ROW> <ENTRY>legs</ENTRY> <ENTRY>WEAR_LEGS</ENTRY> </ROW> <ROW> <ENTRY>feet</ENTRY> <ENTRY>WEAR_FEET</ENTRY> </ROW> <ROW> <ENTRY>cloak</ENTRY> <ENTRY>WEAR_ABOUT</ENTRY> </ROW> <ROW> <ENTRY>shield</ENTRY> <ENTRY>WEAR_SHIELD</ENTRY> </ROW> <ROW> <ENTRY>hold</ENTRY> <ENTRY>WEAR_HOLD</ENTRY> </ROW> <ROW> <ENTRY>wield</ENTRY> <ENTRY>WEAR_WIELD</ENTRY> </ROW> <ROW> <ENTRY>ear</ENTRY> <ENTRY>WEAR_EAR_R and WEAR_EAR_L</ENTRY> </ROW> <ROW> <ENTRY>neck</ENTRY> <ENTRY>WEAR_NECK_1 and WEAR_NECK_2</ENTRY> </ROW> <ROW> <ENTRY>wrist</ENTRY> <ENTRY>WEAR_WRIST_R and WEAR_WRIST_L</ENTRY> </ROW> <ROW> <ENTRY>finger</ENTRY> <ENTRY>WEAR_FINGER_R and WEAR_FINGER_L</ENTRY> </ROW> <ROW> <ENTRY>chest</ENTRY> <ENTRY>MANIPULATE_WEAR_CHEST</ENTRY> </ROW> <ROW> <ENTRY>back</ENTRY> <ENTRY>MANIPULATE_WEAR_BACK</ENTRY> </ROW> <ROW> <ENTRY>waist</ENTRY> <ENTRY>MANIPULATE_WEAR_WAIST</ENTRY> </ROW> <ROW> <ENTRY>ankle</ENTRY> <ENTRY>WEAR_ANKLE_R and WEAR_ANKLE_L</ENTRY> </ROW> </TBODY></TGROUP>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY>

;load amount <DICTDEF> <PARA>the fourth argument is an optional argument that tells the reset how many of the objects are allowed in the world, zone, or locally. The possible values for this field are as follows:</PARA>

<VARIABLELIST> <VARLISTENTRY> ;max <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the entire world is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;local <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the location of which the unit is to be loaded into is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;zonemax <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the entire zone being reset is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </LISTITEM> </VARLISTENTRY>

</VARIABLELIST>

<PARA>Now with the equipment command you can now get your NPCs dressed and ready for battle. The 'load' and 'equip' commands are not the easiest though so lets go through some simple examples.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load guard into jail { equip helmet WEAR_HEAD equip plate WEAR_BODY equip pants WEAR_LEGS equip specialsword max 1 load brass_key }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This is how you would equip a NPC with all items from the current zone. As you can see we didn't need full symbolics because the server knows to grab the items from the zone the resets are in.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load guard into safe_room max 2 { equip plate WEAR_BODY load powersword max1 { load silver_pile into safe_room } }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>In this example we only load the silver pile if the guard loads and if the power sword loads which may or may not happen since there is only a max of one sword allowed while there is a max of 2 guards allowed. What will happen in this case is at the first reset there will be one guard and one pile of silver. The next reset there will still only be one pile of silver but now there will be two guards.</PARA>

<PARA>Hopefully you have got the basic resets down. If not don't worry there are plenty more examples to come and we still have to make the resets for our dragon station zone.</PARA> </sect1>


<sect1 id="resetfunction"> <TITLE>Special reset functions</TITLE>

<PARA>Now that we have gone over the basic load and equip commands we have some special commands that you can add to them to make them do more interesting things. Sometimes when doing resets you don't always want items or NPCs to load or sometimes you want them to load but only if a certain amount of other things correctly load. There are also times you want to clear the rooms or reload an entire object after removing the old one. All these things and more can be accomplished with the reset section. </PARA>

<sect2 id="resetcomplete"> <TITLE>The complete directive.</TITLE>

<PARA>The 'load' and 'equip' commands have one more argument that can be placed at the end of them to make them act a bit different.the complete directive. In the case where this directive is placed at the end of a 'load or 'equip' command, the unit is only loaded in case all immediate commands inside its nesting are executed successfully. For example:</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load captain into jail_room complete { equip magic_sword position WEAR_WIELD max 1 load bag { load ruby_ring max 1 } }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>In this case the captain is only loaded if the objects magic_sword and bag are successfully loaded. if the ruby_ring is not loaded, it will have no effect on the complete directive. To make the ruby_ring affect to captains complete directive, the bag must also have specified a complete directive (because the bag would then not be complete, and thus the captain would not be complete). </PARA>

</sect2>

<sect2> <TITLE>The follow command</TITLE>

<PARA>Once you load a NPC you may want that NPC to follow another NPC. That is what the 'follow' command is for. The following is the format of the 'follow' command</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

follow <symbol> <load amount #> <complete>

</PROGRAMLISTING></INFORMALEXAMPLE>

<VARIABLELIST> <VARLISTENTRY> ;symbol <DICTDEF> <PARA>The first argument to the follow command is the symbolic name of the NPC to follow the NPC of the outer grouping.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;load amount <DICTDEF> <PARA>the second argument is an optional argument that tells the reset how many of the NPC followers of this type are allowed in the world, zone, or locally. The possible values for this field are as follows:</PARA> <VARIABLELIST> <VARLISTENTRY> ;max <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the entire world is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;local <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the location of which the unit is to be loaded into is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY> <VARLISTENTRY> ;zonemax <num> <DICTDEF> <PARA>This command is always part of another reset command (load, equip, etc.). At reset time the entire zone being reset is scanned for occurences of the loaded unit - only if the currently existing number is less than <num> will the command be executed.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;complete <DICTDEF> <PARA>This only makes the NPC follow if all the other things in the grouping finishes completely. For a better description of how this directive works see <xref linkend="resetcomplete">.</PARA> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

<PARA>The follow command is always used nested inside a loaded NPC to force the NPC <symbol> to follow the NPC of the outer grouping. The following would be a correct use of the follow command.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load captain into jail { follow guard max 4 { equip guard_helmet WEAR_HEAD equip guard_plate WEAR_BODY equip guard_legs WEAR_LEGS equip guard_boots WEAR_FEET } follow guard max 4 { equip guard_helmet WEAR_HEAD equip guard_plate WEAR_BODY equip guard_legs WEAR_LEGS equip guard_boots WEAR_FEET } }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>This example would load two guards that are fully dressed and they would start following the captain which is also loaded.</PARA> </sect2> <sect2> <TITLE>The purge command</TITLE>

<PARA>There are times when you want to clean up a room. This can be done very easy by using the <command>purge</command>. The following is the format of the purge command.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

purge <symbol>

</PROGRAMLISTING></INFORMALEXAMPLE>


<PARA>This command doesn't take much description. The symbol is the room you want to empty of all objects and NPCs. If you wanted to get rid of all objects and NPCs from a room with the symbolic name of jail it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

purge jail

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2> <sect2> <TITLE>The random command</TITLE>

<PARA>If you ever want to load something only some of the time. There is a built in <command>random</command> command that allows you to pick the percentage of the time that the item will load. The random command has the following format.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

random <num> {group or single set of resets}

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>It is important to point out this is done by a random percentage chance where as 1% of the time would be almost not at all and 100% of the time would be all the time. If we wanted to load a group of things only 80% of the time it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

random 80 { load captain into jail_room complete { equip magic_sword position WEAR_WIELD max 1 load bag { load ruby_ring max 1 } } }

</PROGRAMLISTING></INFORMALEXAMPLE> </sect2> <sect2> <TITLE>The remove command</TITLE>

<PARA>Many times players take items out of containers like chests or steal items from your NPCs and leave them naked. If the NPC is not dead the resets don't reload them therefore your NPCs will stand there empty and so will your chests. This is fine if that is what you want but sometimes you want them to get dressed or refilled again at reset time. that is what the <command>remove</command> command is for. The following is the format of the remove command.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

remove <symbol1> in <symbol2>

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Again the remove command is a simple command and it only has two arguments, the item and where it is to remove it from. If you wanted to have a cabinet that at every reset it would have a knife and a bag of sugar in it would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

remove cabinet in kitchen load cabinet into kitchen { load sugarbag load knife }

</PROGRAMLISTING></INFORMALEXAMPLE>


</sect2> </sect1> <sect1 id="resetdragon"> <TITLE>Reset walk through</TITLE>

<PARA>The dragon station is almost finished. All you have to do now is create the resets for it. We don't have a lot of stuff in the zone but we have enough to make a decent example of how the resets work. As I mentioned at the start of the chapter on resets I like to do the doors first, the objects in rooms second, then the NPCs. again this is nothing we force you to do but I find it helps me keep track of my items and NPCs.</PARA>

<PARA>With that in mind we will start by resetting our doors. In the zone there is two doors. One is a regular door that is closed when the mud reboots and the other is a hidden and locked door when the mud reboots. We will not block the rooms in and show you them again but if you want to you can see the rooms in <xref linkend="finishedzone">. the resets for these doors would look like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

//Office door reset door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}


//secret door reset door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN} door portal_room NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}

</PROGRAMLISTING></INFORMALEXAMPLE>

<NOTE><PARA>Both sides of the door don't have to have the exact same flags the door in the office is hidden but the one on the ship is not.</PARA></NOTE>


<PARA>The next thing to build resets for is the two items we are loading directly into rooms and their contents if they have any. The two items we are loading into rooms are the board and the weapons locker. I am just going to stick the board in the main chamber and the weapons locker in the office. The reset for these two items looks like this.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load info_board into chamber

load wpn_locker into office { load w_stiletto }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Notice we also loaded a stiletto into the weapons locker and it will only load once a reboot since the cabinet will never be removed and unless the cabinet reloads the stiletto will not reload.</PARA>

<PARA>finally we get to the NPcs and their equipment. We only have 3 NPCs in our zone so it shouldn't be any problem especially since we don't have that much close. I am going to load the dragon into the ship on a percentage chance basis and then load the Janitor into the station so he can get to cleaning it up. Finally I will load Bob into the office so he can sit and count his money.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

load bob into office { equip pol_plate WEAR_BODY }

load janitor into chamber { equip pol_plate WEAR_BODY }

random 50 { load bldragon { load maskwa } }

</PROGRAMLISTING></INFORMALEXAMPLE>

<PARA>Only a couple final things to point out. It doesn't matter if you load the same type of plate or same type of clothing on every NPC. It would look pretty silly if everyone was wearing the same clothes but I wanted to make sure you understood you didn't have to make one set for everyone. Also you don't have to equip wearable things you can load them into the inventory like we did with the ring on the dragon. That about covers it all. The resets are now done and we can now put them all together with the zone and complete our dragon station.</PARA>


</sect1>

<sect1 id="finishedzone"> <TITLE>The complete dragon station</TITLE>

<INFORMALEXAMPLE><PROGRAMLISTING>

#include <composed.h> %zone dragonst lifespan 20 reset RESET_ANYHOW creators {"whistler"}

notes "This is the dragon station I shortened it to dragonst for ease in loading. If you have any questions email me at whistler@valhalla.com"

help "Not sure what could help you now. You are stuck on one of the weirdest space stations you have ever seen and you smell burning sulfur."

%rooms

chamber title "The middle chamber of the station" descr "This chamber seems to have the entire station rotating around it. It is unbelievably large the ceiling seems to be a good 200 meeters high and the room is perfectly cubic. Small human size ornate chairs with dragon designs scrawled on the arms and back are arranged in a triangle like setting with one large chair at the front. This must be where all station meetings are held. large pictures cover the walls depicting dragons in all kinds of situations. large passages lead of to the west and the east.."

extra {"chair","chairs"} "The chairs are made of some metal you don't recognize and every inch is covered with some kind of dragon."

extra {"dragon picture","picture"} "Thousands of dragons dot the skies of this rather life like picture. In the center you see something move. It looks to be a little green dragon."

extra{"green dragon","dragon","green"} "An intellegence looking dragon is sitting perched on a large chair watching you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}


west to disposal_room descr "You see a small room.";

east to hallway descr "You see what looks to be a hallway.";

end

hallway title "Module tunnel" descr "The hallway is about 50 meters long and around 100 meters from side to side and top to bottom. The hallway seems to be dust free. The walls and the floors seem to be made out of the same sterile metal-plastic that all space agencies uses. There are large plate glass windows that open up into space. The hallway is filled with a dim light that seems to come from everywhere yet no where all at once. You notice a glimmer of bright light coming from the windows. To the east you see an air lock and to the west the hallway opens up into a larger room."

extra {"windows","window"} "Your eyes are drawn to a large ship lit up with running lights sitting about 1 kilometer from the station."

extra{"floor","walls","wall"} "Well what can be said it looks to be in perfect condition. What else would you want to know?"

extra {"large ship" ,"ship"} "The ship looks really big and is shaped like a dragon. The scales sparkle and seem to be multiple colors."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

west to chamber descr "The hallway opens up into a chamber.";

east to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

end

office title "The station office" descr "Large paintings fill the walls of this part of the station. The room is as large as the other rooms big enough for Dragons to lounge while still having a desk in one corner small enough for a humanoid. The floor along the north wall is lined with some kind of fabric and seems very soft to walk on, it may be some kind of dragon lounge judging by how large an area it covers. There is a passage to the west."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"paintings","painting"} "The paintings are of many dragons and riders in all kinds of tasks from combat to look out. All the figures seem to be staring at a staff being held by a depiction of a wizard on the south wall."

extra {"wizard","staff"} "The wizard has his hand stretched out and it seems there is a place you can almost grab the staff. Maybe if you searched the staff you would find it."

extra {"desk"} "Its a desk alright but there doesn't seem to be any drawers and it seems totally empty."

extra{"fabric"} "Wussshhhhh you bound across the comfortable floor wasn't that fun."

west to hallway descr "You see what looks to be a hallway." keyword {"air lock door","air lock","door"} open {EX_OPEN_CLOSE, EX_CLOSED};

SECRET_DOOR_DIFFICULTY(SOUTH, 50) south to portal_room descr "You see what looks to be a portal room." keyword {"air lock door","air lock","staff","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN};

end

portal_room title "Green field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a green field right in the center. there is a door that leads to another room to the north."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"green field","field"} "The field looks to be a green fog shifting and churning as you watch. if you are nuts you could probably enter it."

north to office descr "You see what looks to be an office." keyword {"air lock door","air lock","door"} key nokey open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED};

//A link to the portal is also here from room_port end

ship_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in ship

dilcopy force_move@function( //Time to activation 4, //room and act "portal_room@dragonst!You feel your body dissolving for lack of a better description.&You appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

room_port names{"green field", "field"} title "Green field" descr "Green Mist swirls about you." movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

in portal_room

dilcopy force_move@function( //Time to activation 4, //room and act "ship@dragonst!You feel your body dissolving for lack of a better description.&You appear on the deck of a ship.", //True or False for randomizing or not FALSE);


end

disposal_room title "Red field room" descr "Like the other rooms on the station this one is large enough for dragons to comfortably fit in. The strange thing about this room though is it is totally empty except for a red field right in the center. there is a door that leads to another room to the east."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"red field","field"} "The field looks to be a red fog shifting and churning as you watch. if you are nuts you could probably enter it."

east to chamber descr "You see the main chamber.";

//A link to the portal is also here from dis_port end

dis_port names {"red field","field"} title "Red field" descr "Red Mist swirls about you."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS} dilcopy force_move@function( //how fast to force move in seconds 4, //room to force move to and act "deathspace@dragonst!You feel your body dissolving for lack of a better description.", //true or false random move or not 0); in disposal_room

end

ship title "War dragon" descr "Blue light softly glows from con duets that line the walls of this ship. The floors beside the east and west wall have what looks to be soft fabric covering. The south wall has small controls that seem to be made for humanoids with two small chairs that look to be pilot seats. view portals are about 50 meters up the side of the ship on the west and east wall and some kind of electronic screen covers the south wall. The ship seems to be a one room ship but there is a green field by the north wall."

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

extra {"view port"} "Sorry your not 50 meters tall maybe it is made for a dragon?"

extra {"view screen","screen"} "It seems to be the pilots view screen but you can't seem to see a way to turn it on."

extra {"controls","control"} "The controls are in some weird language and your afraid if you start pushing buttons you might rocket in to the station or worse slam into a planet."

extra {"soft fabric","fabric"} "It looks to be a dragon lounge area."

//A link to the portal is also here from ship_port end

deathspace title"Open space" descr "You see the ship and the station far off in the distance and you are in Space!"

movement SECT_INSIDE ALWAYS_LIGHT flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}

dilcopy death_room@function ( //how often is damage done 4 would be 1 second 4, //damage 400, //act for the damage. "You realize to late that was the trash disposal transporter and you feel your lungs explode.");


end

%mobiles

bldragon

title "a black dragon" descr "A big ugly black dragon is clawing the ground here." names {"big ugly black dragon","ugly black dragon","big black dragon", "black dragon","dragon"}

extra {} "The black dragons scales glitter like black granite that has been polished for years by water. He has a large neck and huge bat like wings. his eyes watch you as you stand before him. One claw seems to be tapping slightly on the ground as if the dragon is waiting for something."

extra {"eye","eyes"} "The dragons eyes seem to follow you no matter where you go in the room nothing seems to escape the dragons attention."

extra {"claws","claw"} "The claw is big black and it looks very deadly. It seems like the dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which to say means the claws are about the size of short swords and long swords."

extra {"scales","scale"} "Its a scale! Haven't you ever seen a dragon before!"

extra {"bat wings","wings"} "The dragon sees you looking and flaps his wings creating one heck of a wind blast."

M_DRAGON_BLACK_OLD(SEX_MALE)

end

janitor names {"ugly janitor", "janitor", "hobgoblin"} title "an ugly janitor" descr "an ugly janitor is walking around, cleaning up."

extra{} "This ugly green thing looks more goblin than hobgoblin but he seems intent on cleaning everything around him."

M_AVG_HOBGOBLIN(6, SEX_MALE)

// he is sort of good for cleaning so much alignment 900

//give him some money money 5 IRON_PIECE

dilcopy janitors@function(15);

// only want him cleaning the station dilcopy wander_zones@function("dragonst", 20, 1, 1);

end

bob

names {"Bob"} title "Bob" descr "Bob the Banker is here, sitting behind the counter." extra {} "He has a very serious look on his face."

// define from composed.h M_SHOP_KEEPER(4, SEX_MALE, RACE_HUMAN)

//discourage people from killing banker exp -500

flags {UNIT_FL_NO_TELEPORT}

special SFUN_BANK end

%objects

info_board

title "a merchant information board" descr "A merchant information Board is mounted on a wall here." names {"merchant information board","information board","merchant board","board"} extra {} "A large flashy black steal board."

MATERIAL_METAL("A very fine quality black steel") type ITEM_BOARD dilcopy board@boards("info","","rem_res@boards","",100);

end

w_stiletto title "a stiletto" names {"deadly looking stiletto","deadly stiletto","stiletto", "dagger"} descr "A deadly looking stiletto has been left here."

MATERIAL_METAL("A very fine quality steel") manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD} WEAPON_DEF(WPN_DAGGER, 1, 2) weight 2 cost 2 GOLD_PIECE rent 1 COPPER_PIECE

SKILL_TRANSFER(SKI_BACKSTAB, 2) dilcopy abi_restrict@function (ABIL_DEX,10,0,25,"");

extra{} "This looks like a thieves dream come true. "

extra {"$identify"} "The stiletto looks magical in nature and seems really sharp. You can tell if you wield it you would be able to backstab someone really easy."

extra{"$improved identify"} "The stiletto gives you a magical bonus of +1 and has a quality of +2. It also raises your back stabbing skill by 2%. You have to have at least 10% in dex before you can wield this magical weapon."

end

wpn_locker

title "a weapons locker" names {"weapons locker","weapon locker","locker"}

descr "a small weapons locker hangs on the wall here." manipulate {MANIPULATE_ENTER} CONTAINER_DEF(500) open {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} weight 400 MATERIAL_METAL("A very fine quality steel")

extra {} "It is an ordinary weapons locker that looks like it holds any illegal weapons that are taken on the station."

end

pol_plate names {"polished breast plate","polished plate","breast plate","plate"} title "a polished breast plate" descr "A polished breast plate has been left here." extra{} "This is one shiny plate it seems to be made out of one perfect piece of metal. There doesn't even seem to be any markings of owner ship." manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_PLATE(5,9)

MATERIAL_METAL("A high luster silver colored metal")

manipulate {MANIPULATE_TAKE, MANIPULATE_WEAR_BODY} ARMOUR_DEF(ARM_PLATE,5,9) dilcopy abi_restrict@function (ABIL_STR,40,0,25,""); cost 2 GOLD_PIECE rent 3 COPPER_PIECE weight 25

extra{"$identify"} "This is a high quality plate with a magical feeling."

extra{"$improved identify"} "The plate has a magical bonus to your defence of a +5 and a quality of +9. You need 40% in strength to be able to wear it." end

liq_ration names {"red bag", "bag", "wine"} title "a red bag" descr "A red bag has been gently placed here."

MATERIAL_ORGANIC("a soft plastic") manipulate {MANIPULATE_TAKE}

LIQ_WINE(1,2,2,0) cost 2 IRON_PIECE extra {} "A small label reads Tassel Grove's finest. Year 321"

extra {"$identify"} "Its the special wine from Tassel grove a small halfling village on the planet Valhalla. It seems like a great vintage wine."

end

beef_stick

title "a tough leathery stick" descr "A tough leathery looking stick is laying here." names {"tough leathery stick","tough leather stick","leathery stick", "leather stick","tough stick","stick"}

extra {} "This has the word BEEF burnt into it."

manipulate {MANIPULATE_TAKE} FOOD_DEF(5,0) weight 1 cost 1 COPPER_PIECE MATERIAL_ORGANIC("tough beef") end

maskwa

names {"maskwa platinum ring", "platinum ring","maskwa ring","maskwa","ring"} title "a Maskwa ring" descr "A Maskwa platinum ring is laying here." MATERIAL_METAL("Platinum, and other precious metals") extra {} "The ring has a large bear head. Could this be the legendary head of Maskwa? Any thing formed with its head on it is said to strengthen the wearer." type ITEM_WORN manipulate {MANIPULATE_TAKE, MANIPULATE_HOLD, MANIPULATE_WEAR_FINGER} cost 100 COPPER_PIECE rent 50 IRON_PIECE weight 1 STR_TRANSFER(+1) end

%reset

//Office door reset door hallway EAST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED} door office WEST {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}


//secret door reset door office SOUTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED,EX_HIDDEN} door portal_room NORTH {EX_OPEN_CLOSE, EX_CLOSED,EX_LOCKED}


load info_board into chamber

load wpn_locker into office { load w_stiletto }

load bob into office { equip pol_plate WEAR_BODY }

load janitor into chamber { equip pol_plate WEAR_BODY }


random 50 { load bldragon { load maskwa } }

%end

</PROGRAMLISTING></INFORMALEXAMPLE>

</sect1> </chapter>

<chapter ID="ch-08"><?dbhtml filename="ch08.html"> <TITLE>Color and formatting codes</title>

<para>Now that you have got a handle on how to build rooms, objects, and NPCs, we will now give you the ability to format text the way you want it formatted and color it as well. Currently the VME doesn't support all the ASCII characters but if we get enough people wanting this ability it will be added.</para>

<sect1 id="escapecode"> <title>The escape character</title>

<para>When working with colors or formatting there are always two parts to a formatting command. The first part we call the escape character which is the '&' character. Thus all formatting and color commands would look as follows:</para>

<programlisting>

&<color or formating command>

</programlisting>

</sect1>

<sect1> <title>Formatting codes</title>

<para>As you may have noticed the string fields on the VME are formatted in an english paragraph style. What that means is all text is formatted with he following rules:</para>

<itemizedlist> <listitem><para> All leading blanks are stripped away. For room descriptions 3 leading spaces are added. This way we ensure a consistent formatting of the displayed room descriptions. </para></listitem> <listitem><para>

Spaces and blanks (newlines) are contracted to single spaces yielding a correctly 'wrapped' text for any sentence. </para></listitem> <listitem><para> If a '.' is encountered followed by a blank, a total of two spaces are inserted after the '.'. </para></listitem> </itemizedlist>

<para>These formatting rules are great for normal descriptions and extras but what if you want to make a sign or a map. You don't always want the text to be rapped, if the server rapped your sign it would turn out looking like a jumble of punctuation in the form of a paragraph. <xref linkend="formattable"> contains a list of all formatting characters and a short description of them. <xref linkend="formatdescr"> contains a more in depth discussion of each format command with examples and <xref linkend="colordescr"> deals with the color commands.</para>

<title>Formatting and color codes</title> <TGROUP align=left cols=2 colsep=1> <thead> <row> <entry>Code</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry>&</entry> <entry>Used to make an & character instead of an escape code.</entry> </row> <row> <entry>l</entry> <entry> Text from this point forward will not be formatted. It will be interpreted literally with newlines, spaces, etc. Useful when making a sign or a map. </entry> </row> <row> <entry>f</entry> <entry> Text from this point forward will be formatted. This option is the reverse of &l and is default on any section of text. </entry> </row> <row> <entry>s<#></entry> <entry> Force a singe space character (or <#> if specified, may come in handy, instead of having to toggle formatting). </entry> </row> <row> <entry>n</entry> <entry> Force a new line, very handy instead of toggling the &l formatting switch. </entry> </row> <row> <entry>h</entry> <entry> Clears the screen if the terminal of the user supports it. </entry> </row> <row> <entry>x</entry> <entry> A file new line used for split so that you can split a file into lines </entry> </row> <row> <entry>c<color></entry> <entry> Set the foreground color. </entry> </row> <row> <entry>b<color></entry> <entry> Set the background color. </entry> </row> <row> <entry>[<color>]</entry> <entry> Set a preset foreground and background color. </entry> </row> </tbody> </tgroup>

</sect1>

<sect1 id="formatdescr" <title>Formatting code descriptions and examples</title> <VARIABLELIST> <VARLISTENTRY> ;&& <DICTDEF> <para>If you want a single '&' you must let the <ACRONYM>VME</ACRONYM> know that you don't want a formatting or a color code. You do this by doubling the '&' sign. The following is a couple examples:</para>

<INFORMALTABLE frame=all> <TGROUP align=left cols=2 colsep=1>

<thead> <row> <entry>text</entry> <entry>Result</entry> </row> </thead> <tbody> <row> <entry>&&</entry> <entry>&</entry> </row> <row> <entry>&&&&</entry> <entry>&&</entry> </row>


<row> <entry>&&&&&&</entry> <entry>&&&</entry> </row> </tbody> </tgroup> </INFORMALTABLE>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;&l <DICTDEF>

<para>When you want to turn off the formatting you use this formatting code. Everything after the '&l' will be shown exactly as you put it in the string.</para>

<programlisting>

&l * * * * * * * * * * * * *

</programlisting>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;&f <DICTDEF> <para>The formatted text as we have already said is default. If you want to turn the formatted text back on after some literal text you will have to use the '&f' code. The following is an example of some literal text followed by a short bit of formatted text.</para>

<Programlisting>

&l * * * * * * * * * * * * *

&fThe X marks the spot!

</programlisting>

</LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;&s<#> <DICTDEF>

<para>If you want to input extra spaces in a sentence with out using the '&l' you can add them one at a time or multiple by using the '&s' code.</para>

<programlisting>

This sentence has 10 spaces&s10before the first word before.

</programlisting> </LISTITEM> </VARLISTENTRY>


<VARLISTENTRY> ;&n <DICTDEF>

<para>If you want to input some blank lines with out using the literal code you can add a '&n'for each line you want.</para>

<programlisting>

This sentence&n&n&n would look like this:


This sentence


would look like this:

</programlisting>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;&x <DICTDEF>

<para>The line break is made for use with the <ACRONYM>DIL</ACRONYM> language. You will not need it to do regular text formatting. It was added so a <ACRONYM>DIL</ACRONYM> could split a string that is loaded from a file. If you don't understand the following example don't worry it is explained more in the <ACRONYM>DIL</ACRONYM> reference.</para>

<programlisting>

mystrlist:=split(string,"&");

</programlisting> </LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> ;&h <DICTDEF>

<para>On terminals that can handle it the '&h' will clear the screen. If you wanted a sign that would clear the screen before displaying when a character looked at it would look like this.</para>

<programlisting>

&h&l * * * * * * * * * * * * *

&fThe X marks the spot!

</programlisting> </LISTITEM> </VARLISTENTRY> </VARIABLELIST>

</sect1>

<sect1 id="colordescr"> <title>Color code descriptions and examples</title>


<VARIABLELIST> <VARLISTENTRY> ;&c and &b <DICTDEF>

<para>In order to allow you to change the colors there are two codes. One is for the foreground color (&c) and the other is for the background color (&b). '&c' is used with one or two arguments depending on brightness, while the '&b' s only used with one because it has only one brightness. They both have the forms as follows:</para>

<programlisting>

&c<bright><color> &b<color>

</programlisting>

<para>It is important to set both the foreground and background color because if a player has his default background color set to blue and you use blue as a foreground color it will make the letters invisible to the player. It is also important to set the colors back to the default color when done. this is done by using the following command:</para>

<programlisting>

&[default]

</programlisting>

<note><para>The '&[default]' command will be described in the next section. It is enough to know for now that it will return the players colors to their default colors.</para></note>

<para>Before we give some color examples we should now define the symbols for brightness and the symbols for each color and what they are.</para>

<title>Colors</title> <TGROUP align=left cols=2 colsep=1> <thead> <row> <entry>Code</entry> <entry>Color</entry> </row> </thead> <tbody> <row> <entry>n</entry> <entry>Black</entry> </row> <row> <entry>r</entry> <entry>Red</entry> </row> <row> <entry>g </entry> <entry>Green</entry> </row> <row> <entry>y</entry> <entry>Yellow</entry> </row> <row> <entry>b</entry> <entry>Blue</entry> </row> <row> <entry>m</entry> <entry>Magenta</entry> </row> <row> <entry>c</entry> <entry>Cyan</entry> </row> <row> <entry>w</entry> <entry>White</entry> </row> </tbody> </tgroup>
<title>Sample Color codes</title> <TGROUP align=left cols=2 colsep=1> <thead> <row> <entry>Code</entry> <entry>Resulting Colors</entry> </row> </thead> <tbody> <row> <entry>&cb&bw</entry> <entry></entry> </row> <row> <entry>&+g&bn</entry> <entry></entry> </row> <row> <entry>&c+w&r</entry> <entry></entry> </row> <row> <entry>&c+w&bn</entry> <entry></entry> </row> </tbody> </tgroup>

</LISTITEM> </VARLISTENTRY>

<VARLISTENTRY> <TERM>&[<color>]</TERM> <LISTITEM>

<para>As we have said in the previous section if you are not careful you can make your text not visible by the player by setting the foreground to the same color as the background. In order to make it possible for you to easily change how the color looks and to even match it with the way players have their colors set already we have created colors that the players can set. and you can use. The <acronym>VME</acronym> comes with a default list of colors which can be added to by either the color.def or even by a <acronym>DIL</acronym> program on line. The default colors are as follows:</para> <INFORMALTABLE frame=all> <TGROUP align=left cols=3 colsep=1> <tbody> <row> <entry>death</entry> <entry>default</entry> <entry>exit</entry> </row> <row> <entry>group</entry> <entry>hit_me</entry> <entry>hit_opponent</entry> </row> <row> <entry>hit_other</entry> <entry>immort_descr</entry> <entry>immort_title</entry> </row> <row> <entry>log</entry> <entry>miss_me</entry> <entry>miss_opponent</entry> </row> <row> <entry>miss_other</entry> <entry>nodam_me</entry> <entry>nodam_opponent</entry> </row> <row> <entry>nodam_other</entry> <entry>npc_descr</entry> <entry>npc_title</entry> </row> <row> <entry>obj_descr</entry> <entry>obj_title</entry> <entry>pc_descr</entry> </row> <row> <entry>pc_title</entry> <entry>prompt</entry> <entry>respond</entry> </row> <row> <entry>room_descr</entry> <entry>broom_title</entry> <entry>say_other</entry> </row> <row> <entry>say_self</entry> <entry>shield_me</entry> <entry>shield_opponent</entry> </row> <row> <entry>shield_other</entry> <entry>shout_other</entry> <entry>shout_self</entry> </row> <row> <entry>social_other</entry> <entry>social_self</entry> <entry>spells</entry> </row> <row> <entry>tell_other</entry> <entry>tell_self</entry> <entry>time</entry> </row> <row> <entry>weather</entry> <entry>whisper</entry> <entry>who</entry> </row> <row> <entry>who_guild</entry> <entry>who_inv</entry> <entry>who_name</entry> </row> <row> <entry>who_title</entry> <entry>wiz</entry> <entry>xpgain</entry> </row> </tbody> </tgroup> </informaltable>

<para>To use these colors all you have to do is use the following formatting command:</para>

<programlisting>

&[color]

</programlisting>

<para>The color that will be shown is the color that the player has set for the color in question. If for example the player has his or her 'death' color set to bright red with a black background and you have a description as follows:</para>

<programlisting>

descr "This is a &[death]death&[room_descr]room"

</programlisting>

<para>The description would be in the players 'room_descr' color while the word death would be in his or hers 'death' color. You should note we had to set the color back to the room description color so that the rest of the description was not in the 'death' color.</para>

<para>To change the players color to the default out put color which is the color that is used when no color is specified by the server then you use 'default'. You probably won't use this in normal zone building but it is very important to know it exists when you start making spells, skills, and commands with <acronym>DIL</acronym></para>

</LISTITEM> </VARLISTENTRY> </VARIABLELIST> </sect1>

</chapter>

<chapter ID="ch-09"><?dbhtml filename="ch09.html"> <TITLE>The <ACRONYM>DIL</ACRONYM> section</TITLE>

<PARA>When I first thought of writing this manual I had planned to leave <ACRONYM>DIL</ACRONYM> totally out of it. The <ACRONYM>DIL</ACRONYM> language always confuses new Builders and complicates teaching simple rooms, objects, and NPCs. It became clear to me though that <ACRONYM>DIL</ACRONYM> is such a part of the server that I at least had to mention it hear so builders would know where to look and what <ACRONYM>DIL</ACRONYM> could do for them when they got to the point where they were ready to use it.</PARA>

<sect1 id="dilsect"> <TITLE>What is <ACRONYM>DIL</ACRONYM>?</TITLE>

<PARA><ACRONYM>DIL</ACRONYM> is short for, Data-based instructional language. Not to be confused with Database since <ACRONYM>DIL</ACRONYM> is nothing like a database. Data-based means that the language works on a fixed set of units like objects, NPCS, and rooms and is designed to give them a life of their own. Unlike on many of the mud servers on the internet <ACRONYM>DIL</ACRONYM> is not an interpreted language it is a compiled language which gives you the user much more safe guards against crashes and slow code.</PARA>

<PARA><ACRONYM>DIL</ACRONYM> also provides a full set of data types to allow you to do calculations or store information from players. The <ACRONYM>DIL</ACRONYM> language can even deal with file access and it can add fields and information to the players if needed. In short the <ACRONYM>VME</ACRONYM> server has its own internal functional language that will allow you to do just about anything you want to.</PARA>

</sect1>

<sect1 id="diluse"> <TITLE>What can <ACRONYM>DIL</ACRONYM> be used for?</TITLE> <PARA>...</PARA>

<PARA>It is hard to explain what all <ACRONYM>DIL</ACRONYM> can be used for with out just writing a list of things that have already been done in <ACRONYM>DIL</ACRONYM> so here is the list.</PARA>

<itemizedlist> <LISTITEM><PARA>All spells</PARA></LISTITEM> <LISTITEM><PARA>60% of the commands and skills and growing</PARA></LISTITEM> <LISTITEM><PARA>Administrator commands</PARA></LISTITEM> <LISTITEM><PARA>Movement commands</PARA></LISTITEM> <LISTITEM><PARA>look commands</PARA></LISTITEM> <LISTITEM><PARA>200+ quests and growing</PARA></LISTITEM> <LISTITEM><PARA>Message boards</PARA></LISTITEM> <LISTITEM><PARA>Mail system</PARA></LISTITEM> <LISTITEM><PARA>Clan system</PARA></LISTITEM> <LISTITEM><PARA>Automated Newbie guides</PARA></LISTITEM> <LISTITEM><PARA>object restrictions</PARA></LISTITEM> <LISTITEM><PARA>Death Sequence</PARA></LISTITEM> <LISTITEM><PARA>Magical combat system</PARA></LISTITEM> <LISTITEM><PARA>NPC agressive functions</PARA></LISTITEM> <LISTITEM><PARA>personalized Familiars</PARA></LISTITEM> <LISTITEM><PARA>personalized pets</PARA></LISTITEM> <LISTITEM><PARA>Deck of cards</PARA></LISTITEM> <LISTITEM><PARA>Chess board</PARA></LISTITEM> <LISTITEM><PARA>dice</PARA></LISTITEM> <LISTITEM><PARA>online AD&D game playing system</PARA></LISTITEM> <LISTITEM><PARA>Communication channels</PARA></LISTITEM> <LISTITEM><PARA>automated wedding chapel</PARA></LISTITEM> </itemizedlist>

<PARA>Realize this is only a small list of things that can be done in <ACRONYM>DIL</ACRONYM>. In the future we hope to be able to add the ability to easily change combat and all the character update features using <ACRONYM>DIL</ACRONYM>. These things can be currently done with <ACRONYM>DIL</ACRONYM> but it takes a lot of knowledge and work which we hope to simplify.</PARA> </sect1>

<sect1 id="moredilinfo"> <TITLE>Where do I get more information on <ACRONYM>DIL</ACRONYM></TITLE>

<PARA>The online <ACRONYM>DIL</ACRONYM> reference guide is the most authoritative guide currently for <ACRONYM>DIL</ACRONYM>. It can be found at <ulink url="http://www.valhalla.com">http://www.valhalla.com</ulink> and follow the builders links.</PARA>

<PARA>In the near future we hope to have an entire new <ACRONYM>DIL</ACRONYM> manual that will teach, a person who has never coded all the way to people who are already professional coders, to use <ACRONYM>DIL</ACRONYM>. For now if you can not find what you need in the <ACRONYM>DIL</ACRONYM> reference manual you can join the <ACRONYM>DIL</ACRONYM> email list at <email>dil-request@valhalla.com</email> or you can send a mail to <email>whistler@valhalla.com</email>. Until and even after the new <ACRONYM>DIL</ACRONYM> manual is written we will always try to help you as much as possible while you are getting started. It is important that you at least try and look through the <ACRONYM>DIL</ACRONYM> reference before asking a lot of questions because many of the questions may be answered already.</PARA>

</sect1> </chapter>

<appendix id="app-a"><TITLE>VMC command line options</TITLE>

<PARA> The argument string is processed from left to right. Options may appear between filenames, but it should be noted that an option only takes effect when it is encountered. In most cases, options should be placed to the left of the filename arguments. </PARA>

<INFORMALTABLE frame=none pgwide=1> <TGROUP align=left cols=2 colsep=1> <THEAD> <ROW> <ENTRY>Option</ENTRY> <ENTRY>Description</ENTRY> </ROW> </THEAD> <TBODY> <ROW> <ENTRY>-m</ENTRY> <ENTRY>The location of the money file. Normally etc/money.</ENTRY> </ROW> <ROW> <ENTRY>-v</ENTRY> <ENTRY>Verbose compiler output shows much more information about objects and NPC</ENTRY> </ROW> <ROW> <ENTRY>-M</ENTRY> <ENTRY>Make option. Only compile source files if they have been modified more recently than the corresponding output files.</ENTRY> </ROW> <ROW> <ENTRY>-p</ENTRY> <ENTRY>Pre process the file only</ENTRY> </ROW> <ROW> <ENTRY>-s</ENTRY> <ENTRY>Suppress the generation of output files.</ENTRY> </ROW>

</TBODY></TGROUP> </informaltable>

<PARA> These options are not available to the email or FTP compiler, but normally you should not bother with them - they are probably set automatically.</PARA>

</appendix>

<appendix id="app-b"><TITLE>Reserved keyword listing</TITLE>

<informaltable frame=none pgwide=1> <TGROUP align=left cols=8 colsep=4 rowsep=0> <TBODY> <ROW> <ENTRY>ability</ENTRY> <ENTRY>affect</ENTRY> <ENTRY>alignment</ENTRY> <ENTRY>applyf</ENTRY> <ENTRY>armour</ENTRY> <ENTRY>attack</ENTRY> <ENTRY>bits</ENTRY> <ENTRY>bright</ENTRY> </ROW><ROW> <ENTRY>capacity</ENTRY> <ENTRY>complete</ENTRY> <ENTRY>cost</ENTRY> <ENTRY>creators</ENTRY> <ENTRY>data</ENTRY> <ENTRY>default</ENTRY> <ENTRY>defensive</ENTRY> <ENTRY>descr</ENTRY> </ROW><ROW> <ENTRY>dilcopy</ENTRY> <ENTRY>door</ENTRY> <ENTRY>duration</ENTRY> <ENTRY>end</ENTRY> <ENTRY>equip</ENTRY> <ENTRY>exit</ENTRY> <ENTRY>exp</ENTRY> <ENTRY>extra</ENTRY> </ROW><ROW> <ENTRY>firstf</ENTRY> <ENTRY>flags</ENTRY> <ENTRY>follow</ENTRY> <ENTRY>height</ENTRY> <ENTRY>help</ENTRY> <ENTRY>hit</ENTRY> <ENTRY>id</ENTRY> <ENTRY>in</ENTRY> </ROW><ROW> <ENTRY>inside_descr</ENTRY> <ENTRY>into</ENTRY> <ENTRY>key</ENTRY> <ENTRY>keyword</ENTRY> <ENTRY>lastf</ENTRY> <ENTRY>level</ENTRY> <ENTRY>lifespan</ENTRY> <ENTRY>light</ENTRY> </ROW><ROW> <ENTRY>link</ENTRY> <ENTRY>load</ENTRY> <ENTRY>local</ENTRY> <ENTRY>mana</ENTRY> <ENTRY>manipulate</ENTRY> <ENTRY>max</ENTRY> <ENTRY>minv</ENTRY> <ENTRY>money</ENTRY> </ROW><ROW> <ENTRY>movement</ENTRY> <ENTRY>names</ENTRY> <ENTRY>nop</ENTRY> <ENTRY>notes</ENTRY> <ENTRY>npcflags</ENTRY> <ENTRY>offensive</ENTRY> <ENTRY>open</ENTRY> <ENTRY>outside_descr</ENTRY> </ROW><ROW> <ENTRY>position</ENTRY> <ENTRY>purge</ENTRY> <ENTRY>race</ENTRY> <ENTRY>random</ENTRY> <ENTRY>remove</ENTRY> <ENTRY>rent</ENTRY> <ENTRY>reset</ENTRY> <ENTRY>romflags</ENTRY> </ROW><ROW> <ENTRY>sex</ENTRY> <ENTRY>special</ENTRY> <ENTRY>speed</ENTRY> <ENTRY>spell</ENTRY> <ENTRY>string</ENTRY> <ENTRY>tickf</ENTRY> <ENTRY>time</ENTRY> <ENTRY>title</ENTRY> </ROW><ROW> <ENTRY>to</ENTRY> <ENTRY>type</ENTRY> <ENTRY>value</ENTRY> <ENTRY>weapon</ENTRY> <ENTRY>weather</ENTRY> <ENTRY>weight</ENTRY> <ENTRY>zonemax</ENTRY> <ENTRY></ENTRY> </ROW> </TBODY> </TGROUP> </informaltable>


</appendix>

<appendix id="app-c"> <TITLE>Race Definitions in values.h</TITLE>

<PARA>The following list was extracted from the values.h</PARA>

<PROGRAMLISTING>

#define RACE_HUMAN 0 /* PC race */ #define RACE_ELF 1 /* PC race */ #define RACE_DWARF 2 /* PC race */ #define RACE_HALFLING 3 /* PC race */ #define RACE_GNOME 4 /* PC race */ #define RACE_HALF_ORC 5 #define RACE_HALF_OGRE 6 #define RACE_HALF_ELF 7 #define RACE_BROWNIE 8 #define RACE_GROLL 9 #define RACE_DARK_ELF 10 #define RACE_SKAVEN 120 #define RACE_GNOLL 121 #define RACE_GOBLIN 122 #define RACE_HOBGOBLIN 123 #define RACE_KOBOLD 124 #define RACE_NIXIE 125 #define RACE_NYMPH 126 #define RACE_OGRE 127 #define RACE_ORC 128 #define RACE_SATYR 129 #define RACE_FAUN 130 #define RACE_SPRITE 131 #define RACE_DRYAD 132 #define RACE_LEPRECHAUN 133 #define RACE_PIXIE 134 #define RACE_SYLPH 135 #define RACE_HERMIT 136 #define RACE_SHARGUGH 137 #define RACE_GIANT 138 #define RACE_WARDEN 139 /* Warden??? */ #define RACE_TROLL 140 #define RACE_NORSE_GOD 142 /* Hmmmm. probably need better categories */ #define RACE_MERMAID 145 #define RACE_SIREN 146 #define RACE_NAIAD 147 #define RACE_MERMAN 148 #define RACE_MINOTAUR 149 #define RACE_YETI 150 #define RACE_OTHER_HUMANOID 999

#define RACE_BEAR 1000 #define RACE_DOG 1001 #define RACE_WOLF 1002 #define RACE_FOX 1003 #define RACE_CAT 1004 #define RACE_RABBIT 1005 #define RACE_DEER 1006 #define RACE_COW 1007 #define RACE_HARE 1008 #define RACE_GOAT 1009 #define RACE_EAGLE 1010 #define RACE_PIG 1011

#define RACE_DUCK 1100 /* This will interest the biologists... */ #define RACE_BIRD 1101 /* This will interest the biologists... */ #define RACE_RAT 1102 #define RACE_HORSE 1103 #define RACE_BADGER 1104 #define RACE_SKUNK 1105 #define RACE_BOAR 1106 #define RACE_MOUSE 1107 #define RACE_MONKEY 1108 #define RACE_PORCUPINE 1110 #define RACE_ELEPHANT 1112 #define RACE_CAMEL 1113 #define RACE_FERRET 1114 #define RACE_VULTURE 1115 #define RACE_SQUIRREL 1116 #define RACE_OWL 1117 #define RACE_LEMURE 1118 /* Half-monkey (Makier) */ #define RACE_ELK 1119 /* Larger deer (Whapiti-deer) */ #define RACE_LION 1120 #define RACE_TIGER 1121 #define RACE_LEOPARD 1122 #define RACE_OTHER_MAMMAL 1999

#define RACE_TREE 2000 #define RACE_VINE 2001 #define RACE_FLOWER 2002 #define RACE_SEAWEED 2003 #define RACE_CACTUS 2004

#define RACE_OTHER_PLANT 2999

#define RACE_MAGGOT 3000 #define RACE_BEETLE 3001 #define RACE_SPIDER 3002 #define RACE_COCKROACH 3003 #define RACE_BUTTERFLY 3004 #define RACE_ANT 3005 #define RACE_WORM 3006 #define RACE_LEECH 3008 #define RACE_DRAGONFLY 3009 #define RACE_MOSQUITO 3010

#define RACE_OTHER_INSECT 3999

#define RACE_LIZARD 4000 #define RACE_SNAKE 4001 #define RACE_FROG 4002 #define RACE_ALLIGATOR 4004 #define RACE_DINOSAUR 4005 #define RACE_CHAMELEON 4006 #define RACE_SCORPION 4007 #define RACE_TURTLE 4008 #define RACE_BAT 4009 #define RACE_TOAD 4010

#define RACE_OTHER_REPTILE 4999

#define RACE_CAVE_WIGHT 5001 /* Some kind a creature... */ #define RACE_UR_VILE 5002 /* Some kind a creature... */ #define RACE_STONE_RENDER 5003 /* Some kind a creature... */ #define RACE_VAMPIRE 5005 #define RACE_SLIME 5006 #define RACE_WYRM 5007 #define RACE_AUTOMATON 5008 #define RACE_UNICORN 5009

#define RACE_DRAGON_MIN 5010 /* For use with special object */ #define RACE_DRAGON_BLACK 5010 #define RACE_DRAGON_BLUE 5011 #define RACE_DRAGON_GREEN 5012 #define RACE_DRAGON_RED 5013 #define RACE_DRAGON_WHITE 5014 #define RACE_DRAGON_SILVER 5015 #define RACE_DRAGON_TURTLE 5016 #define RACE_DRAGON_LAVA 5017 #define RACE_DRAGON_SHADOW 5018 #define RACE_DRAGON_LIZARD 5019 #define RACE_DRAGON_MAX 5020 /* For use with special object */

#define RACE_LESSER_DEMON 5020 /* Approx. Level < 100 */ #define RACE_GREATER_DEMON 5021 /* Approx. Level > 100 */ #define RACE_SERVANT_DEMON 5022 /* Approx. < level 20 */ #define RACE_PRINCE_DEMON 5023 /* Almost god, max level 149 (no more!) */ #define RACE_LESSER_DEVIL 5025 /* Approx. Level < 100 */ #define RACE_GREATER_DEVIL 5026 /* Approx. Level > 100 */ #define RACE_SHADOW_DEVIL 5027 #define RACE_ARCH_DEVIL 5028

#define RACE_MEDUSA 5030 #define RACE_WINGED_HORSE 5031 #define RACE_GARGOYLE 5033 #define RACE_GOLEM 5034 #define RACE_YOGOLOTH 5035 #define RACE_MIST_DWELLER 5036

#define RACE_WEREWOLF 5037 #define RACE_WERERAT 5038

#define RACE_ELEMENTAL_AIR 5040 #define RACE_ELEMENTAL_EARTH 5041 #define RACE_ELEMENTAL_FIRE 5042 #define RACE_ELEMENTAL_FROST 5043 #define RACE_ELEMENTAL_WATER 5044 #define RACE_ELEMENTAL_LIGHT 5045

#define RACE_DEVOURER 5600 #define RACE_DANALEK 5601

#define RACE_FAMILIAR 5900 /* Weirdo race... */ #define RACE_OTHER_CREATURE 5999

#define RACE_ZOMBIE 6000 #define RACE_LICH 6001 #define RACE_GHOUL 6002 #define RACE_SKELETON 6003 #define RACE_GHOST 6004 #define RACE_SPIRIT 6005 #define RACE_MUMMIE 6006 #define RACE_BANSHEE 6007 #define RACE_NAGA_SOUL 6008 #define RACE_OTHER_UNDEAD 6999

#define RACE_CRAB 7000 #define RACE_SAND_SPIDER 7002 #define RACE_RIVER_LEECH 7003 #define RACE_SAND_CRAWLER 7004 #define RACE_SEA_HORSE 7005 #define RACE_SHARK 7006 #define RACE_LAMPREY 7007 #define RACE_MANTA_RAY 7008 #define RACE_CLIFF_HUGGER 7009 #define RACE_ALGAE_MAN 7010 #define RACE_WHELK 7011 #define RACE_OYSTER 7012 #define RACE_KRAKEN 7013 #define RACE_CAVE_FISHER 7014 /* Tiamat: lobster / spider breed */ #define RACE_OCTOPUS 7015 #define RACE_WHALE 7016 #define RACE_DOLPHIN 7017 #define RACE_EEL 7018

#define RACE_FISH 7998 #define RACE_OTHER_MARINE 7999

</PROGRAMLISTING>


</appendix> <appendix id="app-d"><TITLE>weapon definitions in values.h</TITLE>

<PARA>The following list was extracted from the values.h</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define WPN_BATTLE_AXE 7 /* Two Handed */ #define WPN_HAND_AXE 8 #define WPN_WAR_MATTOCK 9 /* Two Handed */ #define WPN_WAR_HAMMER 10 #define WPN_GREAT_SWORD 11 /* Two Handed */ #define WPN_SCIMITAR 12 #define WPN_KATANA 13 #define WPN_FALCHION 14 #define WPN_KOPESH 15 #define WPN_BROAD_SWORD 16 #define WPN_LONG_SWORD 17 #define WPN_RAPIER 18 #define WPN_SHORT_SWORD 19 #define WPN_DAGGER 20 #define WPN_BATTLE_MACE 21 /* Two Handed */ #define WPN_MACE 22 #define WPN_BATTLE_CLUB 23 /* Two handed */ #define WPN_CLUB 24 #define WPN_MORNING_STAR 25 #define WPN_FLAIL 26 #define WPN_QUARTERSTAFF 27 #define WPN_SPEAR 28 #define WPN_HALBERD 29 #define WPN_BARDICHE 30 #define WPN_SICKLE 31 #define WPN_SCYTHE 32 /* Two handed */ #define WPN_TRIDENT 33 #define WPN_FIST 34 #define WPN_KICK 35 #define WPN_BITE 36 #define WPN_STING 37 #define WPN_CLAW 38 #define WPN_CRUSH 39 #define WPN_WHIP 40 #define WPN_WAKIZASHI 41 #define WPN_BOW 42 /* Here down to Staff are Rangers Guild Jan 98 */ #define WPN_CROSSBOW 43 #define WPN_SLING 44 #define WPN_FIGHTING_STAFF 45 /* Two handed */ #define WPN_SABER 46 #define WPN_CUTLASS 47 #define WPN_MACHETE 48 #define WPN_LANCE 49 #define WPN_SHOCK_LANCE 50 #define WPN_PIKE 51 #define WPN_GREAT_AXE 52 #define WPN_BATTLE_SWORD 53

</PROGRAMLISTING></INFORMALEXAMPLE>

</appendix>

<appendix id="app-e"> <TITLE>Liquid macros file</TITLE>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define LIQ_WATER(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,10,1,0,POISON) #define LIQ_BEER(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,3,POISON) #define LIQ_WINE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,5,2,5,POISON) #define LIQ_ALE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("brown", WEIGHT,CAPACITY,INSIDE,5,2,2,POISON) #define LIQ_DARK_ALE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("dark brown", WEIGHT,CAPACITY,INSIDE,5,2,1,POISON) #define LIQ_WISKEY(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("golden",WEIGHT ,CAPACITY,INSIDE,4,1,6,POISON) #define LIQ_WHISKY(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("golden",WEIGHT ,CAPACITY,INSIDE,4,1,6,POISON)

#define LIQ_LEMONADE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("red", WEIGHT, CAPACITY, INSIDE, 8, 1, 0,POISON) #define LIQ_FIREBRT(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("green", WEIGHT,CAPACITY,INSIDE,0,0,10,POISON) #define LIQ_LOCALSPC(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("clear", WEIGHT, CAPACITY, INSIDE, 3, 3, 3,POISON) #define LIQ_SLIME(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("light green", WEIGHT,CAPACITY,INSIDE,8,4,0,POISON) #define LIQ_MILK(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("white", WEIGHT, CAPACITY, INSIDE, 6, 3, 0,POISON) #define LIQ_TEA(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("brown", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON) #define LIQ_COFFEE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON) #define LIQ_COFFE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 6, 1, 0,POISON)

#define LIQ_BLOOD(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("red", WEIGHT, CAPACITY, INSIDE, -1, 2, 0, POISON) #define LIQ_SALTWAT(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("clear", WEIGHT, CAPACITY, INSIDE, 2, 1, 0, POISON) #define LIQ_COKE(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("black", WEIGHT, CAPACITY, INSIDE, 5, 1, 0,POISON) #define LIQ_VODKA(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("clear", WEIGHT,CAPACITY,INSIDE,0,0,10,POISON) #define LIQ_BRANDY(WEIGHT,CAPACITY,INSIDE,POISON) \ LIQ_DEF("golden", WEIGHT,CAPACITY,INSIDE,4,1,6,POISON)

</PROGRAMLISTING></INFORMALEXAMPLE>

</appendix>

<appendix id="app-f"> <TITLE>Complete magical transfers macros listing</TITLE>

<PARA>This listing of macros was taken from wmacros.h. When building your objects you should check the macros file to make sure you have the most up to date macros.</PARA>

<INFORMALEXAMPLE><PROGRAMLISTING>

#define CHAR_FLAG_TRANSFER(_MFLAGS) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_CHARFLAGS \ duration -1 \ data[0] _MFLAGS \ firstf TIF_EYES_TINGLE \ tickf TIF_NONE \ lastf TIF_EYES_TINGLE \ applyf APF_MOD_CHAR_FLAGS;

/* skill MUST be one of SKI_XXX, amount in -10 to +10 */ #define SKILL_TRANSFER(skill, amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_SKILL_TRANSFER \ duration -1 \ data[0] skill \ data[1] amount \ firstf TIF_SKI_INC \ tickf TIF_NONE \ lastf TIF_SKI_DEC \ applyf APF_SKILL_ADJ;

/* weapon MUST be one of WPN_XXX, amount in -10 to +10 */ #define WEAPON_TRANSFER(weapon, amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_WEAPON_TRANSFER \ duration -1 \ data[0] weapon \ data[1] amount \ firstf TIF_WPN_INC \ tickf TIF_NONE \ lastf TIF_WPN_DEC \ applyf APF_WEAPON_ADJ;

/* spell MUST be one of SPL_XXX, amount in -10 to +10 */ #define SPELL_TRANSFER(spell, amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_SPELL_TRANSFER \ duration -1 /* Must be permanent in the object */ \ data[0] spell /* It is a spell SPL_XXX transfer */ \ data[1] amount /* Amount of better spell skill */ \ firstf TIF_SPL_INC \ tickf TIF_NONE \ lastf TIF_SPL_DEC \ applyf APF_SPELL_ADJ;

#define STR_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_STR \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_STR /* It is a strength function */ \ data[1] amount /* Amount of better strength */ \ firstf TIF_STR_INC \ tickf TIF_NONE \ lastf TIF_STR_DEC \ applyf APF_ABILITY;

#define DEX_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_DEX \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_DEX /* It is a dex function */ \ data[1] amount /* Amount of better dex */ \ firstf TIF_DEX_INC \ tickf TIF_NONE \ lastf TIF_DEX_DEC \ applyf APF_ABILITY;

#define CON_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_CON \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_CON /* It is a con function */ \ data[1] amount /* Amount of better con */ \ firstf TIF_CON_INC \ tickf TIF_NONE \ lastf TIF_CON_DEC \ applyf APF_ABILITY;

#define CHA_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_CHA \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_CHA /* It is a cha function */ \ data[1] amount /* Amount of better cha */ \ firstf TIF_CHA_INC \ tickf TIF_NONE \ lastf TIF_CHA_DEC \ applyf APF_ABILITY;

#define BRA_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_BRA \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_BRA /* It is a bra function */ \ data[1] amount /* Amount of better bra */ \ firstf TIF_BRA_INC \ tickf TIF_NONE \ lastf TIF_BRA_DEC \ applyf APF_ABILITY;


#define MAG_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_MAG \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_MAG /* It is a mag function */ \ data[1] amount /* Amount of better mag */ \ firstf TIF_MAG_INC \ tickf TIF_NONE \ lastf TIF_MAG_DEC \ applyf APF_ABILITY;


#define DIV_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_DIV \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_DIV /* It is a div function */ \ data[1] amount /* Amount of better div */ \ firstf TIF_DIV_INC \ tickf TIF_NONE \ lastf TIF_DIV_DEC \ applyf APF_ABILITY;

#define HIT_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_HPP \ duration -1 /* Must be permanent in the object */ \ data[0] ABIL_HP /* It is a hit point function */ \ data[1] amount /* Amount of better strength */ \ firstf TIF_HIT_INC \ tickf TIF_NONE \ lastf TIF_HIT_DEC \ applyf APF_ABILITY;

#define SPEED_TRANSFER(newspeed) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_SPEED \ duration -1 /* Must be permanent in the object */ \ data[0] newspeed \ firstf TIF_SPEED_BETTER \ tickf TIF_NONE \ lastf TIF_SPEED_WORSE \ applyf APF_SPEED;

#define SLOW_TRANSFER(amount) \ flags {UNIT_FL_MAGIC} \ affect \ id ID_TRANSFER_SPEED \ duration -1 \ data[0] newspeed \ firstf TIF_SPEED_WORSE \ tickf TIF_NONE \ lastf TIF_SPEED_BETTER \ applyf APF_SPEED;

</PROGRAMLISTING></INFORMALEXAMPLE> </appendix>

<appendix id="app-g"> <TITLE>Skill definitions in values.h</TITLE>

<PARA>The following list was extracted from the values.h</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define SKI_TURN_UNDEAD 0 #define SKI_SCROLL_USE 1 #define SKI_WAND_USE 2 #define SKI_CONSIDER 3 #define SKI_DIAGNOSTICS 4 #define SKI_APPRAISAL 5 #define SKI_VENTRILOQUATE 6 #define SKI_WEATHER_WATCH 7 #define SKI_FLEE 8 #define SKI_SNEAK 9 #define SKI_BACKSTAB 10 #define SKI_HIDE 11 #define SKI_FIRST_AID 12 #define SKI_PICK_LOCK 13 #define SKI_STEAL 14 #define SKI_RESCUE 15 #define SKI_SEARCH 16 #define SKI_LEADERSHIP 17 #define SKI_KICK 18 #define SKI_SWIMMING 19 #define SKI_BASH 20 #define SKI_CLIMB 21 #define SKI_SHIELD 22 #define SKI_TRIP 23 #define SKI_DUAL_WIELD 24 #define SKI_CUFF 25 #define SKI_RESIZE_CLOTHES 26 #define SKI_RESIZE_LEATHER 27 #define SKI_RESIZE_METAL 28 #define SKI_EVALUATE 29 /* "Fake skill to simulate combinations */ #define SKI_PEEK 30 #define SKI_PICK_POCKETS 31 #define SKI_FILCH 32 #define SKI_DISARM 33 #define SKI_SKIN 34 #define SKI_SHELTER 35 #define SKI_SOOTHE 36 #define SKI_AMBUSH 37 #define SKI_CURARE 38 #define SKI_FASHION 39 #define SKI_BUTCHER 40 #define SKI_LAY_TRAP 41 #define SKI_SHOOT 42 #define SKI_HERBS 43 #define SKI_FORAGE 44 #define SKI_DOWSE 45 #define SKI_TRACK 46 #define SKI_HUNT 47 #define SKI_THROW 48 #define SKI_COOK 49 #define SKI_SCAN 50 #define SKI_SLIP 51 #define SKI_PALM 52 #define SKI_PLANT 53 #define SKI_STALK 54 #define SKI_KNEE 55 #define SKI_ELBOW 56 #define SKI_HIT 57 #define SKI_PUNCH 58 #define SKI_GLANCE 59


</PROGRAMLISTING></INFORMALEXAMPLE> </appendix>

<appendix id="app-h"> <TITLE>Spell definitions in values.h</TITLE>

<PARA>The following list was extracted from the values.h</PARA> <INFORMALEXAMPLE><PROGRAMLISTING>

#define SPL_CALL_LIGHTNING 12 /* Cell Group */ #define SPL_BLESS 13 /* D I V I N E */ #define SPL_CURSE 14 #define SPL_REMOVE_CURSE 15 #define SPL_CURE_WOUNDS_1 16 #define SPL_CURE_WOUNDS_2 17 #define SPL_CURE_WOUNDS_3 18 #define SPL_CAUSE_WOUNDS_1 19 #define SPL_CAUSE_WOUNDS_2 20 #define SPL_CAUSE_WOUNDS_3 21 #define SPL_DISPEL_EVIL 22 #define SPL_REPEL_UNDEAD_1 23 #define SPL_REPEL_UNDEAD_2 24 #define SPL_BLIND 25 #define SPL_CURE_BLIND 26 #define SPL_LOCATE_OBJECT 27 #define SPL_LOCATE_CHAR 28

#define SPL_RAISE_MAG 29 /* P R O T E C T I O N */ #define SPL_RAISE_DIV 30 #define SPL_RAISE_STR 31 #define SPL_RAISE_DEX 32 #define SPL_RAISE_CON 33 #define SPL_RAISE_CHA 34 #define SPL_RAISE_BRA 35 #define SPL_SUN_RAY 36 #define SPL_DIVINE_RESIST 37 #define SPL_QUICKEN 38 #define SPL_HASTE 39 #define SPL_RAISE_SUMMONING 40 #define SPL_AWAKEN 41 #define SPL_MIND_SHIELD 42 #define SPL_HEAT_RESI 43 #define SPL_COLD_RESI 44 #define SPL_ELECTRICITY_RESI 45 #define SPL_POISON_RESI 46 #define SPL_ACID_RESI 47 #define SPL_PRO_EVIL 48 #define SPL_SANCTUARY 49 #define SPL_DISPEL_MAGIC 50 #define SPL_SUSTAIN 51 #define SPL_LOCK 52 #define SPL_UNLOCK 53 #define SPL_DROWSE 54 #define SPL_SLOW 55 #define SPL_DUST_DEVIL 56 #define SPL_DET_ALIGN 57 /* D E T E C T I O N */ #define SPL_DET_INVISIBLE 58 #define SPL_DET_MAGIC 59 #define SPL_DET_POISON 60 #define SPL_DET_UNDEAD 61 #define SPL_DET_CURSE 62 #define SPL_SENSE_LIFE 63 #define SPL_IDENTIFY_1 64 #define SPL_IDENTIFY_2 65

#define SPL_RANDOM_TELEPORT 66 /* S U M M O N I N G */ #define SPL_CLEAR_SKIES 67 #define SPL_STORM_CALL 68 #define SPL_WORD_OF_RECALL 69 #define SPL_CONTROL_TELEPORT 70 #define SPL_MINOR_GATE 71 #define SPL_GATE 72 #define SPL_CREATE_FOOD 73 /* C R E A T I O N */ #define SPL_CREATE_WATER 74 #define SPL_LIGHT_1 75 #define SPL_LIGHT_2 76 #define SPL_DARKNESS_1 77 #define SPL_DARKNESS_2 78 #define SPL_STUN 79 #define SPL_HOLD 80 #define SPL_ANIMATE_DEAD 81 #define SPL_LEATHER_SKIN 82 #define SPL_BARK_SKIN 83 #define SPL_CONTROL_UNDEAD 84 #define SPL_BONE_SKIN 85 #define SPL_STONE_SKIN 86 #define SPL_AID 87 #define SPL_COLOURSPRAY_1 88 /* M I N D */ #define SPL_COLOURSPRAY_2 89 #define SPL_COLOURSPRAY_3 90 #define SPL_INVISIBILITY 91 #define SPL_WIZARD_EYE 92 #define SPL_FEAR 93 #define SPL_CONFUSION 94 #define SPL_SLEEP 95 #define SPL_XRAY_VISION 96 #define SPL_SUMMER_RAIN 97 #define SPL_COMMAND 98 #define SPL_LEAVING 99 #define SPL_FIREBALL_1 100 /* H E A T */ #define SPL_FIREBALL_2 101 #define SPL_FIREBALL_3 102

#define SPL_FROSTBALL_1 103 /* C O L D */ #define SPL_FROSTBALL_2 104 #define SPL_FROSTBALL_3 105

#define SPL_LIGHTNING_1 106 /* C E L L */ #define SPL_LIGHTNING_2 107 #define SPL_LIGHTNING_3 108

#define SPL_STINKING_CLOUD_1 109 /* I N T E R N A L */ #define SPL_STINKING_CLOUD_2 110 #define SPL_STINKING_CLOUD_3 111 #define SPL_POISON 112 #define SPL_REMOVE_POISON 113 #define SPL_ENERGY_DRAIN 114 #define SPL_DISEASE_1 115 #define SPL_DISEASE_2 116 #define SPL_REM_DISEASE 117 #define SPL_ACIDBALL_1 118 /* E X T E R N A L */ #define SPL_ACIDBALL_2 119 #define SPL_ACIDBALL_3 120 #define SPL_FIND_PATH 121 /* Divine */ #define SPL_DISPEL_GOOD 122 #define SPL_PRO_GOOD 123 #define SPL_TRANSPORT 124 #define SPL_FIRE_BREATH 125 #define SPL_FROST_BREATH 126 #define SPL_LIGHTNING_BREATH 127 #define SPL_ACID_BREATH 128 #define SPL_GAS_BREATH 129 #define SPL_LIGHT_BREATH 130 #define SPL_HOLD_MONSTER 131 #define SPL_HOLD_UNDEAD 132 #define SPL_RAISE_DEAD 133 #define SPL_RESURRECTION 134 #define SPL_UNDEAD_DOOR 135 #define SPL_LIFE_PROTECTION 136 #define SPL_ENERGY_BOLT 137 #define SPL_CLENCHED_FIST 138 #define SPL_METEOR_SHOWER 139 #define SPL_SUN_BEAM 140 #define SPL_SOLAR_FLARE 141 #define SPL_SUMMON_DEVIL 142 #define SPL_SUMMON_DEMON 143 #define SPL_SUMMON_FIRE 144 #define SPL_SUMMON_WATER 145 #define SPL_SUMMON_AIR 146 #define SPL_SUMMON_EARTH 147 #define SPL_CHARGE_WAND 148 #define SPL_CHARGE_STAFF 149 #define SPL_MENDING 150 #define SPL_REPAIR 151 #define SPL_RECONSTRUCT 152 #define SPL_SENDING 153 #define SPL_REFIT 154 #define SPL_FIND_WANTED 155 #define SPL_LOCATE_WANTED 156 #define SPL_SUN_GLOBE 157 #define SPL_MAGIC_CANDLE 158 #define SPL_SONIC_BREATH 159 #define SPL_SHARD_BREATH 160 #define SPL_CONE_SHARD 161 #define SPL_RAISE_HPP 162 #define SPL_MANA_BOOST 163 /* Creation */ #define SPL_TOTAL_RECALL 164 #define LAST_SPELL 165


</PROGRAMLISTING></INFORMALEXAMPLE> </appendix> </book>