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 merry + bright! 🎄
Create a free account

Log API?

Is there an API that lets someone put stuff into a handout without opening a handout? Like !note-log -200 gold for information fee And that gets automatically noted bullet point style in a handout named log?
Nope. You could learn to write one. :)
Thats not funny. :( The API never seems to have anything I can really use except the Bloody API.
You need to find what handout and pass it in, or else just hardcode a handout id. You need to read the notes from the handout, add your addition, and store it in the handout. There's a bit more to it but if you've ever worked with javascript that shouldn't be too bad. If you haven't feel free to send me a pm.
I REALLY like this idea, and yes HB, I could learn to write one...in about 5 years of trying.
This would be a pretty simple script and you could cobble most of it together from other scripts on the forums. As long as you just wanted to be able to add to the handout that way. Editing or removing entries would be more difficult.
1434429315

Edited 1434429375
The Aaron
Pro
API Scripter
Definitely a good idea.... NoteLog v0.1.0 Commands: !note-log &lt;text&gt; Creates the Log handout in the journal if it doesn't exist already Adds the &lt;text&gt; to the end of the journal, prefaced with &bullet; . If you rename the Log handout, a new one will be created the next time you run !note-log . That makes it easy to archive prior notes. Additionally, you can freely edit the Log document if you want to add in notes between log events. This is just a hacked together script, so no inline help or configuration yet, and very minimal features. But it could grow with time... GIT: <a href="https://github.com/shdwjk/Roll20API/blob/master/No" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/No</a>...
1434509859

Edited 1434509921
I was honestly considering learning it. I mean I know some mud code, and reading the scripts I can get the logic of it. I was just hesitant because one thing I always was terrible at was getting and remembering any of those symbols. And I cannot do rote memory of any kind. But then Aaron saved me! Thank you! I have a game tomorrow so I'll test it then!
1434514013
The Aaron
Pro
API Scripter
Hehehehehe. I've already had some thoughts about how I might expand that... =D
Well the log wworked so well I thought it would also be good for keeping track of some other things. Then I learned that this is apparently nothing like mud code. As if it was, when I went and changed all instances of the word 'log' to 'battle', then that would have worked. It didn't so clearly the code for this api is some true madness.
Is this GM dependent? Could players use this as well, and create a sort of "party notes" sheet?
1434550347
The Aaron
Roll20 Production Team
API Scripter
Devlin: The problem you ran into is that there is also a function called log(). I believe both of the calls to it are in the checkInstall() function. Gozer, it could definitely be expanded to do that. =D
And, if it could be made to roll from a rollable table...automated rumor sheets! Something like !note-log [[1t[Rumors]]]
Thanks Aaron. Got it.
1434565074
The Aaron
Roll20 Production Team
API Scripter
No problem! I'll probably make a much expanded version at some point which allows for multiple note files from the same command (probably !note-&lt;name&gt; &lt;text&gt; ) and perhaps have separate GM and player note files, possibly shared ones. Would be great if the API could access the folder structure.