DICE PACKS BUNDLE
  1. #1
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29

    Programmatically Setting the Holder Versus Sharing

    Quite probably I am doing it incorrectly but I have noticed that sharing an NPC with a Druid character so that they can use it for Wild Shaping (5E) is a little tedious: drag an NPC out of and back into the library to create a copy, maybe rename it, maybe place it in a Group for better organization, then share the copy with the Druid's player. As part of my Druid Wild Shapes extension, I am shortcutting the process - a character's portrait drag to the NPC library to create a special Group, NPC drags into the special Group instantly create copies and set the holder/owner of the copy to the player.

    Question: Are there pitfalls or ramifications that I should be aware of, in using DB.addHolder() instead of windowinstance.share() or its equivalent?
    Current Projects:
    Always...
    Community Contributions:
    Extensions: Bardic Inspiration, Druid Wild Shapes, Local Dice Tower, Library Field Filters
    Tutorial Blog Series: "A Neophyte Tackles (coding) the FG Extension".

  2. #2
    No, they are doing similar things in the background.

    * windowinstance.share() is specifically setting the access to the underlying database node, then sending a request to open that window (class/datasource) on the player machine.
    * DB.addHolder() is just setting access to the underlying database node.

    So, the only difference is whether the window is also opened on the player side.

    Regards,
    JPG

  3. #3
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Thank you Moon Wizard.
    I noticed that, and didn’t want the pop up in the client. I didn’t set the “shared” icon, so I have that missing. But otherwise I think I’m good then. Thank you for the help.

    I was worried about some sort of allowing access to proprietary/copyright info or something, that share might prevent but heavy-handed addHolder might ignore.
    Last edited by Minty23185Fresh; March 14th, 2019 at 18:02.

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