Warcraft II Forum

Warcraft II => Server.War2.ru => Topic started by: Mistral on January 09, 2021, 03:54:15 AM

Title: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on January 09, 2021, 03:54:15 AM
So i just created plugin that receives messages and shows them in war2 game chat.
And after that that i created prog that reads some twitch channel chat and resends messages to war2.
+new update: now reads when you send something in game chat and resend this on twitch. So you can not just read but write answers too.
Works in singleplayer and multiplayer.
So this thing can be useful for people who stream war2.

Last version can be found there: https://github.com/Mistral-war2ru/War2Streaming/releases (https://github.com/Mistral-war2ru/War2Streaming/releases)
archive have plugin+program

Source code:
https://github.com/Mistral-war2ru/War2Twitch (https://github.com/Mistral-war2ru/War2Twitch)

video: www. youtube .com/watch?v=0O1vXNFHt5I
(links to video is broken on forum so copy and remove spaces)

p.s. you can get twitch auth here: https://twitchapps.com/tmi/ (https://twitchapps.com/tmi/) but i think all people who really stream know about this.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Rareskills on January 09, 2021, 10:56:02 PM
Seems pretty neat... @Szwagier any interest in trying?
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Szwagier on January 10, 2021, 09:18:51 AM
looks fine, I will try but It cant be problem if viewers will spam XD

also If i write message will go to twtich? what about emotes?
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: dannyldd on January 10, 2021, 10:41:02 AM
looks fine, I will try but It cant be problem if viewers will spam XD

also If i write message will go to twtich? what about emotes?

I have tested it, just works perfectly. Emotes won't be sent because of course War2 engine doesn't allow to draw twitch icons, but if you type the correct icon-name from Warcraft 2, then it will be displayed on twitch. It's rather cool if you don't have microphone to be used. Cheats appear on twitch as well. Not sure if this works for multiplayer though.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on January 10, 2021, 12:47:43 PM
So i put new version of prog just now, so you can redownload.
now it checks if you actually normally joined twitch channel or not )) (should at least)
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Szwagier on January 10, 2021, 06:35:32 PM
ok it work now, but hmm.. it can be problem if player get so many message, I dont think so it will be good, also If i will be in lobby message will be show after game start

when someone will spam emotes "szwagiWind" I will get spam "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind" "szwagiWind"

Can you disable emotes?
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on January 10, 2021, 07:55:21 PM
Well yea some spam problem.
I dnt know what to do with this so need your ideas) for now beta version i just tried to make so that it just works at least) so first step is ok as it is works now

So ok i will try find a way to disable emotes. Any other ideas? Maybe slow speed of sending msgs to war2? Cause now prog remembers all msgs it saw in a stack and waiting when some war2 can receive them then sends 1 by 1 but very fast still.

And for now there was 2 checkboxs in prog. First one chek can be disabled if you not want to msgs be send to war2. But y still can write back.
I mean for example you himself CAN see chat somewhere else, not in game, but to write back you need alt tab so this will help you to send awnswers without alt+tab.)))
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: {Lance} on January 11, 2021, 03:04:56 PM
What was this needed for anyway?  If you've ever seen any of my War2 streams from the past 6yrs,  you'd notice that they all have this functionality and thats without modifying anything in war2.  It's just a simple mIRC chat bot that will read msgs and play them back with a voice (txt2speech) and I would just reply to messages using voice.  This was all very easy since IRC is the engine that twitch uses.  I stopped doing it though because idiots like Tupac would just come in and spam the channel with absurd shit and the bot would just keep talking until I disabled it with the hotkey.  If you find a workaround for that other than rate limiting msgs from based on some rules,  I'd like to hear what it is.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: dannyldd on January 11, 2021, 03:42:04 PM
What was this needed for anyway?  If you've ever seen any of my War2 streams from the past 6yrs,  you'd notice that they all have this functionality and thats without modifying anything in war2.  It's just a simple mIRC chat bot that will read msgs and play them back with a voice (txt2speech) and I would just reply to messages using voice.  This was all very easy since IRC is the engine that twitch uses.  I stopped doing it though because idiots like Tupac would just come in and spam the channel with absurd shit and the bot would just keep talking until I disabled it with the hotkey.  If you find a workaround for that other than rate limiting msgs from based on some rules,  I'd like to hear what it is.

