You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,11 @@ A Python exe for integrating Streamlabs and any game supporting Rcon. It receive
6
6
At present only really tested with Twitch, but should work with mixer and youtube based on API spec. The tool runs fully on your pc removing any risk of sharing access keys or donators details.
7
7
8
8
9
+
9
10
Installation & Usage
10
11
==========
11
12
1. Install the current release of Python 3.7 with default options: https://www.python.org/downloads
12
-
2. Get the [latest version zip](https://github.com/muppet9010/Streamlabs-Rcon-Integration).
13
+
2. Get the exe from the [latest version zip](https://github.com/muppet9010/Streamlabs-Rcon-Integration).
13
14
3. Create a free account at [Currency Layer website](https://currencylayer.com) and make a note of the API access key as needs to be entered in to the programs config later on.
14
15
4. Unzip the files in to the desired folder.
15
16
5. Open config.json in a text editor and add in your details.
@@ -22,6 +23,7 @@ Should a critical error occur the program may fail to load or close. Details can
22
23
Note: on clicking `Start` the program checks the RCON connection. If a Factorio server has been paused by a player then the RCON command will never respond and the application will freeze. Make sure that Factorio hasn't been paused by a player when clicking to `Start`. A server with 0 players on is not in this state.
23
24
24
25
26
+
25
27
Program Execution Concepts
26
28
========
27
29
@@ -47,21 +49,43 @@ Additional profiles can be created within the Profiles folder following the samp
47
49
After configuring the application it is advised to run it and use the Streamlabs Test Widget option to send test events and confirm it behaves as you expect.
48
50
49
51
52
+
53
+
Testing Notes
54
+
=============
55
+
56
+
There is a crude event testing option at the bottom of the app. It will fake Streamlabs events to the program, allowing testing of reactions. It is often useful to enable the `Rcon No Commands` config option to allow testing by pritning the rcon commands rather than running them.
57
+
58
+
Each platform and event type will dictate if the input fields are enabled/utilised or not. These fields control specific attributes of the faked events.
59
+
60
+
- Event Value - The raw value passed in to the event. This can be a whole number (int) or decimal (float) and used by most events. For donations and pledges it will be the USD value, the number of bits or the type of subscription (1000, 2000, 3000).
61
+
- Quantity - The quantity of the event. This must be a whole positive number when used. For Mystery Gift Subscriptions this is how many subscriptions are being gifted.
62
+
- Payload Count - The number of viewers events contained within this Streamlabs API call. This is to simulate Streamlabs habit of bundlign multiple events of the same type togeather if they happen at the same time. i.e. if 2 viewers both follow at once you will get 1 Streamlabs API call with 2 payloads (events) within it. This is invisble from the reactions as each event is handled seperately, but included for developer testing, so leave as default value of `1`.
63
+
64
+
65
+
66
+
Profram Config Notes
67
+
============
68
+
69
+
The program has a `config.json` that stores its global configruation. The settigns in here that require additional details are:
70
+
71
+
-`Rcon No Commands` - When enabled it prints the RCON commands to the activity window rather than sending them. It also skips the RCON connection test which the Start button is clicked within the app. In effect not doing any RCON commands.
72
+
73
+
74
+
50
75
Creating Profiles Notes
51
76
========
52
77
53
78
Profile configuration files must be created with knowledge of quote escaping. The profile file is in the JSON syntax and so all text strings must be wrapped in double quotes `"` within it. If you want to use a duoble quote within a text string it must be escaped with a back slash `\`. Single quotes can be used fine within a JSON string and are advised for this reason. Data attributes will be made safe by the program; with any single or doube quotes either being removed by Python automatically or escaped with a backslash before being used as part of an rcon command. If you require a single or double quote to be recieved by Rcon escaped then you must escape it with 2 back slashes `\\'`. See the `Factorio - Advanced Usage Example.json` for examples of the some of these combinations.
54
79
55
80
Manipulator script's are special in that they support raw python code that will be executed within a Python exec() function in addition to a python expression that is executed within a Python eval() function. The event handler will try to eval() the manipulator script first and should it error then try to exec() the manipulator script. As the manipulator script is supplied via the profile JSON file it must be in a single line format with `\n` for the line breaks. The Python maths module is included within the execution environment. The local variable `calcValue` is passed out of the exec environment as the value of `CALCVALUE`. See the `Factorio - Advanced Usage Example.json` for examples of the some of these combinations.
56
81
57
-
The config has a `Rcon No Commands` option. When enabled it prints the RCON commands to the activity window rather than sending them. It also skips the RCON connection test which the Start button is clicked within the app. In effect not doing any RCON commands.
58
-
59
82
Profiles can have `options` specified for them to control specific program behavior:
60
83
- twitchMysterSubGiftMode = when Twitch Subscription Mystery Gifts are given out by a viewer to random other viewers the event can either be reacted to for the donator or receiver. The programs default is the `donator` value if the setting isn't specified in the profile's options. The `money` valyeType will obey this setting and the other event type won't be triggered for Twitch Subscription Mystery Gifts to avoid duplicate reactions.
61
84
-`donator` - react to it as one large donation using the `subMysteryGift` event reaction.
62
85
-`receiver` - react to each viewer getting the gifted subscription using the `subscriptionGift` event reaction.
63
86
64
87
88
+
65
89
Development Building
66
90
=============
67
91
Uses the python modules and their dependcies:
@@ -71,4 +95,6 @@ Uses the python modules and their dependcies:
Build the scripts into an exe using PyInstaller via Build.bat. It will place the exe and other files in the `build\dist` folder. This `dist` folder is the program and can be shared via zip.
98
+
It can either be built or run directly from a Python environment via the `Streamlabs Rcon Integration.py`.
99
+
100
+
To build the scripts into an exe use PyInstaller via `Build.bat`. It will place the exe and other config files in the `build\dist` folder. This `dist` folder is the program and can be shared via zip.
0 commit comments