[BETA FEATURE] Isometric Map & new Token type - Please test

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

Excellent!
BhoritzTokens.jpg
BhoritzTokens.jpg (68.39 KiB) Viewed 1700 times

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

I have started adding support for Figures on the Object Layer. Doors seem to work quite well.

The picture below shows a door token on the object layer, that has been assigned a size of "Medium" and then placed upon a Vision Blocking Line.
doorObject.jpg
doorObject.jpg (89.4 KiB) Viewed 1681 times
Because the player gets to see at least half the token base, they see all of the door.
doorObjectFog.jpg
doorObjectFog.jpg (35.12 KiB) Viewed 1681 times
Last edited by Jagged on Tue Jun 16, 2015 4:02 am, edited 1 time in total.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by wolph42 »

i dont understand. if i view the picture you added with the vbl lines 'classically' then the entire door is *behind* the drawn vbl line. so how on earth can the player token 'see at least half the door' ?

don't get me wrong, the end result is great! its just that i don't understand your explanation.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

wolph42 wrote:i dont understand. if i view the picture you added with the vbl lines 'classically' then the entire door is *behind* the drawn vbl line. so how on earth can the player token 'see at least half the door' ?

don't get me wrong, the end result is great! its just that i don't understand your explanation.
That's the special behaviour of Figure type tokens. If you can see at least half the base of a Figure token (even if its on the Object layer) the whole token is displayed.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by aliasmask »

wolph42 wrote:i dont understand. if i view the picture you added with the vbl lines 'classically' then the entire door is *behind* the drawn vbl line. so how on earth can the player token 'see at least half the door' ?

don't get me wrong, the end result is great! its just that i don't understand your explanation.
If you look at the previous post, the token is large and the door is in the center, so the figure appears on both sides of the vbl.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by wolph42 »

Jagged wrote:That's the special behaviour of Figure type tokens. If you can see at least half the base of a Figure token (even if its on the Object layer) the whole token is displayed.
Thats not the part that puzzles me. Its the position of door image, the vbl line and the character that puzzles me. If I draw a 'vision line' from the character towards the door image then the first thing I hit before I see ANYTHING is a VBL line, where vision stops. So you don't see half (and thus whole) you see nothing
aliasmask wrote:If you look at the previous post, the token is large and the door is in the center, so the figure appears on both sides of the vbl.
ah ok, I should not look at the door *image* (which is behind the VBL line) but at the door *bounding box* (which is cut in half by the VBL line) right?
Assuming that's correct, as there're a vbl line running through the bounding box that means that (let's say) 10% of the bounding box will never be visible (as its covered by VBL). If the box is divided perfectly in half that means that on both sides of the VBL at most 45% of the image is visible and would hence not show up as you need to see at least half to see the whole...

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

wolph42 wrote:
Jagged wrote:That's the special behaviour of Figure type tokens. If you can see at least half the base of a Figure token (even if its on the Object layer) the whole token is displayed.
Thats not the part that puzzles me. Its the position of door image, the vbl line and the character that puzzles me. If I draw a 'vision line' from the character towards the door image then the first thing I hit before I see ANYTHING is a VBL line, where vision stops. So you don't see half (and thus whole) you see nothing
The keyword here is half the "base". The code doesn't consider the actually image (which may have been scaled or offset), it only considers the Tokens footprint. To work as described, the object really needs to be given a size, otherwise its size does become the image boundary rectangle rather than the token footprint.

For academic interest, I re-use the code that decides whether or not you can move into a cell you can only partially see. Plus when I say you need to see "half" the base, that is a gross approximation of what the code does. It actually divides the cell into 9ths, takes the middle, divides that to 9ths again and checks to see if you can see at least 4 of the middle.

I shall try and work on a better explanation ;)

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by wolph42 »

Jagged wrote: The keyword here is half the "base". The code doesn't consider the actually image (which may have been scaled or offset), it only considers the Tokens footprint. To work as described, the object really needs to be given a size, otherwise its size does become the image boundary rectangle rather than the token footprint.

