Thread: New Ruleset - Problem 2
-
April 7th, 2007, 16:22 #1
New Ruleset - Problem 2
Hi, I've hit my second problem and can't see where the difficulty lies. Can anyone please help?
I'm trying to amend the feats.xml so that I can have multiple nodes shown in the Reference window - the same as with classes.xml and equipment.xml currently. I could get around the problem by trying to add another xml file, but ideally I'd like to know why this isn't working.
I've amended the d20_reference.xml feats windowclass as follows, using the equipment windowclass above as a reference
Code:<windowclass name="feats"> <datasource name="feats" /> <frame name="referencebox" /> <dynamic resize="vertical" /> <defaultsize width="500" height="650" /> <minimize icon="minimized_reference" /> <tooltip field="name" /> <sheetdata> <formattedtextcontrol name="text"> <bounds rect="25,15,-30,-20" /> <font normal="chatfont" bold="narratorfont" italic="chatitalicfont" bolditalic="chatbolditalicfont" title="titlefont" /> <icon link="button_openwindow" emptylink="button_emptytarget" /> <footer image="footer_wide" /> </formattedtextcontrol> <scroller> <bounds rect="-63,-45,45,27" /> <target name="text" /> <button normal="button_scroller" pressed="button_scroller_down" /> </scroller> </sheetdata> </windowclass> <windowclass name="featssmall"> <datasource name="feats" /> <defaultsize width="200" height="27" /> <sheetdata> <windowopencontrol name="open"> <icon normal="button_openwindow2" pressed="button_openwindow2down" /> <bounds rect="0,0,24,24" /> <class name="feats" /> <description field="name" /> </windowopencontrol> <stringcontrol name="name"> <bounds rect="30,2,120,20" /> <link handler="open" underlineoffset="-2" /> </stringcontrol> </sheetdata> </windowclass>
Code:<root> <node name="feats"> <node name="1feats"> <stringvalue name="name" value="Skills" /> <formattedtext name="text"> ...CONTENT GOES HERE... </formattedtext> </node> <node name="2feats"> <stringvalue name="name" value="The Force" /> <formattedtext name="text"> ...CONTENT GOES HERE... </formattedtext> </node> </node> </root>
Last edited by Valarian; April 8th, 2007 at 11:05.
Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
April 9th, 2007, 17:39 #2
- Join Date
- Mar 2007
- Location
- South Africa
- Posts
- 103
Ok...
You've defined two sheets and linked them to data...?
What are you expecting, and what are you getting?
-
April 9th, 2007, 21:23 #3
The classes and equipment XML files show more than a single node. I want the feats XML file to do the same, so that I can show Alien Races, Skills, and The Force as nodes sourced from feats.xml.
At the moment, I have Skills and The Force defined in the feats XML file. These are defined as nodes "1feats" and "2feats". Whichever of the nodes I designate as "1feats" is the one that is displayed. The other is ignored.
Herein lies the problem.Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
-
April 11th, 2007, 08:02 #4
- Join Date
- Mar 2007
- Location
- South Africa
- Posts
- 103
Ahh...
Ok. If you look at the referenceroot and classsmall windowclasses as an example, you'll see that the referenceroot defines a windowlist.
The windowlist essentially tells FG to repeat the classsmall windowclass for each subnode of class.
This essentially gives you the list:
- Races
- Bard
- Barbarian
- etc...
I notice that the d20 ruleset already defines a list for feats, but there is only 1 subnode in the database file. If you've changed the database file to your format, and left the rest of the xml the same, you should indeed get a list - as long as you've made sure to increase the size of the windowlist.
It could be that your list IS working, but the bounds are still set to the size of one row.
-
April 11th, 2007, 10:42 #5
Doh! It was this simple!
Thanks for the help. I just didn't spot this at all.
I changed the size of the windowlist element, and all is well.
Thanks again.Using Ultimate license - that means anyone can play.
Valarian's Fantasy Grounds Rulesets
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks