How to setup some packages and conditions for followers

Post » Sat Nov 17, 2012 1:44 am

I'm at a point where I want to start setting up a series of radiant quests where the player is asked to take new guards he has recruited out on an evaluation mission handled by the radiant system. I think I have a handle on the radiant system itself as it's pretty dang simple actually.

However, what I'm trying to figure out or decide how to setup is the follow packages for the recruited guards when you take them out on their mission. There are a couple of things I need to be able to do, and I'm not sure how to go about it.

I need to be able to talk to the guard and tell them to come with me on the mission. For this could I just add my guard to the Follower Faction by using Alias_MyGuard.TryToAddToFaction(CurrentFollowerFaction) and then setting their rank? How do I make sure this overrides their current package?

I need to be sure the player actually takes the guard on the mission and completes the mission with the guard as a follower/companion. Otherwise it ruins the whole point. I guess I could just not put any dialog in there allowing you to dismiss them?

I need to be able to dismiss the guard and have them return to their normal guard package at the keep after talking to my guard captain and advising him of their combat ability. If I simply used tryToRemoveFromFaction, they would just resume their valid package, right?

Thanks, I think this is going to be tricky.
User avatar
Logan Greenwood
 
Posts: 3416
Joined: Mon Jul 30, 2007 5:41 pm

Post » Sat Nov 17, 2012 7:24 am

Assigning someone to the current follower faction doesn't make them follow you. It is just how the DialogueFollowerQuest prevents the follower dialogue options from appearing on every pc in the game. Followers follow you because the DialogueFollowerQuest has an Alias AI Package Override. It has a main script and you can use methods to add and remove followers from the quests alias(s).

