Custom Races - torilmud/docs GitHub Wiki

Custom Races

We have the ability to make our own custom races in TorilMUD.

There are many races already created, so please ask if something already exists before making your own.

  • For an example of what a complete Race looks like and how its built, check out this link.

The *.rac file consists of a variable number of keywords and values.

  • Archetypes, Subtypes, Races, and Templates can each be built in this filetype.

  • Location: *.rac files do not go in the areas folder, they go into their corresponding folder in lib/gamedata/racedata/

  • Format: Custom races must begin with the NAME: tag and end with the END tag, but everything else is optional.

  • Comments: Lines that start with // will be ignored by the code.

KEYWORDS

  • Keyword: ID

  • Description: Internal ID number. Only used by base races, base templates, and subtypes and archetypes. Do not define an ID for custom races and templates - it will be automatically assigned.


  • Keyword: NAME

  • Example: NAME: Human

  • Description: The name of the template/subtype/archetype/template. Must be unique.


  • Keyword: ABBREV

  • Example: ABBREV: H

  • Description: The racial abbreviation used in the .mob file to assign a race. Must be unique and is only used by races.


  • Keyword: PLAYER

  • Description: This indicated a race that can be used by players. Do not use.


  • Keyword: SIZE

  • Example: SIZE: Gargantuan

  • Description: The base size. When defined by a type, subtype, or template, this base size will be inherited by races unless they set their own size, which will override it. To change something's size in relation to their base, use the variable size tag. All archetypes define a base size by default, so this tag is always optional when creating a race. If one isn't specified, it'll just use the archetype's base size. See the sizes chart at the end of this document for the allowable sizes.


  • Keyword: VARIABLE SIZE

  • Example: VARIABLE SIZE: -2 (-2 to base size)

  • Description: Variable size. This can be a number from -10 to 10, which will alter the race's size by the amount specified. For example, specifying a variable size of -1 in a template applied to a medium-sized race will result in a Small sized character.


  • Keyword: VISION

  • Example: VISION: infravision

  • Description: The race's vision. Only needs to be specified if they don't have "normal" human-style vision. Refer to the tables below for the possible vision values.


  • Keywords: STR, DEX, CON, AGI, INT, WIS, CHA

  • Example: CON: 150 (+150% bonus to con)

  • Description: Modifiers to the corresponding attribute expressed as a positive or negative integer. These are percentage modifiers, so if you specify, for example, STR: 50, the race will have 50% less strength.


  • Keywords: HITROLL, DAMROLL

  • Example: HITROLL: 25 (+25% bonus to hitroll)

  • Description: Percentage modifiers to hitroll and damroll. Positive and negative integers are accepted, from -100 to 100.


  • Keywords: EXTRA ATTACKS

  • Example: EXTRA ATTACKS: 3 (3 extra melee attacks)

  • Description: Grants extra melee attacks that are spread evenly between primary/secondary. Use caution when using this as it is very powerful.


  • Keywords: NATURAL ARMOR

  • Example: NATURAL ARMOR: 20 (-20 AC bonus)

  • Description: Grants natural AC. This can be positive or negative, and positive is better armor here.


  • Keyword: HITPOINTS

  • Example: HITPOINTS: 75` (75% bonus to HP)

  • Description: Positive or negative percentage modifier to base hitpoints. Note that this is added before con and spell bonuses, and total HP will cap at 32,768.


  • Keyword: REGEN

  • Example: REGEN: -50 (-50% bonus to regen)

  • Description: Positive or negative percentage modifier to base regeneration rate. This can be VERY powerful, use caution.


  • Keyword: RESIST

  • Example: RESIST: elemental 50, physical 25, mental -75

  • Description: Positive or negative modifiers to any of the available resistances. These are expressed here in a comma delimited list with a resistance keyword followed by an integer. It supports a few aliases (such as "physical", "elemental", etc.) that can be used to specify many resistances easily. You can also specify an alias, and then override one aspect of it with an individual resist. For instance, to make a race that has 100% resistance to all physical damage EXCEPT bludgeoning, you could express it as: RESIST: physical 100, bludgeoning 0. See the tables at the end for all of the possible resist types.


  • Keyword: TYPE

  • Example: TYPE: Humanoid

  • Description: Name of the ArcheType this race inherits. See this list of all current ArcheTypes.


  • Keyword: SUBTYPES

  • Example: SUBTYPES: fire, undead

  • Description: Keyword list of all subtypes that this race has. You can specify an unlimited number of subtypes in a comma delimited list. See this list of all current subtypes.


  • Keyword: INHERIT

  • Example: INHERIT: troll

  • Description: You can specify ONE race (not subtype, archetype or template) here, which will cause the race entry to inherit all aspects of the specified race. Anything you then specify in the race will modify or override the inherited race's stats. This is only available to use for races.


  • Keywords: HUMANOID, ANIMAL, HAS HANDS, HAS LEGS, CAN TALK, HEAT EMITTER, NO STUN

  • Example: HAS HANDS:

  • Description: These descriptors are used to setup basic race information. They're typically only used in archetypes, but you can use them in templates and races to override the basic archetype setting if needed. There is no value need with these - a blank tag with no value will set these flags on a race. If however you need to turn one of these off for a race that's inheriting it, you can set "No" as the value.


  • Keywords: POWER:

  • Example: POWER: Trip 10, Aimed Shot 25

  • Description: Adds the named powers to the race at the given level.

Examples

Example Races:

//////////////////////////////
// THRIKREEN
//////////////////////////////
NAME: Thrikreen
ABBREV: TH
SIZE: Medium
TYPE: Monstrous Humanoid
VISION: Infravision
EXTRA ATTACKS: 2
NATURAL ARMOR: 50
HITROLL: 5
DAMROLL: 5
REGEN: 10
RESIST: physical 25, bludgeon 0, poison 50
STR: 15
DEX: 15
CON: 30
INT: -15
WIS: 0
CHA: -30
END
//////////////////////////////
// Phoenix
///////////////////////////
NAME: Phoenix
ABBREV: PX
TYPE: Magical Beast
SUBTYPES: Fire, Extraplanar, Winged
HAS HANDS:
HAS LEGS:
CAN TALK:
SIZE: Huge
VISION: Infravision
END
//////////////////////////////
// Ice Elemental
//////////////////////////
NAME: Ice Elemental
ABBREV: EI
TYPE: Elemental
SUBTYPES: Cold
HAS HANDS:
HAS LEGS:
CAN TALK:
SIZE: Large
VISION: Infravision
END

Example Templates:

//////////////////////////////
// DIRE
//////////////////////////////
NAME: Dire
VARIABLE SIZE: +1
NATURAL ARMOR: 10
REGEN: -10
HITPOINTS: 10
DAMROLL: 10
STR: +25
DEX: +10
AGI: +10
CON: +25
VISION: infravision
END
//////////////////////////////
// FERAL
//////////////////////////////
NAME: Feral
REGEN: 100
EXTRA ATTACKS: 1
HITROLL: 10
DAMROLL: 10
STR: +25
DEX: -10
AGI: +25
INT: -75
WIS: -25
CHA: -75
VISION: infravision
END

Size

Yes, it matters!

Racial Size: Each mob race has its own base size automatically set.

Size Categories:
Fine Diminutive Tiny Small
Medium Large Huge Massive
Gargantuan Colossal

Adjusting Base Size: The TEMPLATE: field in a mob entry can apply one of the following size adjustments which will shift the mob's size category up or down the above list:

Size Decrease Templates Size Increase Templates
size-1 size+1
size-2 size+2
size-3 size+3
size-4 size+4
size-5 size+5
size-6 size+6
size-7 size+7
size-8 size+8
size-9 size+9

Example: Below is a mob entry with a size adjustment template. Its a leviathan, so we want it to be a bit bigger than your average fish... With a +5 to size it becomes Massive instead of Tiny.

#424634
leviathan~
&+ca leviathan&N~
&cBA &ccleviathan&cB swims here creating a rising shaft of &cCb&CWu&CCb&CWb&CCl&CWe&CCs&cB in its wake!&N~
&ccThis gigantic sea creature dwarfs the largest whales. 
&ccPerhaps one of the only natural creatures that are 
&ccactually larger than even dragons, even the slightest 
&ccmovements by this beast send rushing currents rippling 
&ccthroughout the area for miles around. Its beady black 
&cceyes are larger than a man, and dull of any intellect. 
&ccIts cavernous mouth is lined with a thick brush-like 
&ccmaterial. Ridges stripe down its underside, and its 
&cctop is covered in a mottled grey-blue leathery hide.&N
~
71309410 302065716 28 0 S
F 0 0
56 0 -100 200d5+29000 12d12+1
0.0.0.0 150000
131 131 0 1
TEMPLATE: Aquatic, size+5