Thread: New Chroma APIs
View Single Post
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: 176
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