Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Advertisement Create a free account

Referencing descriptive text

1424023307
Samuel Penn
KS Backer
Is there a way to reference the text blocks from a macro? e.g., the content of the "Bio & Info" field of a character journal? Or the "GM Notes" field of a token? I'd like to be able to have a macro for outputting descriptive text on a creature. I could do it by putting the text into an attribute, but that's a bit messy. Also, I'd like to be able to output room descriptions from within the map. I was thinking of having tokens on the GM layer which had descriptive text in the "GM Notes" field, then have a macro button which dumped that text to the chat window. Is this possible, or is there a better way of doing that?
1424024975
The Aaron
Forum Champion
API Scripter
You can't reference that text from a macro, but you can from an API script. It wouldn't be too difficult to write you an API command that sent the text of a specified character's notes to the chat, or whispered the GM Notes to the GM. If you want to go that route, post a request in the API forum detailing out your use cases, including what text you want displayed where, and what command you want to execute to do it, etc. Someone *cough* *cough* will probably write it for you. =D
1424025668
Ziechael
Forum Champion
Sheet Author
API Scripter
The Aaron said: You can't reference that text from a macro, but you can from an API script. It wouldn't be too difficult to write you an API command that sent the text of a specified character's notes to the chat, or whispered the GM Notes to the GM. If you want to go that route, post a request in the API forum detailing out your use cases, including what text you want displayed where, and what command you want to execute to do it, etc. Someone *cough* *cough* will probably write it for you. =D In other words, he's already written it, while simultaneously responding to your question, and is just waiting for you to formally request it ;)
1424025990
Gen Kitty
Forum Champion
*snicker*
1424026288
vÍnce
Pro
Sheet Author
API is probably the only way to reference the bio and gm notes. Using a "description" attribute isn't a bad option, especially if you are using a character sheet. For room descriptions and such; you can create text boxes on your gm layer, read from there or move them to the token layer for everyone to read. You can keep them positioned along the edges of your map to prevent clutter. You can also use images of text(screen shots of descriptions, maps, detail, etc.) drag them on the map and resize as needed, use the zoom function (Z or Shift+Z to show all players) or give the player's permission and they can use Z to zoom in. You can also reference handouts and/or url's in your macros so that you can click on the hyperlink in the chat output for more information.
1424026333
vÍnce
Pro
Sheet Author
Ziechael said: The Aaron said: You can't reference that text from a macro, but you can from an API script. It wouldn't be too difficult to write you an API command that sent the text of a specified character's notes to the chat, or whispered the GM Notes to the GM. If you want to go that route, post a request in the API forum detailing out your use cases, including what text you want displayed where, and what command you want to execute to do it, etc. Someone *cough* *cough* will probably write it for you. =D In other words, he's already written it, while simultaneously responding to your question, and is just waiting for you to formally request it ;) He usually mentions a book as well...
1424026929

Edited 1424029386
Ziechael
Forum Champion
Sheet Author
API Scripter
Vince said: He usually mentions a book as well... 'Javascript, the good parts' you mean...?
1424028956
Gen Kitty
Forum Champion
UH OH , you said Java instead of Javascript ! ^_-
1424029466
Ziechael
Forum Champion
Sheet Author
API Scripter
GenKitty said: UH OH , you said Java instead of Javascript ! ^_- did no such thing... you can't prove anything!! (ps. that edit on my post was to... err... put quotation marks on, nothing else!) Feel kinda bad, we've gotten off topic a lil' lol
1424030076
Samuel Penn
KS Backer
Thanks Aaron for the suggestions, and the offer :-) If it needs to be done in a script, then it actually sounds like it might be a good learning exercise, so I might have a stab at it myself! As far as using text boxes on the GM layer go, that might work for simple descriptions on maps with only a few rooms, but where I have dozens of rooms that's going to get messy.
1424032610

Edited 1424032620
vÍnce
Pro
Sheet Author
Samuel Penn said: As far as using text boxes on the GM layer go, that might work for simple descriptions on maps with only a few rooms, but where I have dozens of rooms that's going to get messy. I hear you. You can use handouts as mentioned and/or just reference an external source (doc, pdf, html, etc) I like your idea of having "clickable" access from the map. I use the zoom trick often for this.
1424039899
Samuel Penn
KS Backer
I currently use Google Docs, but I'm having a play to see what Roll20 can do for me.
What about something a little more complex? Set up a token in each area of the map where the graphic is just the number of the room/area. Enter description text into GM Notes. Have script that copies GM Notes of currently selected token into a handout entitled Description (overwriting any notes currently there). Pop up the handout (have flag to allow options for DM-only or all players). Got a script for that, Aaron? I was going to try to write one, but haven't gotten around to even seeing if it's possible. I usually leave the chat window closed, so handout pop-ups would be much more helpful to me.
1424043176
The Aaron
Forum Champion
API Scripter
You guys.... I take one 4 hour drive... =D Anyway, it should be easy to write (no, I didn't write it yet, but I would...) it would be a great way to get your feet wet with the API. Let me know if you need any help or have any questions. :)
1424043287
Samuel Penn
KS Backer
I've got something working, which is dumping the GM Notes into the chat. A lot of tidying up of the presentation to do, but the core functionality is there. The hardest part is waiting for the script changes to sync with the game - I'm never certain whether I've broken something or it's just taking an awful long time to pick up changes.
1424043800
vÍnce
Pro
Sheet Author
API seems to be slow right now with making changes...
1424044446
The Aaron
Forum Champion
API Scripter
You can add something like this to your script: on('ready',function(){ log('API Ready!'); }); that will print to the API log once everything is up.