5E Product Walkthrough Playlist
  1. #1

    [programming] chatmessage strings/player CT

    Ok so these are two separate questions, and I’m just missing a piece to each puzzle, I believe.

    1) how do I program the ct to allow players to drop numbers on an entry to alter the “health” field of that entity? It works just fine as a GM but I seem to be missing something for a player to achieve this. “If not User.isHost” isn’t working as it does for deliverChatMessage() functions.

    2)how do I use a string resource for a deliverChatMessage() function? Want to make it easier to translate, and that’s the last hurdle.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    1) Players can only modify the database records they own. Whereas the GM can modify all records.

    You could look at using OOB messaging that passes the execution of some code to the GM, so that the GM instance could change the data.

    OOB messaging can be a little complex to get your head round at first, as you need to setup and register a OOB message handler, a message structure, call the OOB messaging and code in the handler. See the 5E scripts\manager_action_damage.lua file for an example - the OOB_MSGTYPE_APPLYDMG OOB messaging in there is used for players to pass the handling of damage damage application to the GM.

    2) Get the contents of the FG string resource with Interface.getString and concatenate that in your chat message: https://www.fantasygrounds.com/refdo....xcp#getString
    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. #3
    thank you. i got #2 working with your advice. #1 is going to take some studying it seems.

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
  •  
DICE PACKS BUNDLE

Log in

Log in