Fett263 Style Library Accent LEDs / Kyber LED color issues

Hi all,

Since my latest build I wanted/needed to add additional blade styles to my config (compared to my other single blade saber) because this one has a 20 Neopixel ring and a single neopixel kyber LED.

So I created two functions for both blades:
for the ring:

Single Style
On Behavior: Rotating Section (Fast) [Color: BaseColorArg]
Off Behavior: Rotating Section (Slow) [Color: Match ON Color]

for the kyber:

Single Style
On Behavior: Fast Pulse Dim-On [Color: BaseColorArg]
Off Behavior: Slow Pulse Off-On [Color: Match ON Color]

I later learned this uses the BaseColorArg which is (apparently) never set in my styles. I can probably fix this by trying to recreate the style in the library and use the base colors, but I was wondering if the color can be mached to the main blade somehow?

Another issue I had was with a Cal Kestis blade style that has all 10 colors which can be changed with Special Ability. This style I found somewhere on the internet but was made using the library. All phases uses a fixed color, so the 2 blade style functions are not picking up on the main blade color as well.

Or is there a way to set the color of the accent blade, kyber blade style as a parameter in the function? I just don’t want to copy past this style everywhere to reduce compile size.

If you build a Main Blade style in the library, then go and build an Accent or Crystal version the library will automatically keep the colors for you. If you’re building at a later date, just set the Accent or Crystal up the same way as the Main Blade.

It’s not exactly working for me.
I did (re)create the main blade. So all Cal Kestis styles as Alt colors with Multi-phase (special ability). However, because there are more colors than options (Base color, Alt color 1, 2 & 3), I had to use fixed colors. But these colors are not used by the “On Behavior” for the accent LED and/or Crystal LED configuration.

Because I wanted a Custom On behavior, the Rotating Section (Fast), it’s defaulted to the base color and no way to match the ‘fixed color’ from the main blade.

So:

  • Can the Accent/Crystal LED have the same color as the ‘active’ fixed color instead of the base-color?
  • Can the base-color be set to a different color by changing to an alt style?
  • Can a custom on-behavior have alt color definitions like the main blade?

I see, it’s supposed to let you select “Multi-Phase” for Custom ON Behavior but looks like there’s a bug. Will try to fix soon.

1 Like

This is going to require a little bit of rebuilding, there’s some conflicting code for Multi-Phase so I’ll need a little time to work through. Will update when it’s working.

1 Like

This should work as expected now. Per the Note for ON Behavior, the Custom option will use the Base Style Primary Color (this is actually set above the ON Behavior so you’d scroll up to edit or I’ve added an anchor link in the NOTE to jump to it. If you’ve set up a Main Blade or used a recipe for a Multi-Phase blade the Base Style Primary Color should pre-populate to match. You’ll want to set the Main Blade and controls for it ahead of building the Crystal or Accent so the library has the Multi-Phase set up active, this is what allows the correct set up for the Multi-Phase colors.

You’ll need to refresh the library to get updated script.

1 Like

Looks like it’s working now the way I want to with my cal kestis font!!
Thank you for the fast fix.

Small update for my other blade styles that don’t use alts or multi phases.

I created a similar blade style for my accent ring and crystal leds like I did for my cal kestis blade style and pasted it as function in my config.

Then I updated the function using to make it a template like so:

template<int R, int G, int B>
using Crystal = Layers<Pulsing<Mix<Int<8192>,Black,RgbArg<BASE_COLOR_ARG,Rgb<R,G,B>>>,RgbArg<BASE_COLOR_ARG,Rgb<R,G,B>>,2000>,TransitionEffectL<TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Scale<WavLen<>,Int<100>,Int<400>>,Int<100>,Scale<WavLen<>,Int<100>,Int<400>>,Int<0>>,EFFECT_BLAST>,TransitionEffectL<TrConcat<TrJoin<TrDelay<30>,TrInstant>,RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,TrFade<300>>,EFFECT_CLASH>,LockupTrL<AlphaL<TransitionEffect<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,TrExtend<4000,TrInstant>,TrFade<4000>,EFFECT_DRAG_BEGIN>,SmoothStep<Scale<TwistAngle<>,IntArg<DRAG_SIZE_ARG,31000>,Int<30000>>,Int<3000>>>,TrWipeIn<200>,TrWipe<200>,SaberBase::LOCKUP_DRAG,Int<1>>,LockupTrL<AlphaL<Stripes<2000,4000,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,Mix<Sin<Int<50>>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,Mix<Int<4096>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,26000>,Int<30000>>,Int<3000>>>,TrConcat<TrExtend<4000,TrWipeIn<200>>,AlphaL<HumpFlicker<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,RotateColorsX<Int<3000>,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,100>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,26000>,Int<30000>>,Int<3000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT,Int<1>>,InOutTrL<TrInstant,TrInstant,Pulsing<Black,RgbArg<BASE_COLOR_ARG,Rgb<R,G,B>>,8000>>>;

As you (perhaps) noticed, the following line which it exported from the style library:

RgbArg<BASE_COLOR_ARG,Rgb<0,0,255>>

is changed with:

RgbArg<BASE_COLOR_ARG,Rgb<R,G,B>>

This allows me to add the function as second blade like so:

{"Kyber Radiance;common", "common/tracks/mars.wav",

StylePtr<..some main style.. >(),

StylePtr<Crystal<0,0,255>>(""),

"kyber_radiance"},

This way i’m able to reuse the style function with the ability to update the color per blade style.

This is also what I was partly looking for in my original post, but I figured it out.

You’re welcome.

1 Like

You can do this with Using Functions and Style Arguments via my Config Helper as well :wink:

1 Like

Oh really? I think I just completely missed the Style Arguments feature in the config helper. I’ll look for it when I have the chance. Good to know!

Yup, use the Preview Style button in each preset, the Previewer reads the available Arguments and let’s you set/change per Style, they available arguments for each style will be listed beneath the preview.

1 Like

Yeah that’s a lot easier than updating the function to a template like I did..

That’s very good to know! Now I can redo the styles again :joy: this is better

1 Like

It does seem the automatic paste from the Preview Style doesn’t work. But that’s a minor detail I suppose

Not sure what you mean by “automatic paste”?

In the video I can see you change the settings in the Preview Style window, and it automatically pastes the arg string into the (“”) of the blade style.

StylePtr<AccentRing>("")

to

StylePtr<AccentRing>("65535,110,0")

That allows you to copy an Arg string from within the tool and paste to another preset or blade. It won’t values if they are not formatted correctly or have extra characters or spaces. There is a very specific syntax required so the tool blocks pasted code that doesn’t match. It’s really designed to copy from within the tool. If you add arguments on one style you can use Copy to copy the arguments and paste them into another blade or preset so you don’t have to manually duplicate.

1 Like