Fantasy Grounds Merchandise
Page 58 of 68 First ... 8 48 56 57 58 59 60 ... Last
  1. #571
    GKEnialb's Avatar
    Join Date
    Jul 2017
    Location
    Castle Rock, CO
    Posts
    623
    I loaded a 3.5 campaign, square grid, 5' squares, set to default measurements, and moved one token around the other the other in each of the 8 directions - the measurement from the pointer was always 5'. I did remove the tokens from the map first and re-add, just to reset everything. As such, I believe THI is working correctly, but happy to investigate if dogfisc believes otherwise.

  2. #572

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    189
    Quote Originally Posted by GKEnialb View Post
    I loaded a 3.5 campaign, square grid, 5' squares, set to default measurements, and moved one token around the other the other in each of the 8 directions - the measurement from the pointer was always 5'. I did remove the tokens from the map first and re-add, just to reset everything. As such, I believe THI is working correctly, but happy to investigate if dogfisc believes otherwise.
    I’ll download Token Height Indicator and take a look at this when I get time, probably tomorrow.

  3. #573
    GKEnialb's Avatar
    Join Date
    Jul 2017
    Location
    Castle Rock, CO
    Posts
    623
    Quote Originally Posted by dogfisc View Post
    I’ll download Token Height Indicator and take a look at this when I get time, probably tomorrow.
    Excellent. Let me know if you have any questions (here, PM, or Discord) about what I override. Presumably it's something like Image.getDistanceBetween() that's causing the issue (the results shouldn't have changed, but there may have been some size calculations that changed in recent FGU updates that effect things (or things I changed for other compatibilities that made it seem like FGU changed).

  4. #574

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    189
    Quote Originally Posted by GKEnialb View Post
    Excellent. Let me know if you have any questions (here, PM, or Discord) about what I override. Presumably it's something like Image.getDistanceBetween() that's causing the issue (the results shouldn't have changed, but there may have been some size calculations that changed in recent FGU updates that effect things (or things I changed for other compatibilities that made it seem like FGU changed).
    So I think I have a fix for this conflict, though I admit I don't entirely understand the cause. Working with token locations on images made my brain hurt when I was writing my extension and it's been a while since I've looked at this part of the code. Something to do with inversion of the Y coordinates vs the Y location of a token? (token is Y+ up, Y- down; coordinates are the opposite?) With both extensions enabled, if the tokens are more than one grid up or down from the center of the image, the result of Image.getDistanceBetween() is wrong--or at least, not what I had been expecting. I'll try to dig in more and figure it out fully.

    I had been calculating the distance between the coordinate of the "threatning" token and the target token; changing that to calculate from the coordinate of the "threatning" token to the coordinate of the target token seems to have fixed it.

    So far I've only tested with single-grid-square tokens. I'll need to make sure this continues to work as the critters get larger. I've a previous engagement to get to now, but I may have this done by tomorrow evening.
    Last edited by dogfisc; October 18th, 2022 at 01:29. Reason: fix typos

  5. #575
    GKEnialb's Avatar
    Join Date
    Jul 2017
    Location
    Castle Rock, CO
    Posts
    623
    Interesting. With both extensions loaded, if you have two targets selecting each other, and move one around the other in all 8 directions, the arrow shows 5', and it calls getDistanceBetween(). I think there may have been a change on the FGU side on the last build for some of the underlying routines (but see my disclaimer - I could easily be wrong) - not sure why using THI would change anything, though. Oh, if you're using coordinates in getDistanceBetween instead of just two tokens, that may have something to do with it (that function allows all sorts of parameter combinations and I may have missed one in my testing, which is mostly focused on two tokens.

  6. #576

    Join Date
    Nov 2020
    Location
    Seattle, USA
    Posts
    189
    So that didn't work with larger tokens. For now I've gotten around the issue by checking to see if Token Height is loaded and doing a slightly different calculation if it is.

  7. #577
    GKEnialb's Avatar
    Join Date
    Jul 2017
    Location
    Castle Rock, CO
    Posts
    623
    Okay, I see what's going on. I can fix it in Token Height, but of course I'll break what you just did if I push an update, so we should coordinate.
    Last edited by GKEnialb; October 19th, 2022 at 19:01.

  8. #578
    Many thanks for both of you digging into It together!

  9. #579
    GKEnialb's Avatar
    Join Date
    Jul 2017
    Location
    Castle Rock, CO
    Posts
    623
    No worries (though dogfisc did all the work ��)

  10. #580
    Arg matey - I'm coming for you!!

    Turns out after much pain and also getting Moon Wizard involved - I've found this problem is with this extension and not FGU. Basically Token.getDistanceBetween is returning the wrong distance when moving a 1/2 square away from target. Will show 5 returned instead of what the target pointer distance shows - 10ft.

    This is the thread that has all the info under Question 2: and I include the 5E test ext Moon made to verify it was not his stuff which helped me determine it was your stuff. Without this extension the function returns the correct values - with it - it does not.
    Attached Files Attached Files
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

Page 58 of 68 First ... 8 48 56 57 58 59 60 ... Last

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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
  •  
Refer a Friend

Log in

Log in