STAR TREK 2d20
  1. #1
    Insanity's Avatar
    Join Date
    Mar 2007
    Location
    Terra, Sol system
    Posts
    198

    Challenges with custom rulesets

    I've been having a bit of trouble in getting my custom ruleset to work the way I want it to. I've been using the default d20 as an example, but still having some problems. Here is the part I am having trouble with now:

    The situation, d20 D&D has spells, in my ruleset they're called matrices. Some different description, i.e. duration, range, etc...

    I think my problem is in the reference file I've made. What I want to happen, is to go from the race description, I have a linklist to bring up all the a list of the appropriate matrices, which is working. Then from that list, when a specific matrix is clicked on, it brings up a more detailed description of that matrix. Virtually identical to how in the d20 it goes from class, to class spell list, to individual spell. However I cannot get the specific descriptions to appear, and I have not figured this out.

    This involves, to my knowledge, the reference.xml, matrices.xml, matricesdesc.xml files, which I have made. The matrices.xml and matricesdesc.xml files follow the same format as the spelllist.xml and spelldesc.xml d20 files.

    here is my reference file section pertaining to the part to go from race to matrices list, which works
    [PHP]<windowclass name="matricessmall">
    <datasource name="matrix" />
    <defaultsize width="600" height="20" />
    <sheetdata>
    <windowopencontrol name="open">
    <icon normal="button_openwindow" pressed="button_emptytarget" />
    <bounds rect="8,0,24,24" />
    <class name="matrixdesc" />
    <description field="name" />
    </windowopencontrol>
    <numbercontrol name="power">
    <bounds rect="30,0,20,17" />
    <font name="chatfont" />
    </numbercontrol>
    <stringcontrol name="name">
    <bounds rect="50,2,300,17" />
    <font name="chatfont" />
    <link handler="open" />
    </stringcontrol>
    <stringcontrol name="shortdescription">
    <bounds rect="200,2,360,17" />
    <font name="chatfont" />
    </stringcontrol>
    </sheetdata>
    </windowclass>

    <windowclass name="matrices">
    <datasource name="matrices" />
    <frame name="referencebox" />
    <dynamic resize="vertical" />
    <defaultsize width="640" height="550" />
    <minimize icon="minimized_reference" />
    <sheetdata>
    <windowopencontrol>
    <icon normal="button_dragtarget" />
    <bounds rect="25,20,20,20" />
    <class name="matrices" />
    <description field="description" />
    </windowopencontrol>
    <stringcontrol name="description">
    <bounds rect="50,20,-25,20" />
    </stringcontrol>
    <windowlist class="matricessmall" name="list">
    <bounds rect="35,48,-20,-22" />
    <sort fields="name,power" />
    <nestdata />
    </windowlist>
    <filter>
    <bounds rect="18,-65,21,41" />
    <icon name="search_icon" />
    <entrymode frame="searchframe" bounds="18,-95,-80,77" textarea="37,45,-3,-12" />
    <target name="list" field="name" />
    </filter>
    <scroller>
    <bounds rect="-63,-45,45,27" />
    <target name="list" />
    <button normal="button_scroller" pressed="button_scroller_down" />
    </scroller>
    </sheetdata>
    </windowclass>
    [/php]
    all that works except for the next part, which is where I am trying to get the specific matrix description pop up.
    [php]
    <windowclass name="matricesdesc">
    <datasource name="matricesdesc" />
    <frame name="itembox" />
    <dynamic minvmargin="10,15" />
    <defaultsize width="350" height="500" />
    <minimize icon="minimized_reference" />
    <sheetdata>
    <windowopencontrol>
    <icon normal="button_dragtarget" />
    <bounds rect="10,10,20,20" />
    <class name="matricesdesc" />
    <description field="name" />
    </windowopencontrol>
    <stringcontrol name="name">
    <bounds rect="45,10,-15,20" />
    </stringcontrol>

    <group id="a">
    <stringcontrol name="type">
    <bounds hpos="15,-15" vmargin="10,0" />
    <font name="chatfont" />
    </stringcontrol>
    </group>

    <group id="b">
    <stringcontrol>
    <bounds hpos="15,-15" vmargin="5,0" />
    <static value="Generation Time:" />
    <font name="narratorfont" />
    </stringcontrol>
    <stringcontrol name="generationtime">
    <bounds hpos="115,-15" vmargin="5,0" />
    <font name="chatfont" />
    </stringcontrol>
    </group>

    <group id="c">
    <stringcontrol>
    <bounds hpos="15,-15" vmargin="5,0" />
    <static value="Boost:" />
    <font name="narratorfont" />
    </stringcontrol>
    <stringcontrol name="boost">
    <bounds hpos="115,-15" vmargin="5,0" />
    <font name="chatfont" />
    </stringcontrol>
    </group>

    <group id="d">
    <stringcontrol>
    <bounds hpos="15,-15" vmargin="5,0" />
    <static value="SMR:" />
    <font name="narratorfont" />
    </stringcontrol>
    <stringcontrol name="smr">
    <bounds hpos="115,-15" vmargin="5,0" />
    <font name="chatfont" />
    </stringcontrol>
    </group>

    <group id="e">
    <stringcontrol>
    <bounds hpos="15,-15" vmargin="5,0" />
    <static value="Range:" />
    <font name="narratorfont" />
    </stringcontrol>
    <stringcontrol name="range">
    <bounds hpos="115,-15" vmargin="5,0" />
    <font name="chatfont" />
    </stringcontrol>
    </group>

    <group id="f">
    <stringcontrol>
    <bounds hpos="15,-15" vmargin="5,0" />
    <static value="Duration:" />
    <font name="narratorfont" />
    </stringcontrol>
    <stringcontrol name="duration">
    <bounds hpos="115,-15" vmargin="5,0" />
    <multiline spacing="15" />
    <font name="chatfont" />
    </stringcontrol>
    </group>

    <group id="g">
    <stringcontrol>
    <bounds hpos="15,-15" vmargin="5,0" />
    <static value="Area of Effect:" />
    <font name="narratorfont" />
    </stringcontrol>
    <stringcontrol name="aoe">
    <bounds hpos="115,-15" vmargin="5,0" />
    <font name="chatfont" />
    </stringcontrol>
    </group>


    <group id="h">
    <formattedtextcontrol name="description">
    <bounds hpos="10,-15" vmargin="25,0" />
    <font normal="chatfont" bold="narratorfont" italic="chatitalicfont"

    bolditalic="chatbolditalicfont" title="titlefont" />
    <linkicon link="button_openwindow" emptylink="button_emptytarget" />
    <selectioncolor value="#FFD296" />
    </formattedtextcontrol>
    </group>

    <scroller>
    <bounds rect="-63,-45,45,27" />
    <target name="description" />
    <button normal="button_scroller" pressed="button_scroller_down" />
    </scroller>
    </sheetdata>
    </windowclass>[/PHP]

    here is a short sample of my matrices.xml file, the whole file is divided into three types, much like the spelllist is divided into the different classes.
    [php]
    <root>
    <node name="matrices">
    <node name="empath">
    <stringvalue name="description" value="Empath Matrices" />
    <node name="matrix">
    <node name="clairaudience">
    <stringvalue name="name" value="Clairaudience" />
    <intvalue name="power" value="1" />
    <stringvalue name="shortdescription" value="Hearing checks +50" />
    </node>
    </node>
    </node>
    </node>
    </root>
    [/php]

    and then this is a sample of my matricesdesc.xml file
    [php]
    <root>
    <node name="matricesdesc">
    <node name="clairaudience">
    <stringvalue name="name" value="Clairaudience" />
    <stringvalue name="type" value="Empath 1" />
    <stringvalue name="generationtime" value="2 seconds" />
    <stringvalue name="boost" value="1 minute per point" />
    <stringvalue name="smr" value="None" />
    <stringvalue name="range" value="Self" />
    <stringvalue name="duration" value="1 minute" />
    <stringvalue name="aoe" value="Self" />
    <formattedtext name="description">
    <p>The Chatilian focuses his hearing sense. The Matrix increases hearing checks by +50.</p>
    </formattedtext>
    </node>
    </node>
    </root>
    [/php]

    near as I can tell, my reference file should use the matrices and matricesdesc files in the same manner. I am not an expert with xml either, so any help is appreciated.

  2. #2
    Your matricesmall control is looking for a windowclass called matrixdesc which I don't see.

    Is the windowclass in the second node block supposed to be called matrixdesc instead of matricesdesc?

  3. #3
    Insanity's Avatar
    Join Date
    Mar 2007
    Location
    Terra, Sol system
    Posts
    198
    Well, I knew it had to be a typo error of mine. That's what happens after creating a database with over 1000 lines. Thanks for the extra set of eyes.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in