User Tools

Site Tools


dev_todo:races_as_treasurelists

Summary

Convert the races file to treasures, and adjust any code which uses the old race lists to select monsters from treasurelists.

Notes

A discussion started on #crossfire tonight about how summon_cult_monsters doesn't always work as expected because many monsters aren't in the races file. The angel race, for example, only lists four monsters, the lowest in level being level 12, so the summon_cult_monsters spell inexplicably fails for Valriel followers below that level in praying.

My first thought was to simply build the races file dynamically from the archetypes as part of the server installation process, but then Rednaxela brought up the idea of doing the race lists as treasurelists. This would allow different monsters of a race to have different chances of appearing, and some of the treasure-selecting code could be re-used for this purpose.

We discovered one main problem: the treasure code currently doesn't have any way to limit which items in a treasurelist can be selected. That means a low-level caster could get lucky and summon a very high-level cult monster, even if the “chance” in the treasurelist were very low. This also means that the spell would not become more powerful as the caster's level increases.

A few possible solutions (so far):

  • Have the spell simply fail if the monster selected is a higher level than the caster.
  • Have the spell succeed,but if the monster is a higher level than the caster, have the monster turn aggressive – or possibly have some chance of that happening, based on the difference in levels. I don't know how difficult this would be to do; maybe it's as simple as setting a flag.
  • Add a field or two to items in the treasurelists, as mwedel suggests on this page about artifacts and treasurelists. Adding min_diff (and maybe max_diff) fields would allow generate_treasure to be called with the difficulty argument set to the level of the caster; then create_treasure would use those values to limit the selection to monsters that fit that difficulty value.
  • Other ideas?
dev_todo/races_as_treasurelists.txt · Last modified: 2006/12/28 19:19 (external edit)