About this mod
Are you a Twitch streamer? Do you want your viewers to be customers, cashiers, customer helper, security guard, janitor, restockers or pedestrians in the game? Then this mod is just right for you! With this mod, your Twitch viewers can appear in the game.
- Requirements
- Permissions and credits
- Changelogs
Found any bugs? Then join the Discord below to report them!
Do you still have ideas that are not already being planned? Join the discord below!
CHECK THE FAQ BELOW BEFORE ASKING QUESTIONS!
Before asking for help, make sure you read everything!
With v1.4.3 or higher the default key is F5
This is my very first mod i created for a unity game with BepInEx and my first mod on this platform. Hope you like it!
This mod adds the function that Twitch viewers can see themselves via a chat command, as a customer, cashier, customer helper, security guard, janitor, restocker or pedestrian in the game.
In addition, there is the possibility that viewers can talk to the streamer in the game!
Features
- UI that displays the profile image of the channel you are connected to and the main commands (or the custom commands you set in the config)
- Twitch users can use !visit in the chat to visit the streamer's supermarket
- In-game NPC with Twitch username above the head
- Twitch user is randomly selected from a queue
- Spawned Twitch users can talk to the streamer with !talk
- Talk message queue (more info below)
- Viewers can become customers, cashiers, customer helper, security guard, janitor, restockers or pedestrians
- Set custom commands for the default commands
- Set permissions for commands to allow only for specific groups e.g. subs, vips, mods, etc.
- Use Bits as !talk command and set the minimum Bits amount in the config
- Use specific amount of Subgifts, specific amount of resub month or new subs to enter a queue for cashier, customer helper, security guard, janitor or restocker names
- Pick a new name for your cashiers, customer helpers, security guards, janitors and restockers on the computer in the Hiring tab (No need to hire and fire them)
- Save system -> restockers, customer helpers, security guards, janitors and cashiers keep their name if they had one the last time you played
- Configuration file with many settings to customize the game experience to your liking
- Localization for the following languages: en, de, fr, pl, it, es, pt, tr, ru
- Ingame version checker to inform you when an update is available
- VOTING System (more info below)
- Small Streamer Feature (more info below)
Commands
!visit - the default command for your twitch viewers to put them in the Twitch Customers queue
- User in this queue get picked randomly as customer, cashier, customer helper, security guard, janitor, restocker or pedestrian (enabled in the config by default)
!talk <text> - the default command for your spawned twitch viewers to talk with your ingame.
- Users must be spawned as customer to use this command
- By default only customer can talk ingame (enabled thsi command for cashier, customer helper, security guard, janitor, restocker and pedestrian in the config)
!leave - the default command for your twitch viewers to leave the Twitch Customers queue
- Only not spawned viewers can leave the queue
- This command is disabled by default in the config
Moderation
Twitch moderators can delete a !talk command in the chat to remove the message ingame.
Below are some more moderation options:
Moderation Commands (NEW with 1.4.0)
Add custom commands for all the commands below in the BepInEx/config/TwitchModeration.cfg file.
- !smblock <username> - Blocks a user from using any feature of the mod
- !smblockvisit <username> - Blocks a user from using !visit
- !smblocktalk <username> - Blocks a user from using !talk
- !smunblock <username> - Unblocks a user from using any feature of the mod
- !smunblockvisit <username> - Unblocks a user from using !visit
- !smunblocktalk <username> - Unblocks a user from using !talk
- !smremove <username> - Removes the user from the queue and removes the npc, when already spawned (customers and pedestrians ONLY)
Talk Message Queue (NEW with 1.4.0)
This feature is disabled by default in the config. Enable it in the BepInEx/config/TwitchIntegration.cfg under [Twitch General Options] -> Talk message queue = false and set it to true
When a user is in the Twitch Customers queue and uses !talk <message> when this feature is enabled, the message will be added to a new talk message queue.
When the users spawns as a customer and enters the store, the queued message will be displayed above the npc.
When a user uses !talk and a message is already queued, the old message will be replaced with the new one.
Moderators can delete the !talk message to remove them from the talk message queue.
When a user is already in the store, the talk message will be displayed directly.
Twitch Voting System (NEW with 1.4.0)
With the new voting system, your Twitch viewers can finally have a say!
What exactly your viewers can decide and what the maximum effects are can be set according to your preferences.
But how exactly does it work?
It's basically quite simple: A voting can appear at the start of a new day. When you load a savegame, the first voting will appear after the minimum number of days specified in the config.
The next voting will then appear randomly, between the minimum and maximum days specified in the config.
There are currently 6 different votings, but they can be longer or shorter each time.
There are the following types:
Shorter opening hours
Your viewers can decide whether your store should close earlier today.
The number of hours that the store closes earlier is chosen at random.
The maximum hours can be set in the config.
More customers or fewer customers:
Your viewers can decide whether more or fewer customers visit your store.
The percentage of more or fewer customers visiting your store is chosen at random.
The maximum percentage can be set in the config.
Discount on the computer shopping cart: (Only 1 day)
Your viewers can decide whether you receive a discount when buying new products on the computer for 1 day.
The percentage of the discount you receive in the shopping cart on the computer is chosen randomly.
The maximum percentage discount can be set in the config.
Deactivate restockers: (Only 1 day)
Your viewers can decide whether the replenishers are deactivated for 1 day.
Calculate change yourself: (Only 1 day)
Your viewers can decide whether you should calculate the change for 1 day at the cash register yourself.
Some effects of a voting can only last for 1 day, others can last for several in-game days.
The maximum ingame days that a voting effect can last can be set in the config.
The voting time can also be set in the config at BepInEx/config/TwitchVoting.cfg
Are you a small streamer? (NEW with 1.4.0)
There is a new setting in the BepInEx/config/TwitchIntegration.cfg
Small Streamer = false
If this is set to true, the names from all text files will be selected even if specific [Twitch NPC] options are disabled (set to false)
[Twitch NPC] options are for the normal queue.
After enabling the Small Streamer setting, start the game to generate the following files:
You will find 4 new text files under BepInEx\config\TwitchIntegration\data
The customers.txt in which you can enter names that should be selected as customers if no one is in the queue.
The cashiers.txt in which you can add names to be selected as cashiers if there is no one in the queue.
The restockers.txt in which you can enter names to be selected as restockers if there is no one in the queue.
The customer_helpers.txt in which you can enter names to be selected as customer helper if there is no one in the queue.
The security_guards.txt in which you can enter names to be selected as security guard if there is no one in the queue.
The janitors.txt in which you can enter names to be selected as janitor if there is no one in the queue.
The pedestrians.txt in which you can enter names to be selected as pedestrians if there is no one in the queue.
How to edit the text files?
Open each file with your normal text editor.
Each username must be on a separate line, as each line represents the username. This applies to every text file
How can we disable certain Twitch NPCs?
Leave the specific text files for that npcs empty.
Important: If a username is in several text files, it can only be spawned once. The usernames are selected randomly and the spawned usernames are saved for the current day and reset on a new day.
The usernames in the text file are ignored if the username is already in the normal queue!
Feature Ideas (not final and only ideas!)
- Twitch viewer can choose products they want to shop with the !visit command
- Other platform integration like YouTube, TikTok, etc.
Installation
- Install Tobey's BepInEx x MelonLoader Pack for Supermarket Simulator
- Download Twitchmarket - Twitch Integration from the Files tab or the MANUAL Download Button on the top right
- Unpack Twitchmarket - Twitch Integration into BepInEx/Plugins (should just be a single .dll file)
- Start the game to generate the config file and close the game
- Edit the config file to connect to twtich (see How to Connect to Twitch? section below)
Check this video from satsu2cents for a detailed installtion:
Thanks for making this tutorial!
How to connect to Twitch?
1. Open the BepInEx/config/TwitchIntegration.cfg file with any editor
2. Search the [Twitch Auth] section
3. Put in your Twitch username at User = REPLACE (REPLACE should be replaced with your username)
4. Put in your Twitch channel name at Channel = REPLACE (REPLACE should be replaced with your channel name)
- The Channel name is basically your Twitch username or the username of another channel you want to connect to
5. Put in your Twitch OAuth token at OAuth = REPLACE (REPLACE should be replaced with your OAuth token)
- Click on/Go to the link in the config and generate an OAuth token. (https://letsi.github.io/Twitchmarket)
- Then copy the whole OAuth token (with oauth:) and paste it into the config.
- DON'T SHOW IT TO ANYONE
6. Save the config file and start the game
7. Load a savegame or start a new game.
- If you see Twitch connected at the top of the screen, then you have set everything up correctly.
- If it says that no OAuth Token was found or that you are disconnected, then repeat the steps again and generate a new OAuth token.
FAQ
Game is not connecting to Twitch. What should i do?
- Check your config that the OAuth token is correctly entered with the the format oauth:TOKEN and NOT only the TOKEN
- Is the channel name and user name correctly entered? Check for typos
The mod is not compatible with another mod. Can you check this?
- Yes i can check this, tell me on the discord.
Can you add X feature?
- Join the discord and tell me your idea!
The names are visible twice. Can you fix this?
- You need to set the FOV to 60 in the options. Thats the default value of the game.
- Or remove the Custom field of view (FOV) mod, that changes the FOV to higher than the default 60
Can you speak other languages?
- Yes, german! Wenn das für dich einfacher ist, schreib gerne in Deutsch!
My question is not on the FAQ!
- Join the discord below and ask it there. Hope i can give you an answer.
The overlay freezes after some time! What should i do?
- Refresh the connection with the F5 key or set a custom key in the TwitchIntegration.cfg
Please join the Modded Supermarket Simulator (Unofficial) discord if you have suggestions or report bugs.