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

(5e OGL) Speed, AutoMath, Comparison (Status, Racial, Etc.) Possible?

Blue64 &nbsp;said: I wish to run inline math on a Call to figure out Movement Speed, without using API (because I'm a Free User) Limitations I foresee: Varies Sheet to Sheet, use these: @{speed} = Base Speed @{race} = the Character's Race I need a Check for Tabaxi, their Feline Agility offers 2x Speed for 1 Turn @{haste} = I need a way to "Check" for Haste, one that's easily accessible, preferably a check for a Status Icon if there is a way (No API), preferably without User Input (manageable with if needed). This offers another Speed x2 Boost @{longstrider} = amongst other effects which increase Speed by a set amount, this is likely to be accompanied by a ?{query} Don't even bother with the Prefixes, that can be added later. Specifically the reason I'm mentioning this here is that bit about checking for Tabaxi using the Comparison function (which works across all sheets, &amp; is generally difficult to comprehend for most users), it's a Clever Use if someone knows how to get it to work. Sadly the Comparison function has yet to "click" for me yet. (-.-') I'm thinking the Result will look something along the lines of: [[ ( (@{speed} +{ { {@{longstrider}, Longstrider} Longstrider} 1}) *{ { {@{race}, Tabaxi} Tabaxi} 1}) *{ { {@{haste}, Haste} Haste} 1} ]] without some way to AutoMath such things, I'm forced to revert to spamming the User with Queries ! ?{Longstrider|Off,0|On,10} ! ?{Other "+X Speed"|0} ! ?{Haste|Off,1|On,2} ! ?{Feline Agility|Off,1|On,2} [[ ( ( (@{Speed} +?{Longstrider}) +?{Other "+X Speed"}) *?{Haste}) *?{Feline Agility} ]] Or, simply assigning individual Macros for each combination (which is MUCH more work) and implementing them as a Chat Macro List. <a href="https://app.roll20.net/forum/permalink/6621399/" rel="nofollow">https://app.roll20.net/forum/permalink/6621399/</a> Page 7, all the way at the bottom. Discussing it at length here to avoid bloating that thread.
1532620135

Edited 1532620335
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is pretty much undoable without API access, and even then it will be sheet and especially system specific. I'll outline the reasons below and potential workarounds, although all the workarounds can be summed up as "this requires a custom macro for each player based on their traits/stats" Varies Sheet to Sheet, use these: @{speed} = Base Speed So, this one is actually possible, try [[ [[@{speed}]] + other modifiers ]]. As long as speed is a single entry, this should work regardless of what metric it is labeled as. @{race} = the Character's Race I need a Check for Tabaxi, their Feline Agility offers 2x Speed for 1 Turn Unless races are entered as number (e.g. 1 for human, 2 for elf, 3 for tabaxi), there's no way to do this without API. The roll functions can only compare numbers. This is better handled by just a custom macro for that character. @{haste} = I need a way to "Check" for Haste, one that's easily accessible, preferably a check for a Status Icon if there is a way (No API), preferably without User Input (manageable with if needed). This offers another Speed x2 Boost If you had a checkbox that was associated with haste and that checkbox was a number value when checked (ala the PF companion sheet's buffs), you could do this by doing [[ [[{0,@{haste_checkbox}}=1]]*[[ [[@{speed}]] +&nbsp; other modifiers ]] ]] + [[ [[@{speed}]] +&nbsp; other modifiers ]] ]] @{longstrider} = amongst other effects which increase Speed by a set amount, this is likely to be accompanied by a ?{query} I don't play much 5e (I'm assuming that's the system this is for), so not sure of the exact conditions for using longstrider, but from your bare bones description then yes a query is the proper method here, unless you have it in as a buff (again, ala the PF community sheet) that you can check for being toggled on similarly to how I did haste above. These are never going to be sheet, let alone system, agnostic though. And expecting to find a way for it to be character and campaign agnostic is just asking for madness.
1532623573

Edited 1532623693
GiGs
Pro
Sheet Author
API Scripter
Bear in mind, there are games that don't use movement speed or where movement speed is standard for everyone, games where there are no other races, games where there's no such function as Haste, games where there a multiple different modifiers for speed, and whatever longstrider is, is likely to be just for one specific game. Longstrider is a great example though: in games that do use movement speed, they'll all have their own unique special cases, which further ruins any attempt to make it system agnostic. So even a function such as "calculate movement speed" cant be universal across many games, when there are so many different ways to handle it. In my experience, its far, far more common for speed to be a constant, than it is to be variable among characters, too.
First 2 things in the Title: 5e OGL also, you completely ignored the line: Varies Sheet to Sheet, use these: That being said, is there a way (without API) to check if a Token Status Effect is active? You can see the Baseline Result in the lowest Code Box in the first post (which uses nothing but Generic, multi-system commands, and even sets the values for things such as Haste, the Tabaxi's Feline Agility, &amp; Longstrider) In OGL: Speed [[@{speed}]] Race: @{race} @{subrace} @{race_display} Haste has no "Simple Button" like you mentioned. I can explicitly set one, manually, but, again, that is not simple, and it would actually be faster to simply use a Query every time, neither does Longstrider. What I'm specifically asking about is a way to check essentially: if @{race} = Tabaxi SetValue 2 Else SetValue 1 (that is in Generic Programmer Terms, a simple If/Else command) Is there a way to translate that into a Number somehow without me going into everyone's Abilities manually &amp; setting it each &amp; every time they use Feline Agility (which only lasts for a single Turn, not even a full Round, but just their Turn, and then, they need to not move for 1 Round in order to recharge it), and without using the API? If this was an easy task, I wouldn't be asking, obviously. I have provided all required frameworks in order to provide a Generic Question/Answer so that anyone with even a minor grasp on the situation (I need to Math the Movement Modifiers, and I need to do it frequently, with lots of potential Changes on the fly) is capable of attempting assistance, however, I have also explicitly stated right in the Title that I am specifically asking about the 5e OGL Roll20 Sheet. Here's the Links to the Wikia for Each of these Effects (since everyone who seems to be responding seems to be failing to recognize that I have explicitly asked about 5e): Tabaxi's Feline Agility Speed x2 for 1 Turn "you can double your speed until the end of the turn" Haste Speed x2 for 10 Rounds (Concentration Spell) "Its speed is doubled" Longstrider Speed +10 for 600 Rounds "The target’s speed increases by 10 feet until the spell ends." Haste &amp; Feline Agility both Stack, since they are not identical (one is a Spell, the other is a Racial Trait, and the Effect is not the same despite the result being similar), &amp; you are supposed to + or - before you * or / according to the 5e PHB, so Longstrider comes first, then Haste &amp; Feline Agility, both of which will each double it. The Average Speed in 5e roams around 30 feet with a few exceptional creatures able to reach much higher speeds (Riding Horses, War Horses, Tarrasque, etc.)
Scott C. said: This is better handled by just a custom macro for that character. 1 Macro for Feline Agility Feline Agility + Haste Longstrider + Feline Agility Longstrider + Feline Agility + Haste + any other Combinations which pop up. or, Spam Queries, which would actually be simpler.
1532628458
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, I meant a custom macro for all the character's speed modifiers using the techniques outlined later in my post. But regardless of all of that, as soon as someone records that they have a fly speed as well as a land speed, the whole thing will break. Essentially, this just isn't possible other than as a completely custom macro/attribute combo. As for your question about accessing the token status markers without the API; nope, there is no attribute accessible by macro commands for that. Blue64 said: Scott C. said: This is better handled by just a custom macro for that character. 1 Macro for Feline Agility Feline Agility + Haste Longstrider + Feline Agility Longstrider + Feline Agility + Haste + any other Combinations which pop up. or, Spam Queries, which would actually be simpler.
Since I have not heard back from anyone else yet on how to accomplish my goals, here is what I have come up with so far: Manually assign Attributes Per Character Sheet Per Effect Run it through a Comparitor (idiot proofing) Results = 1 (they have it) *((1) +1) Haste +((1) *10) Longstrider Results = 0 (they don't) *((0) +1) Haste +((0) *10) Longstrider - or - Query EVERYTHING, spam them with pop-ups EVERY time it's called, ruining the immersion entirely for the sake of having it idiot proofed, with the exact same Math as the other one. I will probably do the Code Blocks for the equations after I finish my Spell Index (so, likely in a few Months) P. S. Scott C. You have a TON of trailing spaces on the end of your Quotes. I counted at least 3 Line Returns.