As a programmer, I can't imagine this would be too hard to implement and would add all sorts of possibilities. What I think is needed is the ability to create new spells in a dungeon. In order to do this, assuming that the existing spells are hard coded, you would simply need to add a "spell table" to the code containing the attributes (runes, effect, etc) of each new spell. When the player casts some runes, the game first checks against hard coded spells as it does now and then looks through the spell table for a new spell which uses those runes. The way I see spells being defined is really simple, as follows:
1) The set of runes that make up the spell.
2) Effect of spell. This would be one of:
i) Create projectile. Projectile could be an object which flies away from the party in the direction they are facing, or a spell such as a fireball. There should be a flag which allows the object to be destroyed or turn into something else when it hits something so that you could have, for example, a magic dagger spell which launches a dagger which hits a monster and does damage and then vanishes.
ii) Create an object in hand. For creating potions, or a food spell, etc. Any object can be created, and the designer can specify if another object must be in hand for the spell to work - for example, an empty flask in hand for potion.
iii) Object created on square in front of party. The object created should be able to be anything, including monsters, wall items, etc. If the square in front of the party is inappropriate, the spell fails. There could be a spell for creating worms which give food when killed (a sort of food spell, but you have to fight for it), or a spell that creates an ornate alcove in the wall for storing things, or a spell that creates a weapon on the floor. The possibilities are endless.
iv) Special spell effects, such as light or darkness.
And that's it. Three main attributes required per spell - runes needed, effect (and there only needs to be four that I can think of, as listed above), and parameters such as item created or length of effect or amount of light, etc.
I could probably add a spell table such as this and the code to check it and create an appropriate effect when the right runes are cast in an afternoon, so I don't imagine it would be hard to implement. And it wouldn't mess anything up as if it isn't used then it makes no effect on the dungeon.
[Done for V0.38] Spell system
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Case ii is slightly more complicated because it has to be decided if there is to be a fall-through case if a hand is not available, and what it should be: For example, potions will fail, but ZoKathRa falls through to case iii.
Of course, something like this could be done fairly niftily with scripting, too.
Lua is really not that hard to embed, compared to the task of writing all of this stuff oneself.
Of course, something like this could be done fairly niftily with scripting, too.

Lua is really not that hard to embed, compared to the task of writing all of this stuff oneself.
-
- Artisan
- Posts: 187
- Joined: Sat Jan 22, 2005 2:50 pm
- Location: Ipswich, UK
Um, what's complicated about it? I think perhaps complicated was not the word you were looking for. Complicated is trying to run a country or design a big project. What you describe is a simple decision which could be taken in 2 seconds - does it fall through or not? No, I've decided that it won't fall through and if a hand isn't available the spell fails in all cases. There, decision made.


- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
You'll also note I used the word "slightly."Chaos Awakes wrote:Um, what's complicated about it? I think perhaps complicated was not the word you were looking for. Complicated is trying to run a country or design a big project. What you describe is a simple decision which could be taken in 2 seconds - does it fall through or not? No, I've decided that it won't fall through and if a hand isn't available the spell fails in all cases. There, decision made.
It's a simple decision that can be taken in a lot less than 2 seconds (unless the game engine is going to run really slowly), but all of these simple little decisions need to be taken into account.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact: