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

Broken brain... help with basic math

So I made a Travel calculator for 5e with a little home brew added in. It should  calculate travel time based on distance modified by pace, terrain and whether your using mounts (that's my own homebrew part). But the numbers are not coming out right. I was hoping for a new set of eyes to take a look. **It will take [[?{Travel Pace?|Fast,30|Normal,24|Slow,18}*?{Travel Mode?|On Foot,1|Horseback,1.25}*?{Terrian?|Road/Trails,1|Off Road,2}/?{How far in miles?| }]] day(s) to travel [[?{How far in miles?| }]] miles.** I know it's an easy fix but don't see it lol
1490550470
The Aaron
Pro
API Scripter
Try taking the [[ ]] off and see what the equation being printed is.  That usually helps me.  There's probably an order of operations error or some number not coming out like you'd expect.
**It will take [[ ( ?{Travel Pace?|Fast,30|Normal,24|Slow,18}*?{Travel Mode?|On Foot,1|Horseback,1.25}*?{Terrian?|Road/Trails,1|Off Road,2} ) /?{How far in miles?| }]] day(s) to travel [[?{How far in miles?| }]] miles.** You have to define order of operations is all. It's trying to multiply and divide at the same time :) The ( ) helps tell it to multiply first, then divide the result.
1490557508

Edited 1490558436
Silvyre
Forum Champion
I'd imagine you want your equation arranged like this (I also made a change to the 'terrain' Roll Query, bolded): **It will take [[ ?{How far in miles?|24} / (?{Travel Pace?|Fast, 30|Normal, 24|Slow, 18} * ?{Travel Mode?|On Foot, 1|Horseback, 1.25} * ?{Terrain?|Road/Trails, 1| Off Road, 0.5 }) ]] day(s) to travel [[ ?{How far in miles?} ]] miles.** Time = Distance ÷ Speed Distance is 'how far in miles'. Speed is 'travel pace' (increased by 25% on horseback; decreased by 50% on off-road terrain).
Thanks Silv I had just realized what I did lol. I was looking at as difficult terrain was x2 and was doing my division  backwards.  thanks again everyone