-
February 13th, 2022, 15:40 #111
Hey @Svandal, I would like to use this Extension on my existing campaign as well. Unfortunately, I already have the "Token Height" from GKEnialb, and have the [string "campaign/scripts/image.lua"]:155: attempt to index local 'targetToken' (a nil value) error. How did you fix this? Did you remove/update something in the db.xml?
-
February 13th, 2022, 17:13 #112
- Join Date
- Mar 2016
- Location
- Bergen
- Posts
- 314
I am still troubleshooting.
Creating a new campaign works, but the bug has reappeared in the new campaign. When it appears it is always a problem, and the only fix is creating a new campaign.
I have tried to recreate the problem in the new new campaign, but I have not managed to find what the trigger is.
So the fix is creating a new campaign and hope it does not reappear.
Might also be an idea to post your whole campaign with the bug. I plan to do this if I manage to find the trigger, but I have not had the time or luck to do it yet.
-
February 13th, 2022, 17:30 #113
I was digging into it in parallel. I traced it to a token which is on another map (due to being "up the stairs") while the combat is occurring downstairs. As all tokens from the Combat Tracker are evaluated, this causes an error (Token Height: getTokensWithinDistance function is calling getPosition, causing the error). Either the Combat Modifier Calculation should check if the tokens are on the same map before calling the getTokenWithinDistance (used for "adjTokens = srcImage.getTokensWithinDistance({x=tgtCoord.x, y=(tgtCoord.y * -1)}, 5);" within the checkShootMelee fuction, already pointed out by you (Svandal) here: https://www.fantasygrounds.com/forum...619#post617619), or the Token Height needs to fail more gently (e.g. something like "if targetToken and targetToken ~= sourceToken then" on line 146).
*** Edited ***
Actually, this is exactly the fix (line 146 in Token Height.ext\campaign\scripts\image.lua):
ORIG: if targetToken ~= sourceToken then
BUGFIX: if targetToken and targetToken ~= sourceToken then
I have cross-posted there: https://www.fantasygrounds.com/forum...152#post640152Last edited by Arnagus; February 13th, 2022 at 17:59.
-
February 13th, 2022, 19:56 #114
Okay, new version live on the Forge with the suggestion from Arganus.
-
February 14th, 2022, 12:46 #115
@GKEnialb - many thanks, works for me now in both cases: Token (while on CT) on a different map, or on no map.
@Svandal - can you please check your campaigns?
CMC calculation seems to be correct, as far as I can tell, so this should solve the issue (at least for my case):
[ATTACK (R)] Dagger [CRIT 19][RANGE -6] for 40'
[ATTACK (R)] Dagger [CRIT 19][EFFECT +1][RANGE -4] for 30' - this includes the automatically added PBS & rng30
[ATTACK (R)] Dagger [CRIT 19][EFFECT +1][RANGE -4][SHOOT MELEE -4] for 30' - with adjacent token to target (and PBS)
[ATTACK (R)] Dagger [CRIT 19][EFFECT +1][RANGE -4][SHOOT MELEE -4] for 30' - with two adjacent tokens to target (and PBS)
-> [DAMAGE (R)] Dagger [EFFECTS +1][TYPE: piercing,slashing (1d4+1=3)] - no sneak attack as target is only flanked (by the two adjacent tokens) but not by the rogue
[ATTACK (R)] Dagger [CRIT 19][EFFECT +1][RANGE -4][SHOOT MELEE -4] for 30' - with adjacent token to flat-footed target (and PBS)
-> [DAMAGE (R)] Dagger [EFFECTS 5d6+1][TYPE: piercing,slashing (1d4+1=4)][TYPE: piercing,slashing,precision (5d6=27)] - sneak attack ("nodex" from Kelrugem's "Extended automation and overlays" extension)
[ATTACK (M)] Dagger [CRIT 19][FLANK +2] meele - directly adjacent with a second token flanking
-> [DAMAGE (M)] Dagger [EFFECTS 5d6][TYPE: piercing,slashing (1d4=4)][TYPE: piercing,slashing,precision (5d6=23)] - sneak attack
Hint: I add the "Sneak Attack" effects (names are just cosmetic) using bmos "Advanced Effects" to the rogue:
Sneak Attack; NIFT: nodex; DMG: 5d6 precision, accuracy
Sneak Attack; IFT: nodex; DMG: 5d6 meele, precision
Sneak Attack; IFT: nodex; IF: CUSTOM(rng30); DMG: 5d6 ranged, precision
Sneak Attack; IF: CUSTOM(Flanking); DMG: 5d6 meele, precision
I deliberately left out things like "Sneak Attack; IF: Invisible; NIFT: CUSTOM(trueseeing); DMG: 5d6 meele,precision" similar to what has been proposed here https://www.fantasygrounds.com/forum...503#post583503 and rather use the <CTRL>+Attack Roll = "accuracy" mode for sneak attacks on the "border" cases.
-
February 14th, 2022, 13:25 #116
- Join Date
- May 2020
- Location
- dunstable
- Posts
- 74
Hi i love this extension...but.i find that it clashes with traps...
i get a script error page when attacking with a trap...
-
February 14th, 2022, 14:04 #117bmos' extensions
he/them
-
February 14th, 2022, 19:46 #118
@wakhere - indeed, please
a) only load the two clashing extensions
b) properly name the clashing extensions in question (with URL to Forge or Forum thread)
c) provide the full error message from the FGU\console.log, preferable with any debug enabled
-
February 14th, 2022, 20:12 #119
- Join Date
- Mar 2016
- Location
- Bergen
- Posts
- 314
-
February 15th, 2022, 01:02 #120
No worries - easy when Arnagus pointed out the fix.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks