Jump to content

Follower Forcegreet without Scenes and Other Questions


Recommended Posts

I've had this problem lingering with me for awhile and since I am now on borrowed time with this new job, I need some honest help with this. I am trying to make an active follower (meaning a follower that is currently following me) do a forcegreet when at certain stages. Unfortunately, I asked about this 6 months ago and I was never able to resolve it. I know how to do it with people that aren't following me and I can only get it to 100% work when working with scenes. But I always felt like there had to be another way of simplifying this. So I am asking someone to give me a better step by step way of doing this.

 

Here is my approach:

 

-Create a quest with an alias to use for scene

-Create a forcegreet package.

-Create a scene within the quest that contains the package

-Use papyrus to run a if-statement system with oninit and onupdate with the quest stage being the factor for it.

-When stage happens, script completes and scene plays out - Forcegreet happens.

 

My example code:

Scriptname SDETestScript extends Quest  Conditional

Quest Property DLC1VQ08 Auto
Scene Property MyScene Auto

Event OnInit()
	RegisterForSingleUpdate(1.0)
EndEvent

Event OnUpdate()
	if (DLC1VQ08.GetStage() == 10)
		MyScene.Start()
	else
		RegisterForSingleUpdate(1.0)
	endif
EndEvent

And from there, the forcegreet works without a problem.

 

But I always felt like there should be a way to do it without a scene and I haven't been able to figure it out. I tried adding a package into an alias and creating a code to evaluate package and it didn't work with the code being:

Scriptname SDETestScript extends Quest  Conditional

Quest Property DLC1VQ08 Auto
referencealias Property Alias_Serana Auto
Scene Property MyScene Auto

Event OnInit()
	RegisterForSingleUpdate(1.0)
EndEvent

Event OnUpdate()
	if (DLC1VQ08.GetStage() == 10)
		Alias_Serana.GetActorReference().EvaluatePackage()
	else
		RegisterForSingleUpdate(1.0)
	endif
EndEvent

But that didn't work. So at this point, I have to throw in the towel and hope someone can give me a better way of doing.

 

Also, (somewhat unrelated) I am planning on using multiple scripts that uses the OnInIt/OnUpdate RegistserForSingleUpdate loop for my mod, my question is will having multiple scripts of these cause any issues like script lap or, heaven forbid, save bloat. I know that if the mod is ever removed that it my through a single error for each script, but I never asked about the lag in scripts or such.

 

Thank you.

Link to comment
Share on other sites

Err, am I missing something or can't you just add a forcegreet package to his alias with conditions isinexterior==true stage==w/e global==1 after the dialogue change global to 2, done

They evaluate packages like what every now and then and directly on cell load I think so stands to reason if that is on top of the stack the moment you walk outside BAM forcegreet

 

Packages have a condition tab, I use them all the time, probably a little too much but it is a bit easier than scenes sometimes and no time limit (Unless you use the time limit page)

 

I will try to check in to see but leaving for vegas in the morning, but 100% that should work, I swapped people into forcgreet packages using globals at end of scenes in DW and it worked usually pretty fast, sometimes a 2-4 sec lag as the game changed packages or some weird s#*!, think it mighta had to do with the distance from the player.

Link to comment
Share on other sites

f your wanting to override packages on the fly without the actor being in a reference alias at all (works with the actor in a reference alias as well).
ActorUtil from PapyrusUtil package does it quite well.
I found it here on nexus, easy to use skse plugin and has some handy functions as well:
http://www.nexusmods.com/skyrim/mods/58705/
ActorUtil Functions:

scriptname ActorUtil Hidden

;/
    Override packages of actors.

    These overrides persist through save games. If you override package on same actor
    more than once then the package with highest priority will run, if multiple
    overrides have same priority then last added package will run. Priority ranges
    from 0 to 100 with 100 being highest priority.
/;

; This will add a package to actor that will override its normal behavior. Using this function overrides all packages added from any other location.
function AddPackageOverride(Actor targetActor, Package targetPackage, int priority = 30, int flags = 0) global native

; Remove a previously added package override.
bool function RemovePackageOverride(Actor targetActor, Package targetPackage) global native

; Count how many package overrides are currently on this actor. It will also count ones that's condition isn't met.
int function CountPackageOverride(Actor targetActor) global native

; Remove all package overrides on this actor, including ones that were added by other mods.
int function ClearPackageOverride(Actor targetActor) global native

; Remove this package from all actor overrides.
int function RemoveAllPackageOverride(Package targetPackage) global native
I mostly use the storage functions so I can keep my mod settings on a new game start.
But there's really a lot it offers that you just cant do with papyrus or skse alone.
Link to comment
Share on other sites

Err you don't need papyrus (besides changing a global) and especially not skse for what he wants, it's a known actor with known conditions saying a known dialogue tree. Correct me if I'm wrong. I might have time to fire up the ck later on my wife's laptop and give you a rundown but if not. Thursday night ;)

Besides her laptop drives me batshit insane. Try going from 3hdtvs 1 UHD and 1 reg monitor to a 17 inch screen. I lose my s#*! but the room we got has a balcony overlooking the pool so I can chuck it in there

Link to comment
Share on other sites

I'm aware of this, but just opening other options doesn't hurt either.
As I did some tests and ActorUtil works fine for doing a force greet on the fly without all the quest hoo haa.

Also did the force great without third party crap using conditions and a forced ref alias without scenes.
Drawback though is if the actor is already in an alias and that alias quest priority is higher then yours then their alias packages will override your alias packages regardless of your package conditions.
Didn't have that issue using the third party ActorUtil functions.


So no biggy.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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