I’ll start by saying that I feel like I’ve seen a similar discussion on The Rebel Armory before, but for the life of me, I can’t find that thread anymore.
I am using styles from Fett263’s style library – which are astounding, may I add – and I tend to stick to having the same effects for blast, lockup, etc. across multiple presets. Which got me thinking, why not define a core of effects once and then replace it in each style with one word to save loads of space, instead of having 8 copies of the same thing. Obviously, if changes need to be made, then it’s also a lot easier to make them in just one place.
How would I go about doing this? I have tried placing using
before the Preset
block, but it won’t compile and raises errors. Defining it as a variable means that I have to assign it a type, and I don’t know what type it ought to be.
Here’s one of the styles I’m using:
StylePtr<Layers<
ColorChange<TrBoing<500,3>,AudioFlicker<Blue,Rgb<0,128,0>>,AudioFlicker<Red,Rgb<128,0,0>>>,
LockupTrL<NavajoWhite,TrConcat<TrInstant,TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,TrConcat<TrInstant,TransitionEffect<NavajoWhite,Rgb<255,225,0>,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,
ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,
ResponsiveStabL<White,TrWipeIn<600>,TrWipe<600>>,
BlastFadeoutL<TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<50>,EFFECT_BLAST>>,
SimpleClashL<TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<100>,EFFECT_CLASH>>,
LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
InOutTrL<TrWipeX<Scale<IsLessThan<BladeAngle<>,Int<16000>>,Int<200>,Int<500>>>,TrWipeInX<Scale<IsLessThan<BladeAngle<>,Int<16000>>,Int<300>,Int<800>>>,Black>
>>(),
And the section that I want to break out is this:
LockupTrL<NavajoWhite,TrConcat<TrInstant,TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,TrConcat<TrInstant,TransitionEffect<NavajoWhite,Rgb<255,225,0>,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,
ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,
ResponsiveStabL<White,TrWipeIn<600>,TrWipe<600>>,
BlastFadeoutL<TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<50>,EFFECT_BLAST>>,
SimpleClashL<TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<100>,EFFECT_CLASH>>,
LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
InOutTrL<TrWipeX<Scale<IsLessThan<BladeAngle<>,Int<16000>>,Int<200>,Int<500>>>,TrWipeInX<Scale<IsLessThan<BladeAngle<>,Int<16000>>,Int<300>,Int<800>>>,Black>
Then, if the above is defined as ‘Effex’, for example, the desired outcome of the exercise would be:
StylePtr<Layers<
ColorChange<TrBoing<500,3>,AudioFlicker<Blue,Rgb<0,128,0>>,AudioFlicker<Red,Rgb<128,0,0>>>,
Effex
>>(),
Given that I have 2 blades defined and plan to have around 8 styles, I don’t want to make changes to this 16 times when I decide that I want to change White to Yellow, for example. And yes, I know, I can just find and replace all, but that’s not the point. With 2 blades, the space savings is also a desired property of this exercise.
I feel like this might be useful for others out there as well, and any help would be appreciated!