Programmable Magic: How realistic is it?

General questions, debates, and rants about RPGs

Moderator: Moderators

Purple
NPC
Posts: 15
Joined: Sat Aug 29, 2009 6:37 am

Programmable Magic: How realistic is it?

Post by Purple »

I've always been fascinated by alternative magic systems, and it seems to me that the most fluid and flexible system possible would basically be to write down a magical 'program' of plain language terms, pretty much just saying what you want to happen, and then it happens.

So my question is, how possible is this to create? The way I see it, there are a few possible ways to go about it:

1) You could have a bunch of preprogrammed effects, pretty much like spells, and whenever you write something down the GM picks the most appropriate spell, scales it to your power level, and has it happen. This would be pretty easy to make, I guess, but the player would have very little control over what actually happens. To me that's a big downside, because the whole idea is to be able to do pretty much anything you want.

2) The other alternative I guess is to make an enormous vocabulary of nouns, verbs, adjectives and whatever and describe exactly what they do when used in a program and how they interact or modify other words you might pair them with. This seems like it would be a lot more customizable, but also a lot more work to write. It seems to me to be the better way to go about it, but it's got a few problems that I can see right away:

• A massive amount of work to create the system in the first place and try to guess what sorts of things people are going to want to do with the words so you can make sure that these effects are covered by the various interactions of the terms.

• It seems like it would be a nightmare to try and balance. Against pretty much any other kind of character. I mean, how do you even compare something like this to a melee character or even another more traditional spellcaster?

• I'm not sure how you would go about making this into a scalable power level for a levelled game like 3.5. Like it or not, DnD 3.5 is pretty much the most popular RPG there is, so if I end up making this system it's probably going to be for that system, which means it needs to be viable across 20 levels of play. The best thing I can think of for this is to either give out vocabular sparingly, including more powerful or versatile words as you get to higher levels (so that as you level up you get to write down more complex phrases) and/or make the words just more powerful as you level up. So when you write down BURN THINGS at first level it just deals less damage than it would at 20th level.

That's basically what I've got. Does anyone have any ideas how to go about writing this or even conceptualizing how it would work in play?
kzt
Knight-Baron
Posts: 919
Joined: Mon May 03, 2010 2:59 pm

Post by kzt »

User avatar
Archmage
Knight-Baron
Posts: 757
Joined: Wed Sep 16, 2009 11:05 pm

Post by Archmage »

This kind of thing is great for computer games, but it's practically unworkable for human brains without electronic assistance unless your goal is to drive people mad looking things up in tables.

Part of the problem is that if you have the ability to choose one adjective/noun from list X and another from list Y as the number of items in each list increases you wind up with an absolutely enormous number of potential combinations.

And the first system seriously sounds like Mage: the Ascension to me, or basically any other freeform spellcasting system with benchmarks ever.
P.C. Hodgell wrote:That which can be destroyed by the truth should be.
shadzar wrote:i think the apostrophe is an outdated idea such as is hyphenation.
Purple
NPC
Posts: 15
Joined: Sat Aug 29, 2009 6:37 am

Post by Purple »

Like I said, I like the second idea better IN THEORY, but as you described, I'm not sure it's workable in a pen and paper game. I have a feeling it would just lead to option paralysis for anyone. And of course there would be a lot of paperwork to keep track of what did what. Lots of tables and charts, and like you said, that slows the game down a ton.

One option for this kind of thing might be to prepare your phrases in advance, sort of like how a wizard prepares spells. That has its pros and cons too. On the one hand, as long as the player only has access to a small list of program spells he'll at least know what they do. And he'll also have done all the reading and table-checking before the game or whatever, and be ready to go in-game when he decides to write the spell.

On the other hand, it makes it impossible to use any kind of on-the-fly spellcasting, which is exactly the sort of thing that this sort of magic should be best at, because in theory you could write down any sentence you wanted which is appropriate at the moment.
K
King
Posts: 6487
Joined: Fri Mar 07, 2008 7:54 pm

Post by K »

The problem is that the more open-ended a system is, the more powerful it is for a creative person to abuse it even if you keep the numbers hard-coded to a range.

