<--design ^--xmld20--^ testing-->

xmld20 - an XML Schema for d20 gaming systems - design, continued

How that we have a general idea of the goals of xmld20, we need to start answering some questions. We'll start with the monster descriptions, because they have a lot of variables, but are single-level -- that is, once the monster is defined, it's defined (unlike a class description, that must detail each level and its benefits, changes, etc.)

Monsters

We'll start with the entry in d20-xml for the first monster, the aboleth. I'm sure that the aboleth does not have every possible value, configuration or combination that we'll encounter, but it's a good start. Here's the entry from the d20-xml group:
<Monster id="srd:ABOLETH">
  <Name>Aboleth</Name> 
- <StatBlock>
  <SizeAndType Size="Huge" Type="Aberration" Subtypes="Aquatic">Huge Aberration (Aquatic)</SizeAndType> 
  <HitDice>8d8+40 (76 hp)</HitDice> 
  <Initiative>+1</Initiative> 
  <Speed>10 ft. (2 squares), swim 60 ft.</Speed> 
  <ArmorClass>16 (-2 size, +1 Dex, +7 natural), touch 9, flat-footed 15</ArmorClass> 
  <BaseAttackAndGrapple>+6/+22</BaseAttackAndGrapple> 
  <Attack>Tentacle +12 melee (1d6+8 plus slime)</Attack> 
  <FullAttack>4 tentacles +12 melee (1d6+8 plus slime)</FullAttack> 
  <SpaceAndReach>15 ft./10 ft.</SpaceAndReach> 
  <SpecialAttacks>Enslave, psionics, slime</SpecialAttacks> 
  <SpecialQualities>Aquatic subtype, darkvision 60 ft., mucus cloud</SpecialQualities> 
  <Saves Fort="7" Ref="3" Will="11">Fort +7, Ref +3, Will +11</Saves> 
  <Abilities Str="26" Dex="12" Con="20" Int="15" Wis="17" Cha="17">Str 26, Dex 12, Con 20, Int 15, Wis 17, Cha 17</Abilities> 
  <Skills>Concentration +16, Knowledge (any one) +13, Listen +16, Spot +16, Swim +8</Skills> 
  <Feats>Alertness, Combat Casting, Iron Will</Feats> 
  <Organization>Solitary, brood (2-4),or slaver brood (1d3+1 plus 7-12 skum)</Organization> 
  <ChallengeRating>7</ChallengeRating> 
  <Treasure>Double standard</Treasure> 
  <Alignment>Usually lawful evil</Alignment> 
  <Advancement>9-16 HD (Huge); 17-24 HD (Gargantuan)</Advancement> 
  <LevelAdjustment>-</LevelAdjustment> 
  </StatBlock>
- <Description>
- <General>
  <p>The aboleth is a revolting fishlike amphibian found primarily
in subterranean lakes and rivers. An aboleth has a pink belly. Four
pulsating blueblack orifices line the bottom of its body and secrete
gray slime that smells like rancid grease. It uses its tail for
propulsion in the water and drags itself along with its tentacles on
land. An aboleth weighs about 6,500 pounds.</p>
  <p>Aboleths speak their own language, as well as Undercommon and Aquan.</p> 
  </General>
- <Combat>
  <p>An aboleth attacks by flailing with its long, slimy tentacles,
though it prefers to fight from a distance using its illusion
powers.</p>
  <SpecialAbility Name="Enslave" Type="Su">Enslave (Su): Three
times per day, an aboleth can attempt to enslave any one living
creature within 30 feet. The target must succeed on a DC 17 Will save
or be affected as though by a dominate person spell (caster level
16th). An enslaved creature obeys the aboleth's telepathic commands
until freed by remove curse, and can attempt a new Will save every 24
hours to break free. The control is also broken if the aboleth dies or
travels more than 1 mile from its slave. The save DC is
Charisma-based.</SpecialAbility>
  <SpecialAbility Name="Psionics" Type="Sp">Psionics (Sp): At
