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

Inputting An Undetermined Variable

1532129741

Edited 1532129998
How would I input a specific variable into an equation that isn't tied to anything else? This is for a 5e campaign using the OGL Sheet. Ex:  [[ 2d8-x]]   and I have to manually input values for x
You would use a query
1532136532
The Aaron
Pro
API Scripter
[[2d8 - ?{What is X} ]]
1532228385

Edited 1532228486
The Aaron said: [[2d8 - ?{What is X} ]] Here's my macro for a pretty believable equation so far. [[(((30*@{target|Target1|strength_base})-(@{target|Target2|weight}*2.5))/(27-@{target|Target1|strength_base}))-@{target|Target1|strength_base}]] It works so long as there are two tokens, target 1 has a "strength_base"(for DnD, it's the Strength Score) attribute, and target 2 has a "weight" attribute, but I want to eliminate the need for a token-tied "weight" so it can be more versatile with what my barbarian can throw. When I tried to add "What is X?" , I didn't get a proper output anymore.
1532270870
The Aaron
Pro
API Scripter
So, something like: [[(((30*?{base})-(@{target|Target2|weight}*2.5))/(27-(?{base})))-(?{base})]] I'm not quite following what you're trying to do, so that's kind of a stab in the dark.  It should prompt you for a number, then use that number in place of where strength_base was.  (Note the ( ) in cases where you might get a double operator for negative numbers.)
1532272327

Edited 1532272374
GiGs
Pro
Sheet Author
API Scripter
I think its the weight variable that he wants to replace with a query. Thats a fairly complicated formula for determining how far you can throw something. Is that really how you do it in 5e?
1532272610
The Aaron
Pro
API Scripter
Ah, thanks G G.   [[(((30*@{target|Target1|strength_base})-(?{weight}*2.5))/(27-@{target|Target1|strength_base}))-@{target|Target1|strength_base}]] I don't believe there's a formula for how far you can throw something in 5e.
1532304365

Edited 1532305528
The Aaron said: Ah, thanks G G.   [[(((30*@{target|Target1|strength_base})-(?{weight}*2.5))/(27-@{target|Target1|strength_base}))-@{target|Target1|strength_base}]] I don't believe there's a formula for how far you can throw something in 5e. This worked, thank you. There isn't a formula in 5e per se, but I tested this equation out on Desmos Graphing Calculator with a bunch of different Strengths and weights and it gave believable results.
G G said: I think its the weight variable that he wants to replace with a query. Thats a fairly complicated formula for determining how far you can throw something. Is that really how you do it in 5e? No, it's usually up to DM discretion how far an object can be thrown unless otherwise specified(Like a handaxe has a range of 20/60)