- Are you on Forge VTT?
- Do you like my work?
- Do you REALLY like my work?
- Could you even imagine to DONATE?
Feel free to head over to this mod on Forge, where you can even pay for it what you like.
This is absolutely optional! Don't feel obliged in any way to do so. My mod is and will remain available for free.
It's been a long awaited fusion of two mods that seem to love each others sooo much. As of v. 12.1.0, it is done:
This mod now comes with a new feature called "Auto Focus". It is basically an integration of one of my favorite mods, Always Centred by SDoehren. See Credits and CHANGELOG.MD. Go and find out what this fancy new macro button can do!
(does not show the new "Auto Focus" feature yet)
- What does it do ...
- Changelog
- Adjustable module settings
- Toggle by hotkey
- Control it by macro
- Compatibility and Dependencies
- Troubleshooting
- Credits
Table of contents generated with markdown-toc
Are you tired of your players complaining about things like...
- "Hey, where's my token gone again?"
- "Where the h... are you (the GM)? I think you've lost us! What are you trying to show us over there?"
It happens to me quite often that I (as the GM) like panning and scrolling around, enthusiastically trying to demonstrate something in the scene to my players, but I tend to forget that they cannot follow me on their screens! So I am frequently losing their attention without noticing.
And a more fancy thing: I like scripting big macros for playing cinematic animation sequences that do a lot of stuff across the scene. But then I forget that most of it won't be noticed by the players, as it happens to take place in a far-away corner of the scene that they are currently just not looking at! :(
This is why I've created this whole thing.
It is a systems-agnostic utility for keeping players' canvas position & zoom in sync with the GM's screen.
For instance, it allows to take over control of the players' canvas for a short time to draw their attention to important things ("Hey! Have a look at THIS!").
And it comes in handy for cinematic reasons, like in the animation sequence shown in the video demo. Feel free to experiment!
Has been moved to CHANGELOG.md
This screenshot shows the default values.
(!) Note that especially the UI notification messages can be configured to your needs.
You (gamemasters only) can assign a custom hotkey in the game settings (by default it is empty to prevent unwanted key collisions). My personal preference is SHIFT + P ("P" standing for "Pan"):
The module runs automatically in the backend as a module, but it can also easily be controlled through macro code.
The module comes with its own macro compendium pack containing two prebuilt examples: One for the Hot Pan & Zoom! core functionality, and one for the "Auto Focus" (aka "Always Centred") added in v. 12.1.0. Use and modify them according to your needs:
The macro uses the exposed class HotPan
- just like this, it's a no-brainer:
Some variants:
// Toggle specifically on and off (pretty obvious)
HotPan.switchOn();
HotPan.switchOff(); // If this doesn't work, refer to "Troubleshooting" below
// If your macro should not rely on HotPan being installed, to prevent runtime issues,
// use it optionally (by using "?")
HotPan?.switchOn();
// And now for the advanced scenarios:
// Use HotPan (optionally) in a macro running a multi-step animation sequence,
// AND prevent that the GM's preference (active state of the mod) is not overridden afterwards:
// Step 1: activate Hot Pan & Zoom!
HotPan?.switchOn();
// A special recommendation here is to suppress UI messages (supported as of v1.1.0)
HotPan?.switchOn(true); // true means "silentMode", being effective always for a single switch action
// Step 2: Run all your fancy animation stuff and watch the players' map view following yours
<...>
// Step 3: When all is done, switch of HotPan again, but gracefully: If the user setting was ON before,
// you don't want to set it to OFF now!
// This is done by using the switchBack(true) method instead of switchOff(true). True, again, meaning "silentMode", which is the recommendation during macro automation
HotPan?.switchBack(true); // If this doesn't work, refer to "Troubleshooting" below
-
Hot Pan & Zoom! uses socketlib for sending sync messages between the GM's session and the clients.
-
Developed and tested on Foundry VTT 11.2xx and higher (including v12), with Chrome as the players' client (I assume, but cannot guarantee that it's still compatible with v10.x).
-
Feel free to follow the "dev" branch on GitHub to stay tuned: https://github.com/coffiarts/FoundryVTT-hot-pan/tree/dev
Toggling within a single thread (like a macro script) (e.g. switchOn() => switchOff()/switchBack(), toggle() => toggle()) can be unreliable. It's some weird asynchronicity / threading issue I haven't fully understood.
Workaround:
// Toggle on (as usual)
HotPan.switchOn();
<...>
// But for switching off, encapsulate function calls within setTimeout():
setTimeout(function(){HotPan.switchOff()}, 100);
<or>
setTimeout(function(){HotPan.switchBack()}, 100);
<or>
setTimeout(function(){HotPan.toggle()}, 100);
This might be an ugly solution caused by my noob-i-ness, any better ideas highly appreciated!
- SDoehren for his great mod Always Centred and his Creative Commons License that allowed me to freely reuse and integrate his code!