EroScripts is a community for scripts that sync up interactive sex toys with porn. Learn more.

To discover, download, and help choose what gets scripted, create an account.

EroScripts

OpenFunscripter - another scripting tool - 1.4.0 release

Hello and welcome to the new thread :grin:

OpenFunscripter (OFS) is fully open source over at Github

Disclaimer: You can do whatever you want with scripts created with OFS. No strings attached.

How to get started with scripting and OFS?

  • Be aware of the fact that scripting takes a lot of time and is a very subjective process.
    Subjective as in if you like the script you made you did a good job.
  • The “Options”->“Keys” window is your friend it shows all possible key combinations and buttons you can press it also let’s you rebind them.
  • I can highly recommend these threads as a starting point.
    The video tutorial by Husky
    How to get started with scripting by sentinel
  • There’s also the old thread which is a mess

For more advanced users

Feature requests
I prefer feature request as Github issues.
To put it simply it’s going to make it more likely that a desired feature is implemented.

Warning: Project files created with 1.2.0 are not compatible with 1.2.1.
This is an exception. Normally they will remain forward compatible.
If you want to move a project to this version you’ll have to export to funscript and then reimport into a new project first.

Latest release: 1.4.0 Github

Changes 1.4.0
  • New Lua Extension API
    • Now work on Linux
    • Added “Extension Log Output” in “Extensions”->“Show logs”
    • Created a reference: LuaApiReference.md
    • Use this power wisely :sunglasses:
  • Added a “OFS Log Output” in “View”->“Debug”->“Log output”
  • Rewrote the waveform rendering. again…
    • It now scrolls smoothly instead of stutter stepping :weary:
  • Merged fix #4 for paths containing square brackets in the Lua scripts
  • Stopped linking libmpv.
    • Should have no impact on anything just an implementation detail.
  • Removed some implicit project saving.
    • This avoids the creation of .ofsp files when not desired.
  • Fixed Metadata import
  • Fixed autobackup month being one month off.
  • Using the “Click simulator to add a point” modifier key now checks if the mouse is on the simulator.
Changes 1.3.1

Small maintenance release

  • Windows: The runtime is now statically linked. (no more missing vcruntime.dll errors)
  • Windows: Enabled AVX. (makes things go faster)
    • If your CPU doesn’t support it you’ll get an error message.
    • Let me know if you need non AVX builds.
  • Windows: There isn’t a console window anymore.
    • Logs are written to “%appdata%/OFS/OFS_data/OFS.log” and are always overwritten
  • Windows: ffmpeg.exe is no longer included.
    • Instead it now can be automatically downloaded.
  • Now includes “NotoSansCJKjp-Regular.otf” for Chinese/Japanese/Korean glyphs
  • The font atlas is now generated dynamically based on what glyphs are needed.
    • So if you type non ascii characters the font atlas will be rebuilt and the characters will display correctly
    • Glyphs which are not part of the included fonts are not supported
  • When scrubbing the video timeline with the mouse you can now move the cursor away to slow down the scrubbing speed for more accurate mouse scrubbing
  • Added “go to the start/end” bindings (self explanatory)
  • “Close project” is now under the “File” menu
Changes 1.2.1

single-precision floating-point edition

  • The whole application now uses single-precision floating-point numbers (in seconds) for timing
    • This was more work than it sounds. The whole application was using 32 bit integer milliseconds before.
    • This reduces any timing error introduced by copy/pasting, moving, etc. significantly
    • Unfortunately this makes project files created with 1.2.0 incompatible.
  • Added clip export (contribution by @Blueboom42 )
    • You can now create clips by creating bookmarks
    • And export them via “Bookmarks”->“Export Clips”
  • Removed arbitrary T-Code limit (Range is now 0-999)
  • Added ability to add a mpv.conf to the application directory
    • If you’re a technical user you’ve now got full control over mpv mpv.io
  • Added a new Lua script “add_spline_smoothing_to_selection.lua”
  • Fixed audio only scripting which I broke in 1.2.0
  • Fixed playback looping which I broke in 1.2.0
  • “Lua output” is now a seperate window
  • Fixed issue where the auto-backup was clearing the “script has unsaved changes” flag
  • Heatmap generation was changed to actually use “Speed” instead of just point density
Changes 1.2.0

Project files

  • OFS now uses it’s own project files to store scripting projects.
  • When loading funscripts they’ll get imported into such a project file.
  • To get a funscript back out you’ll have export explicitely as a regular save no longer saves a funscript instead it saves to the project file.
  • Script metadata becomes Project specific in this case and each script exported gets the same metadata. Previously all loaded scripts had their own metadata.
  • Scripting settings also become project specific.
  • There’s a new “Project” menu in the mainmenu to which some stuff got moved.

