Jump to content

How can I command to the NPC to stay in a place during the ‘eat’ AI Pa


VikingII

Recommended Posts

I have 4 NPC, ho eats at 6, for 2 hours, there is an Xmarker in the dining room and I set the routine at a distance of 120 from the Xmarker (also I tested other distances: 0, 50, 100, 300..., all is the same). There is a table with chairs near the Xmarker and sometimes all NPC sit around the table, but most of the time, one or two NPC chooses chairs much far from the table and the Xmarker, in other rooms.

 

This is what I set in the IA Package:

Package Type: Eat

Flags: Weapon Unequipped

Schedule: Time 6, Duration 2

Location: Cell: Diningroom, Ref: Xmarker

Radius: 128

 

There are 6 chairs for 4 NPC, so there are more than enough near the Xmarker. Why does they choose to exceeds the radius to find chairs in other rooms? How can I set the NPC to eat in the radius area?

Link to comment
Share on other sites

Make sure they have a source of food - I give my NPC's -1 loaves of bread so that they always have something to eat.

 

Also, it's counter-intuitive, but try lowering the radius to 0.

Link to comment
Share on other sites

Yes, they all has -1 food in their inventory (I made them following the tutorials from cs.lderscrolls.com). And I tested the distances to 0 in many times, and the NPC still going to other rooms to eat. But If their choose randomly, I will need to assign specific chairs in specific packages for each one instead the Xmarker and the general package.
Link to comment
Share on other sites

Assigning each NPC to a chair is what I had to do myself ... a pain but it worked. You probably already know this, but make sure the chairs are set to persistent as well.
Link to comment
Share on other sites

I solved it by setting the player as the owner of all chairs in the cell, except the ones in the table. Haha! Now all NPC eats randomly only on the chairs of the dining room. :)

 

That was a brilliant idea. :) And now you know the pain of programming the AI in Oblivion... NPCs never do what you want and even simple actions require workarounds to force their behaviour. :wallbash:

Link to comment
Share on other sites

The radius has very little to do with where they find a chair from what I know. When doing the eat package, they first travel to within radius of the location, and then search for a chair within another radius which is set in some game setting. As explained, the most used workaround is to assign a specific chair as the location and set radius to 0. That should work, provided there is food and no random companion/npc has stolen the chair.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...