Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

HELP! - General Q & A


InsanitySorrow
 Share

Recommended Posts

NPCs & AI: General Questions and Answers

CS-QA.png

As you make your way through the classes there are bound to be questions that are not answered, if you find you have questions but cannot find answers then please post here and I will get back to you with an answer.

If your question requires a more in depth discussion then please start a new thread for it and we can discuss your issues there. If you find you have questions that are not about NPCs or AI then please post in our Study Hall.

Link to comment
Share on other sites

So IS, am I to understand you to say that pathgrids are not assigned to individual NPCs? That would make sense since the NPC could be placed anywhere. If the pathgrid is assigned to a location, do I install it at the time of that locations creation? If I use a property already in existance, Does ot retain its native PG, and if so can I change it? All questions for when you have the time, of course. I`m still struggling with basements and all. Thanks IS.

Link to comment
Share on other sites

So IS, am I to understand you to say that pathgrids are not assigned to individual NPCs? That would make sense since the NPC could be placed anywhere. If the pathgrid is assigned to a location, do I install it at the time of that locations creation? If I use a property already in existance, Does ot retain its native PG, and if so can I change it? All questions for when you have the time, of course. I`m still struggling with basements and all. Thanks IS.

Yes you understand correctly, NPCs can be placed anywhere and aslong as it is pathed they will no where they can/cannot walk to get about.

When you create a new cell you will need to create the pathgrids along with it, this is not as important for places just for the player, unless you intend on having companions. But for an area where NPCs will reside/use then its an important step.

When you copy a cell the pathgrids are copied also, so there is only a need to adjust them if you make significant changes. Otherwise they can be left alone.

So yes all pathgrids can be changed, this is something I will cover with a tutorial :pints:

Link to comment
Share on other sites

Way groovey. Thanks. I would like to populate some of my properties with NPCs that don`t just stand around, and maybe ask/answer a range of questions moving along alternate PGs according to triggers in the dialog. I can imagin how large and complicated this could get real fast, one step at a time`ll get it done tho. aa_biggrin.gif

Link to comment
Share on other sites

Way groovey. Thanks. I would like to populate some of my properties with NPCs that don`t just stand around, and maybe ask/answer a range of questions moving along alternate PGs according to triggers in the dialog. I can imagin how large and complicated this could get real fast, one step at a time`ll get it done tho. biggrin.gif

It will be a little tricky becuase you have to set markers and so forth, but its not as tricky as you might think. Once you know the basics of:

AI

Pathgrids

Dialogue

Then you should be able to do what you want with your NPCs :lol:

Link to comment
Share on other sites

General information:

1) You could give your AI package some conditions for the NPC to meet, just make sure these conditions are contained within grid A, I would say make a check: GetItemCount Key <0 or something to trick the AI to stay. Its Oblivion that makes them want to continue. A marker would also work, just tell them to walk to GridMakerA and stay there.

2) NPCs will always try to find the shortest route around any given area. This is actually controlled by the pathgrids that are set up, most of the time the pathgrids are set up so the NPC can traverse the area, but then a specific path is put in which is the shortest route through. The only way around this is to make the NPCs go from marker to marker along your route.

Link to comment
Share on other sites

  • 1 month later...

