Mana++: A RPG Spell Creation Language

Started by
25 comments, last by Alpha_ProgDes 12 years, 4 months ago
Interesting idea. Can't say I'm a big fan though.

If I were going to do it and I was concerned about balance I'd borrow from the constraints programs face.

Let the caster have mana, focus, and power.

Mana is analogous to electricity. Just like a computer expends electricity to run programs, a caster expends mana to cast spells.
A computer has an inexhaustible (for the purposes of this discussion) supply of electricity, whereas a caster has a finite supply of mana.
When the caster expends all of his or her mana, he or she must restore that supply before he or she can cast anymore spells.
Just like severing the supply of electricity to a computer terminates running programs, exhausting the supply of mana can have effects on spells.
A spell effect could not be as effective, or it might not apply to as many targets as it was intended to.

Focus is analogous to RAM. Just like program data occupies memory, aspects of spells occupy varying amounts of a caster's focus.
A video player might store the chunk of video and audio it is playing in RAM. A spell's targets could occupy a caster's focus.
A spell targeting a large number of specific targets would occupy more focus than an area of effect spell.
A spell with a large number of effects would occupy more focus than a spell with a single effect
Since many spells will be instantaneous, let them occupy focus for a certain time after they are finished. (This might be analogous to garbage collection.)
Spells that remain active for a certain amount of time will occupy focus for that amount of time.
Attempting to cast a spell that would occupy more focus than available could have effects.
A spell that overflows might not apply to as many targets as it was intended to, apply to targets it wasn't intended to, or change the targets of other active spells.
Or it might not apply as many effects as it was intended to, apply effects it wasn't intended to, or change the effects of other active spells.

Power is analogous to CPU. CPU executes program instructions sequentially.
As long as the CPU can execute instructions fast enough, it can switch between each program and run each so it seems like they run at the same time.
But if the number of programs gets too high, the CPU either focuses on certain ones (meaning others slow down significantly) or spreads out its execution too thin (meaning all slow down less significantly).
Faster CPUs execute program instructions faster than slower CPUs.
Let aspects of the spell involve power. A spell with ten targets could require the caster to have ten power available to cast in a second, but if a caster had fifty power available maybe it could be cast instantly.
But if the caster had five power available, maybe it would take three seconds to cast.

Source or code consumes disk space.
Let spells occupy space in spell books.
A spell book can be wrote to once or many times.
If a spell book can be wrote to once, a caster may not add new spells to it if it is full.
If a spell book can be wrote to many times, a caster must select which spell to overwrite.
Let writing to a spell book consume a small amount of mana, occupy a small amount of focus for a fair amount of time, and require a small amount of power for a fair amount of time.
This will prevent casters from swapping spells in and out of a spell book as needed in the heat of the moment.

These three constraints can play a big part in the game, like class/character attributes and feats.
A high focus caster can cast tons of weaker spells.
A high power caster can cast a few powerful spells.
A high mana caster can cast any spell over time.

I'm tired, so I'm sorry if this kind of got jumbled at the end. Hope it helps.
Advertisement
What about function pointers, lambda expressions and closures?
I had an idea slightly similar to this, but without an actual language.

Players could have an interface where they can set the range, damage, 'mana' cost, etc. of their spells, and they only had a certain amount of 'points' to raise/lower certain things. For example, more range costs points, less mana costs points, more damage costs points, etc. and the other way around for lowering range and such.

This is generally how designers would go about balancing spells, though they wouldn't keep such vigorous track over the specific amount of points you'd have to pay to do so and so.

You could also have the player specify the type of spell (area damage per second, projectile, area nuke, direct 'targeted' nuke, and so on) from an enum and have the option of adding special effects (stun, poison, 'mana' drain, and so on) from a drop-down list. Adding these effects costs points, and the amount of points effects cost raises if the type is area of effect and how large the radius/area of effect actually is. For example, the stun time costs 5 points for each .05 seconds, an additional 10 points per 25 radius, and so on. It could also add to the mana cost of the spell.

I can imagine this would also be difficult to program, but probably easier than what you originally had in mind. It would probably be hard to balance, but with a good deal of thought it might actually turn out interesting and maybe even...fun.

[twitter]Casey_Hardman[/twitter]


I had an idea slightly similar to this, but without an actual language.

