So I was thinking of possibly dabbling in some API scripts, ideally to
do all sorts of things to make a game (of D&D 5e) easier to run, but
I don't know how it'll turn out because if I try to get started I'll
have to actually learn quite a few things and it might not work out
ultimately.
Considering that, I don't really want to commit to paying $10/month just to see how things work, so is there some way to be able to test API scripts without paying? If there is some sort of method already that's obvious to others, then it's not obvious to me.
If there isn't a way to do that, then what if I use a friend's account that does have pro status already? The intent seems mostly harmless to me, but I don't want to do that and suddenly find out it's highly frowned upon to do anything like that and then end up with both of us in trouble just because I'm not clear on the rules.
Note that I'm not trying to complain about API access being behind a paywall, I just don't want to pay for a subscription and then get super bitter because I felt like I wasted $10.
I saw this other post (quoted below) on how to get started, so if I do get started I would probably just follow the advice there, although if somebody else has additional advice on how to get started that would also be welcome.
Considering that, I don't really want to commit to paying $10/month just to see how things work, so is there some way to be able to test API scripts without paying? If there is some sort of method already that's obvious to others, then it's not obvious to me.
If there isn't a way to do that, then what if I use a friend's account that does have pro status already? The intent seems mostly harmless to me, but I don't want to do that and suddenly find out it's highly frowned upon to do anything like that and then end up with both of us in trouble just because I'm not clear on the rules.
Note that I'm not trying to complain about API access being behind a paywall, I just don't want to pay for a subscription and then get super bitter because I felt like I wasted $10.
I saw this other post (quoted below) on how to get started, so if I do get started I would probably just follow the advice there, although if somebody else has additional advice on how to get started that would also be welcome.
The Aaron said:
In a recent post, this was my advice to getting started:The Aaron said:
It really doesn't matter what you choose to do first, it's all about learning.
The API runs on top of Node.js, so if you're looking for more in the way of tutorials, reading about the way Node modules work is probably helpful (the whole "event driven" thing). However, I don't think you need to go overboard there. Javascript isn't as complicated as it seems and 3 hours is long enough to learn the basics of the language, enough to write some API Scripts.
I would start by writing the following:• A script that parrots back whatever you pass it:
This will give you the chance to learn about API commands and the chat:message event, which is probably the most used event.!say polly want a cracker?polly want a cracker?Then play with the formatting a bit. Make it whisper it to the person that ran the command. Add some header text like "The parrot says" to it.• A script that whispers to the GM how far a token moved.
This will give you a chance to learn about change:graphic events, probably the other most used event.
Start with just the x,y pixel distance, then add the name of the token, convert to the units of the current page, add the name of the character it represents, if any. If you want to get REALLY fancy, read the lastmove and calculate the actual distance based on the path.• A script that tells you if your roll is higher, lower or the same as your last roll
This will give you the chance to get into persisting data and understanding the inlinerolls syntax, which is a bit complicated.!roll [[1d20]]18 (no prior rolls)Once you've run through those, you'll probably have a pretty good feeling for the parts of the API.
7 (lower)
9 (higher)
9 (same)
20 (higher)