Character Builder and Sheets and 3pp

Scribble

First Post
Ok all you crazy 3pp programers out there...

One of you needs to create a program that reads the CB XML code and lets you build custom Character sheets.

Get on it!

please. :)
 

log in or register to remove this ad

If only. Unfortunately, the CB XML is
1) A total mess
2) Incomplete (the powers in the xml don't list everything that's on the power card)
 

If only. Unfortunately, the CB XML is
1) A total mess
2) Incomplete (the powers in the xml don't list everything that's on the power card)

I don't know enough about XML and the WoTC file to answer this myself:

Why is it a mess, and what's missing?
 

I don't know enough about XML and the WoTC file to answer this myself:

Why is it a mess, and what's missing?

The XML isn't well structured, avoiding stuff like Schema. It looks more like a chaotic heap of things thrown together without rhyme or reason. If you want to reverse engineer it you'd have to take care of each and every possible element.

The XML for a power looks like this:

Code:
         <RulesElement name="Majestic Word" type="Power"
internal-id="ID_FMP_POWER_2339" url="http://www.wizards.com/dndinsider/
compendium/power.aspx?id=2339" charelem="15d0dbe0"
legality="rules-legal" />

You just have the name and a reference to the Compendium. Not much to work with...
 

The XML isn't well structured, avoiding stuff like Schema. It looks more like a chaotic heap of things thrown together without rhyme or reason. If you want to reverse engineer it you'd have to take care of each and every possible element.

The XML for a power looks like this:

Code:
         <RulesElement name="Majestic Word" type="Power"
internal-id="ID_FMP_POWER_2339" url="http://www.wizards.com/dndinsider/
compendium/power.aspx?id=2339" charelem="15d0dbe0"
legality="rules-legal" />

You just have the name and a reference to the Compendium. Not much to work with...

So no damage values or anything?

Does the character sheet portion give you any info to work with? What is that section missing?
 

It's also pretty inconsistent. Some characters have a LootTally section, that lists all items. Others...don't. The items are also listed in the Level section (which appears to be a list of changes made at every level), but it's not clear to me how to actually do anything with that. And as noted the Powers don't have complete in-file descrptions.

It didn't help that the old CB could emit illegal XML (Parantheses can't be used in element names).

BTW, if your existing character blows up the new Import function with a message about Parantheses, try eliminating the d20CampaignSetting element and all it's content.
 

So no damage values or anything?

Does the character sheet portion give you any info to work with? What is that section missing?
In the Power secions, it does give you damage for each equipped weapon as '1d10+15' etc.

But the Power section doesn't list the bulk of the power's info, like targets, range, area, hit, miss, effect, etc. So you can't turn that info into a power card.
 

The XML is a complete disaster. You'd need a schema (a framework of how the xml is supposed to look) just to get started. Not impossible to create one, but then the XML itself is very poorly formatted, like someone hired a .Net dev that didn't know squat about using xml in thier code. You see, first create a schema and then run it through XSD.exe to generate classes to match the schema place them logical package/.Net namespace.

Instead it looks like someone wrote thier own half-assed xml serialization code. There may or may not be a schema somewhere, but i'm willing to wager a donut that it's not validated against at any point in time, and certainly not using proper serialized output.

Now, provided the xml was well formatted, and you have a good schema matched with it... it can be run through some xsl or even xsl:fo (likely the latter if you want pdf output) to generate formatted character sheets. Personally, i'd do this in java and use an XPath 2.0 capable parser, but can be done in any language that has an xsl:fo parser and preferably, tho not required (but it sure makes life easier!), supports XPath 2.0.

Instead, it looks like they are doing some lame backend processing and generating a rather large image file that you have to download via silverlight for printing. Who ever came up with that genius idea should be denied bacon for life.
 

In the Power secions, it does give you damage for each equipped weapon as '1d10+15' etc.

But the Power section doesn't list the bulk of the power's info, like targets, range, area, hit, miss, effect, etc. So you can't turn that info into a power card.

How do the sites like Iplay4e work? (I don't have much experience with them.)

Is it possible to get the bulk of the info from the compendium, and just use the sheet to get the player's numbers?


The XML is a complete disaster. You'd need a schema (a framework of how the xml is supposed to look) just to get started. Not impossible to create one, but then the XML itself is very poorly formatted, like someone hired a .Net dev that didn't know squat about using xml in thier code.


I wonder if they might clean this up a bit, now that they seem to have new people working on the stuff? (I think it's new people...)




Also, while I appreciate that people have their own opinions on things, if we could keep this thread to just the facts I would really appreciate it.

I don't want to deny anyone their own personal opinion, but as I mentioned I don't know a lot aboput XML but I'd like to see what the actual issues are.

I'd rather the thread not devolve into people arguing about the merrits of one or the other coder, and I'd rather not wade through it all to get the in fo I'm looking for.. So... Please? :)
 

How do the sites like Iplay4e work? (I don't have much experience with them.)

Is it possible to get the bulk of the info from the compendium, and just use the sheet to get the player's numbers?

It's been some time since i've used iplay4e, but I recall them linking to the compendium. If i recall, the compendium originally had an API webservice you could interface, but I remember it being a pain to use, and then they made it (mostly) go away (licensing and data scrape abuse i think). Looking at some CB xml, each item of importance includes a link to the compendium, so that must be what iplay4e uses.

However, to be useful, the data returned from the compendium needs to be xml, and you would need an xml schema for that as well. Then you could work some xsl:fo magic to get it formatted however you wanted. My DDI is lapsed, so i can't check, but i believe they return the data already xsl parsed into a web friendly format. Sure, you could parse that, but it's much more difficult since one doesn't know the rules that went into the xsl formatting, you'd be guessing at your parsing and the output format can always cahnge on you, breaking everything.

Even if you were able to access the raw power/item description xml, it has a history of inconsistencies, which can jack up formatting. While attempting to do exactly what you are wanting several months back, with the CB xml (and as further evidence of rolling thier own serialization without a schema), one of the tag attributes completely changed case between versions, but only for certain values. The change in case broke what I had and forced me to add a duct tape and spaghetti work around for it. I filed a bug report, but it was ultra low priority. I eventually gave up the project sometime in august or so to work on my own CB/MB in my spare time.
 

Pets & Sidekicks

Remove ads

Top