WarKirby3333 Posted July 3, 2006 Share Posted July 3, 2006 I understand that when an eat package runs, NPC's eat from their inventory, and find or buy some if they have none. If there is no food to find and an AI runs out of money to buy food- can they get more money? and how? What happens if there is no food at all? Also, is there any way I can make an AI get food from one place (like a kitchen) and put it in another (like a dining table) Thank you for your time. WarKirby Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 3, 2006 Share Posted July 3, 2006 I understand that when an eat package runs, NPC's eat from their inventory, and find or buy some if they have none. If there is no food to find and an AI runs out of money to buy food- can they get more money? and how? What happens if there is no food at all? Also, is there any way I can make an AI get food from one place (like a kitchen) and put it in another (like a dining table) Thank you for your time. WarKirby If they run out of money and have nothing near the location that has food they can get (as determined by their ownership (faction or personal), and their responsibility settings) they will just wander that area occasionally checking package to see if they can eat yet. To prevent this, you might want to make sure that they have more than a few gold, and possibly using a find food package with a count higher than 1 to a location where they can get food. Then they buy extra so that if the player were to be following them for a few days (not allowing the area, and their inventories to be refreshed) they continue their packages without problems. If the kitchen and the table are in the same cell, and reasonably close to eachother, you can just set the location to being near a reference where the food is. Once they get the food they will by default try to find a place to sit. If the kitchen and the dining room are in seperate cells, you'll have to break it down between 2 packages, one to get the food, another to eat it. The easiest way would be by adding a "OnPackageDone" block to their script that checks for the find action being completed, and adding a new package which moves them to where you want them to eat. Alternativly, you might be able to set the find action on a "must complete" and the eat action on the same start time as the find action. Hopefully that helps. Link to comment Share on other sites More sharing options...
WarKirby3333 Posted July 6, 2006 Author Share Posted July 6, 2006 Thanx on the first part. I didn't know npc inventories respawned like containers. On the second question though, you seem to have misunderstood what I was asking. I want food to be picked up and then dropped in another place for a different NPC to eat. The reason I want this is that in my Big Castle Mod I want servants to take food from kitchen and put it on a dining table for guests to eat. (dining room and kitchen are in the same cell.) Thanx for your time WarKirby Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 6, 2006 Share Posted July 6, 2006 Thanx on the first part. I didn't know npc inventories respawned like containers. On the second question though, you seem to have misunderstood what I was asking. I want food to be picked up and then dropped in another place for a different NPC to eat. The reason I want this is that in my Big Castle Mod I want servants to take food from kitchen and put it on a dining table for guests to eat. (dining room and kitchen are in the same cell.) Thanx for your time WarKirby hmm, might be able to do something like that inside a OnPackageDone block. But you'll need a quest script (make a new quest with stages 0, 10, 20, 100, with repeatable stages) to control everything since while escort packages might be able to do the job, will likely end up with them just dropping the food and other items on the floor. First Place a marker on the table about a foot in front of where you want the food to be and about 10 units above. Inside the NPC's script, onpackagedone, have it set the quest stage to 10. Inside the quest script have something like: scn XXFoodPlacementScript ref markershort settings begin gamemode if getstage XXfoodquest == 10if settings <=0set marker to ;marker reference here; elseif settings == 1set marker to ;another marker;elsesetstage XXfoodquest to 20set settings to 0endifmarker.placeatme ;reference ID of plate;, 1, 21, 1marker.placeatme ;reference ID of food item;, 1, 22, 1marker.placeatme ;reference of another food item;, 1, 20, 1set settings to +1endifend or something close. However keep in mind that doing something like this is clumsy at best, and would likely slow things down if it was being called every day. This would also need you to setup food with a script to remove themself if the quest isn't active. and don't forget adding someway to reset the whole mess once everything is done. I've outlined (I think) a repeatable process for setting multiple settings, then once all the settings are done, setting the quest to a stand-by mode. With this, you might see some stacking occur, and if the settings are too far apart while the player is in the zone it might look a bit odd. You might be able to fix this by changing the "settings" variable to work off a faction rank on the servant, then increasing that rank after each completion of settings, setting it back to 0 when you're done, but it would still run into the same problems. Even if trying to set it up as a series of escort packages set to start after the previous one ends, you're still likely to see significant problems. This is probably why Beth decided to just leave all the tables already set with food all the time. Then you don't need such a complicated set of actions just for something that would be rarely seen. So much for radiant AI, in order to have them do something specific, you need to manually force them to do it. Figuring out how is the fun part. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.