Tales of the Rampant Coyote

Adventures in Indie Gaming!

Frayed Knights 2 Update: Cranking Spells Up To Eleven

Posted by Rampant Coyote on October 25, 2012

I wanted to run an idea off you. This kinda runs contrary to my talk about simplification, but not really. Technically, I’m already going down this path, but nothing is final. But now that it’s looking more and more feasible (and likely), I thought I’d solicit some input on the spell system – definitely one of the more challenging design aspects of the entire series.

Frayed Knights has a pretty frickin’ advanced spell system. So advanced and comprehensive that we barely scratched the surface of it even when we were pushing 200 base spells, not including their upgraded bretheren that the player could control.

I mean, there’s something like a couple dozen different effects, with tons of variations. I mean, even with the most basic effect – causing damage – you have several different kinds of damage, and then there’s instantaneous damage or damage over time. And then you can combine effects into combos within the same spell! I really did go overboard. In part, this was a reference to the extreme spell list from D&D and other games, but it was a little unwieldy. Players tended to stick with only a few spells for most of the time. The total spell list felt like an almost randomly assembled grab-bag assortment of spells, with only kinda vague notions of specializations within the four spellcasting categories.

So I sat down, and figured I’d have to cull things out and pare things down HARD for the new games. And do it without disrupting the legacy of the old game. Or changing the feel of it. This is a big challenge – I mean, how do I possibly parcel out the spells in a system that was designed to be so rich? Well, someone’s gotta do it. Someone has to make the hard calls – the designer. That’s why I get paid the big bucks.

Wait… no, no I do not!

Well, screw it then! Let’s let the computer do it instead, ‘k? And then the player can cull down the list to a usable subset! Hah! My work here is done!

And that’s where we’re sitting today. You know how Diablo-like games have random (procedural) generation of loot? How about procedural generation of spells?

Let’s provide a little more background here.  Here’s where we’re going with Frayed Knights 2: The _____ of _____.  Those of you who played the first one can nod sagaciously. The rest of you… well, you can just follow along, and watch me for the changes. Here goes:

#1 – Spellcasters (who can, as in the first game, be anybody, with the right feats) have two sets of spells: A spellbook, and an active spell list.  You can only cast spells from the active spell list, and it can only be changed outside of combat. The size of the active spell list is TBD, but it’s small enough to be hotkeyed for that character. We’re not sure yet if there’ll be a limit to the number of spells a player can have in their spellbook, but there probably will be a (large) limit, with the ability to delete non-core spells to make room for more.  Anyway – the upshot is this: You’ll need to be selective about spell choices, but you won’t have to wade through several layers of menus just to cast a common spell again.

#2 – The four spellcasting categories (Sorcerer, Nature, Divine, Profane) all have different specializations, strengths, and weaknesses. This was kinda-sorta present in FK1 as loose guidelines, but they are going to be more solidly coded in the sequels.  Each spellcasting category has certain effects that are its specialties, which really define the category (like straight-up healing for Divine casters, or direct damage for sorcerers). Then there are spells effects which are secondary to the class, and weaker than the specialties by level. Then there’s the tertiary spell effects which are pretty weak, but can do in a pinch. Finally, there are spell effects that are simply not available for that spellcasting category – like healing for sorcerers.

#3 – There are a few “core” spells for a spellcasting category that are automatically available. The “common” spells of FK1 would be like this. These can’t be erased from spellbooks, and technically you COULD win the game with these spells and nothing else, but you’d be making things a lot harder on yourself. Unlike FK1, these will be few and far behind. Don’t expect a new spell every level.

#4 – Then there are some “signature” spells for Frayed Knights which are custom, hand-built spells with unique effects or amusing visuals. These are generally not “core,” but aren’t hard to find. They are either plot-critical / utility spells (not sure if we’ll have these in game 2), or they’ll be deliberately overpowered but expensive to cast. Power Word: Defenestrate belongs here, but it will be slightly beefed up.  There will be others of similar amusing variations here. Some may even violate the usual specializations from point 1.

