Thread: Extension: Height label
-
August 13th, 2020, 23:16 #71My extensions for 3.5e and Pathfinder
Bug reports please here
-
August 14th, 2020, 19:03 #72
-
August 14th, 2020, 23:31 #73My extensions for 3.5e and Pathfinder
Bug reports please here
-
August 24th, 2020, 19:34 #74
- Join Date
- Dec 2018
- Posts
- 4
There seems to be a bug, at least in version 8-20 of FGU (I think it was the previous version that introduced the bug -- prior to that it seemed to be working for me) -- it still works on player for player tokens, but for NPC tokens I can't get it to create the height label. Additionally, for NPCs where I am using an Image instead of a Token, it won't let me increase the size (holding alt+mouse scroll decreases the size). I'm not great at Lua and have never really looked at the FG extension framework until now, but I threw in a few debug lines and printed out the before/after scale, and it did seem to be increasing the overall scale of the token while on the map it was shrinking.
-
August 24th, 2020, 20:03 #75
Hight label is working on NPC's here with latest build.
Interesting on the shrinking Token. I have experienced similar issue on some tokens. I might have used Image instead of Token on them. I will have to check that.
-
August 24th, 2020, 20:26 #76
- Join Date
- Dec 2018
- Posts
- 4
Yeah, it seems to be an issue with the underlying implementation in the TokenManager, too -- or something with how it gets the token instance/target in this case (since it works without the extension). I was able to get the label working on NPCs again -- that seemed to be due to the fact that the NPC was not in the Combat Tracker, in which case the handler is unable to access the token. I modified the height manager a bit to see if I could just pass on the token resize to the default helper, but I'm seeing the same issue (sorry, I don't see a code tag on this forum):
Code:if not target then return false end if Input.isShiftPressed() then if not hasHeightWidget(target) then createHeightWidget(target); else if notches > 0 then doIncreaseHeight(notches,target); else doDecreaseHeight(notches,target); end end elseif Input.isAltPressed() then local vImage = ImageManager.getImageControl(target, true); local OrientationCount = vImage.getTokenOrientationCount(); target.setOrientation((target.getOrientation()+notches)%OrientationCount); elseif Input.isControlPressed() then TokenManager.onWheelHelper(target, notches); end return true;
Last edited by karter705; August 24th, 2020 at 20:58.
-
August 24th, 2020, 20:56 #77bmos' extensions
he/them
-
August 24th, 2020, 20:57 #78
- Join Date
- Dec 2018
- Posts
- 4
Ahha! It seems sometimes the target is just a node, and not necessarily a token -- in this case you have to turn the selected node into the token from the CT. I did this and it seems to work, now:
Code:elseif Input.isControlPressed() then local nodeCT = CombatManager.getCTFromToken(target); if nodeCT then TokenManager.onWheelHelper(nodeCT, notches); end
Edit: Note that the default mouse wheel helper has a call that converts the node to the CT Token, which you'd likely need that call as well if you want to override that completely instead of passing it on to the default handler like I do -- I assume that you'd need to make the call to get the node and then the call to get the token which isCode:local tokenCT = CombatManager.getTokenFromCT(nodeCT);
Thank you! fixed!Last edited by karter705; August 24th, 2020 at 21:20.
-
August 25th, 2020, 04:32 #79
Yes, my extensions are in general not for FGU at the moment Since FGU changes quickly, I'd need to change the height label extension all the time, and I sadly have no time at the moment to keep up with the updates on FGU (I have rarily free time at the moment) But you can of course reupload your version of the extension for other users of FGU At latest when FGU releases I will look at this again, the TokenManager often changes and I probably just need to update that with the new updates of FGU
My extensions for 3.5e and Pathfinder
Bug reports please here
-
August 25th, 2020, 06:15 #80
- Join Date
- Dec 2018
- Posts
- 4
Oh -- for sure, I wouldn't expect folks to maintain extension FGU given that it is in early access (or in general, honestly, its FOSS there is no obligation lol) -- I really only commented in the first place because it had worked and then stopped working, and it seemed you had future proofed it a bit for FGU in the most recent version since you had the check for the FGU client, so I thought you might want to know (and honestly I didn't think I would be able to fix it, or I would've just waited and posted the fix).
In any case, attached is my bodged together fix for FGU 8-20 with Image Tokens, for anyone that is interested (the code change is in the manager_height.lua -- you can unzip the .ext and its in the scripts folder, for those that want to change it themselves) Note: I didn't update the version in the extension metadata because that's how I roll (and I forgot until just now. I don't think it matters)
Thanks again for the great work (this is literally the only extension that I use for FGU My players have a bunch of giant owls so it is critical. )Last edited by karter705; August 25th, 2020 at 06:25.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks