How It Should Work: You have a button called Token Handout. You click a token, click this button, and then you can "handout" the image on the token's Layout, Portrait, or Handout to whichever players you like. In the chat window, each player gets a link to that image. They click that link and it opens a window displaying the image.
First, you need to add the attached token to your campaign.
Secondly, you want to create a Token Handout button, probably in your Campaign macros that has this code:
Code: Select all
<!-- see http://forums.rptools.net/viewtopic.php?f=20&t=8467 -->
[H: assert( isGM(), "<b>" + getMacroName() + "</b> is a GM only macro.", 0 )]
[H: ids = getSelected()]
[H: abort(if(ids == "", 0, 1))]
[H: playerList = getAllPlayerNames()]
[H: whichTokenTabString = ""]
[H: whichTokenTabString = whichTokenTabString + "Text | Handout (click this) | Clickable text link || TEXT"]
[H: whichTokenTabString = whichTokenTabString + " ## " + "dispElement|Image,Portrait,Handout,None|Show Which Image | RADIO"]
[H: whichTokenTabString = whichTokenTabString + " ## " + "dispText | Notes, GM Notes, Free Text, NA(Token Name) | Show Which Text | RADIO"]
[H: whichTokenTabString = whichTokenTabString + " ## " + "FreeText | On-the-fly info text |Enter free text | TEXT"]
[H: SendToTabString = ""]
[H: SendToTabString = SendToTabString + "dummy | 'All Players' overrides individual player choices | Display to | LABEL"]
[H: SendToTabString = SendToTabString + " ## " + "allPlayersCheck | 1 | All Players | CHECK"]
[H: SendToTabString = SendToTabString + " ## " + "dummy | ------------------------------------------------------- | --------------- | LABEL"]
[H: playerNumber = 0]
[H, FOREACH(tempPlayer, playerList), code: {
[SendToTabString = SendToTabString + " ## " + "playercheck"+playerNumber+" | 0 | " + tempPlayer + " | CHECK"]
[H: playerNumber = playerNumber+1]
}]
[H: success = input(
"whichTokenTab | Info || TAB",
whichTokenTabString,
"sendToTab | SendTo || TAB",
SendToTabString
)]
[H: abort(success)]
<!-- Link text -->
[H: tToken = currentToken()]
[H: displaytext = macroLink(Text,"subShowHandout@Lib:TokenHandout","self","Element="+dispElement+"; Text = "+dispText+"; FreeText = "+FreeText, tToken)]
<!-- build json array with player names to send to, based on user input -->
[H: jarr = ""]
[H: playerNumber = 0]
[H, FOREACH(tempPlayer, playerList), code: {
[tempTicked = eval("playercheck"+playerNumber)]
[IF(tempTicked): jarr = json.append(jarr, tempPlayer)]
[playerNumber = playerNumber+1]
}]
[IF(allPlayersCheck), code: {
[R: displaytext]
};{
[H: outputTo(jarr, displaytext)]
[H: abort(0)]
}]