I mean, take a spell like Silent Image in DnD. For most people, it's a weak-ass spell, but a creative person can do some amazing things to your story by using it because it is so open-ended in it's potential uses when used by a creative player.
User avatar
CatharzGodfoot
King
Posts: 5668
Joined: Fri Mar 07, 2008 7:54 pm
Location: North Carolina

Post by CatharzGodfoot »

Can you give an example of a possible program?
The law in its majestic equality forbids the rich as well as the poor from stealing bread, begging and sleeping under bridges.
-Anatole France

Mount Flamethrower on rear
Drive in reverse
Win Game.

-Josh Kablack

Purple
NPC
Posts: 15
Joined: Sat Aug 29, 2009 6:37 am

Post by Purple »

Sure. The basic idea is that you could cause almost any kind of magical effect. Like if you wanted to imitate some magic stuff that already exists, you could have stuff like:

SHINE WHEN HELD that would be put on a rod so that when you held it it would light up like a torch.

OPEN GATE TO HELL might imitate a typical gate spell, at least as far as the planar travel is concerned.

BURN KOBOLDS IN CIRCLE WITH ACID AND FIRE would be a more specific sort of spell where you write the program, and when it's activated any kobolds inside of the given circle radius would be doused with acid and lit on fire.

Branching out of more conventional effects, depending on the level of complexity of the system you could have more complicated effects. Even something like LIVE AND FOLLOW ORDERS which might animate a corpse or even a construct and give you a servant.

So far I've got a few ideas for how it might work:

• I'm focusing on basically flavoring them as runes, which means that the default triggering mechanism is when they're read. But you should also be able to put other triggers on them, like for example EXPLODE WHEN STEPPED ON, so that you could lay traps for people to walk over. Or if you wrote the rune on a weapon you could have a trigger so that it went off when you attacked, like BLIND VICTIM so that anyone you stab is blinded too. Or if you wrote a rune on your armour, you could have DEFLECT ARROWS so that projectiles would veer away from you.

• As some sort of mechanism to control how many you could have active at a time, I'm thinking that you might have some kind of pool of points to put into these things when you write them. Then you walk away with the program written, and the energy points stay in it until it's set off by you or someone else, and then the points all come back to you so you can reuse them. So as you go up in level you get to have more active runes at a time.

• Tying in with that last point, you'd probably be able to decide how many points you wanted to put into a rune. For some, like energy damage, you might need to put lots of energy to do lots of direct damage. But for something like that torch program, you'd only need a little energy unless you wanted a bigger area illuminated. So as you go up in level you have a higher limit on how many points you can put into a rune too, which makes all the numeric variables scale up with it.
User avatar
CatharzGodfoot
King
Posts: 5668
Joined: Fri Mar 07, 2008 7:54 pm
Location: North Carolina

Post by CatharzGodfoot »

'Algorithm' might be a better word than 'program' in this case. Programming languages tend to have very concrete syntax and semantics.

Might a particular caster start out knowing burn, circle, and shine? Would that allow them to 'burn kobolds in circle', or would they need to know kobold too?
The law in its majestic equality forbids the rich as well as the poor from stealing bread, begging and sleeping under bridges.
-Anatole France

Mount Flamethrower on rear
Drive in reverse
Win Game.

-Josh Kablack

Purple
NPC
Posts: 15
Joined: Sat Aug 29, 2009 6:37 am

Post by Purple »

Well, if those were the only words they knew (and assuming they get basic grammar), then I imagine the best they could do would be to write burn in circle, since they don't have the vocabulary to specify kobolds. Of course, it would make more sense to have one rune for 'race', and specify what race you want when you write it down. But the whole point is that the more specific or creative you get with it, the more precise and unique your spells end up being.

But evocations are the easiest to do with this system, since it basically just pours damage into various holes. What I have no idea how to really create is a system that allows you to do other types of spells. Basically any verb you could write could do a dozen different things depending on how you write it, and I can't think of a way to put it in the game that wouldn't slow it to a crawl or be totally unmanagable when it's used.
User avatar
Maxus
Overlord
Posts: 7645
Joined: Fri Mar 07, 2008 7:54 pm

Post by Maxus »

Gordon R. Dickson's Dragon Knight books handled magic like this.

Magic effects were constructed kinda as a formula/sentence. So when the main character is accidentally in the form of a dragon, the "spell" which changea him back runs something like NOTSHAPE DRAGON --> ME.

