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

Changing macro/abilities properties possible?

I'm curious if this is possible. Can, upon the use of a player ability being used from this list, the "Show as token action" be removed for that specific ability to hide it? This is for things like using dailies and spells with limited uses and having them unusable until a rest. If so is there a way to enable the option again without going into the character sheet and enabling them all by hand, for all abilities that currently didn't have that option active, for that character?
1407291856
The Aaron
Roll20 Production Team
API Scripter
You can definitely do that with the API.
Thanks, I've been scratching my head on where to start, the most logical place would be to identify the macto or ability that was used. Though I'm currently unsure how to do that right now. Is there a way to identify the ability or macro on click first?
1407352640
The Aaron
Roll20 Production Team
API Scripter
Not really. I actually started on a script to do this last night, but got interrupted. I'd be happy to write it for you, or provide support while you write it. Here are my thoughts on how I'm going to do it: To get the hiding behavior, I'd add a command to each power like this: !use-power daily <ability id> or !use-power encounter <ability id> !use-power will take a type and the id of the ability, then turn off the token macro setting on that ability and add the power to a list of powers that need to be re-enabled at the right time. Then I'll add these two commands: !short-rest !long-rest Which will look at the list of powers in either the used encounters list, or both used encounters and used dailies and set their token macro setting to on. The real kicker is how I'll add those !use-power calls. I'll write a command you give the name of a character to like this: !add-use-power -- batman Which will list out abilities by name with numbers to the chat: 1 Bat-Binder 2 Bat-Bomb 3 Shark-Repellant 4 Bat-Tornado 5 Robin 6 Bat-A-Rang Then you'll call it again like this: !add-use-power -- batman --encounter 1 3 --daily 2 4 and it will go through and add the !use-power call with the correct arguments to each of the powers if it's not there already. That's my plan!
Your idea is brilliant I think and is exactly what I had in my head for a script, And if you could continue building it, I would appreciate it a lot. Thank you. I'm not the best at creating scripts, but I'm good at adapting/editing them and so forth for my own campaign later on.
1407362789
The Aaron
Roll20 Production Team
API Scripter
Sounds good. :)
Calhanol said: I'm curious if this is possible. Can, upon the use of a player ability being used from this list, the "Show as token action" be removed for that specific ability to hide it? This is for things like using dailies and spells with limited uses and having them unusable until a rest. If so is there a way to enable the option again without going into the character sheet and enabling them all by hand, for all abilities that currently didn't have that option active, for that character? If it is to reset a character for a rest, it might be a violation of policy, just fyi.
1407415343
The Aaron
Roll20 Production Team
API Scripter
Say what?
Bryan K. said: Calhanol said: I'm curious if this is possible. Can, upon the use of a player ability being used from this list, the "Show as token action" be removed for that specific ability to hide it? This is for things like using dailies and spells with limited uses and having them unusable until a rest. If so is there a way to enable the option again without going into the character sheet and enabling them all by hand, for all abilities that currently didn't have that option active, for that character? If it is to reset a character for a rest, it might be a violation of policy, just fyi. If it's part of the API to modify the macro settings like this, how is it agaisnt the policies?
1407436176
The Aaron
Roll20 Production Team
API Scripter
I have to imagine that Bryan is talking about some power that is an encounter and doesn't reset after a short rest or something... There's nothing Roll20 related that applies. That reminds me, I seem to recall there are some powers that stick around for several uses: Channel divinity, lay on hands, that sort of thing. Is that right?
Indeed I think there are some, especially the leader's healing abilities are 2 uses per encounter, instead of one. That is the main one I know.
1407440794
The Aaron
Roll20 Production Team
API Scripter
ok. I'll see about adding an argument that allows a power to have multiple uses and only removes it after that many times.
1407441014
The Aaron
Roll20 Production Team
API Scripter
I can totally see using this for consumable items like healing potions as well. Maybe expand the concept to 1st level spell slots in other versions of DnD, etc. "oh.. I just cast my last 2nd level spell.. can't use these other 2nd level spells anymore." slightly complicated by the multiple spell level casting in 5th and similar games. Hmm... something to think on...
I can see this too, and with the variables in 5th where you can choose from a multitude of spell I can see how it can easily get complicated. Consumable items seems easier to handle though at the least.
Been busy for the past few days, just wondering how it's been going and if any progress with the script has happened or anything. Thanks again still.
1407943486
The Aaron
Roll20 Production Team
API Scripter
Yeah, me too! I'm 90% finished, just have the instrumenting code left to do. Headed for GenCon today, but might get a chance to work on it during the trip. (My wife always volunteers to drive.. =D)
THat's good news, hope you've had a good time there and hope to have an update soon.
1408368002
The Aaron
Roll20 Production Team
API Scripter
I did! Met Jim Butcher and got a picture with him and my son Dresden. Went to lots of writers' seminars, which were fantastic. Very tiring though, looking forward to a few days of rest!
Any progress currently, I'm sorry that I'm keeping on like this, I'm jusr excited to see it and test it.
1408656555
The Aaron
Roll20 Production Team
API Scripter
Not yet. Sorry, slightly delayed by various things, but it should be done in a matter of days, not weeks, if that's any consolation.
That's okay mate, my groups next session is in about a week's time, and they just had a full rest so it's a great pooint to have it at also.
The next session fell through due to plans etc, but how's the script forming up right now? It would be nice to give it a test run with my group for the next session.
1409491682
The Aaron
Roll20 Production Team
API Scripter
Should be finishing it up tonight or tomorrow. ;)
That's brilliant news. Can't wait. THanks again for the help and sorry for any trouble too.
1409630486
The Aaron
Roll20 Production Team
API Scripter
No worries. Probably tomorrow night though... Sorry. :/
1409689928
The Aaron
Roll20 Production Team
API Scripter
Ok. Here ya go! <a href="https://app.roll20.net/forum/post/1143437/script-u" rel="nofollow">https://app.roll20.net/forum/post/1143437/script-u</a>...