#Running a macro on non selected token?

1 messages · Page 1 of 1 (latest)

eager cypress
#

I feel like I've asked this question before on the forum, but I'm not having any luck finding it. I may be using the wrong search terms or something. What I'm trying to do in general terms is point the macro to run on a LIB token instead of the selected token (have "apply to selected token" unchecked).

In specific terms I am attempting to modify Plo's inventory manager to point it to library tokens instead of currently active tokens.

crude mural
#

switchToken changes the active token - that may be what you're looking for.

eager cypress
#

Token needs to be on same map no?

crude mural
#

Ah, if you're not on the same map then yes. But if you're on a different map you should be able to use get and set LibProperty functions, no? I'm not familiar with the inventory manager, is there something you need to point at the library token for?

eager cypress
#

The inventory manager creates hidden properties on the token its run on. I use disposable tokens for my players that are linked to library tokens that contain all of their data. Switched to this system because copy/pasting the same token to each map started causing problems (iirc it was because each token stores FOW data for each map or something like that and it builds up). I'm slogging through the inventory manager trying to figure out how it works and where I would need to redirect the individual commands to the LIB token, but as I am very much an amateur it's slow going.

crude mural
#

If they're hidden properties then they would have to reference them with get/setProperty instead of referencing them directly, so that may actually make it a bit easier to identify things that need changing - you'd just need to change them to LibProperty. Then you'd just need to set the library using whatever method you're already using for figuring out which disposable token corresponds to which library token.

#

Obviously these are generalities as I don't know the exact code, though

eager cypress
#

Yeah, which is what I'm working on... there are alot of macros that go into Plo's inventory manager, making a flow chart to try and keep track of which calls which and so on. I'm going to have to go macro by macro to make these changes if there isn't a way to just have it apply to the lib macro from the start...