PDA

View Full Version : Scrolling Feats Labels



spliskamatyshak
February 2nd, 2005, 16:07
I added psionic and epic feats in separate xml files added them to base.xml and editted d20_reference.xml (all in my own ruleset). I copied the windowclass stuff for feats and featssmall and duplicated then editted them for psionics and epic. When I go into FG the scrolling area shows Feats, Feats and Feats not Epic Feats, Feats and Psionic Feats. Each Feats link takes me to a different *feats.xml, but it is really hard to tell which one I'm going to get. Did I find a bug or is there something I'm missing.

Thanks

Ged
February 3rd, 2005, 18:42
<stringcontrol>
<bounds rect="30,2,120,20" />
<static value="Feats" />
<link handler="open" underlineoffset="-2" />
</stringcontrol>

The "Feats" text is written a few times in the d20_reference.xml, but the one above changes the label. Did you find that one or does the problem persist even if you change it there?

spliskamatyshak
February 4th, 2005, 00:53
Yes, I found that one. Here is an example of what I did, but the list still displays Feats instead of Psionic Feats.

<windowclass name="psionicfeats">
<datasource name="psionicfeats" />
<frame name="referencebox" />
<dynamic resize="vertical" />
<defaultsize width="500" height="650" />
<minimize icon="minimized_reference" />
<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="psionicfeatssmall">
<datasource name="psionicfeats" />
<defaultsize width="200" height="27" />
<sheetdata>
<windowopencontrol name="open">
<icon normal="button_openwindow2" pressed="button_openwindow2down" />
<bounds rect="0,0,24,24" />
<class name="psionicfeats" />
<description text="Psionic Feats" />
</windowopencontrol>
<stringcontrol>
<bounds rect="30,2,120,20" />
<static value="Psionic Feats" />
<link handler="open" underlineoffset="-2" />
</stringcontrol>
</sheetdata>
</windowclass>

I also did the same thing for Epic Feats.

Later :)

spliskamatyshak
May 2nd, 2005, 04:15
I know you're all very busy, but it has been several months since any kind of a response to this. Just a friendly reminder.

Goblin-King
May 2nd, 2005, 07:30
How did you name the nodes in the XML file where you define the contents of the pages? The following instructs FG to look in the "psionicfeats" node, and list everything under that in the list.


<datasource name="psionicfeats" />

If you started your XML file with the same node name as in the original feats.xml file, it will assume your psionic and epic lists fall under the same category and hence use the same static label as Ged pointed out. From your description of the problem, I think this is the case (which is fine if you do what I propose below).

You have two options. Either you create top level nodes for each of the three feat sections, and have three corresponding <windowlist> controls in the "referenceroot" class, or you add a text value to the feat definitions that can be used as the label instead of the static value (the "Feats" text you keep seeing).

If you want to do the latter, do the following:

In your d20_reference.xml, change the "featssmall" definition to:


<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>

This would tell the system to look for a feat page specific title text (in the value named "name") instead of always using "Feats". Now, you need to include it in the feat definitions you have. Your feat definitions should look like this:


<node name="feats">
<node name="psionicfeats">
<stringvalue name="name" value="Psionic feats" />
<formattedtext name="text">
... &#40;text for the feats&#41; ...
</formattedtext>
</node>
</node>


In order to get the title in place for the regular feats, you need to add it as well. The best way would probably be to copy the feats.xml file to your ruleset and modify it to match the above and add your own data to it as well, making it easier to update should you need to in the future. However, you could also include this any of the XML files where you define your epic and psionic feat data:


<node name="feats">
<node name="feats">
<stringvalue name="name" value="Feats" />
</node>
</node>


Which should add just the title to the existing text portion of the page.

I want to apologize that this particular section wasn't really planned with extensions in mind well enough, and all this should be in there already for the default d20 ruleset so that you'd just need to add the data (which is how classes and such work already). Please let me know if any of this needs further clarification.

spliskamatyshak
May 3rd, 2005, 05:14
Brilliant! That worked great. Thanks.

I don't suppose you might want my SRD dataset? It includes everything except the divine stuff from the SRD. It also follows the format of your original dataset. Just let me know.

Thanks again. :D