PDA

View Full Version : Extension interaction - Attn .ext users and .ext developers (soliciting comments)



Minty23185Fresh
September 17th, 2016, 19:23
Extension interaction - when two or more extensions are being used and they interact negatively. Whether you're a user of extensions or a developer of extensions, you're more likely than not, going to face this problem at some point.

I'd like to accomplish two things by introducing this thread.
1. Eventually develop a guide for extension users that provides instructions for troubleshooting negative extension interaction.
2. Solicit ideas from both extension users and extension developers to help effect goal number one.

I'll volunteer to write "the guide" unless someone else would prefer that they do it. Not everyone likes my, typically verbose, writing style.

Thanks to all, in advance, for your suggestions, comments and/or criticisms.

damned
September 18th, 2016, 04:26
Usually the two developers have to stick their heads together.... sometimes this works... and sometimes it doesnt.


https://www.fg-con.com/wp-content/uploads/2016/09/fgcon9-sig7.jpg (https://www.fg-con.com/events/)
FG Con 9 – Fantasy Grounds Online RPG Convention - October 14-16 2016
Register at www.fg-con.com (https://www.fg-con.com/) for all the latest info.

Minty23185Fresh
September 18th, 2016, 05:54
Usually the two developers have to stick their heads together.... sometimes this works... and sometimes it doesnt.
Yeah. I was figuring that was the direction developers would have to go, but first you have to get there. I have a user using my extension plus seven other extensions besides mine. I can't get it to misbehave, probably because I can't set everything up exactly the way the user does. I'd like to get the user to help me figure out which one or two of the others don't like my extension. A step-by-step guide the user could follow to narrow down the possibilities. But a guide generic enough that it could be used by any other developer in the same boat in the future.

dulux-oz
September 18th, 2016, 06:17
In a situation like the one you describe the simple way we trouble-shot it is to get the user to "turn off" each Extension one by one until things start to work. Obviously, the last Extension "turned off" is the one causing trouble.

Also, you can use the "/console" command from the Chat Box to pull up the Console Window. This is useful as it shows any warning or code errors along with the relevant location details which is also useful in troubleshooting.

Cheers

Trenloe
September 19th, 2016, 01:53
Yep, as Dulux mentions, it's a one-by-one trial-and-error process to identify which extension might be clashing. This is the best way for a non-techie to identify where the issue/s lie.

If you want to get techie you can dive into the actual code of each extension and see where code might be shared and clash. But this is much more work than just turning off extensions and also relies on the extension developers using standard/original filenames to assist in narrowing down code - if they aren't then you're going to have to look at individual windowclass entries, and perhaps down to individual control/LUA functions. Lots of work.

LordEntrails
September 19th, 2016, 21:17
Question/Idea... (and I'm not developer/coder)
I did notice when I created my custom decal extension that I noticed a few things that might cause conflicts with other extensions, but 1) I don't know enough to know if that's true, 2) I wouldn't know best practices to prevent such conflicts.
Maybe those are things that could be documented/addressed?

Such as
"loadorder" what should this value be and what impact does it have?
Also "OptionsManager.addOptionValue("DDCL","option_val_DDCL_custom21" " I just chose to start at 21, in hopes that others were using lower numbers, but...

dulux-oz
September 20th, 2016, 03:02
LoadOrder is the order that an Extension will load in. Lower numbered LoadOrders will load before higher number ones. Its a relative value that has no meaning unless other Extensions also have a LoadOrder.

As a general Rule all the DOEs have a LoadOrder of 50 (apart from the DOE: Base, which has a LoadOrder of 40 to make sure it loads before the others do. This is documented in each DOEs Manual (.mod).

As to what other Extension Devs set their LoadOrder to, if they set it at all, is up to them.

MNSHO is that it is best practice for the LoadOrder to be set and the setting to be documented in the Extension's documentation.

I've never used the "option_val_ DDCL_customXXX" so I can't really comment on it - but setting it as LE has is probably a good idea :)

Cheers

