These are chat archives for CoraleStudios/Colore

10th
Apr 2016
Christopher Guckes
@cguckes
Apr 10 2016 12:49
Hey guys, is anyone online right now, who can help me with a unity-related issue?
Adam Hellberg
@Sharparam
Apr 10 2016 13:15
haven't done anything in unity so probably can't help
Christopher Guckes
@cguckes
Apr 10 2016 13:18
Hi, maybe you can point me in the right direction though. I can run a sample application that makes the keyboard red from visual studio, but when I try to run the same code in unity, I get an exception, saying Colore.Core library couldn't be found. I placed the library in the same folder as the mod the game loads. Is there a way to include the Colore dll into the mod dll? I'm pretty new to c# and unity, so sorry, if I'm coming across as completely ignorant...
Could I just copy the barenaked source code of the library into the project for testing purposes?
Adam Hellberg
@Sharparam
Apr 10 2016 13:20
not sure where it's supposed to be put, it's in some special folder that Unity loads libraries from IIRC. I think some other people in here are doing dev work in unity using Colore so they would know, but not sure when they will be available.
Christopher Guckes
@cguckes
Apr 10 2016 13:20
Ok, I'll just linger and see, if anyone comes around. Thanks :-)
Christopher Guckes
@cguckes
Apr 10 2016 15:21
@njbmartin are you there by any chance?
Nico
@njbmartin
Apr 10 2016 15:23
I have been summoned
from my understanding, you're trying to load the colore library into a unity made game using a mod
Christopher Guckes
@cguckes
Apr 10 2016 15:30
right :-) thx for coming
more precisely its kerbal space program
afaik they use the 2.0 subset of mono shipped with unity
is there any way to get colore to work with this game?
Christopher Guckes
@cguckes
Apr 10 2016 15:40
I would be happy to try to get around that restriction, if you can tell me, which part of the Colore-Code clashes with the subset library. If that is at all possible...
would it be rude to shout him out again?
Christopher Guckes
@cguckes
Apr 10 2016 15:49
@njbmartin I'm sorry to bother you again, is there any chance to get this to work?
Nico
@njbmartin
Apr 10 2016 19:14
I'll need to look into it some more, simply because im not sure if Colore would be able to work with it
And apologies for not responding sooner. Got my head down in another non Razer project
Christopher Guckes
@cguckes
Apr 10 2016 19:43
No worries, I think I'll work around the issue with some simple localhost socket solution.
If I just pass the commands the colore library gets through a network socket, I should be able to use different .net libraries on the client and server side. It's not pretty, but maybe someone else might profit from a detached interface like that...
Adam Hellberg
@Sharparam
Apr 10 2016 19:45
IIRC the issue with Colore and Unity is that the WPF libraries (that provide Presentation core which has the WPF color struct) are missing, and so it gets dependency errors
we've been discussing creating a separate build of Colore that excludes certain functionality to get it compatible with Unity
Christopher Guckes
@cguckes
Apr 10 2016 19:47
Is the color struct very complex? Don't know enough C# to even know what WPF is
Adam Hellberg
@Sharparam
Apr 10 2016 19:48
we support converting from a WPF or regular System color to a Colore color, and that means we need to depend on PresentationCore to use System.Windows.Color or whatever it's called
Unity does not include that library though (since it uses Mono and Mono doesn't and will not support WPF because of the immense complexity)
Christopher Guckes
@cguckes
Apr 10 2016 19:50
That sounds like I could remove that part from the library without much problem. I'll look into that. If you're interested, I'll keep you posted
Adam Hellberg
@Sharparam
Apr 10 2016 19:51
basically it's about removing the FromWpfColor method in Colore's Color struct, I don't think anything else depends on PresentationCore
Nico
@njbmartin
Apr 10 2016 20:05
what you're describing with a simple socket solution is exactly what Chroma Sync set out to achieve. For games where Chroma wasn't integrated officially, Chroma Sync offers an API to handle the data from mods. Both CSGO and Minecraft use this API
Christopher Guckes
@cguckes
Apr 10 2016 20:06
How does it communicate? Is lua the only option?
or did I misread that?
Nico
@njbmartin
Apr 10 2016 20:06
the lua script consumes the data that Chroma Sync receives
so essentially
Minecraft --(json packet of game state)--> Chroma Sync --> Lua Script
the lua script essentially tells Chroma Sync how to consume the data coming from the games
Christopher Guckes
@cguckes
Apr 10 2016 20:08
Ok, that sounds easy enough...
So basically I just have to fetch the game state, json it up and send it to Chroma Sync
I'll look into that
Do you have a C# sample implementation I can use?
Christopher Guckes
@cguckes
Apr 10 2016 20:15
Or some sort of API documentation?
So far I found a jar for minecraft only in your repository
Christopher Guckes
@cguckes
Apr 10 2016 20:37
@njbmartin Even the java code for minecraft would help me
Nico
@njbmartin
Apr 10 2016 20:38
yeah, the API doc is lacking but have a look here
here's an example json payload Chroma Sync receives
Christopher Guckes
@cguckes
Apr 10 2016 21:00
I've seen that, I just don't understand how to send the json stuff from my C# mod to ChromaSync itself.