Jump to content

Recommended Posts

AAF NativeSync

View File

What does this do?

 

By default, AAF uses Papyrus to play animations on multiple characters at once. However, due to Papyrus lag, this can result in a noticeable desync between the characters, where one lags behind the other. NativeSync corrects this issue.

 

An animation from BP70's pack, played using AAF v166 in a game install with ~200 mods:

Spoiler

 

 

 


The same animation in the same game install, but with NativeSync turned on:

Spoiler

 

 

 


How does it work?

 

NativeSync is an F4SE plugin that takes in a list of idles and actors, and plays those idles in sync as precisely as the game engine will allow. NativeSync comes with an edited AAF_MainQuestScript file to automatically integrate into AAF animations. NativeSync also includes a fix for the vanilla bug that causes creatures to get stuck in animations after an AAF scene ends.

 

The sync should be perfect on all human animations. Creature animations don't work the same way as human animations, so it may be hit-or-miss on non-human races.

 

Requirements

 

- F4SE

- Address Library for F4SE Plugins
- AAF (Must be version 166)

 

Credits

 

- Ryan-rsm-McKenzie for CommonLibF4

- dagoba_king for AAF

- F4SE Team for F4SE

 

Other Links

 

Ko-Fi

Discord for my Fallout 4 Mods


 

Link to comment

This is a really cool idea!

 

My only concern is that you don't mention whether permission was obtained from the AAF author in order to redistribute a modified copy of one of its scripts (nor mention them in the credits).

 

Quote

The sync should be near-perfect most of the time, but due to the game having to load animation data from disk, there may be some unavoidable desync the first time an idle is played. Switching to a different AAF position then back to the first one will resolve that issue.

 

Could something like Buffout 4's file cache be used to preload these at game start, in order to mitigate this?

Edited by vaultbait
Link to comment

I used SEU to test several animation trees of the automatic stage at a place where many real lights and textures were loaded. In the past, it was easy for the automatic stage switch to be out of sync due to the decline of fps. This time, all stages were synchronized

Based on the fact that I chose the place most likely to have problems and the test results are good

It shows its claimed functions, and I think it has succeeded:star:

Link to comment
3 hours ago, Deadpoolkitty said:

What makes the movement look like that ? is it a shader or a mod?

 

If you will take a look to the differences in AAF_MainQuestScript.psc then you will found that loop over actors (that initiates animations of actors) replaced by single native function call.

Papyrus code (including code inside loops) might be executed with noticeable delay between two statements, so animation for the second actor might start a bit (a few frames) later than for the first actor. Single native function call allows to start all animations at same frame and this eliminates delay.

 

Well done, @Snapdragon_. Thanks.

 

Edited by Dlinny_Lag
Link to comment
7 hours ago, Snapdragon_ said:

due to the game having to load animation data from disk, there may be some unavoidable desync

It can be, potentionally, avoided.

I'm not sure about available API in CommonLibF4, but making your function "latent" (I would prefer to name it async) migth allow to "await" for of all animations loading finish, start them at same frame and then return control to Papyrus script.

Edited by Dlinny_Lag
Link to comment
On 1/9/2023 at 7:48 AM, vaultbait said:

My only concern is that you don't mention whether permission was obtained from the AAF author in order to redistribute a modified copy of one of its scripts (nor mention them in the credits).

 

I've amended the credits and pinged dagoba on Discord to make sure he's okay with it.

 

