Resource icon

Sonic Robo Chat 2 1.3.2

wired-aunt

teeing off
oakreef submitted a new resource:

Sonic Robo Chat 2 - SRB2 Twitch chat control

Welcome to Sonic Robo Chat 2, a Twitch chat control system for Sonic Robo Blast 2. This consists of two parts: An addon for SRB2 itself and a Twitch bot written in Python. The bot is a simple enough Python script but is command line only. It doesn't have any kind of graphical user interface. When combined and set up correctly these will allow you to stream SRB2 on Twitch and allow chat to control aspects of the game.

Included chat commands include the ability to change the player's...

Read more about this resource...
 
Due to the nature of this addon, we cannot properly verify its usability personally. However, with the footage we've seen, we feel it is acceptable to pass it for releases, but users should report any and all problems to this topic when encountering them.
 
It's a bit late where I'm at right now, but as the guy who mainly streams SRB2...

I have no words to describe how happy I am to finally see this idea realized. Will drop a review once I give it some rigorous field testing. :)
Post automatically merged:

A bug I forgot to note in the review I left; The music command works, but has a bug where if someone enters a longer lump name (something like RVZALT) and then a second person enters a shorter one (say, GFZ1), the command tries to play a lump named GFZ1LT.
 
Last edited:
oakreef updated Sonic Robo Chat 2 with a new update entry:

Spawn system improvements and names instead of ID numbers for objects and sound effects

This changes how items are spawned. The most important result of this change is that monitors should no longer instantly crush the player to death when spawned.

As well as that objects and sound effects can how be specified by name rather than just ID number. "!obj RedSpring" and "!sfx alarm" should do what you expect. You need to update both the WAD and the Python client for this to take effect as the previous version of the client checked to make sure a number was specified instead of a name.

Read the rest of this update entry...
Post automatically merged:

It's a bit late where I'm at right now, but as the guy who mainly streams SRB2...

I have no words to describe how happy I am to finally see this idea realized. Will drop a review once I give it some rigorous field testing. :)
Post automatically merged:

A bug I forgot to note in the review I left; The music command works, but has a bug where if someone enters a longer lump name (something like RVZALT) and then a second person enters a shorter one (say, GFZ1), the command tries to play a lump named GFZ1LT.
Thank you for the feedback!

I think I have fixed the instant death monitor issue. It's something I thought I'd fixed before but I think I've finally properly fixed it this time. I rewrote a lot of what the object spawn code was doing. Object spawning will behave slightly differently now but you should no longer be killed by people trying to help you.

I must thank you for asking about supporting custom sound effects as that set me down a line of thinking that made me realise I can get both sound effect playing and object spawning working by name as well as by ID, which is much more friendly to use. Commands like "!obj RedSpring" and "!sfx alarm" should work now.

The issue with the music track names seems to be a bug in SRB2's Lua interpreter. I'm changing the music by altering the mapmusname, which defines a level's default music. This is so things like music playing from something like getting a life don't interrupt the track played and just send it back to the normal level music afterwards. But when it copies the string over it doesn't overwrite the full string properly. I brought up the issue on a Discord server I'm in and someone there who knows C opened a pull request to fix it on the SRB2 Github page. I might rethink how to do the music system for now while that gets fixed but I haven't changed it yet in this update. Ignoring that issue, it should already work with custom music added by addons.

I also did some testing and it looks like subscriber only commands were working correctly for me. If you post your configuration (without the oauth token!) I could try to spot anything wrong with it.
 
Last edited:
POOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOG

TWITCH CHAT X SRB2!!!
Post automatically merged:

Also how do i use it?
 
POOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOG

TWITCH CHAT X SRB2!!!
Post automatically merged:

Also how do i use it?
There's a lot of steps involved in setting up your Twitch account for it and configuring and running Python for the bot so I didn't include the instructions in the post itself but there is a readme in the download for the bot or on the Github page for it.
 
