beavers-gamepad
v2.0.0
Published
For controlling actors while playing locally on a central map monitor
Downloads
1
Readme
Beaver's Gamepads
Description
This module is intended to be used in local sessions with one Map Monitor and multiple connected gamepads. Each gamepad can be assigned to an actor.
You can add GamepadModules to a gamepad and configure them. Initially at least three GamepadModules are available
- "Beaver's Token movement" which allows to move a token around.
- "Activate User Context" which activates a user Context menu.
- "Conroll User Context" which controls the user context menu.
A User Context can contain multiple ContextModules beavers-gamepad provide at least one module:
- "Beavers Character Selection" with this context you can select another actor.
Anyone can extend and register additional Gamepad or GamepadContext Modules.
How To
Example UserManagement
For each player on your table add a new user to your game and one additional user Map: ![img_2.png](pictures/User Management.png)
Give each player ownership to at least one actor and give the Map user ownership for all such actors:
If you assign multiple actors to a user the user can later decide whom to play.
Go to your common display and login as map user.
Gamepad Settings
Connect your gamepads to the client that shows the common display.
You need to go to the module Settings "Beaver's Gamepad" underneath "Configure Settings" you won't find it in the "Configure Controls" of foundry as it is not only a key binding.
Here you can press the 🎮configure button:
If no gamepads are detected you need to connect you gamepad to your device and then press any Key on your gamepads.
All connected Gamepads will be listed with its internal identification.
Now you should assign each gamepad to a different user e.g. (player 1-n)
Then you can add gamepadModules to this controller
The amount of GamepadModules can vary depending on vtt-modules installed. Other VTT-modules can add own gamepad-modules here if they implement the interface and register that gamepadmodule.
Initially there are at least three modules you should add:
- Beavers-Token-Movement (moves a token around)
- Tiny-User-Interface Control (controls a user defined context)
- Tiny-User-Interface Activation (activates the tiny user interface)
You should add all 3 Modules Each module comes with its own configuration
In each configuration Section you can configure which axis and what buttons to use. The current version of beavers-gamepad has only a very primitive settings ! you need to figure out your gamepads internal axis and button numeration.
Luckily most of the time the default config should match and you need no further configuration. _e.g. Beavers Token Movement should use your lefthand stick of your controller
User Context
In the gamepad Settings you can click the UserConfiguration button Then add a user configuration for each player.
User Position:
You can define the user position relative to your common display.
If your display lays flat on the table a user may sit top meaning he would look from upside down on the screen. Some modules may consider this to invert axis on your gamepade accordingly e.g. Token Movement.
TinyUserInterface:
You should enable the TinyUserInterface for each player. This will show a tiny ui that points into the direction the player is sitting. Foundry assigns each user a color the tiny uis have a border in that color. You can drag and drop the ui by this border.
TinyUIModules
The tinyUI can be activated with the activation button defined in the settings default it should be the (A) button.
When activated it glows in the color of that user this will deactivate all other modules except the control module for this UI.
You can then select a TinyUIModule. The amount of TinyUIModules can vary depending on vtt-modules installed. Other VTT-modules can add own gamepad-ui-modules here if they implement the interface and register that ui-module.
Initially there is at least one module available:
- Beavers-Character-Selection (you can select another actor for your user that you then control)
Beavers-Character-Selection
Lets you select and choose a new actor for your user. For this to work a gm needs to be connected to the game.
Done
You should select an actor for you user that you can then control. Either the user can do this with its gamepad as described via the tinyUIModule "Beavers-Character-Selection". Or a gamemaster can do this by editing the global user-configuration of vtt-foundry.
After Setting everything up i usually us Monks Common Display module and activate it on my map user to get rid of any other ui components.
Limitations
Detect Gamepads Missing
This module depends on the browsers ability to detect gamepads, i can not do much about it.
- I have observed that on some windows machine some of my controllers are not detected correctly.
- you may try upgrade the drivers or redeploy the gamepads to different usb ports.
- I have observed that not all Gamepads are registered as Gamepads in windows e.g. steamGamepad is registered as Mouse.
- There are some thirdparty tools that can change how a gamepad registers to windows. (not part of this documentation)
- I have observed that some gamepads are missing if they are already bound in another app e.g. game.
- turn of other apps that uses gamepads and refresh the browser.
Linking phyisical Gamepad to Configuration
- I have observed that it is currently hard to know which axes number correlates to what on your gamepad.
- I hope that i can find the time to implement some sort of "detect axes" by using the physicall gamepad.
- I have observed that it is hard to map a gamepad identification name to the real gamepad especially if you have multiple same gamepads.
- I hope that i can find the time to fix that somehow.
Extensions
You can write own GamepadModules or TinyUiModules. There will be a section on how to do this as soon as the interfaces are more established. Currently everything might still be in the flow.