(Dagoba's Response):

Spoiler

image.png.d4c8532c67d56c2fceed114b76b63db8.png

 

On 1/9/2023 at 7:48 AM, vaultbait said:

Could something like Buffout 4's file cache be used to preload these at game start, in order to mitigate this?

 

The game has its own system for caching idles, but the functions for that haven't been found by anyone yet.

 

On 1/9/2023 at 11:20 AM, Deadpoolkitty said:

What makes the movement look like that ? is it a shader or a mod?

 

sorry it just looks nice and wanted to know what it is 

 

If you mean the motion blur, it's a reshade shader called LinearMotionBlur.

 

On 1/9/2023 at 3:08 PM, Dlinny_Lag said:

It can be, potentionally, avoided.

I'm not sure about available API in CommonLibF4, but making your function "latent" (I would prefer to name it async) migth allow to "await" for of all animations loading finish, start them at same frame and then return control to Papyrus script.

 

The function is indeed currently marked as latent. I think the solution to the issue would be to hook into the game's idle cache system and wait for the 'loaded' event, but no one has found the offsets for that system yet.

 

Edited by Snapdragon_
Link to comment
31 minutes ago, Snapdragon_ said:

 

Could you provide a crash log from Buffout 4? (Buffout 4 information can be found in the AAF setup guide.)

Also check the NativeSync.log file in [User]\Documents\My Games\Fallout4\F4SE

[01/22/2023 - 19:51:21] [info] NativeSync v1.0.0
[01/22/2023 - 19:51:21] [info] NativeSync loaded.
[01/22/2023 - 19:51:21] [info] Successfully registered Papyrus functions.
this is what the log says, ill try the buffout in a bit

Link to comment
1 hour ago, ShyGirlDanceParty said:

i didnt get that, i installed everything correctly aswell, weird

 

If your game crashed and there was no crash log created in the F4SE logs directory, then it's likely something's not installed correctly. Check the f4se.log and make sure it doesn't mention a failure to load any DLLs.

Link to comment
7 hours ago, ShyGirlDanceParty said:

it says it loaded correctly

 

In that case, check the Buffout4.log and make sure it doesn't mention some problem which might have resulted in it being unable to generate the crash report. If things are okay with Buffout4 you would normally only see a single line in the log like this:

 

E:\Repos\f4se\Buffout4\src\main.cpp(70): [info] Buffout4 v1.26.2

 

Link to comment
On 1/26/2023 at 7:38 AM, vaultbait said:

 

In that case, check the Buffout4.log and make sure it doesn't mention some problem which might have resulted in it being unable to generate the crash report. If things are okay with Buffout4 you would normally only see a single line in the log like this:

 

E:\Repos\f4se\Buffout4\src\main.cpp(70): [info] Buffout4 v1.26.2

 

thats what it says aswell

 

Link to comment
5 hours ago, ShyGirlDanceParty said:

thats what it says aswell

 

How early is the crash occurring? If it's during game startup, maybe you're missing the Plugin Preloader? Otherwise I'm baffled how you could get a crash to desktop with working Buffout 4 and not have a crashlog file. Or maybe "my game crashes" means something to you other than a spontaneous exit of the game engine throwing you back to the desktop?

 

Are you using the latest F4SE version (0.6.23) with the latest version of the Fallout 4 game engine (1.10.163)? And it's not a pirated copy of the game, hopefully?

Edited by vaultbait
Link to comment
18 hours ago, vaultbait said:

 

How early is the crash occurring? If it's during game startup, maybe you're missing the Plugin Preloader? Otherwise I'm baffled how you could get a crash to desktop with working Buffout 4 and not have a crashlog file. Or maybe "my game crashes" means something to you other than a spontaneous exit of the game engine throwing you back to the desktop?

 

Are you using the latest F4SE version (0.6.23) with the latest version of the Fallout 4 game engine (1.10.163)? And it's not a pirated copy of the game, hopefully?

yup, did all it asked me to, its a legit copy and up to date, even installed that microsoft stuff that the plugin preloader said to, the game crashes when i load in. like if i start a new game its fine but once im done making a character and aaf is gonna start, it crashes

Link to comment
18 hours ago, ShyGirlDanceParty said:

yup, did all it asked me to, its a legit copy and up to date, even installed that microsoft stuff that the plugin preloader said to, the game crashes when i load in. like if i start a new game its fine but once im done making a character and aaf is gonna start, it crashes

 

Do you have Gender-Specific Skeletons installed? That mod is known to cause a crash when creating a new game.

 

There's nothing in NativeSync that initializes on new game/loading a save. It only does stuff when an animation is played through AAF.

Edited by Snapdragon_
Link to comment
On 1/29/2023 at 6:36 PM, Snapdragon_ said:

 

Do you have Gender-Specific Skeletons installed? That mod is known to cause a crash when creating a new game.

 

There's nothing in NativeSync that initializes on new game/loading a save. It only does stuff when an animation is played through AAF.

even when i load my old save it doesnt work, just crashes

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use