will-hypnotic pattern (DC 15), illusory wall (DC 17), mirage arcana
(DC 18), persistent image (DC 18), programmed image (DC 19), project
image (DC 20), veil (DC 19). Effective caster level 16th. The save DCs
are Charisma-based.</SpecialAbility>
  <SpecialAbility Name="Slime" Type="Ex">Slime (Ex): A blow from an
aboleth's tentacle can cause a terrible affliction. A creature hit by
a tentacle must succeed on a DC 19 Fortitude save or begin to
transform over the next 1d4+1 minutes, the skin gradually becoming a
clear, slimy membrane. An afflicted creature must remain moistened
with cool, fresh water or take 1d12 points of damage every 10
minutes. The slime reduces the creature's natural armor bonus by 1
(but never to less than 0). The save DC is
Constitution-based.</SpecialAbility>
  <p>A remove disease spell cast before the transformation is
complete will restore an afflicted creature to normal. Afterward,
however, only a heal or mass heal spell can reverse the
affliction.</p>
  <SpecialAbility Name="Mucus Cloud" Type="Ex">Mucus Cloud (Ex): An
aboleth underwater surrounds itself with a viscous cloud of mucus
roughly 1 foot thick. Any creature coming into contact with and
inhaling this substance must succeed on a DC 19 Fortitude save or lose
the ability to breathe air for the next 3 hours. An affected creature
suffocates in 2d6 minutes if removed from the water. Renewed contact
with the mucus cloud and failing another Fortitude save continues the
effect for another 3 hours. The save DC is
Constitution-based.</SpecialAbility>
  <p>Skills: An aboleth has a +8 racial bonus on any Swim check to
perform some special action or avoid a hazard. It can always choose to
take 10 on a Swim check, even if distracted or endangered. It can use
the run action while swimming, provided it swims in a straight
line.</p>
  </Combat>
  </Description>
  </Monster>

line-by-line

Monster

<Monster id="srd:ABOLETH">
This tag we'll leave for now, until we come back to discussing XLink and Xpointers between different entries.

Name

  <Name>Aboleth</Name> 
This may seem like an obvious entry, but we'll see in future entries that it isn't straightforward. For this entry, however, it is, so we'll leave it.

StatBlock

- <StatBlock> 
This is a nice idea, separating the statistics from the description and other extra information.

SizeAndType

  <SizeAndType Size="Huge" Type="Aberration" Subtypes="Aquatic">Huge Aberration (Aquatic)</SizeAndType> 
I'm not convinced that this data should be grouped together in one element. Granted, this is how it's written in the official literature, but that doesn't mean that it has to be grouped from a data-storage perspective. So as not to be difficult, though, I'll leave it as-is, except for the human-readable content. Note that the d20-xml guys did think to put the useful information in the attributes of the SizeAndType element.
  <SizeAndType Size="Huge" Type="Aberration" Subtypes="Aquatic"/> 
We will have to provide the missing data (what we'll call human text) in the xmld20-to-d20xml XSLT we'll write.

HitDice

   <HitDice>8d8+40 (76 hp)</HitDice> 
We definitely need to change this one. To get anything that software could use from this, we'd have to parse it all up. What I find interesting is that the d20-xml people specify a datatype called a "die" in the documentation, which describes the format of a die roll (number of dice, sides of the die, and bonus added on). That's what the
8d8+40
looks like, but the
(76 hp)
isn't part of that definition.

Optimally, this entry would be something like

 <HitDice dice="8" sides="8" plus="40"/> 
From this, we could, with a little XSLT magic, figure out the
8d8+40
human text. Also, the
(76 hp)
is just an averaging of the dice rolls, so can also be computed.

But that's not all. The

+40
is also a calculation, based on the creature's constitution score (which we peeked at but haven't addressed officially). Because of this, I don't think that should be in this section at all, leaving us
   <HitDice dice="8" sides="8"/> 
But that's not all. The
8d8
is really just a representation of the creature's level (the first eight) and its hit dice based on its creature type (the second eight).

