I've been working on some fun things for my live streams on twitch!
Over the past could of days I've been working on adapting and improving a 'pokecatch' system that is used with streamer.bot and VNyan.
So ok. lets peddle back a bit here.
What is streamer.bot
Streamer.bot is a bot system for many live stream sites and chat sites. It's extremely versatile and supports a whole host of platforms.
I primarily use it for Twitch.tv, making it manage my channel point redeems and other automated events like Ad breaks and chat commands.
And what is Vnyan
Vnyan is the Vtuber software that I use to bring my avatar to life! A combination of face tracking, hand tracking via leapmotion controller are used to animate the avatar, The node graph system can be used to visually program a multitude of events and actions like enabled props from channel redeems or chat commands as one example.
And pokecatch?
PokeCatch is a system built across Vnyan and Streamer.bot that allows viewers of a stream on twitch.tv to redeem a catch via channel points to catch the streamers avatar with a pokeball. It has a chance to also be a shiny catch just like in Pokémon. Streamer.bot handles the redemption and shiny chance and keeping track of catch stats, while VNyan handles the visuals and catch chance.
This system was designed by a fellow streamer called Luposity as is available for free on his Ko-Fi
I've taken this system and over the last few days have been adapting and improving it to be more themed around PalWorld.
Improvement 1
Change the shiny catch from a chance on catch to being an event that visibly makes the avatar shiny and catching during this time results in a shiny catch. Additionally I'd be added another chance called alpha chance as Pals in Palworld can be shiny, alpha or both in some cases.
This one was pretty straight forward.. Not! Probably the more difficult improvement, I had the battle with managed various timers and working out some edge cases where you can catch and suddenly the alpha would proc and mess the animation up.
It was only a few hours ago while complaining about this edge case on my discord that I realised the solution.. Disable the shiny check timer while I'm processing a catch and re-enable it when I'm finished effectively resetting the timer.
The completely fixed my issue as well as many other time based issues as I'm working with 2 programs that each do their own thing.
BTW Did I mention that the animation for turning into alpha form is the super mario bros growth animation when eating a mushroom.
This is the mass of nodes I used in VNyan to make that happen!
I posted a video on bluesky of it if you want to see what it looks like! Linked below!
https://bsky.app/profile/shmoogleosukami.co.uk/post/3lfztjxnvcc2e
Alternatively I now have a 3speak video up as well.
Improvement 2
Moving the catch chance from Vnyan to streamer.bot.
This one was pretty simple once my brain started working.
The catch chance was basically done on collision of the pokeball in Vnyan and used the node graph to set it all up at a 10% chance.
This was a little tricky at first cause I absolutely needed to only check the catch chance if the ball physically hit my avatar.
So I had to make VNyan check for the collision and then set a websocket message to streamer.bot to then process the catch.
The actual course of event from redemption to catch is as follows:
- User Redeems catch.
- Streamer.bot catches this event and processes the redeem checking that all websocket connections are working and prepares some data, It then send a websocket message with the redeemers username to Vnyan
- Vnyan throws a pokeball and if it collides with the avatar it sends a websocket message back to streamer.bot with the username attached.
- Streamer.bot then processes the catch, It roles a chance to catch that is configurable on setup, if it succeeds it checks if the streamer is shiny, alpha or both and then sends a websocket back to VNyan to process the rest of the catch animation and also sends a message to chat that a catch was successful. It also resets and restarts the various timers that got disabled during the process for safeties sake
It now works as a minimum viable product!
It actually works! which is lovely.
But there is more that needs to be done, I need to handle how hype trains work, which is a special event that can happen on twitch streams. As well as some other features and tweaks. I also need to replace the pokemon assets with palworld ones.
I also need too lookout of any other edge cases where things go weird. So on my next few streams I'm going to be running the system as a test to see if I notice any oddities.
I've been making sure to make use of the initial setup and configurability luposity built into this to keep it a portable and usable system for others as well. It's made it a bit tricky as I've had to sit and think through how I want to do things as there are multiple ways and not all are equal. Some are actually just really bad. xD
Anyways you can expect more code chatter from me in the future as there are other streamer.bot based systems I'm designing to work with this system among others that I have yet to get started. I'm hoping to have a rather big and fun system of redeems to make my streams interactivity more fun.
Every vote helps to ensure HIVE is decentralised and secure! Please consider voting for me!