S Type Mobs

The S type mob offers lots of opportunities to make the mob an individual.  Here's the prototype and a sample mob.

Prototype

#VNUM
alias list~
short description~
Room description.
~
Detailed Description.
~
<race> <class> <action> <affection> <alignment> S
<level> <thac0> <AC> <hit points in format xdy+z>
<attacks> -1
<skill list> -1
<resistance list> -1
<gold> <experience*3> <position #1> <position#2> <gender>

A
%%5 action1;%5 action2~
R

<1> <2> <3> <4> <5>

Sample
#18041
tinker~
The tinker~
The tinker offers to turn your helmet into a cooking pot.
~
After all, you'll not be needing armor in this land of peace! This
tinker has travelled the length and breadth of the kingdom and seen the changes wrought first by war then the coming of peace. He can fix almost anything metallic for you.
~
1 0 bg 0 0 A 95 1
A
%%1 yell Pots from your helmets! Bring me your helmets!~

 WB01570_.gif (184 bytes) Overview - TopWB00852_.GIF (317 bytes)
Thac0


"To Hit Armor Class 0" -- The mud automatically calculates hitroll for mobs based on the thac0 you code.  The thac0 is added to some calculated base HR for the   mob.
WB01570_.gif (184 bytes) Overview - Top
WB00852_.GIF (317 bytes)
Armor Class

The ability of the monster to avoid damage. Range is from 10 to -200, with lower values indicating better armor. Roughly, the scale is:

10 Naked person (100/10)
0 Lightly armored person
-25 Lord Simon, a hard level 63 Mob
-50 A very powerful level 109 Player Knight
-79 Hades (almost unhittable to normal mortals)
-200 Armored Battle Tank (-200/10 which is the lowest a mob  is allowed in the code for combat calculations, and   players simply cannot hit this; it's a shopkeeper ac)


Note on THAC0 and Armor Class (AC): When an attacker is trying to hit a victim, the attacker's THAC0 and the victim's AC, plus a random roll of the dice, determines whether or not the attacker can hit the victim. (If a hit occurs, a different formula determines how much damage is done.) An attacker with a low THAC0 is theoretically just as likely to hit a victim with a low AC as an attacker with a high THAC0 is to hit a victim with a high AC. Lower attacker THAC0's and higher victim AC's favor the attacker; higher attacker THAC0's and lower victim AC's favor the victim. HITROLL is also used in the computation.
WB01570_.gif (184 bytes) Overview - Top
WB00852_.GIF (317 bytes)
Hit Points

Each time a mob is created, the mud computes the number of hit points that mob will have based on a dice roll.  You code the number and size of the dice, and you can code a constant to be added to the results.  For example:

4d6+10 means to roll 4 6-sided dice, add up the results, and add 10 to that.

HP are always coded in the format xdy+z, where x, y and z are always whole numbers (integers).  Because it's a dice roll, each time a mob is loaded, it's hp may be slightly different.  If you want the results to always be the same, code the number of dice to 0.  For example:

1d0+100 would give a mob who always had 100 hp.

 

Note that all three numbers, the 'd' and the '+' must always appear, even if some of the numbers are 0.

Generally speaking, mobs have more hp at a given level than a player would. Their way of making up for a lack of your creativity and foresight (and ability to change kits!)

Once you know what level you are building for and you have decided you need to code "S" type mobs, get an idea of the HP, Thac0, gold, exp and dam for your mob from doing a "vstat mob mob#" or "stat mob" of your favorite mobs of a similar difficulty on the test site. Or ask one of the world-imms to do this for you!

The sample mob stats file has a guideline for coding all of the S type mob stats.  Part of the approval process will be to compare your mobs against this standard.

WB01570_.gif (184 bytes) Overview - Top WB00852_.GIF (317 bytes)
Attacks

There are three kinds of attacks:  hit attacks, spell attacks and attacks based on skills.  The coding for each is slightly different, and listed in great detail below.    Two things to remember:  You must start with a physical (4xx) attack, and the %chosen for all attacks must add up to 100.

DamRoll (DR) is not directly coded for mobs since it has no effect.  The amount of damage done with each attack is specified precisely in this section.

Physical attacks


Every mob must have a physical attack coded first, before any spell or skill type attack.    You cannot code more than 10 attacks per mob (physical + magical), however.

This is the general format of the attack:

   <hit type> 500 <percent chosen> <damage dice>

Hit type

The type of damage message you see depends on the type of hit.

400 hit 401 bludgeon
402 pierce (backstab) 403 slash
404 blast 405 whip
406 no_bs pierce 407 claw
408 bite 409 sting
410 crush

Damage Dice

The random number of damage the mob gives must be defined in the form "xdy+z" where x, y, and z are integers. For example, 4d6+10 would mean sum 4 rolls of a 6 sided die and add 10 to the result. Note that all three numbers, the 'd' and the '+' must always appear, even if some of the numbers are 0. For example, if you want every copy of a mob to always hit for exactly 100 you would code => 1d0+100


Example - this mob ALWAYS bites, doing 13-158 hp damage each time:

                408 500 100 5d30+8 -1

Spell attack:
Code at least one physical attack first. Frail as he may be, the mob
still can hit!

You can't code more than 10 attacks (physical + magical).

    <spell number> 0 <percent chosen> < spell dice>

Spell  dice:

The format for the spell dice is xd 0+z

The first number  is the target of the spell:

1 - Offensive spell, cast on enemies
2 - Defensive spell, cast on self

The second number, determines the SKILL to which the mob has the spell, or how frequently the mob successfully casts it. 
For example:

28 0 50 2d0+75

This mob casts heal (spell #28) 50% of the time.  He casts it on himself, and 75% of the time, the spell works.


In the example below, the mob will cast the "harm" spell (spell #27) 50% of the time at the player, with a 95% chance of the spell being cast successfully. (even mobs "lose concentration" sometimes!):
   
27 0 50 1d0+95

                                                  

                
Percent Chosen

This number is the percent this line is chosen. When all the attacks (physical AND spell AND skill) have been entered, this column needs to add up to 100. If you have one entry, it is 100. If you have two or more entries, then you have to decide how often one is used over the other normally. For example, Bob the mob fighter is armed with a dagger (off hand) and a sword, on hand so you want Bob to hit with the sword maybe 85% of the time and the dagger 15% of the time. This is a trade off you have to make. Of course since you assign damage, you may want to simulate a different type of sword, where it pierces for more damage 10% of the time and slashes the remaining 75% . All three entries still comes up to 100%.



Skill Attacks

Skill attacks are similar to spell attacks.

<skill number> 0 <percent chosen> 0d0+0

Useful skills to code?

 

323 kick 373 pugilism 324 bash (only works if you give the mob a shield)
345 disarm foe

WB01570_.gif (184 bytes) Overview - TopWB00852_.GIF (317 bytes)
Skills

After the attacks, you may list the innate skills the mobs have and to what degree they have them (seen as a percentage). The mob will be given many skills based on their level, class and race, however you can also specify skills such as parry and unfair_fight.     If you code a skill attack such as kick, you must also code it in this section.

The format for the "non-fighting list", or skill set, is

<skill number> <% effective> < skill number> <%effective> .... -1

You are limited to 10 skills.
Please note that a mob with many skills will cause local lag,
especially if there are several of them in the same room.
So use the set skills to a minimal extent.    

WB01570_.gif (184 bytes) Overview - TopWB00852_.GIF (317 bytes)
Resistances
You can code resistances to damage-causing spells such as dragonbreath or magic missile. These are coded in the same way you code skills in the section above. For example:

32 100 -1

would give 100% resistance to magic missile. There are two cautions, however:

1) You cannot provide resistance to more passive spells, such as blindness.
2) When you code these resistances, the ones the mud gives the mob by default (charm, summon and sleep) are removed.
3) You are limited to 10 spell resistances.

 

 WB01570_.gif (184 bytes) Overview - TopWB00852_.GIF (317 bytes)
