Customizable magic

Started by
18 comments, last by Adriac 17 years, 6 months ago
So here's a rather half-baked idea I had, but it caused a huge argument with my friends, so there must be SOMETHING interesting to it... Essentially, I wanted to make a game where "magic" wasn't just a bunch of half-arbitrary spells and powers, but where it really meant having power over the world. I wanted to come up with a magic system that really sort of let the player decide what was going to happen when a spell was cast. The game setting for this would probably be 3rd-person action-adventure. Being a programmer, of course, I naturally thought of a programming language as a tool that allows infinate customizability, if you put enough work into it. This led me to the thought of making what is, essentially, an in-game scripting language for magic. You would have certain "functions", which could do things like create heat, or matter, or otherwise manipulate the world around you, and can compose them to make spells. For instance, you wouldn't start with a "Fireball" spell, but could do something vaguely like this:
(PushTowards 'whatever-target (ShapeEnergy 'sphere (CreateFire)))
Of course, in the actual game I'd probably have a nice pretty icon-based editor where you can put spell-pieces together like a puzzle, but it'd sum up to a programming language under the hood. Now you can't have your character being all-powerful, at least not at first, so there'd be some limitations. You would only have a limited amount of power to actually shove into a spell, to start. If you are going to cast a bunch of buffs or traps or something, you need enough mana to hang on to them all at once. And then the time it would take to cast a spell would increase with its complexity; so as you become a better spell-caster, or learn a certain spell-function better, or learn an optimized version of it, you can cast things faster. I'm kind of trying to emulate the real program limitations of memory and CPU here, though the metaphor is imperfect. So that's really the fundamental idea. The player would slowly learn new spell-functions as the game went on, and become more proficient in figuring out how to put them together, until the potential is quite staggering. A player could make a levitation spell just by applying a force to themself... or it might be more efficient, or faster, to make a jump spell by making a big force to send you flying into the air. But that might also hurt on the way down, unless you modify the spell to break your fall for you... You could even make a fork-bomb spell that would endlessly create copies of itself, presumably doing something productive in the process. But your resources are limited, and you might fall over unconcious if you try to create more spells than you have power/memory for... And, of course, you would have an awesome tutorial at the beginning of the game that would hand-hold you through making your first spells, and you would slowly gain more and more powerful componants, and so on. Now, there are a couple problems. The main problem is that to really make this worthwhile, you would probably need a rather awesome game engine. If I make a spell to disintegrate walls or turn a forest into pumpkins, then the game has to be able to disintegrate walls (and maybe make a building fall down), or replace a lot of trees with a lot of rather seasonal melons. This is, ahem, an implementation issue. Saying "you just can't do this" kind of breaks the immersion, and the immersion is the point. Tailoring the spell system so you literally couldn't do things that the game engine can't deal with would be... hard, but perhaps not impossible. The second problem, and what caused the big argument with my friends, is the fact that I think it would be cool to be able to make counter-spells. Essentially... you would be able to percieve bits of an enemy magician's magic as they cast it, probably in the form of glowy bits of their spell-program buzzing around them or something. I think it would be cool if you could make spells that would, one way or another, have a chance of screwing up someone else's: either breaking/modifying a spell that's already in effect, or introducing bugs into a spell as it's being cast. I think this could be rather fun, as it could lead to rather unpredictable effects. Turning "If ... then a else b" into "if ... then b else a", in a random spot of a spell-program as an enemy is casting it... who knows what might happen? Of course, that's also the problem, because if you can screw up someone's spell pretty much whenever you feel like it, it kinda breaks things. Everyone will be forced to use tiny, fast spells they can whip off in an instant, or big huge ones with rediculous redundancy and error-checking. So then to preserve balance you would need some way to shield against counter-spells, and then to counter the shields, and life would just kinda get rediculous. So messing up spells-in-progress may just get ditched; it'd be a neat idea, but shouldn't be the primary offensive and defensive technique. Now, unravelling set-spells, such as a barrier or a trap, are fair game... One suggestion a friend had was to make a spell that instead of interfering with an enemy's spell-casting directly, just made it take longer or use more mana. That'd be interesting, but it seems sort of like an effect without a cause... Making concentration a character attribute might be a better way of going about it. Then you might build a strobe-light spell that can make someone's head really hurt, but they might just wrap themself in magical darkness and use a detecting-spell to "see" where they're aiming... Any questions? Comments? Criticisms? Noble offers to do all the hard work for me? [Edited by - Icefox on October 30, 2006 2:09:38 PM]
-----http://alopex.liLet's Program: http://youtube.com/user/icefox192
Advertisement
I think that it's a really neat idea, and it could benefit a lot from keeping it simple. If you have a drag and drop type of interface where users could create different spells from basic elements, then they get to feel like they're doing a lot of customization. However, you are ultimately the one who gets to pick and choose which elements just don't work together. With this in mind, it would be a little easier to make counter spells. Substitute "fire" with "Cheerios", substitute "transform into ogre" with "transform into kitten" "copy" becomes "transform into kitten made of Cheerios and then copy"