Trenloe
September 20th, 2016, 03:16
Also "OptionsManager.addOptionValue("DDCL","option_val_DDCL_custom21" " I just chose to start at 21, in hopes that others were using lower numbers, but...
This isn't FG code specific. i.e. FG doesn't expect the option name (second argument) to be anything specific. It is just a label name that needs to match to a string resource value elsewhere, I suggest you use something that is unique to your specific decal.

For example, here's what I use to add 4 options for AAW games Into the Wintery Gale (IWG). I've highlighted two entries in colour - red is the string resource name that appears in the decal option selection, and green is the matching icon resource name for the decal image file to display. As long as these two options (string resource name - red, icon resource name - green) match to relevant FG resources then it really doesn't matter what they're called, as long as they don't clash with other resources of the same type.

<base>
<script name="IWGDesktopDecals">
function onInit()
OptionsManager.addOptionValue("DDCL", "option_val_DDCL_IWG1", "desktopdecal_IWG1", true);
OptionsManager.addOptionValue("DDCL", "option_val_DDCL_IWG2", "desktopdecal_IWG2", true);
OptionsManager.addOptionValue("DDCL", "option_val_DDCL_IWG3", "desktopdecal_IWG3", true);
OptionsManager.addOptionValue("DDCL", "option_val_DDCL_IWG4", "desktopdecal_IWG4", true);
end
</script>

<!-- Custom theme option strings -->
<string name="option_val_DDCL_IWG1">IWG GM Screen 1</string>
<string name="option_val_DDCL_IWG2">IWG GM Screen 2</string>
<string name="option_val_DDCL_IWG3">IWG GM Screen 3</string>
<string name="option_val_DDCL_IWG4">IWG GM Screen 4</string>

<!-- Custom theme textures -->
<icon name="desktopdecal_IWG1" file="graphics/decals/GM-SCREEN-001.PNG" />
<icon name="desktopdecal_IWG2" file="graphics/decals/GM-SCREEN-002.PNG" />
<icon name="desktopdecal_IWG3" file="graphics/decals/GM-SCREEN-003.PNG" />
<icon name="desktopdecal_IWG4" file="graphics/decals/GM-SCREEN-004.PNG" />
</base>

LordEntrails
September 20th, 2016, 16:46
On Loadorder. Let me try to understand implications. If one extension is dependent upon another, then the 'parent' has to load first (makes sense). Now, if two extensions conflict, the one loaded last wins?

If that's the case, couldn't we agree that some extension types are more "important" than others? (Yes I know, each extension developer thinks theirs is the 'da bomb!' and therefore should load last...) But, for those that care to work nicely with others, or at least fail in some sort of predictable order...

If so, then couldn't we prioritize extensions like decals, themes and cosmetic type to be a lower "importance" than ones like rulesets or enhanced capabilities?

Minty23185Fresh
September 20th, 2016, 21:01
... couldn't we prioritize extensions like decals, themes and cosmetic type to be a lower "importance" than ones like rulesets or enhanced capabilities?

I don't know that this is possible... I suppose Smiteworks does this by default by deciding which functionality to include in a next release :) If I understand the concept correctly it would almost require some sort of committee (made up of developers/users) to determine importance, pertinence and value. We all know how well committees work out. Plus there are some developers that such practices might stifle their creativity (a.k.a. "roadblocks").

In my opinion, one deciding factor is complexity. EVOE is hugely complex. I never dreamed it would touch so much stuff when I first started this project, though Moon Wizard hinted at it. I believe that it is my responsibility to play nice with others. It is simply arrogance for me to believe that others should unscramble my code when there is so much of it. Proper coding practices definately helps but at some point two developers working in isolation from one another are certainly going to step on the other's toes.

LordEntrails
September 20th, 2016, 22:35
I would think general suggestions would be possible, but don't know if they would ever be used.

Something like:
decals and background should be in the 10-25 loadorder
chat related in the 25-50 range
new functionality in the 50-75
rulesets in the 75-100

But I don't know if any of that makes sense or would even in reality be helpful. Just an idea trying to help with the OP.

Moon Wizard
September 20th, 2016, 22:42
Actually, probably the reverse order. Functionality should load first (i.e. lower numbers), and modifications and theming should load last (i.e. higher numbers).

Rulesets will always load first, and the layers will load in the order defined by the selected ruleset for the campaign.

Cheers,
JPG

Minty23185Fresh
September 20th, 2016, 23:18
Thank you everyone for your input. The above discussion begs the possibility of two documents, a best practices for extension developers and a troubleshooting guide for extension users (and developers to give to their users).

Below is a first cut for the troubleshooting guide. I would like for it to be a "living document", we've put in a bit of work here and it would be great if that work didn't have to be repeated. Should you decide to review it please be brutal, spelling, punctuation, grammer, concisness and precision are all fair game.

I don't care who the author is, should the guide become sticky, maybe a forum moderator should be the owner/publisher, allowing modification/revision as necessary in the future.

Again thanks for all your suggestion and insite.

The guide begins ----> see post 18 for the guide...

EDIT: removed guide for editing, I will revise and repost...
EDIT:EDIT: revised step #1 from start with just offending extension to use consoles

LordEntrails
September 21st, 2016, 00:04
Instead of starting will all extension enabled, what about testing by enabling the offending extension and one other extension at a time? Wouldn't this help to identify quicker if two or more extensions were causing the behavior? (or multiple undesirable behaviors?) Also, is there a need to create a new "clean" campaign to do the testing in?

Minty23185Fresh
September 21st, 2016, 15:21
Instead of starting will all extension enabled, what about testing by enabling the offending extension and one other extension at a time? Wouldn't this help to identify quicker if two or more extensions were causing the behavior? (or multiple undesirable behaviors?) Also, is there a need to create a new "clean" campaign to do the testing in?

Sorry for the delay in responding. I wanted to think on this, get my thoughts in order. Lord Entrails, your idea is sound and a viable option. Actually one that the developer probably starts from to try to repeat the problem and then fix it. It's pretty much how I approached the issue. New campaign, load offending (my) extension and check for the issue reported by the user. Then add each of the extensions the user said he/she uses, one at a time, testing each time for the problem. Difficulty was I never observed the problem.

Whereas if we (the user) starts from where they observe the problem, the "dirty" environment, and works "backwards" until the issue disappears, we'll arrive at the same solution, the interacting extension.

Thank you for your thoughts, they helped me deduce step one in the "guide" is wrong. First, it may actually be detrimental to finding the problem, since it will take the user closer to the "clean" environment. The user might muddy the waters by changing settings and not just extensions that are necessary for the problem to exhibit itself. Second, if the offending extension is the only issue, I.e. there is no negative interaction of extensions, then step two will eventually get the user there anyway. They'll remove one extension at a time until they only have the offending extension left.

I am going to remove the guide from post #13, edit it and repost.

LordEntrails
September 21st, 2016, 15:31
@Minty, good thoughts and I don't disagree. IMO, we need more of these documented solution/processes for issues we get asked in the forums regularly.

Minty23185Fresh
September 21st, 2016, 17:06
IMO, we need more of these documented solution/processes for issues we get asked in the forums regularly.

I couldn't agreed with you more. A perfect example of non-centralized, unorganized information is the Par5e threads. There is some really good information there for a really good application, but trying to ferret it out is, well frustrating to say the least, if not impossible. I've considered undertaking that as a project, distilling info from nosie, but I don't think I have the expertise with Par5e nor the stomach for it.

