Thanks. Back to the drawing board. :( I agree the three on the left, from top to bottom, should be 15', 10', 15'.
Printable View
Thanks. Back to the drawing board. :( I agree the three on the left, from top to bottom, should be 15', 10', 15'.
I think I fixed the variant diagonals for real this time, including for half squares. Fingers crossed.
Additionally, bmos made updates to allow this to work with 3.5 and Pathfinder, so I've updated to rev to 2.0 and changed the name of the extension (so delete the old one from the extensions directory when dropping this one in).
I got this to work with 4e by changing two lines:
nHeight = nHeight + (1 * notches)
widget.setText(nHeight .. ' sq')
Where is this RAW setting? As squares =1 the RAW setting will be more noticeable on distances.
It's a Unity-only 5E-only setting.
Raw ( Interface.setDistanceDiagMult("*") ):
https://media.discordapp.net/attachm...900&height=969
Variant ( Interface.setDistanceDiagMult(1.5) ):
https://media.discordapp.net/attachm...20/unknown.png
Standard ( Interface.setDistanceDiagMult(1) ):
https://media.discordapp.net/attachm...900&height=882
There is a raw setting for the grid also in the image sidebar (the grid mode) :)
Now that I know where the RAW button is, it seems this extension does not use the RAW calculation in 4E. RAW works correctly with the extension not loaded.
https://i.imgur.com/4V0kNHz.png
Yeah, technically the extension does not support 4E at all, other than what you've done with it. :) I'll take a look at it, though.
For the raw distance, see Moon Wizard's post here: https://www.fantasygrounds.com/forum...168#post587168
Use the diagmult stuff; I believe that is has the value * star in case of raw :)
Looks like it doesn't change the diagmult - set to 1 whether that flag is set or not, so I've posted a question in the Workshop on how to get that value. In the meantime, I've updated the extension to support 4E outside of raw, but will wait to upload it until I hear back on that.
It looks like there are two getDistanceDiagMult functions. imagecontrol.getDistanceDiagMult and Interface.getDistanceDiagMult.
So it might be as easy as removing the "Interface." in image.lua.
Oooh. That does it. Thanks!
Version 2.1 uploaded which works with 4E and with the Raw Distance flag on maps (for 5E, this trumps the diagonal option, for other rulesets it acts the same as the Raw diagonal option of 5E).
What would be the best way to increase the font size?
In token_height_indication.lua, after widget gets created ~line 156, you should be able to call widget.setFont(<font name>). I haven't played around with creating a font, so can't help you much beyond that. The Workshop forum (https://www.fantasygrounds.com/forum...2-The-Workshop) is a great place to ask for advice.
Thanks! Super easy, barely an inconvenience :-)
https://i.imgur.com/BOOR53b.png
@Kelrugem - yeah, should have followed the instructions explicitly. :) I was using Interface already, so thought the reference was just a shorthand.
@Kevininrussia - glad it was easy. If you want me to integrate the mods you made, send me what you have and I'll put it in (protected by options) so you don't have to merge in your changes each time I update (as long as the code isn't licensed).
You can just put it in a reply to the PM I just sent. Thanks!
Created version 3.0 with two new options, based upon kevininrussia mods:
- placement of the height text around the token (top, top right, right, bottom right, bottom, bottom left, left, top left)
- selection of medium or large font
Thanks for this extension, GKEnialb - started using it with my group and it's very handy!
Quick question - is there a way for players to be able to alter the height for NPC's that they own? My players have a familiar and pet spider in the party and they are able to modify their own character token's height but not the NPC's they own. Not a big deal adjusting on DM side, was just wondering if I was missing something to give them more control.
Thanks, MassSailor. The players should be able to modify any tokens they own, but it's possible that "own" may mean something different for PCs vs NPCs. How did you give control of the NPCs to the players? Can the players move the NPC themselves (with the DM acceptance if token locked)?
I should have specified originally, but my question is for 5E using FG Unity. To give a player NPC control, I followed these steps:
- Put the NPC on the combat tracker.
- Change their faction to friendly
- Drag the link from the Combat Tracker to the PC portrait on the desktop.
- Put the NPC token on the map.
I also have Party Vision and Movement set to "On."
Results: Players are able to move NPCs and open up NPC character sheets to perform attacks, saves, etc. Players can change their own token height but not the height of the assigned NPC.
Just to be sure, I deleted NPCs that were active before enabling the extension and re-added them following the steps above after enabling - no change.
Players can never be "Owners" of NPC records. The record can be shared with a player so they may view it, but Ownership of NPC record types is restricted to the GM. The only record types that Players can have ownership over is Characters and Notes.
Thanks, mattekure. That explains why I haven't been able to figure that out! :) And if someone who is not the owner tries to modify the DB element (where height is stored), bad things happen, so sorry, MassSailor, don't think I can provide that functionality.
I think if someone who is holder tries to write to the DB they are allowed to, but it's more complicated to check if the user is a holder because there isn't an isHolder function.
You need to use getHolders() to get a table of users who are holders and then check if the user is in that table.
If the client writes to the DB for something they dont own, it never really commits, it just appears so on the client end but isnt replicated to the GM. To replicate it properly, you would detect the desired change on the client, send an OOB Message that is picked up by the Host, then have the host make the change to the DB. In this way the change is always saved properly to the DB.
I reported an error with distance calculations in this thread.
https://www.fantasygrounds.com/forum...xtension/page4
It is this extension together with the combat modifer extension. When facing a large token the distance gets calculated incorrectly.
For explanation see other post. And since you might not know what the screenshot tells us. It adds a penalty to attack because of range between the tokens. Since they are on the same level and adjasent it should not be any more than 5 feet between them, but it is more since it gets a range penalty.
I do not know how to test this calculation with only this extension loaded so I do not know if this is a problem with your extension.
disregard
If I remove the owner checks, the client (even when holding the token), gets errors on trying to create the node and set the value ("Database node not owned"). Nothing changes on the client side due to this...
Everything looks good from my side - the range displayed is the range provided if my calls are used. Perhaps dogfisc is expecting something different on the return and is getting skewed as a result. Here's what I get for different sizes (all 5' in the range arrow, which means it's returning 5' in the range function).
Attachment 46181
I also tried with the massive creature size you had (changing the size to 80 in the combat tracker!) and it still returns 5'. Happy to talk to dogfsc about it.
4E. Version 2.1
I'm getting this error quite frequently when moving a token.
[ERROR] Handler error: [string "campaign/scripts/image.lua"]:11: attempt to call global 'getGridSize' (a nil value)
This happens on both host and client. When the error happens we close the map window and re-open it. After that the error stops happening for the selected token so the players never have this issue after that. As GM I still do the first time I move a NPC. Then I close the window and reopen it then that NPC token will not throw the error.
I will try your latest version and see if it fixes the issue.
Let me know if the latest version works. Do you have the grid turned on for the map? In 5E, at least, even if you don't, the grid settings are available, but not sure about 4E.
Thanks - keep me informed. One thing to try (should only have to do this once, not every session) is to remove all the tokens from the map, add them back from the contact tracker, and reshare the map. I did that when I was first developing the extension and saw it behave better after that - not sure if it'll help in this case.
Thanks for the tip! I did remove all the tokens from the map, but didn't stop and reshare the map.
Hi, you can open FG a second time and logg in as a player. So you don't need to wait for a "real" player.
Specifically, you can open a second copy of FG by right-clicking on it and clicking Fantasy Grounds Unity. Then you can click Join Game and type in localhost as the IP address.
The host session must be running as LAN (if I remember correctly).