<--design, part 3 ^--xmld20--^ libraries-->

xmld20 - an XML Schema for d20 gaming systems - testing, part 3

The latest version of the XSLT can be found here, and this is the resultant XML. This is the new to-HTML version (and here's the HTML result). Both of these results

What next

First I'm going to transcribe the aboleth mage example in the monster manual, to see how well the class levels work with the current structure.

Okay... maybe I won't. This should have been relatively simple. I just add in 10 levels of wizard, change the base ability scores (we'll assume they were rolled instead of the base 10/11 scores). Some different feats, a change of skill allocation... we should be done, right?

Hell no. This guy, according to the Monster Manual, has 10 feats, though it should have only 7 max (treating it as an 18th level character). It has 163 ranks of skills. Only a rogue would be able to pull that off. The average hitpoints are off by 10. The saves are wrong.

On second look, though, I'm wrong. The 10 levels of wizard give the character two meta-magic feats, plus the extra one at 1st level (Scribe Scroll). That explains the extra feats. The hitpoints could have been an actual roll of hitpoints, not the average. And the ranks are down to 147, once I coded in the synergy bonuses that I had lazily left out, which is how many this character should have.

The saves are still off -- I get 14/10/16, where the Monster Manual has 15/10/15, but I'm sure I'm right. And this means that I should have a spot for explicit number of hitpoints (and, probably, each roll at each level). I should also add in a comment in the output saying how many ranks the data had, and how many the calculations say it should have, for my own sake. oh, and here is the latest HTML output.

In addition, the feats should probably detail which ones are gained at level ups (both for the aboleth levels and the wizard), and state which ones are from class bonuses. Special Abilities and Special Qualities should likewise be noted as their origins. Why? For debugging purposes, if anything, but a system might, for some reason, want to look at a character and figure out where it got its powers from.

Another trial

Let's try a pit fiend. It's quite different than the aboleth -- different size, type, subtypes, attacks; it has SR and DR, two things we haven't dealt with yet; its organization section is nice and messy; and wow that's a lot of skills -- let's see if they work out.

Types, subtypes, size, speed... all of these work fine. I've had to change the logic in the XSLT to cope with Attack versus FullAttack; with the aboleth as my guide, I misunderstood the different sections... Attack is solely for when the creature has but a standard action -- it's not a list of the attacks it has (which are then shown in combination in the FullAttack).

Additionally, I didn't have the attack bonus decreasing for secondary attacks, so I've now added support for that in both the d20-xml template and the HTML template. I've also included support for the Multiattack feat (which the pitfiend has), but not for the weapon feats that reduce secondary attack penalties.

I still don't like SpecialAttacks and SpecialQualities being just text fields -- they need to represent their effects, instead of just have the words. That will be in the next phase.

Almost all of the pit fiend's skills work out -- it has 16 skills that have 21 ranks (the max for an 18HD creature), and it has a total of (8+8)*21 skill points to attribute. But, I've currently got 2 in Knowledge (nature). That's two extra... but I'm not willing to say that it's wrong quite yet.

I had originally had 17 ranks in Hide (instead of 21) and 25 in Jump (instead of 21), but I had no taken into account the pit fiend's size (Hide) or speed (Jump).

So what about the Knowledge (nature)? It gets a synergy bonus for 5 ranks in Survival, but the pit fiend has none (it is only listed with zero ranks because other skills give synergy bonuses sometimes, but not universally. The eight points shown are solely from the Wisdom bonus. Ahh well. I'll leave it for now -- I've cracked these discrepancies before -- but I believe that knowlege (nature) should only be +8.

I also had to put zero ranks into Balance, Diplomacy and Survival, to ensure that they would display on output, since they all get synergy bonuses from other skills (and are therefore not the "default" values based on the ability bonuses only).

Feats were easy enough, though I'd like to support the idea of choices made during feat selection (such as the pit fiend selecting fireball for its Quicken Spell-Like Ability).

Organization revealed that I had assumed only one Extra group of accompanying creatures, whereas the pit fiend has two in its troupe. The Treasure section required handling different amounts of each kind of treasure.

The abilities in the Combat section worked similarly to the aboleths', so there were no surprises there. The save DC on those abilities can be calculated, as I may have mentioned before, so we'll definitely want to change things from a static number.


All in all, the pit fiend passed the test. Just the knowledge (nature) is out of whack.

So what next? Now I'm looking to start organizing a lot of the calculations into libraries, so the stylesheets can access them separate from their output. The HTML and d20-xml XSLT pages are almost identical, with just surrounding mark-up differing in most cases. Having to change their calculations in both places as I fix them is a bit of a pain, especially when these are calculations that will be needed in other applications as well.
<--design, part 3 ^--xmld20--^ libraries-->

©2002-2017 Wayne Pearson