# Changelog Material Deck Module
### v1.4.4 - 26-05-2021
Fixes:
<ul>
<li>Some small fixes to make the module compatible with Foundry 0.8.5</li>
</ul>

Additions:
<ul>
<li>Token Action => Added 'Page-Wide Token' option. All buttons on the current page (where the page is the collection of buttons that are shown) that have this enabled will use the same token</li>
<li>Token Action => On Click: Added 'Set Page-Wide Token' option, so you can configure buttons to set the page-wide token by pressing a button</li>
<li>Token Action: Added a 'Mode' select box. Setting it to 'Token' is the same as pre v1.4.4. New are the inventory, features and spellbook options that can be used to auto-populate buttons with items, features and spells.</li>
<li>Added a 'Clear Page' and 'Clear All' button to the soundboard and macroboard configuration</li>
<li>Added import and export buttons to the soundboard and macroboard configuration (only imports/exports metadata, not the actual audio files or the macros)</li>
<li>The number of connection error messages you will get is now configurable in the module settings</li>
<li>Added a download utility to the module settings, so you can easily version-check with the SD plugin and Material Server, download them and download profiles</li>
<li>Added Japanese localization (thanks BrotherSharper and Asami). All of the new features have not yet been translated</li>
</ul>

Other:
<ul>
<li><b>(Breaking)</b> The Move Action has been removed. Moving tokens is not in the Token Action (it's an on click setting) and moving the canvas is in the Other Actions.</li>
<li>Major change to the soundboard and macroboard configuration. It is now displayed as pages of 16 sounds or 32 macros each, you can browse through the pages using the arrow keys at the top.</li>
<li>There is no longer a limit to the amount of sounds/macros you can assign to the soundboard/macroboard, but please note that at some point you might experience performance issues if there's too many sounds/macros.</li>
<li>Removed the 'Stream Deck Model' module setting, since it's not that useful</li>
<li>Token Action has been revamped to make it clearer and easier to implement new game systems</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.4.4 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.4.3 - 05-05-2021
Fixes:
<ul>
<li>Fixed issue where the module would break if multiple Stream Decks were configured in the Stream Deck application, but not all of them had MD actions assigned to them</li>
<li>In the User Permission Configuration, the Scene Directory hint wasn't displayed properly</li>
<li>Got rid of warnings that popped up on initialization when using MD as a player</li>
<li>Fixed issue where the soundboard and macro board could not be configured by players, if it hadn't first been configured by a GM</li>
</ul>

Other
<ul>
<li>Added compatibility for Foundry 0.8.2. Some functions no longer work in 0.8.1 (they still do in 0.7.9)</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.4.2 (unchanged): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.4.2 - 23-04-2021
Fixes:
<ul>
<li>Last update I fixed the combat tracker, but this broke something in the Token Action (if you had a token selected, it would sometimes assumed you didn't have it selected), both should now work</li>
<li>Token Action: Plugin wouldn't save text boxes (such as 'Prepend Title' or 'Custom') if they were empty</li>
<li>Token Action: Improved performance, especially when 'Token' is set to 'Selected Token', and you're selecting a new token while you had another token selected<li>
<li>Token Action => Stats => Skill Modifier: (dnd5e) Would only display the modifier, now it displays the total value (so with proficiency, if applicable)</li>
<li>Combat Tracker => Mode: Function => Function: Would not always properly load the 'Turn Display' options</li>
<li>Playlist Action: Background color would not show, and 'Off Color' wouldn't work for 'Offset'</li>
<li>Macro Action => Macro Board => Offset: Background color would not show</li>
<li>Scene Action => Offset: Background color would not show</li>
</ul>

Additions:
<ul>
<li>Token Action: Changed the way how you can select what icon will be displayed. Instead of a true/false, there is now a selection box where you can select between 'None', 'Token Icon', 'Actor Icon' and 'Default', where the last one will display the default icon, for example the selected stat to display, the condition, etc</li>
<li>Token Action => Stats & On Click => Custom: Textbox now automatically resizes to fit the content</li>
<li>Token Action => On Click => Dice Roll: Added 'Roll Mode' option, where you can set to roll as 'default' (displays dialog), 'normal', 'advantage' or 'disadvantage'. All options, except for 'default', will ignore the previously added 'Token Roll Options' in 'Other Actions'</li>
</ul>

Other:
<ul>
<li>Big code cleanup of the SD plugin</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.4.2 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.4.1 - 21-04-2021
Fixes:
<ul>
<li>Previous update broke the combat tracker, should now be fixed</li>
</ul>

### v1.4.0 - 21-04-2021
Additions:
<ul>
<li>Support for connecting multiple Stream Decks at the same time. Please note that performance decreases with each extra Stream Deck</li>
<li>Other Actions: Added 'Token Roll Options'. This can toggle token rolls between showing a dialog and skipping the dialog and rolling normally or with advantage or disadvantage</li>
<li>If the SD plugin version you're using is outdated, you now get a pop-up to notify you of this and direct you to the download page</li>
<li>Added a module setting to set how dark the default white images should be. Can be lowered for improved readability of the text</li>
<li>Token Action => Stats: Added option to prepend text to the title, so you can set the stat to, for example, strength, and put 'STR: ' in the prepend textbox to display, for example, 'STR: +2'</li>
</ul>

Fixes:
<ul>
<li>Token Action => Skill Roll: Setting wasn't saved in SD app</li>
<li>Token Action => Roll Ability: Rolling ability checks was broken for some systems</li>
<li>Token Action => Stats => Display HP: Read overlay indicating HP in the heart icon was also drawn when 'Display Token Icon' was enabled</li>
<li>Token Action => Stats: Added default images for all dnd5e abilities, saves and skills</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.4.0 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>


### v1.3.3 - 12-04-2021
Additions:
<ul>
<li>Other Actions => Open Sidebar Tab: Action now indicates which sidebar tab is open (only works on Foundry 0.8.x)</li>
<li>Other Actions => Open Sidebar Tab: Added option to create an pop-out (doesn't work for the chat)</li>
<li>Other Actions: Added option to open the pf2e compendium browser</li>
<li>Macro Action: Can now call macros by name</li>
<li>Token Action => On Click: Added option to call a macro. Currently the macro will be applied to the selected token</li>
<li>Token Action => Display Stats: Added saving throws and skill modifiers for most systems</li>
<li>Token Action => OnClick: Added 'Dice Roll' option, which allows you to roll ability checks, saving throws and other things (depending on game system)</li>
<li>Token Action => Stats => Display HP: Made the heart icon dynamic, so the amount that the heart is filled with red depends on the relative amount of hit points of the token. 25% hp means the lower 25% of the heart is red, 50% hp means the lower 50% of the heart is red, etc</li>
<li>Token Action => Stats => Added a '+' before all modifier stats that are bigger than 0</li>
<li>Token Action => Custom OnClick: Added support for calling macros. For instructions, please refer to the documentation: https://github.com/CDeenen/MaterialDeck/wiki/Token-Action#custom-on-click-function</li>
</ul>

Fixes:
<ul>
<li>Other Actions => Pause Game: Pause is now transmitted to all connected clients</li>
<li>Token Action => Display Stats: Fixed movement speed for pf2e</li>
</ul>

Other:
<ul>
<li>Should be compatible with Foundry 0.8.1. Only tested on DnD5e. Please note that any functions that rely on other modules do not work if the other modules are not compatible with 0.8.1</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.3.4 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.3.2 - 11-03-2021
Additions:
<ul>
<li>Added support for the Multi Action provided by the SD app</li>
<li>External Modules Action => Added support for About Time</li>
<li>Token Action => Stats: Added 'Ability Scores', 'Ability Score Modifiers', 'Ability Score Saves' (dnd5e only) and 'Proficiency Bonus'</li>
<li>Token Action => Stats: Added 'HP (box)' option that displays a box with color that changes depending on the HP</li>
<li>Move Action: You can now choose what token should be moved, similar to the Token Action</li>
</ul>

Fixes:
<ul>
<li>Playlist Action => Relative Offset: Fixed issue with displaying the target playlist name</li>
<li>Macro Action: Fixed Hotbar Uses for Shadow of the Demonlord</li>
</ul>

Other:
<ul>
<li>Macro Action: Improved the way Hotbar Uses are displayed, it is now displayed in a box similar to how the module looks in Foundry</li>
<li>Made the way images are generated more flexible to make future additions easier</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.3.2 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.3.1 - 27-02-2021
Additions:
<ul>
<li>Token Action: You can now choose what token should be targeted with the action using: 'Selected Token', 'Token Name', 'Actor Name', 'Token Id' or 'Actor Id'. Added relevant user permissions to the permission configuration</li>
<li>Token Action => On Click: Added options 'Select Token' and 'Center on Token and Select Token'</li>
<li>Playlist Action: Added relative offset mode, with the option to display the offset target name for playlists</li>
<li>Playlist Action => Stop All: Added option to display the name of the playlist at the current offset</li>
</ul>

Fixes:
<ul>
<li>Default user permissions would not be loaded if no previously saved permissions were present, resulting in MD assuming nobody has any permissions</li>
<li>Other Actions => Control Buttons => Lighting Controls: Would create a button for ambient sound instead of lighting</li>
<li>Token Action => Display Token Icon: It used to show the icon, even if unchecked, if no stat with default icon was selected</li>
</ul>

<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.3.1 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.3.0 - 25-02-2021
Additions:
<ul>
<li>Material Deck can now be used by players. A 'User Permission Configuration' screen has been added to the module settings where the GM can deside what Material Deck functions are available to users</li>
<li>Macro Action: Added support for Illandril's Hotbar Uses (only requires the module to be installed, does not have to be active)</li>
<li>Token Action => OnClick: Added support for CUB conditions</li>
<li>External Modules => Added support for the 'Trigger Happy' module</li>
<li>External Modules => Added support for the 'MookAI' module</li>
<li>External Modules => Added support for the 'Shared Vision' module</li>
<li>External Modules => Added support for the 'Lock View' module</li>
<li>External Modules => Added support for the 'Not Your Turn' module</li>
</ul>
Fixes:
<ul>
<li>Token Action => OnClick: Fixed conditions for pf1e and dnd3.5e</li>
</ul>
Other Changes:
<ul>
<li>Token and Combat Tracker Actions now autodetect the game system</li>
<li>Game-system related settings in the SD app unified and improved</li>
<li>Image Cache setting is no longer considered experimental</li>
</ul>

<b>Note 1: </b>Because the module can now be used by players, some settings have been moved from 'world' settings to 'client' settings. This means that previous settings have been deleted, and they have to be set up again in the module settings.<br>
<b>Note 2: </b>You can give users access to the playlists, macro board and soundboard. Currently, everyone has to share the same configuration, so be careful with giving players permission to configure one of them.<br>
<b>Note 3: </b>Because of the new game system autodetection, some settings for non dnd5e systems might be deleted. You'll have to reconfigure them.<br>
<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.3.0 (<b>must be updated!</b>): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.2.3 - 03-02-2021
Fixes:
<ul>
<li>Fixed some issues for the Shadow of the Demon Lord system</li>
</ul>
Other Changes:
<ul>
<li>Improved performance of the 'Playlist Configuration', 'Macro Configuration' and 'Soundboard Configuration' screens</li>
<li>Minor code clean-up</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.2.2 (unchanged): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.2.2 - 02-02-2021
Additions:
<ul>
<li>Added a help button in the module configuration</li>
<li>Token Action: Added support for easy token wildcard image changes</li>
<li>Token Action: Added a comprehensive custom onClick function that can modify token and actor data, with support for basic mathematical expressions</li>
</ul>
Other Changes:
<ul>
<li>Improved GM screen compatibility</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.2.2: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.2.1 - 07-01-2021
<b>Note:</b> Due to a change in how scene control is handled (moved from 'Other Controls' to its own 'Scene Action'), any actions related to scenes no longer work. You will have to set them up again using the new Scene Action.<br>
<br>
Additions:
<ul>
<li>EXPERIMENTAL: Added an image buffer to prevent resending of images that have already been sent, giving a slight performance boost. Buffer size can be set in the module settings</li>
<li>Token Action => Display Stats: Added option to select a data path for an attribute</li>
<li>External Modules => GM Screen: Open and close the GM screen. Link to module: https://foundryvtt.com/packages/gm-screen/</li>
<li>Other Actions => Roll dice: Roll dice in foundry and select between public roll, private roll, or displaying result on the SD</li>
<li>Scene Action: Added way to create scene selection screen similar to soundboard/macro board. New functions to do this: 'Scene Directory' and 'Scene Offset'</li>
<li>Scene Action: Added 'Active Scene' function</li>
<li>Move Action => Selected Token: Added rotate to and rotate by functions</li>
<li>Token Action => On Click: Added 'Set Vision' option to set the token's vision and light emission</li>
<li>Other Actions => Send Chat Message: Send a message to the Foundry chat</li>
</ul>
Other Changes:
<ul>
<li>Plugin: Scene Action created that replaces Other Actions => Scene Selection</li>
<li>Plugin: Scene Action: Changed 'Any Scene' to 'Scene by Name'</li>
<li>Plugin: Actions are now ordered alphabetically</li>
<li>Plugin: Replaced color strings with color pickers</li>
<li>Various minor bug fixes</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.2.1: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.2.0 - 28-12-2020
Fixes
<ul>
<li>Incorrect link to some black backgrounds fixed</li>
<li>Token Action: Movement speed wouldn't be displayed for DnD5e 1.2.0</li>
<li>Macro Action => Hotbar: 10th macro would not trigger and display correctly</li>
<li>Combat Tracker Action => Function: Default value would not properly initialize</li>
<li>Other Actions => Darkness Control => Display would not function correctly</li>
<li>Fixed some issues in the SD plugin where correct settings would not be displayed</li>
</ul>
Additions:
<ul>
<li>Added new 'External Modules Action', which will contain all module integrations that don't fit anywhere else</li>
<li>Added support for the Custom Hotbar module in 'Macro Action' => Mode: 'Custom Hotbar'. Link to module: https://foundryvtt.com/packages/custom-hotbar/</li>
<li>Added support for the FxMaster module in 'External Modules Action' => Mode: 'Fx Master'. Link to module: https://foundryvtt.com/packages/fxmaster/</li>
</ul>

### v1.1.1 - 12-12-2020
Fixes
<ul>
<li>Fixed issue where deleting a playlist would cause an error preventing the Soundboard Configuration to show up</li>
</ul>

<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.1.0 (unchanged): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.1.0 - 09-12-2020
Fixes
<ul>
<li>Settings would not show for Combat Tracker action</li>
<li>Macro Action => Macro Board default settings fixed</li>
<li>API has been improved, making integration with other hardware/software easier, and making future changes/additions easier</li>
</ul>
Additions:
<ul>
<li>Added support for Pathfinder 1e and Shadow of the Demon Lord</li>
<li>All dialogs that are openable using the SD can now be closed by pressing the button while the dialog is open</li>
<li>Playlist Action & Soundboard Action => Stop All now indicates if there are tracks/playlists/sounds playing</li>
<li>Confirmed Foundry 0.7.8 compatibility</li>
</ul>

<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.1.0: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### V1.0.1 - 26-11-2020
<ul>
<li>Fixed issue where macro from macroboard wouldn't execute if furnace arguments were not defined</li>
<li>Fixed issue where soundboard wouldn't save if no previous data existed for that sound</li>
</ul>

<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.0.0 (unchanged): https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v1.0.0 - 24-11-2020
Release
<ul>
<li>Fixed issue where the last column in 'Soundboard Configuration' would not work properly</li>
</ul>

<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.2: https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v1.0.0: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v0.9.2 - 24-11-2020
<ul>
<li>Removed unnecessary errors when module is not fully configured</li>
<li>Solved issue that soundboard config couldn't be saved on a world that hadn't run Material Deck previously</li>
</ul>

### v0.9.1 - 23-11-2020
<ul>
<li>Fixed 'Playlist' action issue where 'TrackNr' wouldn't show</li>
<li>Fixed 'Soundboard Configuration' issue where changing the playlist would reset everything you've changed since last save</li>
<li>'Soundboard Configuration', 'Macro Configuration' and 'Playlist Configuration' now save after each change, and update the SD instantly</li>
<li>Save button has been removed from configuration screens, since it is now redundant</li>
<li>Added support for DnD3.5e and Pathfinder 2e</li>
</ul>

<b>Note1:</b> In 'Macro Configuration', previously saved Furnace arguments have to be filled in again.<br>
<b>Note2:</b> Any settings set in 'Playlist Configuration' have to be set again<br>
<br>
<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.1 (unchanged): https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v0.9.1: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v0.9.0 - 19-11-2020
<ul>
<li>Added support for more playlists</li>
<li>Added playmode setting for each playlist, which overrides the default playmode</li>
<li>Added option to use the file picker to select Soundboard sounds, including support for wildcard names</li>
<li>Fixed issue where macro config screen would not close if the module was disabled</li>
<li>Fixed issue where the layout of the configuration screens would be messed up depending on browser/screen size</li>
<li>Added option to open compendia and journal entries</li>
</ul>

<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.1: https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v0.9.0: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v0.8.6 - 18-11-2020
<ul>
<li>Added support for the new Material Server app</li>
</ul>

<b>Compatible server app and SD plugin:</b><br>
Material Server v1.0.0: https://github.com/CDeenen/MaterialServer/releases <br>
SD plugin v0.7.3: https://github.com/CDeenen/MaterialDeck_SD/releases<br>

### v0.8.5 - 17-11-2020
<ul>
<li>Added 'Display Icon' to Macro action</li>
<li>Removed background option from 'Macro' => 'Macro Board' => 'Trigger Macro', this is handled in the macro configuration screen</li>
<li>Added 'Background' option in 'Macro' => 'Macro Board' => 'Offset'</li>
<li>Fixed control buttons from not performing action when clicked</li>
<li>Added check for each function to prevent unnecessary searching through the button buffer</li>
<li>Added 'Target', 'Visibility', 'Toggle Combat State' and 'Set Condition' options to the 'Token' action (under 'on click')</li>
<li>Added 'Zoom In' and 'Zoom Out' functions to 'Move' action</li>
<li>Added ability to load icons from web sources</li>
<li>Added support for localization (module only)</li>
<li>Fixed issue where SD buttons would not load properly if Foundry was initialized before the SD, or if Foundry was refreshed</li>
<li>Long words now split up onto multiple lines</li>
<li>Confirmed compatibility with Foundry v0.7.7</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Server v0.2.4 (no change)<br>
SD plugin v0.7.2<br>

### v0.8.4 - 11-11-2020
<ul>
<li>In 'Other' action, 'Control Button' mode, add 'Displayed Controls' option</li>
<li>Change 'Other', 'Playlist' and 'Soundboard' actions from background color change to ring color</li>
<li>Macro board fixed</li>
<li>Added proper background color options for 'Other' action</li>
<li>In 'Other' action, control button icons are now properly centered</li>
<li>Newly created actions now show the correct options at the start</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Server v0.2.4 (no change)<br>
SD plugin v0.7.1<br>

### v0.8.3 - 10-11-2020
<ul>
<li>Fixed compatibility with tokenizer</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Server v0.2.4<br>
SD plugin v0.7.0<br>

### v0.8.2 - 10-11-2020
<ul>
<li>Initial beta release</li>
</ul>
<b>Compatible server app and SD plugin:</b><br>
Server v0.2.4<br>
SD plugin v0.7.1<br>
