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

Laggy Macro

Hello! Just for background, I was messing around with a custom sheet I've been working on, one that does have some fairly complex formulas. The sheet itself, and roll20 work normally with no lag, everything works as it should, except when I try to make macros. When I call for the data from certain variables, it seems to hang, generally on the more complex ones. The macro will go through after awhile, but it's almost as if instead of just pulling the number I need, it recalculates everything and just has trouble getting the result. This can cause 5-15 seconds of lag in between clicking a macro, and it outputting the result, while hanging roll20 the whole time, while the browser is still fully functional, allowing me to mess with other tabs. The answer is correct, so the macro itself is working fine, but it just seems wrong to lag so much. Is there a particular way to call variables that is more efficient, or have I just pushed roll20 to its limits? Example of the macro, it's purpose is to roll an attack roll that combines multiple attack bonuses, while pulling up two numbers, a mana, and stamina cost for a particular ability, so as not to have to dig through a sheet each time. It's displaying as I wish, I need to see the die roll without the modifier added. It's not a terrible amount of lag, but I'm just curious to possible answers, I can't seem to find anything on this sort of thing.
1423197845

Edited 1423197985
Gen Kitty
Forum Champion
If you mouse-over the yellow box, you will see the dice roll . Nevermind, there isn't a diceroll in the inline stuff. Try turning off your 3d dice?
1423200650

Edited 1423200719
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Rickie, I set up a macro referencing from a character sheet with almost the exact same setup and am experiencing no trouble. Is it possible that the dice server might have been lagging just at that moment? Your original post was at our peak use time. Also, since you're just referencing fields you don't need to put them as inline rolls. That may help speed up your macro. /roll 1d20+(@{selected|iaac1}+?{Modifier|0}) StamUse: @{selected|iatsu1} ManaUse: @{selected|iamanac1} Side note, if you're looking for a way of formatting your rolls on your custom sheet you may be interested in Roll Templates .
1423202134
Lithl
Pro
Sheet Author
API Scripter
Steve K. said: Also, since you're just referencing fields you don't need to put them as inline rolls. That may help speed up your macro. /roll 1d20+(@{selected|iaac1}+?{Modifier|0}) StamUse: @{selected|iatsu1} ManaUse: @{selected|iamanac1} Unless the attributes in question are from autocalc fields, then he would need to make them inline rolls. Also, I know at least one person who like to put important constants into inline rolls just to make them pop when you look at the macro result.
Brian said: Steve K. said: Also, since you're just referencing fields you don't need to put them as inline rolls. That may help speed up your macro. /roll 1d20+(@{selected|iaac1}+?{Modifier|0}) StamUse: @{selected|iatsu1} ManaUse: @{selected|iamanac1} Unless the attributes in question are from autocalc fields, then he would need to make them inline rolls. Also, I know at least one person who like to put important constants into inline rolls just to make them pop when you look at the macro result. Yes, I should of mentioned that, they are autocalc fields. The speed remains the same at this time, and I have 3d dice turned off. I will look into the Roll templates page as well, just to see if I can find anything. Honestly, the more I look at this, the more I think this is simply just too much happening at once, I really appreciate the help, but from what I can see when I compare the calculation sizes, when too many things are calculated into too many things, there's a point where lag just gets exponentially worse. I'll be honest, I'm surprised it's working in the first place, I got a bit carried away with a slew of scaling formulas, and when the macros try to process it, it just can't keep up with certain ones.
1423206521
Gen Kitty
Forum Champion
Brian said: Also, I know at least one person who like to put important constants into inline rolls just to make them pop when you look at the macro result. I do this too! ^_^
1423240208
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
GenKitty said: Brian said: Also, I know at least one person who like to put important constants into inline rolls just to make them pop when you look at the macro result. I do this too! ^_^ Haha, that's why I suggested roll templates. They're even better at that then inline rolls.
1423267201
Gen Kitty
Forum Champion
Roll templates are nice for GMs, yeah :>
1423293940

Edited 1423294118
Powercards are nice for everyone!  Also... if you are downloading anything when you send rolls in Roll20, or just have a slow connection, that can cause leggy rolls.
1423352252

Edited 1423352312
I did seem to stumble into an error on my part, one of the variables, @{wd1}, managed to get used twice xD. One for a weapon description, one for weapon damage, so it was a text value trying to calculate. I'm not certain how it was getting an accurate result, but somehow it was, either way, that did shave off 5-10 seconds off the worst lag. Now both only lag 3-5 seconds, which isn't nearly so bad!