Since a dragon wasn't his actual form is what got him "notshape". Hypothetically, there's also the "shape" command.

The better and more powerful mages could take into account more of the forces, and but someone with the know-how of basic science can take out someone technically more powerful.

When the hero was facing a far more experience wizard, he knocked the dude out by changing the water the guy had just drank with his dinner (the evil dude didn't drink alcohol at all) into cognac. Which took a bit to hit the dude's system and then the old wizard went to sleep.

If you want some reading on it, try 'em. The Dragon Knight is the second book (they're all more or less self-contained).

These're the books that inspired that Flight of Dragons animated movie.
Last edited by Maxus on Thu Oct 28, 2010 6:46 am, edited 2 times in total.
He jumps like a damned dragoon, and charges into battle fighting rather insane monsters with little more than his bare hands and rather nasty spell effects conjured up solely through knowledge and the local plantlife. He unerringly knows where his goal lies, he breathes underwater and is untroubled by space travel, seems to have no limits to his actual endurance and favors killing his enemies by driving both boots square into their skull. His agility is unmatched, and his strength legendary, able to fling about a turtle shell big enough to contain a man with enough force to barrel down a near endless path of unfortunates.

--The horror of Mario

Zak S, Zak Smith, Dndwithpornstars, Zak Sabbath. He is a terrible person and a hack at writing and art. His cultural contributions are less than Justin Bieber's, and he's a shitmuffin. Go go gadget Googlebomb!
User avatar
Murtak
Duke
Posts: 1577
Joined: Fri Mar 07, 2008 7:54 pm

Post by Murtak »

You could rip off (and expand on) the system used in the Death Gate computer game.

In that system you string together runes until you get a spell. A rune is a tile with some squiggly lines on it. At least one of those lines extends to the edge of the tile. You can string another rune onto it if you can get it to match up with the other rune's lines. So a rune of fire by itself would produce fire, with intensity depending on how much power you pour into it. A rune of fire chained to a rune of blast produces a fireblast. If you manage to tie of all lines of your rune construct the spell is permanent.

This way you avoid a lot of confusion, because it is entirely clear whether or not you can combine two pieces of magic. On the downside you have to make sure your initial rune design is spot on, or the entire system becomes garbled nonsense.
Murtak
User avatar
Maxus
Overlord
Posts: 7645
Joined: Fri Mar 07, 2008 7:54 pm

Post by Maxus »

Murtak wrote:You could rip off (and expand on) the system used in the Death Gate computer game..
And the one in Eternal Darkness.

I need to work on those runes for the Manual of Making Things, actually...I don't think I considered the "construct a magic sentence" thing like this.

It's an interesting idea.
He jumps like a damned dragoon, and charges into battle fighting rather insane monsters with little more than his bare hands and rather nasty spell effects conjured up solely through knowledge and the local plantlife. He unerringly knows where his goal lies, he breathes underwater and is untroubled by space travel, seems to have no limits to his actual endurance and favors killing his enemies by driving both boots square into their skull. His agility is unmatched, and his strength legendary, able to fling about a turtle shell big enough to contain a man with enough force to barrel down a near endless path of unfortunates.

--The horror of Mario

Zak S, Zak Smith, Dndwithpornstars, Zak Sabbath. He is a terrible person and a hack at writing and art. His cultural contributions are less than Justin Bieber's, and he's a shitmuffin. Go go gadget Googlebomb!
Username17
Serious Badass
Posts: 29894
Joined: Fri Mar 07, 2008 7:54 pm

Post by Username17 »

Ars Magica did this for spontaneous magic. There were a series of doggerel Latin-esque words that you could stick together and generate effects. So like "Creo + Ignem" would make some fire, so you could like attack someone with that or something. On the flip side, you might have "Muto + Ignem" which would transform fire, which you could probably use to transform where fire happens so that people burst into flames. Or you could use "Rego + Ignem" which would let you move fire around, so that it was for example on top of your enemies instead of wherever it was before.

The basic problem is that all three of those effects are pretty much indistinguishable. The fact that there are nominally word units making it up is pretty much completely meaningless, because context and interpretation are so important as to overwhelm all other factors. You're just playing freeform and kidding yourself that the inputs have meaning.

