Faster, Easier Scripting - How to make scripts twice as quickly by using CheatEngine! (OpenFunScripter)

Greetings, friends.

It came to my attention that this little-known method would probably never be known anyone unless I made a post for it.

What is the trick here exactly?
Basically, you can use CheatEngine to speed up how quickly you can navigate your video in OFS by using your Left and Right-Arrow Keys. This lets you quickly plot points, and then press+hold left or right to playback the video at close to real-time speed, and quickly plot points accurately and quickly.

Cheat Engine download: Cheat Engine
Make sure not to install the additional software (adware) upon setup. I use the 64-bit launcher.

Open up OpenFunScripter.

Open CheatEngine > Hit the process button in the top-left:
image

Type in “open” so that you can quickly find OpenFunScripter.
image

On the right side in CheatEngine, check [ X ] Enable Speedhack.
Set it to a value (usually around 2, maybe 1.7 to 2.4 at the most) and hit Apply.
image

In OpenFunScripter, override the framerate and set it to:
a. 25fps if you want to script quicker.
b. 50fps if you want to script optimally for The Handy and don’t mind scripting a little slower

Generally I’d recommend 25fps or 50fps due to the ability to divide 1000 milliseconds by these values - it creates a bit more smoothness on machines.

Ideally, you may want to re-encode your video to a lower quality 480p version to Handbrake, so that you can more quickly move back and forward. High filesized and high resolution videos can make OpenFunScripter go a little slower.

Here’s a comparison of a 2160p video (left) vs. a 1080p video (right). I’m showing attempting to move back and forward 1 frame, and then at the end I’m fast forwarding it by holding right-arrow. On the 2160p, the video won’t even load while holding the right arrow, but the 1080p will load.

And here’s an example of the speed you can get for reviewing a script:
Here I’m just scrolling through with Left Arrow and Right Arrow to show the speed. (though I had already plotted the points here).
You can see that it’s about as quick as normally pausing and unpausing the video, which is crazy:


Moving backward is just as fast, though I didn’t demonstrate it much here.
You can see how quickly you can scroll through a video to find the top and bottom points in scenes using this method.

The bottleneck for being able to skip through the frames are the following:
1 - use x264 instead of x265 for faster decoding
2 - file size - probably the biggest factor. 300MB at 1080p is much faster than 2GB at 1080p.
3 - file access speed - use the video off an SSD for faster access
4 - file resolution - not as important as file size, but they are both correlated.

So basically, re-encode your video to a 480p version with Handbrake and script with that, and use CheatEngine, and you’re good to go.

This setting under Preferences in OpenFunScripter might help, but the limitations above are more important:

I started scripting out like a few minutes of a scene and honestly, doing it this way is easily 2-3x as fast overall as playing and pausing and going back slowly frame by frame. Crazy.

5 Likes

I don’t see the point here, but maybe I’m missing something.

The key to get rid of lag when stepping back and forth using the arrow keys is to use only I-frames (full frames) in the video, which has been described in the how-to scripting guides and the feature is available in some of the tools in the software section.

The lag comes from decoding partial frames and by removing those you can use higher resolution than HD if you want. Encoding and file size aren’t an issue either (when you remove the video compression files become large and decoding becomes trivial). The video files I use to script with are usually 10-30 GB and that cause no performance issues in OFS.

When I script VR I usually downscale resolution since my sources are usually 4K-8K, but for flat 1080p and 720p I keep the resolution unchanged (i.e. no need to go down to 480p as you suggested). I also reduce the fps to 30 since 60 fps causes twice as many key presses and that detail is generally not needed when scripting based on visual input (scripting to audio beat may benefit from higher fps for better accuracy).

Since you recommend re-encoding the video I don’t see the benefit compared to using a video consisting of only I-frames.

1 Like

Correct. I also reencode videos to iframes with FunExpander. What I noticed is that things still desyn with the 60fps video then (just a little bit). Any tips for that (without having to manually fix here and there)?

1 Like

Maybe this will help?

