(WIP) Twitch stream (IRC based) "organic" storyteller

Started by RawCode, September 03, 2018, 07:47:16 AM

Previous topic - Next topic

RawCode

What is "done":

IRC client and communication implemented by IrcDotNet with very minor modifications to buildin MarkovChainTextBot.
Unity socket permission stuff and integration will be tested soonish, but i know that it will work fine without major modifications, as i already run tests on mono dll grabbed from game.

IRC<>syncthread communication implemented by pair of ConcurrentQueue instances, one for input from channel and one for posting messages into channel.

Storyteller integration done via code injection and will work for any storyteller, ever custom ones, as long as they follow same "component" model as vanilla ones.
Code injection is p2p full replacement, will not be compatible with anything that want to inject into same methods.

Logic is simple, when storyteller is going to throw negative event, it's state is saved and execution is supressed for some time, not decided will it use ingame ticks like 24 ingame hours or IRL time.
Message is pushed for IRC component to be posted into stream chat.

Message is simple (and not localized) "Going to throw <eventname> what do you think?"
Users in chat have options "yes", "no" and "sarcasm" and vote simply by saying that in chat.

No any kind of special logic, each user have single vote, no options or configuration.
Default option is "yes" and without activity from users execution will work exactly like vanilla.

Then storyteller is resumed from suppression and based on votes adjust raid points on event.
It will not cancell event completely, just set 35 points and run it in case of "no", in case of "sacrasm" it will double raid points.
Cancelling event completely have side effects.

Sarcasm planned to provide other events instead (raid>siege>mechanoids), but i have no time to provide mod with such feature in reasonable time.

What is not done:
Ingame GUI components are not done and will not be shipped with intial versions of mod, login and password will be stored inside plaintext XML as thingdef of map component.
Steam, mod will not be posted to steam workshop ever.

Why this thread, well, i do not need any help with development, as basically i already have crude version of mod that works sometimes (and sometimes not).

It's about information exchange, as i personally never stream and signed twitch account less then 24 hours ago just to get IRC password token for testing IRC integration.

Originally i planned to use twitchlib, but most of features provided by library is no use and it demand login and password for twitch, asking such data as ingame popup just neh.


Mitz

It's sad autism's an insult, then i must be an insult.
and my cat also must be an insult, as well as every other cat in the universe.
space cats.