chromasync-sdk icon indicating copy to clipboard operation
chromasync-sdk copied to clipboard

understanding how to use chromasync

Open ha-noi opened this issue 9 years ago • 14 comments

The documentation seems to be missing. Perhaps you can enlighten me a little.

Inside the chromasync folder where it is installed, are two folders named packages and scripts. I understand the scripts are lua. What is the packages folder for? Do I need a script AND a package for any given thing I want to do? And how are the lua scripts activated? I installed chromasync. But the only interface is in the taskbar. I looked at the volume_main.lua script but am a little befuddled. Is there a tut for dummies?

ha-noi avatar Jan 03 '16 19:01 ha-noi

Scripts is mainly for debugging and development, any Lua scripts that are put in there will run when Chroma Sync starts. Packages on the other hand are for deployment, they hold all the files that are needed to install that mod, and the Lua script for that mod. I hope that help clear it up ;)

MusicalCreeper01 avatar Jan 03 '16 19:01 MusicalCreeper01

Oh and also there isn't any documentation yet, hopefully there will be some up soon

MusicalCreeper01 avatar Jan 03 '16 19:01 MusicalCreeper01

As a new chroma owner i looked into making some of my games more interactive on the keyboard on the same level as CS:GO was showed on the website.

Am i understanding it right that ChromaSync needs to be hardcoded to "every" game we wan't to make our scripts for? I can't seem to find any info about how ChromaSync castches ingame events and parses them.

beringtom avatar Mar 29 '16 08:03 beringtom

@beringtom You will need some way of retrieving the in-game data, and for games that already exist it will require use of an official API or a mod API.

In the case of CSGO, it uses an official API. As for Minecraft, it uses a mod API provided by Minecraft Forge.

njbmartin avatar Apr 06 '16 10:04 njbmartin

Anyone have any idea how to just generally detect keys being pushed? (Or how DebugLua works for that matter? I've been outputting text by just error(str) and reading the logs)

TehFlaminTaco avatar Apr 14 '16 07:04 TehFlaminTaco

@njbmartin Any chance of y'all open sourcing the Chroma Sync application? Assuming it is starting API services to handle the state requests and then mapping the states to the methods defined in the Lua configurations. Where can I find documentation on the Lua namespaces, i.e. clr.Corale.Colore, Keyboard? I'm assuming that is bundled with the ChromaSync exe. Also, can you provide a map of CSGO state events -> CSGO_Example methods?

gnz00 avatar Oct 07 '16 04:10 gnz00

Corale is an external library, please use google in the future... DOCS: http://lmgtfy.com/?q=Corale.colore

Pet0203 avatar Oct 07 '16 05:10 Pet0203

Thankyou for answering one of his multiple questions.

Do we have any form of -actual- documentation, such as how the events work and what not?

TehFlaminTaco avatar Oct 07 '16 05:10 TehFlaminTaco

Actually easier to just use Corale and make your own program..

Pet0203 avatar Oct 07 '16 05:10 Pet0203

But I LIKE Lua.

TehFlaminTaco avatar Oct 07 '16 05:10 TehFlaminTaco

You can do much more with C#. Sure, ChromaSync a nice app but it is only using API's, so then you can't do anything more than creating scripts (Because it's not open).

Pet0203 avatar Oct 07 '16 05:10 Pet0203

Yeah but I've no clue how to use C#, other than in the context of unity. I should look into it.

TehFlaminTaco avatar Oct 07 '16 05:10 TehFlaminTaco

Hey guys. To clear things up, while @Pet0203's suggestion of reading the Colore docs will help you understand the interaction a lot better, the Colore API is only partially supported through the Lua wrapper.

The Lua scripts are a lot more powerful than @Pet0203 suggests. While you have the ability to write "isolated" custom scripts, you can chuck almost any json object at Chroma Sync's local server and write scripts to consume the information.

You essentially POST to http://localhost:13000 from anywhere (even your browser). For the script to consume the data, you need to register it: RegisterForEvents("Counter-Strike: Global Offensive", CSGO_Example.handleData) That's essentially how the CSGO and Minecraft packages work.

I'd also like to mention that Chroma Sync was created by myself and is still experimental at the moment, hence the lack of documentation. I've also been quite busy for the last few months so I'm just getting back to this.

njbmartin avatar Oct 07 '16 08:10 njbmartin

Thanks for the clarification. Can you elaborate on how the Lua scripts are processed and how the dependency injection is working to resolve references to external packages like Colore?

On Friday, October 7, 2016, Nico [email protected] wrote:

Hey guys. To clear things up, while @Pet0203 https://github.com/Pet0203's suggestion of reading the Colore docs will help you understand the interaction a lot better, the Colore API is only partially supported through the Lua wrapper.

The Lua scripts are a lot more powerful than @Pet0203 https://github.com/Pet0203 suggests. While you have the ability to write "isolated" custom scripts, you can chuck almost any json object at Chroma Sync's local server and write scripts to consume the information.

You essentially POST to http://localhost:13000 from anywhere (even your browser). For the script to consume the data, you need to register it: RegisterForEvents("Counter-Strike: Global Offensive", CSGO_Example.handleData) That's essentially how the CSGO and Minecraft packages work.

I'd also like to mention that Chroma Sync was created by myself and is still experimental at the moment, hence the lack of documentation. I've also been quite busy for the last few months so I'm just getting back to this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/UltraboxEntertainment/chromasync-sdk/issues/2#issuecomment-252183338, or mute the thread https://github.com/notifications/unsubscribe-auth/AC3qs-YfUZdj8F0wIZXY_jk_fcOWweQ9ks5qxgQSgaJpZM4G9waD .

gnz00 avatar Oct 07 '16 18:10 gnz00