# Where spells can mean chemistry

This topic is 2559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

My idea would be to make the elements (fire, water, air, earth) act like chemicals. So combining Water and Earth = W[sub]2[/sub]E which would lead to a spell called MudCage. That way you can combine many elements (other than the 4 named) with runes, normal objects, magic books, weapons, or armor. The possibilities would be numerous.

From Original Post

Any thoughts on a system that treated magic (or even alchemy) as pseudo-chemistry? Obviously this would have base magics and elements represented in periodic tables of sorts. With similar rules on combining elements like in real chemistry. I'm wondering the amount of memory or strain on a console for such a magic system. Obviously the amount of combinations would be huge and there would have to be some sort of algorithm to do the combining for the player.

Would anyone here be for a magic system that worked similiar to chemistry?

##### Share on other sites
Absolutely. Compositional based magic systems (whether you do it with atoms or actions or what-have-you) are incredibly immersive and interesting. On a side-note, I keeping meaning to write a post about something similar but keep getting sidetracked.

As for the issue of storage, it depends on what exactly you're looking to do. Frankly, for the most part I don't see much of an issue, especially if your system simply boils to:

E[sub]a[/sub] + E[sub]b[/sub] + E[sub]c[/sub] + ... + E[sub]n[/sub] = Spell

which means that your game actually only revolves around the end-products. End products contain all the functionality and, realistically, the elements usually only figure in as static numeric multipliers. So, technically, they're the only ones you need to store and can do some petty optimizations to "work backward" to get the formulas you need to produce them. Hashes, special ids, whatever. The end result is that your "elements" are nothing more than GUI fodder.

Of course, if you're looking at wholesale spell creation I guarantee you'll run out of valid spell ideas (e.g. ones you can balance) long before you hit any kind of computational roadblock.

A more interesting system is one where each element plays some role in altering the functionality of the spell in question. For instance, let Fire "light objects on fire" (duh!), Lightning "fry the target with electricity", and Chaos (X-Men to the rescue!) "make things really confused". For added craziness, let's say that the position of each element affects their overall contribution. So you'd get something like:

Fire + Lightning + Chaos = Target is on fire, electrocuted, and confused ... with emphasis given to being on fire.
Lightning + Fire + Chaos = Target is electrocuted, on fire, and confused ... with emphasis given to being a living lightning rod.
Chaos + Lightning + Fire = Target is confused, electrocuted, and on fire ... with emphasis on being confused to the point of not being aware that they are also on fire (and electrocuted).

which presents a more complex combinational problem. In this pattern, each element represents some kind of functionality. I find this more interesting because the spells are defined by the elements, not the other way around. As such, you need to traverse each element's combination path and apply each effect separately. The result of a path from A -> B != that same path from B -> A which is not true in the original example because the elements don't actually impact the end product in any meaningful way, even if order matters.

That said, aside from the obvious balance issues, I imagine the main "strain" on a console with any such system would be presentation. Consoles are terrible at choice selection and while you can sidestep the creation issue by being obtuse ("You should take your time at the Alchemy Lab painfully selecting each element by controller/hand and combining them intelligently!") you'd need an extremely fluid and intuitive system to allow for the player to quickly choose from the huge assortment of possible "spells" (or whatever you'd like to call them) that would be the result.

Another possible solution, since you did not specify game play, is to do something similar to Magicka (XNA) and abuse the possibilities of multiplayer; thereby cutting a given player's total spell choices without losing gameplay as the magic components are added interactions via players.

##### Share on other sites
Hidden
Doesn't macgicka use something similar to that with their insane amount of combinations? Although you end up using just a few most powerful of those, but the idea is there, you could look into it if you haven't for some inspiration.

##### Link to post
The are many possible ways of doing spells like that. It really depends on what you want to achieve it.

Just a quick summary of my own thoughts.

- One is the obvious solution Magicka has chosen ( or DotAs Invoker).
- I also like the idea of more complicated spells you "brew" during longer preperation periods but use them sparingly to help in certain situations your normal reportaire wont help you.
- The Idea of a Magic Language. For this you can take Ultima Online as an example. It uses Syllables of a certain imaginery language for casting. You can actually type them in to achieve the effect.
- Creating your own spells and "equiping" them in an RPG-esque system.

Those that I mentioned second and fourth would probably be the best if you want your magic to be some kind of accurate science,as doing that within combat might prove unpractical.

##### Share on other sites
An UI that just masks spells behind a text strings or equivalent is largely just an inconvenience. Keeping it simple, it might be able to add some color in the game. I recall in Dungeon Master you found runes and combined runes you know to cast (predefined) spells. If you can find runes out-of-order, this leads to a potentially very complex spell progression, but at the same time its logic is very natural to the player.

Auto-generating the actual spells seems really difficult, leading to a large mass of useless and/or nondescript spells and possibly some broken ones. In any case the flavor and color achievable with designed spells won't be there. Most likely the players will stick to the best spell they "know".

I had a game idea where learning/figuring out magic is the core of the game. But if there is a fixed, nailed-down system, that game is playable exactly once.
So I figure the game would have to auto-generate at least somewhat different magic systems (difficult, because they must not be badly broken). Most likely I'd have a bunch of designed spells that take additional inputs, and what is auto-generated is the logic connecting the inputs to these spells.
Another requirement is that experimenting with magic must come at a price, otherwise it's just boring trial and error until the player finds the "optimal" stuff. This is achieved by having some inputs be consumable ingredients, making the magic partly dependent on environment (place, time of day, etc.), and some strong negative effects from "mishandled" magic.

##### Share on other sites
What about a magic system where you can create spells by placing out certain "orbs" over a board. Depending on how you place them, you will get a response from which you deduct how the spell will be. More orbs will enable you to make better spells (can tweak response more to your liking).

I'm a bit vague. I'm basing this off pole zero placement in the z-domain to create a filter (used in digital signal processing). You get a magnitude response and a phase response. You could replace poles and zeroes with some shiny magical orbs, and use the response to decide spell effects you end up with. It could be made very graphical to the user. The math behind this is a bit complex though.
Is this completely alien?

##### Share on other sites
Your idea sounds like the skill/level concept in FF (10 i think). It's not alien, but not really what I'm going for. I'm wanting players to create spells by mixing and matching. Then when they "reach the limit" start adding the spells (combo or base) to runes, weapons, or regular objects. Spells you can't get from combining you may be able to get "artificially" by combining them to other objects.

Now that I've read you post a second time. That is an interesting way to go about it. Though I have no idea about DSP. But have a far better understanding of chemistry, hence the approach.

##### Share on other sites
Something to consider is making it in two parts:

First a 'form', 'concept', 'thought', or whatever you come up with to call it. This is basically the shape and method of delivery for the spell. You can use it to define the shape/area of effect. Combining a thought of motion with a ball gets you something that shoots out and strikes a single target. Combining it with a thought of size can let you change from a precision dart to strike through the heart of a villain up to something to crush an entire village under.

Second, a substance, element, or whatever you choose to call it. Basically the meat of the spell, the power behind it. Combining your different basic elements, fire, water, energy, physical force, whatever, to provide the actual effect of the spell.

Thoughts like lines in different patterns around a target could be combined with a 'physical force/solid material' to produce a cage to hold targets in, Or changed slightly produce a protective shield/box for you to hide in. Swap the physical for fire, and it becomes a wall of flame your enemies have to move through to get to you.

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
14
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633736
• Total Posts
3013603
×