Sunday, 28 September 2008

Designing a Magic System - Part Eleven (Re: Choices)

(You'll probably want to read parts one, two, three, four, five, six, seven, eight, nine and ten before starting this).

So with the principles I've discussed in the first ten parts of this article, by combining elements with shapes to create unique array of attacks, and increasing damage balanced by using the exponential curve, was I able to resolve the design problems of Angband and create a compelling magic system for UnAngband?

I don't believe I've achieved this. Because not every spell effect is amenable to the same type of analysis that you can do with attacks. Take the example of Phase Door. Phase door teleports the player a short distance (10 grid squares on average), allowing the player to get distance between him and enemies attempting to reach melee range. But increasing the range doesn't make the spell more useful - because Phase Door has two distinct uses.

The first is escaping: and increasing the distance travelled by Phase Door usually benefits the player. The benefit is not guaranteed - you could potentially teleport into an unexplored section of the dungeon filled with monsters more dangerous that you currently face, but in general greater distance is better.

But the second function of Phase Door is tactical: to continue allowing you to use ranged attacks against nearby enemies without risking their more powerful melee attacks. In this circumstance, the limited range is ideal - tailored to the Angband 'average room size'. Increasing the range diminishes the likelihood of staying within ranged attack distance of the enemies, and so increasing the 'damage' of Phase Door (the range you are teleported) is of limited benefit.

So it seems that it is not possible to provide more choice for Phase Door alternatives: the spell is as useful as it possibly can be, and any spell which attempts to supplant Phase Door must offer the same two functions, or do one of them significantly better. If this is the case, e.g. Phase Door alternate A and Phase Door alternate B, the first which escapes better, and the second which provides a better tactical alternative, can both be learned, superseding Phase Door completely.

The same problem occurs with being able to learn multiple attack spells: we're just able to dodge the bullet by providing more elemental types and shapes, so that all the attack spells of the same tier are useful in some set of circumstances.

So what functions does a mage need in Angband? The following spells are available in the Angband mage's first spell book:

Detect Monsters
Light Area
Magic Missile
Phase Door
Cure Light Wounds
Find Hidden Traps/Doors
Stinking Cloud
Confuse Monster

Detect Monsters detects all monsters, with the exception of invisible ones and is critically useful for the starting mage. Light Area allows the mage to light up rooms and engage monsters at range. Cure Light Wounds provides low level healing, Find Hidden Traps and Doors helps protect the mage from traps, which can be deadly to them at low levels. Stinking Cloud is the second tier of attack spells that the mage gets access to.

I can suggest alternatives for each of these spells, but making the alternatives equally available renders the designs less distinct. Take Detect Monsters. Because it is not universal detection - it has one distinct drawback, I could equally propose a number of monster detection spells, each of which detects all but a class of monsters - living monsters but not undead, intelligent monsters but not mindless ones, spell using monsters but not warriors and so on. Unfortunately, by providing these alternatives to the starting mage, the drawbacks are mitigated. By learning two spells, the mage can cover the detection holes of a single spell, and so on - unless they are fighting an invisible, undead, mindless, spell caster of course. This means I am forced to make universal monster detection for the mage available immediately - even if it is my intention to force the mage to proceed cautiously due to the detection holes I've designed in.

I've picked this example deliberately, because there is a way of overcoming this problem, one that Sangband adopts (and from which I shamelessly borrowed the alternate detection magics). There is no design problem if there is a separate decision for the magic user, that allows them to only learn only one of the detection spells. If this is the case: say the mage is limited to one detection type, two first tier attack spells, one Phase Door alternative and so on, I can be as creative as I want to be with the spell designs, while being assured that the overall progression of spell acquisition will leave the mage with the appropriate weaknesses I want designed into each spell.

So what does this decision look like?

Well, I'm embarrassed to say, it looks a lot choosing a player class.

I could choose to explicitly force the player to choose for each category. 'What monsters do you detect?' when choosing the detection spell, and so on. However, this feels like exposing too much of the bones of the design, without achieving the consistent suspension of disbelief that I wanted in part one. So instead, I design a thematically consistent set of spells, wrap them up in a catchy moniker, and ensure that the design requirements are fulfilled for each set of spells I allow the player to choose from. And I don't have a good word for this other than a class (I call it a school, but this is a class by another name).

Using classes to delimit choice about magical spells is the best reason I can see for supporting a class design over a skill design system (or the classless, skill-less design I had previously advocated). Even Sangband (A contraction of Skills Angband) does this - surely an indication that the class based approach is necessary for providing alternative magic choices. Remember, I am talking about providing a framework for enabling interesting spell choices, and I am open to suggestions for alternatives. Angband's spell books are too easily swapped in and out- and to provide at the alternatives at the start of play means that they could all be purchased early; the process of learning spells needs to be made both more flexible and strict to be interesting (perhaps allowing less spells to be learnt, while allowing them to be flexibly forgotten, with some drawback to prevent instant re-specing); and I've worked through spell pre-requisites and exclusions enough to not believe that a talent tree approach has the flexibility to incorporate all the different magical effects I want to include. Are there other mechanics out there that I could take advantage of?

I'll talk in more detail about the UnAngband spell classes in part twelve. [Edit: Now more probably part thirteen - I digress slightly in the next part].


Christer Nyfält said...

There's two things that comes to my mind when I read this post.

1. You ignored Confuse Monster when you discussed the Angband mage's first spell book. I don't know why, but the fact that you did, highlight the fact that the confuse/slow/sleep/fear type spells doesn't work very well in *bands. It's nearly always a better idea to go for the direct damage spells. Have you any plans for those? Maybe in the next article?

2. As for your question about other mechanisms, you reject a talent tree approach but doesn't go into details. Have you considered a small class tree approach, where you pick a sub-class once you have reached a certain level? There's also the O/FA approach of specialties, which makes certain types of spells better without excluding any.

Mikolaj said...

An unrelated idea: have 2 variants of Phase Door and Teleport: one where you land on an explored square and one on unexplored. Fall back to current behaviour if no such squares in range. Such Phase Door is obviously much more useful than the standard one, without the micromanagment of fully targeted teleportation and with somewhat less predictable, but potentially more useful effect as Phase door along one of the 4 or 8 main directions.

Sabotage said...

For monster detection I might consider a much more severe limitation to the early player. Instead of spells that detect all but one type of monster, perhaps have spells that only detect one type. Detect undead, detect animal, detect intellect, etc... This would allow limitation by phasing in access as the player levels and require a player with all the spells to burn a fair amount of mana and turns if they want to detect all types. Later on more advacned "Multi-Detect" spells could be phased in.

Andrew Doull said...

Christer: Confuse Monster is sort of a tier two attack spell, but yes; you're right. It is almost always better to go for direct attack as opposed to status effects. I don't have a good answer for this - yet. I think part of the problem is psychological, on the part of the player, and part of the problem is that these status effects are all or nothing. It might be better to always confuse, regardless of the saving throw of the enemy, but determine the duration based on the save. I've gone part way towards that already...

2. Subclassing doesn't answer the questions that I raise here - as the examples I use are first level spells. Neither does specialisation (UnAngband currently has a specialisation system - different to the O/FA method).

Re Talent trees: The talent tree has to include all of the spell types you need for a mage (detection, escape etc.) in which case it just looks like a class. If you split these up, then it is possible to have worse and better talent tree combinations, so people will always pick the best one, or not get a good play experience, because they've picked a bad combination.

DarthCthulhu said...

Have you considered instead of classes just limiting the number of spells active at any one time? Sort of like a spell inventory.

For instance, let's say a wizard gets 3 + current level of spells to use. This means that a level one wizard will only have 4 active slots for spells. Given this, is it REALLY worth it to use up half of their possible spell slots on Detect-type spells, even if that would detect most creatures? The opportunity cost is huge. Using this sort of system makes having more spells allowing more flexibility, but not necessarily more power.

To make this work, you would need two things: a way to limit the spell-loadout changing and a way of determinating what kind of challenges one is likely to come up against in a specific dungeon. Lack the first, and rather than challenging, the spell-loadout becomes just annoying, lack the latter and people will just always choose the most generically useful spells they can (which is what typically happened in old D&D; who didn't go without Magic Missile and Grease?).

I think you can kill two birds with one stone here, though; make changing up the spell loadout requiring the use of a tavern room (the mage needs quiet and uninterrupted concentration time to memorize spells). Also in the tavern, the player can pump locals for information on nearby dungeons. It'd be really useful to find out, for instance, that the Dark Dungeon of Desire is overrun by vampires (time to memorize the Sun Grenade spell!) or that Death Dungeon has demons (Holy Light would be useful here!).

Dungeon preparation would be a) intelligence gathering, b) spell memorization, and c) buying items.