-Username17
Last edited by Username17 on Thu Oct 28, 2010 6:58 am, edited 1 time in total.
TavishArtair
Knight-Baron
Posts: 593
Joined: Fri Mar 07, 2008 7:54 pm

Post by TavishArtair »

I think for this case we could one-up Ars Magica by having words or pieces have a very specific meaning in this syntax, or rather a specific game mechanical effect.
Purple
NPC
Posts: 15
Joined: Sat Aug 29, 2009 6:37 am

Post by Purple »

I think that might be the best idea. I don't want to just have it be a bunch of premade spells since that defeats the whole idea. But having specific, defined, scalable effects that you can link together with certain words could definitely work. As Frank said, you don't want three different words that all mean and do the same thing.

So you might have the words 'fire', 'flame', 'heat' and 'blaze', but they all have a specific different effect when linked to from other words. That solves the problem of the one word that can be used in multiple ways. When 'door' and 'portal' are different nouns, you don't have to worry about what happens when someone tries to use OPEN PORTAL on a locked door, nor do you have to scramble when someone uses the DOOR rune to try to make a portal to the Abyss. Specific, defined abilities unique to each rune, but which can be combined together in interesting ways.
TavishArtair
Knight-Baron
Posts: 593
Joined: Fri Mar 07, 2008 7:54 pm

Post by TavishArtair »

Purple wrote:I think that might be the best idea. I don't want to just have it be a bunch of premade spells since that defeats the whole idea. But having specific, defined, scalable effects that you can link together with certain words could definitely work. As Frank said, you don't want three different words that all mean and do the same thing.

So you might have the words 'fire', 'flame', 'heat' and 'blaze', but they all have a specific different effect when linked to from other words. That solves the problem of the one word that can be used in multiple ways. When 'door' and 'portal' are different nouns, you don't have to worry about what happens when someone tries to use OPEN PORTAL on a locked door, nor do you have to scramble when someone uses the DOOR rune to try to make a portal to the Abyss. Specific, defined abilities unique to each rune, but which can be combined together in interesting ways.
Let's not be hasty.

I actually think defining all gateways which both permit and control travel from point A to B as subject to a single "door" noun might be a good thing to do. This way you can seal a conventional oaken door, an iron portcullis, and a mystical swirling portal with the same spell.

Note, however, that you should not conflate the mystic portal with the bending of spacetime that is obviously occurring, such that OPEN DOOR TO HELL should not even be a valid spell. Or, at best, it opens any doors that happen to lead to Hell in the area.

Actually generating a gateway to Hell would be something like CREATE DOOR, with possibly something like WARP FROM (LOCATION) TO (HELL), and then maybe an optional BIND WARP TO DOOR (if you want to use that as a syntax for making non-temporary teleport effects, for instance, so that now the door is a valid gate to Hell rather than just a door standing in the middle of things).

Also note that sealing the aforementioned door magically will not cause the warp to go away, you need a different spell for unravelling that. It will make things stop going through, though, obviously.
Last edited by TavishArtair on Thu Oct 28, 2010 8:40 am, edited 2 times in total.
User avatar
Vebyast
Knight-Baron
Posts: 801
Joined: Tue Mar 23, 2010 5:44 am

Post by Vebyast »

Ideas, which I'm just going to leave here because it's way past my bedtime. Disclaimer: imperative sentences are just because I don't have time to rephrase them as suggestions with good arguments.

You need resources. Under this system and with at-will casting, mageduels are rocket tag with ICBMs. The first person to get a sufficiently creative spell off wins, and since players are going to spend their entire time planning, every spell is going to be sufficiently creative.

If you have a mana system, have spells eat mana every time they're activated rather than every time they're cast. You can throw down a BURN CREATURE IN CIRCLE WITH FIRE, and it's a really powerful spell, but it's also going to stick around until you have time to dispel it, draining your mana every time something walks into the circle. Lots of persistent resource-drain-over-time effects means lots of thinking about future consequences of actions, which usually makes for interesting tactics.

This may be useful for when you start constructing your grammars: Backus-Naur Form. You absolutely need a formal definition of your language. English is insufficiently precise, and will only cause rules disputes. You need to create a formal language that simulates English well enough that people can intuit it, but which is sufficiently well-defined that hard rulings can be made.

