Notes
This is my Personal Lua Script collection, which I’ve been using for a few months now, and I think it’s useful enough to share it online.
You can inform me, If you find any bugs.
(at best a screenshot of the error message or copy and paste the massage)
Don’t forget to assign Hotkeys if you want to get the most out of the script.
History
I am not a Learned Programmer, I just played around with C# for some years and when I saw that you could make your own scripts I was a bit reluctant at first and only used other people’s stuff, but some were too complicated to understand, others didn’t do what I exactly wanted, so I decided to look into Lua and the OFS Extension API and started making my own Scripts, which were individual scripts at the beginning, but it quickly annoyed my how many tabs I had open, so I put them in one Script.
For me they work(most of the time) and are really useful when combined with other people’s scripts.
And I hope they are useful for you too.
Changelog
v0.3
First Release
2024-02-21T00:00:00Z
v0.3.1
Improved Limit (was made quite hastily should work better now)
2024-02-21T13:20:00Z
v0.3.2
Improved Equalize
added version text next to Execute Button
2024-02-25T19:00:00Z
v0.4.0
Added count Selected to Switch
Limit now includes first and last Point of the Script
Limit workes now with up and up & down and down movement not just up & down (Doesn’t work with too funky Scripts)
Added Vibrate Function (not as sophisticated as other’s Vibrate Scripts)
2024-03-14T16:00:00Z
v0.4.1
Fixed small mistake which made Switch crash when using First
Changed Vibrates Amount Lower Limit from 3 to 1
Added Function AddMovement
2024-04-01T16:20:00Z
v0.4.2
BPM got a adjustable EndPoint
AddMovement got a LowerLimit (If Speed in the other Direction is lower than LowerSpeed a Point with LowerSpeed is created)
AddMovement Limited Max Amount of Points Used at once to 1400 otherwise OFS crashes (at least for me)
AddMovement Works now with Points that are not at 0 (both Points still need to have the same value doe)
Limit has now the option to scale from a Start to End
2024-04-08T18:15:00Z
v0.4.3
Fixed SmoothWaves not working after using it with 0 Points selected
Crashes based on Creating Points on same position shouldn’t happen anymore
2024-04-28T21:50:00Z
v0.4.4
BeatsPerMinute works now with empty Scripts
Multiply has now too the option to scale from a Start to End
2024-05-19T16:20:00Z
v0.4.5
Find can now find based on Speed not just Position
Added Funtion CleanUp
2024-07-15T19:10:00Z
Info
Here I will explain what each function does.
[with exception of BPM all Functions will need selected points]
SmoothWaves
SmoothWaves
My First and most complicated Function, but also the one I am really proud of.
I hope the name at least hints at what it does. It adds Points between existing Points of a Wave Pattern defined by the Edgesize and the Factor, where Edgesize is the Horizontal direction & Factor the Vertical one, You can also decide on which area a Point should be created. The % decides if the Factor is Absolute (always same) or depends on the difference between the two Points.
Before
After
Example1
Example2
Example3
Multiply
Really simple, It multiplies either the Value(pos) or time(at) of the Points
Math.Round
Every Programmer should know what this is. Well it Rounds the Points by the Factor, so if Factor is 5 74 will be 75 , 72 will be 70 and so on, not too complicated.
Switch
Will Keep Points selected based on Target.
So if one, every other Point will stay selected
BeatsPerMinute
Will place Points based on the BPM,
if you script a HMV or PMV and you know the BPM of the song, this will be helpful.
Important it will start from the current time in the script, not the beginning of the video
Find
Will select Points between the Top & Bottom value.
Equalize
Like the build in Equalize, with the exception that it groups the Points together that have a similar distance, how similar is decided by the Tolerance.
Before
After
Vibrate
Adds Points where every second point gets changed, Timeoffset obviously changes the Time, where FactorStart and FactorEnd changes the value
Before
After
CleanUp
A Few Ways to Remove Unnecessary Points
SamePos
Before
After
SameSpeed&Direction
Before
After
Download
Unzip in C:\Users\YourUsername\AppData\Roaming\OFS\OFS3_data\extensions