Creating a new player race

Newbie guide to adding new player races by CosmicGerbil

Adding a new race for your modules is easy. First open the file p.info in lib/edit. Scroll down until you find the info for the races. It will start with the human race. This example shows you how to add in a mindflayer race.

R:N:13:Mindflayer 
R:D:A race of intelligent, wise creatures, with octopus-like heads.
R:S:-4:5:4:0:-2:-2:0
R:K:11:15:10:1:5:10:-5:0
R:P:8:130:5:87
R:M:125:25:71:3:120:6:63:3:100:3
R:E:1:1:1:2:1:1
R:Z:blink
R:Z:mind blast
R:R:1:0
R:F:SUST_INT | SUST_WIS 
R:R:5:0
R:F:PRECOGNITION
R:R:10:0
R:F:ESP_ALL
R:C:Archer | Wizard | Priest | Loremaster
R:k:+1100:+000:Disarming
R:k:+1500:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:+1000:+000:Stealth
R:k:+500:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:+000:+000:Archery

As you can see, all the lines start with R (for race definition)

R:N:13:Mindflayer This is obvious, it means that in this example, the race is number 13 and the race is called mindflayer. You must not leave spaces between race names, so putting mind flayer would cause an error. Mind-flayer is acceptable though.

R:D:A race of intelligent, wise creatures, with octopus-like heads. D stands for description. This text describes what mindflayer are like.

R:S:-4:5:4:0:-2:-2:0 I would guess that S stands for stats. The stats are strength, intelligence, wisdom, dexterity, constitution, charisma and luck. 0 is a "normal" stat, and is equal to humans, who have 0 for all their stats, as they are the race that all other races are measured up to. So the mindflayer's strength stat is -4, showing that, compared to humans, mindflayers are physically weak. The intelligence stat is 5 (mindflayers are smarter than humans), and so on.

R:K:11:15:10:1:5:10:-5:0 I don't know what K stands for, but this line deals with a races' abilities. The numbers mean:

Disarming. How well a race can disarm traps. 11 is high; mindflayers are good at this skill.

Device. This means using a magic device (such as a wand or staff).

Saving throw. How well a race can resist enemy spells cast on them.

Stealth. The ability to move quietly and maybe avoid some monsters.

Searching. A high skill level here, means that a race can more easily find secret doors and traps.

Frequency of search The ability to notice something without actually searching for it.

To hit (normal). Combat skill. Mindflayers have -5; they are poor at fighting.

To hit (bows). Fighting skill with bows.

R:P:8:130:5:87 These number stand for:

Hit dice. The mindflayer race has 8 hit dice.

Xp%. Experience needed to advance a level. The 130 stands for 130%. Once again, experience is compared to the human race, who need 100% xp to advance a level. This example means that the mindflayer race needs 30% more experience than the human race to advance a level.

Infravision is the ability to detect warm-blooded monsters. It is measured in tens of feet. So the mindflayer race has 50 feet of infravision.

History chart. The mindflayer races history starts at number 87 in the history chart. This chart follows after the races and subraces.

R:M:125:25:71:3:120:6:63:3:100:3 These numbers mean as follows:

Base age

Max age This adds the 25 onto the base age (125). So a mindflayer's age can range from 125 to 150

Male base height (measured in inches)

Male max height

Male base weight (measured in pounds, I think)

Male max weight

Female base height

Female max height

Female base weight

Female max weight (I'm surprised the game shows this :D

R:E:1:1:1:2:1:1 These are equipment slots. They mean:

The first 1 is the weapon slot, the mindflayer can wield one weapon.

The next 1 is the torso slot, the mindflayer can wear one piece of armour.

The third 1 is arm slots (expressed in number of pairs).

The 2 means finger slots. Even though the mindflayer race has 6 fingers and 2 thumbs they can only wear two rings. According to the game rules, this is because magic rings only work when worn on the third finger. This applies to humanoids, but some races would be allowed to have a maximum of 6 rings to wear. For some reason the game will not let players or monsters wear any more than 6 rings, no matter how many fingers/tentacles they have :)

The next 1 means head slots (for helms)

The final 1 means leg slots (expressed in number of pairs).

R:Z:blink 
R:Z:mind blast

These are the mindflayer's racial powers. See, Module Developers Discussion/Lua scripting help for more info on adding new racial powers.

R:R:1:0 
R:F:SUST_INT | SUST_WIS 
R:R:5:0
R:F:PRECOGNITION
R:R:10:0
R:F:ESP_ALL

These are the powers a race learns as it gains experience. The top line (R:R:1:0) means level 1; these are powers that are active from birth. SUST_INT and SUS_WIS are flags for the actual powers. So a mindflayer will not have its intelligence or wisdon drained by any monsters or traps. R:R:5:0 and R:R:10:0 mean powers the mindflayer gains at experience levels 5 and 10. So at level 5 the mindflayer gains the power of PRECOGNITION and at level 10, the power ESP_ALL.

R:C:Archer | Wizard | Priest | Loremaster

These are the classes that a race is permitted to be. Mindflayers are too weak to be warriors. When you start up a game of T.o.M.E, if some classes are forbidden to your race, they will appear in grey. You can still actually choose these classes, but it is not recommended.

R:k:+1100:+000:Disarming 
R:k:+1500:+000:Magic-Device
R:k:+5000:+000:Spirituality
R:k:+1000:+000:Stealth
R:k:+500:+000:Sneakiness
R:k:-500:+000:Weaponmastery
R:k:+000:+000:Archery

These are the starting skills a race may have, and are mostly the same as seen in the R:K:11:15:10:1:5:10:-5:0 line.

Also you need to put the mindflayer race into the sub races. Go to the subraces and add mindflayer in to the normal subrace.

This is the normal subrace.

S:N:0:  
S:D:A:A normal member of the race.
S:S:0:0: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:A:Human | Half-Elf | Elf | Hobbit | Gnome | Dwarf | 
S:A:Orc | Troll | Dunadan | High-Elf | Half-Ogre | Beorning | 
S:A:Kobold | Petty-Dwarf | Dark-Elf | Ent | RohanKnight | Thunderlord | 
S:A:DeathMold | Yeek | Wood-Elf | Maia | 

Add mindflayer on after Maia, or if you have deleted one of the T.o.M.E races, replace the name of the deleted race with mindflayer.

You can also add mindflayers to any of the other subraces that you like, although some of them may not be suitable. For example, I haven't got a zombie mindflayer subrace in my module, because I felt it would be too silly, as zombies are strong and dumb, while mindflayers are smart, but quite weak.

If you have replaced one of the T.o.M.E races with mindflayers, make sure you alter all the old race's names on the subraces list to mindflayer and remove any old race names on the subraces that you don't want mindflayers to belong to.

To put the new race into a clean copy of T.o.M.E, change the number 13 (on the line R:N:13:Mindflayer) to 22. If you want to delete any of the original T.o.M.E races, then use their empty slot for the mindflayer race.

To make T.o.M.E read the new race go into lib/edit and open the file misc. On the lines that read:

# Maximum number of race types in p_info.txt 

M:P:R:22

change the number 22 to 23. Start up the game, and you should be able to play as a mindflayer.

The help for this page is almost finished, I just have a little more work to do on it. I need to do "how to put a new race description into the history table".

If anybody wants to use the mind flayer race in their modules, that's great. Just mention me in the credits file :D

Module Developers Discussion/Creating a new player race (last edited 2005-09-24 19:09:21 by host86-134-88-8)