DICE PACKS BUNDLE
  1. #1
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1

    Help with Merge and Character Sheets

    I want to make a modification to the record_char.xml file.
    Id like to shorten the Name field and frame and add another frame in between name and portrait.
    Thats all straight forward if I copy the whole record_char.xml into my extension but Id like to just try to merge my changes in.
    This will make the extension usable in more rulesets and also make it far easier to maintain as rulesets may change these files in other ways over time.

    So far I havent been able to nut out where to put the merge tag and the right options to use.
    Any pointers?


  2. #2
    Here's an example that shortens the overview frame in the charsheet windowclass by 40 pixels on the right side.

    Code:
    <windowclass name="charsheet" merge="join">
        <sheetdata>
            <frame_char name="overviewframe">
                <bounds>15,20,-180,45</bounds>
            </frame_char>
        </sheetdata>
    </windowclass>
    Hopefully, this should give you a starting point.

    Once you define a windowclass definition as merge=join, it will try to combine the original definition with this one. When it gets to the sheetdata, it will specifically try to match controls with the same template and name combination and merge those too.

    Regards,
    JPG

  3. #3
    Skellan's Avatar
    Join Date
    Jul 2012
    Location
    Staffordshire, UK
    Posts
    2,479
    Dead interesting. I have been geeking out over fonts and it would be really handy to be able to nudge the frame sizes a bit. Does merge basically mean that it just changes the part that is different (in moon wizars's example, -140 to -180) and so it will be less likely to break if there are changes to the original?
    Ultimate License Holder - My games are free to play
    Timezone: GMT

  4. #4
    It's based on the XML tags merging or replacing each other. The merge attribute can also be used to "join"/"merge", "delete", "replace", "resetandadd", and "add".

    In the example above, since I provided a new value for the bounds tag, it overrides the original bounds tag when they're merged.

    Regards,
    JPG

  5. #5
    Skellan's Avatar
    Join Date
    Jul 2012
    Location
    Staffordshire, UK
    Posts
    2,479
    Got you. Cool thanks. I'll play around with it
    Ultimate License Holder - My games are free to play
    Timezone: GMT

  6. #6
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    Thank you Moon Wizard that worked perfectly.

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