Birdoggydog's Builds

Replacing five classes with ten, each with one ability

Ten data-file classes with stat boosts and cost multipliers, an abilities script with every number in one table, a skill bar, and a save migration.

The five classes named for cuts of meat are gone, and ten are in their place: Berserker, Bone Knight, Cyber Mage, Deck Runner, Flesh Priest, Musician, Ninja, Samurai, Thief and Tub Wizard. Each one adds exactly 10 starting stat points, has its own cost multipliers, and has one special ability. Nobody has played these numbers yet, including me.

67 seconds, captioned: the ten classes in creation, on the character sheet and in play.

What does a class look like now?

Each class is a data file with five parts. stats is the starting boost, which sums to 10 with none over 5 and nothing lowered. costs.stats has a multiplier per stat on what a point costs to buy later, and the five sum to 5.00 for every class. Then come the skills the class comes with, an ability id and a never_learn list. A Thief looks like this:

"stats": {"muscle": 1, "tendons": 4, "fat": 0, "grey_matter": 2, "machine": 3},
"ability": "light_fingers",
"never_learn": ["chain", "plate", "shield"],
"costs": {"stats": {"muscle": {"multiplier": 1.1}, "tendons": {"multiplier": 0.85},
  "fat": {"multiplier": 1.1}, "grey_matter": {"multiplier": 1}, "machine": {"multiplier": 0.95}}}

The content loader checks the two new fields. An ability has to be a real one, and every never_learn entry has to be a real skill that the class neither comes with nor picks from. If not, the file reports the field and suggests the closest name.

A creation screen with a list of ten classes, the Samurai selected, showing its ability text, five stats with their starting values and cost multipliers, and its starting skills.

Creation’s imprinting page: ten classes in a list, and the Samurai’s ability and cost multipliers.

How are ten abilities kept in one place?

I asked for a Berserker with an extra attack on every melee hit and a Flesh Priest who heals allies a little every second, and then ten of those. The risk was ten abilities scattered through combat, healing and lock code. So they all live in one script, ClassAbilities, with every number in a table of constants at the top. Each rule an ability bends gets one clause that asks it.

Some examples. Red Mist makes the weapon code add the main weapon a second time to every swing. Marrow Guard moves 25 percent of a hit on another member onto the knight, through the knight’s armor and Fat. Overclock adds Machine’s bonus to Grey Matter’s in every spell, and each cast burns 2 percent of maximum health, never the last point. Communion gives each other member who’s up back 1 percent of the health they’re missing every second of game time.

Back Door is the one I’m happiest with. A Deck Runner’s hits, melee or shot, have a 5 percent chance to scramble the target, which stuns it for 3 seconds. The stun is an entry in the monster’s existing effect list, so it counts down on game time, shows on the monster’s panel and saves with no new code. Hacking also counts as Pick Locks for the Deck Runner, at 3 seconds a try with no noise on a failure.

The line the player reads for each ability is held to those constants by a test, so the text can’t drift from the rule. Every place that applies a class factor also writes a line into the explanation of that number, so the sheet can say where it came from.

A character inventory screen titled Bone Knight, with an ability block at the top of the right column and a list of sword, mace, shield, armor and bone spell skills below it.

A Bone Knight’s sheet: the Marrow Guard block, then the skills the class came with.

What do the Musician and the Thief pay?

I thought the Thief, Deck Runner and Musician looked worse than the rest when I saw the proposals, so I changed all three. The Musician lost the rule that the song stops when he attacks. His price is now slower action times, 20 percent slower recovery, while the others recover 10 percent faster, rising to 30 percent at Music 100. Music is a new skill, and the song steps up at the same breakpoints as the fighting styles. The Thief became the fastest class, 25 percent faster after everything, and his locks never jam.

The other price I offered the Musician, a chance to get distracted and drop the song for a while, isn’t built. I was asked whether to strengthen the Musician and said to leave the numbers until I’ve played.

How does a class stop a member learning something?

The Berserker and the Thief can’t learn some skills. A single function, bar_refusal, answers for two callers. The trainer uses it to refuse in his own words, and creation’s skill pick uses it to leave the skill out of the list. A member who already knows a barred skill keeps it.

What happens to old saves?

Save version 10 adds one migration that rewrites each member’s class id through a frozen table: brisket to berserker, shank to samurai, tenderloin to thief, sweetbread to tub wizard and offal to cyber mage. Stats, skills, spells and juice don’t change. The table is never edited for later classes.

That broke the old tests, because most of the suite checks numbers on a fixture folder that still holds the old five. I didn’t teach the migration about fixtures. Instead the test harness takes that one step out of the list of migrations while a run is on the fixture classes, and a test that wants the shipped classes puts it back. tests/class_abilities does, and checks the mapping against an old save.

What’s left

Swords aren’t two-handed in the game, so the Samurai’s Clean Cut, 15 percent of hits with a sword in both hands do double damage, currently reads as a sword with nothing in the other hand. I said to make swords usable in one hand or two, but that isn’t built yet. The tech skills for the Cyber Mage and Deck Runner are listed and do nothing.

tests/class_abilities has 248 checks. At the merge I ran the suite by name, 27 tests, and 2 failed, save_schema and ids. Both fail the same way without this change.