-
July 3rd, 2018, 15:08 #11
I wasn't aware of "Module.export" but will look into it. Thanks for the suggestion.
Edit:
Found it here: https://www.fantasygrounds.com/refdoc/Module.xcp
Looks to do much of what I need tho I'm still not sure how to manipulate <library> entries with it for links yet but I'll play about with it to see if it can be done.Last edited by celestian; July 3rd, 2018 at 15:17.
---
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.
-
July 3rd, 2018, 19:09 #12
DB package (https://www.fantasygrounds.com/refdoc/DB.xcp) is your friend when building these values. You can build the entire library structure using it and export it with Module.export.
"Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness
Post your SavageWorlds ruleset feature requests and issue reports here!
-
July 3rd, 2018, 20:40 #13---
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.
-
July 4th, 2018, 06:13 #14
Okay, figured this out. I still think the amount of generic code that Moon could throw at this to make it a trivial issue for anyone else would be a better idea. Having to have your own local copy of export.lua for this seems a bit overkill. All it really needs is a setCustomExportFunction() and bit of variable handoff (I kludged around it using ExportManager.aExport) and really that's it. All the other parts already existed ... specifically registerExportNode().
This is the crux of the code I used for Author.
Code:function onInit() if User.isHost() then Comm.registerSlashHandler("author", authorRefmanual); ExportManager.registerExportNode({ name = "_refmanualindex", label = "Reference Manual", export="reference.refmanualindex", sLibraryEntry="reference_manual"}); -- setup custom export process for the _refmanualindex node build setCustomExportProcess(performRefIndexBuild); end end
Other than the code in performRefIndexBuild that would be all anyone would need to do the same thing for any other bits tho perhaps it far to of a niche need
Anyway, this was fun to figure out. Works great and no more having to manually copy/paste/etc. All in one /export -> *.mod file with everything a /export would do.
If you want to see the code it's here in the Author extension.---
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.
-
July 4th, 2018, 12:50 #15
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Celestian/Ikael, if I read the new 3.3.6 properly, the new ability to directly set image file names now breaks the previous dependency that ALL images had to be in the image window in order for users to build content. If that is correct, I'd recommend you build this into Author, as folks could then cut and paste file names for images. Or have you already figured out a way around this limitation?
-
July 4th, 2018, 19:14 #16---
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.
-
July 5th, 2018, 00:06 #17
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
MW hasn’t documented it yet, so not sure what to tell you. I presume if you setValue on an image node the parameter is a string file name.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks