This blog post is also published at nethack4.org.

Wand balance in NetHack

Tags: nethack roguelike balance design items | Written by Alex Smith, 2013-09-25

Many NetHack variants aim to improve the game's balance; although NetHack 4 intentionally stays quite close to NetHack 3.4.3, variants such as SporkHack, UnNetHack, and DynaHack aim to (among other things) improve the game via removing "broken" effects. There are two ways in which a game element is typically considered to be broken: either it can be abused by the player in order to remove much of the challenge of the game, or else it can lead to near-unavoidable deaths that the player feels were unfair. As such, variants often remove or strongly reduce the power of ("nerf") game elements such as engraving "Elbereth", wishes, or deadly poison.

Part of my goal with AceHack (which has carried on into NetHack 4; NitroHack had a similar philosophy) was to fight against this tendency, at least to some extent. I am not opposed to the idea of making the game more balanced (it seriously needs it, after all), but I feel that more care is required than is typically used. There are two problems that can end up plaguing variants that are too hasty with their balance fixes:

There's one other problem with the typical method of balancing NetHack variants, though: it can lead to a complete failure to notice actual major balance problems with the game, because they don't fall into the "unavoidable instadeath" nor "exploitable by the player" category, and thus don't come to mind immediately to variant developers.

Identifying the problem

I'd like to talk about what I feel is the single biggest balance issue with NetHack at the moment: wands (or more specifically, attack wands). The issue is that in the early-game, they do unfair and unavoidable damage to the player, and in the late game, they're completely ignorable when used against the player, and mostly useless when used by the player (except for utility wands, and wands of death).

Let's consider the early-game situation first. The infamous deadly poisoned spiked pit is the most famous (and most discussed) example of a completely unavoidable instadeath, but even that can be avoided by playing a Barbarian. Dying to a random intelligent monster with an attack wand is usually avoidable, but only with a large amount of effort and a rather unfun playstyle (for instance, running away from every intelligent monster you see until you have reflection). It's also probably the most common cause of YAADs ("Yet Another Annoying Death"s); the Gnome With The Wand Of Death has reached somewhat meme-like status (even though other wands, like lightning, are more dangerous due to being more commonly generated). The Gnome in question was also an occasionally recurring character on Dudley's Dungeon, until it eventually ran out of charges.

The standard technique, then, for avoiding a death to wands, is to avoid intelligent monsters, and/or to get reflection as fast as possible. Avoiding intelligent monsters is definitely possible for a while (certainly long enough to reach Sokoban, with its 50% chance of reflection); it's also one of the reasons dwarf Valkyries tend to do so well (most early-game intelligent monsters are peaceful to them). The reflection option is what it normally comes down to, though; to give an idea of how important it is, reflection is mostly useless except against wand zaps and monster breath, and yet most players consider it the number one most important extrinsic to get (with silver dragon scale mail being the generally agreed-upon best early game wish).

I argue that the power of wands in monster hands early is indirectly responsible for a lot of knock-on problems in the game. The fact that it blows the value of reflection out of the water means that players will typically become immune to other reflectable attacks too; for instance, dragons are rarely a threat in NetHack, because their breath does nothing to most players, because the players will already have reflection. (And in a game based on Dungeons & Dragons, having nonthreatening dragons seems like a huge flavour problem.) And unlike the other early-game-instadeath-preventing property (poison resistance), there's not much a player can do to increase their chances of getting reflection apart from going to Sokoban, and/or trying to farm early wishes. I think the chance of an amulet of reflection is part of the reason that many players feel compelled to do Sokoban even if they dislike the branch; it was always intended to be optional (based on source code comments), but it doesn't act that way in practice.

In the late game, wands have the opposite problem; by the Castle (even before obtaining the wand of wishing), non-diving players will typically have most or all of the relevant resistances. In fact, a typical player around Castle depth will not really worry about being attacked by any wand short of death (and not even that if they have magic resistance); most of the wands used by monsters will either do nothing to them due to hitting an elemental resistance, or not do enough damage to really matter. I frequently play reflectionless as an unofficial conduct; so long as you bag items that might potentially take elemental damage, having reflection doesn't even matter late game except against black dragons (even if you've obtained disintegration resistance, you can't reasonably bag armour), because wands simply aren't dangerous any more.

Wands' weakness late game is also responsible for some of the tedium of Gehennom. Out of the four guaranteed demon lords and princes, two of them have wands as their main (i.e. most highly prioritised by the AI) attack. And what are wands of cold or fire or death going to do against a character that deep? Who almost certainly has both reflection, and the relevant elemental immunity? The main interest in those battles is trying to kill the enemies before their wands run out of charges, so that you get better loot, because surviving that long is basically guaranteed. (Of course, Gehennom has lots of other problems too. But one of the main ones is that most enemy monster attacks are either likely to be 100% resisted, or else don't damage the character faster than they can regenerate.)

