PDA

View Full Version : Getting range mods for targets



AmadanNaBriona
May 5th, 2020, 01:03
Summary of problem: I want to automatically calculate range mods assuming A has targeted B on the Combat Tracker, and A and B are both tokens on a map, with an onMeasureVector method that returns the modifier.

I believe the correct insertion point for this code would be in my attack roll method:



elseif rollable_attack or rollable_button_attack then
rActor = ActorManager.getActor(sActor, node.getParent().getParent().getParent());
sType = "attack";
sDesc = "[ATTACK]";
sNode = node.getPath();
rRoll = { sType = sType, sDesc = sDesc, aDice = aDice, nMod = nMod, sNode = sNode };
end


rActor above is a CTNode. So basically, I would like to figure out how to "connect" to the map tokens representing this rActor and its currently targeted nodes and pull the current calculated range between them.

Trenloe
May 5th, 2020, 07:13
This has been done in some rulesets and an extension already. See this post: https://www.fantasygrounds.com/forums/showthread.php?55473-Get-range-to-targeted-tokens&p=489701&viewfull=1#post489701