Antoine said...

I think a key way of differentiating between characters (in terms of available spells) is to put a lot of the interesting spells in dungeon-only books. (Or book-like items.)

Needless to say this is how I handle the issue in (classless) Ironband.

Another approach is to make spell selection dependent on stats. In Iron I differentiate between easy, low-mana spells (which will be used by all characters), difficult, low-mana spells (which will be used by characters with high Int), and easy, high-mana spells (which will be used by characters with high Wis).


Christer Nyfält said...

So, you meant to consider specifically the problem at with first level spells, instead of just using them as an example.

Well, the only new thing I can come up with here is a variant of darthcthulhu's suggestion, where instead of choosing spells, you have one inventory slot reserved for a first level book. So, you could only have one book of each level in use, but be able to switch them in town.

Jotaf said...

Darthcthulhu's suggestion seems pretty cool. Scarcity of resources (ie, limited choice of spells for a "mission") coupled with some random intelligence tidbits would make the player reason a bit before going in the creature's lair, which IMO, fits well with the character of a wizard-type. And you already have a ton of spells with different trade-offs, so there would be plenty to think about.

Talking about creature conditions like fear, sleep, etc. Here's the way I see it: They'd be really, REALLY useful to keep one (or more?) monster busy while you deal with the rest. I mean, that's the idea I get when I see a "sleep" spell.

