Magic System

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Magic System

Post by Sophia »

As of DSB 0.26, the rendering and handling of the magic spell dialog is handled by Lua, and the magic system is thus a lot more open.

The only thing the core engine stores now is rune numbers, which can be drawn by your renderer however you like. It can also store up to 8 runes, so if designers want to add another level to the magic system, or completely revamp it, they can.

The key variables are:

Code: Select all

runes_per_set = 6
rune_sets = 4
I've made one significant change to the spell tables, so keep this in mind if you're creating new spells: Due to the ability to now have a (more or less) arbitrary number of runes in a spell, I decided that storing the spells as three-digit numbers (the three runes other than power) was not practical anymore, so any trailing zeros have been eliminated. Thus, spell [400] is now [4]. Spell [440] is now [44], etc. Three-digit spells are the same. This means that if you added a set of fifth runes, new spells could be written by simply putting four-digit numbers into magic.lua.
Post Reply