Builder:Mobiles
From Wormhole Sci-Fi MUD Homepage
Contents |
The .mob file
Mobiles - or "mobs" are what game developers call the people and mosters who exist in the MUD to provide somebody for players to interact with. Often, this will mean a fight, but mobiles also act as shopkeepers, trainers and such.
The .mob file contains everything the mud needs to know about mobs, except for where they are and what they're holding. Each mob in the file is in sequential vnum order. There are two types of mob files; we'll look at the simple EEMS (Extra Easy Mob-making System) type first. The simple mob type contains all the basic information, but a mob created in this way will be converted into a complex type when you OLC any entry in that zone. Thus, it is a good idea to learn the complex mob format as well. As with all forms of OLC, it's slower than just using a text editor... once you know what you're doing.
Here's a sample mob in EEMS:
#2200 mob example~ the Example Mob~ An example mob stands here, completely clueless. ~ The example mob looks indistinct, as if it hasn't been completely fleshed out yet. ~ 1 4 cd e 100 A 3 0 ... (end of mob file) #99999 $~
Now, to explain, line-by-line:
#2200
The vnum of the mob. Read the section on Virtual Numbers in part 3 of
this document for more information.
mob example~
The namelist of this mob: what words can be used to interact with this
mob. For instance, 'kill mob' or 'kill example' would both be valid for
this mob. Note the tilde following the field.
the Example Mob~
The short desc of the mob. Used in messages such as, "You poke the
Example Mob." or "the Example Mob pounds you!" Note the tilde following
the description.
An example mob stands... ~
The long desc of the mob. Used as part of a room description when a
player enters or looks in a room. Note the tilde on its own line after the
description.
The example mobs looks... ~
This is the description of the mob; what a player sees when typing 'look' at the mob.
1 4 cd e 100 A 3 0
The '1' is the mob race.
The '4' is the mob class. Always put a 4 here, unless you check with Q first.
The 'cd' are the ACTION flags of the mob, which tell the mud how the mob should act. ('c' makes the mobile a scavenger, while 'd' must always be set. All will be revealed later).
The 'e' is the AFFECT flag, which tells the mud about any special abilities the mob might have.
Both these flag values work as per the section 'FLAGS' in part three of this handbook. See 'ACTION & AFFECTION FLAGS' below for more on both of these.
The '100' is the alignment of the mob, ranging from 1000 (good) to -1000 (evil).
The 'A' stands for Extra Easy Mob Making System, which automatically calculates ... everything.
The '3' is the mob level.
The '0' is the mob gender, where 0=neuter, 1=male and 2 = female.
#99999 $~
These are the end of file markers for mob files. Just add them after the last mob.
Descriptions
Descriptions are done much the same way as those in the section in 'Rooms', earlier in this handbook. The reader is encouraged to go back and reread that section if necessary. However,the placement of tilde's is still very important.
Short Desc: the tilde must follow right after the description, on the same line.
Long Desc & Mob Desc: The tilde must follow on a line by itself.
Races
One of:
| 0 | (do not use) |
| 1 | Human (normally just use this for everyone) |
| 2 | Cyberpunk (use identify a mobile that suffers partial damage from wreck robot and EMP burst) |
| 3 | Noghri |
| 4 | Ewok |
| 5 | Ferengi |
| 6 | Jem'Hadar |
| 7 | Borg (use identify a mobile that suffers partial damage from wreck robot and EMP burst) |
| 8 | Wookiee |
| 9 | Wraith |
| 10 | Romulan (use to determine who has a racial hatred of who, with AGG_RACE) |
| 11 | Vulcan (use to determine who has a racial hatred of who, with AGG_RACE) |
| 12 | Cardassian |
| 13 | Vorlon |
| 14 | Changeling |
| 15 | Klingon (use to determine who has a racial hatred of who, with AGG_RACE) |
| 16 | Vampire |
| 17 | Replicant |
| 18 | Hound |
| 19 | Illusion (use for ghosts that can pass through closed doors) |
| 20 | Robot (use to denote a mobile that can be harmed with wreck robot and EMP burst) |
| 21 | Fish (use to denote a mobile that can swim between water rooms) |
| 22 | Insect (future vulnerability to the proposed 'bug spray' power) |
| 23 | Reptilian |
| 24 | Bird |
| 25 | Ruminant |
| 26 | Vegetoid (future vulnerability to the proposed 'herbicide' power) |
| 27 | Invertebrate (do not use) |
| 28 | Feline |
| 29 | Silicoid |
You may be wondering what a mobile's race actually does? Certainly, you can describe a mobile as anything you like, and it can still be given a default race from the list above. Jabba the Hutt does not actually have to be a Hutt, in order for him to be in the game...
The following things might prompt you to choose the mobile's race with care, however:
- A mobile's race determines its initial STR, INT, DEX, CON, WIS, CHA (class also plays a part in this)
- Some races have special characteristics such as saving throws
- It is a mistake to leave robots and droids as default 'human', since in that case they can't be damaged by the 'Wreck robot' psi power. (Daleks and similar cyborg creatures with interfaced hardware should take reduced damage from this attack, so set them as Borg or cyberpunks.)
- Some races have natural enemies, as denoted by the AGG_RACE flag. Use the 'right' races to force these fights to take place.
Classes
Always use 4 ('Space Marine' - the default, warrior class).
For anything else, check before you do it. The only reason to deviate from using '4' is to have a mobile that acquires certain 'automatic' skills such as tumble, battle tactics, fighting dirty... Even 'warrior' type mobiles can be made to cast spells, if desired. These are simply alternative attacks.
Action & Affection Flags
Action flags tell the mud how a mob behaves, and affection flags control the 'special' qualities of a mob. These flags are added together in the way detailed in 'FLAGS', in part 3 of this handbook. Below is a listing of flags for each type, with descriptions of what each does:
Action Flags
| Flag | Name | Description |
|---|---|---|
| a | ACT_SPEC | This means that there is a special programmed C procedure connected to the monster. When this bit is set the monster "function pointer" must be assigned in the "spec_assign.c" file. |
| b | ACT_SENTINEL | When this bit is set the monster will NOT move around in the world, EXCEPT when they are WIMPY, and flee to another room. Note that sentinel mobs actively try to return to their starting room, if they get forced out of it for whatever reason. |
| c | ACT_SCAVENGER | When this bit is set, monsters will pick up stuff on the ground. It will pick up the most expensive items first. |
| d | ACT_ISNPC | RESERVED FOR INTERNAL USE. THIS MUST ALWAYS BE SET. |
| e | ACT_NICE_THIEF | When this bit is set, a monster will not attack a thief which has been caught in the act of stealing from this monster. Maybe use it to be more newbie-friendly in certain areas. |
| f | ACT_AGGRESSIVE | When this bit is set, the monster will attack and attempt to kill any player it can get it's claws on. It will not attack players it can't see (for example dark rooms or when player is invisible, unless the monster can detect invisibility) |
| g | ACT_STAY_ZONE | When this bit is set, the monster will never move into another zone of the world. This is good for keeping your monsters in your own adventure, although using the !mob flag in selected rooms in the .wld file is also good practice. |
| h | ACT_WIMPY | When this bit is set, the monster will flee when it's reaches a low percentage of hitpoints. If the monster is both aggressive and wimpy, when it will only attack players that are asleep, or 'suffering'. |
| i | ACT_AGGRESSIVE_EVIL | When this bit is set, the monster will attack players with evil alignment. 'f' must be set for this to work. |
| j | ACT_AGGRESSIVE_GOOD | When this bit is set, the monster will attack players with good alignment. 'f' must be set for this to work. |
| k | ACT_AGGRESSIVE_NEUTRAL | When this bit is set, the monster will attack players who are neutrally aligned. 'f' must be set for this to work. |
| l | ACT_MEMORY | When this bit is set, the monster will remember players who attack it, and attack the player back if it sees him or her again. |
| m | ACT_HELPER | Attacks a player attacking a PC or NPC in a room |
| n | HUNTING | When combined with act_memory, the aggrieved mobile uses 'track' to find the player. When it enters the same room as the player, it attacks. Since Wormhole uses so many transporters and ships, few mobiles will follow you all the way back to Reception, however! |
| o | !TRACK | This mob cannot be tracked. |
| p | !SCOUT | This mob should not show up on scout... |
| q | AGG_RACE | This mob should be aggressive to members of a certain race. The racial animosities are based upon the source material for each race. So Romulans attack Vulcans, and so on... experiment with it. Have fun. |
| r | MOUNT | This mob can be mounted, with the riding landbased skill. |
| s | FLY_MOUNT | This mob can be mounted, requiring the riding airborne skill |
| t | NO_CORPSE | The mob will not leave a corpse when it dies. |
| u | AUCTIONEER | The mob can be used to auction off items. Don't know if the imms want us using this one. - Ecks |
| v | UNRULY | No idea...anyone have an answer? Drakkkaar the drunkard is unruly. It's just a bit of fun. |
| w | ASSASSIN | Invokes old code that allows the player to buy the services of the assassin using the MARK command. |
| x | MERCIFUL | The mob will not finish a player. It stops fighting as soon as they are stunned/incapacitated/dying... although if the blow that sends them unconscious is hard enough, even a merciful mobile will kill the player outright. |
| y | !CLONE | The mob cannot be cloned. |
| z | FRIEND | This mobile cannot be attacked. |
| A | !ROAM | Mobile can't be persuaded to follow, even when charmed? (We think.) |
Affect Flags
With the new, full list of affect flags, what you have to remember is that many of them are assigned by the game engine during play - for example, when you charm a mobile. Also, mobiles use exactly the same set of affects as your own player character. Hence the inclusion of seemingly useless things like "detect magic". Try to avoid the temptation to set all the wacky flags. They will get toggled naturally during play.
| Flag | Name | Description |
|---|---|---|
| a | BLIND | Normally for internal use. |
| b | INVISIBLE | The monster is cloaked. |
| c | DETECT_EVIL | Formerly known as "Do Not Use"...Is there any reason it shouldn't? If it is used, what will it really accomplish? - EcksIt'll accomplish nothing. Therefore, do not use. This really only works for player characters (unless an immo switches into the mobile, it's pointless). |
| d | DETECT_INVISIBLE | The monster can see invisible players (Especially good for aggressive NPC's) |
| e | DETECT_MAGIC | Formerly known as "Do Not Use"...Is there any reason it shouldn't? If it is used, what will it really accomplish? - Ecks. (See 'detect evil' - Artoo.) |
| f | SENSE_LIFE | Can sense hidden players. |
| g | HOLD | Internal use - do not set. |
| h | SANCTUARY | The monster has sanctuary (takes only 1/2 damage). Nowadays we call this phase shift of course. Do not give it to a mob unless you have a good reason to. Have the mob cast it if you think it should have it. The 'universal sanctuary' should be taken out. You can always monkey with the mobile's hitpoints instead... |
| i | GROUP | Shouldn't be used - internal flag set for mobs that are added to a group |
| j | CURSE | Under the effect of the 'curse' psi power, affecting the mobile's hitroll. Normally assigned during play, not in the mob file. |
| k | LIGHT | The mob has light, and can therefore see in a dark place (dark roomflag, or outdoors at night). Good for aggressive and scavenger mobs. |
| l | POISON | Internal flag set when a mob is poisoned by a psi or an item. |
| m | PROTECTION FROM EVIL | The mob has protection from evil on it if this flag is active, with all the benefits thereof. |
| n | PARALYSIS (OLC lists it as Para) | The mob is paralysed. Do not use: this is an internal flag used to denote paralysis. This is largely a legacy issue, since the paralysis psi power is not in the game right now. |
| o | SPACEOK | The mob is fully equipped with all the trappings necessary for a trip into space. - Ecks |
| p | FL-SWORD | Flaming sword is a combat modifier, causing hits to do fiery damage. Too bad player characters can't have it! |
| q | SLEEP | Internal use only - set when the mobile is subjected to the sleep spell. |
| r | DODGE | Internal use only - I think. - Artoo |
| s | SNEAK | The message "The <mob> leaves <direction> will not be displayed if mob leaves/enter the room. REALLY annoying when the mobile is also wimpy. |
| t | HIDE | The monster will be hidden, and can only be detected by a "sense life" spell. Good idea to have it AFF_SNEAK too. |
| u | FEAR | Formerly known as "Don't Use" - Suspect that this denotes the affectation by a psi that is no longer in use, causing a mob to be more likely to flee battle. Not sure if it is still unusable? - Ecks DO NOT USE |
| v | CHARM | Basically, this is a temporary bit set by the game when a mobile has been charmed. In other words, do not use. (Artoo) |
| w | TAILING | An internal flag to denote when a mob is tailing another mob, player, or whatever. Do not use. |
| x | RAD-PROOF | This mob is rad-proof. Do mobs normally get radiation? - Ecks. Mobiles cannot be killed by radiation at this time, but it is suggested that radiation might be an issue, someday. If your mobile ought ot be radproof... set this. |
| y | INFRAVISION | The mob has infravision. |
| z | BERZERK | The mob fights as if berzerk. |
| A (note the capitals) | HOVER | The mob will hover. |
| B | AFF_FLY | The mob will innately fly. |
| C | MEDITATE | Internal use. Flag is set when meditation starts. |
| D | REGEN | The mob has innate regen. |
| E | SPY | Do not set - internal use only (to denote that a mobile or player is in the act of spying) |
| F | WATERBREATH | The mobile can enter rooms flagged as underwater. (These are not currently in use.) |
Archetype MOB (EEMMS)
#vnum name list~ short desc~ long desc ~ mob desc ~ <race> 4 <action flags> <affection flags> <alignment> A <level> <gender> ... (end of file) #99999 $~
Archetype Mob (complex)
#vnum name list~ short desc~ long desc ~ mob desc ~ <race> <class> <action flags> <affect flags> <alignment> S <level> <(-20 -desired hitroll)> <(armour score below zero / 10)> <health num.dice>d<dice size>+<adds> <400+attack type> 500 <percent used> <attack num.dice>d<dice size>+<adds> -1 -1 -1 <credits>, <experience points>, <position>, <default position>, <gender> Z (if the mob has any scripts) <script vnum 1> <script vnum 2> ... (end of file) #99999 $~
Tips and Observations
- Mobs wander around by default. Remember to include the 'sentinel' action flag for stationary mobs!
- Don't make mobs 'stay_zone' if it is sentinel
- Avoid making mobs 'stay_zone' - making entrances and exits 'no_mob' is better (this appears in the original workbook and we have no idea why it should be a problem).
- 'Angry' mobs can be simulated by loading them sitting and aggressive, with a default position of standing. After being attacked, they will wander around instead of sitting back down! Other interesting things can be done with the position values as well...
- For the keywords of a mobile, there is no need to capitalize any of them, try to keep them all small letters for format cohesion. Try to have as many keywords to describe the mobile as possible from both the short description and the long description. The order of the keywords does not matter... except that a general one must be first.
For example, to suit the Long description "A tall man is walking about here. It appears to be Mayor Neftlewitz."
mayor neftlewitz man tall~
Having mayor first ensures that the player is told "You look at the mayor." instead of the rather strange "You look at the neftlewitz." This would be good for the following long description:
- For short descriptions, always use 'a' or 'the', etc., unless the mobile has a proper name. Above all, never put punctuation at the end of a short description. Also, do not to capitalize the first letter of the short description unless it is a proper name.
- For long descriptions, end with proper punctuation, and make sure that the description is a complete sentence with proper grammar.
- For the 'look' description, try to tell the player what the mobile looks like, how it is acting, etc... Do not include items in the description if possible, since if the mobile is given them, they will appear twice and it will look rather silly.
Hints for builders
If using OLC to create mobs, they will be "complex" ones, which means you assign everything manually, instead of using a level-based formula to determine their hitpoints, AC, etc. Try to make them fair! (I would have started with the off-line version, for speed, and then tweaked them...)
Giving a mob a spell is achieved by making one of its attacks into 'spell' instead of the default option (hit/bite/claw/whip/whatever). Then choose the spell. Most are 'offensive' such as psi missile, colour spray or death strike. Weird stuff like 'word of recall' should probably not be used, at least not without consulting the immortals.
Remember that many spells always hit, so even a humble spell like psi missile WILL chip away at a well-armoured character. That's why it's good to include a few of them... and bad to include too many.
If a mob has an artefact such as wand or staff in its possession, give it some % chance to cast the same spell. Non-scripted mobs never use the things they are holding as a player would.
Mobs can cast spells in combat that mortals cannot. This is compensation for the fact that they stand around minding their own business while they are blinded, cursed, etc... Again, balance with care.
All mob attacks' %chance to use should add up to 100%. Note that (basic) mobiles never get multiple attacks, the way players do... so scale the damage and chance to hit accordingly.
Never, ever leave a mob with no attacks at all. Give it 1d1-1 if you really have to but don't create a mob with no attacks at all, or the game will crash the first time the mobile is attacked.
