FG Spreadshirt Swag
  1. #1

    Read from external file

    I seem to recll that some of the IO functions of LUA were not allowed for obvious reasons (WRITE for example), not sure if this is still the case or not.

    What I would like to do is to select an external text file from within an extension and READ it. This functionality would only be available on the GM side only. ( ideally a .txt or .ini, but could do .json or .xml )

    I know I could copy and paste into a text box and save that, but I would much rather it be from a config file as the contents maybe quite long for pasting and there could be multiple different versions which could be configured by the GM or even shared with other GM's.

    Is the ability for the GM to READ external files available in LUA?
    Ultimate License
    UK Time Zone (GMT/BST)
    DM'ing since 1977 (Basic D&D)

    Currently Playing:
    Empire of the Ghouls 5E Campaign
    Tales from the Yawning Portal 5E Campaign
    Rise of the Runelords Pathfinder 1e
    Amazing Adventures 5E Campaign
    "Some are born to move the world, to live their fantasies
    But most of us just dream about the things we'd like to be."
    Rush - Losing It


    Currently DM'ing
    Princes of the Apocalypse 5E Campaign
    Waterdeep: Mad Mage 5E Campaign
    The Blight 5E Campaign

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Refer to the File Package in the API: https://fantasygroundsunity.atlassia...482293249/File
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

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
  •  
5E Character Create Playlist

Log in

Log in