forcing clients to select tokens

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. :)
Post Reply
uncle_kat
Kobold
Posts: 2
Joined: Fri Mar 13, 2015 7:25 am

forcing clients to select tokens

Post by uncle_kat »

Hi!

The day has come and players want to play a WFRP campaign using tactical map. I'm not really into drawing them or using some pre-made maps, so I've decided to give MapTool a try. It's a piece of great software and I'm sure it'll prove useful and fun. The thing is I'll be using a three-monitor setup to run "server" application on my screen and "player" application on 48" TV, where players will observe the parts of map visible to them.

While I can easily manipulate "player" view with Ctrl+F, I've also noticed another great feature - when I select a player token, MapTool shows only its line of sight, disregarding other tokens LOS. Problem is, I don't really wanna swing my mouse back and forth and rotate my head 180 degree each turn, just to change selected token.

So, is there a way to use "server" app to force "client" app to select another token (the one I have selected in "server" app)?

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

Re: forcing clients to select tokens

Post by aliasmask »

No and sort of. There's nothing built in the MapTool to allows you do that remotely do this, but you're not really doing it remotely assuming you have 2 instances of MapTool on your system. I recommend putting player tokens in the initiative and then run a macro to select the current token in the initiative and tie that to a hot key. All you would need to do is select the other instance of MapTool in your task bar and use the hot key.

uncle_kat
Kobold
Posts: 2
Joined: Fri Mar 13, 2015 7:25 am

Re: forcing clients to select tokens

Post by uncle_kat »

I was wondering if it would be possible to remotely execute this macro with execLink(), but I can't really make it work. Would appreciate info if I'm going in right direction.

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

Re: forcing clients to select tokens

Post by aliasmask »

Yeah, if you post it to chat a macro link that points to a macro that auto executes will run the macro.

Code: Select all

<!-- selectTokensRemote(tokens) -->
[H: tokens = arg(0)]
[H, if(json.type(tokens) == "UNKNOWN"): tokens = json.fromList(tokens)]
[H: selectTokens(tokens,1,"json")]

Code: Select all

[R: macroLink("Tokens Remotely Selected","selectTokensRemote@lib:test",playerName,tokens)]
selectTokensRemote would need to have autoexec on (I think it is by default). playerName would be the name of player this will be executed on in chat. tokens would be a list of tokens selected. You could probably use getSelected() for that before clicking the macro that runs the macro link. The one big downfall is all the output to the target computer. This is untested, but you should get the idea from it.

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

Re: forcing clients to select tokens

Post by wolph42 »

yeah there should be an option in the bag of tricks doing that. been a while, so not sure what its called (link in sig). Or go for AMs suggestion.

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

Re: forcing clients to select tokens

Post by JamzTheMan »

I haven't done it, but you should also be able to tie it to the onChangeSelection so when you select a token it runs the macro to autoexec and select token on client as well?

Or is this only useful with frames?
-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
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: forcing clients to select tokens

Post by aliasmask »

JamzTheMan wrote:I haven't done it, but you should also be able to tie it to the onChangeSelection so when you select a token it runs the macro to autoexec and select token on client as well?

Or is this only useful with frames?
That is only with an open frame and only for that client, but the other handler onChangeToken (onTokenChange?) would work. I have an old cheat catcher based on it here somewhere. That would be tricky to do. First, I would have to write to a lib token who I'm currently selecting and the other client will have the frame to always check that lib token and change when different.

Post Reply

Return to “MapTool”