Understanding more about Blade Style functions

In short: I want to learn more about the blade style functions.

This post was basically going to be me asking how to make Fett’s Second Sister style pulse slower, but I figured I might as well go ahead and learn as much as I can. Just skimming over the code, it looks like each blade style is configured in StylePtr<Layers< [functions] >>(). That’s all I know at the moment.

Some questions I have:

  • What exactly does Stripes, StripesX, Mix, etc. do? What are the arguments they take?
  • Some style arguments are specifically type casted <Int<>>, is there a reason why?
  • Is there a list / documentation of the blade style functions somewhere?

I have a few modifications in mind, so I’m happy to absorb as much information as possible! If there is already a thread on this (here or elsewhere), please kindly redirect me.

tl;dr: start here: Blade Styles · profezzorn/ProffieOS Wiki · GitHub

The link above has three important links in it: COLOR, FUNCTION and TRANSITIONS. Each leads to a directory full of files. Each file defines one or more of these style templates, and it should also have some instructions that explain what they do and how to use them.

C++ templates can take classes or ints, but not both. Most style templates don’t actually take integers, they take functions, which are re-calculate for every frame. Int<X> creates a function which always returns X. Many style templates have an alias which does the Int<X> part for you for convenience.

Isn’t this the same as the first question?
The answer is certainly the same…

Oh, this is perfect! Thank you for answering all of my questions, I really appreciate it. Now, how did I miss that particular page on the wiki?! Would have saved me a couple hours of trial and error, oops.

I’ll post back here if I have any more questions!

I made this file when I was at your stage in the game to have a reference sheet for the style templates at the time.
It’s as of ProffieOS 2.8, and many new things have been added, but as a base of some of the original stuff, it might help?

Additionally, looking at the right hand column breakdown in the Style Editor is priceless. All of the arguments have a /* comment of what it is */ above it, so you get to visualize it better, and in a hierarchical way.
https://fredrik.hubbe.net/lightsaber/style_editor.html