You have two types of abilities: Grammar options and Words. Words are things like BURN, CIRCLE, and STONE. Grammar options are things like $NOUN_PHRASE IN $NOUN_PHRASE. You might be able to get words just by reading them out of books, but grammar options would probably be level-up abilities or equivalent.

Note on above: you could build different "classes" just by giving people different grammar options. A caster that can only use ON is so different from a caster that can only use IN that the two might as well not even be playing the same game, and they're both completely different from a caster that can only use WITH.
Last edited by Vebyast on Thu Oct 28, 2010 9:24 am, edited 1 time in total.
DSMatticus wrote:There are two things you can learn from the Gaming Den:
1) Good design practices.
2) How to be a zookeeper for hyper-intelligent shit-flinging apes.
Parthenon
Knight-Baron
Posts: 912
Joined: Sat Jan 24, 2009 6:07 pm

Post by Parthenon »

Heh. Haven't looked at Backus-Naur in years.

Anyway, this is all pretty stupid if using English since words can be both nouns and verbs, and since English is so very vague and mutable- players will be using 'phrases' which work in English then get pissed off if they don't work in the game.

This is like trying to create a parser for a text adventure game- frustrating and horrible to make, either completely broken or extremely limited to play.

Basically, English isn't really useful because there are too many synonyms and multiple meaning words, meaning that you can't have accurate terminology. However, not using English is retarded since people can't be bothered to learn a new language just for one campaign and there are way too many game terms- imagine a different rune for every status condition.

But since people do seem very interested, you want different costing "nouns" and "verbs" based on how vague they are- a DOOR may cost 10 while a PORTAL may cost 2 and GATE is 2, and OPEN is 8 while UNLOCK is 3 and CREATE is 5.

So if you want to open a locked door you might use UNLOCK GATE (5) I TOUCH (small), while to create a portal to hell you might have CREATE PORTAL (7) TO HELL (some) WHERE I'M POINTING (lots). To do either at your choice OPEN DOOR (18) I CHOOSE (lots) costs a whole lot more but is more open.
User avatar
hogarth
Prince
Posts: 4582
Joined: Wed May 27, 2009 1:00 pm
Location: Toronto

Post by hogarth »

Maxus wrote:
Murtak wrote:You could rip off (and expand on) the system used in the Death Gate computer game..
And the one in Eternal Darkness.
Or the one in the Ultima games.
UmaroVI
Journeyman
Posts: 116
Joined: Sat May 17, 2008 2:05 am

Post by UmaroVI »

You might get somewhere by taking HERO, giving everyone a VPP, and then assigning "power words" to powers, advantages, adders, etc. Then put a limitation on the VPP that says that you have to know the word for an effect you want. So maybe there's a "Magic Word" that means "Blast" and another that means "Armor Piercing" and if you cast "Armor Piercing Blast" you get a Blast with the Armor Piercing advantage.s
Parthenon
Knight-Baron
Posts: 912
Joined: Sat Jan 24, 2009 6:07 pm

Post by Parthenon »

I seem to have become compelled to think about this. The main thing that needs working out with this idea is the cost of the different Phrases-
  • Do you have mana and each Word costs an amount of mana?
  • Do you add up costs of the total Phrase and based on the cost decide on a spell level, getting Spells per day like the other casters? Do drawbacks reduce the cost? If so, how can you stop the Epic Spellcasting bullshit of adding lots of stupid negatives that don't affect the spell to make the cost nothing or negative?
  • Can you only have each word in effect once so you have to end each spell before the next? If so, can you learn the same word multiple times?
  • Is it a skill check like Truenaming?
And then theres questions like: Do you know and can use all the Words at any time or do you choose a number of Words per day?

The simplest EBNF I can think of (with example words) is:

Code: Select all

Phrase     = "verb" ["adverb"] "noun" ["alteration"] "target" ;
verb       = "CREATE" | "IMBUE" | "DEFINE" | "BURN" | "FREEZE" | ... ;
adverb     = "adverb" ["adverb"] | "EXPLODING" | ... ;
noun       = "DOOR" | "PORTAL" | "FIRE" | "FLIGHT" | "EXHAUSTION" | "PLACE" | ... ;
alteration = "alteration" ["alteration"] | "AS ALPHA" | "TO ALPHA" | "TO HELL" | "ONLY KOBOLDS" ... ;
target     = "I TOUCH" | "I POINT AT" | "ME" | "PLACE I JUST DEFINED" | "THIS CIRCLE" | ...;
[/size](The [ ] words are optional, the | separates different possible words, so ' "adverb" ["adverb"] ' means one or more adverbs in a row)

So, a Fireball Phrase would be "CREATE EXPLODING FIRE I THROW", Knock would be "UNLOCK GATE I TOUCH", Fly would be "IMBUE FLIGHT I TOUCH", Tensers Transformation might be "IMBUE FIGHTING ME", etc.

You could then draw out a circle on the floor and use "DEFINE PLACE AS ALPHA THIS CIRCLE", then later draw out a different circle and case "CREATE PORTAL TO ALPHA THIS CIRCLE" in order to teleport back to the original circle.

Vebyast's example might end up: "BURN CREATURE UNTIL MANA FADES THIS CIRCLE" for a prepared circle, or for creating an unprepared circle that burns you might have a higher level Target Word of "NEW CIRCLE" or something like that.

So, for example a 1st level Wordsmith would get two Verbs, three Nouns, one Alteration and two Targets from the 1st level Word list. Then, at level 3 they get access to the Adverb Words, and access to 2nd level Words.

And so on, letting them get more words, with the option of swapping out lower level words, using more than one Adverb or Alteration in one Phrase, etc. You'd also have level based effects, with damage based Phrases doing reasonable amounts of damage and the Target affecting DC and damage.

However I still see big problems with words that are Verbs and Nouns. For example POISON- you could have "POISON CREATURE I TOUCH", or "REMOVE POISON I TOUCH". While it may be simpler to allow the one word to apply to both, this is a shit idea because it allows the precedent of any Word being any part of the Phrase. It may have to be formed as "IMBUE POISON I TOUCH" which sort of works, but also allows "IMBUE EXPLODING POISON I TOUCH", which is a terrifying poison.
Last edited by Parthenon on Thu Oct 28, 2010 5:04 pm, edited 1 time in total.
User avatar
Vebyast
Knight-Baron
Posts: 801
Joined: Tue Mar 23, 2010 5:44 am

Post by Vebyast »

I think that the limit on uses should be with some form of mana, and that every word uses a particular amount of power. INCINERATE or DISINTEGRATE would be more powerful than BURN, for example, so they'd cost more to use in a sentence. If you also grant custom grammatical objects as abilities, then those would also cost mana. I don't really see any other ways to do it.

Vancian magic systems are a bit restrictive for this kind of system, especially when the magic is going to be the primary feature of the game. It would also be really difficult to come up with a simple way to assign spells levels to sentences.
I think that we'd have to do playtests to figure out if it's better as a skill check. Larger mana requirements for more powerful spells are big enough restriction.

I can see including some kind of overload mechanic, though. You can use a word that you can't actually pay for if you make a skill check, for example.
Availability of words is probably another playtest item.

Another option that I see is letting players use all of their words at will, but they can only have one instance of a word active at any given time. If you cast a BURN CREATURE IN NEW CIRCLE, for example, you can't use BURN, CREATURE, or NEW CIRCLE until the BURN CREATURE IN NEW CIRCLE wears out.
Hm. Here's what I came up with. It's more complex, and building parse trees for it is nasty, but it produces slightly better sentences and it's easier to extend. (note: { expression } is something that's repeated zero or more times).

Code: Select all

phrase        = <effect-phrase> <target-phrase>
effect-phrase = <verb-phrase> | <verb-phrase> <noun-phrase>
verb-phrase   = <verb> | <command> <verb>
noun-phrase   = <noun> | &#123; <adjective> &#125; <noun>
target-phrase = <relation> <noun-phrase>