Did you ever make public this functionality that you just mentioned ?
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: {Lance} on January 11, 2021, 07:38:01 PM
I didnt have to make it public,  it's common knowledge for all twitch users :D  Havent you ever wondered how pro streamers could answer chats AND play an intense battle at the SAME time?  They arent reading those comments lol,  they are being read to them via an IRC text2speech bot :)  I like having the voice output to the stream also since the chat isnt in the video itself.  Similar to how a lot of streamers will add a chat box somewhere on their stream.  The result was that as I was playing,  people watching the stream would hear it also.  Thus prompting some idiots to spam the damn thing heh.  I never bothered to put any effort into looking for a good IRC spam moderation bot.

IRC is one of the features that sets Twitch apart from the rest of the crowd and has made it so popular.  I dont know of a single twitch steamer that actually uses the Twitch chat UI,  they all use mIRC (except for the anonymous users/watchers).  IDK,  maybe that trend has changed since?  But I doubt it.  When I was streaming,  all I would do is just open up mIRC and that was all I had to do.  I could then interact with twitch users from within War2 using Full screen without the need for a 2nd monitor and without taking up any screen realestate within war2 itself.

Here are the docs that show you how to connect to a twitch channel via IRC:  https://dev.twitch.tv/docs/irc/guide  And if you dig around you can find videos on how to do it also.  Many of the pro streamers will have a link to such a video somewhere in their profiles.

Any kind of chat content moderation on twitch is going to be done via an IRC bot.  Including spam.  So there really shouldnt be any need to do any wheel re-invention for cleaning up spam on Twitch.  So now you have all the information you need.  Go forth and findeth a good chat spam bot and maybe I'll stream some more again lol.  I just have no interest in spending the time to do that myself.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Rareskills on January 11, 2021, 10:33:16 PM
For some that don't use mic it allows them to respond in game. So on U8s stream today he would put in a message during a game ( to 'no one') and it would show up on twitch ..so he doesn't have to pan to twitch screen to type during game....it may has some use cases
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: {Lance} on January 12, 2021, 12:27:41 AM
When I didnt have a mic,  I would simply start a chat msg and then just never actually send it.  People in the twitch chat would see it as they are watching.  I guess the only difference would be that an actual msg sent back to twitch IRC would arrive a few seconds before a msg they read in the game screen.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: dannyldd on January 12, 2021, 01:58:04 AM
I didnt have to make it public,  it's common knowledge for all twitch users :D  Havent you ever wondered how pro streamers could answer chats AND play an intense battle at the SAME time?  They arent reading those comments lol,  they are being read to them via an IRC text2speech bot :)  I like having the voice output to the stream also since the chat isnt in the video itself.  Similar to how a lot of streamers will add a chat box somewhere on their stream.  The result was that as I was playing,  people watching the stream would hear it also.  Thus prompting some idiots to spam the damn thing heh.  I never bothered to put any effort into looking for a good IRC spam moderation bot.

IRC is one of the features that sets Twitch apart from the rest of the crowd and has made it so popular.  I dont know of a single twitch steamer that actually uses the Twitch chat UI,  they all use mIRC (except for the anonymous users/watchers).  IDK,  maybe that trend has changed since?  But I doubt it.  When I was streaming,  all I would do is just open up mIRC and that was all I had to do.  I could then interact with twitch users from within War2 using Full screen without the need for a 2nd monitor and without taking up any screen realestate within war2 itself.

Here are the docs that show you how to connect to a twitch channel via IRC:  https://dev.twitch.tv/docs/irc/guide  And if you dig around you can find videos on how to do it also.  Many of the pro streamers will have a link to such a video somewhere in their profiles.

Any kind of chat content moderation on twitch is going to be done via an IRC bot.  Including spam.  So there really shouldnt be any need to do any wheel re-invention for cleaning up spam on Twitch.  So now you have all the information you need.  Go forth and findeth a good chat spam bot and maybe I'll stream some more again lol.  I just have no interest in spending the time to do that myself.