Finally, wands (except death) are kind-of useless for attacking in player hands late-game, too (unlike early game, where they serve as a decent escape item); given that they have limited charges, they simply don't do enough damage to be worthwhile. They are often useful for utility purposes, though; destroying boulders, freezing water, digging out walls, and burning engravings are activities that don't get any more or less useful as the monsters and players get harder to kill. Thus, this issue is a relatively minor one.

Fixing the problem

All the problems with wands can be seen as a failure to scale. The nature of wands in NetHack at the moment is that they always do the same thing, no matter what stage of the game you're at; this makes them massively dangerous in the hands of monsters when the player character's HP and resistances are poor, and pointless when the resistances get better.

Making wands get better over time in the game seems to be the correct fix to this, therefore. Early-game, we need wands to be unable to one-shot even a weak player (while, preferably, still being usable by the player to one-shot monsters). However, they should still be dangerous to deal with; the optimum is that a player faced with a monster with an attack wand should be in trouble, but have a few turns to enact an escape plan (such as via killing the monster as quickly as possible, or finding a route with which to run away).

Reflection should still be important in the early-to-mid-game; less vitally important than before (because wands are weakened early on), but still worth trying to get. The obvious thing to do is to make reflection a mid-game extrinsic, useful for stopping wands in the early mid-game and dragon breath in the late mid-game, but to start becoming less important from then on. As such, reflection needs to stop working on wands after a while.

In the late-game, wands also need to have some method of dealing with elemental resistance, or they're going to be mostly pointless in monster hands. We don't want the player to be able to give a wand of cold to a Rider and happily block all the shots with their cold resistance (even if the wand pierces reflection).

There are two things we need to decide to make wands scale: what statistic do the wands scale on, and how does the wand's effect change as that statistic changes?

The standard statistics for scaling an effect over the course of the game in NetHack are experience level, and level difficulty (which gets harder as you go deeper, but doesn't get any easier on the ascension run, and thus is a better measure of progress through the game than simply using depth). Scaling on level difficulty doesn't really work flavourwise, for wands; it's good for things that are a property of the dungeon (especially "what monsters live here?"), but not for a property of items that can be moved from level to level. It also has the problem that it's symmetrical between monsters and players, whereas players should be better at using wands early. Meanwhile, experience level makes some sort of flavour sense, but its asymmetry goes in the wrong direction (monsters gain levels faster than the character does, and a level 1 character should be better with wands than a level 2 monster).

Ideally we'd want something that has a reasonable flavour justification for allowing a level 1 character to be better than an early game monster, and has discrete steps (so that there are clear cutoffs for when the wands start piercing reflection and/or resistance). Probably the best solution, both flavourwise and game-mechanically, is to add an extra skill to the game, 'wand use'. Then, the effect of a wand can depend on how skilled its user is. It doesn't take much justification to explain why an adventurer could start at Basic, with monsters such as gnomes and nymphs being Unskilled. There are some side benefits to this approach, too; it allows for increasing the differentiation between classes (the starting skill for wand use would be noticeable earlygame, and the skill cap noticeable late game if high-skill wands are powerful enough); and it allows for an obvious way to give effects to the beatitude of wands (with blessings acting like an extra skill rank, and curses taking one away).

This gives us six discrete ranks of wand effects (cursed + unskilled; unskilled; basic; skilled; expert; blessed + expert). The player starts at Basic, meaning that early game monsters should start at Unskilled. Endgame bosses should all be Expert; and thus Expert wands should be impressive enough that the player would want to keep them out of monster hands. In particular, Expert should not be stopped by resistance or reflection; Basic should be "how things currently work", leaving Skilled as the rank that pierces reflection. Unskilled wands need to avoid being able to one-shot even weak players. Of the two remaining ranks, cursed + Unskilled is an obvious combination to have something nasty happen to the user (probably simplest to implement it using the code for intentional wand breaking), and blessed + Expert is an appropriate combination for wand-using bosses (who can be given blessed wands in starting inventory), and should create truly impressive effects (not to mention, ones which are quite dangerous for the character to be caught in).

We also need to consider various implementations of piercing reflection. Simply ignoring the extrinsic is both boring, and not particularly transparent; ideally, variations in monster wand skill should be clear to the player, or they'll wonder why their reflection suddenly stopped working. (Piercing resistance is much easier to explain, with a message like "You partially resist."; resistance should still help against high-end wand zaps, it just shouldn't be an absolute defence.) The obvious way to show the different sort of wand zap is with a different animation; and the obvious choice for an animation that indicates reflection-piercing is an explosion. (I'm not quite sure what the best pattern would be; the obvious choices are either to make the wand zap explode on the first target like the fireball spell, or else to make the wand itself shoot out a sequence of explosions. I chose the first choice because it makes wands less useful at point-blank range, a tactical property that there isn't enough of in NetHack at the moment. This choice also makes reflection partially useful against wands; it prevents the character causing an explosion directly, but they can still be caught in the blast when the wand zap hits something else.) As a bonus, there's already precedent for magic changing area of effect shape between Basic and Skilled (fireball and cone of cold). As another bonus, there's a whole load of explosion animations in the tiles system that previous versions of NetHack never got a chance to use. ("Muddy" explosions seem just perfect for a wand of digging.)

