Packages not functioning Correctly?

Post » Fri Feb 18, 2011 8:45 pm

Alright - I have a few packages on some of my npcs. The most important package is the package that causes the actors to "use an item" which is actually a spell. Once any particular actor is done casting the spell a few times, the player recieves some items because of a script thats attached to them. I'm using onpackage done. This has to happen once everyday, and used to work fine until I added more packages to give the npcs some life. The other packages that get processed includes packages that allows them to read, wander and sit and on the weekends go to the imperial city and return home.

Here's my problem. I'm not sure how packages are supposed to work, or what packages get picked. I'd like it all to be random - make it look like they're doing whatever they feel like doing, however, I do not want them doing the same thing for several hours at a time, especially reading. I will not be out read by an NPC! With that being said they keep reading for hours upon hours, even when I check once a day, or set the duration to 2. It seems like thats the only package that gets selected, and when the all Important package that causes them to "use" a specific cast on self spell comes up, they cast it once and refuse to do so again, even though I set the count to 10 and the packages never completes. (must complete is checked for the package that makes them use the spell)

Can any one explain how packages work? Is there a way to set priority to make sure certain packages execute before others? How in the Heck can I make those stupid NPCS sit in a random chair when they read?

If none of this can be fixed or helped...does any one know a good bird bath helmet mod so my hard work wont go to waste?......stupid npcs *kicks some dirt*
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Sat Feb 19, 2011 3:13 am

It's my understanding that packages are read top to bottom and are ignored if the scheduling/conditions do not allow for a particular package to be processed.

So if you have say, an eat package set for any date and time at the top of your package list, the NPC will stuff their face all day every day. Without any conditions to exclude it being used and because it is sitting at the top of the list, that package will always take precedence over the rest. Once the actor reevaluates their packages, it starts from the top once again, and will again pick the eat package.

You can use the "<<" and ">>" buttons to move packages up and down the list.
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Sat Feb 19, 2011 7:26 am

Since you already have scripts on the actors to process OnPackageDone, set variables in those scripts to indicate "done that" and include conditions to check them. To turn them back off for another day, just have at least one package with a schedule and include all the reset code in OnPackageStart for that (safer to use Start as some packages don't have a well-defined end).
User avatar
Kortknee Bell
 
Posts: 3345
Joined: Tue Jan 30, 2007 5:05 pm

Post » Fri Feb 18, 2011 10:28 pm

Thanks for the help. I've got it all to work - kinda. This doesn't function the way I was hoping it would - it's all too rigid. I was hoping it would be more spontaneous and less script like. I think it's goofy that packages are so mechanical - just when I thought I was getting a break from scripting...I get a form of scripting thats less clear. The only thing radiant here is the irritation. >.< Perhaps I am doing something incorrectly.

I put a patrol package on the bottom, so when there is nothing to do they just kind of walk around, or they do absolutely nothing but stand still until it's a certain time in the evening and then they begin their routine again. Since it reads like a script I can't find a way to make it fluid and random. There doesn't appear to be way for me to assign any degree of randomness to which package they choose. It reads from top to bottom and it picks whatever fits the bill, even if it's already been picked it 5 times in a row.

Is there a way to make to make them re-evalutate packages? How often do they do this on their own?
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am

Post » Sat Feb 19, 2011 7:03 am

Is there a way to make people sit in a random chair and read a book? I don't want to have to assign any chair in the editor. IT doesn't matter what chair, just so long as they are sitting and reading.

Currently I have two packages in place to attempt to make them do this; a travel package and a use item at package. Currently, they will travel to a seat and sit in it as planned, but when the use item at package hits, they stand up and read a book.

>.< how do i fix this?
User avatar
megan gleeson
 
Posts: 3493
Joined: Wed Feb 07, 2007 2:01 pm

Post » Sat Feb 19, 2011 5:35 am

Packages should be reevaluated every time a package completes. As noted by ghastley, some package types have poorly defined "ends" however. It's safer to do any scripting tied to package timing on start rather than done. Alternatively, you can call EvaluatePackage (evp) in a script to reevaluate manually.

You should be able to achieve some level of randomness using GetRandomPercent conditions. Unfortunately, as far as I know (AI newbie here as well) to get your NPC to randomly select a chair to read in means duplicating the package and changing the location each time to one of your predetermined chairs.
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm


Return to IV - Oblivion