#################
Info
#################
Description: Automatic OBS Scene Switcher for the Game StarCraft II
Created by: 
Brain - www.twitch.tv/wellbrained
Burny - www.twitch.tv/burnysc2
Version: 1.0.4


################
Installation of the SC2 SceneSwitcher
################
Before you can start using the SceneSwitcher you need to install the OBS Websocket plugin and connect Chatbot to OBS.

### OBS Websocket Plugin ###

You will find a button in the "Configuration (+Dual PC)" section which opens the website where you can download it.

Afterwards start your OBS Studio and you'll find the new menu under "Tools > Websocket server settings".
Make sure it's enabled and enter your own password. 

### Connect Chatbot to OBS ###

Go back to SL Chatbot and click the "person icon" bottom left to get to the "Connections" window.
Select the "OBS Remote" section and type in the same password as in the OBS websocket settings and hit "Connect".

If it worked your connect button will be disabled and the Disconnect button will be active. Also windows will give you a notification that OBS got connected.


################
Usage of the SC2 SceneSwitcher
################
The first three textfilds represent the OBS scenes which you want to use. 
IMPORTANT: Those are case-sensitive so make sure to write it the same way as in OBS!!!

Per default OBS will switch to the "In Game" scene when the game started. If you want to rather have OBS switch already at the beginning of the loading screen then enable the "Switch scene at Loading Screen" checkbox.

If you have seperate Scenes in OBS when you cast games enable the "Enable Casting Mode" checkbox so the script will use the additional three scenes below.


#################
Setting up Dual PC usage
#################
Go to your "Blizzard Battle.Net Launcher" and then "Options > Game Settings". 
Scroll down until you are at the "StarCraft II" section and enable the "Additional command line arguments" checkbox.
A new textfield will appear where you enter "-clientapi 8080" while '8080' will be the port you are using.

Now you need to find out the your internal ip of the gaming pc. Open the commandline (cmd) on your gaming pc and type "ipconfig" and hit Enter.
In most cases the IP will look like this: 192.168.0.XX.

Go back to the Chatbot and go to the "Configuration (+Dual PC)" section and enter your IP:Port in the "Gaming PC IP:Port" field.
Example in this case: 192.168.0.XX:8080

IMPORTANT: Please do not write anything else in there or it will not work. Means no '/' or 'http://' or whatever.


################
General Installation of Scripts
################
Download the current Streamlabs Chatbot version: https://streamlabs.com/chatbot

Download and install Python 2.7.13 since that's needed for Chatbot and the Script features: 
https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi 

Open the SL Chatbot and go to the "Scripts" tab in the left sidebar.
Click on the cogwheel in the top right and set your Python directory to the `Lib` folder where you installed Python 
(By default it should be `C:\Python27\Lib`).

Click the 'Import' button top right in the "Scripts" tab and select the .zip file you downloaded. It will automatically install the script and move the files into the correct directory.

Afterwards the list of scripts get reloaded and you can start configuring those.


###############
Version History
###############
1.0.4:
  ~ Added the "Open readme" button
  ~ Added a button to download the OBS websocket plugin
  ~ Replaced the "Enable loading at Loading Screen" checkbox with a combobox to choose the Switch Method
  ~ Fixed the usage of the IP:Port field (Also configuration necessary in the BattleNet launcher)
  ~ Rework on the Readme file to make it more easy to use and understand

1.0.3:
  ~ Added checkbox to be able to choose if "in game"-scene is loaded during loading screen or only when the game actually starts 
  ~ Removed Enable OBS Scene Switcher checkbox
  ~ Added an option to enter the IP of your gaming pc for a dual pc setup (if Chatbot is on the streaming pc)
  
1.0.2:
  ~ Using multithreading now, because it seemed the script slowed down Ankhbot a lot - fixed!
  ~ Necessary changes since AnkhBot became Streamlabs Chatbot

1.0.1:
 ~ Compatibility with the new AnkhBot version

1.0.0:
  ~ First Release version

###############
(c) Copyright
###############
Brain - www.twitch.tv/wellbrained
Burny - www.twitch.tv/burnysc2
All rights reserved. You may edit the files for personal use only.
