Follow packages

Post » Fri May 13, 2011 8:36 pm

Has anyone ever tried to assign a follow package to an NPC who was in a different (interior) cell than the player? I am finding it rather buggy to say the least. I don't know if I am doing something wrong, or assigning player follow packages require that the NPC in question must be near the player. I'll try having one travel to the player first and then assign the follow and see if that doesn't make things work better. I was just wondering if anybody else ever tried this and if they found issues with it. That's all.
User avatar
roxxii lenaghan
 
Posts: 3388
Joined: Wed Jul 05, 2006 11:53 am

Post » Fri May 13, 2011 5:00 pm

Has anyone ever tried to assign a follow package to an NPC who was in a different (interior) cell than the player? I am finding it rather buggy to say the least. I don't know if I am doing something wrong, or assigning player follow packages require that the NPC in question must be near the player. I'll try having one travel to the player first and then assign the follow and see if that doesn't make things work better. I was just wondering if anybody else ever tried this and if they found issues with it. That's all.

That's what i've done in the past - have them travel to the player then flip the follow variable, or a dialog package when the travel package ends. It always works for me that way. I haven't tried enabling the follow package remotely though.
User avatar
Rude Gurl
 
Posts: 3425
Joined: Wed Aug 08, 2007 9:17 am

Post » Fri May 13, 2011 12:27 pm

If I only had one or two NPCs, I'd do it that way without question, but I'm trying to form an army led by the player who is in an other cell. So I have groups of NPCs following a single NPC who is following the player. I think I may be having a different issue than I first thought though as I am only having a problem with 1 out of ~20 NPCs. All the others seem to be working out just fine. But this one ends up with an AI Package of 0 and an AI procedure code of 0 when I try to give him power armor. If I leave him as is, he follows just fine. But when I add the power armor to his inventory, he appears at the teleport location from the other cell and just stands there without any package. Its so weird. The power armor is given when the player trips a trigger in his cell. The same code is adding lots of stuff to other NPCs and they are using it and still have their follow package. The additem commands are all in a OnTriggerEnter Player block. Did I mention that this is so weird? And, of course, the NPC I am having problems with is the main NPC, and not just one random one I could leave behind.
User avatar
Hilm Music
 
Posts: 3357
Joined: Wed Jun 06, 2007 9:36 pm

Post » Fri May 13, 2011 4:51 pm

I've assigned follow packages to NPCs in other cells before without issue (as long as they're no low level processing), although granted it wasn't nearly so many. I'm wondering, since multiple followers chain up and follow the one in front of them at the listed follow distance, that perhaps there's a hard limit to the number in a chain, or the number allowed to be on a follow package at once/in same cell? I don't have a clue really, but if there's a limit on the number allowed in combat at once, I'd think it's entirely possible.. and might explain why this one is procedure 0 ended when he shouldn't be. Perhaps switching a few of those NPCs to Accompany packages instead might solve that for you.
User avatar
BRIANNA
 
Posts: 3438
Joined: Thu Jan 11, 2007 7:51 pm

Post » Fri May 13, 2011 3:06 pm

If I only had one or two NPCs, I'd do it that way without question, but I'm trying to form an army led by the player who is in an other cell. So I have groups of NPCs following a single NPC who is following the player. I think I may be having a different issue than I first thought though as I am only having a problem with 1 out of ~20 NPCs. All the others seem to be working out just fine. But this one ends up with an AI Package of 0 and an AI procedure code of 0 when I try to give him power armor. If I leave him as is, he follows just fine. But when I add the power armor to his inventory, he appears at the teleport location from the other cell and just stands there without any package. Its so weird. The power armor is given when the player trips a trigger in his cell. The same code is adding lots of stuff to other NPCs and they are using it and still have their follow package. The additem commands are all in a OnTriggerEnter Player block. Did I mention that this is so weird? And, of course, the NPC I am having problems with is the main NPC, and not just one random one I could leave behind.


Strange. Is the armor unique? Does it have a script on it that's hammering an AV value on the NPC every frame? I've done that before and froze an NPC up.
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Fri May 13, 2011 5:05 pm

Do you test with a esp or esm? One side effect of the famous esp navmesh bug is that following NPCs drop their package when the circumstances are bad. Maybe that's the problem.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

Post » Fri May 13, 2011 7:43 am

I appreciate all the responses. During my testing I only had three NPCs following, and as soon as I added the (generic) power armor to my one NPC, he had no package, but would still appear after teleport doors as if there was some king of package on him, Yet, checking his package showed it to be zero. I then removed the command to add the power armor and he worked again. I then added more NPCs one-at-a-time and customized then through commands in that trigger script I mentioned before. I have even added the same power armor to other NPCs without issue. Everything worked no mater how many more NPCs I added. But as soon as I added power armor to this one NPC, he went catatonic.