The creature's type, specified before, was Aberration, and according to the glossary in the D&D Monster Manual, an Aberration has d8 hitdice. While we're probably leaping ahead, we'll eventually want to support the idea monster levels, so we can eventually create software that lets you make monstrous characters, or to advance monsters with more monster levels or with class levels to create formidable NPCs. Because of this, the idea of representing the hit dice as a level and a die type makes perfect sense, so we'll now write this instead:

 <Level>8</Level> 
We might come back to this, if we decide we need to call it MonsterLevel, or have the number as an attribute. We might also need to define what the levels are in (in case you have a vampiric demonic half-dragon aboleth, for instance). We're just starting off, though, so let's continue.

Initiative

   <Initiative>+1</Initiative> 
This definitely needs to be changed. As a matter of fact, it can be completely removed, because initiative is a calculation, based on a base of zero, plus dex bonuses, feat bonuses, magical bonuses, etc.

In the case of the aboleth, its

+1
is from its dex, which we will always be able to calculate.

Speed

   <Speed>10 ft. (2 squares), swim 60 ft.</Speed>  
There are a few things we'll change here. The
(2 squares)
is gone. This is a simple calculation based on 5'/square, for miniature gaming. While all speed is measured in feet in d20, it's probably a good idea to support alternate measurements. However, the nice thing about schemas is that you can specify defaults.

The aboleth is a good example of monsters that have multiple speeds, because they have different ways of getting around. Walking, swimming, flying, climbing -- these could all be speeds for certain monsters, and thus we need to support more than one, or only one in the same manner. Let's try this:

 
   <Speeds>
     <Speed unit="ft" type="walk">10</Speed>
     <Speed unit="ft" type="swim">60</Speed>
   </Speeds>
I don't like the look of the numbers as the text data in the elements, though, because they don't mean anything without the type, so perhaps the following instead (also taking advantage of default units of "ft"):
 
   <Speeds>
     <Speed type="walk" rate="10"/>
     <Speed type="swim" rate="60"/>
   </Speeds>
This is a lot easier for software to use, is still understandable by humans (and easily editable), and can still be processed by easy XSLT to generate the entry that d20-xml expects.

ArmorClass

   <ArmorClass>16 (-2 size, +1 Dex, +7 natural), touch 9, flat-footed 15</ArmorClass> 
As mentioned earlier, this needs to be changed, in fact, in may all be unnecessary.