Did a bit more field testing and found another bug; If a boss is spawned in using the 'obj' command in a boss map, upon dying and loading back in said spawned boss will keep whatever health they had (and if the boss has been defeated they'll get revived and be invincible)

I'm also curious if netplay is supported within any capacity?
 
Finally

SRB2 vs. Chat has come to reality

for Twitch for now

Someday, YouTube support becomes possible in the future
 
oakreef updated Sonic Robo Chat 2 with a new update entry:

1.3 - Object respawn behaviour, music system and text alignment


This update is based on @Icezer's feedback and from watching his streams. I've fixed some bosses getting respawned with 0 health and entering into a buggy state when the player dies. There's a new config option to let you customise or disable how objects respawn when the player dies and restarts from a checkpoint. I simplified the music changing command to make it work properly for short track names now but the downside is that if a track gets interrupted by the extra life jingle or similar then it will revert back to the normal level music afterwards instead of the track that was playing. I also fixed some issues with the alignment of labels on spawned objects on different aspect ratios and fields of view.

On the question of supporting netplay: It absolutely doesn't work and I don't think I can support it with the current way commands are read in from a text file. I think I could possibly getting it working on Linux with netplay by having the game itself launch through the bot client and have it feed in console commands, but due to the different way the console works on Windows doing it that way would be impossible with the Windows version, which is what most people play. It would also require a big rewrite of the mod that I'm not sure I want to try right now.
 
Last edited:
On the question of supporting netplay: It absolutely doesn't work and I don't think I can support it with the current way commands are read in from a text file. I think I could possibly getting it working on Linux with netplay by having the game itself launch through the bot client and have it feed in console commands, but due to the different way the console works on Windows doing it that way would be impossible with the Windows version, which is what most people play. It would also require a big rewrite of the mod that I'm not sure I want to try right now.
Personally I would take the route of having it run for each player within the server. So let's say someone in chat does something like !badnik, this would spawn a badnik in front of the player, but for each player and not just the streamer (so if used in THZ, one person would get a buzzer while another would get a springshell, or something to that effect.) This is just a suggestion however, and might not be too practical for every scenario.
 
Wanted to test it but don't work.
How to run python3 script on Windows? I didn't find any solution that work.
Yes "python3 sonic-robo-chat.py" do absolutely nothing, like any script run from python3. And the standard python command throw lot of errors.

Fresh Python 3.10 install(but still installed the libraries) on Windows 10.
 
I can try to help but I need more details. Are you trying to run it in an ordinary command prompt? Is there any output or error of any kind? A screenshot of what happens when you run it would be helpful.
 
On Windows 10 cmd.exe in the directory of the script:

python3 sonic-robo-chat.py : Absolutely nothing happens(as in it print nothing at all)
python sonic-robo-chat.py : Yaml throw a bunch of errors at the yaml.load call
py -3 : Same as for python(yaml throw a bunch of errors)

Wait, it was because the SRB2 path was badly formatted(backslash wasn't doubled). Now it throw websocket errors from twitchio
raise WSConnectionFailure(f'Websocket connection failure:\n\n{self._last_exec}')
twitchio.errors.WSConnectionFailure: Websocket connection failure: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary During handling of the above exception, another exception occurred:
 
Last edited:
I'm not sure why that would happen. I'm checking through the script and I think every situation where it can't run because things aren't configured or it can't find a file, etc should write an error message before exiting. My only guess is perhaps something is going wrong with the YAML parsing and it's getting stuck? You could check that the config you made in config.yaml file are valid and don't contain errors using this website.
 
I think an update in Python 3.10 may have broken something but I'm having trouble getting Pip working with Python 3.10 to test it with. I'll try to get this fixed but in the mean time you could try to downgrading to Python 3.9 and seeing if that works for you. Sorry about this!
 
Just as an update it looks like the library I used for the bot has had a bit of an overhaul and it looks like I need to rewrite the bot to get it working with Python 3.10. It's not a hugely complicated script so it shouldn't take too long but I am busy at the moment. I just need to find an hour or two for it.

Also apologies for not reading your messages very carefully on Saturday I was actually hungover.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top