PDA

View Full Version : Modifications to module entries within a campaign



Trenloe
July 20th, 2015, 21:03
I posted this within another thread (https://www.fantasygrounds.com/forums/showthread.php?25051-New-patches-released-for-Elemental-Evil-Player-s-Comp-and-Princes-of-the-Apocalypse&p=222350#post222350), but though it would be useful to post separately.

The following describes what the process and implications are of modifying module entries within a campaign.

When a GM makes modifications to a module within a campaign, those modifications are stored just in that campaign not in the original module. I hope we're all clear on this.

So, on to an example. I've opened HotDQ in a 5E campaign and I'm going to modify the (Contents) entry, which looks like this before modification:

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Fantasy%20Grounds/5E/Module%20Edit%201.jpg

(1) Is the unmodified story entry and (2) is the book icon (telling you the entry is from a module). Note the icon - an open book only.

I now modify this story entry as follows - deleting some content, leaving some content in place and adding my own content:

https://dl.dropboxusercontent.com/u/39085830/Screenshots/Fantasy%20Grounds/5E/Module%20Edit%202.jpg

Note that the book icon pointed at by the red arrow has now changed to a book with a pen/quill. This means that the record is a module entry (book) but has been edited in this campaign (pen). If you want to revert your changes and go back to the base module entry, right-click on the entry in the campaign list and select "Revert Changes".

But, how are these changes stored and operate within the campaign?

Any changes made to a module within a campaign are stored in the <campaign name>\moduledb directory. There will be a <module name>.xml file for each edited module. In this example, there is a DD Hoard of the Dragon Queen.xml file in my campaign moduledb directory. Within this XML file is stored all of the changes to the module. In our example, the edited (Contents) story entry is stored as follows:


<encounter>
<category name="(Hoard of the Dragon Queen)" mergeid="" baseicon="2" decalicon="1">
<enc__contents_>
<locked type="number">0</locked>
<text type="formattedtext">
<h>Hoard of the Dragon Queen</h>
<linklist>
<link class="encounter" recordname="encounter.enc_e00_01_00conversionnotes@DD Hoard of the Dragon Queen">Conversion Notes</link>
<link class="encounter" recordname="encounter.enc_e00_02_00credits@DD Hoard of the Dragon Queen">Credits</link>
<link class="encounter" recordname="encounter.enc_e00_03_00foreward@DD Hoard of the Dragon Queen">Foreward</link>
<link class="encounter" recordname="encounter.enc_e00_04_00introduction@DD Hoard of the Dragon Queen">Introduction</link>
<link class="encounter" recordname="encounter.enc_e00_05_00background@DD Hoard of the Dragon Queen">Background</link>
<link class="encounter" recordname="encounter.enc_e00_06_00overview@DD Hoard of the Dragon Queen">Overview</link>
</linklist>
<h>My addiional notes</h>
<p>Testing...</p>
</text>
</enc__contents_>
</category>
</encounter>

This stores the whole edited record - not just the edits, but the whole record as it is now after editing.

How does FG use this record?

Note the highlighted <enc__contents_> in the XML text? This is the internal module reference for this story record. FG basically completely overwrites <enc__contents_> in the module data used within the campaign with this record. No merging, no taking into account module updates, etc., etc.. This is a complete overwrite of the module record data used in the campaign. The base module file doesn't change, but the internal FG representation in this campaign does change to use this edited data when the campaign loads.

Implications

If the module record edited in a campaign is updated in a future release of the module, assuming the XML reference stays the same (which it usually will), then this campaign won't see the module update for any edited records. This is because the module edit in the campaign moduledb XML overwrites the base module data used in this campaign. Unedited records will show the latest module data.

You can always see the most recent module data by reverting your edits: right-click on the entry in campaign list and select "Revert Changes" to revert one entry change, or do the same in the module activation window (right-click on the module tile) to remove all edits from the module and see the latest module data. You can then manually re-apply edits if you so wish - but this is a very manual process, and you'll need to remember what your edits were!

If future module updates were quite significant and/or the internal XML references were changed, then you could end up with duplicate entries in your campaign - the edited entry from the moduledb XML and the new module entry with a different XML reference, or you could just end up with quite a mess within the campaign where you edited the module. However, the way SmiteWorks are producing the 5E modules, this shouldn't be the case as the source files they use will keep the original reference names. However, third party produced module updates might not keep the same references.