maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Feature]: Effect Zones

Open ColdAnkles opened this issue 2 years ago • 5 comments

Describe the Problem

MapTool has no real support for "this area should trigger an effect" or "this area has a specific attribute". It's possible to get something approximating this with token-on-token effects, but bloats token numbers when token features aren't really necessary.

The Solution you'd like

Zone Definitions

  • Can be campaign wide, under campaign settings. Or Map Specific, only on one map.
  • Comprises of a Zone Name, Zone Effect List, and Zone Exclusivity List. Internally also has a UID for ZoneID.
    • Zone Name is normal text for human identification, though can be used in macros if unique.
    • Zone Effect list is populated by an "Add Effect" Button, and depopulated by a "Delete This Effect" button, for each added effect.
    • Zone Exclusivity List is populated by an "Add Zone" button - where you choose another existing zone, and both this and the other zone have each other added to their lists. When painting a zone, it simultaneously unpaints any zones it's been marked as exclusive with.

Effects

  • Label
    • The simplest effect - provides on additional text box for configuration, the contents of which are shown when mouse is over the zone. Also has a GM only toggle.
    • Useful for situations where you want to label rooms or similar: "Lobby", "Kitchen", "Cellar", "Bedroom".
  • Terrain Modifier
    • Switch between additive and multiplicative, with an entry for a numerical argument.
    • All movement through the zone either adds the argument (ie. +10 units per cell moved) or multiplies ( x2 units per cell moved)
  • Teleport
    • Has options for destination map, and destination position, and a "Request GM Confirmation" option
    • token paths cannot path out of this zone once entered
    • when token path is confirmed, and assuming onTokenMove doesn't deny the move (or similar) the token is moved to the selected map/coordinate
  • onEnter Macro
    • Trigger the named macro when a token enters
    • provides tokenID, entry coordinate, and zoneID
  • onExit Macro
    • as onEnter

Macro Stuff

  • Macros for creating and removing zones
  • Macros for getting zone lists, getting specific zones, getting tokens in a specific zone, and isTokenInZone(tokenID)
  • onTokenMove and onMultipleTokensMove need to include a zoneCrossing array as part of their arguments, each element of which lists the zone, the entry coordinate (if any), the total distance moved in the zone, and the exit coordinate (if any).

Alternatives that you've considered.

As in the problem, token-on-token effects can be used, or movedOverPoints() potentially. None are particularly user friendly though.

Additional Context

No response

ColdAnkles avatar Dec 27 '23 01:12 ColdAnkles

Are parts of this similar to template improvements raised here? https://github.com/RPTools/maptool/issues/2743

May need a different name other than Zone, as doesn't Zone already mean Map under the MT hood?

Baaaaaz avatar Dec 27 '23 14:12 Baaaaaz

There's probably some overlap.

Zone does have internal uses, but none user facing I think... and "zoning" is a fairly common way to describe this activity. Always open to better options though.

ColdAnkles avatar Dec 27 '23 22:12 ColdAnkles

IMHO: This should be an application of drawings. I draw an "effect" space then define whatever the effect and its triggers should be.

bubblobill avatar Dec 29 '23 06:12 bubblobill

Maybe a subset thereof? Certainly doing border and fill colours/textures makes sense for zones too

ColdAnkles avatar Dec 29 '23 07:12 ColdAnkles

You can create the drawing, fiddle the settings, then set the colours to transparent. This all relies on being able to fiddle with drawings as objects though.

bubblobill avatar Dec 29 '23 10:12 bubblobill