PDA

View Full Version : XML Frame/Window question



Belizan
July 20th, 2007, 07:37
So, I'm looking through the d20 base ruleset, and after defining portraitsets and loading/demarking a bunch of icons, fonts and frames, they appears some xml like this:

<diebox>
<frame name="diebox" />
<margin value="16" numbertailmargin="10" />
<secreticon name="dmdie" />
<tracker diecountmargin="20" diecountfont="narratorfont" />
</diebox>

etc.

Now... my question is.. what is this? diebox has been defined as a frame already in framedef. Is this a windowclass declaraction shorthand? It wouldn't seem so because those elements are inconsistant with the write up on windowinstances... Is it a refinement on the framedef declaration made earlier? Again, those elements are not defined for a frame. Anyone know the answer?

I'm guessing that the XML system allows the creation of arbitrary element "fields" in the db records for the related object instance, and that's what's being done here, so that these values are being defined on diebox in the db and are used by custom scripts later, but.. That's like a total guess on my part :(. I was hoping someone actually knew the answer?

joshuha
July 20th, 2007, 15:11
The things in the gamelement.xml are a little special and don't really have a defined structure for those elements.

In general though when you do create a template you can then define any control using that template by using the template name. You could think of these as specially defined system templates if you want but ones you don't have much control over.

https://fantasygrounds.com/modguide/templates.xcp is a good section to read on how to do these. They are very useful and one of the best new features IMO as a ruleset designer.