The art of magic.
Hi all.
I''ve been going over how magic should be in my head for the last few days. I''ve come up with ideas - some good, some bad - and i''ve encountered one (IMHO) major problem. Well, Here''s my description of the system so far.
[The Art of Magic]
In magic, as in the varied trades, there are degrees of specilization. they are as follows:
Abjuration [Abjurer]: specializes in spells that protect, banish, or block.
Enchantement [Enchanter]: Imbues the recipient with some property, or grant the caster power over another being.
Evocation [Evoker]: Spells that manipulate energy or create something from nothing.
Illusion [Illusionist]: Spells that alter perception or create false images.
Necromancy [Necromancer]: Spells that manipulate, create, or destroy life or life force.
Summoning [Summoner]: Spells that summon a being or item from another area.
I hope that covers all the required effects. Don''t worry, it becomes more complex now :-).
Now, Spells are made up of components. Let us name these components ''runes'' for lack of a better term. One can make spells by arranging these runes together. Once used in to make a spell, the runes are consumed ( but you still have the spell )
now for the first half of the problem:
// Problem one: I want to make the creation of spells dangerous and semi-unpredictable (only semi!) The number of runes required to make a spell should be variable: above a certain base amount they should be able to have as many runes in a spell as they want. This is the problem; I would like the arrangement of the spell-runes to have a profound effect on spell. how would i do this?
Now, one can make these runes. This is the big problem:
// Problem two (problem majora): I would like to be able to have the creation of said runes to be 90% artistic. By that i mean no *easily seen* formula. Also, the creation should be rendered unique to the mage in question. This means that if another mage of exactly the same stats would try exactly the same thing, it would have a different outcome, but if the original mage did the exact thing again he/she would have the exact same outcome. (well, magic IS the embodyment of chaos -- at least in my game it is!).
// One creates runes by playing around with the different elements. Different elements, in different positions, in different strengths create different effects. So far, the best idea i have so far is a 2D Grid of ''slots'' the mage can use to drop in items that signify the element. different items would have different elemental strengths. Can anyone do better than this?
If not, then how would i take said runegrid a step further into implementation?
Thanks for the advice
P.S. If anything doesn''t make sense, forgive the ramblings - its 3:00 am here right now
Those are some very neat ideas. (We''re you inspired by Eternal Darkness?) But to actually implement such a system is quite an undertaking.
I think there are 2 big possibilities: Either you define every spell and combination of runes beforehand (a lot of work if you want the magnitude you''re talking about but you can be sure of the quality), or you let the computer do it for you. The problem with this last approach is that unless you go make all the runes very unique and special, or you prohibit a lot of spells, 75% of the spells you generate will be useless or boring. On the other hand if you build something innovative (use some AI selection filter?) you could come up with a system that might even surprise you.
It think the important part would be defining what each rune does. IMO it would be best to divide the runes into different groups according to their function, and then limit the use of runes from the same group.
For example: suppose you have an ''action'' group with things like ''destroy'', ''protect'', ''summon'', ''heal''. Then you could have a ''element''-group. The runes herein indicate ''wind'', ''dark'', etc. It would not be logical to use an action ''heal'' AND ''destroy'' in the same spell.
This is no real solution, sorry, but I hope I gets you on the right way.
Jedyte
PS. One thing just pops into my head. You talk about different schools of sorcery. What if every school has a different structural template for spells. Each template provides a number of slots where you can put in runes. Each of this slots translates as a specific role in the spel.
For example a simple direct damage spel could has 3 main roles for target, element and power.
This kinda limits you''re artistic idea, but you can always use added effect runes, or multiple spell combo''s.
I think there are 2 big possibilities: Either you define every spell and combination of runes beforehand (a lot of work if you want the magnitude you''re talking about but you can be sure of the quality), or you let the computer do it for you. The problem with this last approach is that unless you go make all the runes very unique and special, or you prohibit a lot of spells, 75% of the spells you generate will be useless or boring. On the other hand if you build something innovative (use some AI selection filter?) you could come up with a system that might even surprise you.
It think the important part would be defining what each rune does. IMO it would be best to divide the runes into different groups according to their function, and then limit the use of runes from the same group.
For example: suppose you have an ''action'' group with things like ''destroy'', ''protect'', ''summon'', ''heal''. Then you could have a ''element''-group. The runes herein indicate ''wind'', ''dark'', etc. It would not be logical to use an action ''heal'' AND ''destroy'' in the same spell.
This is no real solution, sorry, but I hope I gets you on the right way.
Jedyte
PS. One thing just pops into my head. You talk about different schools of sorcery. What if every school has a different structural template for spells. Each template provides a number of slots where you can put in runes. Each of this slots translates as a specific role in the spel.
For example a simple direct damage spel could has 3 main roles for target, element and power.
This kinda limits you''re artistic idea, but you can always use added effect runes, or multiple spell combo''s.
And the price we paid was the price men have always paid for achieving paradise in this life -- we went soft, we lost our edge. - "Muad'Dib: Conversations" by the Princess Irulan
not really answering your question but
you could have runes like:
frog
stone
fire
sadness
soul
and each rune has a higher rating depending on the class of wizard that you are. so a necromancer could value sadness and soul as really high, whereas a summoner would value fire and frog(!?).
each of these could have a pt rating and simply by combining an amount of them, you add up the points and activate the spell that is coincident with that point range. you could also add supplementary runes to that spell that give it more power.
This room is green
you could have runes like:
frog
stone
fire
sadness
soul
and each rune has a higher rating depending on the class of wizard that you are. so a necromancer could value sadness and soul as really high, whereas a summoner would value fire and frog(!?).
each of these could have a pt rating and simply by combining an amount of them, you add up the points and activate the spell that is coincident with that point range. you could also add supplementary runes to that spell that give it more power.
This room is green
ShiNo, your system is indeed very neat. But like Jedyte said, the effect of each creation can be complicated, since you are running into several multi-dimension translations. To describe your process:
When you put items on the magic star, each item has a position, and the character that puts them has a two-part playerID, one part based on his school, and one part based on his name or random (both values are between 0.00 to 1.00). Suppose that all items in the game has some kind of overlapping classification. In this case, suppose there are 8 catagories. (eg. a magical firesword is catagorized as both melee and fire)
Then, each item can be translated like this:
Components involved:
InputVec : A 1x10 vector that holds the Item Catagoies, the X position, and Y position; Each catagory is a boolean, and X,Y are values between 0.00 and 1.00;
CorresMat : A reusable 10x6 matrix with all cells calculated based on the two values of the PlayerID. The functions you use to calculate can be polynomials or sinusoid functions, but since the player doesn't know his ID this shouldn't matter.
ProductVec : This is a 1x6 vector that holds the sum of contributions from the input vectors.
Procedure:
For a single item placed on the magic star, you multiply InputVec
to CorresMat to get ProductVec. For n items, you do this n times and sum the ProductVec's to get a final ProductVec.
Example:
A the equation for cell(3,4) and cell(9,4) of CorresMat are:
cell(3,4) = PlayerSchoolID*2 + sin(PlayerNameID)
cell(9,4) = (0.5-PlayerSchoolID)^2 + sin(PlayerNameID+1.4)
Since cell(3,4) corresponds to the translation of an catagory 3 item to Illusion, the equation means that a player with a higher SchoolID is more likely to obtain a magic with illusionary aspect. While the equation for cell(9,4) means that if the player's SchoolID is away from 0.5, then an item positioned on the right of the magic star suggests Illusion. Of course not every entry in CorresMat needs an equation, some entries can be 0, signifying that the specific catagory has no effect on a specfic type of magic.
If you want the position effect to be dependent on the item type, then you can apply a 10x2 matrix to translate the xy on the star to the xy required by the CorresMat.
The resulting ProductVec reflects the magic type suggested by the items on the magic star. So far, the creation process is not random, yet variable, and a careful player can actually figure out the matrix (for him) by probing the star with a single item every time. (If you really want him to think, then you can restrict the player to put at least 3 different items on the star each time, very hard to mastermind, but I think allowing probing is fair game, or else quite a frustrating experience)
The actual creation of the spell is based on the ProductVec. To simplfy stuff and the screen description of the spell, you can name the spell by its dominant fields. For example, Summoning is dominant with a value of 8.0, followed by Illusion of 6.7. Then you may concluded that the spell is a summoned creature that can produce split images that last a certain amount of time. To determine whether the creature is a dragon or a snake, you can run the ProductVec(1x6) through a playerID-independent CreatureMat(6x the number of summonable creatures), and select the creature with highest vote.
Other types of special catagories can be done in similar ways, but Like Jedyte said, you still need to define what it means when you create a spell that is dominant in Evocation, partially Enchanting, and with a touch of Necromancy.
Say you can think of 108 totally different types of spell, then you can run the ProductVec through a 6x108 matrix to locate that spell, and use ProductVec again to come up with the specific dmg/duration stats, color and how the sparks fly and so on. The actual number of variations created by the system is way more than 108.
To introduce danger in the process, some of those 108 outcomes can be explosion/poison gas/enemies summoned.
[edited by - Estok on April 2, 2003 8:20:34 AM]
When you put items on the magic star, each item has a position, and the character that puts them has a two-part playerID, one part based on his school, and one part based on his name or random (both values are between 0.00 to 1.00). Suppose that all items in the game has some kind of overlapping classification. In this case, suppose there are 8 catagories. (eg. a magical firesword is catagorized as both melee and fire)
Then, each item can be translated like this:
Components involved:
InputVec : A 1x10 vector that holds the Item Catagoies, the X position, and Y position; Each catagory is a boolean, and X,Y are values between 0.00 and 1.00;
CorresMat : A reusable 10x6 matrix with all cells calculated based on the two values of the PlayerID. The functions you use to calculate can be polynomials or sinusoid functions, but since the player doesn't know his ID this shouldn't matter.
ProductVec : This is a 1x6 vector that holds the sum of contributions from the input vectors.
Procedure:
For a single item placed on the magic star, you multiply InputVec
to CorresMat to get ProductVec. For n items, you do this n times and sum the ProductVec's to get a final ProductVec.
Example:
A the equation for cell(3,4) and cell(9,4) of CorresMat are:
cell(3,4) = PlayerSchoolID*2 + sin(PlayerNameID)
cell(9,4) = (0.5-PlayerSchoolID)^2 + sin(PlayerNameID+1.4)
Since cell(3,4) corresponds to the translation of an catagory 3 item to Illusion, the equation means that a player with a higher SchoolID is more likely to obtain a magic with illusionary aspect. While the equation for cell(9,4) means that if the player's SchoolID is away from 0.5, then an item positioned on the right of the magic star suggests Illusion. Of course not every entry in CorresMat needs an equation, some entries can be 0, signifying that the specific catagory has no effect on a specfic type of magic.
If you want the position effect to be dependent on the item type, then you can apply a 10x2 matrix to translate the xy on the star to the xy required by the CorresMat.
The resulting ProductVec reflects the magic type suggested by the items on the magic star. So far, the creation process is not random, yet variable, and a careful player can actually figure out the matrix (for him) by probing the star with a single item every time. (If you really want him to think, then you can restrict the player to put at least 3 different items on the star each time, very hard to mastermind, but I think allowing probing is fair game, or else quite a frustrating experience)
The actual creation of the spell is based on the ProductVec. To simplfy stuff and the screen description of the spell, you can name the spell by its dominant fields. For example, Summoning is dominant with a value of 8.0, followed by Illusion of 6.7. Then you may concluded that the spell is a summoned creature that can produce split images that last a certain amount of time. To determine whether the creature is a dragon or a snake, you can run the ProductVec(1x6) through a playerID-independent CreatureMat(6x the number of summonable creatures), and select the creature with highest vote.
Other types of special catagories can be done in similar ways, but Like Jedyte said, you still need to define what it means when you create a spell that is dominant in Evocation, partially Enchanting, and with a touch of Necromancy.
Say you can think of 108 totally different types of spell, then you can run the ProductVec through a 6x108 matrix to locate that spell, and use ProductVec again to come up with the specific dmg/duration stats, color and how the sparks fly and so on. The actual number of variations created by the system is way more than 108.
To introduce danger in the process, some of those 108 outcomes can be explosion/poison gas/enemies summoned.
[edited by - Estok on April 2, 2003 8:20:34 AM]
If you''re a genius, or have one handy, I''d think about turning your spell system into a language - the syntax of which gives you the order sensitivity, and provides an underlying structure to the system. By including special cases, and relics of anscestor languages, you''d create enough uncertainty in the system that the user would probably need to be tipped off that there was an actual system there, but anyone who did manage to pick up on it would have the in-game advantage of having a fair idea how their spells work.
Can''t think of anything that would really address the second problem. Though if you take a formula for psuedo-random numbers, assign the player a unique ID number when (s)he starts playing (in a commercial game, possibly use the CD key) and then use the ID and numbers associated with the created spell as arguments for your number generator and use the output from that to index the spell effects, that would be both unpredictable and player dependent.
Can''t think of anything that would really address the second problem. Though if you take a formula for psuedo-random numbers, assign the player a unique ID number when (s)he starts playing (in a commercial game, possibly use the CD key) and then use the ID and numbers associated with the created spell as arguments for your number generator and use the output from that to index the spell effects, that would be both unpredictable and player dependent.
quote:
Original post by rmsgrey
If you''re a genius, or have one handy, I''d think about turning your spell system into a language...
Your idea is very sweet and not difficult to implement, especially if your spells are template-based and the magic language is an encryption of the syntax that you use to load your spells from hex files. Mages that try to do this probably must have some existing powerful spells that they study before they make their own. Pretty challenging for players.
quote:
Original post by rmsgrey
If you're a genius, or have one handy, I'd think about turning your spell system into a language - the syntax of which gives you the order sensitivity, and provides an underlying structure to the system.
Actually, I was considering the idea of using something similar to a shorthand notation. This, IMHO, would work pretty well, since shorthand's goal is to allow one to write word without raising the pencil. So for instance a whole word can be written in one stroke.
Now extend the concept but replace the letters by words, and you'll have a sort of magic language where a whole formula can be written in a single ideogram.
If you dont understand what I am on about do a google search of pictures of shorthand or a search on "shorthand notation", or "stenography". I think the pictures speak for themselves...
Sancte Isidore ora pro nobis !
[edited by - ahw on April 2, 2003 11:32:51 AM]
-----------------------------Sancte Isidore ora pro nobis !
So would this "shorthand" spellcasting be done with the mouse? That particular system has been discussed, and I don''t think anything has ever really come of it. Maybe you would have to compose spells in a non-action way, like sitting by the campfire at night. You come up with the spells you want, write them down, test them, and then bind the ones you want to keys.
It''s a good idea, if you can make it work. Good luck.
It''s a good idea, if you can make it work. Good luck.
Simmilar to the language idea, you could have each rune randomly(seeded with a hash of the player's name to make it different for everybody) represent a small segment of code(simmilar to a scripting language).
For example, lets say you have runes number 1-3. They could represent the following functions
1: SetTarget
2: Damage
3: Heal
Each function needs to take numbers as arguments, so lets say for SetTarget, the first number is the number of targets and then the next X runes tell what target. Maybe 1 means self, 2 means nearest enemy, and 3 means nearest friendly. For damage, lets say it takes 2 numbers, Type(1=fire,2=earth,3=normal) and Amount, and for Heal, the first argument is how to heal(1=instant, 2=regenerate over time, 3=temporary), and the next is how much to heal.
So you could have a string of runes like "113313" and that translates to
(113) SetTarget(Nearest Friend)
(313) Heal(Instantly, 3 HP)
and you have a basic heal spell
Or Maybe "1222233111313", which translates to:
(1222)SetTargets(Nearest Enemy and Next Nearest Enemy)
(233)Damage(Normal Damage Type, 3HP)
(111)SetTarget(One Target, Self)
(333)Heal(Temporarily, 3 HP)
and you have something like a life-steal spell that damages 2 enemies and temporarily heals the caster.
If you made some runes represent the special effect shown as well, you could even have two spells exactly the same that look different, and the appearance of the spell might become an art in itself =-)
In the case of a malformed spell (like not giving enough arguments to a function), you could say it fizzled and either destroy the runes anyways or allow the player to keep them (maybe just destroy one, etc)
To make it unique for each person and harder to figure out, you could do something like
RuneValue = (RuneValue + Position + PlayerNameHash) % MaxRuneValue
so their effect depends on where it is even more so, and it is different for each player. If you want to be REALLY cruel, you could use some encryption algorythim on them to change their values seemingly randomly (or just put + rand() in there after setting it to a fixed seed).
[edited by - Extrarius on April 2, 2003 12:44:26 PM]
For example, lets say you have runes number 1-3. They could represent the following functions
1: SetTarget
2: Damage
3: Heal
Each function needs to take numbers as arguments, so lets say for SetTarget, the first number is the number of targets and then the next X runes tell what target. Maybe 1 means self, 2 means nearest enemy, and 3 means nearest friendly. For damage, lets say it takes 2 numbers, Type(1=fire,2=earth,3=normal) and Amount, and for Heal, the first argument is how to heal(1=instant, 2=regenerate over time, 3=temporary), and the next is how much to heal.
So you could have a string of runes like "113313" and that translates to
(113) SetTarget(Nearest Friend)
(313) Heal(Instantly, 3 HP)
and you have a basic heal spell
Or Maybe "1222233111313", which translates to:
(1222)SetTargets(Nearest Enemy and Next Nearest Enemy)
(233)Damage(Normal Damage Type, 3HP)
(111)SetTarget(One Target, Self)
(333)Heal(Temporarily, 3 HP)
and you have something like a life-steal spell that damages 2 enemies and temporarily heals the caster.
If you made some runes represent the special effect shown as well, you could even have two spells exactly the same that look different, and the appearance of the spell might become an art in itself =-)
In the case of a malformed spell (like not giving enough arguments to a function), you could say it fizzled and either destroy the runes anyways or allow the player to keep them (maybe just destroy one, etc)
To make it unique for each person and harder to figure out, you could do something like
RuneValue = (RuneValue + Position + PlayerNameHash) % MaxRuneValue
so their effect depends on where it is even more so, and it is different for each player. If you want to be REALLY cruel, you could use some encryption algorythim on them to change their values seemingly randomly (or just put + rand() in there after setting it to a fixed seed).
[edited by - Extrarius on April 2, 2003 12:44:26 PM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Extrarius so far is the winner, the runes being the basis of an underlying language is just basically an awesome idea.
Hmm... Will have to create a HUGE library of functions to avoid making a set of ''cookie cutter spells'' though. Then, if i modify Estok idea to go with the change... hmmm....
Also, this solves the variable length problem. Sure they can make huge and intricate spells - but it will cost them! For each rune over a set amount the spells cost will rise... exponentialy!
The problem is still this though: the grid is, in essence, 4D - not 2D. For each X and Y value there is an ElementID and a ElementStrength.
so, two down - one to go! (yay)
Hmm... Will have to create a HUGE library of functions to avoid making a set of ''cookie cutter spells'' though. Then, if i modify Estok idea to go with the change... hmmm....
Also, this solves the variable length problem. Sure they can make huge and intricate spells - but it will cost them! For each rune over a set amount the spells cost will rise... exponentialy!
The problem is still this though: the grid is, in essence, 4D - not 2D. For each X and Y value there is an ElementID and a ElementStrength.
so, two down - one to go! (yay)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement