[0.4 BETA] TwitchyDoom - Streamer interaction!

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

Re: [0.2b BETA] TwitchyDoom - Streamer interaction!

Postby kevansevans » Fri Apr 23, 2021 2:03 pm

Cutmanmike wrote:Now if only there was a way to write data to a file to be read by another program...


Maybe setting a bunch of cvars? Not the most elegant solution, but strings are values that can be set and stored! The hurdle would be making an interpreter that can navigate the gzdoom.ini file. Getting proper support of writing data would definitely get shot down quickly for fear of people shipping mods with malicious code.
User avatar
kevansevans
Disciple of The Great God Imp
Spotlight Team
 
Joined: 05 Oct 2010
Github ID: kevansevans
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [0.2c BETA] TwitchyDoom - Streamer interaction!

Postby Cutmanmike » Fri Apr 23, 2021 2:20 pm

I don't think cvars are actually written to the ini until the game closes
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Re: [0.3 BETA] TwitchyDoom - Streamer interaction!

Postby Undead Zeratul » Fri Apr 30, 2021 4:48 pm

Well this will be fun once I can get it all set up...

I noticed it's leveraging Streamlabs' older Chatbot instead of Cloudbot, which doesn't seem to behave them same way (I assume because Cloudbot doesn't have access to your local files). This should work as long as the file is appended, right? I'm thinking of leveraging a bit of software called Touch Portal to do the file I/O that can be kicked off via events from Twitch such as chat messages or (what I intend to try) channel point redemptions.

I've been successful with getting the file updated but it doesn't seem to react in-game. Any suggestions how to proceed?

Edit: Well hey! I think I actually got something working while dicking around with it tonight... it took some messing around to understand how it's working, but I can redeem channel points and summon a squad of 4 random marine allies, hook into when I get raided and mass resurrect everything as well as summon 32 random former humans... I like this
User avatar
Undead Zeratul
 
Joined: 13 Mar 2021
Twitch ID: undead_zeratul
Github ID: UndeadZeratul
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: [0.3 BETA] TwitchyDoom - Streamer interaction!

Postby Cutmanmike » Sat May 01, 2021 3:46 am

Any extra information you can give me about setting up cloudbot or any other bots would be appreciated as my bot + twitch streamer knowledge is limited and I want to make it as accessible as possible.
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Re: [0.3 BETA] TwitchyDoom - Streamer interaction!

Postby Undead Zeratul » Sat May 01, 2021 8:30 am

Oh, sure!

The way I'm going with it doesn't use chat commands, but rather the 1st party Channel Points Twitch has set up, as I already integrated them with a few things in OBS and want to continue leveraging them. My solution involves a third party software called Touch Portal which acts as a Stream Deck, but can also hook into various events from Twitch once you connect it.

Essentially, Touch Portal's actions include a set of FileSystem I/O interactions, which itself includes appending to an existing file. So I just added an action to open the STREAM.txt file and append a "SpawnItem|Actor=HealthBonus,Effect=ItemFog|$twitch_last_channel_point_redeemer|$twitch_last_channel_point_message" (along with a newline). From there, I just add a button to my Stream Deck (my phone running the mobile app) and when I hit the button, the item gets spawned. I still have to test the channel point redemption live, but since I have infinite points, I can test it through OBS locally and it does seem to work as well. It's worth noting that Touch Portal DOES hook into chat messages so you could use it to make a chatbot, but I just chose not to go that route.

The thing I had to mess with and understand better was the fact that the number of lines in the file matters and can't be cleared out during gameplay, but once the game exits the file can be wiped just fine. I'm hoping to figure out how to automate that, as I'd rather not have that file grow potentially indefinitely without intervention.

Because the items spawn out of Line of Sight, it's sometimes hard to find the item (noclipping helps) and I've noticed it sometimes doesn't seem to fire at all? It's probably something on my end (I'm doing some more complex stuff with randomized logic and whatnot in Touch Portal so I'm not surprised).

I'm hoping to get hosts to spawn a friendly marine with a random weapon, raids to mass resurrect and summon a horde of former humans, among other stuff going this route.

Was there something in particular you were curious about, or did I answer your question? I can get some screenshots once I confirm all my stuff works live if that helps?
User avatar
Undead Zeratul
 
Joined: 13 Mar 2021
Twitch ID: undead_zeratul
Github ID: UndeadZeratul
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: [0.3 BETA] TwitchyDoom - Streamer interaction!

Postby Cutmanmike » Sat May 01, 2021 11:39 am

Undead Zeratul wrote:Because the items spawn out of Line of Sight, it's sometimes hard to find the item (noclipping helps) and I've noticed it sometimes doesn't seem to fire at all? It's probably something on my end (I'm doing some more complex stuff with randomized logic and whatnot in Touch Portal so I'm not surprised).


You could try the NoLOS=true parameter so they can spawn in line of sight, but they will still appear at a random spot. I'm also adding an optional parameter to show the item on the automap. Failing that, you could just use the GiveItem command instead to give it directly to the player.

Undead Zeratul wrote:Was there something in particular you were curious about, or did I answer your question? I can get some screenshots once I confirm all my stuff works live if that helps?


That's probably enough for me to try out at some point, thanks.
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Re: [0.3 BETA] TwitchyDoom - Streamer interaction!

Postby Captain J » Sun May 02, 2021 12:58 am

Never thought of making Doom Twitch-friendly and can be possible. This is very clever and surprising! But i do wonder if anyone tried this in Multiplayer aka Co-op Stream. Did they? It surely doesn't work on Zandronum though.
User avatar
Captain J
That's Amoreee
 
 
 
Joined: 02 Oct 2012
Location: A Year old Pizza Box
Discord: DiscussJ#3128

Re: [0.3 BETA] TwitchyDoom - Streamer interaction!

Postby Cutmanmike » Sun May 02, 2021 3:39 am

I haven't tested it but it should work.

I've updated to 0.4 which improves the random spawning of actors and adds some extra parameters such as showing the actors on the automap. There's also some basic settings in the option menus now too.
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Re: [0.4 BETA] TwitchyDoom - Streamer interaction!

Postby Netheritor » Sun May 02, 2021 8:06 am

I have a few ideas;

1. Give the ally monsters movement state. I know there is one where the ally don't teleport to player and teleport to player. Can you add the guard variant? Like monster as a sentry to allies and enemies alike? The monster in this state can be walk-through.

2. Is there nothing else for viewers to gain points except by watch time? Maybe make the points increase if streamer defeating monster?

3. Can you edit the title to include "twitch integrated / integration" or something like that? Just because I want this mod easily found in google search with those keywords.

Edit: One more question; Can this work with Zandronum?
Netheritor
 
Joined: 03 Dec 2019

Re: [0.2b BETA] TwitchyDoom - Streamer interaction!

Postby Rachael » Mon May 03, 2021 5:07 am

kevansevans wrote:
Cutmanmike wrote:Now if only there was a way to write data to a file to be read by another program...


Maybe setting a bunch of cvars? Not the most elegant solution, but strings are values that can be set and stored! The hurdle would be making an interpreter that can navigate the gzdoom.ini file. Getting proper support of writing data would definitely get shot down quickly for fear of people shipping mods with malicious code.

Cutmanmike wrote:I don't think cvars are actually written to the ini until the game closes

Cutmanmike is right.

However, you can use a program to parse out GZDoom's cvar data directly from memory and write to a file that way, but that's a bit advanced. ;) (Something simpler might be to inject a DLL that forces the 'writeini' command to happen frequently, but that is wasteful far from ideal...)

Another thing you can do is enable logging. As far as I know logs are flushed after every print, so it should be possible to use a program to grab hints from the program with another program using the log file. (They will, however, show on the screen)

Anyway...

I think it's important to put out a word of caution on this. This *IS* exploiting a kind of unintended/undocumented feature in GZDoom. I have no plans to break it (don't worry, you can all breathe a sigh of relief) and it's fairly harmless so there isn't any need to worry about this getting a dev's attention.

However - that does not immediately dismiss this little important caveat that must be said ...

As you all well know, refactorings can and do happen often in GZDoom. Because of the way this mod works where it exploits GZDoom not using any sort of stored in memory version of the file, this mod doesn't and never will have a promise of tomorrow. It's an interesting mod - it's not likely to break anytime soon - but keep in mind - it could, and without warning.

That is ultimately the unfortunate price to pay of all unintended/undocumented features. Like I said, I don't have any plans to break this and I don't see any reason to - but that little caveat applies to all programs, not just GZDoom. When you're using unintended features, you are on your own.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [0.2b BETA] TwitchyDoom - Streamer interaction!

Postby Cutmanmike » Mon May 03, 2021 6:08 am

Rachael wrote:That is ultimately the unfortunate price to pay of all unintended/undocumented features. Like I said, I don't have any plans to break this and I don't see any reason to - but that little caveat applies to all programs, not just GZDoom. When you're using unintended features, you are on your own.


Not the end of the world if does get broken down the line, for me anyway. The scope of the mod is pretty small compared to what you could be doing with ReadLump and other third party programs. The person who is planning server MMO features is the one that needs to be warned ;)

Also users could always stick to an older GZDoom if they want to use this in a worse case scenario.

Netheritor wrote:1. Give the ally monsters movement state. I know there is one where the ally don't teleport to player and teleport to player. Can you add the guard variant? Like monster as a sentry to allies and enemies alike? The monster in this state can be walk-through.


This is outside the scope of this mod. You'll have to create your own actors in decorate/zscript to handle this.

Netheritor wrote:2. Is there nothing else for viewers to gain points except by watch time? Maybe make the points increase if streamer defeating monster?


You can use whatever points system your stream bot software is capable of, but reading game data back into said software (i.e when a monster is killed) is tricky/not feasible (see the discussion about writing to cvars).

Netheritor wrote:Edit: One more question; Can this work with Zandronum?


Not without a modified Zandronum client or some other hack. And even then it would be hard to get the same features. Ask anyone who has tried to make names appear above player's heads using only DECORATE and ACS :blergh:
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Re: [0.4 BETA] TwitchyDoom - Streamer interaction!

Postby Dr. Denson » Tue Sep 14, 2021 6:37 am

I was wondering, Is there any possible way to make this also work with Twitch Channel points?
User avatar
Dr. Denson
 
Joined: 07 Jul 2016
Location: Slovakia
Discord: Dr. Denson#9769
Twitch ID: drdenson
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [0.4 BETA] TwitchyDoom - Streamer interaction!

Postby DragonFlayer » Tue Sep 21, 2021 12:31 pm

Greetings, I was wondering if anyone is having issues seeing in-game notifications? using TwitchyDoom_beta-0.4.pk3, tried GZDoom 4.5, 4.6 and 4.6.1, but I can't seem to get notifications when a command is used, they execute successfully, and I'm not passing NoNotify=true or anything like that, the in-mod setting 'Command notifications' is enabled too.

The only way I've been able to display notifications is by using the Log command from the documentation, but seeing the screenshots and videos, and the fact that you still pass the username and message parameters to most other commands, I was under the impression commmands would have some notifications of their own, or am I doing something wrong?

This is the command I'm using

Code: Select allExpand view
$savetofile("STREAM.txt Location","SpawnMonster|Actor=Cacodemon|$username|$dummyormsg")


Only way I've gotten notifications to show up is by adding Log commands as such

Code: Select allExpand view
$savetofile("STREAM.txt Location","SpawnMonster|Actor=Cacodemon|$username|$dummyormsg")
$savetofile("STREAM.txt Location","Log|||$username has summoned a Cacodemon!")
$savetofile("STREAM.txt Location","Log|||$dummyormsg")
DragonFlayer
 
Joined: 02 Apr 2019

Previous

Return to Gameplay Mods

Who is online

Users browsing this forum: Captain Ventris, doom_pope, MarcusTheBear, Red Helix and 15 guests