cumbrianlad Posted March 10, 2017 Share Posted March 10, 2017 I've got a bit of a problem with a follow package (template: follow) that I've put on an NPC in a scene. It starts but then stops for some reason. It works like this:The player and NPC are outside the dungeon. The NPC is already in the scene that's running. He has a package holding him at an XMarkerHeading.The player asks a girl for ideas as to how to get in and she gives the player a key that one of the dungeon's people dropped. At this point the quest stage is stage 48.When the player unlocks the loadcell door to the dungeon a DoorUnlocked condition completes the scene phase and it moves to the phase with the follow package. This phase starts according to a debug messagebox. The NPC follows the player into the dungeon, confirming that the follow package is running. He goes down a staircase as far as the first room, participates in fighting the two enemies who are in there and then turns around and walks back to the tavern where I placed him in the CK. The package is the same one as used by Anska (A scroll for Anska, High Gate Ruins) and is set up exactly the same, other than the conditions, of course. These specify that my quest should be >=48 and <=60. Similar quest conditions are on Anska's package, plus she has GetinCurrentloc and GetIsID conditions, which I don't think I need on the quest alias. I've tried it with and without the last two conditions. The quest is still at stage 48 when he abandons his 'follow' package. As far as I know, a follow package runs until conditions tell it to stop. I can't see why it starts up and then stops in the middle of a cell. Any ideas? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 10, 2017 Share Posted March 10, 2017 Could be that the combat is breaking them out of the follow package and sends them back to their xMarker when over. They might return to following if their package stack were to be re-evaluated. You may also need to confirm that the follow package is properly set up to be interrupted by combat. That is all I can think of off the top of my head. AI packages are not my strong suit either. Link to comment Share on other sites More sharing options...
Tasheni Posted March 11, 2017 Share Posted March 11, 2017 (edited) I'm not sure, if the stage conditions fire if this package is attached to a phase of a started scene. Try without the conditions. I've made a scout with a scene and inside a travel package. He's leading the player to several locations. In combat situations, he dismount his horse and fights, after that he gets on his horse and goes on - the scene ends, when location is reached. So combat should not end your package. Edit: In the scenes window there is a button where you can adjust in which case the scene should be interrupted. Check the boxes for combat = pause. Perhaps this will help. Edited March 11, 2017 by Tasheni Link to comment Share on other sites More sharing options...
cumbrianlad Posted March 11, 2017 Author Share Posted March 11, 2017 Right! More info. If I take off the conditions, the NPC walks off after the first fight. If I set a combat override on the package, the NPC follows the player all around the dungeon, but of course he won't fight, which is no good. Clearly, it's entering into combat that's kicking him out of his package. I still don't know what to do about this. How do I get the packages re-evaluated? If It has to be done at the end of every enemy encounter it's going to be a real pain but I'll gladly do it if it gets around the problem. There must be a setting somewhere that will stop this behaviour. So far I've tried two packages. One of them is the current 'follow' template based package. The other was the 'follow player' package. Maybe it would make more sense to stick the package onto the NPC with my quest conditions attached, put it above his sandbox package rather than adding the package to his alias in a scene, even if scene package stacks are supposed to override the npcs AIdata packages. I'll try that. If it fails, I'll need to find another solution. Link to comment Share on other sites More sharing options...
cumbrianlad Posted March 11, 2017 Author Share Posted March 11, 2017 It works! Adding the package directly onto the NPC, rather than adding it as an alias in a scene. Why the follow package was dropped when the NPC entered combat with his package added in the scene I still don't know, but putting the package onto the NPC above the sandbox package that he already had works a treat. I added the quest stage conditions back into the package and that didn't stop it running, which backs up what I said earlier about the conditions not being responsible for stopping the 'follow' package. Now he follows the player around the dungeon and he's devastating with his dual-wielded Akaviri katanas. I may have to alter his combat style and reduce his effectiveness a touch. I still got killed in the final battle scene because I haven't yet sorted how to get the 8 enemies to stay put and not enter combat...I'm working on that. The mod is aimed at players above level 50 but these b******* are ferocious! I've given the mages destruction spells that are more deadly than vanilla ones and equipped them with heaps of perks. The same goes for the warriors. If you take two or three hits from my dual wielding enemies, you're dead, even if you're wearing armour at the armour cap and have health above 500. I'm not going to tone the enemies down, though, because when it's done right only five of them can attack at any time. It should be possible to beat them on master difficulty but it's not meant to be easy. If players have to reset from legendary difficulty then I'm happy with this. Maybe there'll be someone out there who's so good they can complete my mod on legendary difficulty. If so, then I will doff my hat to them! This is meant top be a mod for people fed up with having things their own way. Maybe there's a reason that Anska had this package added to her AIpackages rather than adding it to her in a scene alias. Anyway, from now on, I'll add follow packages directly to the actor, rather than adding them in scenes. So long as I add reasonable conditions to the package this seems to be a sensible approach. Edit: Joncis is the follower you've always wanted! Okay, he's not a follower yet...but, as he says, "If I acquit myself well today, I'll offer you my services...as the last of the Dragonguard." I've just watched him fighting enemies that would kill level 80 players in a few seconds...He's simply awesome! I bet he'd take down the ebony warrior without breaking a sweat. In my dungeon, it's almost impossible to defeat the enemies on your own, however good you are. I'm going to adjust the enemy stats up a bit more so that no player can defeat them without help. For me, I want that to be true if I'm playing on legendary. I'm not the best player in the world but I'm not bad at all, either as a mage or a warrior. To survive, you're going to need Joncis Milvan...no other follower will do: and even then you're going to need tactics. Ordinary followers will be on their knees after the first hit. Why am I trying to make this horrendously difficult? Well, it's just that I get sick of the game after I've defeated the ebony warrior (Karstaag never bothers me before anyone says that he's tougher...he's not.). I wanted to offer players like me a real challenge...you know, the sort that makes you sit back after and wipe your brow, going..."sh** that was close!". I want a mod for the more experienced players. Let's go! Link to comment Share on other sites More sharing options...
Tasheni Posted March 11, 2017 Share Posted March 11, 2017 Anyway, from now on, I'll add follow packages directly to the actor, rather than adding them in scenes. So long as I add reasonable conditions to the package this seems to be a sensible approach.You can attach the packages directly at the alias in the same window you create it. I do this with all of my followers, because they have a schedule before following - that is attached directly to the actor. When following, all packages are attached to the alias. Every scene is a new quest with the packages in the scenes. So I'm well organized and in case of problems it's easier to find the affected things.It is very much unlogical for me, that your follow package works not in the scene, because scene packages always overwrite actor and alias packages. It must have to do with the scene itself. Or with the f...g creation kit. As I said, several times I need to make packages new, because they were suddenly broken. I use a rule: I never alter a package, as long as it's attached to an actor or a quest. That's pretty much bugging, but better as to create them new, because they are broken. Joncis is the follower you've always wanted! Okay, he's not a follower yet...but, as he says, "If I acquit myself well today, I'll offer you my services...as the last of the Dragonguard." I've just watched him fighting enemies that would kill level 80 players in a few seconds...He's simply awesome! I bet he'd take down the ebony warrior without breaking a sweat.In case one likes to hack and slash through the game. For me, the focus is at interactive things and story and good dialog. I wood like the companions that are with me also in real life, because they are thoughtful, have manners, are witty, if not always unproblematic. But this is only my intention. I wish you good luck for your mod. Have fun. Greetings, Tasheni Link to comment Share on other sites More sharing options...
cumbrianlad Posted March 12, 2017 Author Share Posted March 12, 2017 Thanks Tasheni Yes, it was also my understanding that the scene packages took priority over all the others. I've looked at the scene time and again and I can't see what could be wrong with it. I'd prefer to add the package in the scene for the reason you mentioned...it keeps it all neat and in one place. When the scene ends, the actor reverts to packages on their alias. When the quest ends they use any packages on their actor...neat, if it works. I'll look at it again, once everything else is sorted about the quest. I'm not far off now. I read your comment about packages breaking if they're altered when attached to actors or quests. Maybe that's part of my problem? Although Joncis now follows the player and fights, he does not sneak when the player sneaks. This is true whether he uses the 'Follow' template package or the 'FollowPlayer' template. I understood that NPCs using a follow package would automatically sneak when the player did. while I was trying to get things to work, I definitely altered the packages while they were attached to Joncis or to his alias in the scene. I'll try remaking the package and attach it directly to his alias with stage conditions so that he swaps to it when the quest stage is updated. I'm assuming that packages will be re-evaluated when a quest changes stages. Link to comment Share on other sites More sharing options...
soupdragon1234 Posted March 12, 2017 Share Posted March 12, 2017 (edited) Right! More info. If I take off the conditions, the NPC walks off after the first fight. If I set a combat override on the package, the NPC follows the player all around the dungeon, but of course he won't fight, which is no good. Clearly, it's entering into combat that's kicking him out of his package. I still don't know what to do about this. I've noticed that too. If they get into a combat situation whatever handles the combat will override their package, thats a given. However when the the combat situation ends their package stack will fail to re-evaluate and return them to their original package before the combat initiated. How do I get the packages re-evaluated? If It has to be done at the end of every enemy encounter it's going to be a real pain but I'll gladly do it if it gets around the problem. There must be a setting somewhere that will stop this behaviour. So far I've tried two packages. One of them is the current 'follow' template based package. The other was the 'follow player' package. That at least is easy you can force them to evaluate their package stack with a simple script attached to their reference alias that looks like this: Event OnCombatStateChanged(Actor akTarget, int aeCombatState) Self.GetActorRef().EvaluatePackage() EndEventyou can attach it direct to the actor instead just make it MyActor.EvaluatePackage() that'll force them to re-evaluate their package stack everytime they enter or exit a combat state. Its always worked in my mods at anyrate. Although Joncis now follows the player and fights, he does not sneak when the player sneaks. This is true whether he uses the 'Follow' template package or the 'FollowPlayer' template. I understood that NPCs using a follow package would automatically sneak when the player did. while I was trying to get things to work, I definitely altered the packages while they were attached to Joncis or to his alias in the scene. No he won't sneak or draw weapons etc at the same time as the player thats handled via a script function called SetPlayerTeammate() i.e. MyActor.SetPlayerTeammate()to set or MyActor.SetPlayerTeammate(false)to unset. Check the script attached to the follower alias in the vanilla follower quest DialogueFollower and you'll see the same. n.b. you can try it out via its Console Command counterpart open the console click on an actor so their i.d. comes up then type SetPlayerTeammate 1 they'll sneak and draw their weapons when the PC does. Change it to 0 to clear. Edited March 12, 2017 by soupdragon1234 Link to comment Share on other sites More sharing options...
cumbrianlad Posted March 13, 2017 Author Share Posted March 13, 2017 Soupdragon1234, Thanks a bundle for that! I thought I was going mad. So when the creation kit website says in the notes for the 'follow (procedure)', that "The follower sneaks if the target is sneaking", this is basically wrong! They won't do it without the script that you mentioned. I'll try that out right away. I'll also add the bit to re-evaluate the package if I need it, although I've now found that the NPC follows and fights and doesn't leave after combat if... The package is added to the actor tab directly, with conditions set to use the package and drop him out of it at the appropriate stages of the quest. The package is added with the same conditions into the package stack of the alias, as Tasheni suggested.It only fails when it's added to the actor in a scene. I'm happy with the idea of the package stack directly on the alias in the quest. That way, he won't have it after the quest is over and I want him to be a potential follower afterwards, so I don't want him running around with dozens of redundant packages on him. The bit about sneaking will be really useful because the clumsy oaf alerts all of my super destructive enemies before I get a chance to take one or two out with a sneak attack...all that work playing around with their sneak skill to get the balance about right would be a complete waste of time if the NPC thumps around the place fit to wake the dead. Thanks again. Edit: I can't get this to compile. I tried it by adding a short script to the actor. I get the failure: no viable alternative at input '.' Scriptname KetilJoncisTeammate extends ObjectReference Actor Property KetilFollowerJoncisMilvan AutoKetilFollowerJoncisMilvan.SetPlayerTeammate() Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 13, 2017 Share Posted March 13, 2017 You cannot make a function call directly in the empty state, you need to do it within a function or event. For example sake: Scriptname KetilJoncisTeammate extends ObjectReference Actor Property KetilFollowerJoncisMilvan Auto Event OnInit() KetilFollowerJoncisMilvan.SetPlayerTeammate() EndEvent That may not be the appropriate event for you, but it is intended to be an example of how to use the intended function call of SetPlayerTeammate() Link to comment Share on other sites More sharing options...
Recommended Posts