Gold
You must give mobs at least 1 gold coin.  The amount should depend on the mob, not his level or difficulty.  A nobleman would, for example, have more gold than a peasant.

WB01570_.gif (184 bytes) Overview - TopWB00852_.GIF (317 bytes)
Experience
Generally, this number is three times the amount of experience points the mob is worth.   A mob worth 100,000 experience points (to the player) is coded with 300,000.

 WB01570_.gif (184 bytes) Overview - Top

WB00852_.GIF (317 bytes)
Position

Load position is the position the mob is in when loaded.  Default position is the one he goes back to after a battle.  The room description is only displayed when the mob is standing ...

0 Dead Reserved for internal use. Do not set.
1 Mortally Wounded Reserved for internal use. Do not set.
2 Incapacitated Reserved for internal use. Do not set.
3 Stunned Reserved for internal use. Do not set.
4 Sleeping
5 Resting
6 Sitting
7 Fighting Reserved for internal use. Do not set.
8 Standing

WB00852_.GIF (317 bytes)

Magic Resistance

<1> <2> <3> <4> <5>

Magic Resistance is currently added in a similar way to mob actions. You must add two lines just AFTER any mob actions, of the following form: R <1> <2> <3> <4> <5> where 1,2,3,4+5 are the different resistances. Currently 1-4 do not work and should be set to -1. This tells the mud to set them to default levels. 5 is magic resistance which works the same way it does for mortals, i.e. it is a percentage chance of taking effect. If it happens, damage caused by magic is halved. If you don't want to add any magic resistance just leave this section out.

Top