A design approach for spell templates


With magic being at the heart of my roguelike I’m always keen to take just that little bit longer with my thoughts on design as I want to create something that I can be proud of.

With this in mind I decided I wanted to create a magic system that satisfied the following requirements:

  • It could be expanded because of its modular design and construction
  • It would use a template system
  • It had no restrictions on the amount and variety of spells that could be implemented
  • It could be used “as is” in a different game

I believe I now have a framework in place that meets those requirements.

An introduction to constructing spells

The spells in my game work on two different levels, for the player they (will) work as a “point and click” activity; For the developer/designer/modder they provide a context rich environment that is very flexible.

All of the spells consist of the following base components:

  • Base properties such as unique id, class, drop order, name, description, etc
  • Energy requirements – what is needed and how much of it is needed to cast the spell
  • Spell effects – is it a spell that deals damage, provides a buff, debuff or offers support.
  • Side effects – something that happens as a side effect of casting.

Each of these spell components use a template sub-system to describe how they work within the game, apart from the base properties. This allows for a very modular approach and for a very rich and flexible method in designing, developing and play testing both existing and new ideas for spells. For example you can quickly make a copy of an existing spell, change the spell_damage_template (re: spell effects) and try out the new spell without recompiling the game.

I have no hard rules that state spell damage templates can only be used in offence spells, actually my templates have been designed so that they can be used across all spell categories.

To help you further understand the direction I’m taking to implement my magic system requirements I have put together a series of articles that provide an overview each spell template including the elements used for that template, these articles can be found in the following links:

You’ve read my magic system overview, you may have even read one or two of my template articles, I thank you for taking the time to do this.

Do you have any thoughts, comments or suggestions for improvements with my design approach, if you do then I’d love to hear them so please leave a comment and I’ll get back to you.

Advertisements
This entry was posted in design, magic, modding, Spellcasting, spells and tagged , , , , . Bookmark the permalink.