Once you figure out what your limits are, you'll know where their limits begin. With a lot of planning, forethought, and a few mistakes, this could be a very interesting and creative system.

Post an update if anything comes of it.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
How about starting with a glyph language?

A "cast" spell consists of a series of glyphs on a 2D plane.

Each of these glyphs has a "platonic ideal" behaviour, and a corruption amount (making a perfect glyph is next to impossible". The corruption of the glyph makes it behave "not quite right".

Your mana flows into your glyph-graph. Each flow of mana represents an execution point.

The mana flow contains state. Some state a flow might have:
1> Elemential orientation (360 degrees on a disk, with fire/air/water/earth on the cardinal directions)
2> "Voltage" and "Ampage" and "Velocity" ('height' and 'width' and 'speed')
3> Sympathy with "real objects" (targets, types, information about the 'real world'), with Generality and Accuracy fields.
4> Chaos/Order orientation

etc

Each glyph has input areas and output areas, and possibly some internal state. (reflecting charge up time)

Given a set of inputs, it performs some transformation, and (possibly) generates outputs.

The programming task consists of connecting the magical "sources" to magical "sinks". When a stream of mana hits the "sink", it can cause effects in the real world.

When you cast your spell, the glyphs don't behave the exact same way every time. While the energy flows, you have to give it "shoves" to get it working right.

Counterspelling consists of shoving the energy so your glyph program works wrong.

...

For this to work, glyphs have to be really funkey. A glyph with different inputs should behave RADICALLY different. The exact angle that the stream enters should matter (in a relatively continous way).

Of course, a complex magic system like this moves most of the game play out of the real world, and into the world of magic.
Morrowind had a spell combiner feature but not as ground breaking as this one. In that game you had a load of smaller spells which you could go to an NPC who would allow you to make a More powerful spell. Say you wanted a "Retreat" spell. You could have invisibility,fast walking, and maybe some added defense to make a spell that was perfect for retreats. I would just go ahead and limit the options as including spells that while nifty are purely asthetic (pumpkins) they would take to much power.

For counter spells I would say that you should go in the way of D&D where you could send out the same spell and the two would just negate each other so that while you could cancel the spell you have to muster a similarly powerful spell.

Play morrowind and see the feature in action it should give some serious feedback on how the feature could work.
RPGs, Strategys, MMORPGsI'm a Game designer with a need for the perfect combination of max stats and pure skill
Dungeon Master and DM2 also did a glyph system. Some spells were in the manual, a lot you could discover by accident, and others through reading the quests/finding clues.

6 icons and six slots, all had a different effect, and since they could be in certain orders, you had a crazy amount of combinations.

I think a system such as what you have described is a huge step in the perverbial direction of innovating/reinvigorating a stagnant system of pre-canned spells/cantrips.
NotAYakk:
Your glyph system sounds rather cool, though it makes me think more of magic as a circuit diagram than a programming language. Which might be pretty interesting, really... Might be an easier way of visualizing how the spell actually works, at least. It could mean more design work since it's a bit of a departure from the programming languages I've actually built before, but... I'll toy with the idea.

I've never really played Morrowind much, but I'll give it a go. And I've never even heard of Dungeon Master, but it sounds quite interesting. I'll have to do some more research, I see...

Oh, I'm trying to stay away from the stereotypical fire/water/earth/air elements, though. They're, well, boring. I'm still messing around with the exact parameters, but the elements or domains of magic I have so far are heat, light, matter, life, space, motion, and power. They aren't all equal; heat, light and matter all sort of work more or less the same, just on different aspects of reality. You can create it, remove it, or otherwise manipulate it. Motion is pretty much what it sounds like, making things go. Life is sensing and manipulating living things, healing, detecting life, seeing through the eyes of a mouse, and so on. Space is shaping objects, teleportation, possibly planar travel of one form or another, doing things at a distance. And power is raw magic; drawing it from the environment, messing with it, percieving it.

Hmmm, it occurs to me though that Space and Motion might be the most important ones, simply because you're ALWAYS going to end up using them one way or another. I'm not quite sure whether that's a downside or not, yet.
-----http://alopex.liLet's Program: http://youtube.com/user/icefox192
A glyph system would be an awesome solution to something I was considering about how to make enough dynamic options that people can truly discover something (rather than "Your character has learned how to cast..."). An 8 glyph system using 4 possible glyphs would offer 4^8 or 65,536 options making the chance of randoming onto an actual result fairly small (100 possible spells would mean 1/6554 chance per guess). Obviously numbers could be altered to make guessing effective or not. This is slightly off topic from the Op's idea where every combination is a result which is an excellent idea too. Perhaps this could be expanded to allow only certain glyphs/whatever available depending on skill level/specialty or something.
i once came up with the idea to have magical stones placed in runes.
these runes have a special form with "slots" where you can fill in the stones.

you can see this like a shader:
there are some input-values, some operations going on, and an output value.
then, all operations have some randomness.
for example:

firestone--------------->--somecombo---casted_spell
windstone--/

now, every time casting the spell, the firestone and the windstone "get into the pipe", they get e.g. added, and finally released, resulting in a fire-tornado.

now there is some randomness in the "add"-operator. this means, its sometimes 55% fire and 45% wind, resulting in a faster tornado which does less firedamage.

this can lead to some very interesting results. you could also let the player define in what direction he would like it to go. maybe the spellcaster has a concentration attribute on how good he is in manipulating the randomness of the spell; to make e.g. more fire-damage.

this gets more interesting when adding more schemes ("runes"), more sources ("stones") and more manipulators ("ingredients").
I think that in Dungeon Master the spells were all predefined and then given a combination of runes, ie the runes did not really mean anything, you could not find any spells other than the ones the designers had put into the game.

Building a customizable magic system is a very interesting project and could be done like a magic programming language or like glyphs and maybe many other ways but it is also not as easy as it may seem in the beginning. The way they do it in Morrowind(and Oblivion) the main components are given by the designers, ie there are fire/frost/lightning damage, invisibility and so on and you build your spells with these high-level parts, something like "20p ranged fire damage".

In my opinion it would be cooler if you could create a system with more low-level parts (runes, elements or whatever) that could be combined more freely, then you could come up with a spell that noone ever thought of before, but it is of course much more difficult to make such a system, to make basic parts that are flexible, useful and balanced and to come up with a good way to combine the basic parts...

Oh well, good luck anyway...;)
The easiest way to implement this would be to open source your game. There you have it, a complete functional language to create abstract objects that can represent an arbitrary change on the game state. I hope you see what a game balancing nightmare an ideal custom magic system would be. :)

I do think a magic customization system is a good idea, but you need to remember that when you step outside the safe "range X" , "damage Y" or "duration Z" effects, it'll become extremely difficult to judge the effect of a spell. Smart players will quickly come up with effect combinations that will have devastating consequences on the game by a series of small effects that are both easy and cheap to cast. With just a ruleset or an AI construct trying to come up with a spell point cost or casting probability, players will abuse the system sooner or later. Even worse, they won't even consider that cheating or powerplaying as it's well within the game rules. That will ruin the game balance, not to mention shatter the immersion by hitting invisible walls as the graphics or physics engine will be put down to their knees.

I'm familiar with the Morrowind system and I do think it's pretty top notch as far as spellmaking systems go (permutations and combinations on a predefined set of effects, "predefined set" being the keywords here, hint hint) without risking game balance. IMO, all it really needs is a smart extension system that allows for the developer to implement, playtest and release new effects as game patches.

This topic is closed to new replies.

Advertisement