FG Spreadshirt Swag

Thread: Campaign Folder

  1. #1

    Campaign Folder

    So... this is probably a stupid question...

    I’m trying to get the campaign Folder path for use of resources...

    Like

    Code:
    Local campPath = getCampaignFolder();
    If campPath .. “/tokens/example.png” ~= nil then
       Do stuff
    End
    But referencing the path is giving me trouble...

    getCampaignFolder() is the function I need to figure out

  2. #2
    I don't think you can "get" the folder...however, check this out...
    https://www.fantasygrounds.com/forum...l=1#post182803
    aka Laendra

    (Discord: Laendra#9660)
    Ultimate license (FGC/FGU)
    Current Timezone : Central (CDT) (GMT -5)
    OP: 3317036507 / 2369539

    My opinions are my own and represent no entity other than myself

    Extension Support Discord: https://discord.gg/gKgC7nGpZK

    Extensions = risk to your gaming experience. If you haven't tested out the extensions in your campaign before your gaming session, turn them off. If you don't backup your campaigns regularly, you're doing it wrong.


  3. #3
    Thank you... I’ve already read that...

    I did figure it out though... you can reference the campaign folder VERY simply by using “campaign/“

    So to access the campaign folder tokens it is:
    Code:
    local campaignSharedTokens = “campaign/tokens/shared/example.png”;
    local campaignHostTokens = “campaign/tokens/shared/example.png”;
    If you want to access FG default tokens:
    Code:
    local fgSharedTokens = “tokens/shared/example.png”;
    local fgHostTokens = “tokens/host/example.png”;
    That’s all there is to it... at least for the purpose of tokens, there is an API that lets you access the file directory...

    I knew it was something SUPER simple I was overlooking... and I hope this helps others out in the future!

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
  •  
STAR TREK 2d20

Log in

Log in