Jump to content

Keep NPC Pose/ Animation after reload Area


Recommended Posts

Heyho Community,

is there any way, to keep the pose of a NPC, even after leaving the area and turning back again?

 

 

To be specific: I want some central locations in my Settlements (like the market place) to be quite crowded. Therefore I use some animation-marker mods, where I can assign a NPC to a special floor tile from the settlement workshop and he performs his animation like smoking/ eating noodles...

But because this would be very repetetive for dozens of settlers, I tried some pose/animation mods too - but the problem is:

When I leave the settlement and return, all of the settlers I set into a pose/ animation return to their normal NPC behaviour.

Only the ones I assigned to the animation floor tiles are still there.

 

 

Is there any way, to keep settlers in an animation/pose? (via Console/AAF/another mod)

Link to comment
2 hours ago, HiroTakatsu said:

Heyho Community,

is there any way, to keep the pose of a NPC, even after leaving the area and turning back again?

 

 

To be specific: I want some central locations in my Settlements (like the market place) to be quite crowded. Therefore I use some animation-marker mods, where I can assign a NPC to a special floor tile from the settlement workshop and he performs his animation like smoking/ eating noodles...

But because this would be very repetetive for dozens of settlers, I tried some pose/animation mods too - but the problem is:

When I leave the settlement and return, all of the settlers I set into a pose/ animation return to their normal NPC behaviour.

Only the ones I assigned to the animation floor tiles are still there.

 

 

Is there any way, to keep settlers in an animation/pose? (via Console/AAF/another mod)

 

In my experience it is highly doubtful because NPCs revert to their sandbox at the earliest occasion, but I'll monitor this thread in case someone comes up with a solution.

 

Link to comment
  • 3 weeks later...

@HiroTakatsu

On 5/11/2019 at 10:41 PM, SAC said:

NPCs revert to their sandbox at the earliest occasion

You should be able to get around that with an AI package override, even if you need to apply it to an invisible item you give them.

That said, A: dunno how you'd go about doing it, and B: Unsure how the NPC AI packages work on exit/loading an area.

 

@Kharos might have some insight there.

Link to comment

 

I did the package stuff and still sometimes they animate on savegame load, sometimes they don't

 

The only implementation I've seen working bulletproof is the "Real handcuffs" one, but it's too complex for me to try and replicate

 

 

 

 

 

Link to comment
3 hours ago, SAC said:

 

I did the package stuff and still sometimes they animate on savegame load, sometimes they don't

 

RealHandcuffs does not currently handle furniture, but I remember playing with furniture in the past and having similar problems.

 

Did you set the "Load Into Furniture" package flag? If that does not help, you can also try doing a work around in a script, e.g. by registering for the OnLoad() event of the actor and using SnapIntoInteraction(furniture) to force them back into the furniture on game load. You need to be careful that you unregister your event listener when the player removes the NPC from the furniture though.

 

[Edit] If you want to handle savegame load, you need to listen for OnPlayerLoadGame() on the player actor (i.e. Game.GetPlayer()). But I suspect that you will see similar problems when you leave and re-enter the area, e.g. by fast travelling somewhere far away, or by entering and leaving a nearby building. Actor.OnLoad() will be fired in that situation. I don't remember if it will be fired when loading the game.

Link to comment
21 hours ago, SAC said:

sometimes they animate on savegame load, sometimes they don't

18 hours ago, Kharos said:

handle savegame load

Couldn't you handle that with OnLoad() [game load should do], check for Is3DLoaded(), with a timer to recheck, then wait and register for OnUnload() [game close]/OnCellLoad(), then have what you want trigger off the first one/two [Is3DLoaded(), say]?

Could probably do an OnInit() on the actor, wait until Is3DLoaded(), then call what you're after.

Probably something along the lines of [from the top of my head and too much staring at papyrus yesterday]:

Function StayStill(Actor, akActor)
	If Is3DLoaded() == true
  		akActor.SnapIntoInteraction(furniture)
  	Else
  		Utility.Wait(0.1)
  		RegisterForSingleUpdate(1)
  	EndIf
EndFunction

Obviously the update time changes based on how frequently you wanna check for it, and you'd want to have it cancel checking after X attempts [AAF does this too somehow], and re-register for one or more OnLoad() events.

Reminds me, need to poke someone like Ego 'bout the damn in-function parameters.

Link to comment
27 minutes ago, Nebuchadnezzer2 said:

Couldn't you handle that with OnLoad() [game load should do], check for Is3DLoaded(), with a timer to recheck, then wait and register for OnUnload() [game close]/OnCellLoad(), 


Function StayStill(Actor, akActor)
	If Is3DLoaded() == true
  		akActor.SnapIntoInteraction(furniture)
  	Else
  		Utility.Wait(0.1)
  		RegisterForSingleUpdate(1)
  	EndIf
EndFunction

 

 

As far as I know RegisterForSingleUpdate() / OnUpdate() does not exist in Fallout 4, you will have to use StartTimer()/OnTimer() instead.

 

But if you are waiting for something to happen, polling like that is in my opinion not a good solution and should only be done if no other way is available (and then with a much larger period). I think registering for events like OnLoad(), OnPlayerLoadGame(), or OnCellLoad() is better. - Actually in this particular case you may be able to use WaitFor3DLoad().

Link to comment
52 minutes ago, Kharos said:

As far as I know RegisterForSingleUpdate() / OnUpdate() does not exist in Fallout 4, you will have to use StartTimer()/OnTimer() instead.

Quite possible. Was lookin at the CK wiki.

53 minutes ago, Kharos said:

But if you are waiting for something to happen, polling like that is in my opinion not a good solution and should only be done if no other way is available (and then with a much larger period). I think registering for events like OnLoad(), OnPlayerLoadGame(), or OnCellLoad() is better. - Actually in this particular case you may be able to use WaitFor3DLoad(). 

Also true.

Function StayStill(Actor, akActor)
	WaitFor3DLoad()
	If Is3DLoaded() == true
  		akActor.SnapIntoInteraction(furniture)
		akActor.RegistorForOnUnload()
  	Else
  		akActor.RegisterForOnLoad()
  	EndIf
EndFunction

Something along those lines, then?
Obviously assuming already triggered from an OnLoad(), and you'd need something to check for player interactions.

Link to comment

Probably something along these lines - I think WaitFor3DLoad() returns true if the 3D is loaded, so you can use it directly inside your If condition. In the end you will have to try it out to see if it works, it's the same for me when I write papyrus scripts.

 

5 hours ago, Nebuchadnezzer2 said:

Quite possible. Was lookin at the CK wiki.

 

You need to be careful as the wiki has pages for both Skyrim and Fallout 4. The fallout 4 pages are the ones with fallout4 in the url.

I.e. this page here is the wrong one, it is the Skyrim page:

https://www.creationkit.com/index.php?title=Actor_Script

The correct one for Fallout 4 is:

https://www.creationkit.com/fallout4/index.php?title=Actor_Script

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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