Thread Tools Display Modes
03/18/17, 05:47 AM   #1
loubacca
Join Date: Mar 2017
Posts: 2
New Chroma APIs

Has anyone had any success working with the new Chroma API?

I've tried IsChromaSystemAvailable() and it seems to be working, but none of the other calls seem to do anything (i.e. ChromaCreateKeyboardStaticEffect(number red, number green, number blue) )

Thanks
  Reply With Quote
03/21/17, 12:19 PM   #2
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
You should be able to use that function so long as there is not a constantly updating dynamic effect on the keyboard (e.g.: death, or an on screen notification causing F and X to blink. Does your keyboard light up the color of your alliance?

It's worth noting that basic effects, like the one you mentioned, don't work in conjunction with the dynamic effects you can make in Lua. This is because Chroma can only have one "effect" active on a device at a time. So the dynamic system uses the grid and a color layering system to boil a bunch of effects down to one composite effect. Alliance color, death, ultimate, quickslot, and notifications all go through this system, and if any of them fire they'll overwrite your basic effect. It's always the last thing that got called.

If you want to just make the keyboard a particular color, consider adding it in the dynamic system. Something like:

local myColor = ZO_ColorDef:New(0.773, 0.761, 0.62, 1)
local chromaEffect = ZO_ChromaCStyleCustomSingleColorEffect:New(CHROMA_DEVICE_TYPE_KEYBOARD, ZO_CHROMA_EFFECT_DRAW_LEVEL.COVER, CHROMA_CUSTOM_EFFECT_GRID_STYLE_FULL, NO_ANIMATION_TIMER, myColor, CHROMA_BLEND_MODE_NORMAL)
ZO_RZCHROMA_MANAGER:AddEffect(chromaEffect)

You can obviously get a lot more complicated than a flat color (animations, blend modes, etc) but that should give you an idea. If you do just want to use the other API calls to use the Razer provided functionality (like Wave and Spectrum, etc) then you might want to make sure all the ZO_RZCHROMA_MANAGER effects stop getting added, lest they overwrite your effect.
  Reply With Quote
03/23/17, 06:47 PM   #3
loubacca
Join Date: Mar 2017
Posts: 2
Thanks Dan, I'll fiddle with that and let you know how it goes!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » New Chroma APIs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off