From 0ae6336f52ce46d976231510a62d81f530b069ff Mon Sep 17 00:00:00 2001 From: CDeenen Date: Tue, 24 Nov 2020 18:48:25 +0100 Subject: [PATCH] v1.0.0 --- MaterialDeck.js | 65 +------------- README.md | 10 ++- changelog.md | 10 +++ module.json | 4 +- src/combattracker.js | 5 +- src/misc.js | 120 ++++++------------------- src/move.js | 1 - src/othercontrols.js | 7 +- src/playlist.js | 4 - src/soundboard.js | 1 - src/streamDeck.js | 4 - src/token.js | 1 - templates/macroConfig.html | 2 +- wiki/img/.thumb/ModuleSettings.png.jpg | Bin 11010 -> 12414 bytes wiki/img/.thumb/PlaylistConfig.png.jpg | Bin 17719 -> 21171 bytes wiki/img/.thumb/Youtube.png.jpg | Bin 0 -> 6806 bytes wiki/img/ModuleSettings.png | Bin 136962 -> 179095 bytes wiki/img/PlaylistConfig.png | Bin 198940 -> 209174 bytes wiki/img/Youtube.png | Bin 0 -> 98362 bytes 19 files changed, 52 insertions(+), 182 deletions(-) create mode 100644 wiki/img/.thumb/Youtube.png.jpg create mode 100644 wiki/img/Youtube.png diff --git a/MaterialDeck.js b/MaterialDeck.js index de4f752..4b231b2 100644 --- a/MaterialDeck.js +++ b/MaterialDeck.js @@ -50,9 +50,6 @@ async function analyzeWSmessage(msg){ console.log("streamdeck connected to server"); } - - - if (data == undefined || data.payload == undefined) return; const action = data.action; @@ -62,7 +59,6 @@ async function analyzeWSmessage(msg){ if (coordinates == undefined) coordinates = 0; const settings = data.payload.settings; - if (data.data == 'init'){ } @@ -181,7 +177,6 @@ export function sendWS(txt){ Hooks.once('ready', ()=>{ enableModule = (game.settings.get(moduleName,'Enable')) ? true : false; - game.socket.on(`module.MaterialDeck`, (payload) =>{ //console.log(payload); if (payload.msgType != "playSound") return; @@ -367,62 +362,4 @@ Hooks.once('init', ()=>{ Hooks.once('canvasReady',()=>{ ready = true; -}); - -export function getFromJSONArray(data,i){ - if (i>9) return 'nul'; - let val; - if (i == 0) val = data.a; - else if (i == 1) val = data.a; - else if (i == 2) val = data.c; - else if (i == 3) val = data.d; - else if (i == 4) val = data.e; - else if (i == 5) val = data.f; - else if (i == 6) val = data.g; - else if (i == 7) val = data.h; - else if (i == 8) val = data.i; - else if (i == 9) val = data.j; - else if (i == 10) val = data.k; - else if (i == 11) val = data.l; - else if (i == 12) val = data.m; - else if (i == 13) val = data.n; - else if (i == 14) val = data.o; - else if (i == 15) val = data.p; - else if (i == 16) val = data.q; - else if (i == 17) val = data.r; - else if (i == 18) val = data.s; - else if (i == 19) val = data.t; - else if (i == 20) val = data.u; - else if (i == 21) val = data.v; - else if (i == 22) val = data.w; - else if (i == 23) val = data.x; - return val; -} - -export function setToJSONArray(data,i,val){ - if (i>9) return 'nul'; - if (i == 0) data.a = val; - else if (i == 1) data.b = val; - else if (i == 2) data.c = val; - else if (i == 3) data.d = val; - else if (i == 4) data.e = val; - else if (i == 5) data.f = val; - else if (i == 6) data.g = val; - else if (i == 7) data.h = val; - else if (i == 8) data.i = val; - else if (i == 9) data.j = val; - else if (i == 10) data.k = val; - else if (i == 11) data.l = val; - else if (i == 12) data.m = val; - else if (i == 13) data.n = val; - else if (i == 14) data.o = val; - else if (i == 15) data.p = val; - else if (i == 16) data.q = val; - else if (i == 17) data.r = val; - else if (i == 18) data.s = val; - else if (i == 19) data.t = val; - else if (i == 20) data.u = val; - else if (i == 21) data.v = val; - else if (i == 22) data.w = val; - else if (i == 23) data.x = val; -} \ No newline at end of file +}); \ No newline at end of file diff --git a/README.md b/README.md index 1066bff..6bed148 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ -Note: At the moment only Windows support has been confirmed. Right now it doesn't appear to work on MacOS. Linux support is unknown, there is no official Linux support for the Stream Deck, but there exist a 3rd party Stream Deck UI that might be compatible.
+Note: At the moment Windows and OSX support has been confirmed. Linux support is unknown, there is no official Linux support for the Stream Deck, but there exist a 3rd party Stream Deck UI that might be compatible.
In any case: Proceed at your own risk, I will not take any responsibility if you spent money and the module doesn't work! +Please read the documentation carefully, especially if you want to modify the default profile! + I created a Discord server to discuss this and other hardware-based Foundry modules. Feel free to join if you'd like to join the discussion and be updated on this module. +[![Youtube Video](https://github.com/CDeenen/MaterialDeck/wiki/Youtube.png)](https://youtu.be/7h5Ew8cJYxg "FoundryVTT Material Deck Demonstration") + # Material Deck Material Deck is a Foundry VTT module that allows you to control certain Foundry functions using an Elgato Stream Deck. A Stream Deck is a device that has physical buttons with displays behind them. Material Deck uses this to, for example, control playlists, execute macros, display and control the combat tracker.

The module allows a high degree of customization, where each button on the Stream Deck can be assigned any desired function. Furthermore, it supports folder structures, allowing easy switching between various button configurations so you can easily switch between the combat tracker, soundboard, or any other (custom) configuration.

@@ -21,8 +25,10 @@ The functions are categorized into actions. Here is a list of the available acti
  • Token Action: Display token info
  • Move Action: Move selected token or the canvas