Okay, can you give me an example of how that works in play? Because, it sounds to me like you just roll a die and randomly generate spell lists. Which, if you do that for everyone, you are still going to do it, but seems like it would really negatively impact spells known NPCs.
I mean, if you make a Lore Bard, and roll their cantrips and they get True Strike and Blade Ward... they are going to be a out of place. So, how do you handle this process?
So, there's a slight difference between how I'd do it in an adventure situation (ie, I'm making this NPC with their own goals and interests) and an exploration situation (the PCs go looking for something I haven't already created, and I figure out what they find).
In the first situation, I'd create a spell list that makes sense for the NPC and lets them do what I think they should be doing in the adventure context. I don't give them spells that are particularly good or bad against any particular PCs--my adventures are PC agnostic. The exception would be if we are dealing with NPCs who
know they are up against these particular PCs, and might have time to acquire spells for a spellbook (or find a scroll) that they know would be particularly useful against these PCs.
In the second situation, I'd also create a spell list that makes sense for the NPC, but since they don't have an explicit adventure context, more randomness is involved. I determine how many spells they should know based on the class they are (or are approximating if I use a simplified NPC statblock). I usually start by giving them spells I think are standbys. For instance, most wizards get
detect magic,
identify, and
mage armor, as well as
dispel magic if they are of the correct level, and probably a
fireball or
lightning bolt. Then I give them spells that make sense for them to have from an in-character perspective. I put myself in their place and think what spells I would seek out if I were them. This usually adds a few more spells to the list, but not too many. If we're dealing with a wizard, I usually give them more spells than the PHB does, to take account of the fact that they've probably added some to their spellbook. I determine this number randomly and arbitrarily, say by rolling a d8 for a 3rd level wizard in one situation for example. To fill out what spells the remaining ones are, I assume they know at least two of each level, and I randomly divide them amongst levels using whatever roll feels right at the time. For each spell, I give them a small (maybe 5% or less) chance of having it be from outside of the PHB. The rest of the time it's from the PHB. I open up a spreadsheet with all the 5e spells listed, and sort it by class and PHB/not PHB. I then just roll randomly with an equal chance of any spell on the list. Sometimes (particularly after I've already rolled a few), I roll 2 and choose 1. Now if I'm not dealing with a wizard, chances are there aren't going to be many (if any, depending on the level) random picks, because I've likely used up all their spells known by the time I've decided what this character's theme is and filled it out. So you aren't going to get that bard with useless cantrips unless they make sense for his character and not having a decent attack cantrip also makes sense. One of the cool things about the random rolls--especially in regards to spells in a wizard's spellbook beyond the ones he gains by leveling--is that it allows for spells that were acquired from found spellbooks or scrolls, rather than ones that were hand chosen. In that sense, it looks more like a PC's spellbook who likely runs across random spells in his adventures. Another cool thing is that it provides opportunities to insert spells that I just wouldn't ever choose on my own, but might create interesting situations.
I use similar random techniques to fill out the remaining spells in the first situation also.
Here's an actual example that works for both kinds of situations.
The 2e Planescape adventure "The Eternal Boundary" had an NPC mage named the Shadowknave. I didn't create the adventure, so the NPC already has his schtick and doesn't initially know anything about the PCs. His spell list is partly pre-chosen as in the first situation, and will partly be filled out as in the second situation.
The Shadowknave is a 6th-level mage, and it lists his memorized spells as:
change self, charm person, phantasmal force, sleep, invisibility, scare, feign death, and
slow.
Most of those spells go right into his spell book to start him out. However, neither
scare nor
feign death exist in 5e. XGtE includes
cause fear which is pretty close to
scare, so that goes in.
Feign death plays an important role in the adventure--except that there was a mistake in the design, because its description in the 2e PHB doesn't even allow it to do what the adventure thinks it does. So I just gave the Shadowknave a few doses of a poison that creates the desired effect instead.
A 6th-level wizard in 5e has at least 16 spells (at least 8 of which must be 1st-level) and 4 cantrips. I hand-picked his cantrips with a couple standby utilities and an attack spell. I picked a few standby 1st-level spells. I gave him
fear just to stick with the
scare theme, and
fireball because it's
fireball and you should have it unless you don't like fire. He doesn't have it prepared because he lives in Sigil and the big city isn't exactly the best place to be creating large explosions without attracting attention. I might have picked another one or two of the remaining ones that seemed on theme, and I randomly determined the last few using the method I described. I apparently decided he wasn't lucky or wealthy enough to have more than his minimum of 16. His spellbook ended up looking like this:
Cantrips: mage hand, minor illusion, prestidigitation, shocking grasp
1st Level: cause fear, charm person, detect magic, disguise self, false life, mage armor, shield, sleep
2nd Level: invisibility, levitate, phantasmal force, ray of enfeeblement, suggestion
3rd Level: fear, fireball, slow
For his prepared spells, in 5e he would be allowed one or two more than he had, so I gave them to him, although I don't remember which ones (likely
shield).
After we defeated him, this spellbook was a nice piece of loot for the party's then 3rd-level warrior-mage. Now, some of the spells (especially those standbys) he already had, but when he hits 5th-level he won't have to spend one of his automatic level up spells on
fireball.
Does that make sense?