🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A unique (hopefully) magic system idea....

Started by
61 comments, last by Solthar 23 years, 10 months ago
SantaClaws: You state that players would hide their spells from others. There is another way that I can think of that would remove the chance for this to work. Make the spell casting routine unique to the player. i.e. You make symbols or power words random for each spell. You could also keep track of whether the player had learned this or not. This way, you can also add in a possible danger in that the player casts a spell that hurts them... A more effective way of controlling cheats .

It also makes it just as hard the next time around when the player already knows spells from their other characters

-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
Advertisement
That is an interestign idea....

Is there any way you know of that would work with the aforementioned ''spell scripting system''?
-----------------------------"Beware the programmer with a screwdriver..."
Instead of scripting, why not a drag and drop screen - you drag some spells in the order you want to cast them onto a scroll, then read the scroll to try your new spell.
A lot of these ideas are in my system already (brag, brag). The interface for creating spells would be graphical. The player strings together a series of elements that are translated into the spell script. The player never writes the script (possible option for advanced players).

As for power, the cost of the spell will be directly related to the magnitude of the spell (damage, range, duration, etc.), so if I want to cast a fireball as a newbie, I can only afford to make it go so far and do very little damage, but as a higher level mage, I just up the values and suddenly I''ve got the Gates of Hell Fireball up my sleeve. Same spell.

The results of spells are based on the caster and the environment, so not only will the same recipe respond somewhat differently for another mage, but the same recipe for the same mage may respond differently based on the magical nature of the environment. Your fireballs will be unnaturally powerful when cast near the elemental plane of fire, while they may fail altogether near the elemental plane of water. Caves, forests, mountains, oceans all have an elemental effect on the spells. As the mage progresses, she learns to sense the environmental differences and compensate automatically. But a newbie with a complex spell is taking a risk every time he tries to cast that spell in a new area.

Magic is dangerous, and much of that is lost in CRPGs today.


Pax
p
Pax, Do you mean that you have actually implemented these ideas?
if so - do you have a d/l link, I''d love to see this...
-----------------------------"Beware the programmer with a screwdriver..."
It may be a good idea to allow the user to set duration, fire rate, and damage, but my thinking is that newbies will have difficulty finding a working combination of values. Also, it is definitely a bad idea to make the values constants, since then to create, say, fireballs of different damage you''d have to make many copies of the same exact spell. It would be better to use some sort of sliders in-game to change these values at run-time, but then people would often be fiddling with them.

In short, I''m not just thinking of what would work for me, but what would work for other people without being too complex or repetitive.

~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
I was looking at BOTH of our systems (mine and pax''s) in depth tonight and have come to one astounding, but true, conclusion.

We are not writing a script, but setting variables.

Look at it! Where''s the loops and the ifs? Certianly, this makes it easy for the player to make spells! But for that extra functionality, give the players an option, if they are greater than a specific mastery in the selected spheres/atoms/aspects to give there magic a limited ai!

Here''s what I propose:

If the mage elects to choose to include a limited ai within his spell (mage compensating for known scenarios), make it cost him. First off - I suggest using a binary tree to hold this elementary AI -- for each decision there''s two, and only two possible outcomes. It would be something like this

.(true)...../Spell.SetState(explode);
IfEnemyNear............./Spell.SetState(explode)
.(false)....\IfMagicNear
........................\Spell.DoNoAi();

or in todays c code it would look like:

if (IfEnemyNear)
Spell.SetState(Explode);
else
if (IfMagicNear)
Spell.SetState(Explode);
else
Spell.DoNoAi();


Make it so each node, or decisionmaking process, of the enemies ai increases the overall cost of the spell, by say 1.5x its normal cost, which means that the aforementiond decisionspace for the spell would increase its cost by 2.25x (1.5 * 1.5 = 2.25)
As you can see, it would add to the power, and it can be kept simple ingame by doing a drag-and-drop on a image of a binary tree.

what do you think?
-----------------------------"Beware the programmer with a screwdriver..."
Well in terms of spell power I had an idea that the longer the user holds down the casting trigger hte more powerful the spell becomes, and the more proficient that the caster is at that particular sphere the faster the power would rise for the same amount of mana.

Also for the casting of spells (this is from d&d 3rd ed) that casters at the start of the day memorise all the spells that tehy are going to use through out the day, then when they need to they just recite the keyword of the spell that they chose for the day and cast it. this could be easily integrated with the above idea in that when the caster is casting it they say the magic word (hehe) and click on a location target etc, and depending on how long they hold the mouse button down is how powerful the spell gets.

Also I reckon that the caster should have to stay still during the casting of the spell otherwise "the magical energies will be too unfocused" and some sort of mishap would occur, i.e. in the case of fire magic, i.e. casting a fireball while moving the energies would spread around the area where the caster had travelled and therefore there would be an inferno instead etc. and the caster would get injured. This would make casters very wary and fearful for their lives... and remain passive until they can either afford or create someone or something to fight for them...

That''s why you don''t see any powerful wizards fighting with a sword and axe on the battlefield, rather they command great amounts of minions to do the bidding for them.

Dæmin
(Dominik Grabiec)
sdgrab@eisa.net.au
Daemin(Dominik Grabiec)
Solthar said :
quote: I was looking at BOTH of our systems (mine and pax''s) in depth tonight and have come to one astounding, but true, conclusion.

We are not writing a script, but setting variables.


I don''t want to be like nagging, but I think we are three people to have told you so already (granted it was on the other thread on Game programming).

As you say, you don''t have any conditional, or loop structure, you only have to set attributes, eventually in an embedded manner (if a spell can call another spell).
And even if you have conditional structures, I don''t think it would be that hard to do (if you don''t allow too complicated conditions).
As I said in the other thread, if you read the Flipcode article on scripting engines, you will see that most of the work goes in the verification, translation and other stuff that a good compiler do. But if you use a graphical interface (a bit like the one in MAcormedia Flash ?) you can make a foolproof system (well, at least you can try more succesfully).

So now, the main problem is how do you generate a spell ?

Personnaly I like the grammar view about it.
A spell is like a sentence.

You have a Verb, an Object, and adjectives and complements to specificy things like size, direction, special effects, etc.

Say a fireball use a verb Create
then in a list of Objects, you choose Elemental, the Fire, then you add adjectives like Shape (ball), Speed (it''s moving) and whateve other things you can add a complement to your sentence "To" which then asks for an Object, you would choose Target, Other (you have to designate a target that the fireball is going to be sent to)

Of course my example is messy and confused, but I am just typing this on the fly, and besides, I just want to give you an idea on what I am taking about.

hope it helps.

youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
quote: Original post by ahw

Solthar said :
I was looking at BOTH of our systems (mine and pax''s) in depth tonight and have come to one astounding, but true, conclusion.

We are not writing a script, but setting variables.



I don''t want to be like nagging, but I think we are three people to have told you so already (granted it was on the other thread on Game programming).


I was one of the others So, is it really all that astounding? Just work out the attributes you need to model, and off you go.

This topic is closed to new replies.

Advertisement