Our obvious first choice of mobile is the owner of the establishment, Karn, dwarf and retired trollslayer:
#MOBILES #1 karn stonehammer grizzled barkeep owner trollslayer old dwarf~ Karn~ A grizzled old dwarf is busy serving bar patrons. ~ Advanced years and the lack of a right forearm do not appear to have slowed the old dwarf down. Karn pours drinks and serves meals as if a dwarf half his age with all body parts attached, and shows no signs of weariness. His skin is a mass of scars; tufts of hair are missing from his long grey beard in places where the skin has burned; his left ear has been pummeled so much nothing is left save a small shrivelled mass of cauliflower-like cartilage; several of his teeth are missing, and a long scar reaches from around his right nostril down his cheek to his lower jaw. Despite the obvious trials the dwarf has gone through, Karn keeps a jovial disposition, jovial in a dwarf sort of way. ~ dwarf~ BGTfinz ac 0 0 51 25 50d10+5000 1d1+999 5d8+20 bash -21 -21 -21 -21 ACDFK ABCDLQ 0 0 stand stand M 0 0 0 medium 0 M greet mKarnGreeting 100~ M act mKarnOffer drinks~ M speech mKarnStory story~ M speech mKarnStory tale~ M speech mKarnStory yarn~ M random mKarnRandom 10~ M hour mKarnCleaning 16~ App 35 D Be honorable, and tell Lord Astragoth I await him on the other side.~
The first thing we assign to a mobile is its virtual number, or vnum. As we discussed in the second part of the #ROOMS chapter, the vnum is what distinguishes one mobile from another. We can have two or more mobiles in the same area or mud with the same name; so long as they have different vnums, they will be different from one another. As with rooms, we assign natural numbers (1, 2, 3, 4, ...) as vnums, and we do not use "#0". (See the section on #ROOMS for an explanation for this.)
The next line, line number two, is the name list, that is, the names the player references when interacting with the mobile. If a player wanted to look at Karn, for example, she would need to type "look" at the command prompt followed by any of the names in the name list, i.e. "karn", "barkeep" "stonehammer", "old", and so on. When she does look, she will see the look description, which begins on line six with "Advanced years and the lack of..." and ends with a tilde (~). If she does anything else, e.g. buy a beer from him, she will see the short description found on line three, that is, "Karn". She also will see the short description when scanning the room, or if doing anything that causes the mobile to interact with her.
When entering the room, the player will see the mobile's "long description", line four, that reads, "A grizzled old dwarf is busy serving bar patrons.". The only purpose of this long description is to let the player know the mobile is there and what the mobile may be. Keywords generally will be found in the long description, so a player knows exactly what to type when wishing to interact with the mobile (as we dicussed in the second interlude -- you did read that, right?)
After the long description comes the race of the mobile (line seventeen). Karn is a dwarf. He could be any other race, but here he's a dwarf. If you look up on the race table "dwarf", you will find this race has a number of flags associated with it. These flags will be covered in more detail below. Suffice to say, however, if one wrote in the race of the mobile and added no extra flags (typed "0" in all the flag slots), the mobile will still be affected by the flags that cover its race.
Below the entry for race comes the first set of flags, given in this order: act flags, affect flags, alignment, and mobile group. Act flags determine the actions a mobile may take while alive. They may flee when injured, may cast spells as a player mage does, may track a player down, and so on. Act flags make the mobile come more alive in the game. Affect flags determine what spells or skills may be affecting the mobiles. Our example, Karn, is affected by berserk, meaning he is constantly pissed and ready to deal major damage, and by regeneration, meaning he will heal much faster than your average, everyday dwarf. Be careful with these flags: not every orc should be able to cast mage/cleric spells. The alignment flag describes the alignment of the mobile, from angelic (alignment 1000) to neutral (alignment 0) to Khaine's right-hand helper (alignment -1000). Mobile group is the group a mobile is part of, and the mobile may assist other mobiles in the same mobile group. If you do not want a mobile group for the mobile, just type "0" there.
The next line relates the fighting ability of the mobile, with level of the mobile, to-hit bonus, hit points, mana, damaging power, and the damage type of the mobile. These are all explained thoroughly in the original guide, and a list of suggested values is given in an appendix at the end of that guide. The next three lines also may be found there, where the builder states armor values, offensive flags and immunities, and positions (standing, resting, etc.) of the mobile, respectively.
Mobiles become interesting again after the builder defines the flags. Once she's established the start and default positions, the sex, and the treasure of the mobile, a builder has the option of adding triggers to the mobiles. These triggers give extra functionality to the mobiles when certain circumstances arise in the course of a mobile's lifetime. For example a player may try to bribe the mobile, or utter a particular phrase to the mobile, or enter the room from a certain direction relative to the mobile. The mobile, in turn, may react, and react differently depending on who the player is or what she is carrying or the spell she is affected by or any number of other things that are within the mobile's notice. Triggers, and their associated mobile programs, or mobprogs, add a layer of complexity to mobiles that allow them to interact with a player as other players do.
Karn, for example, has several triggers. Let's list them again below:
M greet mKarnGreeting 100~ M act mKarnOffer drinks~ M speech mKarnStory story~ M speech mKarnStory tale~ M speech mKarnStory yarn~ M random mKarnRandom 2~ M hour mKarnCleaning 16~
The first trigger is a greeting trigger, tripped when a player first enters the room. The player has to be visible, though, or the trigger won't work. The second trigger will go off anytime a person drinks from anything. The third, fourth, and fifth triggers will activate a story program whenever a player says "story", "tale", or "yarn". The sixth trigger is a random trigger, checked every violence pulse of the mud server (every two seconds real time). There is a two percent chance the trigger will go off when the next pulse arrives. The last trigger occurs at four o'clock pm every mud day, and will activate a cleaning program.
As you can see Karn will be a very busy mobile once we have him in place. Unfortunately we have not discussed the programs Karn will be accessing with his triggers. These programs will be discussed when we come to the section on #MOBPROGS.
The last two things we associated with Karn is his appearance and a death message. When the appearance is specified, it acts much like a player's appearance, telling the player whether the mobile is ugly, beautiful, average, etc. A builder needn't put it there, it's just a small added bonus. The deathmessage is another added bonus: should a player be able to kill him (near to impossible given the immunities he received), Karn will utter a deathmessage as he breathes out his last. It's an optional device.
Before we leave to the next interlude, let's construct one more mobile, the last one, which is an atmospheric mob:
#9 atmospheric mob~ atmospheric mob~ An atmospheric mob stands here. Just ignore it. ~ What does the long description say?! ~ unique~ BGwxz e 0 0 60 0 50d10+10000 1d1+999 8d6+28 bash -30 -30 -30 -30 0 ABCDLQ 0 0 stand stand none 0 0 0 medium 0 M random mAtmosphericMobRandom 10~ #0
The mob is much like any other mob, although, since we're going to use it for atmospheric purposes, we've made sure of a few things. First, the mob will be immune to just about everything important, spells, attack, charm, summoning, etc. It's important such a mob is likewise immune to (a) poison and (b) disease -- no sense in allowing a mob to die from a transmittable source, or pass off the bug to players. This last is because the mob will not interact with the players; to this end we also "fade" the mob (meaning, no player will be able to see the mobile no matter what spell is used). And just in case the mob is still attackable, we've added the "no-kill" act-flag (letter "w" in the act-flag slot). At the very end of the mob, we've placed a random trigger which will provide the atmosphere. This is how a builder constructs an atmospheric mob; we will delve into the details a little more when we discuss #MOBPROGS.
Once we finish describing the mobiles, we add a #0 at the very end to close out the #MOBILES area header.
Next we chat about the #OBJECTS area header.