PDA

View Full Version : XML Skills Needed for Custom Rulesets - What you need!



vayman
January 29th, 2006, 06:34
In this post, I'm going to try to outline just what XML skills you need to customize FG. I think you'll find it's much less then what many believe.

I've been modifying the ruleset to work with Alderac's Swashbuckling Adventures. So far - so good. Any issues I've had are usually solved by searching through the forums.

Through my searches I've seen several people refer to their skills regarding XML. (For those who aren't sure, this XML is eXtensible Markup Language - a standardized, human readable language used to hold data that can be shared across various platforms). Many claim that they are novice XML users, or that they don't know much about it, etc, etc.

FG uses the absolute most basic level of XML. If you are thinking of creating your own rulesets or modifying the existing, you should just read the most basic of XML tutorials only to understand how to write well formed and structured XML.

In short, you should know a few basic things...

1. Every tag in XML must have a matching end tag OR close itself off. Consider the following two valid XML statements.

<name>vayman</name>

<name value="vayman" />

Both are valid XML statements. The first has a matching pair of "name" tags, with the later of the two containing a "/", which represents an "end tag". The two name tags together can encompass text or other valid xml statements.

2. The second is a single xml statement that closes itself off with a "/" at the end. For another example of this use (and to prove that the two varieties can be used together, consider the next example...

<person>
<name>vayman</name>
<newcomer />
</person>

The person "node" encompasses two child nodes. One is the name node that holds text, in this case "vayman". The second node holds no text, but is just a single node, correctly closed off with the end slash "/".

Nodes can be named anything you please. It's up to the actual application (in this case FG) to use the data. FG expects certain nodes, which it then knows what to do with.

As a rule of thumb, avoid any special characters or numbers. Stick just with letters and you'll be fine.

That's all you need to use FG's customizations as far as XML skills go. Beyond that, the way the various tags relate to each other and how you should organize your customizations are very much FantasyGrounds-centric, not XML-centric. The fact that various "windowclass" nodes are referenced by other nodes, or that a "datasource" node points to stored data have absolutely NOTHING to do with XML beyond the fact that they are written in a compliant XML format and used by FG in that capacity.

Beyond this most basic understanding of XML, you need only utilize patience, time, logic and this forum to build exactly the ruleset you're after.

So go forth and conquer, copy and emulate the content provided to learn - and don't fear the XML.

Hope that helps clarify things, if anyone was a little confused. :)

Regards and good luck!

Jim1829
July 29th, 2006, 18:41
Thanks Man!