Auto backup

  • The auto backup system also uses these project files.
  • Now OFS will remember a timestamp when you launch it and save all backups to a folder with that timestamp.
    • This fixes the issue of closing without saving and than restarting OFS, go looking for the backup and realizing it has already been overwritten. :cry:
    • This also means you probably want to manually clean up the directory more frequently otherwise a few megabytes may accumulate there overtime.

Alternating mode

  • Now has a label indicating where he next point is going to go.
  • I added a “Context sensitive” checkbox which gives back the old behaviour that I previously removed.

Other things

  • You’ll now get a dialog asking you to save when trying to close with unsaved changes.
  • The undo/redo history is now global. Previously it only showed the active script.
    • In general the undo system got improved when working with multiple scripts.
  • Fixed “Equalize” function precision. (Thanks to @Husky for noticing that one)
  • Improved moving points with the mouse while (by default) holding shift.
  • Reworked the simplify function. Hopefully for the last time.
  • OpenGL 3.3 compatibility is restored.
  • When creating a new project you’ll get nudged to enter metadata then and there. (Based on @defucilis request)
  • Points in the timeline fade out when zoomed out far.
    • Mainly for performance reasons.
  • The center indicator has now this little triangle.

Difference between the previous beta

  • I rolled back the selection changes so it’s the same as 1.1.9. (I have plans for a different implementation)
  • Under “Keys”->“Modifiers” you can now bind multiple modifiers
  • Changed project extension to “.ofsp” (if you have “.OFS” files you’ll have to rename them)
  • Fixed a bug where the T-Code configuration wasn’t saved.
  • Added default metadata. You can now save default values for the metadata which are always the same.
  • Fixed video zoom issue that only occured if you had a panel docked on the left side
  • Fixed minor jitter of the script timeline during video playback
    • The timeline won’t snap to the position of the video it’s all smooth now.
  • Fixed Windows exclusive borderless fullscreen glitch ( where it would flash black when focus was lost )
  • Reduced the maximum playback speed to x3 (still more than neccessary I hope)
  • You can now make OFS the default program for “.ofsp” files and it will open them
  • I now expose a “Light” theme in “Options”->“Preferences” but it still needs some work
  • Other smaller fixes not worth naming
28 Likes

Had to fix a threading related saving issue which only manifested on linux.
So the linux snap commit id won’t match. Oh well.

You mentioned the new auto backup feature, but is that also an auto save feature in place? I never see more than 0 minutes since last save and then the message disappear after approx a minute. The menu never becomes red like before. However, the last modified time doesn’t seem to be updated in the script file unless I press ctrl-s. I’m really confused about the new save/backup system.

The save confirmation on close also seems a bit strange.
If I do some changes and close OFS afterwards I do get a confirmation message about saved changes.
If I do some changes, wait for the unsaved changes 0 minutes… to disappear and close OFS afterwards I don’t get any confirmation message about unsaved changes.
If I open the project after the last application close scenario the last changes are not there anymore.

I don’t mind an improved backup system, but please restore save as it was. I want full control over how things are saved in my script source file and an indicator when I haven’t saved for 5 minutes. I really don’t feel comfortable with the save/backup combo system right now.

I’ll revert to 1.1.7 that I’ve been using so far for now.

No that’s just an unintentional bug where saving the backup project resets the unsaved changes flag.
Awkward. Going to be fixed for the next version.

Ok, I’ll wait for that one. I’ve started scripting on a 2 hour long WankzVR video so I need to feel completely safe with the save feature before I dare to switch permanently.

Sure I understand.

I’m doing another big change right now where I’m moving to floating point timestamps internally.
Which is going to allow me to get rid of a lot of these “precision loss” issues that you get when you use millisecond integers.
So moving points, pasting points & similar things will become (almost) perfect.
For real though for our purposes it’s going to become perfect.

Unfortunately that will be a breaking change. :pensive:
Meaning that projects created in 1.2.0 won’t work anymore in 1.2.1 but that sounds a lot worse than is you’d just export to “.funscript” and then reimport into a new project.
Now I promise this won’t happen a lot (this very well may be the only time) but in this case it’s necessary.

3 Likes

Hey gagax123, I’ve been using OFS for the past few weeks and by far this is the most intuitive scripter I’ve found. Thanks so much for making this.

