PDA

View Full Version : Descriptions of XML definition files



Vroomfogle
March 26th, 2006, 14:40
Hi I'm looking for quick one liners on what each of the xml files is for. Here's a list, along with what I currently think is true. If this could be fleshed out that would be great, or point me to where this info might already exist? I'm making a definition for Rolemaster (RMSS) so am trying to make sense of all this.

base.xml - The main xml file that tells FG which other xml files to use

charsheet.xml - Describes all the fields in the character sheet, as well as their graphical locations in the charsheet png images

d20_adventure.xml - Describes the NPC windows?

d20_desktop.xml - Describes the elements that appear on the desktop (shortcut buttons, all the book-buttons

d20_export.xml - Defines what data is exported...when/where is this used?

d20_graphics.xml - Defines all the graphic files used (png files) and some coordinates. Associates the files with XML tag names. Quick rundown on what the graphical tags mean? topright rect, left rect, etc.

d20_reference.xml - Describes all other windows ? (other then NPC and character?)

d20_utility.xml - Data on combat tracker window?

DIRECTORIES:
database - Contains static reference information specific to Ruleset
frames - Contains image files
icons - Buttons and icons

- V

Veelivar
March 27th, 2006, 08:39
I think that's about right, I've only played with charsheet, graphics an base though, which are pretty much as you say.

JMOxx75
April 2nd, 2007, 03:20
Why is this so hard to find? Its one thing to deal with xml but knowing what files do what would seem more important than anything else. If i'm missing it is there a tutorial or post that fully describes the relation between the files and which files are required to change certain things?

joshuha
April 2nd, 2007, 04:53
I can post in more detail about the files later this week. Whats more important though is to understand the different tags and what they do. Of course this isn't document well at all either.

The way the files are layed out is just one example of how you *can* layout a ruleset, it doesn't have to be structured like the default at all. If you want all the XML in one file you can do that. If you want things broken out more logically (the framedef for your custom window, then the windowclass that uses it, the custom icons for it, etc.) all in the one file for that object you can do it that way too. All the XML is loaded into memory at the same time so you can organize it however it makes sense to you.

I still agree though better documentation is needed for what the tags do and why they chose the layout they did for the default ruleset. The ref documentation for the 2.0 helps a lot with what the tags do but still doesn't go into enough detail on how everything relates to each other (which I understand now after lots of expirementing).

JMOxx75
April 3rd, 2007, 02:02
In the desktop.xml there are a bunch of window open controls with class names defined.


<windowopencontrol>
<icon normal="button_rulebook" pressed="button_rulebook_down" />
<bounds rect="10,450,91,86" />
<class name="referenceroot" />
<shortcut key="d" modifier="control" />
<tooltip text="d20 reference" />
<nodrag />
<closetoggle />
</windowopencontrol>

I'm assuming that the class name is important because it is the link that tells what to display when the button is pressed?

The class referenceroot is defined in d20_reference.xml? It has window open controls in it as well.

What I don't understand is where is the link that says to open the reference.xml. Is it in another file and if so how does this chain of files link up per say?

DrDeth
April 3rd, 2007, 09:43
A windowopencontrol tells FG to open a specific window. The class references which window to open - in this case the referenceroot. Windows are defined with the windowclass tags and can contain other controls, so you could have windowopencontrols defined in each windowclass.

The referenceroot windowclass has windowlists - this is like 'embedding' the other windowclass, but in a list like format.

Look at the first windowlist for example:

<windowlist class="classsmall">
<bounds rect="33,43,200,325" />
</windowlist>

This is telling FG to show the 'classsmall' windowclass in the specified rectangle (multiple times).

The classsmall windowclass starts like this:

<windowclass name="classsmall">
<datasource name="class" />
...

The datasource tag tells FG what data to use. If you look in the database/classes.xml file, you'll see '<node name="class">'.

Combining all of this: FG will list (windowlist) one classsmall (windowclass) window for each child node in the class node (datasource).

I hope Im making sense...

JMOxx75
April 3rd, 2007, 20:01
Thanks that cleared it right up for me. Then again so did this thread: https://www.fantasygrounds.com/forums/showthread.php?t=4493