I understand the difficulty in things like "is this even a color", "how do i convert this to hex," etc. But all the tools I use to stream make this next-to-impossible for other, stupider reasons. For example:
- OBS uses a special color format that is not hex, and isn't even a straight conversion from hex to decimal. It seems to be BGR instead of RGB, and it also has the opacity value in the beginning. So #FF0000 (red) becomes 4278190335, which is FF0000FF in hex. That first FF is full opacity, then blue and green are 0, and red is finally full FFs again.
- Firebot (the OBS integrated tool I use for channel rewards) has a variable that will convert hex or named HTML colors to OBS values, which is good. BUT there is no way of sending that variable to OBS due to a bug in the "Set OBS Source Color" action. So I can get the value, but what the fuck do I do with it now?
- Firebot can trigger Advanced Scene switcher (an OBS plugin) via websocket, BUT Advanced Scene Switcher has no way of actually getting anything other than a signal to start a macro. In other words, Firebot can say "GO" but it can't say "GO and also GREEN".
- Advanced Scene Switcher can trigger off of a text file changing, which I can also do in Firebot, but again it can't read the text file at all, which is like. Why. Why.
So my workaround is completely fucked up:
- The user types in
!slime greenor otherwise redeems the reward with a color attached - I check a JSON file of all the valid HTML colors to make sure it exists. If it does, then:
- Firebot converts the color into the OBS format needed
- Firebot changes the text of a text source in OBS. You know, the kind that you usually use to display text, not hold variables
- Firebot also writes the color to a text file. This triggers a macro in Advanced Scene Switcher, but that's all. I could just write gibberish in there, I just need to modify the file.
- Advanced Scene Switcher then reads the settings of the text source in OBS, which contains the color but also a bunch of other crap
- I run that through a regex formula to extract just the number I need
- THEN I can change the color source using that number.
This is an absurd workflow for something that should be simple. It doesn't help that debugging stuff in Advanced Scene Switcher is abysmal, since things silently fail and output nothing to nowhere. OR it outputs everything to a log file which quickly becomes several hundred megabytes.
anyway, I mostly needed to complain about this. This is all because there's a bug in Firebot and I would fix it but i don't know how to use Github. There's literally a single line of code that could be removed and I think it would fix it.
And yes, I should probably just learn how to code, but i hate coding so much
