File

addCampaignAssetFile

function addCampaignAssetFile(filepath, assettype)

(GM only.) Imports the graphic asset file at the given file path into the current campaign as the given asset type.

Parameters

filepath (string)   
The full file path of the text file to import.

assettype (string)   
The type of asset to be imported. Valid values are: “image”, “token”

getCampaignFolder

function getCampaignFolder()

Returns the full path to the FG data folder for the current campaign.

Return values

(string)
Campaign folder path

getDataFolder

function getDataFolder()

Returns the full path to the FG data folder currently being used. The data folder path can vary depending on channel specified in Settings.

Return values

(string)
FG data folder path

openCampaignFolder

Requests that the operating system open the folder for the current campaign.

openDataFolder

Requests that the operating system open the FG data folder. The data folder path can vary depending on channel specified in Settings.

openTextFile

Returns the contents of a text file at the given file path.

Parameters

filepath (string)   
The full file path of the text file to open.

Return values

(string)
Contents of the text file (or nil if does not exist)

saveTextFile

Saves the given text into a text file at the given file path.

Parameters

filepath (string)   
The full file path of the text file to save.

text (string)   
The text to save into the text file.