npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

beavers-gamepad

v2.0.0

Published

For controlling actors while playing locally on a central map monitor

Downloads

1

Readme

Beaver's Gamepads

Foundry Core Compatible Version Foundry System Download Count npm version

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: img.png

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.

img.png

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.

img.png

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 img.png

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.

img.png

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.

img.png

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)

img_1.png

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.

img.png

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.

img.png

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.