• The VOIDRUNNER'S CODEX is LIVE! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!

XML format for powers

Revinor

First Post
I have started working on xml format for 4th edition data. Idea is that by expressing something in such format, it should be possible to print it out in various formats (character sheet, short stat blocks, power cards, etc). Later, it might be possible that some computer-aided processing could be done for the data (recomputing derived stats on ability/level changes, etc), but this is out of the scope of implementation atm.

Final target is full monster and player xml file. To achieve that, I have started with power/ability xml descriptions, as they are probably most tricky part. I have decided to use the same format for generic power description (where things are expressed like 1[W]+Str dmg) and instance powers (like monsters stat blocks with everything precomputed, or DDXP character sheets). One of the use cases for pure ability xml is of course power cards.

You can check out current status at
http://dndxml.sourceforge.net/4e/Abilities.xml

with two example processors applied
Full descriptions (like second page of character sheet)
http://dndxml.sourceforge.net/4e/AbilitiesFull.xml

Short entries, to be used for example in monster stat blocks
http://dndxml.sourceforge.net/4e/AbilitiesShort.xml

I have tried to enter examples of various abilities, to excercise most of the format. I still don't like the way followup/secondary hits are represented, plus fact that damage is completly hidden inside text (it will prevent from doing any automatic calculations in later stages).

If you are interested in discussing some details, have some ideas for improving the format, or would like to do XSLT for card format, feel free ;) Format will still change a bit here and there - probably it cannot be frozen till PHB/MM will be available to see all the corner cases.

One note - you may notice I have complicated range entry a bit (as opposed to just enter everything as inline text). It is done on purpose, as having reacher information here can allows very nice tricks in the future (think about online table software were you can click on power and correct cone/burst size will appear on tile map... far, far future, if ever, but format should allows such things IMHO).
 

log in or register to remove this ad

tigycho

Explorer
Revinor said:
I have tried to enter examples of various abilities, to excercise most of the format. I still don't like the way followup/secondary hits are represented, plus fact that damage is completly hidden inside text (it will prevent from doing any automatic calculations in later stages).

Perhaps you could duplicate the damage value into an attribute on the <hit /> tag. Thus, instead of:
<hit>1d6+3 damage and you gain 3 temporary hit points</hit>

you would have
<hit damage="1d6+3">1d6+3 damage and you gain 3 temporary hit points</hit>

Another option would be to add the notion of <effect /> tags as children to <hit /> tags, turning it into something like this:

Code:
<hit>
  <effect type="damage" target="target"/>
  <effect type="healing" target="self"/>
  1d6+3 damage and you gain 3 temporary hit points
</hit>
 

Revinor

First Post
tigycho said:
Perhaps you could duplicate the damage value into an attribute on the <hit /> tag. Thus, instead of:
<hit>1d6+3 damage and you gain 3 temporary hit points</hit>
you would have
<hit damage="1d6+3">1d6+3 damage and you gain 3 temporary hit points</hit>
[/code]

This unfortunately still doesn't help to advance the power. Possible solution is to have two strings - format one and text one (text for stupid processors like xslt). Power would then look like

<hit>
<text>1d6+3 damage and you gain 3 temporary hit points</text>
<format>{1[W]+[StrMod]} damage and you gain {[WisMod]} temporary hit points</format>
</hit>

with smart applications being able to parse language inside {} and regenerate <text> part. <format> part would be optional - some abilities are not dependent on any variables and others would just not benefit from possible auto advancement done in hypothetical software.

Your second suggestion with putting effects explicitly is probably too much at the moment - I don't hope to get to the level where power effects could be actually simulated in software - too many special cases to cover in any generic manner.
 

Plane Sailing

Astral Admin - Mwahahaha!
Another possibility would be to separately record things as follows:

<AttackAttribute>Str</AttackAttribute>
<AttackTarget>AC</AttackTarget>
<WeaponMultiplier>1</WeaponMultiplier>
<BaseDamage>0</BaseDamage>
<DamageBonus>Str<DamageBonus>

For Ray of Frost if would look like this:

<AttackAttribute>Int</AttackAttribute>
<AttackTarget>Reflex</AttackTarget>
<WeaponMultiplier>0</WeaponMultiplier>
<BaseDamage>1d6</BaseDamage>
<DamageBonus>Int<DamageBonus>

i.e. melee weapons tell you what multiple of weapon damage they do (1[W], 3[W] etc), and don't give 'BaseDamage' figure. Other things which just do damage like spells have a base damage figure but no weapon multiplier.

It also lets you easily record whether a power is "Str vs AC", "Int vs Fort", "Dex vs Reflex" etc, as well as record the damage bonus.
 

Voidrunner's Codex

Remove ads

Top