From 71b98a86becfeb240d8a730e6c8f25ee769b5141 Mon Sep 17 00:00:00 2001 From: Waggle Date: Tue, 20 Feb 2024 01:29:30 +0000 Subject: [PATCH] Changes for Final Fantasy 4 run end - Added a way to toggle message responses for Advanced inputs. - Change COM port from COM4 to COM3 - Re-enabled Select for SNES controller because it was previously disabled for the A Link To The Past run - Added a new regex line for help commands - Added a new regex line to catch spambots --- backend/backend.js | 156 ++++++++++++++++------------ backend/gcn.json | 2 +- backend/gcn_vc_nes.json | 2 +- backend/gcn_vc_snes.json | 2 +- backend/gcn_vc_snes_controller.json | 2 +- backend/global.json | 86 +++++++++++++-- backend/n64.json | 2 +- backend/overlay_576p.js | 2 +- backend/ps2.json | 2 +- backend/ps2_digital.json | 2 +- 10 files changed, 178 insertions(+), 80 deletions(-) diff --git a/backend/backend.js b/backend/backend.js index 556430ef..a1085fcd 100644 --- a/backend/backend.js +++ b/backend/backend.js @@ -7921,7 +7921,7 @@ async function onMessageHandler(target, tags, message, self) { } } if (inputMode == 2) { - let helpPrefixCheck = /^[!\"#$%&'()*+,\-./:;%=%?@\[\\\]^_`{|}~¡¦¨«¬­¯°±»½⅔¾⅝⅞∅ⁿ№★†‡‹›¿‰℅æßçñ¹⅓¼⅛²⅜³⁴₱€¢£¥—–·„“”‚‘’•√π÷׶∆′″§Π♣♠♥♪♦∞≠≈©®™✓‛‟❛❜❝❞❟❠❮❯⹂〝〞〟"🙶🙷🙸󠀢⍻✅✔𐄂🗸‱]+\s*((inputs*)+|(syntax)+|(infor*m*a*t*i*o*n*)+|(set+ings*)+|(help)+|(hel\[)+|(hel\])+|(rules*)+|(co+m+ands*)+|(o+m+ands*)+|(cmds*)+|(cmnds*)+|(co+ntro+l+s*)+|(co+ntro+l+ers*)+|(o+ntro+l+s*)+|(o+ntro+l+ers*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do|to)*\s*play\s*(chat)*\s*\?*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do|to)*\s*(i|we)\s*play\s*(chat)*\s*\?*)+)+/ig.test(originalMessage); + let helpPrefixCheck = /^[!\"#$%&'()*+,\-./:;%=%?@\[\\\]^_`{|}~¡¦¨«¬­¯°±»½⅔¾⅝⅞∅ⁿ№★†‡‹›¿‰℅æßçñ¹⅓¼⅛²⅜³⁴₱€¢£¥—–·„“”‚‘’•√π÷׶∆′″§Π♣♠♥♪♦∞≠≈©®™✓‛‟❛❜❝❞❟❠❮❯⹂〝〞〟"🙶🙷🙸󠀢⍻✅✔𐄂🗸‱]*\s*((inputs*)+|(syntax)+|(infor*m*a*t*i*o*n*)+|(set+ings*)+|(help)+|(hel\[)+|(hel\])+|(rules*)+|(co+m+ands*)+|(o+m+ands*)+|(cmds*)+|(cmnds*)+|(co+ntro+l+s*)+|(co+ntro+l+ers*)+|(o+ntro+l+s*)+|(o+ntro+l+ers*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do(es)*|to)*\s*play\s*(chat)*\s*\?*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do(es)*|to)*\s*(this)*\s*work\s*\?*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do(es)*|to)*\s*(i|we)\s*play\s*(chat)*\s*\?*)+)+/ig.test(originalMessage); if (helpPrefixCheck == true) { if (helpMessageCooldown >= new Date().getTime()) { //console.log("Don't send the help message yet"); @@ -11728,30 +11728,36 @@ async function onMessageHandler(target, tags, message, self) { updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); for (let splitInputsInMultipleStringsIndex = 0; splitInputsInMultipleStringsIndex < splitInputsInMultipleStrings.length; splitInputsInMultipleStringsIndex++) { if (splitInputsInMultipleStringsIndex == 0) { - if (isExecutingSavedMacro == false) { - client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); - } - if (isExecutingSavedMacro == true) { - client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + } + if (isExecutingSavedMacro == true) { + client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + } } } if (splitInputsInMultipleStringsIndex > 0 && splitInputsInMultipleStringsIndex != splitInputsInMultipleStrings.length - 1) { - if (isExecutingSavedMacro == false) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); - } - if (isExecutingSavedMacro == true) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + } + if (isExecutingSavedMacro == true) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + } } } if (splitInputsInMultipleStringsIndex == splitInputsInMultipleStrings.length - 1) { precisionInputTotalTimesToLoop = macroParametersToWrite[4] + 1; precisionInputTotalDuration = precisionInputTotalTimesToLoop * precisionInputSingleLoopDuration; //precisionInputTotalDuration = precisionInputTotalTimesToLoop * innerLoopTotalDuration; - if (isExecutingSavedMacro == false) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); - } - if (isExecutingSavedMacro == true) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + } + if (isExecutingSavedMacro == true) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + } } } } @@ -11766,14 +11772,16 @@ async function onMessageHandler(target, tags, message, self) { precisionInputTotalDuration = precisionInputTotalTimesToLoop * precisionInputSingleLoopDuration; //precisionInputTotalDuration = precisionInputTotalTimesToLoop * innerLoopTotalDuration; precisionInputStringToDisplay2 = precisionInputStringToDisplay2.replace(/(\s*\*+)+/ig, "*"); - updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); - if (isExecutingSavedMacro == false) { - client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); - } - if (isExecutingSavedMacro == true) { - client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); + if (isExecutingSavedMacro == false) { + client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + } + if (isExecutingSavedMacro == true) { + client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + } + //client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2, messageId); } - //client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2, messageId); } //let splitInputsInMultipleStrings = precisionInputStringToDisplay2.match(/.{100}/ig); //console.log(splitInputsInMultipleStrings); @@ -15606,30 +15614,36 @@ async function onMessageHandler(target, tags, message, self) { updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); for (let splitInputsInMultipleStringsIndex = 0; splitInputsInMultipleStringsIndex < splitInputsInMultipleStrings.length; splitInputsInMultipleStringsIndex++) { if (splitInputsInMultipleStringsIndex == 0) { - if (isExecutingSavedMacro == false) { - client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); - } - if (isExecutingSavedMacro == true) { - client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + } + if (isExecutingSavedMacro == true) { + client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + } } } if (splitInputsInMultipleStringsIndex > 0 && splitInputsInMultipleStringsIndex != splitInputsInMultipleStrings.length - 1) { - if (isExecutingSavedMacro == false) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); - } - if (isExecutingSavedMacro == true) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + } + if (isExecutingSavedMacro == true) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + } } } if (splitInputsInMultipleStringsIndex == splitInputsInMultipleStrings.length - 1) { precisionInputTotalTimesToLoop = macroParametersToWrite[4] + 1; precisionInputTotalDuration = precisionInputTotalTimesToLoop * precisionInputSingleLoopDuration; //precisionInputTotalDuration = precisionInputTotalTimesToLoop * innerLoopTotalDuration; - if (isExecutingSavedMacro == false) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); - } - if (isExecutingSavedMacro == true) { - client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + } + if (isExecutingSavedMacro == true) { + client.action(target, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + } } } } @@ -15644,12 +15658,14 @@ async function onMessageHandler(target, tags, message, self) { precisionInputTotalDuration = precisionInputTotalTimesToLoop * precisionInputSingleLoopDuration; //precisionInputTotalDuration = precisionInputTotalTimesToLoop * innerLoopTotalDuration; precisionInputStringToDisplay2 = precisionInputStringToDisplay2.replace(/(\s*\*+)+/ig, "*"); - updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); - if (isExecutingSavedMacro == false) { - client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); - } - if (isExecutingSavedMacro == true) { - client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); + if (isExecutingSavedMacro == false) { + client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + } + if (isExecutingSavedMacro == true) { + client.reply(target, "@" + usernameToPing + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + } } //client.reply(target, "@" + usernameToPing + " Your input was interpreted as " + precisionInputStringToDisplay2, messageId); } @@ -15733,7 +15749,7 @@ async function onMessageHandler(target, tags, message, self) { //messageInputs = messageInputs.split(/[\+\_\|\#\[\]\,\.\s]+/ig); //console.log(messageInputs); } - let helpPrefixCheck = /^[!\"#$%&'()*+,\-./:;%=%?@\[\\\]^_`{|}~¡¦¨«¬­¯°±»½⅔¾⅝⅞∅ⁿ№★†‡‹›¿‰℅æßçñ¹⅓¼⅛²⅜³⁴₱€¢£¥—–·„“”‚‘’•√π÷׶∆′″§Π♣♠♥♪♦∞≠≈©®™✓‛‟❛❜❝❞❟❠❮❯⹂〝〞〟"🙶🙷🙸󠀢⍻✅✔𐄂🗸‱]+\s*((inputs*)+|(syntax)+|(infor*m*a*t*i*o*n*)+|(set+ings*)+|(help)+|(hel\[)+|(hel\])+|(rules*)+|(co+m+ands*)+|(o+m+ands*)+|(cmds*)+|(cmnds*)+|(co+ntro+l+s*)+|(co+ntro+l+ers*)+|(o+ntro+l+s*)+|(o+ntro+l+ers*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do|to)*\s*play\s*(chat)*\s*\?*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do|to)*\s*(i|we)\s*play\s*(chat)*\s*\?*)+)+/ig.test(originalMessage); + let helpPrefixCheck = /^[!\"#$%&'()*+,\-./:;%=%?@\[\\\]^_`{|}~¡¦¨«¬­¯°±»½⅔¾⅝⅞∅ⁿ№★†‡‹›¿‰℅æßçñ¹⅓¼⅛²⅜³⁴₱€¢£¥—–·„“”‚‘’•√π÷׶∆′″§Π♣♠♥♪♦∞≠≈©®™✓‛‟❛❜❝❞❟❠❮❯⹂〝〞〟"🙶🙷🙸󠀢⍻✅✔𐄂🗸‱]*\s*((inputs*)+|(syntax)+|(infor*m*a*t*i*o*n*)+|(set+ings*)+|(help)+|(hel\[)+|(hel\])+|(rules*)+|(co+m+ands*)+|(o+m+ands*)+|(cmds*)+|(cmnds*)+|(co+ntro+l+s*)+|(co+ntro+l+ers*)+|(o+ntro+l+s*)+|(o+ntro+l+ers*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do(es)*|to)*\s*play\s*(chat)*\s*\?*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do(es)*|to)*\s*(this)*\s*work\s*\?*)+|((chat)*\s*(h[oi]w|hw[oi])\s*(can|do(es)*|to)*\s*(i|we)\s*play\s*(chat)*\s*\?*)+)+/ig.test(originalMessage); if (helpPrefixCheck == true) { if (helpMessageCooldown >= new Date().getTime()) { //console.log("Don't send the help message yet"); @@ -21397,30 +21413,36 @@ function preTestMacroString(macroStringToPreTest, sendToArduino, reverseInputs, updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); for (let splitInputsInMultipleStringsIndex = 0; splitInputsInMultipleStringsIndex < splitInputsInMultipleStrings.length; splitInputsInMultipleStringsIndex++) { if (splitInputsInMultipleStringsIndex == 0) { - if (isExecutingSavedMacro == false) { - client.reply(channel, "@" + username + " Your input was interpreted as " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); - } - if (isExecutingSavedMacro == true) { - client.reply(channel, "@" + username + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.reply(channel, "@" + username + " Your input was interpreted as " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + } + if (isExecutingSavedMacro == true) { + client.reply(channel, "@" + username + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex], messageId); + } } } if (splitInputsInMultipleStringsIndex > 0 && splitInputsInMultipleStringsIndex != splitInputsInMultipleStrings.length - 1) { - if (isExecutingSavedMacro == false) { - client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); - } - if (isExecutingSavedMacro == true) { - client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + } + if (isExecutingSavedMacro == true) { + client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex]); + } } } if (splitInputsInMultipleStringsIndex == splitInputsInMultipleStrings.length - 1) { precisionInputTotalTimesToLoop = macroParametersToWrite[4] + 1; precisionInputTotalDuration = precisionInputTotalTimesToLoop * precisionInputSingleLoopDuration; //precisionInputTotalDuration = precisionInputTotalTimesToLoop * innerLoopTotalDuration; - if (isExecutingSavedMacro == false) { - client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); - } - if (isExecutingSavedMacro == true) { - client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + } + if (isExecutingSavedMacro == true) { + client.action(channel, splitInputsInMultipleStrings[splitInputsInMultipleStringsIndex] + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early."); + } } } } @@ -21436,13 +21458,15 @@ function preTestMacroString(macroStringToPreTest, sendToArduino, reverseInputs, //precisionInputTotalDuration = precisionInputTotalTimesToLoop * innerLoopTotalDuration; precisionInputStringToDisplay2 = precisionInputStringToDisplay2.replace(/(\s*\*+)+/ig, "*"); updateTwitchUserRandomChatColor(twitchCredentials, twitchJsonEncodedBotAppAccessToken); - if (isExecutingSavedMacro == false) { - client.reply(channel, "@" + username + " Your input was interpreted as " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); - } - if (isExecutingSavedMacro == true) { - client.reply(channel, "@" + username + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + if (globalConfig.enable_your_input_was_interpreted_as_reply_message == true) { + if (isExecutingSavedMacro == false) { + client.reply(channel, "@" + username + " Your input was interpreted as " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + } + if (isExecutingSavedMacro == true) { + client.reply(channel, "@" + username + " Executing macro " + savedMacroNameToExecute + ", executed " + savedMacroTimesWasUsed + " times " + precisionInputStringToDisplay2 + ". Single Loop Duration: " + precisionInputSingleLoopDuration + controllerConfig.time_unit_short + " Total Duration: " + precisionInputTotalDuration + controllerConfig.time_unit_short + ". Type Stop or Wait to stop execution of inputs early.", messageId); + } + //client.reply(channel, "@" + username + " Your input was interpreted as " + precisionInputStringToDisplay2, messageId); } - //client.reply(channel, "@" + username + " Your input was interpreted as " + precisionInputStringToDisplay2, messageId); } //let splitInputsInMultipleStrings = precisionInputStringToDisplay2.match(/.{100}/ig); //console.log(splitInputsInMultipleStrings); diff --git a/backend/gcn.json b/backend/gcn.json index 193d726c..dcd542da 100644 --- a/backend/gcn.json +++ b/backend/gcn.json @@ -1,5 +1,5 @@ { - "com_port": "COM4", + "com_port": "COM3", "com_port_parameters": { "autoOpen": true, "baudRate": 500000 diff --git a/backend/gcn_vc_nes.json b/backend/gcn_vc_nes.json index 8b1a7934..a34b2f0d 100644 --- a/backend/gcn_vc_nes.json +++ b/backend/gcn_vc_nes.json @@ -1,5 +1,5 @@ { - "com_port": "COM4", + "com_port": "COM3", "com_port_parameters": { "autoOpen": true, "baudRate": 500000 diff --git a/backend/gcn_vc_snes.json b/backend/gcn_vc_snes.json index 9f2d4409..f3028ccc 100644 --- a/backend/gcn_vc_snes.json +++ b/backend/gcn_vc_snes.json @@ -1,5 +1,5 @@ { - "com_port": "COM4", + "com_port": "COM3", "com_port_parameters": { "autoOpen": true, "baudRate": 500000 diff --git a/backend/gcn_vc_snes_controller.json b/backend/gcn_vc_snes_controller.json index 1f5dac91..5500ec43 100644 --- a/backend/gcn_vc_snes_controller.json +++ b/backend/gcn_vc_snes_controller.json @@ -2372,7 +2372,7 @@ "Sekct" ], "color_value": "#5600AE", - "is_blacklisted": true, + "is_blacklisted": false, "opposite_input_value": "0x04007F7F7F7F0000L", "opposite_input_name": "Select", "has_opposite": false, diff --git a/backend/global.json b/backend/global.json index 0819594e..b03ba172 100644 --- a/backend/global.json +++ b/backend/global.json @@ -17,6 +17,7 @@ "ban_spambots": true, "send_messages_to_moderated_user": true, "send_whispers_to_moderated_user": true, + "enable_your_input_was_interpreted_as_reply_message": false, "enable_updating_stream_title_automatically": true, "enable_check_uptime": true, "enable_check_moderators": true, @@ -34,8 +35,8 @@ "webserver_port": 8080, "chat_config": "chat_config.json", "run_start_time": 1707004800000, - "next_run_start_time": 1707004800000, - "stream_end_time": 1707004800000, + "next_run_start_time": 1714867200000, + "stream_end_time": 1708387200000, "initial_accept_inputs": false, "initial_accept_tts": false, "initial_accept_inputs_from_anyone": true, @@ -100,7 +101,7 @@ "run_id": 8, "notes": "To test server: Set game_title as TEST RUN 0, set stream_title as TEST RUN 1, set next_game_title as TEST RUN 2, set main_database_name as test_database_main, set chatters_collection_name as test_database_chatters, set run_name as test_database_run_name, set global_database_name as test_database_global, set inputter_database_name as test_database_inputters, set macro_database_name as test_database_macro, set run_id as -1", "overlay_header_text": "Twitch Plays (Viewers play\/Chat plays) {{game_title_short}}\non an actual Wii (SNES Wii VC) !help !discord", - "overlay_advanced_mode_help_message_to_display": "\n\n!help to learn how to play\n\nGo to the !discord and go to\n#polls to vote for next game\n(Date TBD)", + "overlay_advanced_mode_help_message_to_display": "!help to learn how to play\nGame beaten! Congrats!\nStream goes offline in\n{{stream_end_time}}\n(The {{play_time:1708387200000}} mark)\nGo to the !discord and go to\n#polls to vote for next game\n(Starts in {{next_run_start_time}})", "overlay_text_rotation": [ "Type !help or !commands to learn how to play", "Type !macrohelp to learn how to save macros and\nexecute saved macros", @@ -108,8 +109,45 @@ "Type !discord to get a link to the stream Discord server\nand go to #polls to vote for next game", "Please, don't delete any files, and please save regularly", "Attempting to delete or deleting any file will earn you an\nunappealable permanent ban", - "Current goal: Start the game!", + "Beat Mist Dragon: {{play_time:1707011216706}} ({{absolute_time:1707011216706}})!", + "Beat Baron Soldier:{{play_time:1707012287176}} ({{absolute_time:1707012287176}})!", + "Beat Octomammoth: {{play_time:1707027502871}} ({{absolute_time:1707027502871}})!", + "Beat Antlion: {{play_time:1707078850361}} ({{absolute_time:1707078850361}})!", + "Beat WaterHag: {{play_time:1707080688975}} ({{absolute_time:1707080688975}})!", + "Beat MomBomb: {{play_time:1707085115984}} ({{absolute_time:1707085115984}})!", + "Beat Fabul War: {{play_time:1707094637396}} ({{absolute_time:1707094637396}})!", + "Beat Milon: {{play_time:1707109949211}} ({{absolute_time:1707109949211}})!", + "Beat Milon Z.: {{play_time:1707111052898}} ({{absolute_time:1707111052898}})!", + "Beat D.Knight: {{play_time:1707111292170}} ({{absolute_time:1707111292170}})!", + "Caught Chocobo: {{play_time:1707173341834}} ({{absolute_time:1707173341834}})!", + "Beat Yang: {{play_time:1707181512251}} ({{absolute_time:1707181512251}})!", + "Beat Baigan: {{play_time:1707258707119}} ({{absolute_time:1707258707119}})!", + "Beat Kainazzo: {{play_time:1707258889752}} ({{absolute_time:1707258889752}})!", + "Caught Black Chocobo:\n{{play_time:1707260362763}} ({{absolute_time:1707260362763}})!", + "Beat Dark Elf: {{play_time:1707262835201}} ({{absolute_time:1707262835201}})!", + "Beat Magus Sisters:{{play_time:1707272939006}} ({{absolute_time:1707272939006}})!", + "Beat Golbez 1: {{play_time:1707273081839}} ({{absolute_time:1707273081839}})!", + "Beat Valvalis: {{play_time:1707273372439}} ({{absolute_time:1707273372439}})!", + "Beat Calbrena: {{play_time:1707274313767}} ({{absolute_time:1707274313767}})!", + "Beat Golbez 2: {{play_time:1707274548858}} ({{absolute_time:1707274548858}})!", + "Beat Dr.Lugae: {{play_time:1707356412276}} ({{absolute_time:1707356412276}})!", + "Beat Rubicant: {{play_time:1707436490591}} ({{absolute_time:1707436490591}})!", + "Beat Ashura: {{play_time:1707530604994}} ({{absolute_time:1707530604994}})!", + "Beat Leviathan: {{play_time:1707531901714}} ({{absolute_time:1707531901714}})!", + "Beat Bahamut: {{play_time:1707612031509}} ({{absolute_time:1707612031509}})!", + "Beat Elements: {{play_time:1707619320968}} ({{absolute_time:1707619320968}})!", + "Beat CPU: {{play_time:1707622486305}} ({{absolute_time:1707622486305}})!", + "Beat Pale Dim: {{play_time:1707634375782}} ({{absolute_time:1707634375782}})!", + "Beat D.Lunar: {{play_time:1707715113261}} ({{absolute_time:1707715113261}})!", + "Beat Wyvern: {{play_time:1707874726844}} ({{absolute_time:1707874726844}})!", + "Beat Plague: {{play_time:1707878258690}} ({{absolute_time:1707878258690}})!", + "Beat EvilMask: {{play_time:1707879143567}} ({{absolute_time:1707879143567}})!", + "Beat Ogopogo: {{play_time:1707879651031}} ({{absolute_time:1707879651031}})!", + "Beat Zemus: {{play_time:1707934373752}} ({{absolute_time:1707934373752}})!", + "Current goal: Celebrate! Game was beaten! Congrats to\nall who participated!", "The time is {{current_time_no_millis}}.\n{{game_title_short}} has been going for {{play_time_total_string_no_millis}}.", + "Stream goes offline in {{stream_end_time}} (The {{play_time:1708387200000}} mark)", + "{{next_game_title}} (starts in\n{{next_run_start_time}})", "If anything breaks, please ping @WhatAboutGamingLive", "The Endgame Conditions are: In order to beat the game, you\nhave to do the following tasks in the following order:", "1) Beat all main bosses, order in which bosses are beaten\nDOES NOT MATTER", @@ -124,10 +162,46 @@ "Not sure how to play? You can type !help or !commands in chat at any time to have a help message sent straight to chat.", "You can type !macrohelp to learn how to save and execute saved macros.", "All of the code used on this stream is open source and can be found here: https://github.com/WhatAboutGaming/Twitch-Plays-Stuff", - "We have a Discord server and there is currently a poll up for which game to be played after this (Date TBD), the options are: Final Fantasy 6 (Super NES, known as Final Fantasy 3 in North America), The Legend of Zelda (NES) and Kingdom Hearts 2 Re-Revisit (So you can finish whatever there is left to do and beat the game), you can vote for more than one option, Discord server link here: https://discord.gg/yHETNuZCUK", + "We have a Discord server and there is currently a poll up for which game to be played after this (In {{next_run_start_time}}), the options are: Final Fantasy 6 (Super NES, known as Final Fantasy 3 in North America), The Legend of Zelda (NES) and Kingdom Hearts 2 Re-Revisit (So you can finish whatever there is left to do and beat the game), you can vote for more than one option, Discord server link here: https://discord.gg/yHETNuZCUK", "The time is {{current_time}}. {{game_title}} has been going for {{play_time_total_string}}.", "We're currently playing {{game_title}}. Save files for this run can be found here: https://github.com/WhatAboutGaming/Twitch-Plays-Stuff/tree/master/Save%20Files/Final%20Fantasy%204 and the videos for this run can be found on this playlist: https://www.twitch.tv/collections/qjIK_1HOrRexPw", - "Current goal: Start the game!" + "Current goal: Celebrate! Game was beaten! Congrats to all who participated!", + "Stream goes offline in {{stream_end_time}} (The {{play_time:1708387200000}} mark). Countdown here: https://www.timeanddate.com/countdown/generic?iso=20240220T00&p0=1440&msg=Stream+Going+Offline&font=sanserif&csz=1", + "Video: Beating Mist Dragon https://www.twitch.tv/videos/2054446280 {{play_time:1707011216706}} ({{absolute_time:1707011216706}})", + "Video: Beating Baron Soldier https://www.twitch.tv/videos/2054446279 {{play_time:1707012287176}} ({{absolute_time:1707012287176}})", + "Video: Beating Octomammoth https://www.twitch.tv/videos/2054446283 {{play_time:1707027502871}} ({{absolute_time:1707027502871}})", + "Video: Beating Antlion https://www.twitch.tv/videos/2054586836 {{play_time:1707078850361}} ({{absolute_time:1707078850361}})", + "Video: Beating WaterHag (Edward) https://www.twitch.tv/videos/2054586835 {{play_time:1707080688975}} ({{absolute_time:1707080688975}})", + "Video: Beating MomBomb https://www.twitch.tv/videos/2054586837 {{play_time:1707085115984}} ({{absolute_time:1707085115984}})", + "Video: Beating Fabul War https://www.twitch.tv/videos/2054621989 {{play_time:1707094637396}} ({{absolute_time:1707094637396}})", + "Video: Beating Milon https://www.twitch.tv/videos/2054621990 {{play_time:1707109949211}} ({{absolute_time:1707109949211}})", + "Video: Beating Milon Z. https://www.twitch.tv/videos/2054621991 {{play_time:1707111052898}} ({{absolute_time:1707111052898}})", + "Video: Beating D.Knight https://www.twitch.tv/videos/2054621987 {{play_time:1707111292170}} ({{absolute_time:1707111292170}})", + "Video: Catching a Chocobo https://www.twitch.tv/videos/2054636314 {{play_time:1707173341834}} ({{absolute_time:1707173341834}})", + "Video: Beating Yang https://www.twitch.tv/videos/2054644708 {{play_time:1707181512251}} ({{absolute_time:1707181512251}})", + "Video: Beating Baigan https://www.twitch.tv/videos/2055320625 {{play_time:1707258707119}} ({{absolute_time:1707258707119}})", + "Video: Beating Kainazzo https://www.twitch.tv/videos/2055320624 {{play_time:1707258889752}} ({{absolute_time:1707258889752}})", + "Video: Catching a Black Chocobo https://www.twitch.tv/videos/2055338090 {{play_time:1707260362763}} ({{absolute_time:1707260362763}})", + "Video: Beating Dark Elf https://www.twitch.tv/videos/2055350691 {{play_time:1707262835201}} ({{absolute_time:1707262835201}})", + "Video: Beating Magus Sisters https://www.twitch.tv/videos/2056334624 {{play_time:1707272939006}} ({{absolute_time:1707272939006}})", + "Video: Beating Golbez 1 https://www.twitch.tv/videos/2056334622 {{play_time:1707273081839}} ({{absolute_time:1707273081839}})", + "Video: Beating Valvalis https://www.twitch.tv/videos/2056334619 {{play_time:1707273372439}} ({{absolute_time:1707273372439}})", + "Video: Beating Calbrena https://www.twitch.tv/videos/2056334621 {{play_time:1707274313767}} ({{absolute_time:1707274313767}})", + "Video: Beating Golbez 2 https://www.twitch.tv/videos/2056334623 {{play_time:1707274548858}} ({{absolute_time:1707274548858}})", + "Video: Beating Dr.Lugae https://www.twitch.tv/videos/2056414153 {{play_time:1707356412276}} ({{absolute_time:1707356412276}})", + "Video: Beating Rubicant https://www.twitch.tv/videos/2057313076 {{play_time:1707436490591}} ({{absolute_time:1707436490591}})", + "Video: Beating Ashura https://www.twitch.tv/videos/2058362609 {{play_time:1707530604994}} ({{absolute_time:1707530604994}})", + "Video: Beating Leviathan https://www.twitch.tv/videos/2058378631 {{play_time:1707531901714}} ({{absolute_time:1707531901714}})", + "Video: Beating Bahamut https://www.twitch.tv/videos/2059552006 {{play_time:1707612031509}} ({{absolute_time:1707612031509}})", + "Video: Beating Elements https://www.twitch.tv/videos/2059552005 {{play_time:1707619320968}} ({{absolute_time:1707619320968}})", + "Video: Beating CPU https://www.twitch.tv/videos/2059552008 {{play_time:1707622486305}} ({{absolute_time:1707622486305}})", + "Video: Beating Pale Dim https://www.twitch.tv/videos/2060301962 {{play_time:1707634375782}} ({{absolute_time:1707634375782}})", + "Video: Beating D.Lunar https://www.twitch.tv/videos/2062308261 {{play_time:1707715113261}} ({{absolute_time:1707715113261}})", + "Video: Beating Wyvern https://www.twitch.tv/videos/2062227708 {{play_time:1707874726844}} ({{absolute_time:1707874726844}})", + "Video: Beating Plague https://www.twitch.tv/videos/2062256943 {{play_time:1707878258690}} ({{absolute_time:1707878258690}})", + "Video: Beating EvilMask https://www.twitch.tv/videos/2062269777 {{play_time:1707879143567}} ({{absolute_time:1707879143567}})", + "Video: Beating Ogopogo https://www.twitch.tv/videos/2062269778 {{play_time:1707879651031}} ({{absolute_time:1707879651031}})", + "Video: Beating Zemus/Zeromus/Credits https://www.twitch.tv/videos/2062836903 {{play_time:1707934373752}} ({{absolute_time:1707934373752}})" ], "help_message_saving_macros": [ "You can save or edit a macro by using the command !savemacro . Example: !savemacro WalkInCircles Up Right Down Left will save or edit the macro WalkInCircles with the inputs Up Right Down Left, which can then be used later.", diff --git a/backend/n64.json b/backend/n64.json index b49ae809..44d4268e 100644 --- a/backend/n64.json +++ b/backend/n64.json @@ -1,5 +1,5 @@ { - "com_port": "COM4", + "com_port": "COM3", "com_port_parameters": { "autoOpen": true, "baudRate": 500000 diff --git a/backend/overlay_576p.js b/backend/overlay_576p.js index 57460b6f..0c3e1f65 100644 --- a/backend/overlay_576p.js +++ b/backend/overlay_576p.js @@ -695,7 +695,7 @@ function getAbsoluteTimeAsISOStringFromHelpMessageString(helpMessageInputString, function setup() { noSmooth(); - frameRate(30); + frameRate(60); createCanvas(1024, 576); background("#00000000"); socket = io.connect(); diff --git a/backend/ps2.json b/backend/ps2.json index 6a0df629..ffd636fe 100644 --- a/backend/ps2.json +++ b/backend/ps2.json @@ -1,5 +1,5 @@ { - "com_port": "COM4", + "com_port": "COM3", "com_port_parameters": { "autoOpen": true, "baudRate": 500000 diff --git a/backend/ps2_digital.json b/backend/ps2_digital.json index accabbdd..6e38479a 100644 --- a/backend/ps2_digital.json +++ b/backend/ps2_digital.json @@ -1,5 +1,5 @@ { - "com_port": "COM4", + "com_port": "COM3", "com_port_parameters": { "autoOpen": true, "baudRate": 500000