There is a quest involving the Companions in Whiterun were Farkus accompanies the PC in order to "observe" how the PC handles the quest. I would probably base your implementation on that one. If someone is set to travel to the PC as part of their follow package, they will teleport behind the PC anytime they walk through a doorway and the areas loads. So it would be impossible to do the quest without the guards if the PC must enter a new area. If the PC does not enter a new area, consider requiring the alias to unlock the door and then make sure the Alias doesn't unlock the door until the PC shows up. Again, the companions quest has a snippet where Farkus tests the PC's metal. He walks outside and waits for the PC... just copy that logic. (It is probably done with a scene. I haven't checked).

Getting someone to follow and protect you isn't that hard. Just add an AI pacakage override to the alias in your quest. (assuming you make a new quest). THen you dont have to worry about compatility with multi-follower mods that may have altered or replaced the DialogueFollower system. If the aliases are part of a larger quest with mutliple stages, you could also consider using a scene, which has phases. Check out this tutorial:

http://www.creationkit.com/Bethesda_Tutorial_Scenes
User avatar
Craig Martin
 
Posts: 3395
Joined: Wed Jun 06, 2007 4:25 pm

Post » Sat Nov 17, 2012 3:44 am

If you are going to do a lot with "temporary followers" then you'll proibably be better setting up a Dialogue-Quest just for them.

This (now infamous) post - that I have finally saved a link to! - will help a lot. A bit tricky to setup to start with, but a blessing for complex custom-follower type stuff, once you have the basics.

http://www.gamesas.com/topic/1349193-wip-an-unexpected-companion/

Look at POST No16 and the amendments to that proceedure in POST No19 (with thanks to jediborg and DreamKing, as ever :wink:)
User avatar
Jake Easom
 
Posts: 3424
Joined: Sun Jul 29, 2007 4:33 am

Post » Sat Nov 17, 2012 5:55 am

As has been said: give them a quest alias, and add a follow package to the alias, and make it conditional on a quest variable, global or other testable value.

In the dialogue, when you get to "follow me" set the variable to true and all the guards' follow packages should kick in. You can add a start fragment to the package that adds the guard as a player teammate.

When you're done with them, have another option that says "we're done" and sets the flag variable back.

That'll toggle them following as a unit, of course, If you want to have them follow individually, they'll each need their own variable. You could use or conditions so you had options for "just you follow me" or "get all the men and come with me"
User avatar
Mariaa EM.
 
Posts: 3347
Joined: Fri Aug 10, 2007 3:28 am

Post » Sat Nov 17, 2012 11:33 am

Thanks guys, I really appreciate the help. There’s one thing that has me confused however. (Well, more than one, but I digress…)

Anyway, I have a basic understanding of this whole alias system in that NPC’s can be manipulated and / or can take on special roles while in an alias, and afterwards resume their normal behavior etc. So far, I have 28 new and unique NPC’s in my quest. Depending on player choice, a couple of them will not be enabled though. I needed unique NPC’s for various reasons, mostly relating to race and my story. All of them are on Aliases, and set to initially disabled, and enabled with Alias_MyNPC01.GetReference().Enable() at their appropriate times and so on.

Currently, all of their packages are placed in their regular NPC utility (like we always used to do before aliases), and everything in their Alias is blank. I have NO packages in their dialog utility. So far, I’ve been able to control the validity of their packages by quest stages in my main quest. Everything is working just fine like this, as frankly, they don’t need to be doing certain things until certain stages are set, so it’s worked out fine so far.

But I’m wondering if I’m doing it all wrong, and should have their packages in their Alias as opposed to just directly stacked in the Actor utility. What are the advantages or disadvantages of one way or the other?

For example, for the follow package we’re discussing I figured out last night a very simple way to do this without any complex scripting. I’m almost 100% certain it will work, and I got most of it plugged in before I got so tired I needed to go to bed, lol. I’ll finish it up tonight and test it. But all I did was set a dialog with my Captain that set the startup stage for my radiant quest. I set a dialog for the guard I need to take with me to only be valid in this stage of the radiant quest to “Come with me”. That sets the next stage in my radiant quest. I have a Follow package on my NPC that is ONLY valid for the next 3 stages of this radiant quest (> 10 and <= 40) so when he said he’ll come along, his follow package becomes valid, and since it’s at the top of his stack, he should follow along. (This is when I had to go to bed, lol)

So then, after the mission I’ll return to the Captain for debriefing, and tell my NPC to resume his regular duties, that completes the radiant quest, invalidated his follow package and since none of his other packages have conditions on them that have anything to do with any of this, he returns to normal.

I know this might be an overly simplistic way of doing it, but I did it like this for my main NPC and it worked fine earlier in my quest. The big problem I can see is there is no getting out of him following you once he’s in that package, which I’m sure I’ll get yelled at by users who want more control.

So, I guess I’m trying to learn is this a stupid or unorthodox method of accomplishing my goal needs?

If my NPC is already in an alias, are they allowed to be in more than one alias at a time? How does one override the other if so? If not, I assume you would have to take them out of one alias and put them in the other somehow? Do I even need to worry about doing this? I’ll also try to figure out the examples you guys listed above tonight or this weekend.

Thanks, and sorry I’m so all over the map, lol.
User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am

Post » Sat Nov 17, 2012 6:16 am

Well, you'd put packages on aliases and in scenes for the same reason you'd use a local variable rather than a global one.

If the package is on the alias, then it's only valid for the life of that quest. Which means that if the NPC has an existence outside the quest then you can add packages at will without needing to worry how they may effect the actor's default behaviour. It's not so important if you have a quest that's always running and actors that have no behaviour outside that quest, but it can simplify things a lot.

In this case, if your "follow me" action is part of a radiant quest you could put it on the aliases for the radiant, and if nothing else, you'd make the actor's package stack that little bit simpler, and that little bit more robust.

Another consideration: if you ever need a vanilla NPC in a quest, putting a package on an alias means you don't get conflicts if someone else alters that persons's packages, and it makes sure that when the quest is finished, the package is cleaned up properly.

Apart from that, there's no reason why you can't put everything on the actor. But you'll have simpler stacks, fewer condition variables and simpler logic if you put them on aliases and scenes.

Or that's my understanding of it, anyway :)
User avatar
teeny
 
Posts: 3423
Joined: Sun Feb 25, 2007 1:51 am

Post » Sat Nov 17, 2012 2:21 pm

What DocClox says, and also: actors can be in lots of aliases simultaneously, and the highest priority quest's packages win (trumped only by scene packages).
User avatar
lillian luna
 
Posts: 3432
Joined: Thu Aug 31, 2006 9:43 pm

Post » Sat Nov 17, 2012 3:07 am

What DocClox says, and also: actors can be in lots of aliases simultaneously, and the highest priority quest's packages win (trumped only by scene packages).

That alone helps a LOT, as I was scratching my head wondering which would take precedence over the other. It’s been a week or so that I set all these up, but IIRC, I ended up putting the stacks on the actor because after the radiant quests I plan on completing this part of my main quest and starting part 2 and I remembered reading that they would shed the packages when my first quest completed. But now that I know this, I can get a little more creative as I move forward!

For now, I’m going to go the simple route and put an alias on each of the radiant quests for the Guard for that quest, and set it higher than my main quest in priority. And if I understand all of this correctly, all I would then have to do is set the conditions for that follow package and I should be good to go. I will also experiment at some point with creating a full follower package for them, and may even consider turning a couple of them or my other guards into full-fledged followers at some point.

Thanks again guys, this has been really helpful, and I’ll post my progress as I go along!

Have a round on me! :foodndrink:
User avatar
Cool Man Sam
 
Posts: 3392
Joined: Thu May 10, 2007 1:19 pm

Post » Sat Nov 17, 2012 8:56 am

YES! Just got it all plugged in and it works wonderfully! Although having to set my follow package's Owner Quest threw me for a bit. But he works from start to finish through the radiant quest, and resumes his normal package like he's supposed to when we're done. And he fights surprisingly well, but the Overlord kicked his ass all over the place at level 1 stats, lol!

I can't thank you guys enough!
User avatar
Connor Wing
 
Posts: 3465
Joined: Wed Jun 20, 2007 1:22 am

Post » Sat Nov 17, 2012 8:03 am

Because I am currently experiencing Package-Conflict issues:

Sub-Quest Packages are great. When Quest-X is running you know NPC-Y will be doing what it should to take-part in Quest-X. Then, when Quest-X finishes, all that stuff goes away and NPC-Y goes back to doing whatever he should be doing for another active-quest, or what his Base-Actor packages tell him he should be doing.

All good.

Until Quest-Y and Quest-Z are also active, at the same time as Quest-X. Ah Ha! Quest Priorities ... So Quest-Y is more important than Quest-X, so NPC-Y will go do Quest-Y stuff ... Except the Player is doing Quest-X first ... hmmmm ...

... Dynamic Quest Priorities, anyone!? (Not as far as I can see!?)


So Your method of one big quest controlling a load of Base Packages may - in some situations - be easier to handle than the more traditonal way of doing things (which you proved, because it works!!) :)
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am


Return to V - Skyrim