Description
Version 1.6.0 of this death counter requires Streamer.bot version 0.2.4. If you are not at least on that version I can’t guarantee that it’s working correctly.
If you already installed my previous death counter (version 1.4.0), your old death counters will automatically be converted to the new one after importing and executing any of the new actions. If there are any counters left you can check the pwnedCounter_Games global variable and do a manual conversion again which is described later.
Import File
[pwn]_DeathCounter_Single_1.6.0_by_pwnyy.sb (30.4 KB)
Resources
I’ll also provide an overlay example, as the import itself has example code in it which interacts with the overlay. Further instructions are in the README.txt
pwn_DeathCounter_Assets.zip (25.2 KB)
Installation
Import
button in the top menu. Drag the .sb file into the Import String
field. In total, it should be 12 Actions, 2 queues, and 8 commands.After Import
[pwn] Per Game DeathCounter (Single)
group. Then make sure each command has the correct permissions sets.By default the following commands are Moderator only:
- Counter Decrease
- Counter Increase
- Counter Set
- Game Add
- Game Remove
Commands
Input for commands are only valid if they are non-decimal numbers and smaller or equals to the max value of an integer.
Command | Description |
---|---|
!deathgame+ | Registers the current game as a death counter |
!deathgame- | Un-registers the current game from the death counters |
!death+ | Increases the current games counter by 1 or by the input number. If game has a counter |
!death- | Decreases the current games counter by 1 or by the input number. If game has a counter |
!deathset | Sets the current games counter by the input number. If game has a counter |
!deaths | Shows the current amount of deaths of the current game |
!totaldeaths | Shows the amount of deaths of all registered games |
!deathboard | Will show a leaderboard in your chat with the defined amount of registered games |
Configuration
userType
is present. This means that if you were to trigger a counter increase with your StreamDeck, it would not output a message into chat. userType
to either Twitch
, YouTube
, or Trovo
then it will the message accordingly. For YouTube, it will send the message to all streams if you are multistreaming. If done by command only to the specific stream.Available Arguments for all Actions
Argument Name | Value | Description |
---|---|---|
pdcsGame | string/text | Current game you are in |
pdcsGameId | string/text | Current game’s id |
pdcsGameBoxArtUrl | string/text | Game box art URL of the current game. Default size is 600x800 |
pdcsTotalDeaths | long/number | Total amount of deaths in all registered games |
pdcsTotalGames | int/number | Total amount of registered games |
pdcsHasCounter | True/False | Whether or not the current game is registered as a death counter |
pdcsCounter | long/number | The amount of deaths the current game has. Only available if pdcsHasCounter is True |
Counter Increase, Decrease, Set Actions
userInput
, with this you can define whether or not an input via command or somewhere else will be used. If userInput is set to True then it will check for the rawInput
argument, by default. You can change which argument would be used as input in another action if needed. userInput
option, as you’d always expect an input for this action.Argument Name | Value | Description |
---|---|---|
nonValidInputMsg | string/text | Message if a userInput is not a valid input |
noDeathCounterMsg | string/text | Message if the current game is not a death counter |
decreaseCountMsg | string/text | Message if decreasing the counter was successful |
increaseCountMsg | string/text | Message if increasing the counter was successful |
setCountMsg | string/text | Message if setting the counter was successful |
Game Add/Remove
Game Add Set Arguments
Argument Name | Value | Description |
---|---|---|
hasDeathCounterMsg | string/text | Message if the current game is already set as death counter |
addedDeathCounterMsg | string/text | Message if the current game has been set as death counter |
Game Remove Set Arguments
Argument Name | Value | Description |
---|---|---|
noDeathCounterMsg | string/text | Message if the current game is not currently a death counter |
removedDeathCounterMsg | string/text | Message if the current game has been remove from the death counters |
Get Game Counter / Total Deaths
Get Game Counter
Display the current games death counter
Argument Name | Value | Description |
---|---|---|
noDeathCounterMsg | string/text | Message if the current game is not set as death counter |
deathCountMsg | string/text | Message if the current game has a death counter that can be shown |
Get Total Deaths
Display the total amount of deaths in all registered death counter
Argument Name | Value | Description |
---|---|---|
noDeathCounterMsg | string/text | Message if the current game is not set as death counter |
deathCountMsg | string/text | Message if the current game has a death counter that can be shown |
Get Leaderboard (TopX)
Additional Arguments for Leaderboard
`#` is used as an index number for the leaderboard, starting at 0.Argument Name | Value | Description |
---|---|---|
pdcsGame[#] | string/text | Game name |
pdcsGameId[#] | string/text | Game id |
pdcsGameBoxArtUrl[#] | string/text | Game box art URL |
pdcsIgdbId[#] | long/number | IGDBid of game |
pdcsDeathCount[#] | long/number | Amount of deaths for game |
pdcsLeaderboardCount | int/number | Amount of games in the leaderboard |
pdcsLeaderboardDict | Dictionary<string, Dictionary<string,object>> | Dictionary based on the game id. The value dictionary has the following entries: gameName (string), gameBoxArt (string), igdbId (string), deathCount (long) |
pdcsLeaderboard | string/text | Simple text output like the given format, separated by a comma |
pdcsLeaderboardObs | string/text | Same as the normal text output but with \n instead of comma to display as a list in OBS |
pdcsLeaderboardFile | string/text | Same as the normal text output but with NewLine instead of comma to save it properly listed as a file |
Settings
Argument Name | Value | Description |
---|---|---|
leaderboardFormat | string/text | Define how the single listings of the leaderboard should look like. Use any of the variables mentioned above |
ignoreInput | True/False | Whether or not the user input should be considered. If not will use the defaultBoardSize |
minBoardSize | long/number | Minimum boardsize a user can enter |
maxBoardSize | long/number | Maximum boardsize a user can enter |
defaultBoardSize | long/number | Default boardsize which will be outputted. If amount of death counters isn’t as high, will only display the amount that is available |
orderByDescending | True/False | Whether or not the leaderboard should be displayed in descending order, related to the number of deaths |
On Change Event / Update Game
On Change Event
It has an additional argument called pdcsChangeType which can have the following values:
- increaseDeathCounter
- decreaseDeathCounter
- addDeathCounter
- removeDeathCounter
That way you can check the argument and also do something depending on what changed.
Custom > [pwn] Extensions > DeathCounter Single > DeathCounter Update
Update Game
Upgrade / Settings
Argument Name | Value | Description |
---|---|---|
nonValidGameName | string/text | This is really only used for the empty Twitch category which has the gameId 0, and is not a valid category for death counters |
blankGameBoxArt | string/text | This URL will be used when a games game box art URL was not able to be retrieved. The default is “about:blank” so it’s a blank browser source |
gameBoxDimensions | string/text | This is used to set the width and height of the game box art URL which is provided in most if not all actions |
usedInputVariable | string/text | This is used to determine the input variable used in the commands. The default is rawInput , however, you can change it to input0 if needed. However, this is for all commands |
convertFromOld | True/False | This is used to convert games from the pwnedCounter_Games (Dictionary<string,long> string is game name) global variable. The default is False. A maximum of 100 games per run can be tried to convert. It should show a Toast Notification or message in the logs. |