It’s finally time for spells to get the treatment and become a regular feature in Daggerfall Unity. I have decided to approach this feature-set in a more visual way than I did the quest system, which involved several months of back-end work before I could even show a single screenshot. This time around, I want the process to follow the visual diary approach from day one to make it more interesting to watch things unfold. This also helps me stay motivated as it’s a lot more fun to hurl around glowing balls of magical death than build a runtime compiler for the quest system.
There will be some more code-oriented articles later in the series, but for now let’s take a look at the front-end graphics of spell-casting animations and missiles.
Before I can do anything else, I have to implement the basic cast/recast loop. Thanks to Lypyl, a baseline spellbook interface is already in the game. It doesn’t have any actual spells yet, just some temp line items, but that’s all we need right now.
I wired up the spellbook to the “cast” key (default is Backspace) so player can select a spell from their collection. It doesn’t matter which “spell” you choose at this point. Just double-click any item to let the game know you’ve selected something.