Players could have an interface where they can set the range, damage, 'mana' cost, etc. of their spells, and they only had a certain amount of 'points' to raise/lower certain things. For example, more range costs points, less mana costs points, more damage costs points, etc. and the other way around for lowering range and such.

This is generally how designers would go about balancing spells, though they wouldn't keep such vigorous track over the specific amount of points you'd have to pay to do so and so.

You could also have the player specify the type of spell (area damage per second, projectile, area nuke, direct 'targeted' nuke, and so on) from an enum and have the option of adding special effects (stun, poison, 'mana' drain, and so on) from a drop-down list. Adding these effects costs points, and the amount of points effects cost raises if the type is area of effect and how large the radius/area of effect actually is. For example, the stun time costs 5 points for each .05 seconds, an additional 10 points per 25 radius, and so on. It could also add to the mana cost of the spell.

I can imagine this would also be difficult to program, but probably easier than what you originally had in mind. It would probably be hard to balance, but with a good deal of thought it might actually turn out interesting and maybe even...fun.


It's more along the lines of the interface. And since it's geared towards programming: that means they're looking for something that based on problem solving, something that can solve "undefined" problems, and something that takes mastery/understanding.

so in otherwords a really hard design problem if you want to keep it "clean", simple, understandable, and have a low barrier to entry(with high curve).


[quote name='GHMP' timestamp='1320833191' post='4882057']
I had an idea slightly similar to this, but without an actual language.

Players could have an interface where they can set the range, damage, 'mana' cost, etc. of their spells, and they only had a certain amount of 'points' to raise/lower certain things. For example, more range costs points, less mana costs points, more damage costs points, etc. and the other way around for lowering range and such.

This is generally how designers would go about balancing spells, though they wouldn't keep such vigorous track over the specific amount of points you'd have to pay to do so and so.

You could also have the player specify the type of spell (area damage per second, projectile, area nuke, direct 'targeted' nuke, and so on) from an enum and have the option of adding special effects (stun, poison, 'mana' drain, and so on) from a drop-down list. Adding these effects costs points, and the amount of points effects cost raises if the type is area of effect and how large the radius/area of effect actually is. For example, the stun time costs 5 points for each .05 seconds, an additional 10 points per 25 radius, and so on. It could also add to the mana cost of the spell.

I can imagine this would also be difficult to program, but probably easier than what you originally had in mind. It would probably be hard to balance, but with a good deal of thought it might actually turn out interesting and maybe even...fun.


It's more along the lines of the interface. And since it's geared towards programming: that means they're looking for something that based on problem solving, something that can solve "undefined" problems, and something that takes mastery/understanding.

so in otherwords a really hard design problem if you want to keep it "clean", simple, understandable, and have a low barrier to entry(with high curve).


[/quote]

I am actually making a sort of spell creation language for my game although there is no programming involved.
Players find words of power all over the world. These words affect spell stats:
Type(elemental, healing, telekinesis, freezing, item buffs, etc)
Result(single target multi target aoe)
Range
Power
Mana
Duration

Players gather words from exploring ruins. They can make spells and sell grimoires that have the spells, but other players can't see the words. They can only use the pre-made spells.
They can sell or trade words to expand their repetoire. This allows wizards guilds who hoard their magic for members and such. It will be interesting to see how people utilize the system.
You could make a really simple visual script.



Spell-Whole package of everything in the spell. A spell is made at a spell making altar.
Power Words-Elemental, Healing, Buff, Debuff Power Words are memorized and then can be used on any spell.
Runes- Range, Targets, AoE Runes are used whenever you make a spell. You can use up to three different runes per spell.
Talisman- DoT quickness, Drain quickness,etc. Talismans are used whenever you make a spell. They decide if the spell drains health or just does DoT, or maybe just acts once.

An example spell would be like so(imagine it written on a scroll)

Fireball
pyro
[high range rune] [single target rune] [small AOE rune]
{Medium DOT talisman}

In this, pyro is the power word, Fireball is the spell name, things in brackets are runes, and the thing in curly braces is the talisman.
It doesn't look good written like that, so maybe I'll mock up a picture later.

The downside to this method is it doesn't allow for too much customization, no moving things, no bouncing off objects, no teleportation. These things probably could be added if there was another category for interactions, but then it would get more complicated.
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.

Beginner in Game Development?  Read here. And read here.

 

This topic is closed to new replies.

Advertisement