#5 – THIS IS THE BIG ONE – The game will provide lots of procedurally generated spells throughout the game. Some will be available in a shop, others can be found on scrolls throughout the game. Scrolls can be used to either scribe a spell in your spellbook, or cast directly. These will be random, so the exact spells available to you will be different with every game. Because of the fixed, custom spells from points 3 and 4, you won’t be left high-and-dry without any spells to fulfill a caster’s primary role, but you may have to make due with some interesting combinations you’ve found by chance.

So there you go: Prepare to drown in spells in Frayed Knights 2.

This isn’t a huge deviation from what I did in FK1, where I generated dozens and dozens of spells using a formula as a guide, and some rules-of-thumb for variation. Now, I just have to let the computer use the formula and rules-of-thumb to procedurally create the spells. And then there’s the naming.  Spell names should be interesting…  But anyway, the end result is that spells will act a little like weapons & armor in Diablo-style games. They’ll be more-or-less balanced, offer some occasionally weird mixes of combo-effects (a spell that does fire damage and puts you to sleep? I guess it could happen…), and may range from the broadly useful to the highly specific-use.  Hopefully it flies.

This has lots of impact on development. Items, enemy AI were all built around a fixed spell list in the past game. This not a huge change going forward, but the ripple effect is why I’ve been facing something of a chicken-and-egg problem with the new system. I’ve also been a little concern about a problem that did rear its ugly head in initial release of Frayed Knights: The Skull of S’makh-Daon, well-explained by Shamus Young yesterday about trusting the system. When there are too many moving parts, it can be really hard to find or fix problems – or, just as bad, to notice a difference when you do something interesting.  I’m trying to address this.  In some cases, it means reducing the number of moving parts. In other cases, it’s simply a matter of making those parts a little more visible.

Regardless, at least from a developer perspective – whether the procedurally generated spells thing fly or not as we get to playtesting, the moving parts that make up the spell system will be a lot cleaner and more visible to me as a developer. Re-thinking about them in this way has given me ideas for opening up the system from a developer perspective and doing automated testing.  This means cleaner code and better balance.

So, whaddaya think of this proposal? Like it? Hate it? Got suggestions for improvement?  Lemme know.

