-
August 1st, 2005, 15:35 #1
- Join Date
- Jun 2005
- Posts
- 43
Help with custom Reference window
Hello there. I need some assistance with getting the reference window (the rulebook) to show information from my custom game mechanics.
My goal is to have the player click on the rulebook, have my custom graphic with selections appears (Campaign, Combat Rules, etc) , let the player click on a selection and have a simple page with normal text appear.
So far I have added my custom graphic, the text is now selectable, included my file in the BASE.XML file, and added my database file.
The problem is after selecting say Combat Rules, the window appears but the content is blank and closing it crashes the game. I clearly have some formatting or node business all wrong.
Here is a snipet from my reference.xml file:
Code:<root> <windowclass name="streetrules"> <frame name="streetrules" /> <defaultsize width="340" height="340" /> <sheetdata> <windowopencontrol> <bounds rect="93,11,135,33" /> <class name="campaign" /> <description field="description" /> </windowopencontrol> <windowopencontrol> <bounds rect="93,53,135,33" /> <class name="combat" /> <description text="description" /> </windowopencontrol> <windowopencontrol> <bounds rect="93,97,135,33" /> <class name="gear" /> <description field="description" /> </windowopencontrol> <windowopencontrol> <bounds rect="93,139,135,33" /> <class name="advantages" /> <description field="description" /> </windowopencontrol> </sheetdata> </windowclass>
If it is not too much to ask, what should the <windowclass name="campaign"> look like to have it load up formated text? Nothing special, just the text.
And what should the database xml file look like to fill that text. Something as simple as a "Hello world!" would get me started.
I have tried filling in examples from default ruleset, but I still have trouble getting text like classes.xml to populate.
Thank you,
Tom / Doc4
-
August 1st, 2005, 17:28 #2
- Join Date
- Mar 2005
- Posts
- 540
I can help you on this when I get home. I am at work right now and should get home around 6:00ET.
-
August 2nd, 2005, 02:21 #3
- Join Date
- Mar 2005
- Posts
- 540
Try doing this:
Code:<!-- This is goes in your reference.xml file --> <root> <windowclass name="streetrules"> <frame name="streetrules" /> <defaultsize width="340" height="340" /> <sheetdata> <windowlist class="campaignsmall"> <bounds rect="93,11,135,33" /> </windowlist> </sheetdata> </windowclass> <windowclass name="campaignsmall"> <datasource name="campaign" /> <defaultsize width="200" height="27" /> <sheetdata> <windowopencontrol name="open"> <icon normal="button_openwindow2" pressed="button_openwindow2down" /> <bounds rect="0,0,24,24" /> <class name="campaign" /> <description field="name" /> </windowopencontrol> <stringcontrol name="name"> <bounds rect="30,2,120,20" /> <link handler="open" underlineoffset="-2" /> </stringcontrol> </sheetdata> </windowclass> <windowclass name="campaign"> <datasource name="campaign" /> <frame name="referencebox" /> <dynamic resize="vertical" /> <defaultsize width="400" height="400" /> <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> </root> <!-- End of reference.xml -->
Code:<root> <node name="campaign"> <node name="MyCampaign"> <stringvalue name="name" value="Campaign" /> <formattedtext name="text"> <h>My Campaign</h> <p>Hello World, this is my campaign information</p> </formattedtext> </node> </node> </root>
Code:<staticdata source="rulesets\AD&D_UA\database\campaign.xml" />
-
August 11th, 2005, 04:20 #4
- Join Date
- Jun 2005
- Posts
- 43
Sorry for the delay in responding. This is just what I needed. Thank you so much for your time.
I have now added in my own content off a new custom reference window.
Thanks again,
Tom / Doc4
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks