Race Building - torilmud/docs GitHub Wiki

Building a Race in TorilMUD

Races in the game are generally built by layering things on top of each other. Typically it goes something like ArcheType->Race->SubTypes->Completed Racial Profile.

For example, the Fire Elemental race starts with the ArcheType of Elemental which starts us off building on a base of the following:

Name     : Elemental
Size     : Medium
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hit: +0    Dam: +0    Armor: +20
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Humanoid: N   Animal: N   Hands   : N   Legs    : N
Talk    : Y   Heat  : N   No stun : Y

Then we add some Race specific attributes. In this case the Fire Elemental race file contains the following:

//////////////////////////////
// FIRE ELEMENTAL
//////////////////////////////
ID: 30
NAME: Fire Elemental
ABBREV: EF
TYPE: Elemental
SUBTYPES: Fire, Extraplanar, Incorporeal
STR: -35
DEX: 50
AGI: 150
CON: 30
INT: -10
WIS: -20
END

The SUBTYPES: field adds more attributes. The Fire SubType reduces fire damage taken by 100% and increases cold damage taken by 50%. The Extraplanar SubType adds ?. The Incorporeal SubType makes it immaterial(wraith form).

When we're finished layering things, it all comes together to look like this:

Name     : Fire Elemental
Type     : Elemental
Subtypes : Extraplanar, Fire, Incorporeal
Size     : Medium
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Str: -35    Dex: +50    Agi: +150   Con: +30
Wis: -20    Int: -10    Cha: +0
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hit: +0    Dam: +0    Armor: +20
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Unarmd:    0% Slash :    0% Bludgn:    0% Pierce:    0% Range :    0%
Spells:    0% Fire  :  100% Cold  :  -50% Elect :    0% Acid  :    0%
Sonic :    0% Poison:    0% Pos   :    0% Neg   :    0% Psi   :    0%
Mental:    0% Good  :    0% Evil  :    0% Law   :    0% Chaos :    0%
Force :    0%
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Humanoid: N   Animal: N   Hands   : N   Legs    : N
Talk    : Y   Heat  : N   No stun : Y

Templates can be used to modify an overall complete racial profile. If we take our fire elemental from above and want to make a "weakened" version of it that maybe removes the bonus armor, takes some fire damage, and takes even more damage from cold attacks we can make a template that may look like the below:

//////////////////////////////
// Weakened Fire Elemental
//////////////////////////////
NAME: Weakened_Fire_Elemental
NATURAL ARMOR: -20
RESIST: fire -25, cold -25
END

We then apply that template to our weakened fire elemental in the mob file and our fire elemental now has a racial profile of:

Name     : Fire Elemental
Type     : Elemental
Subtypes : Extraplanar, Fire, Incorporeal
Size     : Medium
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Str: -35    Dex: +50    Agi: +150   Con: +30
Wis: -20    Int: -10    Cha: +0
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Unarmd:    0% Slash :    0% Bludgn:    0% Pierce:    0% Range :    0%
Spells:    0% Fire  :  75% Cold  :  -75% Elect :    0% Acid  :    0%
Sonic :    0% Poison:    0% Pos   :    0% Neg   :    0% Psi   :    0%
Mental:    0% Good  :    0% Evil  :    0% Law   :    0% Chaos :    0%
Force :    0%
-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Humanoid: N   Animal: N   Hands   : N   Legs    : N
Talk    : Y   Heat  : N   No stun : Y