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

Creating Macro for Journal

1674431621

Edited 1674432898
Heath H
Pro
Sheet Author
Been working on a macro/api for starfinder ship initiatives (using Starfinder by Roll20 character sheets) I've managed to code all of the what I needed posted to chat, and was planning on following this by putting a chat handler to actually add them to the tracker.&nbsp; But then I found that I can't have ` ?{Question|Choice1|Choice2} ` in what I post for ` sendChat() `. Anyways since I found that what I was creating for the roll was correct, my next plan was instead of running it through API, I wanted to use the API to create a macro on the character sheet (not global). But browsing all the info in&nbsp; <a href="https://wiki.roll20.net/API:Objects" rel="nofollow">https://wiki.roll20.net/API:Objects</a> &nbsp;I found that Journal doesn't have a macros attribute, and macros don't have anything that looks to link them to a journal. So now I'm kind of stuck, and finally reaching out for some ideas. For those not familiar with Starfinder by Roll20, or just want more detail to suggest an alternate path I could take... Starships have links to Pilots (separate journals), and I am in the process of creating an initiative button that will put all this information together. Pilots are a list of either other journals ie. "Yuna Kel", or for npcs, usually a name and a bonus to pilot "Pilot +7" or just "+7". So I'm creating a macro that will look like: [[1d20?{Pilot|Pilot,+7|Yuna Kel,+13}[PILOT]+1[MANEUVER]+@{ship|engine_status}[ENGINES]+@{ship|core_status}[CORE]?{Use Computer|Yes,+2[COMPUTER]|No, }]] This is all generated from the existing character sheet, and I'll probably put a handler to auto update it when something in the journal updates (or just a refresh macro to run the api).
1674436244
The Aaron
Roll20 Production Team
API Scripter
I think the disconnect here is that what you want to create from a the API is called an ability. It's like a macro, but associated with a character object.&nbsp;
1674436454
Heath H
Pro
Sheet Author
That's exactly what I needed, thanks!