DICE PACKS BUNDLE
  1. #1

    Ruleset ignoring XML parameters

    I'm trying to make a mini-sheet, and so far everything has worked well, except for this one bug which seems to be entirely arbitrary. I've created a basic frame, and set its bounds in relation to the minisheet. To that frame, I've anchored a modifier number.

    For some unknown reason, FG is ignoring the <height></height> parameter for that number's frame. It accepts the width, but not the height. And it only does this when I anchor the number control to that generic frame. I have checked, rechecked, and triple checked my XML syntax. I'm pretty sure the problem is not there, but I have no idea where else it could be, because there are no scripts linked to these elements.

    When I run the code, I get a console error that says "Ruleset Warning: Anchored control static height ignored" (in orange text if that matters).

    Here's the code. The element being ignored is in bold. Any help would be appreciated.
    Code:
    ...
                  <sheetdata>
                           <labeledstring name="name">
    				<bounds>15,25,120,20</bounds>
    				<label>name</label>
    				<static />
    			</labeledstring>
    
    
    			<genericcontrol name="combatframe">
    				<bounds>10,50,275,121</bounds>
    				<!--
    				<frame>
    					<name>modifier</name>
    				</frame>
    				-->
    
    			</genericcontrol>
    			
    			<genericcontrol name="initiativeframe">
                                    <bounds>125,15,100,30</bounds>
    				<frame>
    					<name>modifier</name>
    					<offset>5,5,5,5</offset>
    				</frame>
    
    			</genericcontrol>
    
    			<ministaticmod name="initiative" source="initiative.total">
    				<description>
    					<text>Initiative</text>
    				</description>
    				<anchored>
    					<to>initiativeframe</to>
    					<position>insideright</position>
    					<offset>3,5</offset>
    					<size>
    						<width>30</width>
    						<height>20</height>
    					</size>
    				</anchored>
    
    			</ministaticmod>
    			<stringcontrol>
    				<anchored>
    					<to>initiative</to>
    					<position>left</position>
    					<offset>5,-3</offset>
    				</anchored>
    				<static>Initiative</static>
    				<font>sheetlabel</font>
    			</stringcontrol>
    
    ...
    <ministaticmod> is a template I made for this, which is basically just a linked number with <readonly/>, and a couple other preset paramaters.

  2. #2
    Oberoten's Avatar
    Join Date
    May 2006
    Location
    Älvsbyn, Sweden
    Posts
    2,620
    Should the size controls be within the anchored tags?

    ** edit **
    Please ignore. I was having a blond moment.
    For your Ars Magica needs :
    https://fgrepository.com




    Atque in perpetuum frater, Ave atque vale.

  3. #3
    The template doesn't include <anchored> and/or the inner <size> node does it?
    It could be a problem with the merge rules. If it does include those nodes try using the replace mergerule in the template (i.e. <anchored mergerule="replace">)
    Work Less, Game More!

  4. #4
    I think I might have figured it out. It seems like all the center point anchors ignore one size parameter. Anchoring to a corner rather than "insideright" makes it consider the height parameter again. All the center point anchors seem to want an offset for at least one of their size parameters.

  5. #5
    Ah yes. I invariably fall back to using the more simple form:
    Code:
     
    <anchored>
      <left>
        <parent>label</parent>
        <anchor>right</anchor>
      </left>
      <top>
        <anchor>top</anchor>
        <offset>5</offset>
      </top>
      <size>
        <width>30</width>
        <height>22</height>
      </size>
    </anchored>
    You can achieve the same placement/sizing with either method but it's more obvious to me when it's done this way.
    Work Less, Game More!

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 Product Walkthrough Playlist

Log in

Log in