Asking before digging through OS6x code, and not sure if something similar is already in motion or not.
How much would be involved to assign preon blade effects to matched wav files?
I know there are USER effects, but it could be cool to have actual preon animations match the different sounds. I’m thinking something like bladestyles could get EFFECT_PREON1, EFFECT_PREON2 etc… @profezzorn, you mentioned in a PR conversation that you were looking at possibly modifying how preons work.
Would this be
a. contrary to any current plans?
b. if a=no, something relatively easy that I could poke around with and maybe some pointers to where to start playing?
Seems like this would be better to do generically, similar to how we did wavlen.
Basically, we would need to propagate the number of the wav file in addition to the length, and then make something that chooses which effect to play based on the wav number.
That way you could also have clash effects matching the clash sound etc.
The new Select functions for Edit Mode could use file number as a “selector”, just need a function that turns the wav file number into a Int<> and then the styles could use.
And also then preon would need additional EFFECTS for the blade styles, yes? Like I mentioned EFFECT_PREON1, EFFECT_PREON2.
Like adding USER or custom ones is doable, but the preon being coded to have ignition follow is key.
I’m going down the wrong path over here.
I can’t wrap my head around how to pass the selected file to an effect.
I have scrap notes so far but this is not the way for sure.
#ifdef PREONS_MATCH_BLADE_EFFECTS
void MatchPreonToBlade() {
int preon_num;
preon_num = rand() % SFX_preon.files_found();
SFX_preon.Select(preon_num);
}
switch (// is this preon_num? )
case 1:
hybrid_font.DoEffect(EFFECT_PREON1, 0);
return true;
//etc...
FWIW I have expanded Dual Mode Sounds to handle preon, out, in, pstoff sounds so that odd files are selected when the saber is pointed up and even files are selected when the saber is pointed down. This would let you pair even sounds and odd sounds together regardless of if there are the same number or not AND let you have completely unique effects for each by building the style to use IsLessThan<BladeAngle<>,Int<16384>>.
I am not using #define KEEP_SAVEFILES_WHEN_PROGRAMMING
I am going to delete the files and see what turns up next time.
—Deleting the files changed nothing. Same versions as what posted above showed up when written.
There might be something wrong with the SD card. Might need a format-and-replace-all-the files.
It could also be something wrong with ProffieOS, or maybe something in your prop or configuration. I did change a bunch of stuff about how config files are written recently, so it’s possible I messed something up.
Confirmed no better after SD reformat. Not respecting SAVE_STATE. Weird file writing.
Works fine again after reverting the following merges:
392097b simplify config file writing and save memory
0c9e397 better config file handling (saves memory and lets us do more stuff…)
I did not try a different prop file such as default or fett263.
Well that’s obviously not good.
Can you send me your config file and anything non-standard you have in your code so I can try to replicate the problem?
Also, what optimization level are you using? (And what version of the arduino-porffieboard plugin?)
I applied tonight’s updates and it seems the changes to prop_base fixed it.
Working now, yay! Thanks.
Does SAVE_STATE needs an update from #define SAVE_DYNAMIC_DIMMING
to #define DYNAMIC_BLADE_DIMMING ?
And is it OK to have things defined twice if both SAVE_STATE and ENABLE_ALL_EDIT_OPTIONS are active?
Hello! Can I try out OS6 by downloading the code from GitHub as a .zip? Also, does the Arduino Proffieboard plugin v2.2 work with OS6, or do I need the latest code zip for that too?
It’s still pre-Alpha, you can download but it’s not in final form for testing, there are parts still being added and/or worked on and there’s no documentation.
Ok, thanks for the info! I’m not very experienced in flashing the Proffieboard, so I just wanted to be safe before I tried something that’s very untested. By the way, OS6 is looking amazing so far! This truly is the cutting-edge future of lightsabers