Distance also seems broken as well, latest FG update causing issues?
Printable View
I can't recreate - dropping effects works just fine and distance is working as expected. What other extensions are you using?
Another suggestion:
Token.getTokensWithinDistance(token, distance) also exists like getDistanceBetween. I have not yet tested whether replacing getDistanceBetween changes the result of getTokensWithinDistance.
I got an error from Automatic Flanking and Range
[6/21/2021 8:28:37 PM] [ERROR] Script execution error: [string "scripts/manager_action_attack_afar.lua"]:530: attempt to compare nil with number
The line is this:
return Token.getDistanceBetween(token, targetToken) <= GameSystem.getDistanceUnitsPerGrid()
I assume the CombatTracker or something disappeared and getDistanceBetween returned nil instead of a value.
Last week I ran Height without aura and I never got an error. This week I ran height and aura and got the error. The thing is though I never have an Aura effect during the session when I get an error. Aura is just loaded so I assume it probably isn't doing much of anything. I'm still stumped on how to recreate this issue.
[6/21/2021 4:56:33 PM] EXTENSION: D&D Official Language Fonts (FR)\rfor Fantasy Grounds\rCopyright 2015 Smiteworks USA, LLC.\rD&D Copyright 2015 Wizards of the Coast LLC
[6/21/2021 4:56:33 PM] EXTENSION: D&D Official Language Fonts\rfor Fantasy Grounds\rCopyright 2015 Smiteworks USA, LLC.\rD&D Copyright 2015 Wizards of the Coast LLC
[6/21/2021 4:56:33 PM] EXTENSION: Dungeons & Dragons Theme v1.0\rfor Fantasy Grounds\rCopyright 2015 Smiteworks USA, LLC.\rD&D Copyright 2015 Wizards of the Coast LLC.
[6/21/2021 4:56:33 PM] EXTENSION: Dungeons & Dragons, D&D, Wizards of the Coast, their respective logos, the dragon ampersand, all Wizards titles, the fifth edition rules, and Wizards' character names and distinctive likenesses are property and copyright of Wizards of the Coast LLC in the USA and other countries. Used with permission.
[6/21/2021 4:56:33 PM] EXTENSION: Miss Flavor Text - Extension v2.0\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Token Height Indication v4.4 by GKEnialb
[6/21/2021 4:56:33 PM] EXTENSION: 5e Legendary Assistant v1.2 by Stv
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Critical Damage - Extension v1.0.1\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Death Resistance - Extension v2.0\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Flanking and Range- Extension v2.1\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Halfling Luck - Extension v1.2.2\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Pack Tactics - Extension v1.7\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Sneak Attack - Extension v2.0\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Advanced Effects - 5E v4.9\rby Celestian, 2017-2020
[6/21/2021 4:56:33 PM] EXTENSION: Better Combat Effects - v1.4\r5E version for Fantasy Grounds Unity\r--by Ryan Hagelstrom 2021
[6/21/2021 4:56:33 PM] EXTENSION: Assistant GM v1.4 for Fantasy Grounds Unity \rCopyright 2021 SilentRuin \rPlayer(s) can fully control NPCs as an Assistant GM.
[6/21/2021 4:56:33 PM] EXTENSION: Constitutional Amendments v2.0 for 5E by MeAndUnique.\r\nCurrent HP functionality designed and implemented by Tielc; FGU fixes by Zuilin.
[6/21/2021 4:56:33 PM] EXTENSION: Kit'N'Kaboodle v1.3.1 for 5E by MeAndUnique.
[6/21/2021 4:56:33 PM] EXTENSION: 5E - Indicators v12.
[6/21/2021 4:56:33 PM] EXTENSION: 5E Extension - Combat Automation v1.1 by Xelab\nAutomates Spellcasting and Weapon Attacks.\nDouble-click "Upcast" button for help.
[6/21/2021 4:56:33 PM] EXTENSION: Aura Effects - Extension v1.2\r--by Kent McCullough 2020 updated by SoxMax and bmos
[6/21/2021 4:56:33 PM] EXTENSION: Automatic Save Advantage - Extension v1.4\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Mad Nomad's Party Combat Stats v3.9 \n For support, updates, and bonus content visit www.madnomadmedia.com (LINK)
[6/21/2021 4:56:33 PM] EXTENSION: Turn Based Effects - Extension v2.8\r5E version for Fantasy Grounds\r--by Kent McCullough 2020
[6/21/2021 4:56:33 PM] EXTENSION: Drowbe's Chat Aesthetics Resplendent Configurator
Yeah, that'd be my guess. It can only return nil if either token is nil or CombatManager goes away. I can update it to return 0, which would prevent the error, but of course the value won't be useful at all...
It is interesting that Token.getDistanceBetween is being called and not the getDistanceBetween for imagecontrol, which is the only one I'm technically overriding. Maybe I'll also override Token.getDistanceBetween and see if that helps with anything.
Am I correct in assuming that the extension (and likely getDistance) play no role in adjudicating "adjacent target"? I ask, because in our last session, 3 tokens were next to one another, but the third was at +50' (so, not actually next to anything), but the Rogue still received advantage on their attack roll - I'm assuming this is a factor of Automatic Sneak Attack but thought I'd ask just to be safe.
I found that I needed to change automatic sneak attack. I posted a ways back in the thread, a solution that I found in discord (see below).
"On a side note. I was on the Discord channel for rob2e and Jeremy post this:
Jeremy Putman — 05/15/2021
for example. I changed a single line in the checkForNerbyEnemies function from
if checkMeleeDistanceBetweenTokens(token, sourceToken) == true then
return true;
end
to
if Token.getDistanceBetween(token, sourceToken) <= 5 then
return true;
end
And it seemed to trigger the same way with or without the new height extension on the FG forums, but also took into account that extensions height variable so if they were side by side, buy 10 ft up it didn't trigger the disadvantage.
It worked for sneak attack and I also tried it in the flanking & range ext from kent and it worked there as well. The one that did not work was pack tactics from kent. This is a big deal for those of us that want to use height and range rules. I let Jeremy know it was a great find. I thought I would share it."
Aren't you?
I did override Token.getDistanceBetween in my original contribution:
https://www.fantasygrounds.com/forum...l=1#post598151
Thanks nephraka. I do use pack tactics. I suppose I need to decide which is more impactful for now based on npc encounter comp. Hmm.
That was in image.lua (or at least, that's what I assumed based upon the other functions), so just for the imagecontrol. I know that token's getTokensWithinDistance doesn't call imagecontrol's getTokensWithinDistance, but the two getDistanceBetweens must work together normally. But maybe if I'm explicit (override TokenManager.getDistanceBetween to get its image and called that getDistanceBetween), it may help things. Probably wishful thinking, but I can't image that it'll hurt.
Uploaded v4.5 which:
- Overrode imagecontrol getTokensWithinDistance to allow other extensions which call that to take height into account. Thanks for the suggestion, bmos!
- Overrode Token versions of getDistanceBetween and getTokensWithinDistance to call the imagecontrol versions.
- Return 0 instead of nil in getDistanceBetween if CombatManager disappeared.
Lat night I had some players having trouble adjusting the height on the client side. The host had no issues. I will investigate and see if I can reproduce it. It may just be user error.
Hi there! I just want to say this extension is one of my favourites. However, I recently purchased the Modern Dark Theme (it's great too) and there is a bit of a conflict. The token height font colour matches the dark theme! It's basically unreadable. No error messages or anything. This might be an issue with other dark themed tables as well (Sir Motte?).
Attached is a screenshot of what I mean. The Aarocokra should be +50 ft.
Attachment 48156
Thanks very much for your work!
The screenshot shown is the official Smiteworks theme, and evidence of this extensions being overly specific with coloring (I'll take a look later today to see if there's a one-line omission to fix it). Sir Motte has in fact already addressed the issue in his theme, because he is both a gentleman and a scholar.
Edit: After a quick look, it seems to stem from the alternate font options, "height_medium" and "height_large". As I am not aware of a mechanism to define a font based on another font's color, is may be necessary to re-use existing fonts from the ruleset in order to work with many of the official themes.
@bmos @meandunique thanks to both of you for looking into this. Completely agree with your assessment of sir motte!
Thanks charmov for reporting and bmos and MeAndUnique for investigating (and I also agree with the words on SirMotte). I've uploaded v4.6 which allows the font color to be set to dark, medium, or light. Probably could have done something a little more elegant, but at least this should work regardless of the theme. Let me know if it works okay with Modern Dark Theme or it needs to be tweaked.
Thanks! It works like a charm.
Attached is a screenshot of your update for Smiteworks official Modern Dark Theme.
Attachment 48186
Sooo good!
Awesome. Glad it worked out!
Error using Height Indicator 4.5 and Aura Effect 1.4
https://i.imgur.com/kgq6zEv.png
I get this when PC has aura effect and is on a map.
When loading the campaign, I select Combat Tracker. This shows the Combat Tracker but also launches the map window and the error. Not having any aura effects on the PC's and this does not happen.
Weird, I seem to have a check for that edge case in my code:
This should keep it from calling getDistanceBetween if the token isn't on a map.Code:if not tokenMap.getContainerNode or not CombatManager then
return;
end
But perhaps tokenMap.getContainerNode doesn't return nil if not on a map. I should have time to test later today hopefully.
EDIT: Can you re-test with the latest version of Token Height? The line numbers changed so 124 isn't right anymore.
https://i.imgur.com/X3kKARt.png
With clean test campaign and only Aura Effects and Token Height. Both latest versions. Two PC's on map and one NPC. Map not opened.
1. opened combat tracker
2. opened effect panel
3. moved an aura effect from effect panel to PC on CT.
4. Map with PC tokens opens and error pops up.
aha! It appears to be a typo in Token Height Indicator.
line 140 is "if ctrlImage then" but line 141 and 145 are written as "cntrlImage"
I have not implemented this and tested myself, but cntrlImage is not anywhere else in the script, so almost certainly this is the issue.
Thanks, bmos! Not sure how that made it through testing. I've uploaded v4.7 with the fix.
Last I checked a while back, this doesn't work with Automatic Pact Tactics EXT, Automatic Sneak Attack EXT, Or the one that checks the range on weapons and does disatk if they are out of range?
Is this the case or am I missing something?
I love this ext, I use it currently with these ext, I just have to manually know that it fails to automatically do some of these things. Unless I'm not doing something right. Anyone know?