The navmesh bug only seems to manifest after a reload or fast travel or wait. I am well aware of its existence, and always test with a clean save on a single load of the game. I will, however, just to be sure, convert my mod to an esm and test it out that way. I have resolved to just not give that one NPC power armor, but like I said before, its so weird.
User avatar
Lizbeth Ruiz
 
Posts: 3358
Joined: Fri Aug 24, 2007 1:35 pm

Post » Fri May 13, 2011 1:33 pm

Just to clarify. Its not that addin power armor causes my NPC to freeze, it happens when I use the additem command on him for any object. Here is my trigger script:

scn UCBase2ArmyTriggerScriptShort DoOnceBegin OnTriggerEnter Player	If DoOnce == 0		If Getstage UCMain == 140			UCFrannyRef.additem ArmorCombat 1	 		UCFrannyRef.removeitem Weap10mmSubmachineGun 1			UCFrannyRef.additem WeapRailwayRifle 1			UCFrannyRef.additem AmmorailwaySpikes 20			UCFrannyRef.equipitem WeapRailwayRifle			UCGonzaloRuizRef.removeitem Weap10mmSubmachineGun 1			UCGonzaloRuizRef.additem Weap10mmSubmachineGun 1			UCGonzaloRuizRef.equipItem Weap10mmSubMachineGun;			UCSionRef.additem armorCombat 1;The above command, when un-commented cause my NPC to freeze after every teleport door			UCTorqueRef.removeitem WeapChineseAssaultRifle 1			UCTorqueRef.additem AmmoElectronChargepack 250			UCTorqueRef.additem WeapGatlingLaser 1			UCTorqueRef.equipitem WeapGatlinglaser			UCPeterRef.Additem ArmorMetal 1			UCPeterRef.additem ammo556mm 25			UCPeterRef.removeitem Weap44magnumscoped 1			UCPeterRef.RemoveItem WeapKnifeCombat 1			UCPeterRef.additem WeapChineseAssaultRifle 1			UCPeterRef.equipitem WeapChineseAssaultRifle			UCElonRef.RemoveItem WeapPowerFist 1			UCElonRef.additem WeapUniqueBurnmaster 1			UCElonRef.additem AmmoFlamerFuel 75			UCElonRef.equipitem WeapUniqueBurnmaster			UCDrRuizRef.additem WeapPlasmaPistol 1			Setstage UCMain 145			Set DoOnce to 1		Endif	EndifEnd

User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm

Post » Fri May 13, 2011 7:29 pm

This may sound completely stupid, but how strong is the NPC? Is weight a problem?

I ask because I can't for the life of me figure out how an additem can stupify an NPC, unless the NPC has to react to the given item somehow...

Also from your script, the commented line is the only one going to "UCSionRef", where everything else is going to the other NPCs... Do you get similar behavior when adding the armor to other NPCs near by?

Miax
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Fri May 13, 2011 6:44 pm

Ya, it is totally strange. All the other NPCs work just fine with the equipment changes. I though it might be a weight issue too. But if I even use additem pencil01, he freezes. Bizarre to say the least. I tried testing as an ESM, still no luck. I tried making new packages, same results. They only way he works is if I leave him as is. I checked in FO3Edit, but there are no errors. I am going to send the mod off to a friend to see if it happens on his system. Mine has some problems as you may recall. But I would figure that system issues wouldn't cause an issue with a specific NPC, they would be more systemic. From my other thread, I checked for viruses and reinstalled and patched the Geck already too. I am resolved to the fact that I will just keep him as is and continue modding.
User avatar
sunny lovett
 
Posts: 3388
Joined: Thu Dec 07, 2006 4:59 am

Post » Fri May 13, 2011 12:53 pm

I am wondering if this has to do with the number of actors again. You mention that one of the actors wont go into combat and just stands there - as TalkieToaster said for combat, it could be that the low-level processing on the NPC is frozen because there are 20 other NPCs stacked in front of them? In that case he wouldn't address things like attack animations, but might still be able to run around / follow.

I recommend nixing a few Other NPCs, and see if the reduced count will get it to perform right. I doubt this has anything to do with your system...

Cheers,

Miax
User avatar
lolly13
 
Posts: 3349
Joined: Tue Jul 25, 2006 11:36 am

Post » Fri May 13, 2011 11:49 am

I already tried that. I actually started over with just one NPC and added each one back individually. Every time all the others worked but my main NPC. I would add one with my main NPC as is and everything worked, then I would un-comment out the additem Xarmor command and he would be catatonic. Its not that he is motionless, he does sway and you can talk to him. But he has no packages or procedures when checking with the GetCurrentAIPackage/Procedure console commands (they both equal zero). I doubt its my system either, but that's the point I am at.

