PDA

View Full Version : Adding a button to an encouter



Olog
May 24th, 2018, 03:09
New to FG XML scripting. I've been examining some extension to figure things out. I'm looking to add a button to the encounter record. I see in "record_encouter.xml" where the "Add to CT" button logic is. Do I have to redefine the entire "battle" windowclass in my extension? If I try to extend it as follows I end up with just the button and no encounter record.


<root>
<base>
...my other code...
<windowclass name="battle">
<sheetdata>
<buttoncontrol>
...
</buttoncontrol>
</sheetdata>
</windowclass>
...
</base>
<root>


Is there a better way to accomplish this?

Trenloe
May 24th, 2018, 04:53
Use merge="join" in your windowclass

Info on this here: https://www.fantasygrounds.com/wiki/index.php/Developer_Guide_-_Rulesets_-_Layering#Window_Class_Merging

Olog
May 24th, 2018, 14:42
Exactly what I was missing. Thank you.

Olog
May 24th, 2018, 22:08
Hmmm. Now I'm having a Lua scripting issue. I'll create a new post.