Thread: Extension Compatibility
-
August 19th, 2017, 05:31 #1
Extension Compatibility
Hey all,
I'm trying to make my extension more co-extension friendly but am not sure how to go about it. What are the general guidelines you use when writing an extension to make sure other extensions don't override it (or get overridden)?
My specific example is that part of my extension for 5E (vitality and improved criticals) modifies the main character tab, and other extensions (hero points) get overridden and don't work.
Thanks.
-
August 19th, 2017, 05:42 #2
The main areas to look at are:
1) Using merging attributes in the XML - don't copy/paste the whole XML file. Look at the windowclasses you're changing and then only merge in your changes wherever possible. See info here: https://www.fantasygrounds.com/wiki/...Merge_Behavior And also seeach for merge in the forums for many more example. Also look at the 5E ruleset for merge examples - use "find in files" to find examples.
2) If you're changing LUA functions in global packages then try to override the functions, don't include the whole .lua file if you're just making small changes.
But, in the end it will sometimes be impossible to make your extension play nicely with all other extensions. Do your best, and please document any clashes/compatibility issues in your extension thread.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
August 19th, 2017, 15:28 #3
Thanks Trenloe! I'll throw an update here if I need additional advice that hasn't been answered already.
-
August 24th, 2017, 01:21 #4
Good Morning,
I am trying to make a ext to a rule set I have a template .
Code:<template name="number_charabilityscore2"> <basicnumber> <frame name="adnd_square" /> <anchored to="statstitle" position="insidetopleft"/> <rollable /> <readonly /> <min>1</min> <max>25</max> <default>9</default> <font>arial-bold-12</font> <script file="campaign/scripts/number_abilityscore.lua" /> </basicnumber> </template>
Do I have to keep the whole Template or can I make the template with only the frame tag in it with a merge option?
-
August 24th, 2017, 04:13 #5
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks