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

Can I talk shell to it, somehow?

1631417066

Edited 1631418919
I'm an old-school Unix/Linux shell thinker.  I want to be able to take (whatever set of data), apply patterns to it, and use that patterns within a game. So for example, say I've put some specifics on a goblin icon, now I want to duplicate that, X-number of times, giving each individual goblin a numeric name; "gob1", "gob2"...  Doing that once on an afternoon is fine, but I'll do that some uncertain number of times with a variety of creatures, or whatever; "goblin" is the go-to example of anything, but this sort of situation comes up in other ways.  "Big batch" of whatever today, then at the next session, three little batches of this, one medium batch of that.  More than one DM tool gets easier when the scripts can be written in shell. I've looked around but haven't found anything.  Is there some known tool for making that happen? Thanks.
To clarify: I don't expect, egad, "shell commands within the environment, here."  Egad. More like, "how to go about Ctl-C from here, do whatever on one's own whatever, then Ctl-V"... which is, again, obviously wrong, but you get the gist.  Please tell me how to get better educated.
1631417950
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The API is what you are looking for, but it requires the creator of the game to have an active pro subscription. And, there's even already a script written by The Aaron to do exactly what you are talking about, tokenNameNumber.
1631419040
The Aaron
Roll20 Production Team
API Scripter
The API is basically a command line interface when you're talking about chat commands. It's not advanced like bash or zsh, but there's a lot you can get done that way.
Thanks.  Just to clarify: that script will only run under Pro, right, it's not, "you could go Pro, or here's a stopgap"?
The Aaron said: The API is basically a command line interface when you're talking about chat commands. It's not advanced like bash or zsh, but there's a lot you can get done that way. That's exactly what I'm looking for, right.  The sh-ing (or whatever) can go elsewhere, I just want, "suck from here", "do things", "replace". So, sounds like yeah, I'd need to go Pro.  Not an option currently, but perfectly reasonable.  Thanks.
1631460096
The Aaron
Roll20 Production Team
API Scripter
Yup, and to be clear, with API commands the API scripts just get the raw text string and a bit of meta-data, and the actual shell-like parsing is handled in the individual scripts.  There aren't commands that duplicate a token, but you can write (or others can write) them and use them that way.  There are constraints of course, but you can get a lot done.