The AC bonus (or in this case, penalty) from size is something that can be pulled from the SizeAndType element (one that I'm now more and more leaning to separating into two). The AC bonus from Dex is found in the same way as the initiative bonus is. The natural armor is something that isn't supplied by another statistic (it's not provided by a magical amulet, or by the creature's skin listed somewhere else, so we do need a way to record this).

The touch AC and flat-footed AC can also be calculated, so we're left with

  <ArmorClass type="natural" value="7"/> 
For the aboleth, the natural AC was the only special one, but for high-ended monsters, we will require more (divine AC, for example), and that makes me wonder if we shouldn't group multiple ones like we did the Speed values. We'll figure it out later.

BaseAttackAndGrapple

   <BaseAttackAndGrapple>+6/+22</BaseAttackAndGrapple> 
This is another set that should be fully calculatable. The Base Attack is a function of the creature's levels; in the case of Aberrations, that equals 3/4 of the hitdice, thus the base attack of six.

Grapple is the base attack, plus a size bonus (+8 for the Huge size), plus Strength bonus (+8 for the aboleth's 26 Strength), to arrive at 22.

I'm sure we'll find cases of monsters that get other bonuses to base attack or grapple (bonuses that aren't easily defined in feats or special abilities), so we might have to return and add a way to define BAB and grapple bonuses, but for now, we'll remove the whole thing for the aboleth.

Attack

  <Attack>Tentacle +12 melee (1d6+8 plus slime)</Attack> 
Attacks will be more complex. The aboleth isn't the best example for this, since they only have the one attack, but it can at least help set up a base.

First of all, we can calculate the numbers; for instance, the aboleth's tentacle attack is a natural weapon attack (with which it is proficient, as the aberration description states), so the attack bonus is its base attack bonus (6), plus a its Strength bonus (8) plus its size bonus (or penalty, in this case) (-2).

Very nice, but we do need a way to define what the attacking weapons are, so we need to detail the tentacles somewhere. We also need a way to detail that there are four of them (later with the FullAttack).

We also need a way to define the damage. There are standards for natural weapons based on a creature's size, and in the case of a Huge creature, 1d6 is correct. As well, the bonus damage (the +8), is a function of the Strength, which also matches. But the aboleth has a good example of an extra type of damage, the plus slime portion. In this case, we'd link down to the description area of the aboleth entry, which would describe what the slime did. But other types of damage could include fire damage (from hot creatures) or acid damage (from, err, acid creatures). Some of these could, perhaps, be listed as (1d6 + burn) for the fire elemental, with a reference to its Burn extraordinary ability (and within there, detail the damage it adds). For now, we'll skip these concerns, and just define it as an general attribute. Oh, and we should include the fact that it's a melee attack, so the system knows how to compute the attack bonus.

  <Attack name="tentacle" weapon="natural" type="melee" damage="1d6+8" extra="slime"/> 

FullAttack

  <FullAttack>4 tentacles +12 melee (1d6+8 plus slime)</FullAttack>  
The aboleth is certainly not the best example of this entry. When you get to advanced creatures, such as demons with weapons AND bites AND tentacles, they have many combinations of attacks that can make up a FullAttack. Because of this, we need to have a container element, <FullAttacks>, and then detail each of the sets of FullAttacks.

The notation could get a little complicated, depending on what we encounter as we make our way through all of the entries in the SRD monster, or indeed figure out what all the possibilities are for a given creature.

Perhaps we should, optimally, just specify what all of the different attacks are, and let software determine what all the combinations would be? I think I would need to see more examples to figure out whether this is feasible, but I sure hope it is.

For now, let's just work with the aboleth, and see what needs to change as we look deeper.

   <FullAttacks>
     <FullAttack>
       <Attack count="4" attack="tentacle"/>
     </FullAttack>
   </FullAttacks>

SpaceAndReach

  <SpaceAndReach>15 ft./10 ft.</SpaceAndReach> 
In a similar vein to the Speed entry, we'll assume ft., and have that as a default value (that could be overridden if need arose).

While these two values are usually listed together, I'd just feel better to define them as separate values (and I want to change the SizeAndType more and more!)

As a matter of fact, this all ties into the size of the creature, so I'm finally going to merge all of this together:

   <Size category="Huge" space="15" reach="10"/> 
and we'll then go back and change the Type:
   <Type base="Aberration">
     <Subtype>Aquatic</Subtype>
   </Type>
We had to make Subtype a child element instead of an attribute, because creatures can be of more than one subtype. I'm not sure what I think of the type being a complex element (one that has both text (Aberration) and child elements (<Subtype/>), but we'll see how it goes. Perhaps making a Race element, with a base attribute and possible Subtype elements? Hmm...

SpecialAttacks

   <SpecialAttacks>Enslave, psionics, slime</SpecialAttacks> 
The only change needed here is to separate each of the attacks, so they can each be linked down to the descriptions further in the data.
   <SpecialAttacks>
     <SpecialAttack>enslave</SpecialAttack>
     <SpecialAttack>psionics</SpecialAttack>
     <SpecialAttack>slime</SpecialAttack>
   </SpecialAttacks>
We'll have to come back to linking them to their descriptions later. As well, the psionics SpecialAttack is actually a set of different attacks, which will be detailed in the description, but might also be better separated here for software to find its way through all of the possibilities.

SpecialQualities

  <SpecialQualities>Aquatic subtype, darkvision 60 ft., mucus cloud</SpecialQualities> 
Here is where we really have to do some investigation with each monster, to determine whether a given SpecialQuality is one that it gains from some other statistic, and can therefore be "computed", such as "aquatic subtype" from being, well, of the aquatic subtype, or darkvision 60', which is an inherent feature of the Aberration type; or if it's just an extra ability truly special to the creature, like the mucus cloud.
   <SpecialQualities>
     <SpecialQuality quality="mucus cloud"/>
   </SpecialQualities>
This will eventually be a link to the description section of the monster, which will detail the SpecialQuality's power.

Saves

   <Saves Fort="7" Ref="3" Will="11">Fort +7, Ref +3, Will +11</Saves> 
While we discussed this line previously, and said how it was done right, or at least closer to what we were looking for (with the attributes for each), the fact is that we don't need it at all, since it's all computable.

For instance, an 8HD creature (such as the aboleth) has a base save of 2 in its poor saves, and 6 in its good saves (found in the Base Save and Base Attack Bonuses table in the Player's Handbook, and probably in the SRD).

An aboleth, being an Aberration, has Will as its good save, so its base saves are 2, 2 and 6. Add in the bonuses from abilities (from the next) line, brings us to 7, 3 and 9. The Iron Will feat that the aboleth has (from a later line) adds the final 2 to Will.

Abilities

   <Abilities Str="26" Dex="12" Con="20" Int="15" Wis="17" Cha="17">Str 26, Dex 12, Con 20, Int 15, Wis 17, Cha 17</Abilities> 
We only need to get rid of the human text, since it can be reproduced, but otherwise this entry is obviously needed.
    <Abilities Str="26" Dex="12" Con="20" Int="15" Wis="17" Cha="17"/> 

Skills

  <Skills>Concentration +16, Knowledge (any one) +13, Listen +16, Spot +16, Swim +8</Skills> 
Skills listed for monsters are the ones in which skill ranks have been added (or the occasional skill that is likely to be needed for the creature, such as Swim for aquatic creatures), but also include the modifiers from the attributes and perhaps feats it has.

For the aboleth, it has Concentration, Listen and Spot, when without their associated Wis bonus, have 13 ranks apiece. Knowledge without its Int bonus has 11 ranks. Swim is a racial skill (mentioned later), which supplies the eight ranks there.

According to the Savage Species book, an Aberration starts with (2 + Int mod) x (HD + 3) skill points, so the aboleth should have (2+2)x(8+3) or 44 skill points. If we say that Concentration, Listen, Spot and Knowledge each had 11, then we're just missing the reason for two extra skill points for Concentration, Listen and Spot.

The Alertness feat later explains the Listen and Spot. The aboleth also has the Combat Casting feat, but that gives +4 (to most things), so either the +4 is added and there are only 9 ranks in this skill, or the +4 is not added, and we've got two extra skill points from somewhere.

Until I figure it out, I'm going to side with the 13 ranks in Concentration.

   <Skills>
     <Skill name="Concentration" ranks="13"/>
     <Skill name="Knowledge (any one)" ranks="11"/>
     <Skill name="Listen" ranks="11"/>
     <Skill name="Spot" ranks="11"/>
   </Skills>

Feats

  <Feats>Alertness, Combat Casting, Iron Will</Feats> 
This is pretty straightforward -- the feats just need to be separated into individual entries.
  <Feats>
    <Feat name="Alertness"/>
    <Feat name="Combat Casting"/>
    <Feat name="Iron Will"/>
  </Feats>

Organization

  <Organization>Solitary, brood (2-4),or slaver brood (1d3+1 plus 7-12 skum)</Organization> 
This is probably the first statistic that doesn't have much use from a software point of view, unless perhaps you were writing a d20 game and needed to know how many of a certain creature are "allowed" to appear together. I must admit that as a Dungeon Master, I've never given much value to this setting.

Regardless, this is not just for my use, so we'll add it just the same. Each possibly organization group will be its own entry, so

   <Organizations>
     <Organization name="solitary" count="1"/>
     <Organization name="brood" count="2-4"/>
     <Organization name="slaver brood" count="1d3+1">
       <Extras name="skum" count="7-12"/>
     </Organization>
   </Organizations>
The Extras child element might need a rename, but represents the non-aboleth members of a given organization.

While the count attributes could all have been represented as die rolls (2-4 as 1d3+1, 7-12 as 1d6+6), we want to keep the same stats as listed in the original data, so we are able to reproduce the entry precisely. We might revisit this attribute and differentiate between count, which would be a die roll representation, and range, which has a minimum and maximum.

ChallengeRating

  <ChallengeRating>7</ChallengeRating> 
This is a subjective number, trying to evaluate how challenging a monster is to a party, so we can't expect a formula here. Lets just leave it as-is then, until we talk about LevelAdjustment a little later.

Treasure

  <Treasure>Double standard</Treasure> 
Let's change it up a little, for the computer's sake.
  <Treasure multiplier="2"/> 

Alignment

  <Alignment>Usually lawful evil</Alignment> 
We'll change this a little; since there are a lot of abilities and magic that can rely on alignment, we should separate the two axes. Also, we should keep that usually, both to reproduce the original data precisely, and to allow software to know that flexibility is allowed by users of some monster-generating program.
  <Alignment flexibility="usually" LawChaos="lawful" GoodEvil="evil"/> 
We will give the flexibility attribute a default value of "always", as I believe most monsters are just stated with a specific alignment.

Advancement

  <Advancement>9-16 HD (Huge); 17-24 HD (Gargantuan)</Advancement> 
We need to separate out each range:
   <Advancements>
     <Advancement range="9-16" size="Huge"/>
     <Advancement range="17-24" size="Gargantuan"/>
   </Advancements>
I'm sure I've seen something detailing what happens after the shown ranges in an Advancement entry; whether it continues to apply with an obvious progression, or whether a creature just cannot gain more hitdice... for now, though, we'll hardcode these ranges.

LevelAdjustment

  <LevelAdjustment>-</LevelAdjustment> 
This, the Level and the ChallengeRating are all sort-of related, being ratings, in a sense, that are tied together.

Because a given creature could also have levels in multiple classes, we should probably redesign what we had before anyway, so let's try this, getting rid of ChallengeRating at the same time.

   <Levels cr="7" ecl="0">
     <Level class="monster">8</Level>
   </Levels>
The "monster" class might be better as "racial levels", but we'll see.

That ends the StatBlock set of data (provided there aren't any that were omitted from the aboleth entry).

Description

This is the other half of a monster entry, and is more free-form than the previous block. A lot more text sits here, and will mostly remain, as we shall see.

General

Here is just flavor text about the monster, a physical description or perhaps its feeding habits. There is one thing that we'll change, though, which is the mention of its weight. This could be useful, so we'll mark-up the block of text. Also, the languages are useful, so we will also mark those up. We'll also get rid of the mark-up HTML tags.
- <General>
  The <Language>aboleth</Language> is a revolting fishlike 
amphibian found primarily in subterranean lakes and rivers. An aboleth 
has a pink belly. Four pulsating blueblack orifices line the bottom of 
its body and secrete gray slime that smells like rancid grease. It uses
its tail for propulsion in the water and drags itself along with its
tentacles on land. An aboleth weighs about <Weight>6,500</Weight>
pounds.
  Aboleths speak their own language, as well as 
<Language>Undercommon</Language> and 
<Language>Aquan</Language>.
  </General>
When dumped as text, the Weight tags will be ignored if the text is just read as a block of text, but can still be found by software if needed.

Combat

The tactics of the monster are provided here in text form, followed by a description of its SpecialAbilities. These are associated with the SpecialAttacks and SpecialQualities listed before. I'm not sure about the differing names, but we'll leave them for now as they match the way d20-xml does it.

SpecialAbility

  <SpecialAbility Name="Enslave" Type="Su">Enslave (Su): Three
times per day, an aboleth can attempt to enslave any one living
creature within 30 feet. The target must succeed on a DC 17 Will save
or be affected as though by a dominate person spell (caster level
16th). An enslaved creature obeys the aboleth's telepathic commands
until freed by remove curse, and can attempt a new Will save every 24
hours to break free. The control is also broken if the aboleth dies or
travels more than 1 mile from its slave. The save DC is
Charisma-based.</SpecialAbility>
  <SpecialAbility Name="Psionics" Type="Sp">Psionics (Sp): At
will-hypnotic pattern (DC 15), illusory wall (DC 17), mirage arcana
(DC 18), persistent image (DC 18), programmed image (DC 19), project
image (DC 20), veil (DC 19). Effective caster level 16th. The save DCs
are Charisma-based.</SpecialAbility>
  <SpecialAbility Name="Slime" Type="Ex">Slime (Ex): A blow from an
aboleth's tentacle can cause a terrible affliction. A creature hit by
a tentacle must succeed on a DC 19 Fortitude save or begin to
transform over the next 1d4+1 minutes, the skin gradually becoming a
clear, slimy membrane. An afflicted creature must remain moistened
with cool, fresh water or take 1d12 points of damage every 10
minutes. The slime reduces the creature's natural armor bonus by 1
(but never to less than 0). The save DC is
Constitution-based.</SpecialAbility>
  <p>A remove disease spell cast before the transformation is
complete will restore an afflicted creature to normal. Afterward,
however, only a heal or mass heal spell can reverse the
affliction.</p>
  <SpecialAbility Name="Mucus Cloud" Type="Ex">Mucus Cloud (Ex): An
aboleth underwater surrounds itself with a viscous cloud of mucus
roughly 1 foot thick. Any creature coming into contact with and
inhaling this substance must succeed on a DC 19 Fortitude save or lose
the ability to breathe air for the next 3 hours. An affected creature
suffocates in 2d6 minutes if removed from the water. Renewed contact
with the mucus cloud and failing another Fortitude save continues the
effect for another 3 hours. The save DC is
Constitution-based.</SpecialAbility>
The d20-xml guys have a good start with these SpecialAbilities, as they have attributes that are easily searchable for each of the abilities. The type (Exceptional, Supernatural or Spell-like) is also easily found.

What we want to do is codify the meaning of the text, so software can use it. For instance, the Mucus Cloud takes effect upon contact. It stops someone from being able to breathe air for two hours upon a failed save. And it causes suffocation if removed from water after 2d6 minutes.

This is a lot to try and define, some which is typical, some which is not. The idea of an effect having a saving throw is expected, and support for it will be definitely required. A duration for an effect is also very common. The effect itself, though, isn't a typical one, and is hard to define, as is the penalty if removed from water.

We could embed the mark-up, but there's really no point, so instead, we'll just insert the element within the text description. We also need to add the number of times that the monster can use the SpecialAbility. We will also strip out the Name and Type from the description, as it can be added in at processing time, and for certain targets (for instance, a Monster Manual entry), we want to be able to differentiate that text from the rest of the description, for bolding the words.

  <SpecialAbility Name="Mucus Cloud" Type="Ex" Uses="continuous">An
aboleth underwater surrounds itself with a viscous cloud of mucus
roughly 1 foot thick. Any creature coming into contact with and
inhaling this substance must succeed on a DC 19 Fortitude save or lose
the ability to breathe air for the next 3 hours. An affected creature
suffocates in 2d6 minutes if removed from the water. Renewed contact
with the mucus cloud and failing another Fortitude save continues the
effect for another 3 hours. The save DC is
Constitution-based.
<Ability savetype="Fortitude" save="19" durationunits="hours" duration="3">
<Effect type="water breathing"/>
<Effect type="air suffocation" timeunits="minutes" time="2d6"/>
</Ability>
</SpecialAbility>
I'm not sure about the names and structure, but we'll try this for now. Let's go do the earlier SpecialAbilities.
  <SpecialAbility Name="Enslave" Type="Su" Uses="3" UsesUnits="day">Three
times per day, an aboleth can attempt to enslave any one living
creature within 30 feet. The target must succeed on a DC 17 Will save
or be affected as though by a dominate person spell (caster level
16th). An enslaved creature obeys the aboleth's telepathic commands
until freed by remove curse, and can attempt a new Will save every 24
hours to break free. The control is also broken if the aboleth dies or
travels more than 1 mile from its slave. The save DC is
Charisma-based.
<Ability savetype="Will" save="17">
<Effect type="spell" spell="dominate person" spelllevel="16"/>
</Ability>
</SpecialAbility>

  <SpecialAbility Name="Psionics" Type="Sp">At
will-hypnotic pattern (DC 15), illusory wall (DC 17), mirage arcana
(DC 18), persistent image (DC 18), programmed image (DC 19), project
image (DC 20), veil (DC 19). Effective caster level 16th. The save DCs
are Charisma-based.
<Ability savetype="Will" save="15">
<Effect type="spell" spell="hypnotic pattern" spelllevel="16"/>
</Ability>
<Ability savetype="Will" save="17">
<Effect type="spell" spell="illusory wall" spelllevel="16"/>
</Ability>
<Ability savetype="Will" save="18">
<Effect type="spell" spell="mirage arcana" spelllevel="16"/>
</Ability>
<Ability savetype="Will" save="18">
<Effect type="spell" spell="persistent image" spelllevel="16"/>
</Ability>
<Ability savetype="Will" save="19">
<Effect type="spell" spell="programmed image" spelllevel="16"/>
</Ability>
<Ability savetype="Will" save="20">
<Effect type="spell" spell="project image" spelllevel="16"/>
</Ability>
<Ability savetype="Will" save="19">
<Effect type="spell" spell="veil" spelllevel="16"/>
</Ability>
</SpecialAbility>
  <SpecialAbility Name="Slime" Type="Ex">A blow from an
aboleth's tentacle can cause a terrible affliction. A creature hit by
a tentacle must succeed on a DC 19 Fortitude save or begin to
transform over the next 1d4+1 minutes, the skin gradually becoming a
clear, slimy membrane. An afflicted creature must remain moistened
with cool, fresh water or take 1d12 points of damage every 10
minutes. The slime reduces the creature's natural armor bonus by 1
(but never to less than 0). The save DC is
Constitution-based.
  <p>A remove disease spell cast before the transformation is
complete will restore an afflicted creature to normal. Afterward,
however, only a heal or mass heal spell can reverse the
affliction.</p>
<Ability savetype="Fortitude" save="19" durationunits="minutes" duration="1d4+1">
<Effect type="transform"/>
</Ability>
</SpecialAbility>
Yikes. This will definitely need to be re-visited. I didn't bother trying to codify the penalty for the Slime effect.

Skills

  <p>Skills: An aboleth has a +8 racial bonus on any Swim check to
perform some special action or avoid a hazard. It can always choose to
take 10 on a Swim check, even if distracted or endangered. It can use
the run action while swimming, provided it swims in a straight
line.</p>
We need to add in the mark-up for the software to pull out this bonus. An interesting extra bit of info is the ability to take 10, which we should also provide. We'll also take the word "Skills:" out, so it may be marked up independent of the text body.
  <p><RacialSkill skill="Swim" bonus="8" take10="yes">An
aboleth has a +8 racial bonus on any Swim check to perform some special
action or avoid a hazard. It can always choose to take 10 on a Swim
check, even if distracted or endangered. It can use the run action while
swimming, provided it swims in a straight line.</RacialSkill>
</p>

Phew. That was quite a bit of figuring, and we left a few areas a bit questionable.

Before we look into changes or additions for features we haven't seen, let's verify that what we have now can be transformed back into the d20-xml format.
<--design ^--xmld20--^ testing-->

©2002-2017 Wayne Pearson