Jump to content

[LE] Custom package inconsistent results - any idea?


Hoamaii

Recommended Posts

Hey guys,

I need a second set of neurons to figure this one out:

I'm trying to create a custom package to get the player to find, travel to and use a custom Sit furniture (SpecialFurniture keyword) using custom animations.

My custom furniture works fine when activated directly in game or thru script: the actor positions correctly and plays the intended animation.

BUT when using a package, I get totally unreliable results:

- when starting the package from a fair distance of the furniture (approx. > 128 units), it will:

a. sometimes: walk to the furniture alright, position correctly on the entry marker and play the animation ok - that's good.
b. at other times: start walking, stop, start running (tho' preferred speed is set to "walk"), stop again, then jump to the entry position before playing the anim - NOT good.

- when starting the package from activation distance (less than 100 units), it will walk to the furniture ok, position on the entry point alright, then start SLIDING away (probably translating) and end up playing the animation in a completely misaligned position - NOT good at all!..


I tried this on Sit packages and on Activate Packages - I get the SAME unreliable behaviors no matter how I sequence procedures and no matter what package I test:

SIT PACKAGE 1 - variation based on the "Sleep" template
Sequence
	Procedure: Travel
	Simultaneous
		Procedure: Find
		Procedure: Sandbox
	Simultaneous
		Procedure: Sit		- "Success completes package"
		Procedure: Wait
	
ACTIVATE PACKAGE - variation based on the "Sleep" template
Sequence
	Procedure: Travel
	Simultaneous
		Procedure: Find
		Procedure: Sandbox
	Activate				- "Success completes package"
	
SIT PACKAGE 2 - variation based on the "Sit" package
Sequence
	Simultaneous
		Procedure: Find
		Sequence
			Procedure: Travel
			Procedure: Wander
	Simultaneous
		Procedure: Sit		- "Success completes package"
		Procedure: Wait

What I dont get is if I use a Sleep package to get the player to walk to a bed and activate it, it'll work flawlessly everytime and no matter how close or far from the furniture the package starts. I probably can solve this with script but I really need understanding what's going on here before I experience further with packages.

Any idea what may cause my actor to translate around after he activated or sat on my furniture on package?
(again, my furn works just fine when activated directly in game or thru script)

Or what may cause his Find/Travel procedures to stutter like that at times?

 

Many thanks in advance for any enlightening input!.. And a happy new year to you all, guys!

 

Hoamaii

Link to comment
Share on other sites

This will not help you, but i just wanted to express my frustration...


I try to make some more detailed packages to give to some npcs a more realistic everyday behavior, but i had some kind of the same results with yours.


Sometimes they would work flawlessly and some other they just refuse to work, i try every possible thing i could think of to try to make them consistent, but with no success...

Making it so that it will generate a realistic behavior on a group of npcs (like 25), it will just not work !, it will only work if you use the vanilla set up (Packages, presets).


At the end i just give up and concluded that the coding of packages is very bad, they will only work within their pre assign vanilla limits, or when they are force to.


It's a shame we don't have access to those codes, it would make our life much easier !.


Happy new year to you too.

Link to comment
Share on other sites

Hey Max, thanks :smile: and you're right, very frustrating!.. Been at it for at least 10 hours, trying different data input, sequences, procedures... for not worse but certainly not better results!.. Only consolation is using Beth's templates doesn't make it any better!..

 

And to think: I'm only trying to use Furniture because they're supposed to lock actors on entry points!.. only to watch them "slide" away from the damn entry points it took me forever to position properly... :wallbash:

Link to comment
Share on other sites

... HOURS of frustration later...

 

For the first time in years of modding and fighting the CK, I'm on the verge of giving up!... * :pinch:

 

No matter what I test, my PC keeps SLIDING away from my furniture when completing (either) package!.. Adding SetVehicle(target) at the end of package makes it even worse because he will then position on the pivot point of my furniture rather than on the entry point!.. Then I wondered if this idiot "sliding" thing was not due to some collision setting on my furniture - tested more stuff in Nifskope... to same sliding results!.. :wallbash:

 

Now I'm thinking these procedures don't really end when activating the furniture... or ending is delayed by some other other procedure while my PC is being slowly pushed away by other collision objects in the landscape (pure hypothesis!).

 

 

I made an interesting discovery though: you can use the "Sleep" procedure (Template or not) with "Sit" furnitures (no "shut eye" bug issues as long as the sleep animation does not play) - and that package is the "less bad" of them all (sliding stops faster) :rolleyes:.

 

This whole experience seems to completely defeat using custom furnitures with packages!.. I'd probably be better off scripting my furniture directly and using markers to get my actors to "PathToReference(...)"!... Sigh...

 

 

Well, if any compassionate soul wants to share his experience... I'm still listening!.. Thanks! :smile:

 

 

* giving up that approach, not giving up modding ;)

Link to comment
Share on other sites

Interesting discovery, but i personally won't be going into trying to make my detailed packages work, i'm done with it, i just used the vanilla stuff as they are to make some custom packages (sleep > work > rest).


I was going to suggest in my previous post that you can use use "PathToReference()" (i just have a suspicion on what you are working), but there is a big issue with this approach.


If anything is in the way or gets in the way between where the "PathToReference()" sequence starts and where its heading target is, the sequence will always get interrupted.


* Sometimes (1 out of 10, more or less) a weird bug occurs, since the "PathToReference()" needs to be used with (for the Player):

