Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
D&D Older Editions, OSR, & D&D Variants
4e Character XML Schema
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="megasycophant" data-source="post: 4309486" data-attributes="member: 69639"><p>Whaddya know, my first ENWorld post. This kinda stuff really brings the geeks outta the woodwork, eh?</p><p></p><p>I heartily second that. Generic elements like the "choice" element above kinda violate the core premise of xml, in that the elements should be self-descriptive. (The worst example I've seen being xml configuration files full of <em><property name="key">someValue</property></em> lines, serving to do nothing but complicate a properties file.) This also makes validation downright impossible.</p><p></p><p>One glaring issue I'm seeing, and perhaps it's because I'm thinking about it from a different perspective, is that it seems to me that the cart is coming before the horse. If this xml schema is just being created to be able to display/store unvalidated character information, that's all well and good, but if any sort of validation is to occur, more groundwork should be laid. (Of course, that could just be my preference for the bottom-up approach.) I would say:</p><ol> <li data-xf-list-type="ol">Type hierarchies should be defined codifying specific options available. Easier shown than explained, here's an example using feats, the most obvious. First the schema:<br /> [CODE]<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br /> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd"><br /> <br /> <xsd:element name="pc"><br /> <xsd:complexType><br /> <xsd:sequence><br /> <xsd:element name="feat" type="Feat" maxOccurs="unbounded" /><br /> </xsd:sequence><br /> <xsd:attribute name="name" type="xsd:string" /><br /> </xsd:complexType><br /> </xsd:element><br /> <br /> <xsd:simpleType name="WeaponGroup"><br /> <xsd:restriction base="xsd:string"><br /> <xsd:enumeration value="spears" /><br /> <xsd:enumeration value="heavy blades" /><br /> <!-- other groups here --><br /> </xsd:restriction><br /> </xsd:simpleType><br /> <br /> <xsd:complexType name="Feat" abstract="true"><br /> <xsd:attribute name="name" type="xsd:string" /><br /> <xsd:anyAttribute /><br /> </xsd:complexType><br /> <br /> <xsd:complexType name="GeneralFeat"><br /> <xsd:complexContent><br /> <xsd:restriction base="Feat"><br /> <xsd:attribute name="name"><br /> <xsd:simpleType><br /> <xsd:restriction base="xsd:string"><br /> <xsd:enumeration value="Alertness" /><br /> <!-- other feat names here --><br /> </xsd:restriction><br /> </xsd:simpleType><br /> </xsd:attribute><br /> </xsd:restriction><br /> </xsd:complexContent><br /> </xsd:complexType><br /> <br /> <xsd:complexType name="WeaponGroupFeat"><br /> <xsd:complexContent><br /> <xsd:restriction base="Feat"><br /> <xsd:attribute name="name"><br /> <xsd:simpleType><br /> <xsd:restriction base="xsd:string"><br /> <xsd:enumeration value="Weapon Focus" /><br /> <!-- other feat names here --><br /> </xsd:restriction><br /> </xsd:simpleType><br /> </xsd:attribute><br /> <xsd:attribute name="group" type="WeaponGroup" use="required" /><br /> </xsd:restriction><br /> </xsd:complexContent><br /> </xsd:complexType><br /> </xsd:schema>[/CODE]<br /> And here's an example document:<br /> [CODE]<pc name="Joe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:noNamespaceSchemaLocation="enWorldExample.xsd"><br /> <feat xsi:type="GeneralFeat" name="Alertness" /><br /> <feat xsi:type="WeaponGroupFeat" name="Weapon Focus" group="spears" /><br /> </pc>[/CODE]</li> <li data-xf-list-type="ol">A dataset should be defined enumerating options, [somewhat bogus yet hopefully illustrative] frex:<br /> [CODE]<weapon name="dagger"><br /> <group>light blade</group><br /> <category>simple</category><br /> <handedness>1</handedness><br /> <melee>true</melee><br /> <range><br /> <category>light thrown</category><br /> <normal>5</normal><br /> <long>10</long><!-- assuming these aren't always 2x normal --><br /> </range><br /> <proficiencyBonus>+3</proficiencyBonus><br /> <damage>1d4</damage><br /> <price>1</price><br /> <weight>1</weight><br /> <offHand>true</offHand><br /> </weapon><br /> [/CODE]</li> <li data-xf-list-type="ol">The character definition should consist of references (to keys defined by the schema) to this dataset, frex:<br /> [CODE]<br /> <pc name="Joe"><br /> <body><br /> <leftHand item="dagger" /><br /> <rightHand item="dagger" /><br /> </body><br /> </pc><br /> [/CODE]</li> </ol><p></p><p>That said, it almost feels to me like the best way to go about some of this would be to have two layers of schema, the first used to generate the core data, then somehow compile the core data into a schema used for character definition. When you start getting into weapon-specific feats like Weapon Proficiency (I started to use this to show it) or updating enumerated things on the fly, schema gets a lot hairier and scarier and it would mean manually editing the schema.</p></blockquote><p></p>
[QUOTE="megasycophant, post: 4309486, member: 69639"] Whaddya know, my first ENWorld post. This kinda stuff really brings the geeks outta the woodwork, eh? I heartily second that. Generic elements like the "choice" element above kinda violate the core premise of xml, in that the elements should be self-descriptive. (The worst example I've seen being xml configuration files full of [I]<property name="key">someValue</property>[/I] lines, serving to do nothing but complicate a properties file.) This also makes validation downright impossible. One glaring issue I'm seeing, and perhaps it's because I'm thinking about it from a different perspective, is that it seems to me that the cart is coming before the horse. If this xml schema is just being created to be able to display/store unvalidated character information, that's all well and good, but if any sort of validation is to occur, more groundwork should be laid. (Of course, that could just be my preference for the bottom-up approach.) I would say: [list=1] [*]Type hierarchies should be defined codifying specific options available. Easier shown than explained, here's an example using feats, the most obvious. First the schema: [CODE]<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd"> <xsd:element name="pc"> <xsd:complexType> <xsd:sequence> <xsd:element name="feat" type="Feat" maxOccurs="unbounded" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:simpleType name="WeaponGroup"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="spears" /> <xsd:enumeration value="heavy blades" /> <!-- other groups here --> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="Feat" abstract="true"> <xsd:attribute name="name" type="xsd:string" /> <xsd:anyAttribute /> </xsd:complexType> <xsd:complexType name="GeneralFeat"> <xsd:complexContent> <xsd:restriction base="Feat"> <xsd:attribute name="name"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Alertness" /> <!-- other feat names here --> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="WeaponGroupFeat"> <xsd:complexContent> <xsd:restriction base="Feat"> <xsd:attribute name="name"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Weapon Focus" /> <!-- other feat names here --> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attribute name="group" type="WeaponGroup" use="required" /> </xsd:restriction> </xsd:complexContent> </xsd:complexType> </xsd:schema>[/CODE] And here's an example document: [CODE]<pc name="Joe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="enWorldExample.xsd"> <feat xsi:type="GeneralFeat" name="Alertness" /> <feat xsi:type="WeaponGroupFeat" name="Weapon Focus" group="spears" /> </pc>[/CODE] [*]A dataset should be defined enumerating options, [somewhat bogus yet hopefully illustrative] frex: [CODE]<weapon name="dagger"> <group>light blade</group> <category>simple</category> <handedness>1</handedness> <melee>true</melee> <range> <category>light thrown</category> <normal>5</normal> <long>10</long><!-- assuming these aren't always 2x normal --> </range> <proficiencyBonus>+3</proficiencyBonus> <damage>1d4</damage> <price>1</price> <weight>1</weight> <offHand>true</offHand> </weapon> [/CODE] [*]The character definition should consist of references (to keys defined by the schema) to this dataset, frex: [CODE] <pc name="Joe"> <body> <leftHand item="dagger" /> <rightHand item="dagger" /> </body> </pc> [/CODE] [/list] That said, it almost feels to me like the best way to go about some of this would be to have two layers of schema, the first used to generate the core data, then somehow compile the core data into a schema used for character definition. When you start getting into weapon-specific feats like Weapon Proficiency (I started to use this to show it) or updating enumerated things on the fly, schema gets a lot hairier and scarier and it would mean manually editing the schema. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
D&D Older Editions, OSR, & D&D Variants
4e Character XML Schema
Top