Can you track how many times a package runs?

Post » Tue Oct 08, 2013 8:21 am

I know this might sound ridiculous, but I'm writing a whole courtship sequence for one of my characters, Cienna. I'd like to be able to track how many times or for how long the player has taken her out adventuring to then use as conditions for dialog and what not. The more time you spend together, some other options might open up, or there may be different dialog choices. Right now, I'm using a simple alias and package stack for her, and variable conditions like iFollow, iWait, iDismiss etc that govern which packages are valid for her or not. She is NOT part of the vanilla follower system.

For example, if the player has not taken her out, or only a time or two, she might respond, "Hey, are you ever going to take me on one of your adventures? I'm beginning to think I might smell bad or something." Likewise, when the real courtship comes begins, she could say stuff like, "I know we've spent a lot of time together, and I was wondering if you were even interested in me", which wouldn't make any sense unless they had spent some time together. Things like that!

One way I thought about is if I could check to see if she was with the player on my radiant quests with the OnDeath script for my boss. Is there a check that would see if she is in the cell when this OnDeath event fires and maybe set a variable or count down in a global count? Something like Event OnDeath, if Cienna is in the cell, MyGlobal -= 1, and count down from 6. Then condition dialog based on the global count. (That's just one crazy idea I had, lol)

Could a global count somehow be used to count the number of times she's been following? Or else, there's probably a very simple was that I've no clue about to do this, lol.

Oh yeah, here's another one I thought about. Right now, when you tell her to follow you I run this in her dialog fragment:

(BalokCiennaQuest as BalokCiennaFollowConditions ).iFollow = 1(BalokCiennaQuest as BalokCiennaFollowConditions ).iWait = 0(BalokCiennaQuest as BalokCiennaFollowConditions ).iSandbox = 0(BalokCiennaQuest as BalokCiennaFollowConditions ).iDismiss = 0Actor_Cienna.SetPlayerTeammate()Actor_Cienna.SetRelationshipRank(Game.GetPlayer(), 3)Cienna.GetActorRef().EvaluatePackage() 

Could I add another variable or line in there to the mix that each time she was told to follow that it would increase by 1? This would at least check the number of times she has been following you, but not the amount of time.

Thanks!

User avatar
George PUluse
 
Posts: 3486
Joined: Fri Sep 28, 2007 11:20 pm

Post » Tue Oct 08, 2013 12:24 pm

Your idea sounds like it should work. Alternatively of checking for the follower to be in the same cell you can also try GetCurrentPackage() http://www.creationkit.com/GetCurrentPackage_-_Actor and check for the one that causes her to follow the player.

User avatar
Micah Judaeah
 
Posts: 3443
Joined: Tue Oct 24, 2006 6:22 pm

Post » Tue Oct 08, 2013 2:59 pm

OK, I'll check that out Mojo, thanks!

So assuming my new variable would be iFollowTracker would it be something like this?

(BalokCiennaQuest as BalokCiennaFollowConditions ).iFollowTracker +=1

Sorry, I svck at syntax, lol.

And yes! That Get CurrentPackage would work nicely to count down a global!

User avatar
Lilit Ager
 
Posts: 3444
Joined: Thu Nov 23, 2006 9:06 pm

Post » Tue Oct 08, 2013 5:01 pm

What about getting the game time in the dialogues leadding her to following you (recruittime) and in the ones leadding her to stop doing it (dismisstime), and in those last ones calculate recruitedtime = recruittime + dismisstime ?

That way you could count on recruitedtime variable the exact time period she has been following you.

EDIT: You could use for those variables as globals, or properties on her NPC, accessing them from the dialogue like (akSpeaker as TheScriptAttachedToHer).PropertyName.

User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Tue Oct 08, 2013 4:40 pm

OK amgepo, that sounds great, but I'm afraid you'll have to draw me a picture as i don't have a clue how to do what you just said, lol.

User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am


Return to V - Skyrim