Log in

View Full Version : What to include in an extension?



Hamish
March 5th, 2011, 10:17
From experience I know that if you want to include a script file in an extension, you also have to include the xml of the component referencing the script file. So for example I made changes to characterlist.lua, so in the <base> part of extension.xml I also had to include a copy of the <windowclass name="characterlist"> part of desktop_classes.xml, because that's where the characterlist.lua file is included.

Now I want to make changes to the combat tracker, but that is a complex structure with at least 2 xml files and 13 lua files. Do I have to include them all if I want to make changes to just 1 or 2 of them? What are the rules for extensions and extension.xml? How does the overruling of the basic ruleset work?

Moon Wizard
March 5th, 2011, 18:39
You only need to replace the "named" components that you are editing.

For example, if you are only editing the combattracker_entry windowclass and the associated ct_entry.lua files, then those are the only elements you need to replace in the extension. You wouldn't need to replace combattracker_common.lua, ct.lua, combattracker windowclass, etc.

Regards,
JPG

Hamish
March 6th, 2011, 09:04
That sounds simple enough. Thanks!
Do I need to include all script files specified in the named component I replace? For example, I have included a new version of the combattracker_entry_pc windowclass, which uses both combattracker_entry.lua and combattracker_entry_pc.lua. I have not made any changes to combattracker_entry.lua, do I need to include it anyway?

Bidmaron
March 7th, 2011, 04:47
You only need to include what you are changing, and that includes within a file. That is, within combattracker_entry.lua, if there was a template called bananabutton you needed to change and one called orangebutton you didn't, you only need to include the bananabutton in your extension.

Moon Wizard
March 13th, 2011, 01:19
If you have a script tag in an object defined in an extension XML file, then the script file needs to be in the extension as well.

Regards,
JPG