Thread: 5E - Token Height Indicator
-
May 14th, 2021, 01:28 #191
- Join Date
- Aug 2019
- Posts
- 2,025
Ah, yes. I just checked. Thanks for testing this. Too bad for us PF2 groups, but still useful.
-
May 14th, 2021, 03:29 #192
- Join Date
- Jun 2018
- Posts
- 112
Nice extension. I did find the conflict that was happening mentioned before with the onDrop error. We both have extensions, Critically Awesome Essentials and Token Height extension, that both add to image_record_step... so, I figured out the deconflict, is you wished to make them work together nicely.
in your /campaign/scripts/image.lua you can add the following script to the bottom of the file.
Code:function onDrop(x, y, draginfo) local custData = {}; custData.x = x ; custData.y = y ; custData.imgCtrl = self ; if draginfo.getType() == "token" then draginfo.setCustomData(custData); end; end
V/r,
DiablobobLast edited by Diablobob; May 14th, 2021 at 05:05.
-
May 14th, 2021, 04:24 #193
Thanks! I've incorporated that into v3.7. I also reverted a change to extension.xml, which hopefully will fix other instances of randomly disappearing image functions (see Functions from image.lua disappearing). Not sure about the faction dropping thing - maybe one of these will fix that for free...
-
May 14th, 2021, 04:50 #194
-
May 14th, 2021, 05:08 #195
- Join Date
- Jun 2018
- Posts
- 112
So for the calculation, are using the a squared + b squared = c squared?... cause it would be easy with height squared + map token distance squared = square of calculated distance
If you want to look into this let me know and I can get you the callouts if you have a tough time finding them...
I was just curious if your method
-
May 14th, 2021, 05:25 #196
For raw measurements (House Rule option in 5E, map option in other rulesets), I use the actual distance (sqrt(x^2+y^2+z^2). For the 5E standard, I extend the 2D method by taking the max in each dimension. For the 5E variant / normal diagonals for most other rulesets, I use long leg + half of each shorter leg (again extending the 2D formula). If you want the exact measurements, it's available in the raw distances option in the maps. If you use the default for the rulesets, though, I want to mimic the spirit as much as possible.
-
May 16th, 2021, 02:29 #197
With more help from Moon Wizard, this should now work on maps made full screen or sent the the background. v3.8 uploaded.
-
May 16th, 2021, 23:12 #198
- Join Date
- Jan 2020
- Posts
- 280
GKEnialb this is a slick extension; you've been putting in a ton of work for what probably seemed like a simple idea at the outset! Thanks for this!
I want to also report a minor bug with FGU 4.1 and v3.8 of this extension. With only this extension enabled, I can no longer use the faction helmets to drag a group of tokens from the CT to a map. If I disable this extension, it works fine.
Attached is a gif demonstration as well as the campaign if you need it to help debug.
-
May 17th, 2021, 00:53 #199
Ran into this issue tonight. With this and Batch 9 Spell tokens ext only in a clean 5e build, I can not place spell tokens on a map. It silently fails. Turn off token height and I can place spell tokens. Did not expect that. Any thoughts? I am posting on Batch 9s thread as well. Thanks!
With both on - spell tokens cannot be placed. (screen1)
With token height off - spell tokens can be placed (screen2)Last edited by nephranka; May 17th, 2021 at 00:56.
-
May 17th, 2021, 11:58 #200
I've taken a look at the issues and its a missing super call from the 'diablobob' code in 'image.lua', without the 'super.onDrop' you loose things like 'drag all party tokens to map' from the combat tracker.
-pete
Code:-- From diablobob function onDrop(x, y, draginfo) if draginfo.getType() == "token" then local custData = {}; custData.x = x ; custData.y = y ; custData.imgCtrl = self ; draginfo.setCustomData(custData); end; if super and super.onDrop then return super.onDrop(x, y, draginfo); end end
Code:function onInit() if super and super.onInit then super.onInit() end getDistanceBetween_orig = Token.getDistanceBetween Token.getDistanceBetween = getDistanceBetween end
Last edited by bratch9; May 17th, 2021 at 20:57. Reason: attached adjusted file
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks