Templates - torilmud/docs GitHub Wiki

Templates

Templates are files that can modify something about an NPC. They are created in a .rac file located in the lib/gamedata/racedata/templates directory. There are several templates already made that you can use so please check this list to see if something may already exist before making a new one.

Templates are assigned to mobs in the mob file with the TEMPLATE: line.


Attaching Templates

Examples: Here's a couple mobs that have templates.

#18452
asp shadow snake~
&+La &Cws&CLhadow &cwa&cLsp&N~
&cLA &Cws&cLnake of &cwp&cLure &cws&cLhadow sits here weaving hypnotically.&N~
&cLA small, winding viper with tiny, &cwg&CLleaming &cwe&cLyes stares blankly. 
&cLThe length of its body is bathed in &cws&CLhadow and difficult to 
&cLperceive any details or marks. In fact, it is difficult to say 
&cLthat this creature even has any patterns at all. Seemingly 
&cLentirely composed of &cwd&cLarkness, no light reflects from any 
&cLscales, giving you the impression of insubstantiality.&N
~
1073743970 840507452 2147496158 -1000 S
RS 0 0
51 0 0 0d0+0 0d0+0
0.0.0.0 0
131 131 0 0
TEMPLATE: umbral
#18407
boy child son lost victim exhausted terrorized~
&+wa &cLterrorized&cw boy&N~
&cLAn &Cwexhausted boy&cL rests here uneasily.&N~
&cLA young boy has escaped from a hag's clutches. Jumping in fear, 
&cLstartled by your approach, he tries to calm down, whispering 
&cLreassuringly to himself. His knees are &crskinned&CL and&cy muddy 
&cLwhere he has fallen from running in the thick impenetrable 
&cLmist. Dirt is &cysmeared&CL across his face, and his hair hangs 
&cLin tangling knots from being caged like an animal for so long.&N
~
192 0 0 1000 S
PH 0 0
26 0 0 0d0+0 0d0+0
0.0.0.0 0
131 131 1 0
TEMPLATE: Young
#18448
raven dire~
&+La dire raven&N~
&cLA dire raven is perched here.&N~
&cLShiny feathers make up the midnight black wings of this 
&cLmysterious bird. &CrCrimson eyes&cL stare at you with unnerving 
&cLintensity. In an instant the bird is aloft, with a flutter 
&cLof movement startling you right out of your skin!&N
~
67115106 503349308 12510 -1000 S
B 0 0 PH
51 0 0 0d0+0 0d0+0
0.0.0.0 0
131 131 0 0
TEMPLATE: size-2, dire

"Rank" Templates

Rank templates are used to beef up mobs of unusual significance.

  • Ranks should be used sparingly. Mobs that receive ranks should be clearly significant from the player perspective before they engage in combat with it.
    • This goes double for the Legend rank: can this creature kill Tiamat? If not, you probably shouldn't use this rank.
Rank Templates (In order of power)
Lieutenant
Captain
Champion
Boss
Legend

Ranks can affect the following stats:

  • Ability scores (Strength, Dexterity, etc.)

  • Hitroll

  • Damroll

  • Hit points

  • HP regeneration rate

  • Armor class

  • Switch frequency

  • Number of attacks

  • In addition to having boosted stats, ranked mobs are also worth more experience to reflect the increased difficulty in killing them.