grandseiken / foundryvtt-multilevel-tokens

Multilevel tokens for Foundry VTT
MIT License
41 stars 20 forks source link

Support flying height (elevation) for teleport #101

Open Rycochet opened 3 years ago

Rycochet commented 3 years ago

Not sure the best way to describe this, but if there is a balcony in a room then you can put a wall in front (on the top) to prevent people falling off easily (especially with the wall-height module) - but if you want to allow them to fall off then you can handle it (teleporting to the lower floor, followed by macro for damage if wanted).

Going the other way isn't possible however - there's normally some stairs nearby etc.

If Elevation was supported then it could instead be possible for someone flying to reach another floor.

I can think of several different ways to implement this, however the simplest (and possibly most logical) would be for each area to be given an Elevation value, as an alternative to a Teleport In / Out (so three options, but adding an elevation will disable the other two inputs).

In the case of a token entering the area, if there is no flying height then it is immediately dropped to the lowest (default 0) elevation area. If there is a flying height then it will find the lowest area which can be reached. If the flying height changes while in an area then it will teleport up/down as required.

Potentially if using Token Cloning then as well as the dimming, tokens could also have an arrow / overlay to show relative elevation on them.

Climbing against a wall may need to be considered, though probably just using the Elevation stat would be good enough?

Providing the elevation of the source and destination areas should be provided to any macros called (ie, several systems have falling damage based on distance fallen - any macro should also check the token elevation as the lowest area might not start at 0)

(Specific use-case is D&D Dungeon of the Mad Mage, level 10, area 11a <> 11b)

Zephyr2011 commented 3 years ago

Seconding this request.

Elevation ranges would be excellent to allow flying/climbing tokens to avoid macro activations (ie: traps) as well.

An excellent example in line with Rycochet's, would be to have a zone function as a clone region for tokens at a certain elevation, and teleportation at another, to mimic the flight or falling aspect.

A simple config could be to have an elevation threshold, max and min, and the drawing is essentially "inactive" for anything outside of that elevation range. Whichever is easier to implement between that and Rycochet's suggestion of In/Out or Elevation for the teleportation config.

Another really nice feature would be to have the "destination elevation" configurable. By default, maintain the same elevation the token has, but toggle to set a specific entry/exit elevation, similar to the macros that wall-height offers.

Ideally, I'd like to be able to apply that elevation threshold to each feature of a drawing, rather than having to make multiple drawings.

example usecase: A flooded dungeon hall that is dropped into from above. A drawing spans the the hall: there's a macro for entrance, exit, and movement sounds to play as tokens trudge through the water at elevations 0 to 10; tokens are cloned to be viewed from the hall above from 0 to 30; tokens are teleported from the drawing to the area on the upper floor and their elevation is set back to 0, so that they're not above all of the other tokens in the upper floor.

Rycochet commented 3 years ago

Oooh, I never thought about water / flooding - allowing a negative elevation for the ground level might be the way to go - but possibly with another option for "target elevation" - with the default of 0 (but unticked?), so when underwater might want to leave it so it doesn't actually change unless they swim up / down (sort of like when flying above ground?)