For academic interest, I re-use the code that decides whether or not you can move into a cell you can only partially see. Plus when I say you need to see "half" the base, that is a gross approximation of what the code does. It actually divides the cell into 9ths, takes the middle, divides that to 9ths again and checks to see if you can see at least 4 of the middle.

I shall try and work on a better explanation ;)

If you would have read the 2nd part of my post then you would have noticed that I came to the same conclusion (although I called the 'base' 'bounding box', but its the same). Incidentally you've also (more or less) answered the other question I had in follow up of this one. (as part of the bounding box is covered in VBL, when divided exactly in 2 then the two visible parts would ALWAYS be <50%, hence the question).
I get the '9ths' explanation, but in "...and checks to see if you can see at least 4 of the middle" again how do you define "see". In an exact middle slice you can always see 3 fully and 3 partially (<50% as explained earlier) so do you 'see' 3 or 6? (or ~<4.5?)

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

I would have to dive into the code to answer that fully, as its not a routine I wrote myself.

I think the function is called something like "checkCenterRegion" and is called when there is Fog and Vision to see if a token can move into a given cell. I seem to recall that after dividing the middle 9th into 9, it does some comparison of closed sections vs open. I can't remember the exact numbers, so 4 may not be right. However I do remember that when checking the inner blocks, its only checks for intersection. So it doesn't need to see the complete block.

IMO its quite a nice little function that does a good job of answering the "approximately half" question, I tip my virtual hat to whoever wrote it.

*hat tip*

:D


User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by JamzTheMan »

So...does this logic only apply to Isometric grid maps?

Because I can see it being a nice feature for regular square grid maps as well. Mainly for doors. A lot of times, players question "is that a door?" because it's chopped in half by VBL and only leaves a partial graphic to view.

Being able to see top-down doors "fully" would be a nice addition. Although, the door would never be seen 50% or more from both sides as you are usually drawing a 2px VBL over a 50px object.

This could have interesting affects for cars/doors,trees that have an X over them. I know it's scope creep, but you really have something close to a feature that's been wanted for a while. :D
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

The logic applies to Figure tokens whatever type of grid they are on. So it would be interesting to see how that might work on a square rid with a top down graphic (but type set to "Figure").

Mind you, I think the better solution for the type of stuff you put an "X" on, were some of the ideas discussed in the VBL Stamps thread.

[EDIT] I don't really have any suitable top down door tokens, but it does seem to work on square grids as well. Mind you, all the top down door images I have, have large transparent areas so the door can be easily rotated, so they don't work very well.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by wolph42 »

Jagged wrote:[EDIT] I don't really have any suitable top down door tokens
attached are doors designed to be used with the bag of tricks. These you can use to test if you like.
Attachments
Doors.zip
(101.2 KiB) Downloaded 79 times

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by JamzTheMan »

Jagged wrote:The logic applies to Figure tokens whatever type of grid they are on. So it would be interesting to see how that might work on a square rid with a top down graphic (but type set to "Figure").

Mind you, I think the better solution for the type of stuff you put an "X" on, were some of the ideas discussed in the VBL Stamps thread.

[EDIT] I don't really have any suitable top down door tokens, but it does seem to work on square grids as well. Mind you, all the top down door images I have, have large transparent areas so the door can be easily rotated, so they don't work very well.
I guess the main reason I bring it up here is, if we were to implement something similar for "top-down" type tokens (or for that matter, any type), that is, "show all the image if x% is seen", are we implementing it the best way and consistently?

SHOULD this logic be tied to "figure" token type, or should it be another flag that can be used for any token type? Should it be restricted/hard coded to 50% seen or should that be any/50%/100%? Or should we add a new layer for these sort of objects? (not a fan of the later, just throwing things at a wall...)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: [BETA FEATURE] Isometric Map & new Token type - Please t

Post by Jagged »

wolph42 wrote: attached are doors designed to be used with the bag of tricks. These you can use to test if you like.
They are the doors I was using ;)

They don't work that well for this purpose because they are designed with a large transparency area. This is great of rotating te door, but means its highly likely that wherever you position the door, most of the image is going to be hidden and therefore the code to make all of the image appear will never kick in.

Post Reply

Return to “MapTool”