PDA

View Full Version : Unusual Module Behavior



Nickademus
June 6th, 2015, 03:47
So I've been noticing some unusual behavior with the modules I have opened in my main campaign and I thought I'd thrown this out here in case it is a bug or something important.

When editing the actual module files (with Notepad++ out of WinRAR), I find that FG frequently will close all of open modules in my game. It will still have the module data loaded and some of it can be accessed in the library and in the individual windows. But other data will produce the chat window message "Could not load data from unloaded module" when the link is clicked on.

Furthermore, all the permissions granting access (green check mark) or force loaded (yellow lit bolt) and some of the denied access (red X) are removed and have no setting in the Activation Window. It seems the modules that use db.xml remain access denied, while anything using client.xml or common.xml are reset.

It also seems to be triggered when I make a mistake in the module I'm editing and have a bad link that will cause a console error.

Zeus
June 6th, 2015, 09:57
Not sure its a wise thing to edit module XML files outside of FG whilst FG also has them open as FG maintains a cache of the changes to module data. Any changes made outside of FG will have an adverse effect as you have observed. Better to close the module in FG before making any changes externally and then re-opning after you have finished your edit. For module development I use an out of band copy of the module XML for editing/making changes and then once finished copy the resulting XML back into the modules subfolder. In FG the module is closed, any moduledb cached data reverted and then the module is re-opened. This ensures a consistent view of the module XML and results in no errors (console or chat window).

Nickademus
June 6th, 2015, 12:39
Perhaps I misspoke (mistyped). I do close the module book, just not FG. I edit in Notepad++, close the book in FG, save in N++ and confirm WinRAR to repack the zip, then open the book in FG. It's when I go to reopen the book that this happens. It has even happened when I've closed FG before saving the module changes. I'll reopen FG, open the Module Activation Window and all the books are closed. Though the Image and NPC windows and such still have the module data loaded.

Trenloe
June 6th, 2015, 16:15
I think this was reported prior to 3.1.0 and may have been fixed 3.1.0 - although I can't find the specific patch note. Have you upgraded to 3.1.0?

Additionally - you can now do module development similar to extensions. i.e. Using a sub directory in the <FG app data>\modules directory. No need to keep repacking your .mod file while doing module development.

Nickademus
June 6th, 2015, 21:29
Yes, I upgraded prior to the last few times I've seen this happen. Also, I don't repack my .mod file exactly. WinRAR doesn't unpack it, so when I save a file it automatically repacks the zip. I only mention it because the act of repacking the module has effects in FG, like deleting the module file in the moduledb folder (unless that change was this past update).

Trenloe
June 7th, 2015, 01:55
I only mention it because the act of repacking the module has effects in FG, like deleting the module file in the moduledb folder (unless that change was this past update).
Yes, the update to stop that happening was in 3.1.0.