DICE PACKS BUNDLE
  1. #1

    Some specific Tag Questions

    Hey friends,

    As I continue with my ruleset for Adventure! (a pulp themed game using White Wolf's storyteller system), I'm a little hung up on the ruleset_Adventure.xml file, with some specific tags. I'll include my limited sense of what I deduce, but please help me out. Currently I'm editing the npc_combat controls and trying to figure out the following tags.

    <group>
    Seems to group controls. How, for what, and how to reference them later I don't know.

    <bounds>
    This seems to set the boundaries of a control (group?), but why some hpos properties use positive coordinates and some use negatives is unclear; also, what is the vmargin property? Are these coordinates the same as are used for the other controls (horizontal, vertical, wide, tall)?

    <frame>
    Well I get the idea of frames by now, but what is the offset property?

    Also, when I looked at the actual controls for the saving throws versus those for the attributes on the NPC_Combat, they both appeared to be number controls, and I couldn't find any parameters that distinguished one from the other, but in the interface the saves use "+n" and the attributes use "n" where n is the number in question.

    Thanks in advance for your help!

  2. #2

    Re: Some specific Tag Questions

    Quote Originally Posted by Zane_Marlowe
    <group>
    Seems to group controls. How, for what, and how to reference them later I don't know.
    This grouping is used when dynamically resizing controls. The groups are laid out so that a set of controls (those defined in one group) use one common vertical section on the sheet. Controls in groups use a different format for the <bounds> tag, which takes us to...

    Quote Originally Posted by Zane_Marlowe
    <bounds>
    This seems to set the boundaries of a control (group?), but why some hpos properties use positive coordinates and some use negatives is unclear; also, what is the vmargin property? Are these coordinates the same as are used for the other controls (horizontal, vertical, wide, tall)?
    The hpos property is used exactly like the first and third parameters (x and width) for a <bounds rect="..." /> definition, i.e. the horizontal placement. In the NPC sheet example, the titles of the fields are laid out on the left, and the fields themselves on the right.

    The vmargin property defines the vertical margins you want to have on the upper and lower sides of the control, respectively. This allows you to make visual groupings to fields on the sheet by putting a bit more space between groups.

    The height of a group is determined to be the height of the element that takes up most space in that direction, and all the elements in that group are placed relative to a common top boundary.

    Quote Originally Posted by Zane_Marlowe
    <frame>
    Well I get the idea of frames by now, but what is the offset property?
    The offset consists of four numbers, defining the amount to offset the frame around the control bounds, for the left, top, right and bottom directions, respectively. It's used only to fine tune the appearance of a frame around a control. For example, (depending on the font, of course) many times it might make your text field look a bit snappier if you have a bit of a margin on the left, and a bit more margin on the top than on the bottom, to make the text not "float" too high above the base line of the frame graphic.

    Quote Originally Posted by Zane_Marlowe
    Also, when I looked at the actual controls for the saving throws versus those for the attributes on the NPC_Combat, they both appeared to be number controls, and I couldn't find any parameters that distinguished one from the other, but in the interface the saves use "+n" and the attributes use "n" where n is the number in question.
    The <displaysign /> element causes a number control to always show the sign, even if positive, which is convenient for most fields with a bonus type number.
    Tero Parvinen
    Fantasy Grounds Guru

  3. #3
    Old thread, new question.

    Some of the hpos and bounds parameters have negative numbers. I've worked around my ignorance here, but look at the following code sample from the d20_reference.xml:

    <windowclass name="monster_combat">
    <datasource name="monster" />
    <frame name="npcbox_combat" />
    <defaultsize width="270" height="400" />
    <sheetdata>
    ...
    <stringcontrol name="name">
    <bounds rect="45,12,-52,20" />
    <empty value="&laquo; Empty Monster Data &raquo;" />
    <createidentity />
    </stringcontrol>
    Note the name stringcontrol has a negative number in the third bounds rect value. I'd always thought this was read "x,y,width,height," for bounds, and that hpos tags (in groups) read "x,width," but what does a negative number mean if that's right?

    I'm actually documenting something and want to get this right. Thanks for your feedback.

  4. #4
    I was working with this way back and I think I figured out that it is a relative position with reference to the last group that was placed. I can't remember which number is which though.
    Honor et Gloria

  5. #5
    Positive numbers mean a static value (x, y, width, height). Negative numbers mean the values are relative to the bottom and/or right hand side of the sheet. This means you can either anchor the controls to the bottom or the right side, or you can anchor the lower right corner, so that it resizes with the sheet.

    This means that, for example, "-200,-200,100,100" produces the same result as "-200,-200,-101,-101". The control's x and y are calculated as 200 pixels above and to the left of the sheet's bottom right corner. In the first case, it has a static width and height, in the second, the width and height are obtained from the opposite corner that is also defined as x and y.

    The group/hpos system seems to be confusing to many (I can sort of see why...) and 1.06 will bring a new way of doing this. Basically you can anchor any side of a control to any side in another control. This should be a bit more intuitive I think, and will make maintenance and small tweaks a lot easier. The rect system will still be the same, since it seems to be easy and serve most users' needs in one line.
    Tero Parvinen
    Fantasy Grounds Guru

  6. #6
    This particular thread has aided me in my own work.

    I would like to pose a follow up. I have a field called talents (basically the same as the prior d20 skills) on the npc sheet.

    For readability, I enter in one skill.talent per line; thus a character with lots of these, will hage a very long entry. This of course, pushes any following groups off of the NPC page.

    Is it possible (and how) to have a scroller for the entire page?

    For example:

    Skills:
    1
    2
    3
    4
    5

    Talents:
    1
    2
    3
    4
    5

    Adding more skills to the bottom of the NPC-Other page would push Talents off the page. How can I add a scroller to the entire page so that I can view ALL of the material on the page?

    Thanks in advance!

  7. #7
    I have a question about the scroller tag. Is it possible to add a scroller tag to a stringcontrol that is using the multiline tag? I have not been able to get it to work. Wanting a Notes sort of section on a character sheet and provide the ability to have pretty long entries with the ability to scroll. Is this possible?
    • snikle •
    . .lapsus calumni. .

  8. #8
    Hey snik, you ever figure out how to add the scroller to a stringcontrol? I created a "background" section on a charsheet and it's just one big stringcontrol which can get huge. Would love to be able to scroll it somehow.

  9. #9
    Meatball: After reading a thread on here about a data limit on stringcontrols, I changed the History tab of our charsheet to a formattedtextcontrol, which I've also targeted with a scroller.
    That's all for now...
    realistik

  10. #10
    Quote Originally Posted by realistik
    Meatball: After reading a thread on here about a data limit on stringcontrols, I changed the History tab of our charsheet to a formattedtextcontrol, which I've also targeted with a scroller.
    Thats a cool idea, wish I'd thought of it
    Makes a text field that the user can format (bold, italic, bulleted lists, etc) and even add their own links (to notes and anything in the d20 reference)

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
  •  
STAR TREK 2d20

Log in

Log in