Object info from Token layer.

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Object info from Token layer.

Post by Full Bleed »

Is there some way to retrieve an object's ID, Name, or Image when clicking on it from the token layer?

Use Case: I can use onChangeSelection to dynamically update my GM control sheet with regard to what token I've currently got selected. But when it comes to objects I can't modify them easily without switching to their layer or creating a separate list on my control sheet for objects. MT knows I'm clicking on an object from the token layer (because it displays the notes)... I'd like it treat it as "selected" or "current" when clicked on (from the token layer), too.

Would this be (or is it) possible?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
bubblobill
Giant
Posts: 167
Joined: Sun Jan 24, 2010 3:07 pm

Re: Object info from Token layer.

Post by bubblobill »

Check out related issues:
https://github.com/RPTools/maptool/issues/1837
https://github.com/RPTools/maptool/issues/1420

You might want to pile in to ensure the functionality you want is included.
Bubblobill on the forum.
@Reverend on the MapTool Discord Server

Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Object info from Token layer.

Post by Full Bleed »

bubblobill wrote:
Tue Jun 23, 2020 6:26 am
Check out related issues:
https://github.com/RPTools/maptool/issues/1837
https://github.com/RPTools/maptool/issues/1420

You might want to pile in to ensure the functionality you want is included.
Thanks for the links. Before I pushed for a FREQ I wanted to make sure I wasn't missing some way to do what I was trying to do with the current functionality.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Object info from Token layer.

Post by Full Bleed »

Full Bleed wrote:
Sun Jun 21, 2020 11:47 pm
MT knows I'm clicking on an object from the token layer (because it displays the notes)
Back to wrangling with this... ;)

So, there must be some kind of onObjectSelection event in the MT code since it does very specific things (shows notes and token image) on click.

Is there anyway to make that event accessible like onTokenChange? I know creating new events is probably a lot of work... but this has to already exist.


Update Question: Is there some way to switch the active layer with a macro? Like when you click on an object through the Map Explorer it goes to the object AND switches to the Object layer.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “Macros”