[1.3b53] Add movement metric argument to getDistance()
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
[1.3b53] Add movement metric argument to getDistance()
I would like to be able to choose the movement method used when measuring distances as an argument. Notably, D&D measures distance as ONE_TWO_ONE - except for melee attack ranges, which are ONE_ONE_ONE. Doesn't matter for standard range weapons, but for things with reach I have to treat them as having a 15-foot range instead of a 10-foot range to include all their threatened squares.
Re: [1.3b53] Add movement metric argument to getDistance()
I'll second this one, its something I'd completely forgotten about to be honest.
Re: [1.3b53] Add movement metric argument to getDistance()
If I understand the problem, the issue is that reach weapons aren't getting both diagonal squares, right? I think if you use the units argument (set to false) it just counts squares, and not in feet. That might solve the problem (melee attacks with reach would range out to two cells).
Re: [1.3b53] Add movement metric argument to getDistance()
Upon testing, it still uses the movement metric.
Re: [1.3b53] Add movement metric argument to getDistance()
All distance functions at the moment depend on the same code that does movement, so distances are always tied to the maps movement metric. Its probably worth revisiting this in 1.4 but it defiantly falls into the "too big to change for 1.3 before it goes final" bucket.
Re: [1.3b53] Add movement metric argument to getDistance()
I stand corrected. I only use one-one-one, so I made an erroneous assumption. In that case, I fully endorse "look at this in 1.4".
I wonder, could you use the "area" json-filtering option from getTokens() to brute-force the threatened area? I'm guessing that's still movement-metric based (is it a distance function?) but if not, that might be a solution.
I wonder, could you use the "area" json-filtering option from getTokens() to brute-force the threatened area? I'm guessing that's still movement-metric based (is it a distance function?) but if not, that might be a solution.
Re: [1.3b53] Add movement metric argument to getDistance()
Hold that thought, after belatedly having my morning coffee I see the solution and its not too big a change. Once again caffeine has shown the way.Craig wrote:All distance functions at the moment depend on the same code that does movement, so distances are always tied to the maps movement metric. Its probably worth revisiting this in 1.4 but it defiantly falls into the "too big to change for 1.3 before it goes final" bucket.
Ok I think I can make the change to getDistance(), getDistanceToXY() and getTokens() functions and get it to Trevor before next build.
Re: [1.3b53] Add movement metric argument to getDistance()
It wouldn't be pretty, but it should work.Rumble wrote:I wonder, could you use the "area" json-filtering option from getTokens() to brute-force the threatened area? I'm guessing that's still movement-metric based (is it a distance function?) but if not, that might be a solution.
Code: Select all
[h: ThreatenedTokens = getTokens('json', '{"visible":1,"area":"{"offsets":"[
"{"x":0,"y":2}",
"{"x":0,"y":1}",
"{"x":0,"y":-1}",
"{"x":0,"y":-2}",
"{"x":1,"y":2}",
"{"x":1,"y":1}",
"{"x":1,"y":0}",
"{"x":1,"y":-1}",
"{"x":1,"y":-2}",
"{"x":2,"y":2}",
"{"x":2,"y":1}",
"{"x":2,"y":0}",
"{"x":2,"y":-1}",
"{"x":2,"y":-2}",
"{"x":-1,"y":2}",
"{"x":-1,"y":1}",
"{"x":-1,"y":0}",
"{"x":-1,"y":-1}",
"{"x":-1,"y":-2}",
"{"x":-2,"y":2}",
"{"x":-2,"y":1}",
"{"x":-2,"y":0}",
"{"x":-2,"y":-1}",
"{"x":-2,"y":-2}"
]"}"}')]
- trevor
- Codeum Arcanum (RPTools Founder)
- Posts: 11311
- Joined: Mon Jan 09, 2006 4:16 pm
- Location: Austin, Tx
- Contact:
Re: [1.3b53] Add movement metric argument to getDistance()
contributed by Craig, applied to 1.3b55
Dreaming of a 1.3 release
Re: [1.3b53] Add movement metric argument to getDistance()
I have updated the wiki with documentation on the new additions to b55 for this.
Re: [1.3b53] Add movement metric argument to getDistance()
sa-Weet.trevor wrote:contributed by Craig, applied to 1.3b55
Re: [1.3b53] Add movement metric argument to getDistance()
Awesome!
Thanks very much!
Thanks very much!