View Full Version : Help needed fixing broken campaign using custom module.
Skyjoos
April 19th, 2021, 19:32
Was unsure whether this would have been better posted to the support forum but as it's my custom module I was hoping you guys might have some insight as to what's broken.
Campaign db originally started life as Classic but has since been loaded in Unity and this is now where it is used. Same goes for my mod file. My module works fine if I load it into a new campaign.
So I have a dungeon masters screen mod with crib sheets, maps etc. I recently edited the campaign from which the module is exported with some new stuff and exported what would essentially be a version release. However, whenever I load the game campaign and the new module many of the maps that have been edited during the game campaign wont open from the new module. I get the pins and the drawing layers but it doesn't load the underlying map file. There's a red question mark in the middle of the window.
In my Assets window when I open the module folder I now have two copies of the same map, one I'm able to preview with a thumbnail the other not. If I try and load them into Images I get two copies of the same file except one have @modulename list at the end and again neither will load the image.
It feels like I've managed to loose some references somewhere in the db or module.xml file but I can't work out where they are.
I'm no coder but I can find my way around an xml file. Any help would be appreciated and happy for this post to be moved to the support forum if that's a better place for it.
TIA.
Zacchaeus
April 19th, 2021, 19:48
I've moved your post here since it's not really a question for the armoury.
I'm a little confused as to where you are opening this module. If you are trying to open a module created in Unity in Classic then that won't work.
You say the db.xml was originally ion Classic and you moved it to Unity. Did you also move the rest of the campaign folder into Unity? Did you move the images that you exported from Classic into Unity?
Unity handles images differently from Classic - so I'm guessing that you haven't added the images to the campaign that you are exporting from.
LordEntrails
April 19th, 2021, 22:12
Also note that you will need to make changes to your module in the original module creation/development campaign you created the original module in. And as Mr Z says, adding images in FGU is different than in FGC.
Skyjoos
April 20th, 2021, 11:10
Thanks for getting back to me.
I've moved your post here since it's not really a question for the armoury.
Thank you.
I'm a little confused as to where you are opening this module. If you are trying to open a module created in Unity in Classic then that won't work.
This is all now in Unity. The campaigns all started life in Classic but have since been migrated to Unity. I created a new module from the Unity campagin version and am loading it on a Unity game campaign.
You say the db.xml was originally ion Classic and you moved it to Unity. Did you also move the rest of the campaign folder into Unity? Did you move the images that you exported from Classic into Unity?
Yes, the campaign, images etc were all moved to Unity and then I generated a new mod file from it. If I start a new Unity campaign and load my module everything works as expected. The problem occurs when I load my module into the pre-existing game campaign (which is also now on Unity.) My feeling is that this isn't a Unity based problem as I encountered the same issues previously when updating the module and reloading it into a Classic game campaign pre Unity days.
Unity handles images differently from Classic - so I'm guessing that you haven't added the images to the campaign that you are exporting from.
Here's an img of my Assets/Images windows from the game campaign and the map when I try to open it. Hope it makes sense.
45895
EDIT: I've highlighted the wrong maps in the Assets window but the concept is the same for the Map - Area SwordCoast asset.
Zacchaeus
April 20th, 2021, 13:50
I'm not entirely sure what is happening but one possibility is that you've edited the maps in your play campaign - which means that the image in the play campaign will override the map in the module. The fact that everything is fine when you open the module in a new campaign suggests that the images in the play campaign are overriding the module version of the image. You could try right clicking over a problem image in the images and maps list and select revert changes to see if that solves the problem.
Skyjoos
April 20th, 2021, 15:09
Thanks Zac as that certainly works to make the maps available again which I'm most grateful for as I can at least now use them where as before I couldn't. As the name suggests though it does wipe out the extra things added to the maps during play such as pins and players notes. I was hoping there was a way, possibly by editing the xml files, to link the changes from the old map to the new map image. The map used by the campaign, as opposed to the module, must be referenced somewhere.
If anybody has come across this problem before and has experience in re-indexing the db to achieve this I would be most interested because if this is the only answer then every time I change the module then I'm going to lose any changes from the players as they progress through the campaign.
Zacchaeus
April 20th, 2021, 17:32
When you edit something from a module in a campaign the edits aren't written to the db.xml file but rather to a separate file in the moduledb folder inside the campaign. In this way your changes are retained in the campaign - otherwise when the module was updated it would wipe out any edits made. Thus any edits that you want to make to an image (or anything else) should be made only in your creation campaign and exported.
Skyjoos
April 20th, 2021, 18:06
Thus any edits that you want to make to an image (or anything else) should be made only in your creation campaign and exported.
Hmm, yeah odd. This is exactly how I do it.
Edit: although in the last edit I made I reorganized the Groups that the img files appear in. Perhaps this is what broke the references.
Zacchaeus
April 20th, 2021, 18:33
Hmm, yeah odd. This is exactly how I do it.
Edit: although in the last edit I made I reorganized the Groups that the img files appear in. Perhaps this is what broke the references.
In post #6 though you said that reverting changes wiped out map pins and player notes added to the maps. I assumed what you meant by that was pins and notes added to the map in your play campaign (otherwise revert changes would have no effect). Any kind of edit made in the play campaign will mean that edit will override the module.
Trenloe
April 20th, 2021, 19:08
Edit: although in the last edit I made I reorganized the Groups that the img files appear in. Perhaps this is what broke the references.
I'm guessing that there was some change while doing this that resulted in the module reference for the image changing.
I can recreate your issue by changing the image reference in the moduledb XML (that is used to track changes made to a module within a campaign) - shown in the screenshot below.
(More info below this image).
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=45902
The text editor in the lower left shows the image reference in the XML file in the campaign moduledb directory for the module containing the image. I changed the line highlighted to an image name in the same module that doesn't exist and you can see that the image now has the question mark on it.
When testing this, I did get an error appear in the console - saying "Graphic: Unable to load file ..." - did you get a similar error message?
If you still have this issue with at least one image (i.e. you haven't reverted changes) please attach the XML file for the module from the campaign moduledb directory so we can try to get to the bottom of what's caused/causing the issue.
Laerun
April 20th, 2021, 20:52
A couple of other things to remember, do not open your revised module or exported project in the exact same campaign folder that you created or exported from. Many of your changes, new links, and such will not show and you will have link issues.
Also, watch this video by "walking dude", and the 2nd one done by both of us about this issue regarding errors with images from older classic modules to Unity. You might have some image errors and potential text character issues. If this is actually linked to an AAW official MAp Pack module from the store, it will create an older image dependency from the original module, in which was originally linked or done in your older or classic FG campaign I assume? So, it may be that the path and the image attributes will be affected between both different platforms. And furthermore, exporting a module and reloading it in the 'same' folder you create from can cause issues too.
https://youtu.be/UkWmheaQ9DM
https://youtu.be/Uqi24oydcH0
45904
Skyjoos
April 21st, 2021, 11:28
When testing this, I did get an error appear in the console - saying "Graphic: Unable to load file ..." - did you get a similar error message?
If you still have this issue with at least one image (i.e. you haven't reverted changes) please attach the XML file for the module from the campaign moduledb directory so we can try to get to the bottom of what's caused/causing the issue.
Hey Trenloe, thanks for jumping in. Yes I did get the load error in the logs popping up and yes, I do still have some game campaign edited imgs that haven't been reverted. Attached is a zip containing the homebrew module xml file from the game campaigns moduledb folder as well as the db.xml from the game campaign folder.
As mentioned previously in my last edit of the homebrew module campaign before exporting I did reorganize the Groups structure that the imgs reside in.
Thanks for all the help folks it's really appreciated.
Trenloe
April 21st, 2021, 11:48
Does "Map - Faerun.jpg" work OK?
What is the directory structure within your module? Rename the file extension from .mod and .zip - are all the image files in the \images directory within the module, or are some within the ZIP file root?
Skyjoos
April 21st, 2021, 12:14
A couple of other things to remember,
Hey Laerun, thanks for the links to the vids. While informative and full of tips I never directly edit the .mod files. This is only a homebrew mod I use for a dungeon masters screen on the different games I run so whenever I edit or add stuff to the module I always load the FGU campaign from which the mod file is derived and make my edits there then export a new module to be loaded into the game campaigns. I also spotted a long time ago that you you don't load the module into the module campaign you are working on. I'm not 100% certain but I don't think there are any images from my official FG content in their either as these are generally just my Mike Schley maps of Fearun.
Skyjoos
April 21st, 2021, 12:21
Does "Map - Faerun.jpg" work OK?
What is the directory structure within your module? Rename the file extension from .mod and .zip - are all the image files in the \images directory within the module, or are some within the ZIP file root?
So the Map - Fearun.jpg didn't work originally but this is one of the files I reverted as I had shared a link in the game campaign.
All the img files in the .mod (zip) are contained in the root/images folder. The only files in the root are the db.xml, definitions.xml and thumbnail.png.
The attached img may or may not be relevant but thought it might be worth mentioning. This is taken from the module folder in the assets window of the game campoaign. I appear to have two instances of the same file.
45944
Trenloe
April 21st, 2021, 13:00
The following 6 maps will have the issue, as the moduledb XML has the link to them as in the root of the module, not in the module \images directory.
The blank images showing up in assets is caused by this issue, not causing the issue.
Map - Ship Gleaming Endevour.jpg
Map - FlowshinManor.png
Map - City Neverwinter.png
Map - TheLonelyTower.png
Map - Ruins of Thundertree.jpg
Map - Faerun.jpg
Make a backup of your current moduledb\Fearun Homebrew.xml file to a different directory (i.e. don't just make a copy in the moduledb directory), then replace with the attached - see if that helps.
EDIT: I think this was caused because there was an update (I can't find a reference to that) that changes the image file location in an exported module from the root to the \images directory.
Skyjoos
April 21st, 2021, 13:59
Hey, everything works again! ...almost. I still have two versions of the Flosin manor map in the assets window and I get an img load error in the log window but the map itself does load with all the pins and edits correct from the game campaign.
Can I ask what you changed so I can sort this myself if I ever run across the problem again?
You guys are awesome. Thanks for all the help.
Trenloe
April 21st, 2021, 14:03
Can I ask what you changed so I can sort this myself if I ever run across the problem again?
The line I highlighted in the text editor in the image in post #1 needs to have images/ adding at the beginning of the image filename. For example: <bitmap>Map - Faerun.jpg@Fearun Homebrew</bitmap> would become: <bitmap>images/Map - Faerun.jpg@Fearun Homebrew</bitmap>
Do this without FG running in a campaign, so that it reads your changes when you load the campaign.
Skyjoos
April 21st, 2021, 14:06
Do this without FG running in a campaign, so that it reads your changes when you load the campaign.
Got it. Thanks muchly.
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.