-
March 20th, 2021, 20:32 #21
- Join Date
- Nov 2020
- Location
- Seattle, USA
- Posts
- 181
It does handle range increments and penalties to hit. For a PC, the range is taken from the weapon's "Range" on the Actions tab; for an NPC, it looks for the weapon name in a table that holds the range increment and maximum number of increments (thrown vs projectile). So as it is now, you would need to do as Svandal suggested and manually change the Range for the weapon. The same would be true for a weapon with the "Distance" property.
I should maybe state at this point that I only have the core Pathfinder book and the bestiaries, so Hawkeye is a completely new ability to me.
-
March 21st, 2021, 00:22 #22
These are the modules and extensions created and/or taken over by dellanx for PFRPG.
I had a lot of help and advice from many here at FG.
Thank You!
-
April 3rd, 2021, 18:12 #23
- Join Date
- Oct 2016
- Posts
- 24
I love this extension, but after the last update I am getting an odd error.
Running in CotCT in the guest wing against the Danse Macabre I am able to roll to hit fine without the map window being opened. As soon as the map window is opened, the same hit rolls are failing with "scripts/manager_action_attack_custom.lua: 426 attempt to compare number with nil" in the console. I am able 100% repro with this particular creature and only this extension loaded. In the play session I hit it in we saw it occur for this NPC and one of the PCs but not for anyone else.
From a quick dive into the extension code I am assuming that the code is somehow failing to retrieve the reach from the CT - but why this would only happen when the map window is open eludes me. I am not sure if the extension is still in active support mode, but hopefully a fix can be found. I love not having to manually add flanking and other edge cases all the time, but opening and closing the map window before attacking is kind of odd.
Let me know if I can help in tracking things down further.
-
April 4th, 2021, 15:32 #24
- Join Date
- Nov 2020
- Location
- Seattle, USA
- Posts
- 181
Is that Curse of the Crimson Throne? I don't have that adventure, so I can't tell exactly what is happening but I haave a couple ideas.
Regarding having the map open: if the tokens aren't on a map, none of the calculations can be done because they depened on using the token placement; so if the map isn't open, it's basically just skipping all the rest of the code.
If you look at the NPC sheet for the Danse Macabre, what does it show for "Space/Reach"? If they aren't correct on the NPC sheet that may indicate that they are wrong in the CT.
I'll do some testing also and see if I can reproduce the issue.Last edited by dogfisc; April 4th, 2021 at 15:42.
-
April 4th, 2021, 16:24 #25
- Join Date
- Oct 2016
- Posts
- 24
It looks OK to me
dansemacabre1.JPGdansemacabre2.JPG
Edit: Added some debug statements around the line in question and it is definitely the nNearReach variable coming back with nil. Interestingly nNearRange is showing 30 despite them being adjacent on the map.dansemacabre3.JPGLast edited by timg; April 4th, 2021 at 16:48.
-
April 4th, 2021, 20:27 #26
- Join Date
- Nov 2020
- Location
- Seattle, USA
- Posts
- 181
I agree, that all looks fine.
With only those two tokens on the map, it shouldn't even be hitting the line that is giving the error. It's looking at all tokens with 30 of the target (which excludes the target) and if the token it's checking is the attacker it never makes it to the comparison with nNearReach. The fact that you are getting nNearRange of 30 makes me think there is another token on the map. Since you are comfortable with checking the code, can you put in a debug to see what CT node it is looking at? This will work:
local rNearActorCT = CombatManager.getCTFromToken(checkToken);
Debug.chat("rNearActorCT: ", rNearActorCT, DB.getValue(ActorManager.getCTNode(rNearActorCT), "name"));
Thanks!Last edited by dogfisc; April 4th, 2021 at 20:28. Reason: typos
-
April 5th, 2021, 16:23 #27
- Join Date
- Oct 2016
- Posts
- 24
I do have 5 other miniatures on the map but they are all over 100' away from these two. The above code gives the following output:
s'rNearActorCT: ' | nil | nil
I am not sure what would give us nil actors in the CT, adding a check to skip nil actors shows that we just test a single nil actor and then things work fine again. If it was one of the other tokens on the map I would expect to see 5 messages, but it is a single nil token each time.Last edited by timg; April 5th, 2021 at 16:37. Reason: more data
-
April 5th, 2021, 21:09 #28
- Join Date
- Nov 2020
- Location
- Seattle, USA
- Posts
- 181
It should only be looking at tokens within 30’ of the target of the attack, so those others would be plenty far enough not to get looked at.
I’ll put in a check on the CT actor when I’m off for the day. I’d still like to know what it is finding though; it really seems like there is a token somewhere that isn’t in the CT. Maybe look at the value of checkToken?
-
April 6th, 2021, 00:23 #29
- Join Date
- Nov 2020
- Location
- Seattle, USA
- Posts
- 181
timg, I am able to duplicate the error you are getting by adding a token to the map but not the combat tracker.
I've just uploaded a new version which checks for this case. It also handles targets of the "swarm" type.
-
April 7th, 2021, 01:25 #30
- Join Date
- Oct 2016
- Posts
- 24
Awesome - thanks
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks