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 .
×
May your rolls be chill this holiday season!
Create a free account

Is there a script out there that creates a journal of adventures as a handout? Anyone interested in one?

I started writing an API script to create an automated adventuring journal for my players. I did do some searching beforehand and did not find a script for this. Does this exist / is this a good idea or a waste of time? maybe I missed some handout settings that would mimic this? Right now, all it does is create a api button that asks if you want to save the previous message to the journal (and of course filters out the button message so there isn't an endless looped message spamed on screen) My vision is to do the following. 1. have a handout act as a journal of adventures for my player. managed by the script. 2. have an api button that pops up after every chat msg that is not part of the script. that button would add the previous chat msg to the quest journal. - right now not sure if it's just whisper to GM or whisper to the originating player. maybe il make that a setting. - maybe il make 2 buttons, one straight save another one for extra input, to add context to a svaed epic roll or some other message that might need more explaining. 3. have some hidden handouts with prewritten messages that have some sort of formatting in the [gm name ie: area 1][player name ie: spooky cave](msg ie: you enter a spooky cave with spooky things in it!) - have not started on that yet. - have an api command to both reveal the message to the player and save it to their journal.  - have a macro button I can press to give me some a drop down of all available pre built messages. -- I will mostly use it for quest messages or room descriptions. I need some opinions from a new perspective before I sink to much time on this and realize its stupid 20 hours down the line. :-) If I do write it, I will obviously share it on here for anyone who wants it.   
1493349595
The Aaron
Pro
API Scripter
I have this one:&nbsp; <a href="https://app.roll20.net/forum/post/4121164/script-n" rel="nofollow">https://app.roll20.net/forum/post/4121164/script-n</a>... It's not very full featured, but you might use it as a jumping off point if you're early days on yours.
1493349730

Edited 1493349786
Gold
Forum Champion
There is one with some similarities called NoteLog by The Aaron, that is worth taking a look: <a href="https://app.roll20.net/forum/post/4121164/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/4121164/slug%7D</a> Edit: As he responded 2 minutes before me :)
1493350350
The Aaron
Pro
API Scripter
MUHAHAHAHAHAH!!!! &nbsp;=D
The Aaron said: I have this one:&nbsp; <a href="https://app.roll20.net/forum/post/4121164/script-n" rel="nofollow">https://app.roll20.net/forum/post/4121164/script-n</a>... It's not very full featured, but you might use it as a jumping off point if you're early days on yours. Wow, that was a quick response. Guess i was searching the wrong keywords :-). &nbsp; By the way, I haven't seen a chat log object while learning the api. The only time I could grab chat messages would be on their original chat:message msg object right?
1493353421
The Aaron
Pro
API Scripter
Right. You only have access to the message when it is issued. You'd need to store it somehow. You could either store it in a variable (transient, only available until the API restarts) or the state (persisted, available across restarts). I'd suggest the state, personally.&nbsp; My thought is that when a message is issued by a player (msg.playerid !=='api'), you could store the message in the state referenced by that player id and whisper them a button to save to the log. The button can then pull the messsge from state to write it to the handout. Alternatively, you could store multiple messages for a player and assign them a unique set of ids and reference the id with the save button. There's a bit more house keeping with that idea but also more flexibility.&nbsp;
The Aaron said: Right. You only have access to the message when it is issued. You'd need to store it somehow. You could either store it in a variable (transient, only available until the API restarts) or the state (persisted, available across restarts). I'd suggest the state, personally.&nbsp; My thought is that when a message is issued by a player (msg.playerid !=='api'), you could store the message in the state referenced by that player id and whisper them a button to save to the log. The button can then pull the messsge from state to write it to the handout. Alternatively, you could store multiple messages for a player and assign them a unique set of ids and reference the id with the save button. There's a bit more house keeping with that idea but also more flexibility.&nbsp; would it be bad practice to whisper to the player [button]("!functionname " + msg.content) when msg.playerid !=='api') and then have the on chat listener ignore '[button](!functionname' but process '!functionname' if it's on its own? since the gui options are so limited I can't think of a non-tedious way to re-display previous messages for saving later.
1493390658
The Aaron
Pro
API Scripter
You'll probably find that to be problematic because the encoding for API Command Buttons will be arbitrarily broken by what's in the message. Also, you'll likely want to preprocess the message to insert inline rolls and such.&nbsp;