The 'Eat' Package doesn't work indoors?

Post » Wed Jun 20, 2012 10:50 pm

Okay, so here's the basic idea: When the player drops a certain food item (Say an apple) i want any nearby NPC to pick it up and eat it. Sounds simple enough. And indeed the quest only took me like a minute to make and seems to work outside just fine.
Here's what i did:

Create a 'Player Remove Item' event quest.
Create the first alias named 'Apple' a ref alias 'Find Matching Reference' + 'From Event' + 'Event Data = http://forums.bethsoft.com/topic/1366652-the-eat-package-doesnt-work-indoors/Item ref' (basically a ref alias to the item the player dropped)

I attached the script 'WIRemoveItem05ItemScript' so if the player picks up the apple before an npc does the quest stops, but that's not really all that important.

Create the second Alias named 'Spectator' with 'Find Matching Reference' + 'In loaded area' + 'closest'
I only have two conditions on this alias:
1) IsActor==1
2) GetDistance 'Alias: Apple' <=200

Now i put on the spectator alias a simple 'Eat' package. Set it's owner quest to this quest and here are the values for the package i set:

EatLocation: Near Package start location radius 2000
unlock on arrival: true
Food Criteria: Alias Apple
Num Food Items: 1
Create Fake Food: false (I want them to eat the real stuff, not just conjure bread out of the void)
Allow Eating: True
Allow Sleeping: False
Allow Conversations: True (hey, i like my npc's to be chatty, don't judge me!)
Allow IdleMarkers: False
Allow Sitting: True
Allow Wandering: False

Package Flags: I like having 'Must Complete' checked, as for the interrupt flags, none of them seem to matter

Then i hook this quest event up in the SM Manager, pretty simple. Only one condition in the quest node: GetIsID FoodApple ==1
(This is so the quest only starts when the player drops an apple, and not something else like a sword. Don't want any sword swallowers in skyrim :smile:

Now when i test this out in game in an outdoor area, say in a place like dawnstar. I drop an apple near the local blacksmith and he stops what he's doing, walks over to the apple, picks it up, (and this part is interesting) he then walks to the nearest bench, sits down, and eats the apple.

YAY!
Or so I thought....

Try this indoors. I prefer Falkreath's DeadMan's Drink but I'm pretty sure the same failure happens in any indoor area.

I drop the apple near someone already sitting down and this is what they do:
1) Get up from chair
2) sit back down in chair
3) Get up from chair
4) Repeat until player picks up apple thereby ending quest

WTF???

I try dropping the apple near the inkeeper, who is leaning on the bar and this is what she does:
1) stands up straight
2) leans back down on bar
3) stands up straight again
4) Repeats until player picks up apple thereby ending quest

At first I just thought the quest wasn't working. But when I looked closely at the NPC's i realized they where repeating some kind of loop.

I tried turning off and on all these different package settings. I must have tried several dozen different combinations within the course of 5 hours and no avail...

So I'm reaching out to you guys. Anyone have some bright ideas? I'm at a complete loss here. Please help!
User avatar
Richard Dixon
 
Posts: 3461
Joined: Thu Jun 07, 2007 1:29 pm

Post » Wed Jun 20, 2012 1:40 pm

The NPC eat package makes the NPC take out a loaf of bread (from no where, it is not in their inventory) and eat that.

I have never seen anyone claim a way of getting them to eat placeable food items (just the magic bread)

:(
User avatar
Jonny
 
Posts: 3508
Joined: Wed Jul 18, 2007 9:04 am

Post » Wed Jun 20, 2012 11:33 pm

Well, they still play the idle animation that eats magic bread. But they 'eat' the apple in the sense that it dissapears from their inventory and it's alchemical effect is applied (as evidenced by the visual effect)
User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Wed Jun 20, 2012 4:46 pm

Ahh, I see what you mean.

Well, the eat package works indoors (at least has for me), so I don't think that is your problem. Don't know what the problem is either, though. Sorry.
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am

Post » Wed Jun 20, 2012 7:02 pm

You've used the Eat package to get NPC's to eat a particular food, or did you just make them look like they're eating?
User avatar
Russell Davies
 
Posts: 3429
Joined: Wed Nov 07, 2007 5:01 am

Post » Wed Jun 20, 2012 8:06 pm

I've used it as part of a "home owner" package and they do eat bread (external and internal).

And, in vanilla, if you marry the lass who works in the spider mine (I forget name) she will eat when she comes back from work (internal). I changed that package so that she also ate outdoors when sitting around the fire with the other villagers ... One of the first things I did with CK

(haven't tested it in CK since patches ... maybe eat indoors is now borked? But it wasn't)


And they will pick things up if you drop them ... I have also done something similar

I wonder, though, is your problem a theft problem? Is the interior owned? By which NPC? Can the NPC you want to take the apple not do so because of an ownership problem (I only ever tested "pick up" in an interior I made, with no ownership, not a Vanilla one)?
User avatar
Carys
 
Posts: 3369
Joined: Wed Aug 23, 2006 11:15 pm

Post » Wed Jun 20, 2012 3:06 pm

It turned out to be an ownership problem.

NPC's will not Eat() or Aqcuire() any items that they don't own (since that would be stealing) unless you force the option 'bAllowStealing'

So now i just call SetActorOwner(NONE) on the item the player drops to reset it's ownership
User avatar
Vickey Martinez
 
Posts: 3455
Joined: Thu Apr 19, 2007 5:58 am


Return to V - Skyrim