Adding subraces by Cosmic Gerbil

Before you have a go at this, make sure you are comfortable with adding in new races.

Once you have added in some new races to your module you may want to add in some subraces. This can be useful if you have added a race that would have distinct subraces which other races would not have. Examples of such races could include elementals, golems or dragons. I will use my elemental race from Gerband as an example.

R:N:11:Elemental 
R:D:A creature from one of the elemental planes:
R:D:fire, air, earth, water and chaos.
R:S:0:0:0:0:0:0:0
R:K:6:8:6:4:1:5:5:5
R:P:11:150:3:47
R:M:30:15:68:10:165:5:64:10:140:4
R:E:1:1:1:2:1:1
R:R:1:0
R:C:Warrior | Archer | Wizard | Rogue | Priest | | Archaeologist | Ninja
R:k:600:+000:Disarming
R:k:800:+000:Magic-Device
R:k:3000:+000:Spirituality
R:k:4000:+000:Stealth
R:k:100:+000:Sneakiness
R:k:+500:+000:Weaponmastery
R:k:+500:+000:Archery

As you can see this new race lets you play as an elemental. However there are many different types of elemental and they all have different powers. So this is where subraces come in. Open up p_info.txt and add in this race to your module. Don’t forget to change the R:N:11 on the top line to whatever new number you are using in your module. Also add on one to the maximum number of races allowed in the misc.txt file. Now scroll down the p_info.txt file until you come to the subraces. A word of warning…do not use slot number 9 for adding in a new subrace. This slot is hardcoded for corruptions and so using it will cause your module to crash.

Let’s add in a fire elemental subrace. Copy this into your module:

S:N:10:Fire 
S:D:A:An elemental from the plane of fire.
S:S:1:1:0:0:0:0:0:100
S:K:0:0:0:0:0:0:0:0
S:P:0:0:0
S:M:0:0:0:0:0:0:0:0:0:0
S:E:0:0:0:0:0:0
S:Z:fire ball
S:Z:eat torches
S:G:NO_CUT | NO_FOOD | AC_LEVEL |
S:R:1:0
S:F:FLY | IM_FIRE | 
S:F:SH_FIRE | RES_POIS | 
S:A:Elemental

Remember when adding in a new subrace; always add one on to the maximum number of subraces allowed in the misc.txt file.

S:N:10:Fire

S:D:A:An elemental from the plane of fire.

The S’s that start each line stand for subrace. The meaning of the subrace lines are similar to the race lines. The top line tells you the name of the new subrace. The second line down describes the subrace

S:S:1:1:0:0:0:0:0:100

This is the stats line. This line is useful because it allows you to customise your subraces’ stats. As you can see fire elementals have added strength and intelligence. If you were adding in an earth elemental for example, you may wish to give them an extra 2 to strength. This allows for you to make your subraces more individual.

S:K:0:0:0:0:0:0:0:0

This line deals with your subraces’ abilities. It works exactly the same as the racial ability line.

S:P:0:0:0 This is the line for adding on extra hit die, experience needed and infra vision. The first 0 represents extra hit die, the second 0 is for extra experience needed and the final 0 is for infra vision. Unlike in the races, there is no 0 for the history chart, as subraces do not have separate history lines.

S:M:0:0:0:0:0:0:0:0:0:0

S:E:0:0:0:0:0:0

These lines are the same as in the race descriptions. The top line deals with male and female age, height and weight. The bottom line deals with equipment slots.

S:Z:fire ball

S:Z:eat torches

These are racial (or in this case subracial) powers I designed for the fire elemental race. For more information on adding racial powers, see the Module Developers Discussion/Adding racial powers help file.

S:G:NO_CUT | NO_FOOD | AC_LEVEL |

These are flags that the fire elemental has. NO_CUT means that it cannot be cut (seeing as it is impossible to cut fire). NO_FOOD means that even if the fire elemental eats food it will not feed it. A race or subrace with the NO_FOOD flag needs to read scrolls of satisfy hunger, or if you want to, you can write a script allowing them to eat other items (for example torches would be a good choice for a fire elemental). AC_LEVEL | adds a natural armour onto the fire elemental because for my fire elemental subrace I have written a script that forbids them from wearing armour. This may all sound quite complicated…the best way to learn about adding on flags is by looking at the various flags on races and subraces in ToME and in different modules.

S:R:1:0 S:F:FLY | IM_FIRE | S:F:SH_FIRE | RES_POIS |

This is similar to the lines for learned powers in the mindflayer race. All of these powers are active from birth…as soon as you select a fire elemental to play, he has all these flags active from level 1. The flags mean: he can fly, he is immune to fire damage, he is surrounded by a fiery sheath and he has some resistance to poison.

S:A:Elemental

This line is important as it shows you which races the subrace is available for. In this case the fire subrace is only available for the elemental race, because obviously we don’t want any other race being able to play as a fire elemental. If you add in more elemental subraces, they will also have this line allowing them to only be selected if you choose to play as the elemental race.

This is just one example of a subrace. In ToME and in its many modules there are lots of different subraces available. It is always a good idea to look at as many different examples of subraces possible, to help you to learn how to add in your own.

If you want to use the fire elemental subrace for your modules, feel free :) Just mention me on your credits list ;)

Module Developers Discussion/adding in new subraces (last edited 2006-09-15 17:59:31 by host81-157-200-159)