OpenFunscripter - another scripting tool - 2.0.0 release

I’d say the next step would be to clean up %appdata%/OFS/OFS_data

I just deleted %appdata%/OFS/OFS_data and the program started right p perfectly!!
Unfortunately I think it is the non-AVS version. I will use the one that now works until I either need AVS or find out that that is what is loaded.

Is there a way to tell which I have loaded?

And thanks for the suggestion as I had forgotten about the app data.

No, no way to tell.
But it’s just very minor performance difference (10% at best).
You’ll be fine either way.

1 Like

Does anyone know if you’re able to control playback speed with Lua with some command/variable?

@Judge No that is not a thing at the moment.
I can trivially add that.

However I’m slightly confused about the use case. :thinking:

I’m liking the idea to have different offset timing for different playback speed setups.

Having to change from 0.12 and 55ms and then to 0.2 and 60ms lots of time gets a bit time consuming. And if you haven’t scripted for a while it’s easy to forget the values that you have setup for each playback rate.

I am also using the motion tracker to fast setup some strokes, then I go through each stroke to readjust timings and position.
But if it would be possible to instead having the speed of 0.5 playback rate until it the strokes are close enough, and then change playback rate to 0.1 you can more easily scrobble through each point.
Otherwise having different intervals and playback rate of 0.1 is a bit tricky to manually adjust the playback rate in-between strokes.

If I unsterstand correctly you need to set the playback speed as well as the offset which is applied while playing the video.
I can add both of those things to the Lua API.

I’m going to release OFS 2.0 soon so any changes you request now can still make it into that release (as long as they are not to big).
I completely rewrote the Lua API and there are breaking changes between the current version 1.4.4 and 2.0.
There’s also this new API documentation openfunscripter.github.io/API

1 Like

Exactly :slight_smile:

The offset is already possible to define, just using a variable and using the actions.at and player.CurrentTime function (Even though this makes me create new functions for stroke insertion).
It would only be the changeable playback speed parameter I would need to solve my issue.

There seems to be a misunderstanding.
I thought you meant this offset
Screenshot
but I guess not?

Either way I added a “playbackSpeed” property which can be read or written to from Lua.

function fun()
  print("Current speed: " .. player.playbackSpeed)
  player.playbackSpeed = 1.0 -- set it to 1
end

So that’s going to be in the next release.

1 Like

Offset property would be good, but I solved it by creating my own stroke insertion script with my own offset parameter (So I guess I cheated a bit, since I’m not using the original “action at” keys).

My code example

OffsetTiming = 55

if player.IsPlaying() then
ofs.AddAction(script, currentTimeMs - OffsetTiming, 0, false)
else
ofs.AddAction(script, currentTimeMs, 0, false)
end

Awesome! I’ll be waiting for the next release with the playback property :slight_smile:

So I finally decided to create the 2.0.0 release.
I’ve been sitting on some of these changes for quite a while.

A few important notes

  • Extensions for OFS 1.4.4 need to be updated for 2.0.0 (sorry for that)
  • OFS 2 creates a new app directory to avoid some compatibility issues between 1.4.4 and 2.0.0
    • The new directory is %appdata%/OFS/OFS2_data
    • You can run OFS 1.4.4 and 2.0.0 side by side since they don’t share the same directory
    • Otherwise you may want to delete %appdata%/OFS/OFS_data
11 Likes

Anybody know how and if i can reflect Sway and Surge with the 3D simulator?

No that doesn’t exist.

Any chance to let OFS not use as many resources when the video is paused?
I often take pauses while scripting and if OFS is in the background it’s still using CPU.
I mean I could just close it, no big deal, but it shouldnt still use resources while paused / minimized.

Sort of on my list of things nice to have.
I can’t free any RAM if that’s what you’re asking.
However reducing CPU usage while in the background is very much possible.

1 Like

Yeah CPU. I’m not experienced enough in coding and so I don’t know where this is coming from (ffmpeg?) but shouldn’t it be like idling already while the video is just paused? Just like a media player usually does?
Anyway, thanks!

dang, any change that it will be implemented?

What do imagine it would look like?
Cause making it move left/right and up/down based on surge and sway is trivial.
I just don’t know if that alone is satisfying or if it needs to do more than that.

Edit: I got that wrong sway is left/right surge is forward/backward.

Maybe something like a small 3D enviroment as seen in MOSA https://trymosa.netlify.app/

Or maybe even something like a small isometric view with an adjustable camera - i dont know how hard that is to code tho.

1 Like

I’m not happy with the 3D Simulator.
I would like to do a complete rewrite from scratch (for many reasons).

I like the mosa visualizer. I would even go so far to it’s better than what OFS currently has.
It would be nice to get more input on this from people who use the 3D Simulator.
However this thread is not the correct place for this discussion.

2 Likes