-
March 3rd, 2016, 01:34 #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?
-
March 3rd, 2016, 18:31 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
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>
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
-
March 4th, 2016, 00:30 #3
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
-
March 4th, 2016, 01:12 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
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
-
March 4th, 2016, 01:48 #5
Got you. Cool thanks. I'll play around with it
Ultimate License Holder - My games are free to play
Timezone: GMT
-
March 4th, 2016, 12:38 #6
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