Jump to content

Getting an NPC to Find Specific Items


RedSquirrel

Recommended Posts

Hi :)

 

I'm trying to make a dog follower that will seek and pick up gems. He seeks and picks up, but he picks up all kinds of junk instead (ceramic cups, yarn, etc). On the Conditions tab I have a list of GetIsId for each gem if == 1, separated by ORs.. I've tried running it Run on target checked and without. If I don't set anything on the Target page he does nothing, but if I check the box and leave it as Object ID NONE and Type NONE the game lags and crashes. If I set it to Object ID NONE and Type Miscellaneous he goes and picks up junk.. so I'm guessing I have the Conditions set up wrong? At one point the game got choppy for a few seconds and when I checked him he had collected 32mil gold from one container.. what the.... Too bad there isn't a 'Gems' item type :(

 

If someone can tell me the correct way to set it up, or if it's even possible, that would be awesome.. thanks!!

 

Er also, if I buff the dog with 100 int, agi and fortify security, can he use a lockpick on locked containers? lol

Link to comment
Share on other sites

Or... if it's not possible to make one Find AI Package that will check a list of item IDs (preferred), I could make like 14 Find Packages, one for each gem type, and call them from a script one after the other. If I do that, is there a way to, in the script, have the Package check the whole current cell for Item A, and after it either finds all of them or if it finds there aren't any, it will move onto the Package that looks for Item B, and so on?
Link to comment
Share on other sites

Hi MonkeyUncle :)

 

Thanks this is what I have currently

 

For Flags I have Continue if PC Near, Always Run, Always Sneak (some people got ticked at him stealing their ceramic cups), Allow Swimming and Allow Falls.

 

I didn't change anything on the Schedule tab.

 

This is what my Conditions tab looks like:

 

Target | Function Name | Function Info | Comp | Value

yes | GetIsID | MiscItem: 'Gem1PearlFlawed' | == | 1 | OR

no | GetIsID | MiscItem: 'Gem1PearlFlawed' | == | 1 | OR

yes | GetIsID | MiscItem: 'Gem3RubyFlawed' | == | 1 | OR

no | GetIsID | MiscItem: 'Gem3RubyFlawed' | == | 1 | OR

yes | GetIsID | MiscItem: 'Gem5EmeraldFlawed' | == | 1 | OR

no | GetIsID | MiscItem: 'Gem5EmeraldFlawed' | == | 1 | OR

 

(I have a line with Run on Target checked and one without just to see if that makes a difference, but it doesn't seem to as he never looks for the flawed pearl, which I have placed)

 

On the Location tab, Location is checked, set to near Near Current Location, Radius 4000

 

On the Target tab, Target is checked, set to Any Object, Object ID NONE, Object Type Miscellaneous, Count 100

 

Now I had hoped that these settings would make it check all Miscellaneous objects in a 4000 radius to see if they are a Gem1PearlFlawed, as set under Conditions, and if so, grab up to 100 of them. But it just ends up picking 100 pieces of junk so obviously I'm not understanding something..

 

I've tried not having anything on the Target page set and Target unchecked, and he does nothing but stand there (which I figured)

 

I've also tried setting the Target page to Any Object, Object ID NONE, Object Type NONE, which crashes my game.. probably because it's looking at everything.

 

Is what I'm trying to do even possible? :confused:

Link to comment
Share on other sites

You can't setup this kind of thing in the conditions tab, you would likely need to limit things to either one gem type, or a few types which are cycled through some means. How you cycle through packages might be done based on a timer and a GetCurrentAIProcedure check in the scripting, it may not always work very well. Although OBSE scripting can allow for searching an area for item types, it doesn't do very well with containers.

 

Really though, in my opinion, I don't recall there being many gems lying around to be picked up, and in the case of homes and such, your dog might end up stealing and being killed.

Link to comment
Share on other sites

yeah he generates things but I wouldn't call them gems :tongue:

 

Can you please tell me how to set such a thing up with checking AI procedures/timers, if only for a learning experience? I made a bunch of AI packages and put them in the script, but it seems it always only runs the last one in the list, either that it runs through them so fast that it only ends up doing the last one. So I tried to have it wait until one finished before moving onto the next. It looks like when he's found something and is done the package is at procedure 7 (wander) and he just stands there. I'm using OBSE.. I tried to use a loop to wait 10 seconds then check what the procedure is at to see if it's wander, and if it's not, wait 10 seconds more and check again, but apparently I did something wrong as the game just locks up like it's in an infinite loop and he never even started to move, so I'm guessing the AI package is on hold while the loop runs, defeating the purpose.. :wacko:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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