I wanted to ask you, just out of curiosity, if you’ve ever thought about mobile capabilities. I spent a good chunk of time flipping through browser based scripters and it seems nobody has made one that actually works on mobile yet. I feel like a gimped mobile browser version of OFS, with say just the record button and a stroker slider is all you would need.

Thought yes. But I don’t plan to work on this for the rest of my life, so no that’s going to happen.

I’ve played with https://emscripten.org/ in the past and already had a scuffed version of OFS running in the browser but it turned out to be way too much work. I’m already struggling enough with windows & linux.

The main issue there is not being able to use mpv in the browser.
You’d have to reimplement the video player using the browsers video playing capabilities.
Which I did but from there on you run into even more problems and it never stops. (I hate the web)

New release. :smirk:
Too lazy to create a new thread for every release but I guess I’ll create a new one once this one becomes stale.

The mpv.conf is potentially interesting.
I say potentially because I couldn’t tell a difference tbh.
But some people may get better seek performance by using an mpv.conf like this.
It definetely works because you can see the increased RAM usage :thinking:

demuxer-seekable-cache=yes
cache=yes
demuxer-max-back-bytes=1000M
hr-seek=yes
demuxer-cache-wait=yes

Best way to improve frame stepping performance is still doing the i-frame transcoding first. :slightly_smiling_face:

1 Like

I’m thinking about ditching the current naive Lua implementation and take it to the next level :sunglasses:
Here’s a silly demo I hacked together webm.red (it’s really just a demo, none of this is final)

Basically instead of Lua scripts I’d like to think of them as Lua extensions instead.

  • One could a imagine a single extension exporting multiple key bindable functions.
  • The ability to create a simple GUI.
  • Variables would persist while the extension is loaded (like in the demo it only resets on reload)
  • (maybe) Hooking into events??? (like when a selection is made, actions are added…)

So yeah I think that would be badass and it’s something I’m going to continue working on.

1 Like

Would be nice if you could make one lua extension with different functions in it so I could reuse the functions and dont have to copy paste or edit them in every script if I make an update.

I think you can already do that by creating a file containing all your library functions in the “lib” directory.
And then in the scripts you put

require “filename”

That should load that file and make all the functions in it available.

What I think is interesting is that this new iteration of Lua extensions is going to make it possible to write extensions for interoperability with other programs.
Like for example an extension which communicates with a buttplug server to support live testing on all sorts of devices. :smirk:
Thinking outside the box here :brain:

I saw someone on github with a buttplug-lua client so the idea isn’t actually original :joy:

1 Like

For some reason, the “Forward 1 second” and “Backward 1 second” keyboard bindings jump 16 minutes and 40 seconds, not one second.

Yes I though I caught everything. Thanks for reporting.
It happens because I switched from milliseconds to seconds.
It’s jumping 1000 seconds…

The buttons next to the play button were also wrong doing 3000 seconds instead of 3 seconds. :scream:

btw if you heavily depend on this working here’s a fixed version AppVeyor

I really start to like the new release, especially that the point marks disappear if you zoom out - it’s a nice QoL feature that lets you see your script much better :slight_smile: (although I haven’t upgraded for a while so it could be in some older releases too)

Since the OFS is running on it’s own project files here are some requests I hope you will consider at some point:

  • it would be nice if the simulator position and settings would also be project specific, so when you work with multiple projects you don’t have to set it up again every time you change them
  • visibilty settings of the loaded scripts could also be saved in the project file, so you don’t have to unmark them again every time you launch OFS, I’m talking about this thing:
    image

I also wanted to thank you again for the great software you managed to create and still making it better every day.

Edit: There is also something wrong with backup naming - it shows a month earlier than it should so for May (05) it shows that the backup was made in April (04).

Export to funscript? I though the only files the app produced was funscript?

OFS writes projects in its own language which needs to be exported into a funscript file type in order to work with any device.

Think of saving an excel file to pdf in order to open with adobe.

Since the 1.2.0 release OFS writes all funscripts used for the video in the single file with extension .ofsp. Earlier it was running solely on funscript format.

When you think about it it’s not a bad idea - if you create multiple scripts for the same video (either multi-axes or versions with/without filler strokes) you don’t have to deal with renaming multiple funscripts to the name of the video or vice versa. It also let’s you save OFS specific settings into this file so when you export funscript you have a clean file without those settings. Exporting a project into funscripts is pretty simple, just like saving the file.

2 Likes

Seems it sometimes does not export the newest version of the funscript if you don’t save the project after you made changes. Cannot reproduce it atm.