STAR TREK 2d20
Page 3 of 18 First 1234513 ... Last
  1. #21

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    161
    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.

  2. #22
    Quote Originally Posted by dogfisc View Post
    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.
    It looks like a nice extension. Unfortunately it is giving me an error, but I use a lot extensions. It does look great, and great progress.

    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!

  3. #23
    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.

  4. #24

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    161
    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.
    Attached Images Attached Images
    Last edited by dogfisc; April 4th, 2021 at 15:42.

  5. #25
    Quote Originally Posted by dogfisc View Post
    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.
    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.JPG
    Last edited by timg; April 4th, 2021 at 16:48.

  6. #26

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    161
    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

  7. #27
    Quote Originally Posted by dogfisc View Post
    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!
    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

  8. #28

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    161
    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?

  9. #29

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    161
    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.

  10. #30

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in