View Full Version : Campaign Folder
Diablobob
September 25th, 2019, 18:50
So... this is probably a stupid question...
I’m trying to get the campaign Folder path for use of resources...
Like
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
deer_buster
September 26th, 2019, 17:50
I don't think you can "get" the folder...however, check this out...
https://www.fantasygrounds.com/forums/showthread.php?21766-Assigning-a-tokencontrol-from-a-file&p=182803&viewfull=1#post182803
Diablobob
September 26th, 2019, 18:16
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:
local campaignSharedTokens = “campaign/tokens/shared/example.png”;
local campaignHostTokens = “campaign/tokens/shared/example.png”;
If you want to access FG default tokens:
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!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.