Obligatory GitHub repository link.

Yesterday I made significant updates to the spellcasting portion of the character generator. Previously, I had written code necessary to automate spellbook generation. Monday I wrote functions to select Wizard spells based on specialty. Yesterday I combined character advancement stuff with spell selection to give wizards spells as they advance.

Which (among other things) really means I successfully connected two distinct bits of code that I wrote like, weeks apart. And without any significant issues! (Yay!)

Here’s a sample 20th-level spellbook:
[LEOMUNDS_TINY_HUT, CONE_OF_COLD, CHROMATIC_ORB, ASTRAL_PROJECTION, BLUR, FINGER_OF_DEATH, FIND_FAMILIAR, PHANTASMAL_FORCE, CHAIN_LIGHTNING, IMPRISONMENT, CONTINUAL_FLAME, CLONE, PROJECT_IMAGE, WITCH_BOLT, MELFS_ACID_ARROW, MAGE_ARMOR, BANISHMENT, LIGHTNING_BOLT, TIME_STOP, DEMIPLANE, FORCECAGE, STONESKIN, SUNBURST, PRISMATIC_WALL, PRISMATIC_SPRAY, BURNING_HANDS, FORESIGHT, UNSEEN_SERVANT, FIRE_SHIELD, ANIMATE_DEAD, OTILUKES_FREEZING_SPHERE, OTTOS_IRRESISTIBLE_DANCE, WEIRD, PHANTOM_STEED, TELEPATHY, FALSE_LIFE, WALL_OF_STONE, CIRCLE_OF_DEATH, OTILUKES_RESILIENT_SPHERE, THUNDERWAVE, METEOR_SWARM, LEGEND_LORE, WISH, CREATION]

Spells aren’t in alphabetical or spell-level order; they should be in the order of their hashes, since I’m storing spells as enumerated values in a Java HashSet. What this will let me do later is add a “spell effects” class that assigns an effect based on the enumerated spell (I won’t have to do THAT part over again).

I would post the sample output of a 20th-level wizard but I don’t have any of its other features implemented yet. Maybe later this week, we’ll see. The next step from here will probably be to implement cantrips, which I’ve set aside because they follow slightly different rules than regular spells.

Among other things, not all spellcasting classes get cantrips–nor do they get them at the same rate. Plus, at least one race receives a cantrip as a feature; which suggests to me that (at the very least) cantrips should be tracked separately.

One of the other tasks high on my priority list is assigning “average damage values” to spells so I can begin estimating spellcasting CR. Using the 5e CR estimator, spellcasters use the average damage of their most-damaging spell for “damage per round.” It might not be accurate for a round-by-round estimate, but it IS important to know if a given magic-user can one-shot your party.

Generally speaking, I would just set the minimum CR of a spellcaster to whatever the highest level spell they can cast is (so a 17th-level wizard would have a minimum CR 9), but I understand that there’s a system in place to estimate CR.

I’m excited. I mean, pretty soon I will reach a “data entry” part of the project, where all I’ll be doing is adding class features to level advancement. And then I can just automate the creation of characters up to 20th level. Just like that!

Now I don’t have plans to implement multiclassing because I think it’s mainly for “nerds” who like playing with their character more than they like actually playing the game, but some of the stuff I’ve coded so far is modular enough it probably wouldn’t be too difficult to add it. I don’t know what I’d do with it though, probably run some tests and create an algorithm, like any other part of the process.

Likewise, I have no plans to implement feats, but it isn’t inconceivable that I should add them. In a way they’d be like “classless features” that can be selected via algorithm in more or less the same fashion that ability score improvements or subclass features are chosen.