When I've modified various schools, I've often removed spells that have a wand or staff. Then the game would try to generate that wand or staff, and would crash because the spell for it didn't exist (thus "attempt to index a nil value").
This befuddled me, because I had figured that there was a single generic item type for a "Staff of Foo" or a "Wand of Bar" - like with spellbooks, with one of the item's traits determining exactly which spell it had in it. So it had to be some weird hardcoded stuff, right?
Nope. Turns out there is a separate item in k_info.txt for every type of wand or staff that can show up. So I had for instance removed the code for the Confuse spell, but Wands of Confuse were still on the item list, leading to crashes. Serves me right for my assumptions, I guess.
