Show handouts to players

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Tush
Kobold
Posts: 1
Joined: Mon Aug 12, 2019 8:22 am

Show handouts to players

Post by Tush »

Hello! (My first post on this forum, yay!)

I have a question regarding the handouts I can attach to tokens, 'things' on the hidden layer and to objects. I am not a code-savvy person, nor am I experienced in the use of MapTool in any way shape or form, as I am currently using it to set up my first campaign with it.
While exploring the options on the different objects and watching a somewhat unhelpful tutorial, I came across the option to add handouts to tokens/hidden/objects. After going around my merry way, adding handouts to anything and everything, I decided to switch to the player view and check to see if all of the settings were correct.
To my surprise, I found that I cannot for the life of me find a way to show the handouts attached to anything to my players! As a GM I can right-click a token (gonna use 'token' for objects and stuff on the hidden layer as well from now on) and click 'Show Handout', but my players using a 'player account' cannot do the same on any token other than the assigned player token.

So here is the question - finally... How do I allow my players to view the attached handouts?

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Show handouts to players

Post by aliasmask »

I think they need ownership of token.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Show handouts to players

Post by Full Bleed »

Tush wrote:
Mon Aug 12, 2019 8:33 am
Hello! (My first post on this forum, yay!)

I have a question regarding the handouts I can attach to tokens, 'things' on the hidden layer and to objects. I am not a code-savvy person, nor am I experienced in the use of MapTool in any way shape or form, as I am currently using it to set up my first campaign with it.
While exploring the options on the different objects and watching a somewhat unhelpful tutorial, I came across the option to add handouts to tokens/hidden/objects. After going around my merry way, adding handouts to anything and everything, I decided to switch to the player view and check to see if all of the settings were correct.
To my surprise, I found that I cannot for the life of me find a way to show the handouts attached to anything to my players! As a GM I can right-click a token (gonna use 'token' for objects and stuff on the hidden layer as well from now on) and click 'Show Handout', but my players using a 'player account' cannot do the same on any token other than the assigned player token.

So here is the question - finally... How do I allow my players to view the attached handouts?
As noted, they can't see the handout using "Show Handout" unless they own the token. And I'm sure you don't want to give them ownership of a bunch of tokens.

But what you can do is add the token handout to the token's Notes section, and then if the token is on the Object or Background layer and they click on it they will get a popup with the token's notes and the Handout image.

Here is a macro that will do all the work for you. Make sure "Apply to Selected Tokens" is check marked:

Code: Select all

[h: "<!-- Pulling the Handout asset ID and building the string that will work in the notes section of the token. -->"]
[h: assetId = getTokenHandout()]
[h: imageText = "<br><img src="+assetId+"</img>"]

[h: currentNotes = getNotes()]

[h: "<!-- If the handout image has already been added to Notes it removes it so it is not added twice. -->"]
[h: currentNotes = replace(currentNotes, imageText, "")]

[h: "<!-- Adding handout image to the end of previously existing notes. -->"]
[h: newNotes = currentNotes+imageText]
[h: setNotes(newNotes)]

[h: "<!-- Moving token to update token for clients. -->"]
[h: moveToken(getTokenX(), getTokenY())]

[h: broadcast("<table border=1>Handout Image of <b>"+token.name+"</b> has been added to its Notes.  Place token on Object or Background layer for it to display handout when a player clicks on it.</table>", "gm")]
This macro won't let you add the same handout twice, but you can add multiple handout images so you'll have to remove old ones manually by editing the notes section.

Handout2Notes.jpg
Handout2Notes.jpg (85.41 KiB) Viewed 934 times
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “MapTool”