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

Custom FX questions

1459164927

Edited 1459165012
Bird
Pro
First let me start off by saying, amazing addition.  I love the idea and the preset effects already in there are great! I did some reading on the wiki, but unfortunately it's a bit over my head. Is it possible to create an effect that continues for some time even after the mouse button is released? For example, the group is heading into the Dark Dwarven fortress and a flame thrower trap continues to shoot...well...flames.  I do understand I can put down an icon or draw lines or whatever to demonstrate where the fire is affecting, but I was curious if there's a way to make the effect last for some time, or even a few minutes. As a DM who types to my players, I am often not afforded the luxury of spell effects and explaining what's going on. Also, if there is a way to make an 'everlasting effect' is there a way to remove said effect, so if the adventurers shut down the flame thrower the fire stops? If there's not a way to create a permanent effect, do you think there will be in the future?  I know I would certainly like to see this.  Glimmering gold gatherings.  Blood sputtering corpses.  Dimly lit torches.  It sounds like a wonderful dream. [Edit:  Crap.  Can't change the title.  I should've put it as 'Custom FX questions'.  I worry that 'spell' is going to confuse.]
1459165197
Gen Kitty
Forum Champion
(I can't answer your question, but I can fix your post title! :)  )
GenKitty said: (I can't answer your question, but I can fix your post title! :)  ) That's good enough for me!  Thank you!
One could make a loop using an API script. This is going to burn a whole lot of resources though and I would not advise this. If your players have anything less than an optimal setup and internet connection a sustained effect would probably murder everything else in the game. The Aaron, Scriptomancer 20th level could probably whip up the script, he might even be able to set the timeouts so it would not be a resource hog, but only he knows what evil lurks in the heart of Javascript.
1459181492
The Aaron
Pro
API Scripter
That is indeed true and this is on my list of things to do very shortly after I finish my abstract configuration system (which is Almost Done TM ). If you want to help that process along though, let's talk about the interface. Probably something like: !effect <type>-<color> @{target|Foe|token_id} @{target|caster|token_id} --<duration> !effect <type>-<color> (x,y) (x,y) [@{target|Token on Page|token_id}|<page id>|<page name>] --<duration> Actually, that wouldn't be that hard...   Thoughts?
The Aaron said: --<duration> I'd love to see the ability to specify a duration to last until an item reaches the top of the turn tracker for the nth time, or until a custom item achieves a set value, or a value that is ±n from its current value.
1459184707
The Aaron
Pro
API Scripter
Interesting idea, I like it. =D
The Aaron said: That is indeed true and this is on my list of things to do very shortly after I finish my abstract configuration system (which is Almost Done TM ). If you want to help that process along though, let's talk about the interface. Probably something like: !effect <type>-<color> @{target|Foe|token_id} @{target|caster|token_id} --<duration> !effect <type>-<color> (x,y) (x,y) [@{target|Token on Page|token_id}|<page id>|<page name>] --<duration> Actually, that wouldn't be that hard...   Thoughts? I'm too stupid to understand this.  Is this something I can implement currently or are you just brainstorming?
1459217722
The Aaron
Pro
API Scripter
The hardest part of most scripts is the interface. I was proposing 2 command syntaxes that I think would cover most use cases, with the intent to implement them in the near future. 
1459225548
Andrew C
Marketplace Creator
I don't know how easy it is to have a 'do while' type structure in Java... { trigger the effect } do { nothing } while {current turn < (Turn this happened in + duration) } { end effect } But then again, my programming style and time has been heavily influenced by doing Abstract Turing Machines at Uni (as a Mathematical concept) and QBasic.  Object-Event people complain my default writing looks like machine code :P That and half the stuff in Roll20 confuses me...
1459256041
The Aaron
Pro
API Scripter
Javascript does have a do while: var i=10; do { log(i); } while(i--); But you wouldn't want to use that for things like this because it would prevent anything in the API from running while it was doing nothing. Javascript is single threaded so must use various asynchronous techniques to create cooperative multitasking.  In the barest sense, what you'd want to write instead of the above would be akin to this: /* trigger the effect */ setTimeout( function(){ /* end the effect */ }, someMilliseconds ); The API is event driven, so for something like the effects on a turn, you might do: /* trigger the effect */ /* ... */ on('change:campaign:turnorder',function(c){ /* if turn of token */ /* end effect */ }); or similar.