-
October 1st, 2018, 20:54 #1
Exporting nodes with image blocks... exports images?
So, this is probably a very specific problem and I might be searching in the wrong place but... here is the issues.
When you export with the extension Author it does a little bit of pre-export work to create an export node so that it is exported along with everything else FG does by default.
Code:ExportManager.registerExportNode({ name = "_refmanualindex", label = "Reference Manual", export="reference.refmanualindex", sLibraryEntry="reference_manual"});
I've noted that for every single image block a extra copy of the image file (DungeonMapTest1.jpg in this case) is placed into the exported .mod file. Example:
<chapters>...<subchapters>...<refpages>...<blocks> ..<id-00002>:
Code:<id-00004> <align type="string">center</align> <blocktype type="string">image</blocktype> <caption type="string">DungeonMapTest1 (2500x3300)</caption> <image type="image"> <bitmap>images/DungeonMapTest1.jpg</bitmap> </image> <imagelink type="windowreference"> <class>imagewindow</class> <recordname>image.id-00002</recordname> </imagelink> <size type="string">378,500</size> </id-00004>
No where does my custom code add in those images "files/image.id-*" into the Export node list.
Is this part of the default behavior of FG with image blocks? I've searched through my code to doubly to make sure I do not add these images to the export list anywhere else...
My code, simply inserts this ref-manual document node "_refmanualindex" as "reference.refmanualindex" so that when exported and loaded as module users have a link called "Reference Manual" that will load the manual.
I don't think anyone else does this so it could just be what I'm doing was never intended and has some unintended consequences.
The full source of the work can be found in my Author project post.
I think I've exhausted any possible culprits that I could find and wondering if someone else has a theory.Last edited by celestian; October 1st, 2018 at 20:59.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
October 1st, 2018, 22:39 #2
Ikael's SWEL is unable to export images within the refmanual either. I believe if IIRC that he said that it can't currently be done through FG.
Ultimate License Holder
-
October 1st, 2018, 22:44 #3
I'm not actually trying to export the images. Just the ref-manual index/nodes. That part works. The other part of /export that I do not manage seems to be adding in a extra image for each one of the images referenced in the image blocks.
I use the export mechanisms in place so users can export whatever they want as normal. This just adds the extra ref-manual nodes. I suspect FG internals is automatically adding duplicates of them because of the image blocks in the ref manual.Last edited by celestian; October 1st, 2018 at 22:46.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
October 1st, 2018, 22:46 #4
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Well you cannot edit them in so it has to work somehow. (Putting an image in line to xml is not something notepad++ can do or at least I don’t know how to do it). The way I read the pair was that it was inserting two copies
-
October 1st, 2018, 22:57 #5
I'm not sure I understand what you're saying. Perhaps this is more clear.
I don't actually mess with image records or files. I just read the Story entry, if there is a link to a image there that meets a certain criteria I then make a similar link to that image record in the ref-manual node. So if the story refers to image-id.00001 in a link then I simply replace the entry for a link of a story to a image block referencing image-id.00001.---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
October 1st, 2018, 23:09 #6Ultimate License Holder
-
October 1st, 2018, 23:21 #7
Correct. The <image>...<image> records and files are all handled by existing export technology. I don't touch it. I just reference those links in my ref-manual. Same way you'd edit a ref-manual by hand and add the reference. Those records exist in the db.xml of any export with or without Author (assuming you tick the IMAGE check).
Edit: Attached a sample exported db.xml using /export with Author. Maybe this will help for those not sure how this works. It's a simple single chapter, 2 story entries, the first one has 1 inline image.
That image exists in the .mod file twice now. If I added another inline image of it on the second story entry there would be 3.
Here are the settings I used when doing it.
Contents of file:
Last edited by celestian; October 1st, 2018 at 23:30.
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
October 1st, 2018, 23:27 #8
There is still only one image there. It just accessed in two different ways within FG to support different functions. So I am not sure how you are seeing double images. I am a little slow tonight so I am not quite getting what you see as the problem.
edit- is it because you see that particular name twice?Ultimate License Holder
-
October 1st, 2018, 23:31 #9---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
October 1st, 2018, 23:35 #10
Confusion clearing up. So in the exported mod file you end up with having two copies of the image in question?
Ah...now I see the extra image that my desktop didn't want to cooperate with meUltimate License Holder
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks