From b1a26d1ba213f3230099d2fee47b13856d0bcf94 Mon Sep 17 00:00:00 2001 From: ScriptedSnark <51358194+ScriptedSnark@users.noreply.github.com> Date: Sat, 16 Mar 2024 13:10:27 +0500 Subject: [PATCH] Some cleanup/bugfixes, README.md additions --- GSChaos.sln | 9 --------- GSChaos/CChaos.cpp | 7 ++++--- README.md | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/GSChaos.sln b/GSChaos.sln index aaf87edf..9bb0bdad 100644 --- a/GSChaos.sln +++ b/GSChaos.sln @@ -7,24 +7,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GSChaos", "GSChaos\GSChaos. EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|x64 = Release|x64 Release|x86 = Release|x86 - Retail|x64 = Retail|x64 Retail|x86 = Retail|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B711BD44-B111-4EE2-9445-111685C51B86}.Debug|x64.ActiveCfg = Debug|Win32 - {B711BD44-B111-4EE2-9445-111685C51B86}.Debug|x64.Build.0 = Debug|Win32 {B711BD44-B111-4EE2-9445-111685C51B86}.Debug|x86.ActiveCfg = Debug|Win32 {B711BD44-B111-4EE2-9445-111685C51B86}.Debug|x86.Build.0 = Debug|Win32 - {B711BD44-B111-4EE2-9445-111685C51B86}.Release|x64.ActiveCfg = Release|Win32 - {B711BD44-B111-4EE2-9445-111685C51B86}.Release|x64.Build.0 = Release|Win32 {B711BD44-B111-4EE2-9445-111685C51B86}.Release|x86.ActiveCfg = Release|Win32 {B711BD44-B111-4EE2-9445-111685C51B86}.Release|x86.Build.0 = Release|Win32 - {B711BD44-B111-4EE2-9445-111685C51B86}.Retail|x64.ActiveCfg = Release|Win32 - {B711BD44-B111-4EE2-9445-111685C51B86}.Retail|x64.Build.0 = Release|Win32 {B711BD44-B111-4EE2-9445-111685C51B86}.Retail|x86.ActiveCfg = Release|Win32 {B711BD44-B111-4EE2-9445-111685C51B86}.Retail|x86.Build.0 = Release|Win32 EndGlobalSection diff --git a/GSChaos/CChaos.cpp b/GSChaos/CChaos.cpp index 602f2358..66cc97ed 100644 --- a/GSChaos/CChaos.cpp +++ b/GSChaos/CChaos.cpp @@ -59,7 +59,7 @@ void CChaos::Init() chaos_effectname_ypos = pEngfuncs->pfnRegisterVariable("chaos_effectname_ypos", "0.0", 0); - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) { m_aiEffectsForVoting[i] = GetRandomEffect(0, gChaosFeatures.size() - 1); } @@ -375,7 +375,8 @@ void CChaos::Reset() void CChaos::Shutdown() { - twitch->Disconnect(); + if (twitch && twitch->status != TWITCH_DISCONNECTED) + twitch->Disconnect(); } void CChaos::PrintVersion() @@ -591,7 +592,7 @@ void CChaos::OnFrame(double time) InitVotingSystem(); - for (int i = 0; i < 2; i++) + for (int i = 0; i < 3; i++) { m_aiEffectsForVoting[i] = GetRandomEffect(0, gChaosFeatures.size() - 1); } diff --git a/README.md b/README.md index ac26c1d5..c827ecba 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,17 @@ Additional info: - `chaos_effectname_ypos` - sets position of effect name text by vertical (Y coord) ## Twitch voting integration (WIP) -Chaos Mod supports voting feature via Twitch chat. You can setup it by editing `chaos/twitch.ini`. Get your OAuth pass **[here](https://twitchapps.com/tmi/)**. -If you don't want to play with this feature, you can delete (or rename) `chaos/twitch.ini`. +GSChaos supports Twitch chat voting. If you want to use it, then do some steps: +1. Download [latest continuous release](https://github.com/ScriptedSnark/GSChaos/releases/tag/continuous) +2. Install it +3. Edit `chaos/twitch.ini`. It should have your [OAuth password](https://twitchapps.com/tmi/) and Twitch username +4. Add text element (GDI) to your OBS scene +5. Create file - `chaos/voting_progress.txt` +6. Pass a path of that file in text options +7. Run the game and check if everything is installed successfully (wait for 10 seconds in game after chaos bar activating so you can check voting system) + +To vote, you need to type `effectNUMBER` in chat (for example, `effect2`). +If you don't want to play with this feature, rename `twitch.ini` to `twitch_DISABLED.ini`. ## Effects ``` @@ -76,5 +85,6 @@ Special thanks to: - anewnick (a.k.a codque) for designing HUDs - SmileyAG for provided help about some aspects of hooking - BlueNightHawk for late precache system +- suXinjke for [Half-Payne](https://github.com/suXinjke/HalfPayne) - un4seen (a.k.a. yanny) for supporting/playtesting - Tankfird, StereoBucket, prolert, gatar and other people for suggesting effects, ideas