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 .
×
Create a free account

Chat Menu - 'Advanced?' question...

Hi All, I am running a live 'text only' game, and we're getting to a part in the story where there is little danger and I instead want to the players to simply explore the city (read lots of stuff) and then report back to the group and then describe what they have learnt into their words in a roleplay setting. I have a map with about 20-30 locations on, and I'm hoping to have players simply CLICK on a building and it will whisper some information to them about it, and the scene when their character walks in. I'm planning to do this with some code that looks something? like this: /w @{selected|character_name} &{template:default} {{name=Dead Man's Corner}} {{=An Old human woman, covered in snails and barnacles named Olive Stillwater sells human zombies out of this dilapidated shop. Olive keeps a dozen human zombies in her cramped shop. "They're great for setting off traps!" she says with a chuckle. As payment for each zombie, she demands a tiny vial of the buyer's blood and three hairs plucked from the buyer's head. She owns a pair of rusty iron shears that can be used to draw blood and cut hair. Each zombie wears a rope noose around its neck. A character who buys a zombie must lead it around by the noose; otherwise, the zombie stands still and does nothing. Charisma Check? (DC14) You have a nice chat with Olive, she tells you that After **consuming** the payment mentioned above, she gains the innate ability to cast the animate dead spell once per day for the next three days... Insight Check? (DC18) Olive is not a human at all. She is a Sea-hag in disguise. }} This bit, I can manage. - However, can anyone think of a way where I can also include a 'skill check' request or in there, and then depending on what the players roll, it will give them some follow-up text? I really don't mind if it said... Insight Check? (DC18) - IF PASSED CLICK HERE I trust my players not to 'cheat', and even if they do, it doesn't *really* matter that much. Any ideas?
1556378845
The Aaron
Roll20 Production Team
API Scripter
I can imagine how I might do that with a script, but it would need to be written.
1556379426
Andreas J.
Forum Champion
Sheet Author
Translator
This is clearly API territory, macros alone can't do this.
1556379830
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
My suggestion: 1. Use the Notes script, or make a duplicate if you already have it installed. Change the command to invoke from !notes to !PCNotes or something similar, and edit the output line to post to everyone instead of just the GM. (I have been  badgering the Aaron to roll this functionality into the Notes script, but he has many irons in the fire). I can help if you need assistance finding the lines to change. 2. Read this post on Map Pins . Your really only need the bit on API enhancements, but the basic principle is described in length there. Make sure that all of your map pins represent the same character. Note will go on each token. A Token Ability calls up the info. Notes character needs to be controllable by all players. 3. One of the things you can put into the GM notes on the token is API buttons. You can create Abilities on the note character for each skill check required and call them in the text. For example, you might have an Ability called InsightCheck. Your text would contain "Insight Check? (DC 18) [Roll](~InsightCheck)" followed by a Button that says "[Click here if Successful](~DeadMansCorner)". You would need to make Abilities to pass the text for this further info, in this case one called "DeadMansCorner". 3b. It would be possible to keep the extra info in the GM notes field along with the rest, but this would require yet another script. 4. Since the notes token is controllable by all players, it is possible for them to cheat by opening the sheet and reading all the supplemental info abilities, but you have indicated that this is not an issue for your group.
1556381463

Edited 1556381631
oh. Nice. I didn't know Aarons 'GMNotes' worked for PC's too :) Well, before I learned that bit,,, I got this far... But it took it did result in me making a single 'character' for a single location, and crafting 4 different abilities.... - which may get a bit excessive when I have 20+ locations.
1556382358

Edited 1556382601
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There is a snippet that the Aaron wrote for me called "Send Text". This will allow you to pass text directly, and you can put everything in the GM notes field: Again, edit the template line. on('ready',()=>{  on('chat:message', (msg) => {    if('api' === msg.type && /^!sendtext\s+/i.test(msg.content)){      sendChat(msg.who,/w gm &{template:5e-shaped} {{text_big=${        msg.content          .replace(/^!sendtext\s+/i,'')          .replace(/({{([\s\S]*?)}})/g," $2 ")          .replace(/<br[/]?>/ig,'')      } }});    }  }); }); So:      sendChat(msg.who,/w gm &{template:5e-shaped} {{text_big=${ would become:      sendChat(msg.who,/w gm &{template:default} {{=${
Thanks, that help is really good! but....ummm.. To clarify, do you mean I should edit my existing GMNotes script, by increasing the content in that first line to your 'snippet' above, or make a new API with just that snippet in on it's own? - Either way results in the error above...
1556388005

Edited 1556388029
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Send Text is standalone. GMNotes is designed to whisper, so duplicate that script and make the template and command changes to the duplicate. You will wind up with three script. GMNotes, PCNotes and Sendtext. I'd send a copy of my own versions, but I've dirtied them up with campaign-specific stuff. Ultimately, the token's GMnotes field should look like: An Old human woman, covered in snails and barnacles named Olive Stillwater sells human zombies out of this dilapidated shop. Olive keeps a dozen human zombies in her cramped shop. "They're great for setting off traps!" she says with a chuckle. As payment for each zombie, she demands a tiny vial of the buyer's blood and three hairs plucked from the buyer's head. She owns a pair of rusty iron shears that can be used to draw blood and cut hair.  Each zombie wears a rope noose around its neck. A character who buys a zombie must lead it around by the noose; otherwise, the zombie stands still and does nothing. Charisma Check? (DC14) [success](!sendtext You have a nice chat with Olive, she tells you that After **consuming** the payment mentioned above, she gains the innate ability to cast the animate dead spell once per day for the next three days...) Insight Check? (DC18) [success](!sendtext Olive is not a human at all. She is a Sea-hag in disguise.) This is assuming you don't also put in a macro ability to roll the required check for the selected token. If you want to PM me your code, I might be able to sort out any problems. I don't really know Javascript in any meaningful way, but I might be able to spot something obvious.
1556388092
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
By the way, that description is terrifying. Leave the shop. Cleanse it with fire!