Lots of NPCs in one cell

Post » Fri May 13, 2011 8:36 pm

I have a city cell with 20 or so NPCs. All is fine. At some point they all become an army and have to go to another cell to engage in a fight. I have some of them following the player and the rest follow the NPCs who are following the player. This seems to work OK, but not great as only a few move with alacrity. That's not the real problem though as the fight starts they all go off on their own combat. I am having problems with one NPC in particular who just won't equip his weapon nor enter the 'weapon's Drawn' animation. He just stands around like things are normal. All of the Follow AI packages have the 'Weapon's Drawn' flag set. This particular NPC is using the same exact package as other NPCs who are drawing their weapons. I can't for-the-life-of-me figure out why he won't. I have tried removing and adding the weapon again, using equipitem, resetAI, evp and more. But still he just stands in a casual stance with his weapon holstered. If I try to pickpocket him, I can see the weapon and ammo in his inventory. Its his only weapon and he has the skill to use it. If you attack him during the early parts of the game he pulls it out and uses it. There are only three NPCs that are following the player and they all use the same package. He is one of them - the leader of the city - if you will. So he's a main character and he really needs that damn weapon drawn.

The way the whole thing works is that a stage is set when the player steps into a trigger, which runs a quest results script which uses a resetAI on all of them. The player is already in the other cell. There is a small delay of 0.3 seconds before a game mode block in the trigger script forces some NPC to use new weapons and gives some of them better armor for the upcoming fight. All the NPCs start coming out of the teleport door with their weapons drawn, but this one guy. I am stumped at this point. I am going to watch the world cup now and try again later. maybe some of you will have some insight as to what may be going on here, or have a suggestion as to how to accomplish this in a better way.
User avatar
Siobhan Wallis-McRobert
 
Posts: 3449
Joined: Fri Dec 08, 2006 4:09 pm

Post » Fri May 13, 2011 1:05 pm

I dont this will so much answer your question, but it is food for thought as it could possibly be related. I have noticed that having multiple people with the same exact package to follow someone is not generally a good idea. For example. In my mod where I have Captain Hays being followed by his 4 soldiers, they each have an independant follow package with incremented follow distances. This runs very nicely. However, before I had them all using the same package to follow him. Now, this works alright most of the time, as they automatically increment themselves distance wise so they arent all trying to stand the same number of units away from him. But the issue occurs when changing cells, which I think is where yours is happening. The leader will walk through the teleport door, then the first follower. But then, since they are incremented, and 'dependant' on eachother due to the same package, sometimes the second guy might make it through, but the third and fourth never do. They just stand there, no longer with the guys ahead of them to follow whilst following Hays. Whereas if they have their own package, they each just teleport. So perhaps you should give every NPC their own follow package, as much work as that might be.

Of course none of this really matters if you change the NPC's package before doing this, to something like a Sandbox so they can run freely while fighting or something.
User avatar
Marine x
 
Posts: 3327
Joined: Thu Mar 29, 2007 4:54 am

Post » Fri May 13, 2011 8:47 am

I have a city cell with 20 or so NPCs.
IIRC the actors in combat limit is 20 or thereabouts. He's probably being sidelined until someone else dies.
User avatar
Felix Walde
 
Posts: 3333
Joined: Sat Jun 02, 2007 4:50 pm

Post » Fri May 13, 2011 5:37 pm

Hmm. I'll cut some groups out and see if things get any better. I do think the exact number is 21, so that might indeed be it.

I probably should have started this with just a few NPCs anyways as opposed to all of them at once. Then once I got it working, I could have then added more and more NPCs to the group.

EDIT: Yup, removing some of the NPCs did allow my main NPC to start working properly! So, thanks. I'll now try setting each one up on their own follow package and see how turns out.
User avatar
Susan
 
Posts: 3536
Joined: Sun Jun 25, 2006 2:46 am


Return to Fallout 3