PDA

View Full Version : help with FG module development



spoofer
July 19th, 2020, 00:31
Hi all,

I am creating a module of OSR tables for my FG game. I create the module by converting a txt file to db.xml using Python. I then load up FG and look at the result. I make mistakes and then need to debug the code. After doing so, I create a new db.xml, and overwrite the old one. However, FG does not reflect the changes that I have made to the module. The only way I can get the new version to show is by making a completely new campaign. I tried /flushdb, and also unloading and reloading the module, but neither worked. I have created an image (pasted below) in which I loaded FG twice, once with an old campaign and once with the new campaign. The loaded module is exactly the same for both. You can see the buggy version on the left and the fixed version on the right.

How can I get FG to reflect my changes to my modules without creating a new campaign?

Thanks.

K.

37834

Moon Wizard
July 19th, 2020, 01:00
The module should load without any changes; unless the data is getting modified when opening in the ruleset for some reason. You can remove the moduledb/ directory in between loads if that's what is happening.

JPG

Zacchaeus
July 19th, 2020, 01:02
Try right clicking on the module in module activation and select revert changes.

If you overwrite a module whilst it is open in FG you need to close and reopen it to see the changes. You should not need to open a new campaign or even close the existing one. I can only assume it has something to do with the way you are creating the module but I have no snake knowledge so I don’t know,

Flushing the database just clears out shared data so that would not help.

spoofer
July 19th, 2020, 02:10
Try right clicking on the module in module activation and select revert changes.

This is exactly what I was looking for. That works like magic. I was not aware of that functionality. Thanks!!!! Knowing this little tidbit is going to make the process so much smoother. :):):)

damned
July 19th, 2020, 09:05
spoofer go into the library and unload/load the module and it will pick up the new version

spoofer
July 19th, 2020, 09:22
spoofer go into the library and unload/load the module and it will pick up the new version

As I mentioned in my op, this definitely does not work. However, right clicking and choosing to reset the mod works. That is what I needed to know.

Thanks for responding.

damned
July 19th, 2020, 11:11
Unless you also make an edit to the module INGAME the load/unload should work.
That is how I always do stuff.
Do these tables have the Book and Pen Icon on them indicating they have been changed?

Do you have a /moduledb folder with an XML file matching your module in it?