The only thing I haven't tried is to create a new NPC to replace my main one. But my mod is pretty big and he is used all over the place. It would be a big deal to try to extricate the current one. But I may have no choice.
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Fri May 13, 2011 5:06 pm

Have you tried unticking the 'weapon drawn' flag in the package? I had a lot of problems with having drawn weapons and telporting and the doubled weapon bug. If the NPC was in combat, sometimes it would freeze. Doing a NPCRef.Removeallitems somecontainerREF then RemoveallItems.SomecontainerRef NPCRef after teleporting might help - though doing both operations in the same frame might not.

The Responsive Kill Reactions mod had a similar bug at first when adding a token to Raiders - they would be unable to equip and use their weapons. Not sure what they did to fix it.
User avatar
Amanda Leis
 
Posts: 3518
Joined: Sun Dec 24, 2006 1:57 am

Post » Fri May 13, 2011 5:17 am

And there's no script on the armorCombat? Also do you test without other mods?
User avatar
naomi
 
Posts: 3400
Joined: Tue Jul 11, 2006 2:58 pm

Post » Fri May 13, 2011 11:17 am

Yes and yes. Remeber, I get this bug if I even use additem to give him a pencil, forget about armor.
User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Fri May 13, 2011 11:39 am

So I confirmed that the issue happens on another system. I am now thinking that there might be some kind of corruption with the NPCs object or reference. This NPC is very integral so deleting him and making a new NPC would take a long time and probably lead to a few null references throughout my mod. Does anyone know of a way to replace an existing NPC with a new one easily such that all references (like dialogue topics and script references) will be ported to the new NPC? Maybe it can be done with FO3Edit? Any ideas?
User avatar
-__^
 
Posts: 3420
Joined: Mon Nov 20, 2006 4:48 pm

Post » Fri May 13, 2011 7:57 am

I've seen a bug before which would affect NPC behaviour when http://geck.gamesas.com/index.php/AddItem was called on them, and it could be fixed by calling http://geck.gamesas.com/index.php/AddItem and even number of times. Try adding this after your last http://geck.gamesas.com/index.php/AddItem call for the frame:
XXXXRef.AddItem Pencil01 1XXXXRef.RemoveItem Pencil01 1

Cipscis
User avatar
Charlotte Lloyd-Jones
 
Posts: 3345
Joined: Fri Jun 30, 2006 4:53 pm

Post » Fri May 13, 2011 10:04 am

I tried that suggestion in several different ways, but I got the same results. I even made a trigger for him as he approached the player to watch what happens. He walked through he trigger, changed armor and his drawn weapon vanished and he stood still. An even weirder thing is that I can use additem in the console and it will work fine, in the exact same location as the trigger. I am just baffled.

This is the script I used in the trigger:

Short bSionBegin OnTriggerEnter UCSionRef	If bSion == 0		UCSionRef.additem armorcombat 1		UCSionRef.additem pencil01 1		UCSionRef.removeitem pencil01 1		Set bSion to 1	EndifEnd

User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Fri May 13, 2011 7:35 pm

That is just not right. Next time you test this and he stands there with armor and no weapon, try an AddScriptPackage PackageID and EVP from the console on his butt..(if you haven't already). AddScriptPackage will override just about anything (including combat for just a second or two), so maybe it'll give up some hints as to whether he's being held by another package/process or if the issue is more related to specific conditions/ npc numbers/ etc..

Edit: Might also try in the example in the post above.. instead of Additem pencil.. RemoveItem pencil, try with a new armor item ->bodywear ->spare body slot 3, then Additem TestArmor 1, EquipItem TestArmor 1, RemoveItem TestArmor 2.
Removing item from equipped state seems to fix an aweful lot of issues.. might be worth the 5 minutes it would cost.
User avatar
Heather M
 
Posts: 3487
Joined: Mon Aug 27, 2007 5:40 am

Post » Fri May 13, 2011 1:02 pm

Give that dog a bone! Bonedog, you're a genius! While removing the test armor in the same frame as adding it didn't help, I put in a short timer and then removed the test armor in a game mode block. As you surmised, this made him re-evaluate his equipment and he started to work properly. :foodndrink:
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Fri May 13, 2011 8:41 am

Awesome! Glad to help, although the timer fix is all you man. That's the first time I know of specifically that removing from the same frame as adding didn't work, but then I've run this trick several different ways for a bunch of different issues. I'll have to keep your twist on it handy. Normally for busy NPCs, I automatically put all three statements in their OnLoad block. Doing that seems to fix a handful of buggy things that I like not worrying about.
User avatar
Yvonne Gruening
 
Posts: 3503
Joined: Mon Apr 23, 2007 7:31 pm


Return to Fallout 3