I haven't wondered the first question you made because I haven't seen many streams in my life. Maybe like 10-15 over time but any others have been seen quite shortly. Either way I just have seen they use a second monitor to read comments while playing but never ever read something like you say about a text to speech bot. That's probably from your experience only. I just have one monitor though.

Also what's your stream ? Would like to see your stuff around, that may be nice.
But additionally, if you have this "text2speech" bot then wouldn't be an option too for you or anybody to answer via in-game as well ? I mean if you don't have a microphone to answer, this helps in that case as well. So if in your case you just hear the comments via bot, then Mistral could make a different version to just allow player answering-only via in-game to twitch people.

Another point is, nobody can understand english properly just like me so a bot like this wouldn't be the best solution, so the speech bot may only be useful to people have good or native english talking.. I definetely encourage solutions like this just to expand even further the possibilities you have around the game.

I really appreciate your shared information by the way.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: {Lance} on January 12, 2021, 04:35:17 PM
The percentage of fluent english speakers is probably about 95% in war2.  There are only a few here and there that dont speak/understand english well (mostly the russians).  And whether the english is spoken via voice or via text,  the end result is the same.  It's still in english.  If you have to use translators,  there are both voice AND text translator plugins available for chrome.  The language of a stream should never dictate the technology that the streamer uses (speech2text,  etc).  Also,  most streamers DISABLE the text2speech channel and their viewers never hear it.  My stream is different because I wanted to record what people were typing without putting a chatbox window in the video itself.  So text2speech is not something a 'watcher' would really be aware of in most streams.  Ask any pro gamer who is also a streamer and they'll probably tell you that they use text2speech rather than a separate monitor for the chat window.  It distracts from the game to much.  CASUAL streamers however,  they probably will use 2 screens because they arent playing competitively.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on April 11, 2021, 11:29:03 AM
Ok today is 11.04.2021
added last version with some bug fixes.
there was major bug with memory leaks so if someone used this program download new version pls. (program and plugin)
and this is will be last update i think. Because i added source code so u guys can make any modifications u want by themselves.

p.s. it was very happy to see that @Szwagier and @dannyldd used this like every stream. I think even if just 1 people using this - then it was worth of speding time creating it.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: dannyldd on April 12, 2021, 08:20:05 PM
@Mistral definetely, thanks for your time and effort into it my friend. You're an absolute genius to make it happening. Never though something like that would ever be possible.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on September 18, 2022, 04:41:19 AM
Updated to new version
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on June 24, 2023, 11:44:48 AM
updated new version
now its possible to select what units to draw names on
(https://forum.war2.ru/index.php?action=dlattach;topic=6128.0;attach=4423)
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: Mistral on July 21, 2023, 06:34:06 PM
released new version on git
fixed bug when draw names behind upper map border
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: 00Brett on January 09, 2024, 04:44:07 PM
I'm not sure if I am missing something or what, but it is not detecting my war2.exe (War2 process not found!) does this work with the HD version of war2?  I tried putting the c:\war2combat\warcraft_ii_hd.exe in the blank but still not having a ton of luck.  Not sure if I am doing it wrong, thanks in advance :)
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: 00Brett on January 09, 2024, 04:56:45 PM
Nevermind u8 to the rescue.  Just had to rename my HD exe to match the old original EXE.
Title: Re: Warcraft 2 Twitch integration plugin+program
Post by: chayliss on January 09, 2024, 07:51:48 PM
is there some dope ass layouts too?!?!

So i just created plugin that receives messages and shows them in war2 game chat.
And after that that i created prog that reads some twitch channel chat and resends messages to war2.
+new update: now reads when you send something in game chat and resend this on twitch. So you can not just read but write answers too.
Works in singleplayer and multiplayer.
So this thing can be useful for people who stream war2.

Last version can be found there: https://github.com/Mistral-war2ru/War2Streaming/releases (https://github.com/Mistral-war2ru/War2Streaming/releases)
archive have plugin+program

Source code:
https://github.com/Mistral-war2ru/War2Twitch (https://github.com/Mistral-war2ru/War2Twitch)

video: www. youtube .com/watch?v=0O1vXNFHt5I
(links to video is broken on forum so copy and remove spaces)

p.s. you can get twitch auth here: https://twitchapps.com/tmi/ (https://twitchapps.com/tmi/) but i think all people who really stream know about this.