Advertisement

Spellcasting system

Started by July 17, 2003 02:28 PM
35 comments, last by Platinum314 21 years, 5 months ago
I am designing a game where the player is a spellcaster. The big twist is that hardly any of the spells are built in, only the simplist ones. The main idea is that the player can create new spells with some sort of magic language. New spells are made out of other spells. The problem I have is that so far it looks like a programming language, and is quite complicated. Things I want in the system are Spells can cast other spells (Function calls) Spells can have parameters (numbers, direction, other spells) Spells that can do damage, heal, protect, teleport, etc. Problems I have so far Uncontrolled infinite loops Uncontrolled recursion Fixing the above problems but in the process severely limiting things that I do want. I don''t have a good system to make more powerful spells harder to cast, or require more magic or something. A short spell may be far more effective than a long spell, but how am I supposed to make the computer know the shorter spell is better? Making a system that is better looking than Fireball(a,r) { Arrow(a)->Explode(r)->Fire; } Arrow(a) { Rotate(a); while(!touch()) { Forward(); } cast; } Any suggestions or ideas?
The sentence below is true.The sentence above is false.And by the way, this sentence only exists when you are reading it.
How do they make the spells, in game out of game?


Magic language? That to me is kind of in game - like combining odd words to make a new spell or something.

AfroFire | Brin"The only thing that interferes with my learning is my education."-Albert Einstein
Advertisement
I was thinking in-game. Your character can make a spell, and then another one using that one in-game. I was also thinking of a player able to use spells they find in spellbooks/scrolls or something.
The sentence below is true.The sentence above is false.And by the way, this sentence only exists when you are reading it.
wow, this is an interesting idea, for sure. as always, new ideas come with new problems. sorry, but i can''t really help you much because i haven''t done any scripting (but planning to do Lua later on) yet, nor do i have suggestions. =[ however, i wish u luck... just think hard, don''t give up, and in the end you''ll come up with something good.

---
shurcool
wwdev
ok, i''m going to be not so completely useless and try to help you.

first thing you should do is write down a number of spells you''d want to be possible in your system. because i don''t play much rpg/whatever games, i can''t really think of many... =\ but from what i know, aren''t most spells just simple things that to stuff to people, except some special ones (like opening a portal, etc.)? u gotta think of something that would make these complicated spells effective.

one thing i can think of right now are combos. for example, say if u just freeze your opponent, and then have a giant explosion right nearby, that should do extra damage (i''m thinking of solids, how they break down when u first heat them up, and then rapidly cool ''em).

because, like i said, most spells that i know of are simple do-just-one-thing spells, like freeze, fireball, poison, anti-poison, extra-strength, etc.

you just need to throw some ideas around and see what u can come up with.

hope this helps,
shurcooL

---
shurcool
wwdev
Okay first off good idea adds lots of fun, Now heres the thing you don''t want players programming thats no fun at all for the majority of people out there

Instead use a linking system. You have you base spell of Rune and you link other Runes to it, combining there effects into a new spell.

Example:
Arrow Rune + Fire Rune + Blast Rune
Creates a flaming arrow that explodes on impact.

To get spell that cast other spells use a combination rune

Example:
Arrow rune + (Blast Rune->Combination Rune->Teleport)
Creates a magic arrow that teleports the target on impact.


Advertisement
i think i get what your saying. this is how i would go about it. Grab the spell text, split it up however you chose. Check the spell words to see if the are modifiers, like Cha would increase the power x10 or whatever. Next go through and combine other words with a function. As for a targets, do clicks or make em type the name. Im sure no one wants to type in the name everytime they cast a spell.

Higher Forces
Squaresoft made a game that was never released in american specifically because of it''s magic system. You had to hook up a keyboard to the SNES, and type the name of the spell you wanted to cast. Now, here''s the trick, it had six characters, and hundreds of Kana symbols, leading to a couple of million spells. Most didn''t work, or the effects were odd.

Rather then produce a programming language for spell casting, why not try something similiar. You could also take the basic key words and weight each one with an MP cost. Then, adding together words eats up MP. Your fire arrow attack thing,

FIRE ARROW DOUBLE
5mp + 2mp + 10mp = 17mp for a long distance fire attack that hits twice.
william bubel
An idea that I had had for a system similar to this was a series of concentric circles. Each circle had a number of runes that could be unlocked, and you gained one rune per level, and based on your level and other runes you had unlocked you could only unlock those runes.

Spells are composed by linking the runes on these rings, and each ring represents a different aspect of the spell.

Each rune would have specific requirements to use, some requiring only Magic Points, some requiring Reagents.

Certain runes could not be linked to other runes and if you tried they would create backfires which would create random chains affecting random targets. If you ran out of magic points, or the random chain hit a rune you couldn''t use, or reagents were required that you didn''t have different effects could happen.

Add to this the ability to have contingent rings, for example, once you select a ring you can choose to have the next ring implement a new ring set, you get very complex combinations becoming available. You can also avoid recursion this way by blocking runes used on the parent ringset from being used in the child ringset.

Center - Type - {Offensive, Defensive, Effect}
Ring 1 - Target - {Caster, Ally, Enemy, All}
Ring 2 - Range - {Touch, Short Range, Long Range, Small Area, Large Area, Small Area from long range, Large Area from long range}
Ring 3 - Duration - {Instant, Long effect, short effect, permanent}
Ring 4 - Effect - {Various effects the spell can implement}


By programming each rune to effect workable modifiers that can be applied to each set in the previous ring you can make every chain generate a useable, if not necessarily useful spell.

You could also implement inventory items such as scrolls and spellbooks where as each spell is created it can be recorded for future use.

This is just an idea that I had, and came well before my programming skills had matured to the point where I could implement it. It was inspired by those little spinning charts with concentric rings that you can select one area to be visible.
Wow, that sounds like a great idea! I''ve been thinking about how to make RPGs more interesting lately, and I was just thinking about how to make magic more interesting. This is a great idea! I think it needs a little bit of work for it to work well, but it sounds like a great idea. You could write the "code" down on a scroll, and then perform some magic "compile and link" spell to see if you can perform it at your level in your profession.
[email=dumass@poppet.com]dumass@poppet.com[/email]

This topic is closed to new replies.

Advertisement