1 Like

You could just… Do my method and reencode the video as 480p x264 60fps.
Honestly it takes so little time that I never tried the i-frame trick due to people to talking about the death issues with scripting. Also with the i-frames thing you have to maintain double the storage for that video at the time just so you can script it, so I’ve always just done an encode with Handbrake.

I found the i-frame trick almost as fast as the full video reencode, yeah. I play some of my videos off of a network drive though so it’s a bit faster for me if I just do the reencode.

The point of the guide was the CheatEngine part, not really the encoding part. And for why I choose to encode rather than use the i-frame removal trick with FunExpander, see my reply above this one.

There’s lag, and there’s playback speed. Playback speed of going left and right is fixed at a certain number of frames you can scroll left and right, per second, and that number seems to be about 12-15 frames per second of scrolling speed with OFS on default, so for a 24fps video you can scroll through it at about full playback speed and plot points faster, moving backwards and forwards and very quickly move to the the max and min points within a scene and plot the points.

I am only scripting VR and video resolution is a non issue (same with size, I have 35TB of space for VR videos). Filesize itself is also a non issue.

Also checked your examples, but just moving the video is as quickly as watching for me (same as playback if I hold the keys, no lag) so that’s also not a problem.

The only thing that would be quicker for me (which is what I used iFrames for) is only having to press right(E) twice instead of once, but I also noticed that scripts for VR are not perfectly frame by frame if I do it with iFrames. Using CheatEngine I get the same issue. Scripts are not perfectly (frame perfect) synced anymore if I use them with the 60fps source.

But still thanks. Should be good for 2D stuff.

Ahh, I had no idea the difference between scripting 2D and 3D things there, yeah. I’m not really sure on the reason there.

So technically there is a slight delay before Windows lets you do a “Press and Hold” to repeat a key (they call it Repeat Delay):

CheatEngine can actually halve this initial Repeat Delay, which is another benefit of using it for scripting. This plus the speed increase makes it pretty good for 2D videos.

Funnily enough, I retried my 2160p vs 1080p experiment again and now the 2160p one works better after I restarted my computer. Sometimes it’s a caching or network drive of RAM thing for me though. I have a 14-core CPU so usually it’s pretty fine without needing a re-encode.
One other aspect is that I use a 165hz monitor, so sometimes I can see the cheatengine improvement a bit more on my end, and feel like I’m zipping through the video more quickly. It’s also changing your keyboard input delay with the program from 20ms to 10ms, so on 60hz it’s less noticeable. I think the press+hold and the video speed increase are good benefits though, and because when you go back and forward a frame, it’s twice as fast either way. I could do a vid comparing cheatengine vs. no cheatengine…

I think it’s more beneficial for slower scenes, like speed 100-200 speed scenes especially since the video speed increase lets you make use of the faster navigation. For a faster video like a 500 speed penetration scene, there’s not much improvement I’m finding.

I just had that with my latest release (Valorant Viper) and for the slow blowjob parts I just hold D (= arrow right) and it’s just as smooth as your examples. I am scripting frame by frame so I depending on the video I will press D or A a lot (and W and S for point jumping). With iFrames or your CheatEngine trick it’s half of those presses. The thing is that things change a bit if I use the 60fps afterwards and check that one. A bit off and things like vibrations also start to work differently. Havent tested with 2D stuff though, but there shouldnt really be any difference there.

Ok, then I understand your post better and what you are trying to solve. :slight_smile:

If you have a gaming keyboard you often have a software that let you configure all sort of things. Some allow you to control this repeat delay and repeat speed. Some also allow you to set the actuation i.e., how far down you need to press a key for it to be detected as a keystroke. This can also be an option to speed things up.

1 Like

I think the benefit is with 60fps videos especially on slower BJ scenes, since scrolling through the video will take too many frames on a slow deepthroat scene, for example.

1 Like

Look what I found…

This is kind of useful but I’m not looking to skip frames, but rather speed up the process of going through frame by frame, both forward and back.