DICE PACKS BUNDLE
Page 2 of 2 First 12
  1. #11
    Quote Originally Posted by Ikael View Post
    You can implement own export functionality that uses Module.export function that does everything, includes all content and images as mod file. The built-in export feature uses the same function so there is no special limitation if you would implement your own version.

    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.

  2. #12
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,384
    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.

    Quote Originally Posted by celestian View Post
    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.
    "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!

  3. #13
    Quote Originally Posted by Ikael View Post
    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.
    So I make it myself. Makes sense. That's what I've got with Author already so should just be a bit of node shuffling to make this work. I'll give it a spin tonight and see what I can come up with.
    ---
    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.

  4. #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
    The custom function(s) are run right before the actual export (after the "Export" button is pressed, at the top of performExport()).

    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.

  5. #15

    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?

  6. #16
    Quote Originally Posted by Bidmaron View Post
    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?
    I haven't even gotten to that part of 3.36 if you can give me an example of what it looks like previously and now maybe I can implement it.
    ---
    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.

  7. #17

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in