PDA

View Full Version : [5E ruleset] Character actions tab and ruleset layering question



Claneidosyan
January 15th, 2019, 15:39
Hi, I was trying to update my 5E action abilities extension and I was trying to make it more compatible by merging the xml files.
Basically this extension adds a fixed bar with checks and saves on top of the Actions tab of the character sheets.

I changed the name of the file, moved the extension code to its own subwindow and changed it like this:

<windowclass name="charsheet_actions" merge="join">>
<sheetdata merge="join">
<subwindow name="action_abilities">
<anchored position="insidetop" offset="5,5" />
<class>actionabilities</class>
<activate />
<fastinit />
</subwindow>
</sheetdata>
</windowclass>

the actionabilities class is defined later in the file.

Activating the extension like this only shows the contents of my subwindow and nothing else from the 5E ruleset.
My subwindow contents work correctly, though.

I tried adding just the definition of the content subwindow, changing its anchor offsents, like this:

<windowclass name="charsheet_actions" merge="join">>
<sheetdata merge="join">
<subwindow name="action_abilities">
<anchored position="insidetop" offset="5,5" />
<class>actionabilities</class>
<activate />
<fastinit />
</subwindow>

<subwindow name="contents" merge="replace">
<anchored>
<bottom offset="-40" />
<top offset="75" />
<left offset="0" />
<right offset="-15" />
</anchored>
<class>charsheet_actions_contents</class>
<activate />
<fastinit />
</subwindow>
</sheetdata>
</windowclass>
This way my old character show their weapons and powers/spells, but no scrollbar is shown, no buttons and no way to drag and drop spells on the page. It seems I'm not managing to merge the two files.

Looking at other examples I thought this was the way to do it, am I missing something?

Moon Wizard
January 16th, 2019, 05:15
Your merge is trying to do too much; and your top subwindow is probably overlapping your lower window, since you didn't provide a height for action_abilities.

Without actually knowing or having your code, you could try this:


<windowclass name="charsheet_actions" merge="join">>
<sheetdata>
<subwindow name="action_abilities" insertbefore="contents">
<anchored position="insidetop" offset="5,5" height="65" />
<class>actionabilities</class>
<activate />
<fastinit />
</subwindow>

<subwindow name="contents">
<anchored>
<top offset="75" />
</anchored>
</subwindow>
</sheetdata>
</windowclass>


Regards,
JPG

Claneidosyan
January 16th, 2019, 19:21
Wow... it worked! Thank you!
I think I understand the merge a little better now! :D