DICE PACKS BUNDLE
Page 2 of 2 First 12
  1. #11
    Quote Originally Posted by damned View Post
    Are you creating an extension as well? If so add a hidden field that gets its value from that non exporting field. It will export.
    So you are saying use addNode on charsheet, then use setValue to the player name, then setPublic to false

    If so that would allow me to avoid making a whole new file entirely. Something I create on init and then export will do the rest for me.

    If this is what you are talking about this is brilliant and I greatly appreciate it.

  2. #12
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Alynn View Post
    So you are saying use addNode on charsheet, then use setValue to the player name, then setPublic to false
    You don't need to set public to false. @damned's reference to a "hidden field" was saying don't display it in the FG GUI.

    You really only need one command. For example, if you have the character node (stored in nodeChar) and the player name (stored in sPlayerName), you only need one command to create a new field within the character database called "playername":

    Code:
    DB.setValue(nodeChar, "playername", "string", sPlayerName);
    https://fantasygroundsunity.atlassia...82/DB#setValue
    Last edited by Trenloe; May 27th, 2023 at 14:28.
    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!

  3. #13
    Perfect... simplified everything for me...

    Code:
    chars = DB.getChildList("charsheet");
    
    for i,v in ipairs(chars) do
    DB.setValue(v, "playername", "string", v.getOwner())
    end
    Runs on init and I can see it in the export and now can be accessed by my simple data pull function in my middleware.

  4. #14
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Good stuff!
    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)

Tags for this Thread

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