FG Spreadshirt Swag
  1. #1

    Notes option for players

    Hello,
    I'm wondering if there is a way to allow all players to modify a notes entry? My players are using it to keep track of NPC's places etc, however they want to be able to edit it collectively. So far it seems the only way is to have one person maintain and share it, which is extremely clumsy.

    If this is not possible, how hard would it be to do an extension that allowed a shared / public note to be editable by any player just as the DM can?

    Thanks!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    Quote Originally Posted by jasharen View Post
    Hello,
    I'm wondering if there is a way to allow all players to modify a notes entry? My players are using it to keep track of NPC's places etc, however they want to be able to edit it collectively. So far it seems the only way is to have one person maintain and share it, which is extremely clumsy.

    If this is not possible, how hard would it be to do an extension that allowed a shared / public note to be editable by any player just as the DM can?
    The FG architecture only allows the GM and a maximum of one player to edit any database record. So, as standard, what you want is not possible.

    It wouldn't be easy to make an extension - as you'd need to pass the data to the GM to make the change (can be done with OOG Messaging) but you'd also need to cater for who is actually making a change - what happens if more than one player was actually making a change at one time? Which data is right? Who has priority? etc., etc.. I think you'd have a lot of issues trying to make this work well - and I'm not sure if FG even has the API functions to do this.

    Maybe the best you could do would be to write an extension to allow the GM to change the owner of a public note. Then the players could request access and one player update it at a time.
    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
    In regards to consistency, how is it handled currently as the GM and Player can already both edit an entry? I assume there would already be some logic in place to handle collisions like this?

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    Quote Originally Posted by jasharen View Post
    In regards to consistency, how is it handled currently as the GM and Player can already both edit an entry? I assume there would already be some logic in place to handle collisions like this?
    The logic is when a user (player or GM) exits a record (the field loses focus), the whole edited data is stored in the database. Overwriting anything someone else might have been doing in that record at that time. This can be a problem, but with just one player and the GM editing data, issues are kept to a minimum - and the GM probably won't be editing player notes very often anyway. Player data changes are passed to the GM to update the database (because only the GM instance of FG actually makes changes to the database) - hence why it is limited to one player only being able to make changes at a time - there would be too many race conditions with multiple players making changes and passing data to the GM at the same time.
    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!

  5. #5
    So theoretically it would be possible to put a tag on the record when a player was in edit mode for that record. If anyone else opens the record, they could see a custom field saying soandso is editing the field?

    I have relatively tech savvy players, so it would be simple to tell them to look at the current editing name, and if it is not blank don't edit.

    Additionally, and even simpler would be to allow multiple edits (not suggesting globally, just for an extension I might try) at any time, and just take the latest update. Tell my players that they need to verbally mention they are updating to avoid conflicts. I know full well it could cause a consistency issue, but again, my players are programmers or very tech savvy and would fully grasp the implications.

    Thanks!

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    The GM instance needs to change the owner of the record to allow a player to be able to edit that record. See the API guide here: https://www.fantasygrounds.com/refdoc/DB.xcp#addHolder or here: https://www.fantasygrounds.com/refdoc/DB.xcp#setOwner There can only be one owning player at a time.

    The underlying FG code is going to restrict non-owning players from being even to modify the text in a field. So, if you wanted to code around this you'd need separate GUI controls that aren't anchored on database to allow players to enter data and send that data to the GM to store in the database - overwriting other data already there.

    To be honest, you're going down a rabbit hole trying to do this - you're fighting the bulit-in underlying FG database functionality. Even if your players are aware of what's going on, sooner or later they're going to lose a bunch of data they've spent time entering/editing because it gets overwritten by another player. My strong recommendation is looking at a compromise - keeping one player who can edit the record, but allowing that owning player to be changed - by the GM, or perhaps the current owner (via OOB messaging to the GM instance) - passing ownership from one player to another. This would still require an extension to be written, but would be much less work, you wouldn't be fighting the underlying FG functionality, and you'd be minimizing the risk of accidentally overwriting data.
    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
  •  
STAR TREK 2d20

Log in

Log in