• 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!

D&D 4E 4e Character XML Schema

dragon_eater

First Post
Oh nice, I didn't even think of rituals. However I did think of a couple of things.

There should either be an equipped section or equipped items should be marked as such.
There should be a way to show which magical items are used.

We could change the power section to:
Code:
<powers>
	<power type="atWill">Deft Strike</atWill>
	<power type="atWill">Sly Flourish</atWill>
	<power type="encounter">Positioning Strike</encounter>
	<power type="daily">Trick Strike</daily>
</powers>

The last one doesn't really add anything, but I think it looks better.
 

log in or register to remove this ad

dragon_eater

First Post
I tried using the schema to write up a level 30 wizard and see what problems I came across.

1. The first problem I had was skill focus as a human bonus feat. The markup:
Code:
<race name="Human">
<choice tag="Bonus Feat">Skill Training:Diplomacy</choice>
<!-- Stuff Cut Here -->
</race>

That is much different then this:

Code:
<feat name="Skill Training">
 <choice tag="skill">Diplomacy</choice>
</feat>

Might I suggest using the following markup instead:
Code:
<race name="Human">
   <feat name="Skill Training">
       <skill>Diplomacy</skill>
   </feat>
</race>

We could also use the same style for other bonuses granted by race like:
Code:
<race name="Human">
<power type="atWill">Illusory Ambush</power>
<skill>Nature</skill>
<language>Draconic</language>
</race>


2. The second problem I encountered was the Wizard's spell book. I though that the best solution is to put the spells they currently have memorized in the power tag and then add a spellbook tag to it too which contains all the spells the wizard knows.

Code:
<powers>
   <!-- Encounter and At-Will Powers -->
   <power type="daily">Meteor Swarm</power>
   <power type="utility">Feather Fall</power>
   <spellbook>
      <power type="daily">Meteor Swarm</power>
      <power type="daily">Greater Ice Storm</power>
      <power type="utility">Feather Fall</power>
      <power type="utility">Jump</power>
   </spellbook>
</powers>

We might want to further subdivide the spellbook by level, but I don't really think that is necessary.

3. There is a minor problem with magical items. Some items have multible different versions. I thought adding an optional element called level.

Code:
<equipment><!-- Magic Item Levels -->
	<item level="30">Bloodthread Armor</item>
	<item level="29">Orb of Reversed Polarities</item>
</equipment>

I have attached the complete xml file.
 

Attachments

  • level30wizard.xml.zip
    2.1 KB · Views: 97

banana

First Post
Thoughts on Humans: it's implied by being Human that you have a bonus feat. You don't need to specify it as a choice for your <race>! You can just go ahead and add an extra feat to the <feats> section. This applies to powers, skills and languages too.

On spellbooks: that seems like it might be a good idea. I agree that dividing by level isn't necessary, as that can be inferred from the power name (then again, so can its action type...).
 

banana

First Post
Four Ee

When developing a file format, it's always useful to have a reference implementation, so I've converted a character editor I was working on to use this schema. Attached ("4e.zip") is a Mac OS X application which can open/edit/save character ".sheet" files (it also works on ".xml", but that might not be a good idea in the long term) with a GUI interface.

It's very alpha-quality - it doesn't do a lot of things yet (powers, feats, skills, equipment!) and needs other improvements, but it works.

Here are some points that came up about the XML format while working on it:

- Ability scores don't include racial bonuses, right?

- I think that the root <character> element should be including the schema definition:
<character xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="4eCharacter.xsd">
Currently, my editor will load sheets that don't include it but won't be able to validate them against the schema for correctness.

- Should there be maxOccurs="1" on the description elements? Does XSD automatically infer that?

- Why is <wealth> separate to <equipment>? <valuable> could be in the <equipment> section along with <item>. Also, <valuable> is kind of a clunky name.

- I had to change some capitalisation in the schema, because a lot of elements were referenced in thisWay but then defined in ThisWay. I had to change AbilityScores, Power, ExtraInfo, and a bunch of others. I've attached my edited schema - the capitalisation is the only change over what's in ninjeff's latest zip.

Here are some screenshots of opening the KotS character xml files:
4e1.png
4e2.png
4e3.png

The XML box at the bottom is mostly there to let me debug stuff, and it's actually generated from the model in memory rather than just being a copy of the file.

And here's a character created from scratch:
4e4.png

I've attached that file as "Underpowered.sheet".

Finally, I've also attached the source code for reference purposes. I'm thinking about making it open source under the GP, but for the moment I want to get it into a more working state.
 

Attachments

  • Four Ee.zip
    601.8 KB · Views: 90
  • Underpowered.sheet.zip
    858 bytes · Views: 84
  • 4eCharacter.xsd.zip
    1.8 KB · Views: 82
  • Four Ee - Source.zip
    1.2 MB · Views: 94

Horacio

LostInBrittany
Supporter
Your reference implementation is great!
The only problem is that it only works on MacOS.

Ideally we should try to get a reference implementation in a system agnostic format, something working for Linux and Windows too, like a web application.

I'm going to try to make something like that later this week...
 

SnakeNuts

Explorer
Horacio said:
Your reference implementation is great!
The only problem is that it only works on MacOS.

Ideally we should try to get a reference implementation in a system agnostic format, something working for Linux and Windows too, like a web application.

I'm going to try to make something like that later this week...

Or maybe something that compiles on most platforms. I'm thinking Ruby or Python with WxWindows. I might give that a shot.
 

dragon_eater

First Post
Yummy Mac Application, nice. I'll take a look at it and tell you what I think.

EDIT:

The application don't like incorrect markup, it just crashes if there is any wrong tag. I don't really have time to try and fix it.

banana said:
- Ability scores don't include racial bonuses, right?

I would say no, but we need if figure out how to do the human ability score bonus.

banana said:
- Should there be maxOccurs="1" on the description elements? Does XSD automatically infer that?

I think it is inferred, but I don't know for certain.

banana said:
- Why is <wealth> separate to <equipment>? <valuable> could be in the <equipment> section along with <item>. Also, <valuable> is kind of a clunky name.

I agree that we could just all be put in equipment, but since most people use and think of them differently I suggest we keep different categories.
 
Last edited:

banana

First Post
Horacio said:
Your reference implementation is great!
The only problem is that it only works on MacOS.

Ideally we should try to get a reference implementation in a system agnostic format, something working for Linux and Windows too, like a web application.

I'm going to try to make something like that later this week...

That would be great. My application is a character editor I was already working on - my main motivation for it was that there isn't going to be a Mac version of the DDI tools. I thought it might as well use this format.

dragon_eater said:
The application don't like incorrect markup, it just crashes if there is any wrong tag. I don't really have time to try and fix it.

Yep, that's one of the things I need to fix. I've got strict validation on, so it detects markup errors and generates nice specific error messages, and logs them to the console, but after that it just quits! I'll work on it some more over the next week or so.
 

dragon_eater

First Post
Ah, the console, I should have checked there. Also you don't have the human race as an option.

I've uploaded my level 30 wizard again. He now is a completely valid xml file following the correct schema. Last time I really should have validated him before uploading. It even opens in your program this time!

The spellbook is commented out because it still isn't included in the schema. His magical items are also commented out because I can't specify level for the items.
 

Attachments

  • level30wizard.xml.zip
    17.9 KB · Views: 88

banana

First Post
Turns out I'm wrong about the capitalisation thing, that was a silly error on my part. The existing xsd file is fine (though we should get these new ideas in).
 

Voidrunner's Codex

Remove ads

Top