Companion A.I

Post » Mon Aug 23, 2010 9:37 am

Hi there,

Working on a companion mod and I've got the wheel to come up and have essentially added my new npc as a companion but they are not reacting correctly.

I have created the relevant scripts and addtions to VNPCFollowers that it looks like I need.

There are variables in the npc script to flag wait, follow distace and ranged or melee combat.
I have also added the respective AI packages to the guy to achieve this I think.

The packages look for the state of these variables and there's a couple of follows for distance and a guard for waiting.
I've copied these as for other companions, the only thing that seemed odd to me was the default cell reference that seems to be set for the follow packages.

Otherwise it looks like it should work I guess.

When I team up with the guy though he just leaves his default sandbox package and stands around when told to follow, not reacting to combat even.

When I set him to wait, he will notice fighting and go to attack state but never fires his weapon(could be down to ammo).

Not really sure what I've done wrong but just thought I'd post in the hopes someone might have any ideas.
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Mon Aug 23, 2010 9:49 am

Are following and wait the only packages that aren't working then, since the sandbox package is working? And did you name the variables for follow and wait something different that what they are called in the VNPCFollowers quest? Try renaming them to the exact wording if you did: IsFollowingDefault, IsFollowingLong and Waiting.
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Mon Aug 23, 2010 3:44 am

Are following and wait the only packages that aren't working then, since the sandbox package is working? And did you name the variables for follow and wait something different that what they are called in the VNPCFollowers quest? Try renaming them to the exact wording if you did: IsFollowingDefault, IsFollowingLong and Waiting.


Thanks for the reply, I've used the same variable names, the sandbox packages seems to work the only issue is that he only sits in chairs for a second before changing his mind.

The guard packages is setup as for other companions, but he just goes over to his spawn point.
I noticed that the follow packages were not referencing the player in188trading but some other object so I changed that but still seems to be an issue.
At least I know I'm basically on the right path.

Also even though I've added dialogue and topics now for the npc in the vnpcfollowers quest for changing distance of follow and wait I don't hear the lines played.

Also when trying the talk option the only thing I get is wait here, if you select this the option never reappears.
Maybe I messed up setting the variables but I don't think so.

Oh well, bit too frustrating to persist much further tonight. :)
User avatar
Matthew Warren
 
Posts: 3463
Joined: Fri Oct 19, 2007 11:37 pm


Return to Fallout: New Vegas