Thank your for your words :)
Hm, I do not have so much time for any further developing; I try to see whether I can make the height label compatible with these extensions when I have found time for doing it :)
Printable View
I'm not sure if this is something that you can fix or not.. but when you drag a height altered token to a new map it probably 'should' forget it's height information.
hm, you're right this would be a nice feature :) I try to add it when I find time again to code a bit more :) Thanks for the suggestion :)
EDIT: Though that might be problematic for people who have e.g. one big level of a dungeon which is split into several images; then a change of the image is not necessarily a "new" dungeon or so. But that is rarer than the other situation :) (and even less important for FGU then) So, I think it would be good to let it vanish (maybe I can even bind a hotkey to it to change that behaviour when needed)
Regardless, I find this to be a very useful extension and use it all the time now.
Working good in 4e Unity. No problem with my 4e version of Death Indicator.
https://i.imgur.com/rSB8hqt.png
Thanks Kel!
I'm still having issues scaling creatures when this extension is running unfortunately. The players seem to be able to do it when the tokens are unlocked.. but I (as GM) can't seem to do it anytime. :(
And I also have realized that there is an issue with rotation on hex grids (due to the different number of adjacent fields) :) Maybe you use hex grids? When coding this extension I hadn't Hex grids really in mind; I try to update this soon when updating to 3.3.11 :)
Hmm.. HEX seemed to work for me.. but.. I'm still running tests for the scaling issue.
OK.. running in Pathfinder with NO other extensions running.. I can't get PCs to scale.
Shift - Mod token Height
Ctrl - Spin the token
Alt - zip
and when I try to do anything in the combat tracker.. nothing happens.
Can't get it to work in 5e with no extensions either. (scaling that is.. everything else works fine)
hm, that is very strange, for me it certainly works. I wonder why you have that error. Just to exclude very exotic errors: The Alt key in general still works for you in FG? So, e.g. the hotkeys change at the bottom? Did you try to redownload the extension? :)
That is very strange because for me it completely works, I even tested it now in 3.3.11 and it gladly still works there. I wonder what the issue is, I try to find whether my code has some edge cases I am not aware of :)
In case it is relevant.. I'm using the Height medium version.
I'll try downloading it again.
Nope. No luck there either.
OK.. here's an interesting thing.
When I do Ctrl-wheel it tells me:
Script Error: [string "scripts/manager_height.lua"]:48: attempt to call field 'getGridType' (a nil value)
and scales the token with the version you just posted.
Downloaded the Height.ext version from post 1.. it did the same stuff I posted previously.. the Ctrl error seems to be part of that newer version.. the Alt error (which doesn't actually throw an error.. it just doesn't do anything) seems to be part of the version from March.
oki, yeah, the gridType thing comes because I accidentally uploaded my test height extension in post #54 (I am in the process of fixing some hex grid error; sorry, I should have looked first which version I send you. As you see the hex fix does not work yet :D)
Besides that: I have no idea why now the scaling works. Nothing in that version treats the scaling differently. Hmm, very strange
Here is again this version, but with medium size now :) I commented out the grid stuff, so, this version should hopefully completely work for you then now; in the next days I will hopefully upload the new version with better hex handling
Strange, I just redownloaded from the first post here and it works for me. Hm :D
Well, in the previous post, #58, I uploaded the other extension with your size and without the grid error :) That hopefully works for you, we maybe should simply accept that it now works whatever the problem was :D (though I will still investigate what it could be)
Hrm.. now it's tossing this error:
Script Error: [string "scripts/manager_token.lua"]:42: attempt to call field 'isClientFGU' (a nil value)
...and the scaling still isn't working. :(
Sorry man. I really like this extension and use it all the time (lots of aerial and undersea combats).. I've been working around the scaling issue with a bit of frustration.. but the height thing is really cool.
I switched back to the medium version from post #1, everything works except the scaling (and no errors). I am not seeing your issue with the HEX grids when I use it with those.. but HEX grids are a bit problematic and not well supported in general... so I tend to expect funkiness there.
Ah, yes, because that version is already for 3.3.11. So, that here is the 3.3.10 extension. But that is normally exactly the one of the first post, but the only real difference to the other one is just in some small pieces which do not affect the scaling at all (just some different name of a function)
Oki, in the worst case wait until 3.3.11 is released and when I upload my 3.3.11 version :) For whatever reason the scaling then works for you, although I do not see why. Probably already next Tuesday (or the one after) 3.3.11 will be released :)
EDIT: At least I hope it works then. Seemingly it only worked when you had that grid error which I completely cannot understand :D (I mean why should the erroneous version work :D)
But I will look at the code again :) I am very sorry that the scaling does not work for you; since I can't replicate the issue it will be hard to fix, but I hope that I find something :)
I have updated the extension to 3.3.11 now, at the moment it also works for FGU, too, but no guarantee that this stays for future updates of FGU which happen quite frequently :)
I improved the flexibility with respect to other grids. The rotation now takes the set orientation count of the grid into account. (That is set by the ruleset; before that I always used the standard value for square grids, now it should be more compatible with every ruleset and grid)
Please only download when you play with 3.3.11 and/or on FGU :)
Hi Blackfoot :)
I looked again at this stuff but couldn't find anything. Actually, the way how this extension scales tokens doesn't change compared with the native code, I just changed the hotkey. But do you feel comfortable changing code?
If yes, here is the place where you can find the code for the scaling: Open manager_height.lua in the extension (in \scripts). Look for the function onWheel. The piece of code you need to look at is:
When you play FGC then just look at the stuff after the last else, you can try to change the /10 to other numbers to switch the resolution of the scaling. When you try this out, could you report whether this helps you at some point?Code:elseif Input.isAltPressed() then
local scale = target.getScale();
if UtilityManager.isClientFGU() then
local adj = notches * 0.1;
if adj < 0 then
scale = scale * (1 + adj);
else
scale = scale * (1 / (1 - adj));
end
else
scale = scale + notches/10;
if scale <= 0.1 then scale = 0.1 end
end
target.setScale(scale);
end
Another short update for 3.3.11 due to the changes in 3.3.11 yesterday :)
any chance range measurement might make its way into this ?...would seriously kick *** if it did :D
Maybe, when I find time for this :) Needs to be very system agnostic, the most straightforward idea would be probably to assume a 3D grid and extending the measurement rules of the ruleset to the third dimension :) (I am not a fan of using the Euclidean measure when one does not already use the Euclidean measure in the typical grid plane :) )
Do you remember what the rules issues you were having a hard time overcoming for that were?
Oh, I didn't realize this wasn't just a 3.5E extension, nevermind :)
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.
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.
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;
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:
This seems to work in all cases (that I tried, which were 3: player token, default NPC token, NPC image token), but it does change the default keybindings you used (this is because the underlying handler has a check for control pressed, dont ask me why) -- might need a bit more work to fit this in to your original version, but this solves my issue. Great work on this, by the way!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!
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 :)
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. )