verb          = "CREATE" | "IMBUE" | "DEFINE" | "BURN" | ...
command       = "QUICKLY" | "SLOWLY" | "REPEATEDLY" | ...
noun          = "DOOR" | "FIRE" | "KOBOLDS" | <place> | ...
adjective     = "BIG" | "SMALL" | "STRONG" | "LIVING" | ...
relation      = "ON" | "IN" | "NEAR" | "I POINT AT" | ...
For example, "REPEATEDLY CREATE HEALTH IN ME" (regeneration) is ((((repeatedly-command) (create-verb)) ((health-noun))) ((in-relation) ((me-noun)))), "UNTIL-MANA-FADES BURN CREATURE NEAR LINE" (wall of fire) is ((((until mana fades-command)(burn-verb))((creature-noun)))((near-relation)((line-noun)))).
I agree that language needs things like NEW CIRCLE versus THIS CIRCLE and THING-I-DEFINE. As your teleportation circle example demonstrates, it allows you to chain spells together to create effects with exponentially increasing complexity. You could pull off some seriously amazing stuff if you're creative enough.
Parthenon wrote:However I still see big problems with words that are Verbs and Nouns. For example POISON- you could have "POISON CREATURE I TOUCH", or "REMOVE POISON I TOUCH". While it may be simpler to allow the one word to apply to both, this is a shit idea because it allows the precedent of any Word being any part of the Phrase. It may have to be formed as "IMBUE POISON I TOUCH" which sort of works, but also allows "IMBUE EXPLODING POISON I TOUCH", which is a terrifying poison.
The solution here is to give those kinds of words separate entries for their different uses. For example, poison-noun and poison-verb are completely different words. It's easy to rationalize, too: poison-noun and poison-verb (for example) being the same word in English is just an accident of etymology. In High Eldritch Arcane, which evolved incredibly precise vocabulary and diction to prevent namers from blowing themselves up all the time, it's completely plausible that poison-noun and poison-verb are unrelated except by meaning.

Also, I totally want a spell that does "IMBUE EXPLODING POISON TO CREATURE".
Another thought: more powerful abilities could be entire production rules for the BNF rather than just new terminals. For example, the capstone for the speedtalker (a 15-level PRC) might be a definition like

Code: Select all

phrase = <phrase> and <phrase>
DSMatticus wrote:There are two things you can learn from the Gaming Den:
1) Good design practices.
2) How to be a zookeeper for hyper-intelligent shit-flinging apes.
Manxome
Knight-Baron
Posts: 977
Joined: Fri Mar 07, 2008 7:54 pm

Post by Manxome »

For this to work in any way other than magical tea party, you're talking about defining a programming language. That's certainly possible - lots of programming languages exist - but you'll be asking your players to learn a programming language and do programming in the game, so you should think seriously about whether you really want to ask that.

Assuming you do, I suggest that you define a series of data types for things that can be manipuated or targeted, and formalize each possible spell effect as a function that takes one or more arguments of certain defined types and then does something to them and/or "returns" data of a particular type.

For example, types might include:
  • Point (in space)
  • Volume (of space)
  • Creature
  • Object
  • Energy Type
  • Event
Some types may be subtypes of others. For example, you might decide that all creatures also count as objects, which means that any function that accepts an object also works on creatures, but not vice versa.

You also have some things that work on sets of a particular type. So charm takes an argument of type Creature, but mass charm takes an argument of type Set of (Creatures).

Then, the caster needs some way to select inputs of appropriate types. To that end, he acquires functions like:
  • Me(), which returns the creature casting the spell
  • TouchedObject(), which returns an object that the caster is currently touching
  • ViewedPoint(), which returns the point where the caster's eyes are currently focused
  • EnclosedDrawing(), which returns the volume enclosed by a shape that the caster has drawn, carved, or otherwise marked the borders of (yes, this ignores the third dimension; magic circles usually do)
  • LocationOfObject(object), which returns the point at the center of mass of the object that you pass in as an argument
  • SphereCenteredOn(point), which returns the volume defined by a sphere centered around the specified point
  • Fire(), which returns the energy type "fire"
To preserve sanity, several of these can probably mean several different things, and which one is selected depends on what the caster intends when he uses the spell. For example, TouchedObject() doesn't really uniquely define something, because you're probably touching tons of objects all the time (your clothes, the ground, the air, etc.), so you should probably actually let it affect one touched object of the caster's choice.

Then the caster needs a library of functions that actually cause physical manifestations and accomplish stuff. These might include:
  • EnergyBurst(energy type, point), which causes a manifestation of the specified energy type at the specified point. For example, EnergyBurst(Fire(), ViewedPoint()) creates fire whereever you're looking, or EnergyBurst(Positive(), LocationOfObject(Me())) generates a burst of positive energy centered on you.
  • ApplyForce(object, point), which applies force on an object in the direction of a specified point. For example, ApplyForce(TouchedObject(), ViewedPoint()) sends whatever you're touching flying towards whatever you're looking at.
