*************************************************************
*
*
*
Copyright 2014 Asylum Mud Organization
*
*
*
* This document contains information which is copyright and *
* of value to the Asylum MUD Organization. It may be used
*
* only for the agreed purpose for which it has been
*
* provided. The Asylum MUD Organization's prior written
*
* authorisation is required before any part is reproduced
*
*
*
*
All Rights Reserved
*
*************************************************************
*
*
* Filename: zonewriting.manual
*
*
*
* Purpose: Asylum bible of zone writing specifics
*
*
*
*************************************************************
Change History
-------------------------------------------------------------------------Revision 1.15 2014/11/08 12:25:25
Saruman
- Cleaned up file with list of updates from 1.14
- Armour or Armor? (added)
- Following flags were added:
CanIceStorm, BarOnFlee, BarAllowFlee, Food, CanTalk, CantReward
NoStun, Dealer, Healer, Follow, CanFollow, BlackSmith, NoClone
NoStore, ValueFixed, Holy, HotProtect, ColdProtect, DeathRoomSave
Monk, NoMorwen, FlyEnhance, GetAll, TightSpace, NoBuyBack
Revision 1.14 2005/10/07 10:30:58 asylum
Lumina
- Updated and expanded too much information to list.
Revision 1.13 2005/02/19 01:01:43 asylum
Gemmell
- Change email address
Revision 1.12 2004/04/20 12:23:32 asylum
Note
- BarOnFlee BarAllowFlee flags
Revision 1.11 2002/07/19 13:24:15 asylum
Herbert
- ZOne style section
Revision 1.10 2002/07/17 09:07:37 asylum
*** empty log message ***
Revision 1.9 2002/07/17 08:36:31 asylum
Tantalus
- NoSkill Concealed NoRepair
Revision 1.8 2002/07/05 10:12:26 asylum
*** empty log message ***
Revision 1.7 2002/07/04 08:50:39 asylum
*** empty log message ***
Revision 1.6 2002/04/30 15:41:10 asylum
Herbert
- Using damage for food
Revision 1.5 2002/04/30 15:20:22 asylum
Note
- Upgrade for burrow submerged flying highroof left checked out
Revision 1.4 2002/02/12 12:59:50 asylum
*** empty log message ***
Revision 1.3 2002/02/08 10:24:12 asylum
Note:
- Added Merchant Oflag
Revision 1.2 2002/02/07 14:59:57 asylum
Tanatlus
- Added missing oflags, mflags and lflags.
Note
- GAME SPECIFIC flags like Fled and ArriveDone (mflags)
which are not to be used by players but which are set by the game
are NOT detailed in here.
-----------------------------------------------|
|
|
The Asylum Game System
|
|
**********************
|
|
|
|
A manual for the aspiring world builder
|
------------------------------------------------
Written by: Valentin Popescu - (vpopesc@opus.calstatela.edu)
Additions : Vitastjern
- (Anna.Eklund@ludd.luth.se)
*******************************************************
*
*
* Extensively modified and re-written for Asylum Game *
*
System by Herbert
*
*
*
*******************************************************
Contents:
0) INTRODUCTARY NOTES
0.1) Armour or Armor?
1) ZONES
1.1) What exactly is a zone?
1.2) Tips for creating and maintaining your zone
1.3) Advanced features
2) SPECIAL CASES (Specials)
3) CREATING MOBILES
3.1) What is a mobile?
3.2) The SFlags
3.3) The PFlags
3.4) The MFlags
3.5) Mobile Triggers
3.6) Dealers
3.7) Mobiles that respond to tells
3.8) Characteristics
3.9) Grouped Mobiles
3.10) Navigating Mobiles
4) CREATING OBJECTS
4.1) What is an object?
4.2) Object Flags and their meanings
4.3) Finding One Object by examining another
4.4) Object Triggers
4.5) Bombs
4.6) Dynamic Count Fields
5) CREATING ROOMS
5.1) What is a room?
5.2) Lflags and their meaning
6) CREATING DOORS
6.1) What's so special about doors?
7) ROPES
7.1) Ropes untieable only from one side of the link
7.2) Pre-linked ropes
8) SOME IMPORTANT NOTES
8.1) Referencing one zone from another
8.2) Entering text strings
8.3) Colouring your Zone
8.4) Style
0) Introductory Notes
=====================================================================
0.1) Armour or Armor?
++++++++++++++
"We have really everything in common with America nowadays except, of course
language.." - Oscar Wilde
"England and America are two countries separated by the same language."
- George Bernhard Shaw
The aber MUD game system was originally created in Aberystwyth in Wales and
was coded using 'British English'. However much subsequent development took
place in the USA and was coded using 'American English'.
Asylum MUD resides in Scotland and all Asylum specific code is once again in
'British English'.
The result of this is that both the UK and the US spellings of the word armour
are used in different areas of the code, so it important to pay attention to
which varient of the spelling is used for a given field or flag. (The text
viewed by players of the game should be exclusively in British English.)
1) Zones
=====================================================================
"...and in the beginning there was nothing."
1.1) What exactly is a zone?
++++++++++++++++++
A zone, is nothing more than a text file. All you need to create one is an
editor that writes plain text files, a little spare time, and a lot of
imagination.
Once you have finished your zone in can be submitted to
submissions@asylum-mud.org
Given that Asylum receives many submissions it might be a good idea to
discuss your zone concept with the Asylum zones team before writing it in
full.
1.2) Tips for creating and maintaining your zone
++++++++++++++++++++++++++++++++++
When creating your zone, it is helpful to divide it in three parts, namely
objects, mobiles, and locations. When the world is built, a special program
will scan the zone file, and look for one of three keywords:
%mobiles
%objects %locations
These keywords tell the program what type of data is to follow.
For example, the outline of a zone file may look like this:
%mobiles
[definitions for your mobiles]
%objects
[definitions for your objects]
%locations
[definitions for your locations (rooms)]
Note: The order of the above fields is important, not folowing this order will
cause the C preprocessor that translates the data to machine readable for to
fail.
You must also add the following three lines at the very beginning of a zone
file:
#include "undef.h"
#include "exits.h"
#include "cflags.h"
They must start at the very beginning of the line. They read the definitions
of the flags you will be learning about in subsequent pages.
1.3) Advanced features
+++++++++++++++
Remember, zones are run through the C preprocessor when the world is rebuilt.
Therefore, you can use C preprocessor features, such as comments using the
/* and */ delimiters, macros, etc. If you don't exactly know what that means,
don't worry about it.
Or.. well. just remember.. if you want to put a comment inside a zone file,
enclose it between /* and */'s. For example:
/* this is a comment */
This will have absolutely no effect on the zone. Nothing after a /* will be
processed until a */ is found.
If you use #defines, try to use capital letters for your macro name. This is
a convention, and also a way to prevent headaches when one of your macro
names appears inside a description.
2) Special Cases
=====================================================================
There are things called special cases. Specials, as they are referred to in
MUD-lingo, are things that you may want to happen in a certain room,
situation, or when something you've designed is triggered.
Example: You've defined an object called a Wand. In the game, when someone
takes your wand, you'd like them to use it to lower a drawbridge,
perhaps. This is a special case for the Wand.
/*
I'd like the wand to be waved in room1, and it will lower the drawbridge which
will connect room1 and room2
*/
The above statement will instruct the programmer to write a special
case, which will allow what you've instructed him to program.
If many of you are familiar with Standard AberMUD zones, digging in the
IceCave is an example of a special case.
*************************************************************
*
*
* Generally speaking we would prefer it if you keep all of *
* your specials in a 2nd text file which you could submit *
*
along with your zone file
*
*
*
*************************************************************
3) Creating Mobiles
=====================================================================
"...or things that go bump in the night."
3.1) What is a mobile?
++++++++++++++
A mobile (or NPC, or whatever you want to call it) is whatever moves in the
game and doesn't appear in the 'who' listing.
To start off, remember to preface all your mobile data with the %mobiles
keyword. This has to be done at least once in the file. See the ZONES section
for more info on this.
A typical mobile can be defined by the following fields. Note that many of
these are not always required.
%mobiles
Name
Pname
Location
SFlags
MFlags
PFlags
Strength
Damage
Armor
Aggression
Speed
Description
Examine
= Askani
= "Lady Askani"
= jeff1
{ Female }
{ CanFireball CanFrost }
{ NoZap }
= 150
= 20
=0
= 50
=5
= "Askani the Lady in Waiting is here."
= "You see a beautiful lady in waiting before you"
End
= Askani
Some explanations are in order here.
Notice the fields Name and End. They are the most important fields in the
description. The Name field gives the mobile a name, and also signals that
what follows should be assigned to that mobile, until the End field is
encountered. The Name and End field should be the same.
The PName field is the name which will be seen by players. It may be more than
one word, but in that case enclose it in quotes. If the Name field is the same
as the name you wish the players to see, you don't have to use this field.
Name and End fields may contain numbers if not being used as PName also, this
enables you to have several mobiles with the same PName.
e.g.
Name = guard1
Pname = "The Guard"
End = guard1
Name = guard2
Pname = "The Guard"
End = guard2
Where a mobile's name is not a proper noun ie guard or wombat as opposed
to David or Frank include 'The' in the PName e.g.
PName = "The Wombat"
This is so that in combat the messages are:
'The wombat bites your kneecap'
...rather than:
'Wombat misses your elbow'
[OBJECTS CAN NOT HAVE A TWO WORD PNAME ... JUST MOBILES]
[MOBILES DO NOT HAVE AltNames]
Location is the room in which the mobile starts off. This is a text string,
which will be explained better in the section describing location
definitions.
The Strength is the mobile's strength. An averagely strong mobile will be
about 120 strength, whereas a tough one would be around 300.
The Damage is how much damage a mobile does on a successful hit. Of course,
that is altered based on a number of factors, but think of it as the base
damage the mobile will usually do.
The Armor field acts as invisible armour. A mobile with an armor field of 10
will be like wearing a shield of 10AC. You can use this for mobiles that
could be considered to have natural armour such as an armadillo or a
rhinoceros.
Speed is how fast the mobile moves around. If you want your mobile not to
move around at all, set this to 0. If you do not specify speed the mobile
will be assigned a default spped of 5.
Aggression is the probability that mobile will attack a mortal in the room,
on every turn. A turn only takes a few seconds.
Description is what you see when you enter the room that mobile is in.
Examine is what you see if you examine the mobile.
The remaining fields, SFlags, MFlags, and PFlags are a collection of flag
fields. Note that you should not use the = sign on those fields, but rather
enclose the needed flags in curly brackets, { and }'s.
The mobile can also contain 'trigger' fields these will be discussed later.
3.2) The SFlags
+++++++++
Female
This mobile is female (default is male).
It
This mobile is gender neutral. "It" will override "Female". (default is
male)
If the SFlag field is omitted or neither the "Female" nor the "It" Sflags are
used the mobile will be male by default.
Good
This mobile will never attack any player or mobile that does not have the
Evil flag, regardless of aggression. An aggressive Good mobile may attack
an Evil player or mobile.
Evil
If aggression is non-zero, they will attack any non-Evil player or mobile.
They will not attack Evil players or mobiles.
3.3) The PFlags
+++++++++
The PFlags you may use here are:
NoExorcise
This mobile may not be exorcised from the game (cannot be kicked off)
except by the very highest powers.
NoZap
This mobile cannot be zapped except by the very highest powers.
NoMagic
You cannot use aggressive magic spells on this mobile.
NoSummon
Lower powers cannot summon this mobile.
NoHassle
This mobile cannot be attacked.
NoSteal
You can't steal from this mobile.
NoAlias
This mobile cannot be aliased.
Or of course, you can leave this field out altogether.
3.4) The MFlags
+++++++++
This is the main set of flags for a mobile. You can think of these as
Mobile Flags.
CanFireball
This mobile may use fireballs during fights.
CanMissile
This mobile may use missile spells during fights.
CanShock
This mobile may use shock spells during fights.
CanFrost
This mobile may use frost spells during fights.
CanBlind
This mobile will attempt to blind you if you attack it.
CanDeaf
This mobile will attempt to deafen you if you attack it.
CanCripple
This mobile will attempt to cripple you if you attack it.
CanPoison
This mobile will attempt to poison you if you attack it.
CanMute
This mobile will attempt to mute you if you attack it.
CanDeath
This mobile will attempt to cast a death spell on you if you attack it.
CanLavaRain
This mobile will attempt to cast the LavaRain spell in combat.
CanIceStorm
This mobile will attempt to cast the IceStorm spell in combat.
NegFrost
This mobile will get stronger if you use the frost spell against it.
NegFireball
This mobile will get stronger if you use the fireball spell against it.
NegMissile
This mobile will get stronger if you use the missile spell against it.
NegShock
This mobile will get stronger if you use the shock spell against it.
NegDeath
This mobile will get stronger if you use the death spell against it.
NoHeat
This mobile will not attack you if you are carrying a source of
light. Think of the yeti in the blizzard pass.
Thief
This mobile may steal stuff you are carrying.
StealWorn
This mobile may steal stuff you are wearing.
StealWeapon
This mobile may steal the weapon you are wielding.
PitIt
This mobile may pit stuff it picks up. See PickStuff.
DrainLev
You may lose your current level if you fight this mobile. This is a more
serious version of the DrainScr flag.
DrainScr
You may lose points if you attack this mobile. Think of the Wraith near
Shazareth.
DrainAura
You may lose aura if you attack this mobile.
NoCorpse
This mobile will leave no corpse when slain.
BarDir
The flags BarNorth, BarSouth, BarWest, BarEast, BarDown, and BarUp will
make the mobile hold back mortals trying to go in that direction.
Think of the figure in the library.
BarAll
Mobile will bar all directions.
BarAttack
Trying to pass this mobile will cause it to attack you. Used in conjunction
with BarDir flags to specify in which direction the mobile will take
exception to a runner's attempt to pass.
BarOnFlee
Will bar a player in all directions if attempting to flee (does not
need any other Bar flags)
BarAllowFlee
Will allow a player to flee from a mobile that is currently barring
Qfood
This mobile will quit the game if it is given a food item.
Food
This is a unique flag originally designed to hide food items in mobile's
inventories but can also be used to "hide" normal items a mobile might be
carrying carrying from a player.
NoGrab
This mobile will not let you pick up stuff in the same room as it is.
GrabHostile
Same as NoGrab, but the mobile will also get nasty and attack you if you
try to pick up something.
PickStuff
This mobile will pick up stuff it finds while wandering around. It will
also wield the best weapon it can find and wear all armour it picks up.
Hungry
This mobile will eat food it finds while wandering around.
NoSteal
You may not steal from this mobile.
Cross
This mobile will not attack if you are carrying the cross.
Think of the Wraith.
Newbie
This mobile can only be attacked by mortals below a certain level.
NewbieProtect
Player of a low level (< Lord) will be warned that mobile is too Dangerous
for them.
MobProtect
Mobile will not be attacked by other mobiles.
NoFlame
Mobile will not catch fire if it is bombed.
StaticAgg
Mobile will not have its aggression raised when it is attacked.
The default is that mobile aggression goes to 100%.
NoZombie
This mobile will not become a zombie when killed.
(see info zombies within Asylum)
IsMute
This mobile does not give a deathshout if it wins a fight.
(or curse once implemented)
ThrowWeapon (not coded)
Mobile will attempt to throw a weapon at a player in same room.
CanCurse
Not Currently Implemented
Undead
This mobile is one of the undead and will be affected by various in game
features designed for undead mobiles.
CanResurrect
Can resurrect dead mobiles.
NeuAllMagic
Magic has no net effect on strength of mobile.
ArriveOneShot
Mobile only performs Arrive triggers only once.
DepartOneShot
Mobile only performs Depart triggers only once, even if player leaves and
comes back and leaves again.
HitLowArmour
Mobile will attack the part of the body with the LOWEST armour but ignore
Areas which have no armour at all.
DrainMana (not coded)
Mobile drains a player's object mana.
Capture
Mobile will drag player back to it's start location if attacked. A good
example is Groovy.
HitWeakest
Mobile will focus on the weakest member of an attacking group.
HitLowArea
Mobile will hit the area of a player's body which is the most
unprotected.
DamageArmour
Mobile will damage an attacking player's armour.
KillInven
When the mobile is killed, their inventory is destroyed.
Attack<body area>
Like AttackArms, AttackBody etc. Mobile will only attack the area of
the body which the flags dictate - multiple flags can be specified and
the mobile will randomly select the area.
DropBomb
Mobile will light a held bomb, drop it and flee.
ThrowBomb (not coded)
Mobile will light a held bomb, and throw it into an adjacent room.
BatterDoors (not coded)
Mobile will attempt to break down a door by hitting it. Doors will be
weakened and after a minute or so it will be shattered.
NotDir
The flags NotNorth, NotSouth, NotWest, NotEast, NotDown, and NotUp will
prevent the mobile trying to go in that direction. Useful in controlling
where a mobile will go in certain situations.
OpenDoors
This mobile will open doors
BreakDoors
This mobile will break open doors (including locked ones) which cannot then
be closed.
NegAllMagic
Pretty much magic immune.
NoSkill
Combat skills cannot be used against the mobile.
Guard
This mobile will atack you if you are fighting in the same room as it.
SlowRegen
There are certain situations in time consuming zones where a runner may
encounter a mobile a second time because it has regenerated after having
been killed once. This flag delays their regeneration.
CrossZones
Mobiles with this flag will wander from zone to zone in asylum. e.g Reaper,
Puff
NoSleep
Mobile will not sleep.
TellRespond
Mobile will respond to player tells if the appropriate TellFile is in place.
See the section on TellRespond mobiles for details (3.7).
CanTalk
This is used to control tells from mobiles. For example when you are close
to levelling, a mobile might say "Lawks-a-lordy, if you snuff me you'll make
%s or higher!" Human mobiles do not need this, but non-human mobiles do.
LevDamage
The damage done by the mobile, when fighting a player, depends on the
maximum strength of the player. The higher the player's max strength, the
higher the damage (so high level players will be hurt more). This affects
damage from spells as well as from being hit.
CantReward
Rewards cannot be placed on this mobile.
Flying
This mobile is flying and cannot be attacked by those that cannot attack
flying creatures. Mobiles may stop flying in order to attack someone who
is not flying.
Burrowed
This mobile is burrowed and cannot be attacked by those that cannot attack
burrowed creatures. Mobiles may surface in order to attack someone who
is above ground.
Submerged
This mobile is submerged and cannot be attacked by those that cannot attack
submerged creatures. Mobiles may surface in order to attack someone who
is not under water.
NoStun
This mobile can not be stunned by various actions. Currently HeadButt is
restricted.
Dealer
This mobile is a dealer. See "DEALERS" section below.
Healer
This mobile will heal a mortal's wounds. e.g. Old Man.
Follow
This mobile fill follow a specified mobile. See GROUPED MOBILES below.
CanFollow
This is used for mobiles like Karlile who are friendly and will follow a player.
Mobile Classification Flags
In order to make combat more realistic there are certain defined types of mobile.
Humanoid (default)
Reptile
Bird
Fish
Mammal
(rodents)
Winged
(e.g. Harpy, Angel)
Snake
Dragon
Thing (just a body e.g Thesaurus)
Beast
(e.g. The Beast)
QuadPed (hoofed e.g horses cows)
Shelled
(e.g. Clammy)
InsectFly (flying insect)
InsectCrawl (crawling insect)
Tentacle (octopus)
Feline (cats and dogs)
Merfolk (mermaids etc)
Vague (ghosts spirits ghouls)
Dolphin (aquatic mammals)
Hog (pigs etc)
Plant
Crab
Dodo
(pincers legs carapace)
(flightless birds)
when combined with appropriate 'FightAction's (see below) it is possible to
cover most conceivable mobiles.
3.5) Triggers
+++++++
A number of triggers have also been added to increase the behaviour of
mobiles. These are fields included in the mobile part of the zonefile may be
triggered in a number of ways and are as follows:
ArriveSay
- text for a mobile to say when a player enters room
ArriveTell - text for a mobile to tell a player who enters room
ArriveAction - action for a mobile when player enters room
DepartSay
- text for a mobile to say when a player departs room
DepartTell - text for a mobile to tell a players who departs room
DepartAction - action for a mobile when a player departs room
AttackSay
- text for a mobile to say when a mobile attacked
AttackTell - text for a mobile to tell a players when attacked
AttackAction - action for mobile when attacked
DieSay
- text for a mobile to say when slain
DieTell
- text for a mobile to tell to slayer when mobile slain
DieAction
- dying action for a mobile when slain
NOTE: Die action performed before Say or Tell...
RandomAction - random action for mobile to perform
FightAction - random action for mobile to perform during combat
BarTell
- text for a mobile to tell a player when barred direct
BarAction
- action performed when a player attempts a barred direct
GrabAction - action performed when a player attempts a get on a grab
or grabhostile mob
NOTE:
1) %s in an action trigger represents the mobile name.
The %s is no longer REQUIRED.
2) Say and tell triggers will not require %s to represent the mobile name.
Here is an example:
Name
PName
AttackSay
ArriveSay
DepartTell
RandomAction
DieTell
DieAction
Strength
Location
Armor
Damage
Aggression
Speed
Description
Examine
End
= Raa
= "Raa"
= "You dare attempt to defeat me!"
= "Another traveller! Welcome friend!"
= "Good luck in your travels!"
= "%s shifts uneasily as he eyes you cautiously."
= "You are a brave warrior...."
= "%s clutches his chest as he slumps to the ground."
= 1300
= core48
= 25
= 20
=0
=4
= "Defender of Sanctuary, Ra stands here."
= "This guy is NOT to be trifled with!"
= Raa
3.6) Dealers
++++++
How to use Dealers in a zone file (see Carlton on-line for a demo.)
To put a Dealer in a zone file, write up a normal mobile in a zone file.
Then give it one or more of the following Mflags:
DealAll, DealWeapon, DealArmor, DealKey, DealFood, DealLight, DealBoat
The presence of one of this flags identifies the mobile as a Dealer.
These flags determine what type of merchandise the Dealer will in; the
object to be purchased must have the corresponding Oflag.
Additionally, a Dealer should have the following field:
Markup
= <number>
where <number> is the percentage price markup on objects that the Dealer
sells. Thus, an object with a Value of 200 will be sold by a Dealer with
a Markup of 50 for 300 score points.
Finally, a Dealer should be holding some object(s) that have the Sold Oflag.
Only objects with this flag will be offered for sale, though objects without
this flag may also be held by the Dealer.
Some other flags are useful for Dealers:
WillSwap, NoBuy, and NoSell.
These determine whether the mobile will swap, buy or sell... obviously it is
desirable for a Dealer to perform at least one of the functions! The default
Dealer with none of these three flags will buy and sell, but not swap.
You may or may not want to consider using the NoSteal or NoHassle flags
depending on whether you want your Dealer to be bothered or not. Dealers that
are killed will drop all their inventory. Additionally, Dealers come with
automatic personalities (check out an on-line Dealer for the details) so keep
this in mind.
One trick: if you want a dealer to sell something for which there is no flag,
no DealLantern for example, simply give him the DealAll and NoBuy flags and
put lanterns (with the Sold Oflag) is his inventory.
CrossZones is another MFlag to consider for dealers.
3.7) Mobiles that respond to tells
+++++++++++++++++++++++
To summarise the following, mobiles with the TellRespond mflag have the
ability to respond to players' tells. The response depends on matching certain
specified keywords in the player's tell text. The response can also depend on
the point in the conversation that you are currently at. If no keywords are
matched, a default response is provided. Mobiles can respond with multiple
tells, spaced out by an adjustable time interval. If you don't want to know
the gritty details, read no further.
A mobile can have a conversation with a player if it has the TellRespond
MFlag. When a tell is given to such a mobile, that mobile's Tellfile will be
looked at. This file contains the text that the mobile will tell the player as
well as instructions that determine when and what exactly the mobile will say.
The Tellfile should be saved as a separate text file and given to the coder
associated with your project. The following instructions are valid in
Tellfiles (more detailed explanations follow this list):
#LINENUMBER [linenumber]
Text must follow this instruction, terminated by a carrot.^
The linenumber is also required.
Note that carrot should be on the same line as the text, not on the following
line (the carrot determines the placement of the final speech quotation mark).
Keep in mind that the first line of text is preceded by the text
'[mobilename] tells you ', so the first line should be kept short to fit all
on one line. Also, the default text colour is highlighted magenta (&+M), so
keep that in mind when adding colour.
#ELINENUMBER [linenumber]
As #LINENUMBER but there is no '[mobilename] tells you ' printed and there is
no final end quote mark. The E stands for Emote... this effectively allows you
to write mobile actions instead of just tells.
#KEYWORD [linenumber] "keyword text"
The 'keyword text' must be enclosed in double quotation marks (").
Linenumber is also required (this linenumber is jumped to if the keyword text
is matched).
#ENDTEXT
#DEFAULT [linenumber]
Text must follow this instruction, terminated by a carrot.^
Linenumber is also required.
#EDEFAULT [linenumber]
This is to #DEFAULT what #ELINENUMBER is to #LINENUMBER. See documentation for
#ELINENUMBER above.
#HERE
This should typically be the first instruction in the file if it is used.
If #KEYWORD text matches the player's tell, the text at the #LINENUMBER
designated by the #KEYWORD will be send to the player. Text at subsequent
#LINENUMBERs will also be sent, at a rate that is determined by the spacing of
the #LINENUMBER's [linenumber]s. If no match is made with any #KEYWORD the
#DEFAULT text is sent.
Now here are the detailed rules for the execution of Tellfiles:
The Tellfile is executed from top to bottom:
1)If a #HERE is found, the player and mobile must be in the same location.
2)If a #LINENUMBER is encountered, the text following this instruction is
sent to the player.
If the instruction immediately following this #LINENUMBER is also a
#LINENUMBER, the player's timer is set to the difference between these
linenumbers (linenumbers should increase as the Tellfile
progresses...!) When the timer is done counting down, Tellfile
execution resumes at the next #LINENUMBER.
If the instruction immediately following the #LINENUMBER is #ENDTEXT, the
conversation ends.
If the following instruction is a #KEYWORD, the conversation pauses
(for a maximum of 1 minute) until the player tells the mobile something
else.
No other instructions should follow the #LINENUMBER instruction.
3)If a #KEYWORD is encountered and a match is found with the KEYWORD's text,
execution jumps to the KEYWORD's linenumber and all further KEYWORD
matches will fail in this execution.
The linenumber jumped to can be that of a #LINENUMBER or a #DEFAULT
instruction.
If no match is found, all KEYWORDs immediately following this one are also
checked.
If no matches are found, the next _following_ DEFAULT text is printed.
If nothing was entered by the player to match with, a KEYWORD will cause
the mobile to wait for further input from the player (one minute
maximum.)
4)If an #ENDTEXT is encountered, the conversation will end.
5)If a #DEFAULT is encountered, it is treated as a #LINENUMBER instruction.
The #DEFAULT is basically the default #LINENUMBER.
In the previous explanation, all #LINENUMBERs could be replaced with
#ELINENUMBERs, and all #DEFAULTs could be replaced with #EDEFAULTs.
Here's a simple (I hope) example of a Tellfile:
#HERE
#KEYWORD 1 "beer"
#LINENUMBER 1
Right! You're not such a bad type after all!^
#ENDTEXT
#DEFAULT 2
Take off! If you don't know the world's finest beverage, I
won't associate with you.^
#ENDTEXT
If the player tells the mobile anything but "beer" he'll get the DEFAULT
message, but if he tells the mobile "beer", he'll get the positive response.
The #HERE command restricts conversation to the same room as the mobile.
3.8) Characteristics
++++++++++++
Currently 5 characteristics can be set in a zone file:
Power, Agility, Intelligence, Alignment and Sanity.
These must be set to a value between 1 and 255, for example:
Alignment = 1
This line will set a mobile's alignment to the lowest possible (Diabolical).
If a value of a particular characteristic is not set in the zone file, a
default value will automatically be assigned. For Power, Agility, and
Intelligence this value is generally (but not always) 64. For Alignment the
value is 223 if they have the Good Sflag, 32 if they have the Evil Sflag, and
144 (Neutral) if they have neither Sflag. For Sanity the default value is 176
(Sane); 64 would be a typical value for an "Insane" mobile.
If you need more information on characteristics than given in this manual,
please consult a Power. Consulting the on-game help files for a given
characteristic may also be helpful. In general the operation of
characteristics is meant to be a bit mysterious so additional information will
only be given out for valid reasons.
3.9) Grouped Mobiles
+++++++++++++++
Ever seen Doom, Gumtok and Unn rampaging around the Mud together? Well now
it is possible to instruct mobiles to follow each other from the zone files.
How? Just add the "Follow" field to any mobiles whom you would like following.
The example below is from Uun's mobile code, instructing her to follow Gumtok:
Follow
= Gumtok
This will only work because Gumtok and Uun are defined in the same zone
file.
If you wanted to make Uun follow Seamas, for example, you would write the
following:
Follow
= Seamas@core
...where core represents the zone to which the mobile belongs. Something to
bear in mind: no matter what speed you give the following mobile, they will
travel at the speed of the leader. Also, you cannot make mobiles follow
mobiles that are already following! Followers will not follow across zones
unless they have the CrossZones flag.
3.10) Navigating Mobiles
++++++++++++++++++
Mobiles can now find their own way around the Mud! With your help of course!
An example of how to use this feature is:
Navigate
= "neswudeesu"
This field will cause the mobile with this field to move in these directions
from its starting location. After it has reached the end of its Navigate
commands, the mobile will move in the normal fashion. It will also at all
times move as fast as its speed field dictates. It is possible to give a
mobile up to 50 directions. If the mobile's orders try to take it where there
isn't an exit, it will ignore the command and move on to the next direction in
its list. This will also happen if the mobile comes across a door and doesn't
have an appropriate flag (like OpenDoors) to pass it. They will also not cross
zones borders without the CrossZones flag.
4) Creating Objects
=====================================================================
"A rose by any other name..."
4.1) What is an object?
++++++++++++++
An object on a mud can be many things. It can be as simple as a banana, or as
complex as an invisible mist blocking an exit. This chapter will deal with
basic objects. Refer to the "doors" and "ropes" chapters for an analysis of
linked objects, such as doors.
A standard object may contain the following fields:
Name
AltName
PName
State
MaxState
Armor
Damage
BValue
Size
Weight
= little_knife
= dagger
= "knife"
=1
=1
=0
=5
= 30
=5
=4
Location
Desc[0]
Oflags
Desc[1]
Examine
End
= IN_ROOM:jeff2
= "A small knife has been dropped here."
{ Weapon GetFlips }
= "A small knife rests on the table."
= "It is a small knife covered with blood."
= little_knife
There are a few other fields that have not been included above, particularly
the Linked field. This will be discussed in the doors and ropes chapters.
Also many of these fields are not always required.
Once again, the field defined by Name is the object's label. At the end of the
description, note the End field, which should be the same as the Name.
The AltName field is an alternative name for the object. It may help mortals
to pick up the object. For example, a branch may be alternatively called a
stick, or a knife may be called a dagger.
The Pname field is how players will refer to the object, although AltName will
still be valid. This will be the primary name. If the name defined in Name is
the one you wish mortals to use, you need not bother with this field.
[THE PNAME OR ALTNAME FIELD FOR OBJECTS CAN ONLY CONTAIN ONE WORD]
pname = "Silver Sword" WILL NOT COMPILE.
Name and End fields may contain numbers if not being used as Pname also, this
enables you to have several objects with the same Pname.
e.g.
Name
PName
AltName
End
= stick1
= "Stick"
= "branch"
= stick1
Name
PName
AltName
End
= stick2
= "Stick"
= "branch"
= stick2
Armor is the armour class of the object, if it is wearable. It must have the
oflags WearOnBody (or WearOnArms WearOnLegs etc etc) and Armor set, for this
field to have any effect.
Damage is the damage a weapon may make. It must have the Weapon oflag set for
this to have any effect. Damage when combined with the food or alcohol oflags
influences how much a food item will cause a player to recover when eaten.
Food is deemed as size 1-15 .... 1-5 small, 6-10 medium and 11-15 large. A
size greater than 15 is considered to be 15 in terms of sustenance.
BValue is the base value of the object. The actual value is adjusted according
to the number of players on the game (the more players, the higher the value.)
See 'ValueFixed' Object Flag.
Size is used to compute how much space the object will take up in a container,
and in the case it is a container, how many objects that can fit in it. As a
rough estimate, one size unit = 1 cubic inch (= about 15cc ).
Weight is self explanatory. heh! this is true to an extent. I'm still trying
to work out typical values for size and weight, my tip is find a similar
object on the mud and use similar values.
Mana - if the object has a magic oflag of some sort such as FireEnhance, it
will also require a mana value. An average value is 40.
MaxState and State are special flags. Each object has a state associated with
it. Maxstate specifies the maximum state, whereas State specifies the initial
state. According to the state of the object, a different description may be
seen. For example, if the state of the object is 0, the test defined as
Desc[0] will be seen upon entering the room. If state is 1, then Desc[1, etc.
There are four states, but usually only up to three are ever used.
For objects with Openable/Lockable oflags the following applies:State zero indicates the object is 'open'.
State one indicates that the object is 'closed'.
State two indicates that the object is 'locked'.
Openable oflag
'open' will change the object's state to 0
'close' will change the object's state to 1
Lockable oflag
'unlock' will change the object's state to 1
'lock' will change the object's state to 2
See also the discussion on the GetFlips and PushToggle oflags, at the end of
this chapter.
The Desc[x] fields are the object descriptions upon entering a room. The
current description will be chosen according to the current state of the
object. See the previous paragraph, and also the GetFlips and PushToggle
flags. Also refer to the appendix, the section on entering string fields.
Sometimes it is desirable that the objects have no description. That is fine,
just leave the field out. Or you may specify just one field. Or three. The
maximum number of states is four, ranging from 0 to 3.
The location of an object is a bit more complex than it appears. An object can
be in one of six states: carried by someone, worn by someone, wielded by
someone, both wielded and worn by someone, in a container, or in a room. The
way you can specify this is by the use of six different flags. Example:
Location
Location
Location
Location
Location
Location
= CARRIED_BY:puff
= IN_ROOM:jeff6
= WORN_BY:seamas
= WIELDED_BY:cosimo
= BOTH_BY:asmodeus
= IN_CONTAINER:sack
In first example, an object is carried by mobile Puff. In second example, the
object is simply in the room labelled "jeff6". In the third example, it is
carried by the mobile Seamas. The fourth example is for a weapon, wielded by
the mobile Cosimo. The fifth example is an object that is both wielded and
worn by the mobile Asmodeus. In the last example, the object is in the sack.
The Oflags field is a collection of object flags, enclosed in curly brackets,
{'s and }'s. Note there is no = sign on this field.
The object can also contain 'trigger' fields these will be discussed later.
4.2) Object Flags and their meanings
++++++++++++++++++++++++++
The following object flags are acceptable:
Destroyed
This oflag really means 'invisible to mortals'. Indeed, mortals will not be
able to see it.
NoGet
This object cannot be taken using the "take" or "get" commands. It should
be use for objects that should not be taken, like doors furniture, etc.
Openable
This object can be opened. Note that opening an object toggle its state.
The opened state is state 0, and Desc[0] should reflect this. Desc[1]
reflects on the object's closed state. The OpenText and CloseText fields
can be specified to give the object an customized text for the open and
close commands.
Lockable
This object can be locked. Note that it should also be openable. A
locked object requires a key to be opened. The locked state is state 2,
Desc[2] should reflect this. The LockText and UnlockText fields can be
specified to give the object an customized text for the lock and unlock
commands. Use the Key field if you wish to make the object openable by one
key only.
Pushable
This object is pushable. The state will change to 0 (once) when it
is pushed.
PushToggle
This object will toggle state back and forth between 0 and 1 when pushed.
Food
This object is edible, and will improve strength (hitpoints) when
eaten. The size of increase in strength is determined by the damage of
the object up to a maximum of 15. A usagecount can be used for items
allowing multiple benefits.
Concealed
This object is concealed by a mobile and will not be shown as part of it's
inventory. The object may be taken out during a fight and wielded after
which time the flag is cleared. The usagecount field may be used to specify
the percentage of CURRENT strength against reset strength at which point
the mobile will take the object out. i.e. UsageCount = 25 set on a mobile
with Str = 100 means it will wield the weapon when fighting when it reaches
25 Str.
NoRepair
Object cannot be repaired by the Blacksmith.
BlackSmith
This mobile can repair armour and weapons for a nominal fee.
FoodDeath
Eating this will set a mortal's strength to 10.
FoodHarm
Eating this halves strength.
FoodHealAll
This object is edible, and will restore strength to maximum if eaten.
FoodAidAura
This object is edible, and will improve aura when eaten. The size of
increase in strength is determined by the size of the object up to a
maximum of 15.
FoodMaxAura
This object is edible, and will restore aura to maximum if eaten.
FoodPoison
Eating this object will cause a mortal to die (slowly) They have a certain
amount of time to find an antidote.
Alcohol
In conjunction with a food flag. This item will get you drunk.
AntiDote
Eating this object will cure the effects of poisoning. In addition to this
flag you must use WizUnlocatable and Unlocatable.
Armor
This object is armour. The Armor field will be considered during fights.
The object must also be set WearOn?????.
WearOn?????
This object can be worn by a player. That doesn't mean it is armour. The
following body areas are specified:WearOnArms
WearOnBody
WearOnFace
WearOnHead
WearOnNeck
WearOnHands
WearOnLegs
WearOnFeet
WearOnBack
ExcludeWear
No two ExcludeWear objects can be worn on the same part of the body.
:- e.g. you can't use two shields
Lightable
The object can be lit, to provide light.
Extinguish
The object can be extinguished.
Key
The object can be used to unlock doors.
GetFlips
This flag will cause the status of the object to be set to 0, when a
successful get/take is performed. The reason is as follows.
At times, you may have to have a room, with a table, and on the table a pen
described as "A pen is on the table." However, if someone takes the pen,
and then drops it in a room with no table, the description will still read
"A pen is on the table." Getflips to the rescue!
By setting GetFlips on, and State to 1, you can set Desc[1] to the original
description. When someone takes the object, it will be toggled to state 0,
so if he drops it again, Desc[0] will be seen.
Or in other words:
MaxState = 1
State = 1
Oflags { GetFlips }
Desc[0] = "A pen has been dropped here."
Desc[1] = "A pen is on the table."
Glowing
The object is providing light.
Lit
The object is burning. This flag should be associated with lightable and
extinguish. If it is a magical permanent flame use Lit and Magical.
Magical
See Lit above.
Container
The object is a container. You can put stuff in it, and take stuff out. The
amount of objects that can be put in a container is dependant of its size.
Weapon
The object is a weapon. The Weapon field will be taken into consideration
during fights. In addition to this flag, a "weapon classes" must be
associated with it. The following weapon classes are as follows:
Axe, Whip, Club, Poke, Soft, Sword, Sabre, Spear, Staff, Wooden, Dig
NOTE: Only 1/2 of the weapon's damage will be added to the base Strength of
a mobile wielding a weapon. For instance: Mob Strength = 10 and
Weapon Damage = 20. The mobile wielding this weapon will do 20 damage
total. 10 + (20/2) = 20
Boat
The object is a boat. It will allow mortals to travel over OnWater rooms.
Unlocatable
The location of this object cannot be found by mortals using a where spell.
WizUnlocatable
The location of this object cannot be found by wizards using a where spell.
Newbie
The object can only be picked up by mortals below level 6
Wizard
The object can only be picked up by imortals
Healing
Carrying this object will increase the mortal's rate of healing.
AuraReplenish
Carrying this object will increase the mortal's rate of aura replenishment.
SparkEnhance
Carrying this object will enhance a mortal's chance of successfully casting
a Spark spell. The object must have a mana field.
CompareEnhance
Carrying this object will enhance a mortal's chance of successfully casting
a Compare spell. The object must have a mana field.
SIMILARLY:
FrostEnhance
FireEnhance (Fireball spell)
MissileEnhance
ShockEnhance
CureEnhance
SummonEnhance
LocateEnhance
(Where spell)
DeathEnhance
KnockEnhance
DeafEnhance
BlindEnhance
CrippleEnhance
MuteEnhance
TransEnhance
(Summon spell)
FrostProtect
Carrying this object will protect a mortal from Frost spells until its mana
is exhausted. The object must have a mana field.
SIMILARLY:
FireProtect
MissileProtect
ShockProtect
DeathProtect
DeafProtect
BlindProtect
CrippleProtect
MuteProtect
NoRecharge
The mana in this object will not get recharged.
UnderWater
Wearing this object enables a mortal to survive in underwater locations.
It must have an associated WearOn??? oflag.
Rope
This object is a rope.
RopeMarker
A fixing point for a rope.
The Rope and RopeMarker flags will be discussed later.
Bomb
The object is a bomb ..see section 4.5) below
BombProtect
Item protects the player against bomb blasts. Will eventually become
destroyed after a while depending on armour. Each bomb blast will reduce the
object armour.
Throwable
This item can be thrown by those with that ability.
Plural
Some objects are plural, using this flag avoids clumsy messages.
NoGive
This object cannot be given away.
DropBreak
This object will be destroyed if dropped.
NoWizGet
Wizards cannot take this object.
NoClone
This object does not clone once a player leaves the zone with that object.
This is generally reserved for quest objects or marker objects. These
objects do however store unless marked with NoStore.
NoStore
This signifies that the object does not store or lodge.
QdoneClone
Object will ONLY clone once the quest zone which it belongs to is completed.
NoMobGet
Mobiles cannot take this object.
HitBreak
Object may break if it is hit during combat.
Merchant
Object can only be picked up by Merchant players
TempStorage
Diagnostic - used for setting of autostored EQ expiry on game rejoin.
Small
Eating or Burning makes player small enough to fit into SMALL flagged
locations.
StaticLocation
Object is not allowed to be taken from current location.
StaticZone
Object is not allowed to be taken from current zone
DamageArmour
Object (weapon) will damage a piece of armour. It also may become damaged
and broken as a result.
DamageWeapon (not yet coded)
Object (armour) will damage a weapon if the weapon hits it.
SleepRegen
Speeds up the replenishment of strength when sleeping.
Float
Object will float if dropped on OnWater flagged rooms.
Acid
Will destroy any object (except those with the NoAcid flag) in the same
container (including the container itself).
NoAcid
Is not destroyed by objects with the Acid flag.
Liquid
Must be in a container at all times. Destroys objects with the Soluble flag
when in the same container (including soluble containers). Liquids are
manipulated with the "get" command (see "help liquids" online).
Soluble
Is destroyed by Liquid flagged objects in the same container.
Sold
Is in a dealer's inventory (see the section 3.6 on dealers).
CanStun
Can stun an opponent on a successful hit (weapons only, of course).
SleepRegen
Increases regeneration rate of both strength and aura while asleep.
HitBonus
Increases the chance to hit. If the object is a weapon, it must be wielded
to be affective. The object's armor value marks the bonus. Items should be
used sparingly as these bonuses are cumulative. The Zone review committee
will be vary particular about inclusion of these objects.
Trap
Signifies a trap. States are important in this object type: 0 = disarmed,
1 = trapping someone, 2 = armed. Use of state = 1 should be included in your
specials as a coder will have to mark the proper mob as trapped. Size will
determine the max strength the trap will affect: 5 = <150, 10 = <500, >10 =
any. The Visibility will determine which direction will be trapped: 0 =
north, 1 = east, 2 = south, 3 = west, 4 = up, 5 = down.
ValueFixed
The value of the object does not change. It will always be equal to the
object's Base Value (specified by BValue field). This can be used to fix
prices of objects sold by dealers.
Holy
This is a holy object which enhances the Turn spell. Useful on rosaries and
crosses or any object that should help repel evil or undead creatures.
HotProtect
This object allows a mortal to enter a HOT flagged room.
ColdProtect
This object protects a player in a COLD flagged room.
DeathRoomSave
Objects with this flag protect a mortal from a deathroom. Objects with this
flag are required to have UsageCount = X where X is the number of times it
will save you from a deathroom. Once the UsageCount reaches 0 the item will
crumble to dust.
Monk
Weapons flagged with the Monk OFlag will allow members of the Monk band to
wield this weapon without consequence to their damage or skill
proficiencies.
NoMorwen
Any item with this OFlag will crumble to dust (be destroyed) if you
succesfully call Morwen to save you.
FlyEnhance
This enhances the ability to Fly. Pyromancers for instance can fly when they
are morphed. This will help that ability out.
4.3) Finding One Object by examining another
+++++++++++++++++++++++++++++++++
Sometimes it is useful to have one object(1) be found only when another
object(2) is examined. For example examining the table in elvenforest reveals
the gauntlets.
The object to be found (gauntlets) is located in limbo e.g.
Location
= IN_ROOM:limbo@limbo
The object to be examined (table) has two extra fields
ExamineObj
= gauntlets
this specifies the object to be found
ExamineFlips = "You find some gauntlets amidst the rubble on the table."
This specifies the examine message for the table the first time the table is
examined. Subsequent examines will give the message defined in the standard
examine field. (ie The table is rotten and rickety. )
Name
AltName
ExamineObj
= table
= broken
= gauntlets
Location
Oflags
Examine
ExamineFlips
End
= IN_ROOM:Guard
{ NoGet }
= "The table is rotten and rickety."
= "You find some gauntlets amidst the rubble on the table."
= table
Name
AltName
Location
Oflags
BValue
Armor
Size
Desc[0]
examine
End
= gauntlets
= gloves
= IN_ROOM:limbo@limbo
{ WearOnHands ExcludeWear Armor }
= 30
=6
=3
= "A pair of shiny &+Cgauntlets &*lies here."
= "Gloves made of fine chain mail."
= gauntlets
If you give the object to be examined NoGet and GetFlips Oflags and set
State = 1 and MaxState = 1.
Then it will initially show desc[1] and then desc[0] after being examined.
4.4) Object Triggers
+++++++++++++
An object can now have several messages which can be included in it's
definition in a zone file to enhance game play. These are:
OpenMsg - message when object is opened
CloseMsg - message when object is closed
LockMsg - message when object is locked
UnLockMsg - message when object is unlocked
PushMsg - message when object is pushed
LightMsg - message when object is lit
WearMsg - message when object is worn
DropMsg - message when object is dropped
EatMsg
- message when object is eaten
TakeMsg - message when object is taken
WieldMsg - message when object is wielded
FightMsg - message printed at random when used during combat
RandomMsg - message printed at random (e.g. crackling lamp)
- With particular reference to Lit items:
If an object has the Extinguishable oflag, but is not Lit
the RandomMsg is not generated... so crackling fire
messages are only generated if the fire is alight.
Each message can include a %s which will be replaced by the object name
when the message is triggered. It does not HAVE to be supplied, but it is
prefered if the object name is used in the trigger.
As a simple example:
Name
Armour
TakeMsg
WearMsg
DropMsg
Location
Oflags
Size
Desc[0]
Examine
Value
End
= blackshield
= 10
= "Your arms ache as you lift the huge %s."
= "With so many dents the %s sits awkwardly on your arm."
= "A loud clatter echos around as the %s thuds on the ground."
= core5
{WearOnArms}
= 100
= "A huge heavily embossed shield lies here."
= "The shield looks like it has seen many battles."
= 200
= blackshield
NOTE :
1) Currently the Desc field has historically not used a %s field to replace
the object name although this may change soon.
2) The target of the message is ALWAYS the player who caused it. Default
messages are sent to others in the room and therefore cannot be designed
within the zone file.
4.5) Bombs
++++++
Bomb code on Asylum has been a long neglected area of Aber based MUDs - when
you can light a keg and have it blow up in your face, only to suffer a drop
in strength of 10! In keeping with the generic zone-based approach to
designing new systems for Asylum, bomb code has been specifically written to
be in the hands of the author.
Bomb creation is extremely simple on Asylum as there are only two attributes
to consider:
1) The "Bomb" oflag
AND
2) The "Size" field
Size is significant as the following definitions show:
* When size is 100 (the maximum) this means that any mortal in the room when
the bomb detonates will be killed and thrown off the game.
* When size is less than 100, mortals lose strength based on the size and if
this value is higher than their strength, they are killed and thrown off the
game. For example, if the bomb is 60 and two mortals are present on
explosion (player [a] with 50 strength and player [b] with 100 strength) their resulting strengths are [a] -1 (killed) and [b] 40 strength.
* The "Timecount =" is used to set up the length of time the bomb will take to
detonate. The value is always executed as two times the supplied value in
seconds. i.e. Timecount = 10 will take 20 seconds to detonate.
Some other information:
* Bombs will not work in Peacefully flagged room locations.
* Bombs will blast open doors (which are not special doors) on explosion.
* You cannot use the spark spell on a bomb, nor can you light one held.
* Bombs will send a message to the entire zone on explosion.
The message is also sent to any adjoining rooms not in the same zone.
4.6) Dynamic Count Fields
+++++++++++++++++
Timecount
=========
Timecount we have seen is used in Bombs. Another use for the field is in
Doors. If a door is given a Timecount = field in the zone file an opened
(or unlocked door) will automatically close within the specificed timecount.
E.g Timecount = 10
If the door is unlocked and opened. It will automatically shut after 20
seconds, then will lock 20 seconds after that. If the door is not lockable
it will only auto-shut. Also performs operations on linked doors and sends
messages to the linked location.
* Note that due to the game timer execution, the Timecount field will take
DOUBLE the number of specified seconds to work.
Usagecount
==========
Specifies the number of times an object may be used and is likely linked to
a special.
Like for example a whistle which may be blown a certain number of times
before disintegrating!
5) Creating Rooms
=====================================================================
"Where no man has gone before!"
5.1) What is a room?
+++++++++++++
A room is where you find yourself every time you move on a mud. It is
composed of four main parts:
1. Room number and exits
2. Room flags
3. Room title
4. Room description
Room entries may look as follows:
%locations
jeff1 n:jeff2 e:jeff3 w:jeff4;
lflags {}
The Waiting Room^
You stand inside a small room. Nothing fancy here, just ladies in waiting.
Maybe you should leave?
^
jeff2 n:jeff5 e:jeff1 s:herb6@herb w:jeff7;
lflags {Outdoors NoSummon}
In the garden^
You stand in a beautiful garden.
^
You just saw how two rooms are defined. For each room, the very first field
is the label of the room. In the case of the first room it is labelled
"jeff1", and in the case of the second one, "jeff2". You may use any name
you wish here, but you may not have two different rooms with the same label
inside the same zone. This will never be seen by players, it is just for
programmers.
The next fields on the same line are exits. e:jeff1 simply means that there
should be an exit leading to the room labelled "jeff1" in the current zone.
Valid exits are n, e, s, w, u, d. To make it easier for the programmer,
please keep them in the order mentioned above.
When making an exit to another room, you may want to make sure that room has
an exit leading back to this original room, else the player will get stuck
there without an exit.
Direct your attention now to the second room, exit leading south. It states
s:herb6@herb
What this means is that the exit to the south will lead to the room labelled
herb6, but in a different zone, namely herb.
In practice most zones have their rooms named after the zone with a number
added. However see also the 'Referencing one zone from another' section of
this document.
There is a special kind of exit, which depends on objects. That is the case
with doors. However, refer to the section on doors for a detailed explanation
of handling those.
To finish up this very first line of a room definition, the trailing semicolon
(;) must be included. It signals the end of that particular field.
The second line is a set of lflags. If you don't want any special lflags for
this room, you must still specify that line, but put nothing in between the
curly brackets. The various flags are described at the end of this chapter.
The third field is the title of the room. Notice the trailing ^ sign. That
sign must exist there, to mark the end of the title. It will not be printed
to players.
The remaining lines of the room are the room description itself. As with the
title, end it with a ^ on an empty line. It is standard practice that room
descriptions start with a 2 character indentation, Please do not exceed 78
charaters per line (excluding colour codes (see below)).
5.2) Lflags and their meaning
++++++++++++++++++++
Valid lflags are as follows:
Death
This is a very special room, which mortals dread very much. Any mortals
entering this room will die. They will not lose points, but their inventory
will be automatically pitted, and they will be kicked off the game.
CantSummon
People cannot be summoned away from this room.
NoSummon
People cannot be summoned to this room.
NoQuit
Players cannot quit from this room.
NoSnoop
Players may not be snooped in this room.
NoMobiles
Mobiles will not enter this room. This flag is useful to stop mobiles from
wandering in to or out of certain places.
NoMagic
Mortals may not cast magic from inside this room.
Peaceful
There will be no fighting permitted inside this room. This is a safe haven
for mortals.
Soundproof
This room is soundproof. Tells, shouts, etc., will not be heard inside the
room.
OnePerson
This room is only big enough for one person. Mortals will not be able to
enter it if there is already a person inside.
Party
Anyone is allowed to use the Emote command here.
Private
This room is only big enough for two persons. A third mortal trying to
enter the room will be told the room is full. This flag will also
automatically function as the NoSnoop flag.
OnWater
This room is on-water. A boat will be required for mortals.
Underwater
This room is under water. Mortals will need some an object with the
UnderWater OFlag to survive here.
Outdoors
This room is outdoors. Weather messages will be seen and time of day and
night will show. Do not combine this flag with TempExtreme or Seasons.
Dangerous
Mortals of a low level will be warned to turn back on entering this room.
NegRegen
Mortals will actually lose strength if sitting around in this room.
NoRegen
Mortals will not regain any strength while in this room.
Cold
This room is a very cold room. If it is outdoors, any rain will turn to
snow.
Hot
This room is a very hot room. Mortals will need protection.
Maze
This room is a part of a maze. Players with the Goto pflag will not see the
full names of the exits.
Wizard
This room may not be entered by mortals.
Battle
This room is part of a battle zone where player killing may take place.
See info Battle within Asylum or on Asylum web pages
NoDonate
Items may not be donated from within this room.
NoAt
The at command will not function in this room.
Dark
Mortals will need a light source to see anything in this location.
Dead
This location is part of the dead world.
NoSleep
No sleeping in this room.
HideExits
A message indicating that exits cannot be seen is displayed in place of the
exits. The exits are however present and can be used.
NoReset
Objects in this room will not reset as long as a player is in the same
zone. Useful for holding type areas in quests where equipment is
removed from the runner.
UnknownExits
The room desc will show up as "*unknown*" when exits are shown.
InShore
Used in combination with the OnWater lflag. This flag denotes shallow or
inland waters - players won't drown on it during storms.
Use for small rivers for example.
Sloped
Room is at a slope from exits down from it (used for slipping special in a
particular quest.)
HighRoof
Rooms with unusually high ceilings. One can fly and use certain spells
requiring lots of space in these rooms.
GetAll
Rooms in which players can use the 'get all' command WITH OUT restrictions
to the number of objects they can carry. Places like Honest John's Lockup
are flagged GetAll.
TightSpace
Rooms that are really cramped in space. A player needs to be 'small' in
order to pass through these rooms. See the "Small" OFlag in the Objects
section for more information.
NoBuyBack
This is a deathroom that prevents players from being allowed to buy back
their equipment.
6) Creating Doors
=====================================================================
"Break on through to the other side..." - The Doors
6.1) What's so special about doors?
+++++++++++++++++++++++++
Well, nothing is special about doors, except that you need two of them. First,
let's consider two rooms, labelled 'jeff1' and 'jeff2'.
jeff1 s:^outside_door;
lflags {Outdoors}
Outside^
You are outside.
^
jeff2 n:^inside_door;
lflags {}
Inside^
You are inside.
^
Notice how the two room exits, s: and n: respectively, point to something
starting with a ^ sign? That marks an object. What this means, is that the
room exit depends on the state of the object named there.
Let's now define the two objects, inside_door and outside_door:
Name
PName
Linked
State
MaxState
Location
oflags
Desc[0]
Desc[1]
Desc[2]
Examine
End
= inside_door
= door
= outside_door
=1
=2
= IN_ROOM:jeff2
{ Openable NoGet Lockable }
= "The door is open."
= "The door is closed."
= "The door is locked."
= "It is a sturdy oak door."
= inside_door
Name
PName
Linked
State
MaxState
Location
oflags
Desc[0]
Desc[1]
Desc[2]
Examine
End
= outside_door
= door
= inside_door
=1
=2
= IN_ROOM:jeff1
{ Openable NoGet Lockable }
= "The door is open."
= "The door is closed."
= "The door is locked."
= "The oak door is damp from the morning rains."
= outside_door
This is all it takes to make a door. Note the Linked fields on the object
descriptions. They point to each other. So, in theory, what happens is that if
someone tries to go through an exit that points to an object, the game will
check the status of the object. If the object is state 0, it will check the
Linked field, and allow the player to move into the room where the Linked
object is.
So, to recap. To make a door, you must do the following:
1. Create two objects, one for each side of the door. The objects must have a
Linked field. On the Linked field, put each other's name. Note that the
Openable/Lockable flags depend on your applications. For some
applications, you may not need those flags. NoGet flag is highly
desirable, though! You may want to addsome OpenMsg, CLoseMsg, LockMsg
triggers. If you wish the door to be unlocked/locked with a special key,
give the doors a key field and name the appropriate key. e.g.
Key
= skeletonkey
2. Edit the description of the room you are leaving from and set the
respective exit to ^object_name, where object_name is the label of the
first object you created. Then edit the descriptions of the destination
room, and put an exit back to the first room, pointing to the other
object.
7) Ropes
=====================================================================
"The Asylum Rope Trick"
Asylum has generic code for ropes.
Ropes are a variation on the door concept. However instead of typing open
or close door, the mortals must type tie or untie rope, and in the case of
'tie rope' they must also have a rope object. The associated Oflags are
Rope and RopeMarker.
Room exits point to the respective RopeMarker object as they would to
doors.
There are two door-like linked objects with the RopeMarker oflag. If a
mortal has an object with the Rope oflag, typing tie rope at either
location will link the two locations and the rope object will be
destroyed. If any mortal types 'untie rope' at either location the link is
removed and the rope object is undestroyed.
Room1 d:^Ledge1;
lflags{}
Location One^
There's a ledge here over a gap.
^
Room2 u:^Ledge2;
lflags{}
Location Two^
Above your head is a ledge.
^
Name
Oflags
BValue
Size
Weight
MaxState
Desc[0]
Examine
End
= rope
{Rope}
= 10
= 10
=3
=0
= "A &+Crope&* has been coiled up here."
="A Rope"
= rope
Name
Pname
Location
Oflags
= Ledge1
= ledge
= IN_ROOM:Room1
{NoGet RopeMarker}
Linked
State
MaxState
Desc[0]
Desc[1]
your reach."
End
= Ledge2
=1
=1
= "A rope spans the ledge allowing you to climb down."
= "Below you, the &+Cledge &*widens into a huge span way out of
= Ledge1
Name
= Ledge2
Pname
= ledge
Location
= IN_ROOM:Room2
Oflags
{NoGet RopeMarker}
Linked
= Ledge1
State
=1
MaxState
=1
Desc[0]
= "A rope hangs down here allowing you to climb up to the
&+Cledge&*."
Desc[1]
= "Above you, it would be possible to climb to the &+Cledge&* if
only you had a rope."
End
= Ledge2
7.1) Ropes untie able only from one side of the link
+++++++++++++++++++++++++++++++++++++
If you want a rope tieable/untieable only at one location despite linking two
(It might be that the rope doesn't reach the whole way to the ground) only
give the RopeMarker oflag to the linked object where you want a mortal to be
able to tie/untie.
Name
= LedgeRope
Pname
= ledge
Altname
= window
Location
= IN_ROOM:Ledge
Oflags
{NoGet RopeMarker}
Linked
= GroundRope
State
=1
MaxState
=1
Desc[0]
="
A rope has been tied to the window ledge allowing you to climb down."
Desc[1]
= ""
Examine
= "You might be able to tie a rope here."
End
= LedgeRope
Name
= GroundRope
Location
= IN_ROOM:Walls
Oflags
{NoGet } /*No RopeMarker*/
Linked
= LedgeRope
State
=1
MaxState
=1
Desc[0]
="
A rope hangs down from the tower window above, but it ends too high up to
reach."
Desc[1]
=""
End
= GroundRope
one room (Ledge) has a down to the LedgeRope object
Ledge w:Sorceror d:^LedgeRope;
but there is no corresponding up at Walls
7.2) Pre-linked ropes
++++++++++++++
Finally if you wish to have a pre-tied rope there are several things that you
must do differently. First, you must place the rope in one RopeMarker rooms
and mark it Destroyed as follows:
Name
Oflags
BValue
Size
Weight
MaxState
Desc[0]
Examine
End
= rope
{Rope Destroyed}
= 10
= 10
=3
=0
= "A &+Crope&* has been coiled up here."
= "A Rope"
= rope
Next you must change the default states of the linked objects to 0 thereby
creating the passage between them and linking the rope.
8) Some Important Notes
=====================================================================
"Mind your step!"
8.1) Referencing one zone from another
++++++++++++++++++++++++++++
You may reference any object contained in one zone, from another zone, using
the @ sign. For example, you would like to refer to the object stick in zone
blizzard, you would specify it as stick@blizzard. Or you may reference a room
in a different zone in this way.
Some examples:
Location
Location
Location
= IN_ROOM_:herb6@herb
= IN_ROOM_:forest@arcadia
= CARRIED_BY:dragon@cave
etc...
NOTE
****
Unfortunately the name assigned by the mud program to a room...
e.g the temple of paradise = start1...
is not the name required when referencing between zones.
The temple of paradise is temple@start. In practice it is probably easiest to
ask a Creator for the name of a room or simply describe which room you want to
reference to and leave it to us.
8.2) Entering text strings
++++++++++++++++
Certain fields accept variable length strings. However, you must first
acquaint yourself with the legal (and illegal) ways to type in a string.
Legal ways:
-----------Field1 = "This is legal."
Field2 = "
This is also perfectly legal."
Field3 = "
And this too. There is no problem with typing in a few lines of description.
Just make sure you don't forget the ending quote."
Field4 = ^
If you want to include "speech marks" in your text delineate it with pointy
hat thingies (aka carrots).^
Illegal ways:
-------------Field1 =
"This is not legal. The beginning quote must be on the same line as the equal
sign."
8.3) Colour
++++++
See 'help colourcodes' within Asylum for the mechanics of adding colour to
your text. A convenient tip for checking how something will look in colour
when writing is to mail it to yourself (assuming you have a colour terminal).
Conventions
***********
PNames
-----The PName of mobiles and objects is highlighted in bright Cyan in it's
description. This rule only applies to obvious objects/mobiles, if you wish
for one to be less apparent you need not do this.
e.g.
desc[0]
description
= "A well thumbed &+Cbook&* has been left here."
= "Mrs &+CDunwoody&* eyes you with suspicion."
Directions
---------Directions in a room description (north, south, east, west, up and down) are
also highlighted in bright Cyan. (&+C)
e.g.
A dark tunnel leads off to the &+Cnorth&* and a gloomy stairwell leads
&+Cdown&* into the darkness.
Magical Items
------------This is not an established convention like the two above and is optional but
I have started to use magenta (&+M) to indicate items of a magical nature.
After that its up to you.
Tips
---Colour is automatically switched off at end of each line so if you want a
colour to extend to end of line you can omit the &*. Similarly if you want it
to extend over several line you must start each line with the appropriate
colour code.
8.4) Style
++++
In an effort to keep future work by different authors stylistically
consistent, some arbitrary decisions have been made about style.
i) New paragraphs will be indented by 2 characters.
ii) One space will be left between the full stop (period) at the end of one
sentence and the capital letter starting the next.
Asylum is well aware that older zones do not all follow this convention, we
intend to gradually rectify this as part of our ongoing process of upgrading
older zones with more recent features.
Edited 7 October 2005
Herb
Edited 7 July 2006
Lumina
Edited 31 July 2014
Marvin
Last Edited 11 August 2014
Saruman