The problem is with the effect's duration. If it fades away quickly it's not useful (as is the case most of the time, with most games). If it stays for too long, 1-on-1 it's an insta-kill on any tough monster, cuz you can just beat it to death while it just stands there.

I thought about a different mechanic for a crippling effect's duration, but it might be controversial because it's not exactly linear: the effect only stops when there aren't any other non-crippled monsters around.

So: *after* you dispatch all the other baddies, they wake up / snap out of it. Just like in the movies :) The idea is that it's very useful to reduce the number of monsters you have to deal with when fighting big groups, and they won't wake up mid-fight so you think "oh, THAT was a waste". A side effect is that they wont become death rays on solo monsters. (Maybe have a minimum duration too, for these cases.) I think this would address the complaints and create a nice niche for these spells...

Andrew Doull said...

Thanks for the feedback. Spell slots are just inventory slots by another name; so the idea of spell slots emphasises that I'm right on the class vs. skill debate :)

I'd really like a skill example which is as good or better than the class example but I can't think of one.

Christer Nyfält said...

Right, wrong, doesn't matter. What it's all about is the character able to know/be everything or not.

If you allow the character to learn everything then you have a class-less system, and if you restrict them, then you have classes in some way.

Talking about skills confuses the issue. After all ToME and Steam has both skills and classes, and Sang oaths could be seen as classes.

DarthCthulhu said...

As Christer said, the requirements for your limitations really restricts what sort of system is allowable.

If you'd be willing to completely junk the magic system completely and start over (which is a serious undertaking), a skill-based system would be possible. You could do something where each element (or school) of magic is governed by a particular skill. 'Spells', then, would just be using these schools in different combinations.

For instance, to make a fireball, you'd need the Fire school and the Wind school. The first supplies the actual damage, the second provides the shape (a projectile). All schools could have a damage (or effect) component and a shape component. How much damage (or how effective) a school is depends on the character's skill in that school, while range and other attributes of that nature would be covered by the skill in the shape school.

This doesn't limit the user in the way that you want, though, and unless there's a way to limit skill progression, then basically all characters will eventually become archmages in all schools.

Though it is an interesting idea, I think... there's a Primary school which determines what the spell -does-, a Secondary school which determines -how- it does it, and a potential Tertiary school which defines for how -long- the affect lasts. Spells are made by the user creating Rotes combining schools in different ways.

Andrew Doull said...

darthcthulhu: Um. That wouldn't work at all. See the parts where I talk about why you don't want to have the shapes the same for different element types.

Nick said...

Dungeon Master, a crawler for Atari (and later SNES) have a magic system somewhat similar to what darth is referring to. When casting, the player selects up to four runes, the first being the power level, which magnifies the mana cost of each additional rune and the overall effectiveness of the resulting spell. The next rune is the elemental influence, followed by the form, and finally the class alignment. The amount of runes in a spell seemed to indicate complexity more than power. Anyone with enough mana could cast a spell, and after continued use the player would gain the appropriate class-level (wizard or healer depending on the spell). There were only a handful of offensive spells, but each had it's own purpose and shape.

Also, the Elder Scrolls series uses a skill system where magic is divided into schools by function, and it's usage increases it's governing attribute (Intelligence with all schools but Illusion, where it was Personality). Once a spell was learned, derived spells could be purchase with sliding values like damage, range of effect and duration. Personally, I think that be available at cast time, depending on how long the spell is channeled or with selectable levels of power as in Dungeon Master.