Obviously, most effects could also potentially take a "how much?" parameter that defines how powerful it is, with higher power levels costing more mana or something.

Triggered/contingent spells can use some sort of When(event, function) metafunction that triggers the specified effect when the specified event occurs. You can have similar metafunctions for repetition, delays, etc.

You can try to write this out as pseudo-English instead of explicit functions (so "EnergyBurst(Positive(), LocationOfObject(Me()))" becomes something like "burst of positive energy at the location of me"), but I think that's just going to encourage misunderstanding without really making things any easier or more flexible. Real computer languages do stuff like that, of course, but the computer always transforms it into an explicit hierarchical structure before executing it, so if the spells are going to be interpreted by human beings, you're probably just creating more work for the players.


Even with only this cursory examination, a few observations suggest themselves to me:
  • You still need to explicitly define a fairly extensive list of spell effects. You can easily generalize things so that creating a fireball also gives you an iceball and a column of fire, and so that delayed blast fireball gives you delayed blast (anything you already have), but fireballs and telekinesis and teleportation and illusions and so forth are all fundamentally different effects, which can maybe share targeting and metamagic rules but each require completely independent support in the category of "functions that actually do stuff".
  • You're going to have all the standard problems of metamagic, where you need to anticipate the strongest possible use and then set the cost based on that, making everything weaker than the strongest possible use too expensive to be worth it and creating an exploit every time you fail to identify the strongest possible use.
  • Most of the interesting chaining options are going to require variables. For example, "when a creature enters this area, immolate that creature" requires that the creature reference in the second part is somehow known to be the same creature that was referenced in the first part. "In 5 rounds, create a bright light on the object I'm touching right now" requires that the object is determined now but then used in another effect 5 rounds later (lighting the object you're touching in 5 rounds would be a completely different spell). That's going to add a whole new layer of complexity.


My favoriate analogy for computer programming is that it's like bargaining with an evil genie: the computer will do exactly what you say, but if there is any possible way it can follow your instructions without achieving your goal, then you've failed. With computers, that's because it can't follow a vague instruction, rather than because it's applying malicious interpretation, but the required precision is the same. Though if your spells are going to be "executed" by the GM, your situation may actually be more like the evil genie.

So, imagine a game in which every spell you cast requires telling an evil genie what you want to have happen...
User avatar
Ice9
Duke
Posts: 1568
Joined: Fri Mar 07, 2008 7:54 pm

Post by Ice9 »

I think actually trying to define spells in programming syntax is overkill - and it doesn't really clarify things much beyond what a "sphere + benchmarks" setup would give you anyway.

For instance, let's take Charm Person. What exactly are you doing here?
ViewTarget().Mind.ApplyAssociation(FRIEND, Self) ?
EmitForce(Mental.Friendship(Self), ViewTarget()) ?
EmitElectricity(Pattern.MindControl.Friendship(Self), NervousSystem(ViewTarget())) ?


All the interfaces you're calling functions on are effectively arbitrary. You still have to decide how particular effects are created (many of which have numerous options), and what other parameters would be valid or invalid. For instance, instead of calling:
EmitForce(Mental.Friendship(Self), ViewTarget())
Could you call:
EmitForce(Mental.BrainDeath, ViewTarget())
And if so, how does that affect the difficulty of the spell?


Low-level magic without vaguely-defined external libraries (think assembly-language or BASIC) could be interesting, but it wouldn't be anything like the spells in any RPG I've seen, and probably not conducive to non-puzzle gameplay. See 'Core Wars' for an example of competing programs that are low-level enough to parse manually.
Last edited by Ice9 on Thu Oct 28, 2010 11:57 pm, edited 3 times in total.
Surgo
Duke
Posts: 1924
Joined: Fri Mar 07, 2008 7:54 pm

Post by Surgo »

I don't see why the phrase programming language got invoked. Types, or any equivalent mathematical concept, really shouldn't be necessary at all. What's wrong with just having a regular old context-free language?
Post Reply