Filed Under: Design, Frayed Knights - Comments: 15 Comments to Read

  • Steven Fletcher said,

    Procedurally generated spells sound pretty cool.

  • Jonathan MacAlpine said,

    For enemy spells, maybe it would suffice to describe enemy casters as having a pool of “spell traits” that could be combined randomly when they’re generated?

    For example…

    Maybe you have a troll sorcerer who has a pool of spell traits that includes “Fire Damage over Time”, “Sleep”, and “AoE Physical Damage”. The first time you run into this creature, it casts two spells at you: Wildfire (AoE + fire over time) and “Sleep”. The next time you run into it, it casts two different spells: “Heroes Roasting On An Open Fire” (fire DoT + sleep) and “Earthquake” (AoE physical).

    In any event, I think the idea of procedurally generated spells is great. 🙂 My gut feeling is that the biggest challenge with *enemies* who have procedurally generated spells is that it can reduce the impact of the player’s game knowledge on the outcome of a battle — which doesn’t change anything for a novice player, but can either make things interesting or extremely frustrating for a veteran player.

  • getter77 said,

    I say go with it—the more vehicles of absolute pomp and swagger the game can develop to further distinguish it from the pack as the series continues, so much the better.

  • Maklak said,

    Well, if you are going to include procedurally generated spells, you might as well add a vendor who can create the spells you want for a price. This worked in Morrowind. Once you had a spell with an effect (say: instant damage with fire), you went to the mage guild and for a hefty price could get yourself a spell with a desired strength of that effect and the cost in mana and difficulty level were calculated for you. You could also combine effects into one spell, but the price was higher. It proved useful, for example near the beginning of the game I made myself a spell that opened every lock in the game for 60 mana and could simply ignore lockpicking.

  • Rampant Coyote said,

    Yeah, that’s part of what I meant when I said AI had dependent upon the fixed spell list. Also, when I created the spells by hand, I could add “hints” to the AI about how they were to be used. Mostly it was pretty straightforward – it only got really interesting in the case of spells that had a combination of effects.

    But the bigger concern is exactly that. As a fallback, I could have enemies fall back on only pre-defined spells. What I’m gravitating to now, however, is to have creatures with a standard spell-list plus one or two ‘bonus’ spells generated dynamically. So while you’ll be familiar with most of their tricks, they may have some surprised.

  • McTeddy said,

    Fine, I’ll be the odd man out. The idea isn’t quite for me.

    I’m not a big fan of diabo-esque procedurally generated things. As a development method its fine… but not as a hope an item you want drops. It always feels like slot machine designed to waste my time or a waste because I find one useful weapon early on and never care to change.

    For me, this would interfere with the idea of creating a character. Spell’s seem like the sort of thing that a spellcaster would consciously pick. I mean Lord Firus the Pyromancer chooses to study fire magic… he didn’t happen to find a single fire magic scroll and refuse to learn the rest.

    I’m more than happy to have the “Beefy Ice Shards of Vampire” mechanic, but I’d prefer it to still be choices rather than random finds. Maklak’s idea about buying what you want isn’t half bad, but I just see spells as a more personal thing than items.

  • Rampant Coyote said,

    McTeddy – you are the second person to suggest this, so you are not alone.

  • Michael Brough said,

    ok this is something I’ve thought about a bit in the past.

    Major con is: procedural content usually isn’t all that interesting. Games that use it well tend to do so by having other (handmade) systems that *are* interesting and interact with / interpret the procedural content, or by having the “procedure” be mostly shuffling up chunks of handmade content. (In roguelikes, spells are usually one such handmade system, interacting with the bland procedurality of the levels to end up with something interesting)

    So the likely outcome is: you end up with a bunch of spells that aren’t very interesting. Unless you spend a huge amount of time on the system (i.e. more than it would take to make the spells by hand) you’re probably looking at a bunch of statistical variations on some themes, rather than anything surprising and deep. A system for interesting procedural spells is definitely *possible* (and would be way cool, a major exciting selling point, something i’d love to see) but is liable to be way more work than anyone expects.

  • LateWhiteRabbit said,

    I have to throw my hat in with McTeddy and Michael Brough. While the concept is interesting from a programming and design standpoint, I don’t think it’s very good from a gameplay standpoint.

    I think you’re still arriving at the same problem a lot of us had with the spells in Frayed Knights 1, only you’re taking a different path to get there. It’s still spell overload without interesting choices to be made.

    In this context, I define “interesting choice” as not variety of choice, but a choice that has payoffs and foreseeable tactical implications. I think the “throw the whole spellbook at the player” approach isn’t as good a system as one that was easy to learn and experiment with, but difficult to master. Ideally, I think a magic system should be a lot like chess – easy for a beginner to pick up and learn what pieces do what (and they’re aren’t that many pieces), but learning how to use strategy with the pieces and counter and create tactics to win is very deep and difficult. A chess player has interesting choices to make when picking what piece to move in a given situation – all future moves can be charted in the head, and different preparations made for how the opponent is likely to react.

    More problems that I can see:
    1) Like McTeddy said, you can’t really “spec” or plan your magic-using character’s paths. With procedurally generated spells you are highly likely to end up with a gimped character build – what if you’ve picked traits for a certain school, and the only spells that pop up for that school of magic are weak sauce? Or what about the opposite situation – what if a very strong or particularly effective combination of spell pops up early in the game and the player can spec a magic-user to take advantage of it and steamroll the game?

    That’s a HUGE danger in games with procedurally generated loot – if you find a really great item or spell early on and go hours and hours with nothing better appearing to replace it, the game gets boring. (This has happened in Torchlight and Borderlands for me – one really good weapon early on that nothing could beat for hours. So looting became boring. And looting is the entire point….)

    If you try and fix this by “leveling” the procedurally generated loot lists, i.e. removing the chance of an uber drop from happening, you risk making looting equally boring again. There is no ‘pace’ to spell acquisition, only a roller coaster of occasional spikes in excitement, followed by long periods of increasing boredom.

    2) I think this would also compound a problem I had with the spells in Frayed Knights 1 – I had a hard time remembering what spells did. By that I mean, the names were funny and memorable, but sometimes the effects were not. There were so many spells, I couldn’t keep it straight which did what, so I tended to stick with a few “knowns”.

    I’m reminded of some of the D&D novels – most wizards in those books (in any fantasy novel really) had a small handful of spells they used over and over again for their entire careers. Why have a dozen fire spells when you have “Burning Hands” to set one guy on fire, and “Fireball” to set lots of people on fire?

    Sounds good on paper, but functionally the unintended side effects are likely to cause the same problems some player’s complained about with the spell system in Frayed Knights 1.

    P.S. What’s your obsession with giant spell lists, Jay? Did small spell lists steal your lunch money as a child?!

  • Brian 'Psychochild' Green said,

    I wasn’t terribly crazy about the idea when I first read it, but after thinking a bit I kinda like it. It’s not something that has been done before, as far as I know.

    I think the drawbacks people mention can be mitigated somewhat. Simplest solution would be to have some “core” spells that are pre-defined, then let additional spells be generated with this system. Or, as someone else mentioned, have an NPC that will sell you a customized spell for a lot of dough. That way if Flaming McFirePants wants his fire spells, he can go buy one. Swordy McStabbySkirt might be upset at all the cash being spent frivolously, though….

  • Rampant Coyote said,

    @LateWhiteRabbit – Actually, yeah, they kinda did. 🙂 Well, okay, more like… after years of juvenile gaming and seeing magic users as fireball & magic missile dispensers, I was schooled by several players who REALLY knew how to play their spellcasters. So I’m always trying to foster the opportunity for players to do just that.

    But I do recognize the fact that there are many players out there who really just want to play fireball & magic missile dispensers.

    @Brian – Yep, the core – points 2 and 3 – plus enhancement feats should be pretty sufficient for straightforward play through the game with a minimal spell list, right there. So all the procedurally generated spells would be gravy – but clever players should definitely be able to use them to their advantage.

  • Adorna said,

    I truely love this. Its a pet peeve of mine that magic in games isn’t the least bit magical but more “hand gun” like.
    I love how this will make each game and spell caster unique.

  • Albert1 said,

    I read once that the beta testers of a racing game were told that changing mechanical settings of cars was going to influence their behavior: after some races, they praised such a physical realism! Well, it was only in their mind: that piece of code wasn’t working at all! Placebo effect? So, why don’t you implement just a bunch of spells and randomly generate their names, I wouldn’t be surprised if players convice themselves that the “lighting bolt” is only similar but not the same as the “bolting light” 😉 After all, when I read, back in 2002, the Morrowind specs – 60000+ items – I thought: even if that’s not true, who’s counting?

  • Daniel King said,

    Random spells? No thanks, I’d prefer to keep Diablo randomness as far away from Frayed Knights as possible. What happens if you import a party, do you lose you fave spells?! 0_o

  • Xenovore said,

    Like Albert1 mentioned, does it really matter if 5,000 spells are hand-crafted (development time wasted), or auto-generated ( development time saved for more important things)?

    Also, some of you are completely missing the point that each spell class gets custom, hand-crafted core spells. Yeah, the auto-generated spells might suck, or they might rock, but they are secondary to the core spells. “Gravy” as Jay put it. Also, I expect that many “new” spells found will simply be upgrades to currently known spells. So, sell the ones you don’t want, save the better ones to cast directly from scrolls so you don’t spend the power, etc.

    Of course it will require some checks and balances; for one thing, I don’t expect spells to be popping out of every chest. People rail against “Diablo-style” loot generation, but even in Diablo (the first one anyway), you weren’t finding special items very often.

    At any rate, as nifty as it sounds to compare a spell system to chess or whatever, I’d much rather have a flexible system like this than be confined to a handful of pre-defined, static spells.