Okay, new question, when I place nodes does it matter how close or far they are from each other? I`ve read about the red, blue, and purple ones, but what are the orange ones? Lastly, Do the nodes have to be at a specific height? In game I found some vanilla nodes floating above the ground whereas others were half submerged.

Link to comment
Share on other sites

Rider's right, proximity has no bearing on the effect of the node, though its good practice to keep them apart and keep things tidy. I have not noticed any issues with height either, there are quite a lot of nodes half submerged that beth lay down, so thats either bad pathing or the AI does not care.

Link to comment
Share on other sites

How long does it take for an NPC to exit from an interior cell to exterior (or enter another cell)?

Here's an example:

An NPC sleep inside a house until 6:00. The NPC's next AI package which starts at 6:00 is going to the town square. Supposedly a player wait within few meters right outside the NPC's home, how long will the said NPC actually take to appear outside the house starting from 6:00? I noticed on some occasions NPCs didn't execute their schedule on time and could take over 20 minutes (in-game time, I use timescale 12) to actually exit the house, where if you broke into the house, it would only take a few seconds (real time) for the said NPC to quit.

Also, how does Oblivion calculate the time for the same NPC when the player is in:

a.)different cell and not visited by the NPC (AI package)?

b.)an exterior or worldspace but located far away (e.g: the NPC exit a house in Aleswell and the player is at Faregyl)?

Link to comment
Share on other sites

How long does it take for an NPC to exit from an interior cell to exterior (or enter another cell)?

Here's an example:

An NPC sleep inside a house until 6:00. The NPC's next AI package which starts at 6:00 is going to the town square. Supposedly a player wait within few meters right outside the NPC's home, how long will the said NPC actually take to appear outside the house starting from 6:00? I noticed on some occasions NPCs didn't execute their schedule on time and could take over 20 minutes (in-game time, I use timescale 12) to actually exit the house, where if you broke into the house, it would only take a few seconds (real time) for the said NPC to quit.

Also, how does Oblivion calculate the time for the same NPC when the player is in:

a.)different cell and not visited by the NPC (AI package)?

b.)an exterior or worldspace but located far away (e.g: the NPC exit a house in Aleswell and the player is at Faregyl)?

AI processing time has not been documented as far as I know. Changing the timescale could be causing the processing issue you are noticing :question: From my foray into AI I have noticed that the game can take anywhere from a couple of seconds to as you say a good few minutes before the NPC uses its next package, that could be down to what the actual package is, for example:

NPC 1: Goes to sleep for say 6 hours, then wakes up and eats. Well that package will not require any travel so it can be processed and completed fairly quickly.

On the other hand

NPC 2: Goes to sleep for 6 hourse, then once awake has to travel from say Chorrol to the IC. This package requires travel so the engine has to set the AI to follow the pathgrids etc.

I have a feeling its down to what the package needs the NPC to do, it would also have a bearing on what the engine has to do as well.

Time calculation is something I myself have not studied, so I cannnot say how the Engine works out time required for travelling, though I do know that it has something to do with the overall distance and it problably factors in general movement speed.

Link to comment
Share on other sites

  • 3 months later...

In my trials with NPCs I notice that sometimes a travel package simply doesn't execute until I enter the NPC's cell. Or if I exit the NPC's destination cell, then return, they're either there, or heading towards their destination.

hey...sorry if this has been answered anywhere else...

npc's which have the respawn flag activated will not be teleported (travell/find/wander packages)to their location as long as the player is in the same cell

(as the package location) ...this is one of the many small limitations of the Oblivion game and can not be fixed....only way is to leave the cell ...when you enter the cell again everything should be ok...

cheers

onra

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

Question time for me. XD

I have a NPC whom I tasked to sweep the floor at several markers in two cells

To choose at what marker he'll sweep, I've put a GetRandomPercent on each sweeping package and the NPC randomly chooses which place to sweep.

Since I want the NPC to sweep when he's not doing important things (Eating, Sleeping, Preparing Food), I've put the sweep packages at Any Day of Any Time.

Problem: When the NPC starts sweeping an area and the animation is done playing, he'll automatically go sweep somewhere else. Then, on the way there, he'll go back to his previous location and upon arriving there, return again to the other marker. Meaning that he constantly walks away, turns around, walks away, turns around, confused.

I guess that's because he's constantly updating his packages and always randomly choosing a location to sweep.

My solution 1 that didn't work: Set the sweep packages as "Must Complete" and give them a 1hour duration. Didn't work because the NPC constantly swept the same marker, ignoring the other places (Even after one hour)

My Solution 2 that didn't work: Taking the flags given to a Shivering Isles NPC who's tasked with sweeping 4 markers. That is: "Must Complete" & give a "Count" of "5" in the target tab.

What didn't work: Instead of running the sweeping animation 5 times, he did it once and started the problem stated up (Where he walks back and forth, confused)

My Solution 3 that didn't work: Use same patterns as solution #2 but with the removal of "Must Complete". It gave me the same outcome.

What else should I do? :P

I want the NPC to randomly choose between his 8 sweep markers when he has nothing to do. After having swept the floor for a while (5 times), he chooses another marker. He must also stop sweeping when he has more important things to do. That means he should go to sleep, eat and prepare food when he's told to, stopping his sweeping.

Thanks! :P

Link to comment
Share on other sites

  • 2 weeks later...

Cliffworms, I don't know if you have found a solution, but here's my thought anyway :jellytime:

Have you tried creating one main persistent X marker -which moves randomly- as a place where the Cleaner (let's name your NPC this :dizzy: ) always sweep? What I mean is you only need to create one AI package for the entire sweep activity pointing to the main persistent X marker. If you want the Cleaner to continue sweeping elsewhere, then you can move the main X marker -via script attached to the cleaner or quest- to one of the 8 sweep markers you have placed at various locations. You can set any conditions you prefer in the script to (randomize) determine the starting location and a new location for the Cleaner to continue sweeping.

As for the more important things to do, you can arrange this single (sweeping) package by moving it under "important packages" at the AI package list. This way, the sweeping will only begin other important packages are not running.

Using the trick above, the Cleaner should still randomly "select" one of eight sweep locations, but you only need one package instead of eight which could lead to the confusions you mentioned...(poor Cleaner, have you paid the Cleaner's deserved wage? :jellytime: )

npc's which have the respawn flag activated will not be teleported (travell/find/wander packages)to their location as long as the player is in the same cell

(as the package location) ...this is one of the many small limitations of the Oblivion game and can not be fixed....only way is to leave the cell ...when you enter the cell again everything should be ok...

In my playtesting, I discovered this not to be the case. An NPC (which I have placed in the same interior cell) with respawn flag activated, was immediately teleported to the destination location (in this case Tamriel worldspace) when it has an active travel package. This always happened after I loaded a save game in which my character happened to be in the same cell with that NPC.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...