View Single Post
Old February 11, 2011, 03:42   #10
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
CunningGabe is on a distinguished road
Originally Posted by nppangband View Post
That's exactly how they work in NPP! When a player dies, it saves a file with the player's name, the depth they died, and their gender, race and class. There are a bunch of ghost race templates (vampire, skepaton, Lich, ghost, skelaton, wraith etc...) in monster.txt. When a player ghost is generated, it looks for a character ghost template that died around the dungeon depth (prepare_ghost function). It reads the player gender, race, and text, and starts making changes to the monster (prepare_ghost_race, and prepare_ghost_class). A troll ghost would get a boost in hit points and the rgeneration flag, a race with resist poison would make a ghost resist poison, the combat damage dice and sides are adjusted with the race's fighting abilities, etc... Then it does the same thing for class. A mage ghost would get spells similar to the mage spellset, depending on the spell level and ghost template level. Priest ghosts get spells similar to their spellset...fighting abilities are adjusted again according to the class's fighting abilities.
That is really, really cool.
CunningGabe is offline   Reply With Quote