PDA

View Full Version : Does fantasy grounds detect min range on ranged attacks



Nerzilus
August 6th, 2018, 14:26
For instance a long bow has a range of 150/600 ft. Can fantasy grounds automatically apply disadvantage on attacks between 150 and 600 or does it need to be always manual.

damned
August 6th, 2018, 14:41
For instance a long bow has a range of 150/600 ft. Can fantasy grounds automatically apply disadvantage on attacks between 150 and 600 or does it need to be always manual.

Ranges have not been coded into the 5E ruleset.
They are in Savage Worlds and Shadowrun.
Not every rule is covered with automation.

leozelig
August 6th, 2018, 23:13
Ranges have not been coded into the 5E ruleset.
They are in Savage Worlds and Shadowrun.
Not every rule is covered with automation.

I did not know such things were possible. I will have to check this out...

LordEntrails
August 7th, 2018, 00:10
I did not know such things were possible. I will have to check this out...
Pointers know the distance between ends. It's just a matter of using that. Using distances mean that maps have to be to scale, not TotM relative position maps, and you have to use targeting, and the DM has to make sure things are as they are supposed to be, and you are not using houserules that make other adjustments, etc.

GMScott
December 26th, 2018, 21:05
Pointers know the distance between ends. It's just a matter of using that.

...and how would one do that?



I would think it would be something like the following;

IFT: DISTANCE(>=150); DISATK: range

But that doesn't seem to work.

Zacchaeus
December 26th, 2018, 21:56
Hi GMScott, welcome to FG.

LordEntrails is referring to drawing a pointer on the map by holding down both mouse buttons and dragging. If targeting is used properly then you also see a white arrow between targets which also has the distance on it.

damned
December 26th, 2018, 22:15
Hi GMScott

Distance calcs for ranged weapons hasnt been implemented in most rulesets afaik.
Shadowrun does it and I think Savage Worlds does. The others havent been coded for it.

LordEntrails
December 26th, 2018, 22:24
Hi GMScott, welcome to FG.

LordEntrails is referring to drawing a pointer on the map by holding down both mouse buttons and dragging. If targeting is used properly then you also see a white arrow between targets which also has the distance on it.
This, and note that you can't do any effects with it, as it is not a variable that is accessible to the effects or the combat tracker (in 5E)

GMScott
December 27th, 2018, 00:04
Thank you all for your warm welcome and quick responses!



Hi GMScott

Distance calcs for ranged weapons hasnt been implemented in most rulesets afaik.
Shadowrun does it and I think Savage Worlds does. The others havent been coded for it.


This is both surprising and disappointing!

Having used RPTools' MapTool, d20Pro, and Roll20 (all of which have this most basic capability), I would like to know how I would go about trying to implement this for 5E.
I assume I would have to write a custom condition for IFT, correct?

I haven't done nearly enough digging yet, so I haven't found the core libraries. Is extensibility based on JavaScript like Roll20, or some kind of custom script like MapTool? Maybe C/C++?

I'm still a bit overwhelmed with the size of the wiki, can you point me in the right direction for this, please?

mattekure
December 27th, 2018, 00:11
Thank you all for your warm welcome and quick responses!





This is both surprising and disappointing!

Having used RPTools' MapTool, d20Pro, and Roll20 (all of which have this most basic capability), I would like to know how I would go about trying to implement this for 5E.
I assume I would have to write a custom condition for IFT, correct?

I haven't done nearly enough digging yet, so I haven't found the core libraries. Is extensibility based on JavaScript like Roll20, or some kind of custom script like MapTool? Maybe C/C++?

I'm still a bit overwhelmed with the size of the wiki, can you point me in the right direction for this, please?

Extensions are written in LUA and XML. You'll need to dig into them pretty heavily to make that kind of change.

damned
December 27th, 2018, 00:13
Its not been something that has been oft requested.
You can create a request on the wishlist: https://fg2app.idea.informer.com/proj/
I could not see any other requests for ranged stuff...

The code is written mostly in Lua with presentation in XML.
Your best bet is looking in existing rulesets to start with.
As mentioned I think Shadowrun does do this - it adjusts damage based on range.

There are some videos with some examples of how to do stuff in FG coding here: https://www.youtube.com/user/itnext1 but none deal with exactly what you are looking at but they will give you a better idea of how/where to look and to make extensions.

GMScott
December 27th, 2018, 01:16
Extensions are written in LUA and XML. You'll need to dig into them pretty heavily to make that kind of change.

Thank you for the information.

I have poked around and found that it looks like work is in process for this functionality.
In the manager_actor2.lua file, I found a commented-out section that looks like it does the very thing I'm looking for. However, there is also this comment in the code block.
-- DEBUG - FINISH - Need to be able to get grid type and grid size from token container node

It's also tied to being prone for some reason...


Does anyone need a hand working with this section?

mattekure
December 27th, 2018, 01:19
There was a post from several years ago that said this type of thing was implemented in the Savageworlds ruleset. that might be a place to get started.

https://www.fantasygrounds.com/forums/showthread.php?34530-Auto-apply-Range-modifiers

Zacchaeus
December 27th, 2018, 09:07
That part of the code might just be testing to see if the target is prone and the attacker is using a ranged attack, since in such circumstances the attacker gets disadvantage.

Ikael
December 27th, 2018, 11:55
Range calculation is implemented in SavageWorlds. It does auto-apply range penalties to attacks or determine if attack is out of range. It also detects adjacent foes and applies Gang Up bonus if you are outnumbered by opponents.

The hard part is vector calculation itself. If I recall right CoreRPG has concealed this complex calculation and offered simple variables to adjust for each game system. SavageWorlds ruleset has all the vector calculation algorithm included in and it overrides the default CoreRPG vector calculation.

It is better idea to request feature for FG to allow getting Token distances more easily but at least you would know where to look at example.

GMScott
December 28th, 2018, 04:52
That part of the code might just be testing to see if the target is prone and the attacker is using a ranged attack, since in such circumstances the attacker gets disadvantage.


25751