I think a community Wiki is the way to go. (I'm assuming I don't have Wiki privileges, I haven't tried.)

Minty23185Fresh
September 21st, 2016, 17:19
As stated previously, if you decide to critique this guide please be brutal. Everything is fair game, spelling, grammer, conciseness, accuracy, understandability.

Revisions: rewritten step #1 (use consoles)

Revised troubleshooting guide, starts now...

How to Troubleshoot Misbehaviors when Using Multiple Extensions

It’s common for GMs to want to use more than one community extension at a time. As an extension user you might be using 4, 5 or even more extensions. A new one is released by an extension developer that piques your interest, so you download and install it. And then things don’t work out as you’d hoped. Maybe the new extension just doesn’t work or maybe, with it loaded, some of the other extension’s functionality misbehaves. This is an indication of negative interaction between extensions. Let’s call the new extension the “offending extension”.

The extension developer is going to need your help. In order to find and fix the issue the developer must be able to reliably repeat the problem. It is highly unlikely that as the developer was working on their extension they had the exact same environment, i.e. the same extensions loaded, as you, the extension user. Given your list of extensions that you use, the developer could load them all up in an attempt to repeat the undesired behavior. However there are probably many other settings, specific to each extension plus those of the campaign and ruleset that may have to be identical to your settings for the problem to exhibit itself. It is virtually impossible for the developer to divine all these settings. Hence the developer’s need of your assistance. They will need to know all the steps you took to make the misbehavior exhibit itself.

Use the Console

#1 - Turn on the console.
As stated above, it is imperative that the problem be reliably repeated. One must be able to follow the same steps and observe the issue time and time again. If not, it’s going to be nearly impossible for the developer to observe and fix the problem. Once you can reliably make the extensions misbehave invoke the FG console for every instance of FG, player and GM alike. There are several ways to do this (see the **footnote below). Keep an eye on the console windows, report any messages to the extension developer.

Isolate the Negative Interaction

#2 - Unload extensions one at a time.
Now you’ll need to remove one extension at a time, always keeping the offending extension loaded, until the problem can no longer be repeated. As you restart FG each time, make sure your consoles are running. The last extension that was removed, when the aberrant behavior stopped, we’ll call the “interacting extension”. Inform both developers of this finding. The developers might ask you for environment files like the db.xml and/or campaign.xml files. It is possible, that you’ll remove all the extensions but the offending extension, in which case negative extension interaction does not exist. Instead the offending extension is not compatible with something in your campaign or other settings. Inform the developer of this; he/she will surely ask for the additional settings files.

Isolate Multiple Interactions

#3 - Reload the non-interacting extensions.
Having followed step two above, the offending extension and some of the other extensions will still be loaded. With the offending extension still loaded add each of the non interacting extensions, one at a time, again checking each time for undesired behavior. This helps, but is not guaranteed to, eliminate the possibility of multiple interacting extensions. As you restart FG each time, make sure your consoles are running. If you do notice a second or third interacting extension notify all extension developers of these findings. Again you might need to share environment data.

True, this is a lot of work for the extension user, but the extension developer can’t fix their extension without all the information they need to reliably repeat the problem. Once they have that information they can effect remedies and you both get what you wanted, you the user a cool new extension and the developer, a trouble free extension that everyone enjoys.


(**) Invoking the console.
(a) Type /console in the Chat Window and press enter, or
(b) Type /console in the Chat, then drag it to one of the hot buttons at the bottom of the FG desktop, or,
(c) Add /console to a desktop shortcut. If you have a Windows desktop shortcut that you use to start FG, duplicate it and then right click it and choose properties. Add /console to the target field, it will end up looking something like this:
"C:\Program Files (x86)\Fantasy Grounds\FantasyGrounds.exe" /console

The console should always be running as you work through the troubleshooting steps in this guide. If you just exit to the FG startup window as you remove extensions (step #2 above) or add them back in (step #3) the console will stay up. But if you exit completely from FG and restart it, options (b) or (c) above may be more appealing than constantly retyping /console in the Chat.

PandaGentil
September 10th, 2023, 22:42
Hi, I unloaded all of my extensions except yours and still got the same error:
[ERROR] Script execution error: [string "C:masterindexitem_id:link"]:6: attempt to index field 'list_category' (a nil value)

It happens every time i open the npc page or try to search npc by name.
The error doesnt show if the wildshape ext. is unload.

Any idea? Thanks!

LordEntrails
September 11th, 2023, 00:20
Hi, I unloaded all of my extensions except yours and still got the same error:
[ERROR] Script execution error: [string "C:masterindexitem_id:link"]:6: attempt to index field 'list_category' (a nil value)

It happens every time i open the npc page or try to search npc by name.
The error doesnt show if the wildshape ext. is unload.

Any idea? Thanks!
Duplicate post: https://www.fantasygrounds.com/forums/showthread.php?46890-Druid-Wild-Shapes-(for-5E)&p=697307&viewfull=1#post697307
Please do not post the same question in multiple threads.
Closing this thread since it is many years old.