INTRX COMMANDS
If you followed the setup guide, IntRX is ready to use. But to actually make use of it, you have to set up your interaction commands. To do this, open up InteractConfig.xlsx in the Config folder.
CREATING COMMANDS FOR SUPPORTED GAMES
Upon opening InteractConfig.xlsx , the first sheet you'll see will be the "Global" sheet, but we'll come back to that later. For this section, we're going to focus on the other sheets, where you can find several games that IntRX natively supports. So if you wanted to set up commands for Skyrim, you would switch to the "Skyrim" sheet. All commands set up in a game-specific sheet will only work while that game is running.
All game-specific sheets will have the same four columns. The "Command" column is what users will type into chat (starting with !) to execute the command. The "Cooldown" column is the number of seconds after a command is executed before it can be executed again. The "Command to Execute" column is the command that will be executed in-game. And if you want to disable a command, simply type "Disable" into the "Disable" column.
If you're setting up IntRX for one of these games, you likely understand how said game inputs commands. Minecraft commands are executed from the in-game chat, and all other supported games execute commands from the in-game dev console. The Witcher 3 needs a mod to enable the dev console, and Subnautica's needs to be enabled via a hidden menu, but all Bethesda games have their dev consoles accessible by default.
Commands can be set up to do things like spawn enemies, add items to the player's inventory, etc. If you're unsure how to use cheats or commands in your game of choice, just Google search the name of your game followed by "console commands" or "cheat codes". As examples, player.placeatme 13bbf 10 and equipitem 1f25b 0 right are examples of Skyrim commands, /summon iron_golem ~ ~ ~ {CustomName:"\"Jeffrey\""} and /give @p minecraft:diamond_sword 1 are examples of Minecraft commands.
Commands can be set up to do things like spawn enemies, add items to the player's inventory, etc. If you're unsure how to use cheats or commands in your game of choice, just Google search the name of your game followed by "console commands" or "cheat codes". As examples, player.placeatme 13bbf 10 and equipitem 1f25b 0 right are examples of Skyrim commands, /summon iron_golem ~ ~ ~ {CustomName:"\"Jeffrey\""} and /give @p minecraft:diamond_sword 1 are examples of Minecraft commands.
THE GLOBAL SHEET
The "Global" sheet of InteractConfig.xlsx is where you can set up commands that work in any game, or commands for specific games that IntRX does not natively support. This sheet will be the same as the others, but with two changes: One, the rightmost column is named "What to Run" instead of "Command to Execute". Two, there is a new column named "Active Window".
"WHAT TO RUN"
The "What to Run" column is where you will put what you want the command to do, using this format:
• $PRESS [key] will press the specified key once.
• $HOLD [key] [number] will block your input and hold the specified key for the specified number of seconds.
• $SPAM [key] [number] will press the specified key the specified number of times.
• $TYPE [message] will block your input and type the specified message.
• $CHAT [message] will have your bot output the specified message to your chat.
• $RUN [file] will run the specified file (file must be located in the "UserScripts" folder, more on this later).
• $WAIT [number] will do absolutely nothing for the specified number of seconds.
These little things with a dollar sign prefix are called functions, and they're what you put in the "What to Run" column to create your command. When your command is run, the functions are executed in order from left to right, and you can use any number or combination of variables you need to.
As an example, $HOLD W 3 $SPAM E 10 $TYPE I love this game! $WAIT 5 $PRESS G $CHAT Thank you for coming. would do these things in this order: hold the W key for 3 seconds, hit the E key 10 times, type the message "I love this game!", do nothing for 5 seconds, press the G key, then output a message to chat saying "Thank you for coming."
For making commands using keys that aren't letters or numbers, consult AHK's key list. So for a command that presses left click and then holds Page Up for a second, you would put $PRESS LButton $HOLD PgUp 1. Unfortunately we have not yet implemented a way to press multiple keys at once (such as Ctrl+Shift+C) using functions, so you would need to create a custom script for that.
There are also variables you can use in your functions:
• %ARGS% is whatever the chat member types after the command.
• %USER% is the user who ran the command from chat.
(These variables can be used in commands on game-specific sheets as well!)
To give you an idea how these would be used: If your command was !love, your functions were $CHAT %USER% loves %ARGS%!, and user wootiown typed "!love Dark Souls" into your chat, your bot would output a message to the chat saying "wootiown loves Dark Souls!"
It could also be used for things such as $SPAM %ARGS%, where the command would spam whatever key the chat member specified.
Note that if your command contains an %ARGS% variable, and some runs a command from chat without specifying a variable, the command will fail, and no cooldown will be applied.
• $PRESS [key] will press the specified key once.
• $HOLD [key] [number] will block your input and hold the specified key for the specified number of seconds.
• $SPAM [key] [number] will press the specified key the specified number of times.
• $TYPE [message] will block your input and type the specified message.
• $CHAT [message] will have your bot output the specified message to your chat.
• $RUN [file] will run the specified file (file must be located in the "UserScripts" folder, more on this later).
• $WAIT [number] will do absolutely nothing for the specified number of seconds.
These little things with a dollar sign prefix are called functions, and they're what you put in the "What to Run" column to create your command. When your command is run, the functions are executed in order from left to right, and you can use any number or combination of variables you need to.
As an example, $HOLD W 3 $SPAM E 10 $TYPE I love this game! $WAIT 5 $PRESS G $CHAT Thank you for coming. would do these things in this order: hold the W key for 3 seconds, hit the E key 10 times, type the message "I love this game!", do nothing for 5 seconds, press the G key, then output a message to chat saying "Thank you for coming."
For making commands using keys that aren't letters or numbers, consult AHK's key list. So for a command that presses left click and then holds Page Up for a second, you would put $PRESS LButton $HOLD PgUp 1. Unfortunately we have not yet implemented a way to press multiple keys at once (such as Ctrl+Shift+C) using functions, so you would need to create a custom script for that.
There are also variables you can use in your functions:
• %ARGS% is whatever the chat member types after the command.
• %USER% is the user who ran the command from chat.
(These variables can be used in commands on game-specific sheets as well!)
To give you an idea how these would be used: If your command was !love, your functions were $CHAT %USER% loves %ARGS%!, and user wootiown typed "!love Dark Souls" into your chat, your bot would output a message to the chat saying "wootiown loves Dark Souls!"
It could also be used for things such as $SPAM %ARGS%, where the command would spam whatever key the chat member specified.
Note that if your command contains an %ARGS% variable, and some runs a command from chat without specifying a variable, the command will fail, and no cooldown will be applied.
"ACTIVE WINDOW"
Commands on the "Global" sheet will work in all games by default, but you can set specific commands to only work in specific games using the "Active Window" tab. In this column, you put the name of the program window that you want the command to be for, or at least a part of it. If a command has an active window set, that command will only work if the title of the window you are currently in contains what you've typed in the "Active Window" column. If you want a command to work no matter what game you're playing, leave the "Active Window" column for that command blank.
However, some games' window titles won't always be the same. Take Terraria for example, the window has a different name every time you open it. However, the window title always begins with "Terraria", so setting a command's active window to Terraria will make that command only work in Terraria— it doesn't matter what else is in the window title, as long as it contains "Terraria" it will work.
With all this being said, it's well worth mentioning that the spreadsheet only cares about what you type. So if you'd like to customize and/or organize your spreadsheet, feel free to do things like change fonts, recolor text or cells, leave rows blank, adjust column width, etc. Just don't merge cells or change the text itself. You can also have multiple commands with the same name, as long as they have different "Active Window" settings.
SCRIPTS FOR MORE COMPLEX COMMANDS
The functions and variables built into IntRX can allow for basic commands, but if you want something more complex, you can make your own AutoHotKey scripts to do virtually whatever you want. There is a whole page on this site dedicated to teaching you about Creating Your Own Scripts for any game you want using AutoHotkey. But don't let it intimidate you, it is quite simple.
Once you've made your own scripts, or downloaded scripts that others have made, put them into the UserScripts folder, located in the same place as InteractConfig.xlsx. Once there, you can use the $RUN function to run any scripts you want.
Once you've made your own scripts, or downloaded scripts that others have made, put them into the UserScripts folder, located in the same place as InteractConfig.xlsx. Once there, you can use the $RUN function to run any scripts you want.
USING INTRX WITH ANOTHER CHAT BOT
Odds are, you have a chat bot in your stream, such as PhantomBot or Streamlabs Chatbot. And said bot most likely has features such as ranks, currency (points), whisper support, bit integration, etc. While IntRX doesn't have such features yet, it can be set up to use those features from your other bot, in a way. So if you have an IntRX script that you'd like to put behind a paywall (be it bot points, bits, or donations), or only let certain types of viewers use it, you can do just that.
The first step is to create a command phrase in IntRX. This will do two things: One, ONLY your bot account(s) will be able to activate commands from chat. Two, commands in IntRX MUST now be triggered via an entire phrase in chat, rather than just the command itself, by your bot(s). The reasoning for this will be explained later, but for now, open Settings.xlsx and set up your COMMAND PHRASE.
• Your command phrase must contain %CMD% to signify where the actual command will be. There must also be at least four characters before %CMD% in the phrase.
• Example of a command phrase: A viewer just activated the %CMD% command! So the chat message "A viewer just activated the SpawnBear command!"" would trigger the SpawnBear command.
• A chat message with the command phrase must not have anything after the phrase, but can have anything before it. Example: If your command phrase is just activated the %CMD% command!, then the chat message "TwitchUser715 just activated the SpawnBear command!" would trigger the SpawnBear command, but "TwitchUser715 just activated the SpawnBear command! Hooray!" would not work.
• Commands will work with or without an exclamation point (!) before them. So "TwitchUser715 just activated the !SpawnBear command!" will also work.
Step two is to set up commands in your other chat bot— refer to your chat bot of choice's documentation if you don't know how to do that. Basically, you will be routing chat commands through your external chat bot, and if the viewer who did the command meets the requirements to execute it, your chat bot will send a message to chat which IntRX will pick up and use as a signal to execute the command. Let's go step by step:
1. Create a new command in your external chat bot. For simplicity, we recommend sharing the same command name as in IntRX. For this example, we'll be using !SpawnBear.
2. Set up your command how you want it— make it cost points, only allow viewers with certain roles/ranks to use it, we also recommend using your external chat bot for cooldowns (so set cooldowns in IntRX to 0).
3. Finally, set up the command to output a message to chat if successful. That message will contain your command phrase, but instead of %CMD%, you will put the actual name of the command. For example, if using PhantomBot, you could set the chat output to (sender) just activated the SpawnBear command!
4. Repeat until you have an external bot command set up for all of your IntRX commands.
The first step is to create a command phrase in IntRX. This will do two things: One, ONLY your bot account(s) will be able to activate commands from chat. Two, commands in IntRX MUST now be triggered via an entire phrase in chat, rather than just the command itself, by your bot(s). The reasoning for this will be explained later, but for now, open Settings.xlsx and set up your COMMAND PHRASE.
• Your command phrase must contain %CMD% to signify where the actual command will be. There must also be at least four characters before %CMD% in the phrase.
• Example of a command phrase: A viewer just activated the %CMD% command! So the chat message "A viewer just activated the SpawnBear command!"" would trigger the SpawnBear command.
• A chat message with the command phrase must not have anything after the phrase, but can have anything before it. Example: If your command phrase is just activated the %CMD% command!, then the chat message "TwitchUser715 just activated the SpawnBear command!" would trigger the SpawnBear command, but "TwitchUser715 just activated the SpawnBear command! Hooray!" would not work.
• Commands will work with or without an exclamation point (!) before them. So "TwitchUser715 just activated the !SpawnBear command!" will also work.
Step two is to set up commands in your other chat bot— refer to your chat bot of choice's documentation if you don't know how to do that. Basically, you will be routing chat commands through your external chat bot, and if the viewer who did the command meets the requirements to execute it, your chat bot will send a message to chat which IntRX will pick up and use as a signal to execute the command. Let's go step by step:
1. Create a new command in your external chat bot. For simplicity, we recommend sharing the same command name as in IntRX. For this example, we'll be using !SpawnBear.
2. Set up your command how you want it— make it cost points, only allow viewers with certain roles/ranks to use it, we also recommend using your external chat bot for cooldowns (so set cooldowns in IntRX to 0).
3. Finally, set up the command to output a message to chat if successful. That message will contain your command phrase, but instead of %CMD%, you will put the actual name of the command. For example, if using PhantomBot, you could set the chat output to (sender) just activated the SpawnBear command!
4. Repeat until you have an external bot command set up for all of your IntRX commands.
Now, if a user types !SpawnBear into chat, and meets the requirements to use it, your external chat bot will output your message containing your command phrase to chat. IntRX will see that message, and execute the appropriate command.