Game.DisablePlayerControls()

Game.SetPlayerAIDriven()

Actor.PathToReference()

When the "PathToReference()" gets interrupted, the actor will stop moving/walking and in the case that the actor is the player, (sometimes) he won't exit "Game.DisablePlayerControls()" + "Game.SetPlayerAIDriven()", it will just get stuck waiting for the sequence to complete itself.


This approach requires to always have a clear path from the starting sequence point to the sequence target.

Edited by maxarturo
Link to comment
Share on other sites

Hey Max, thanks!.. Yeah, that's why I have only ever used "PathToReference" in cells where I had completely redone the navmesh so far. From my experience however, packages can have the same issue, if the actor encounters a navmesh island which prevents them to "Travel" to their destination, the package never completes - but at least you can stop your quest when that happens.

 

Before I completely give up on packages, I'm going to try and use a different animation set first, and another furniture mesh as well - I'm still unsure whether collision has something to do with this "sliding" effect. Then try that on NPCs too.

I'm kind of stubborn - so far, I've always been lucky enough to find workarounds to the game's limitations, but that involves some documentation and custom furniture is one of the least documented aspect of modding Skyrim. I used the same procedures in F04 and had no issue whatsoever, but of course F04 CK lets us create custom furnitures way more easily.

 

You're probably right about your "suspiscion" ;): I created new sleep animations which I can't use as replacers yet because they only work on 2 actors sharing bedrolls or beds - and that's a set of 9 x 2 synched animations per furn type, no other way to implement these but on custom furnitures (or using loose anims but that'd be an even worse nightmare positioning my actors properly!..). So far, I've only been trying to spawn my custom furn on top of a regular bedroll with an activate perk and even though I disable footIK, I'm still unsure whether the underneath bedroll's collision isn't partly responsible for improper positioning.

 

As for "PathToReference(...)" if I have no other choice but to use it, I was thinking of trying to mimic the "Sit" package with a spell while running a countdown on the furniture to dispell it in case path gets interrupted. No idea if that would be enough to cut "PathToReference(..)" short on bad navmesh though but that's easy enough to test. You ever tried that?

 

 

Thanks for being around, Max, that's very helpful really. The simple fact of being able to discuss issues and share experiences with other modders often brings up possible workarounds I had not considered yet :).

 

I'll probably be back sharing more of my stupid trials... Cheers, man!

Link to comment
Share on other sites

"No idea if that would be enough to cut "PathToReference(..)" short on bad navmesh though but that's easy enough to test. You ever tried that?"


No, all my test was done inside my cells where all NavMesh is done freehanded (not to brag, but they are perfect).


As for the "PathToReference(..)" needing to use NavMesh for the Player or npcs, i don't know... this needs testing, although my suspicion is that it doesn't need it, but it's only a suspicion.


My suspicion lies in the fact that the "PathToReference(..)" will draw a straight path line between the start point and the target.

Link to comment
Share on other sites

Oh, I'm pretty sure "PathToReference(...)" fails completely in non-navmeshed places. It fails for both player and NPCs. That "straight path" it draws between its initial position and its target is usually what you get when you test a cell's navmesh with "Test Navmesh" or "Toggle Preferred Pathing". I tested it plenty in MannyGT "GrayCowl of Nocturnal" mod (most dungeons where he didn't place enemies are not navmeshed, which means unplayable for NPCs but not for the player - call a package in there and you get completely stuck). Also tested it in some of my mods' holding cells before navmeshing them, NPCs never budge from the COCmarker.

 

I'm still testing stuff and making some progress (at least I think...) - I'll probably create a new thread when I get some consistent results.

Link to comment
Share on other sites

Well, the positioning issue when running a package definitely looks like it is caused by collision interferences between the furniture's collision shape and its entry points positioning.

Here's how I explain the difference in player positioning between activating the custom furniture directly in game or activating it with a package so far:

1. when using direct in game activation, collision is immediately disabled, the player is teleported to the entry point before the animation starts => player enters animation in the exact position of the Entry Point.

2. when using a package, the "Travel", "Sandbox" or "Wander" procedures do acknowledge surrounding objects' collisions. Collision is still accounted for when the player attempts to position on the Entry Marker: If that Entry Point somehow covers the furniture's collision object, that collision object will try to push away the actor before activating the furniture - thus causing misalignments before the "Sit" procedure starts running. When the "Sit" procedure finally completes package, the actor is never teleported to the Entry Point: as a consequence, "Enter" animation starts playing from wherever the entering actor has been positioned by preceding procedures and that may cause serious offset.

 

Occasionally, IF, and only if, the "Travel" procedure is somehow blocked by some other object or a navmesh island, the actor may eventually teleport to the "Sit" Entry Point and end up starting the "Enter" animation in the expected position - or never completing his package.

 

Procedures being hard-coded and not much documented, that's only a hypothesis of course, but very consistent with all my testing.

 

As far as I can tell, this is also true for Vanilla furnitures when used with packages, which could possibly explain NPCs occasionally sitting in mid-air some units away from the furniture's mesh (I saw that happen a lot in Solstheim).

 

 

Custom furnitures for custom animations being not much documented, I'll create a new thread about them once I've gathered all my testing results about:

- Nifkskope settings and flags for custom furniture

- Collision settings

- Entry Points settings and positioning

- Heading settings

- Activation

- Reservation system

- Limitations of custom animations use with furnitures and possible workarounds.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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