= All about Mobiles **Mobiles.** ''mob'' for short; the old MUD word for anything that lives and moves, are the world's creatures and characters: a shopkeeper, a town crier, a goblin, a mouse, a shambling zombie. Friendly or fierce, they are all mobiles. They are not items: they stand in rooms, you can look at them, and (soon) they will move about, talk, and fight. Builders make and shape them; the commands mirror items but use ''mob''. == For players **Seeing them.** When you ''look'', any mobiles in the room are named after the items: {{{ Town Square Welcome to the town square. There is a fountain here and some benches to rest on. Exits: north You see a coin. A town crier is here. A goblin is here. }}} === Looking closely * ''examine //name//'' (or **ex //mobile//**) to read its description * ''look //name//'' does the same As with items, you can refer to a mobile by any word of its name or its keywords, and adjectives disambiguate; ''look grizzled'' or ''look grizzled zombie'' picks the grizzled one out of a crowd of zombies. Looking at a mobile also shows whatever it has **equipped** — the weapon it wields, the armour it wears — the same way **eq** lists your own gear, so you can size up what a creature is carrying before a fight. == For builders Making and shaping mobiles needs the **worldbuilder**, **implementor**, or **admin** role. The command is **mob** (**mon** and **monster** are aliases). === Creation A mobile is born in the room you're standing in. mob create goblin //ref// below is the mobile's keyword or its number (id); you edit mobiles in the room with you. === Name and describe * **mob //ref// name //new name//** — rename it * **mob //ref// desc //text//** — set the examine text players read * **mob //ref// displayname //text//** -- the name players see in the room and in combat, shown in place of the raw name (//The Spider Queen// for a mob named //Spider Queen//). Targeting still uses the real name and keywords. (**disp** is an alias.) * **mob //ref// lookslike //text//** -- a whole custom presence line for the room, used instead of the default "//Name// is here." (//A pair of red eyes gleams in the dark.//) (**looks** is an alias.) **Data fields.** A mobile's stats, flags, and behaviour live in its **data**, with the same typed values and editor as items: * **mob //ref// data //field// //value//** — set a field (//true///false → flag, numbers → numbers, else text; empty or //false// clears it) * **mob //ref// data** — list the mobile's data fields Useful fields: * **data keywords //word word…//** — extra words to refer to it (e.g. **data keywords grizzled thistle**, so two zombies can be told apart) **Combat & experience.** Mobiles fight with the d200 to-hit system; set these to make one tougher or more rewarding (all default sensibly — a bare ''mob create'' is already a weak level-1 creature): * **data maxhp //n//** — its hit points (default 10) — how long it lasts in a fight * **data level //n//** — its level (default 1); each level of gap between attacker and defender is worth an effective +1 hitroll, so a higher-level foe is harder to hit and hits harder * **data elevel //n//** — //effective// level for the **consider** command only: what the mobile reads as when a player sizes it up, without touching its real combat **level**. Use it when a creature is tougher or weaker than its level looks (a level-3 brute that fights like a level 10 -> **data elevel 10**). Unset, consider falls back to its real level. * **data damage //dice//** — attack damage as a dice expression (e.g. **1d3**, **2d6+1**), default **1**. A wielded weapon overrides this with its own damage. * **data ar //n//** -- an armour //modifier// (default 0, zero-based, matching item AR and the //modern// armour display): **+ is better armoured** (harder to hit), **- is worse** (easier). Each point is about 0.5%, so **data ar 10** is ~5% harder to hit and **data ar -20** ~10% easier. Worn armour (onwear-ar) stacks on top. * **data hitroll //n//** — a flat bonus to its attack rolls (default 0; each point ≈ +2.5% to hit) * **data damroll //n//** — a flat bonus added to its damage on every hit that lands (default 0). Stacks on top of its dice (or its wielded weapon) //and// any **onwear-damroll** from gear it wears — a boss with **data damroll 1** hits for +1 over its dice. * **data xpvalue //n//** — experience a player gains for slaying it (default 0). //Mobiles never gain experience — only players do.// (**expvalue** is accepted as a synonym.) * **data dodge //pct//** — a chance (in percent) to sidestep an incoming blow, the same skill players train. **data dodge 1** is a 1% chance to make an attacker miss. * **data warcry //phrase//** — a line the mobile //shouts// the instant a fight begins (**"For the horde!"**). Flavour; leave it unset for a silent creature. **Wandering.** By default a mobile stands where it spawned. Flag it with **data wander true** and it will amble on its own — roughly every minute it may step through an open exit into an adjacent room, and players in both rooms see it leave and arrive. A wanderer never leaves its home **zone** (it only takes exits that stay in the same zone), never walks into a closed/under-construction room, and holds still while it's in a fight. Its position is remembered only while the world is running — a daemon restart sends every mobile back to its spawn room. Leave the flag off (or **data wander false**) for a stationary shopkeeper, guard, or trainer. **Mobiles that fight as a pack.** Two fields let creatures come to each other's defence, so attacking one goblin brings the whole warren down on you: * **data party //tag tag…//** — the pack(s) this mobile belongs to (free-form words, e.g. **data party rats** or **data party goblins raiders**). * **data assist //tag tag…//** — the pack(s) this mobile will //defend//. When any mobile in its room whose **party** matches is attacked, this one leaps in against the attacker. So a den of rats that all defend one another: {{{ mob create rat mob rat data party rats mob rat data assist rats }}} Strike one rat and every other rat in the room joins the fight against you. (Peaceful **npc** mobiles never assist.) **Hostile on sight (aggro).** A mobile is peaceful until struck by default. Flag it **data aggro always** and it opens the fight itself the instant a player steps into its room (a warren of them will swarm). **data aggro dark** makes it hostile //only when the room is unlit// -- a lurker that leaves you be by torchlight but strikes in the black. Clear it with **data aggro false**. (Peaceful **npc** mobiles never turn aggressive.) **Reactions.** A mobile can react to what happens around it. The first reaction is //overheard speech//: * **data react_say //phrase//** — what it says when someone speaks nearby * **data react_say_chance //pct//** — the chance, in percent (default 100) The classic example is a zombie that mutters for brains one time in ten: {{{ mob create zombie mob zombie desc A shambling corpse, jaw slack, eyes empty. mob zombie data react_say brains mob zombie data react_say_chance 10 }}} Now, whenever anyone speaks in that room, there's a 10% chance: {{{ Cindy says: anyone here? The zombie says: brains }}} A friendly mobile works the same way — a town crier who calls out when folk gather and chatter. //(More reactions — greeting arrivals, responding to attacks — will follow.)// **Remove a mobile.** **mob destroy //ref//** — takes it out of the world. === Giving a mobile gear A mobile can carry and use gear just like a player. This is a **builder** tool — worldbuilders, implementors and admins anywhere; zonebuilders inside zones they own. Load its inventory two ways: hand over something you're holding with **give //item// //mob//**, or use the **as** command to move an item from your inventory (or the floor) straight into the mobile: * **as //mob// get //item//** — put an item into the mobile's inventory * **as //mob// drop //item//** — take one back out onto the floor Then dress it from what it carries: * **as //mob// wear //item//** — wear a piece of armour or clothing * **as //mob// wield //item//** — wield a weapon (which becomes its damage) * **as //mob// hold //item//** — hold something in the off-hand * **as //mob// remove //item//** — take an item back off See what a mobile is carrying with **mob //mob// inv** (equipped items are flagged). Its gear is part of it: capture the dressed mobile with **setspawn** and every spawned copy comes dressed and armed the same way — and the gear drops as loot when it dies. **Rare drops.** By default everything a mobile carries spills into its corpse. Put **data droprate //pct//** on an item (either **droprate 10** or **droprate 10%**) and it reaches the corpse only that share of the time — a boss's signature weapon at **droprate 10** lands on about one kill in ten, which is what makes it worth farming. On a no-drop roll that copy is destroyed, but the mobile respawns wearing a fresh one, so registered loot is never lost. (A slain shopkeeper still loses ~half its stock in the scuffle, before droprate is even rolled.) **Coin drops.** A mobile's own coins always spill into its corpse; on top of that you can give it a //gamble// drop, rolled fresh on every kill, with **data coindrop //type min-max chance%//**. //e.g.// **data coindrop copper 10-40 50%** -- on half of all kills, 10 to 40 copper appear in the corpse; the other half, nothing. The //type// is a currency (**copper**, **silver**, or **gold**); the amount is a range (**10-40**) or a single number (**silver 1** for exactly one silver); the //chance// is a percent. It stacks on top of any fixed coins the mobile carries, and a missed roll simply drops nothing -- so a filler mob need not be worth a guaranteed purse. A shambling zombie with **data coindrop copper 1-5 50%** pays out only now and then. Join several specs with **;** for a mixed drop -- **data coindrop silver 1-2 25%; copper 5-20 100%** -- each rolled on its own. **Editing a mobile's items.** The plain **item** command only reaches your own inventory and the floor, so to edit something a mobile is holding, use **mobitem** — it works just like **item**, but over the inventories of mobiles in the room: * **mobitem //item//** — show that item's data * **mobitem //item// name //new name//** or **mobitem //item// desc //text//** * **mobitem //item// data //field// //value//** If more than one mobile here carries a match, **mobitem** lists them numbered (//1.dagger - a rusty dagger (carried by a goblin)//); pick one with **mobitem 2.dagger data …**. //(You can also edit any item by its number with plain **item //#// …**, wherever in the world it is.)// === Stackable loot If a mobile carries a **stackable** item -- one with a **data stack** key (see **[[All about Items#Stackable items|All about Items]]**) -- you can have each kill drop a //random count// of it with **data dropq //min-max//** set on that item. //e.g.// a sheep carrying wool: **mobitem wool data dropq 1-3** drops 1 to 3 wool per kill, rolled fresh each time (a plain **data dropq 3** drops exactly three). Whatever the roll, it lands as a single merged stack in the corpse, ready to loot. === Trainers A **trainer** is a mobile that teaches profession **skills**. Flag it with **data trainer true**, and set the profession it teaches with **data profession //class//** — Fighter, Wizard, Woodsman, or Adventurer (//warrior//, //rogue// and //mage// are accepted too). A player standing with the trainer types **train** to see what's on offer, and **train //skill//** to learn one for skill points. You may write **data class** instead of **data profession** -- they are the same field. (Woodsman is one class wearing three faces by alignment: ranger, woodsman, rogue. A Woodsman's first skill is **identify**, as a Fighter's is //hit//.) A trainer usually keeps shop in a **safe** room — a no-combat sanctuary you flag with the room command **room data safe true** — so the guild hall stays peaceful (anyone who tries to fight there is told //"No violence is permitted here!"//). A complete Fighter's guild: {{{ room data safe true (make this room a no-combat sanctuary) mob create Silas Mossthorn (creates a mob named Silas) mob silas data trainer true (...makes him a guildmaster/trainer) mob silas data profession Fighter (...and able to train Warriors) }}} Now a Fighter who types **train** here is offered the //hit// skill, and **train hit** teaches it for one skill point. See //Training and skills// in [[How to Play]]. === Peaceful NPCs Some mobiles shouldn't be fought — trainers, shopkeepers, quest-givers. Mark any of them with **mob //mob// data npc true** and players can't attack it (**kill**, **hit** and **attack** all bounce). Clear it again with **mob //mob// data npc false**. === Spawning and zone resets A mobile you create is a single, one-off creature; slay it and it is gone. To make it //repopulate//, register it as a zone **spawn**. Zones reset about once an hour, and each reset re-creates any registered mobile whose live copy is missing. * **zone setspawn //mob// [//room#//]** — register the mobile (here, or by id) to respawn; the room defaults to where you stand * **zone setspawn //mob// //spawn#//** — //replace// that spawn: give an existing spawn number instead of a room, and the old mobile (with its gear) is swapped for the one here * **zone spawn** — list this zone's mobile spawns (each shows a //#//) * **zone spawn //#//** — spawn a copy of that one right now * **zone remspawn //#//** — stop it from spawning {{{ mob create goblin mob goblin desc A small, mean-looking goblin. zone setspawn goblin zone spawn (lists it, e.g. "#3 goblin (room #42)") }}} The goblin you registered stays as the first live copy; once slain, the next reset brings a fresh one back. Its corpse still counts as "out there", so a spawn never double-stacks while an instance remains. == How mobiles differ from items * Mobiles are a separate kind of thing: **item** commands never touch a mobile, and **mob** commands never touch an item. (To edit a mouse that's a mobile, use **mob mouse …**, not **item mouse …**.) * Mobiles live in rooms; they aren't picked up or carried. * They share the //look// and //keyword// systems with items, so describing and naming them feels the same. See also: **[[All about Items]]**, **[[How to Play]]**, **[[How to Build]]**.