In order to prevent Unskilled wands oneshotting weak characters, the best implementation is a damage cap scaling on max HP; that ensures that a full-health character cannot possibly die from one zap. The value suggested below is 2/5, or 40%, ensuring that even if a monster ambushes the character, the character (unless slower than the monster) will have two turns to escape.

Proposed wand effects

All cursed wands used by unskilled users explode upon use. Blessed wands act as if their user had one more skill level than they actually have; cursed wands as if they had one less skill level than they actually have. (This is why wand effects are listed up to Master level skill, even though the 'wand use' skill caps at Expert.)

Zapping wands downwards, or engraving with them, has the same effects as previously. Unlike previously, self-zaps of RAY-shaped wands are not special-cased; they have the same effect as if the character was hit by a bounce of the ray. (This is mostly because the previous inconsistencies didn't make sense.)

Some elements have special damage rules, e.g. cold does more damage to fire-resistant enemies; these won't be mentioned in this guide.

Skill caps

One requirement when adding a new skill to NetHack is to work out which roles should be able to do well at that skill, and which roles should be worse with it: the starting skills help to differentiate roles in the early game, and skill caps are the main differences lategame.

There are both flavour and gameplay considerations when assigning skill caps. For instance, Wizards (who have powerful spellcasting abilities of thir own lategame) don't really need a high wand use skill, but flavour considerations imply putting the cap at Expert. Luckily, a cap that high is not actually substantially different from putting the cap lower, because Wizards have such demand on their skill points as it is.

Wands are one of the few reliable escape items early (because they can be so easily identified, and kill or incapacitate early-game monsters), so it makes sense to give most roles Basic starting skill with wands, to be able to use them the same way that they do currently. (Wizards and Healers definitely need Basic skill because they have wands in starting inventory.) The question of starting skills, then, becomes a question of which roles (if any) should start at Unskilled. Of the melee basher roles, the obvious choice is the Barbarian; flavourwise, they distrust magic, and the role is one of the more powerful ones already. (This also helps differentiate them from the other melee roles; the Valkyrie role should be left with Basic wand use skill to help it with its job of helping new players get off the ground.) Of the other roles, the main role with a flavour and gameplay argument for a low starting skill is the Tourist, which is characterized by poor starting skills and items, but good caps. It would make an already hard role harder still, but for a role like the Tourist, that isn't necessarily a bad thing.

When assigning skill caps, most roles only have the choice of Skilled or Expert (having a skill start at Basic and also cap at Basic looks weird); Skilled is likely a better choice for the "default", leaving the Expert rank to the classes that can justify it. I suggest giving the Expert cap to Healer, Monk, Priest, Tourist, Wizard; Wizards for flavour, Tourists because the role defaults to good caps, and the other three because they're secondary spellcasting roles (and in particular, are decent with magic but less good with attack spells, meaning that wands fill in nicely). The other decision is the skill cap for Barbarians; Restricted and Basic are both reasonable. I mildly prefer Basic, at least partly to make players aware of the new skill, but can see arguments both ways.

Conclusions

I haven't yet implemented or played with these changes (and I'm not 100% sure they're a good idea yet; I wanted to put the suggestion out there for feedback). It should be reasonably uncontroversial that making reflection and resistances less absolute lategame is an improvement; having the possibility for enemies to use attacks that actually do something should make Gehennom less boring. The changes to the early-game should also be close to straight improvements over the previous situation.

It's interesting that NetHack variants mostly haven't made changes to how wands work, despite the glaring example of the wand-using bosses in Gehennom. Even if they don't adopt the fixes I recommend in this blog post, I hope they get people thinking about this sort of problem in general, where a game mechanic simply isn't working properly.

The general changes to wands made here could just as easily be applied to other sorts of zap, too. In particular, doing something similar to dragons (by creating another tier of dragons, say "elder dragons", which have exploding breath which pierces reflection and partially pierces resistance) could help make them scary again (although something else would have to be done about black dragons and their disintegration breath). That's something for the future, though.

I'd be interested to hear feedback on what people think of the idea of a wand use skill (both the general concept, and the specific details I suggest here). I'm not planning on implementing it immediately (my roguelike development time is currently devoted to NetHack 4 tiles), but if people like the idea enough, I'll try implementing it eventually (either in NetHack 4, or more likely first as a patch so that people can playtest it).