On Life and Love

The Contortions of a Spell List

So I’ve been working on the next major release of the D20 Spell Lists app, and have found myself in a code and UI reorganization/refactoring jungle as I’ve refined my feature set and how I want to handle things.

One of the common-enough cases that the current version doesn’t handle well that I think needs to be is multiple spellcaster classes. If I’m a Druid 5/Bard 6, I’m going to want to keep separate spell lists, and will have different DCs, spells known, and spells per day to contend with. With the current version, the best solution is probably to have two different character files, each with its own spell lists.

My attempts to smooth that out have resulted in a lot of UI revisions as I tried to find good ways for displaying and updating all this info without slowing down the UI to uselessness (buh-bye, Table Layout Panel). Here’s what I’m sitting with now:

It’s not pretty, and there are more tweaks in the queue (like just putting the DCs/per days right with each class, probably), although for the moment it works well enough (read: stuff doesn’t end up hidden and inaccessible) that I can get functionality working again.

Like that 0 modifier for a Wisdom of 15. >_>

One of the silly aspects has been dealing with the fact that the character file format will have changed. Turns out that .NET is very forgiving in deserialization, and if there’s stuff it doesn’t recognize (like spells now being part of the character’s class, instead of the character as a whole), it just ignores it. No error, just missing info. So there are some manual checks there to rotate the data tree into what it needs to be.

Something I’m not looking forward to at all: printing. Getting one DataGridView to print was a pain in the ass and required a separate library (even Microsoft knew better than to hop into that cesspool). Getting several to print in sequence, along with appropriate per-class headings? That’s going to make me sad.