Jump to content

Is there a mod that makes the NPCs any less clumzy?


Recommended Posts

Well, I tried to make a search for something of the sort, but no luck so far. I have a vague memory of a mod for oldrim, making the NPCs actually acknowledging the fact that there are other people and objects around them. As right now, they're acting like blind elephants, often pushing me or other NPCs, even during dialogue scenes. They are so damn clumsy! They bump into objects, scatter them around, making a total mess. It can't be just my setup, right?   

Edited by Incubusbul
Link to comment

Pretty sure that's impossible to fix with a CK-mod. Memory-hacking of course in theory can fix anything - its just a matter how difficult something is (kinda like cryptography: Nothing is unbreakable - its just the odds are so low that its more likely the sun will explode tomorrow).

 

To understand why the AI stupidly bumps into people, you need to understand how pathfinding in skyrim works. When an NPC wants to go to a certain spot, it does so in two phases:

 

1. First it uses invisible network of streets (called "navmeshes") to get close to the destination. Imagine an empty room with a grid overlayed on it: The NPC will plan his route to the destination by going from one square to another. Now in reality they're not squares: Instead it looks more like an invisible web layed out in the room - and designed to avoid static obstacles. Why does the AI use this method to go to the destination? Why does it not simply navigate like a human, by "looking" at the room? Because that would be extremely hard on the CPU. "Pathfinding" is one of the most cpu-hungry things an AI can do. So in order to have dozens of NPCs walking around, and having enough CPU left for physics, scripts and all the other stuff, pathfinding must be made "cheap". And planning a route to the destination by just looking at an invisible streetmap (navmesh) is hundreds of times faster than doing "real" navigation via sensors.

 

Why does this matter for your question? Well, those streetmaps/navmeshes aren't automatically generated. Instead bethesda designers have to manually create those maps for the AI. And if you thought beth-developers are incompetent and lazy, you don't wanna know what lazy amateur modders do: In many cases they just create no navmeshes at all for their mods, which makes the AI go fullretard in terms of pathfinding. And even if there are navmeshes, they're usually very sparse with not many paths an AI can take.

 

That last sentence probably got you thinking: "Wait, is that why they're walking into me? Do they just not have alternative paths to the destination, because the modder/beth was too lazy to give them alt-routes?" Answer: Yes, that's one reason this can happen. The AI is smart enough to check if one of the "roads" is blocked by an actor. If it has an alternate route, it will use that one instead, but if there's no alt-route, then it will first try to push the actor out of the way, and if that fails it will just teleport to the next node on the map.

 

2. For the last few meters - or if the streetmap has no nearby node, it picks the closest possible - the AI uses actual sensors to navigate. Now remember real pathfinding is super expensive. It cheaper if you only need to do it for a few meters around you. That's why in skyrim sensors are only used for extremely close distances. But even this can fail: What if there's an obstacle in the last few meters? Or what if the player is standing right on top of the destination? What if Lydia really wants that spot, even if it means standing on top two people having sex? We all know the answer to that.

 

 

 

Link to comment
On 6/26/2021 at 9:05 PM, bastardopfromhell said:

Pretty sure that's impossible to fix with a CK-mod. Memory-hacking of course in theory can fix anything - its just a matter how difficult something is (kinda like cryptography: Nothing is unbreakable - its just the odds are so low that its more likely the sun will explode tomorrow).

 

To understand why the AI stupidly bumps into people, you need to understand how pathfinding in skyrim works. When an NPC wants to go to a certain spot, it does so in two phases:

 

1. First it uses invisible network of streets (called "navmeshes") to get close to the destination. Imagine an empty room with a grid overlayed on it: The NPC will plan his route to the destination by going from one square to another. Now in reality they're not squares: Instead it looks more like an invisible web layed out in the room - and designed to avoid static obstacles. Why does the AI use this method to go to the destination? Why does it not simply navigate like a human, by "looking" at the room? Because that would be extremely hard on the CPU. "Pathfinding" is one of the most cpu-hungry things an AI can do. So in order to have dozens of NPCs walking around, and having enough CPU left for physics, scripts and all the other stuff, pathfinding must be made "cheap". And planning a route to the destination by just looking at an invisible streetmap (navmesh) is hundreds of times faster than doing "real" navigation via sensors.

 

Why does this matter for your question? Well, those streetmaps/navmeshes aren't automatically generated. Instead bethesda designers have to manually create those maps for the AI. And if you thought beth-developers are incompetent and lazy, you don't wanna know what lazy amateur modders do: In many cases they just create no navmeshes at all for their mods, which makes the AI go fullretard in terms of pathfinding. And even if there are navmeshes, they're usually very sparse with not many paths an AI can take.

 

That last sentence probably got you thinking: "Wait, is that why they're walking into me? Do they just not have alternative paths to the destination, because the modder/beth was too lazy to give them alt-routes?" Answer: Yes, that's one reason this can happen. The AI is smart enough to check if one of the "roads" is blocked by an actor. If it has an alternate route, it will use that one instead, but if there's no alt-route, then it will first try to push the actor out of the way, and if that fails it will just teleport to the next node on the map.

 

2. For the last few meters - or if the streetmap has no nearby node, it picks the closest possible - the AI uses actual sensors to navigate. Now remember real pathfinding is super expensive. It cheaper if you only need to do it for a few meters around you. That's why in skyrim sensors are only used for extremely close distances. But even this can fail: What if there's an obstacle in the last few meters? Or what if the player is standing right on top of the destination? What if Lydia really wants that spot, even if it means standing on top two people having sex? We all know the answer to that.

 

 

 

That's very interesting. So even with today's top end CPUs, pathfinding would put a heavy load on them? Even with considering Skyrim is about 10 years old?

Link to comment
23 hours ago, Goodfellow55 said:

That's very interesting. So even with today's top end CPUs, pathfinding would put a heavy load on them? Even with considering Skyrim is about 10 years old?

Multiple factors at play here, which all combine for a perfect storm.

 

1. 75% of all hardware performance gains in the last 10 years have been wasted on lazyness. Err, i mean more abstraction layers and middleware, as well as "state of the art" development doctrines (read: "cheap and fast", gimmegimmegimme). Notice there's a whole industry behind this: It's not just HW-vendors that benefit from you having to buy a new machine, just maintain the same exact performance and functionality. Software devstudios buy entire frameworks instead of developing their own tech. And then they buy frameworks for frameworks for frameworks. The companies selling those frameworks do make a lot of money, as do the companies which then train studios in using them. Etc etc.

 

2. Bethesda isn't really a devstudio. It's more like microsoft or google, who simply buy up promising companies and then assimilate them into their machine. I'm one of the few people who followed Beth's path since their very beginning, and i can tell you even their first games had the same characteristics as their games today: Horrible performance. Unimaginative gamedesign. Tek bought from other companies. My point is: In addition to generic trends described in #1, beth was never good at programming.

 

3. Most players thing the GPU handles all graphics in games. But actually the CPU is babysitting the GPU: For every object that needs to be rendered, and every trivial effect, the CPU needs to send commands to the GPU. This is called "drawcalls", So as graphics have improved in games over the last 10 years, so has the number of drawcalls increased. This means after the 10% hardware performance you're left with after #1 and #2, you can subtract another good chunk because the CPU now has to spend more time telling the GPU what to do.

 

4. The game being 10 years old means it was designed for 10 years old hardware. The compromises made in pathfinding don't magically vanish just because you run it on a new CPU. Instead to take advantage of more CPU-power, somewould would have to redesign pathfinding in Skyrim.

Link to comment
On 6/29/2021 at 9:11 PM, bastardopfromhell said:

Multiple factors at play here, which all combine for a perfect storm.

 

1. 75% of all hardware performance gains in the last 10 years have been wasted on lazyness. Err, i mean more abstraction layers and middleware, as well as "state of the art" development doctrines (read: "cheap and fast", gimmegimmegimme). Notice there's a whole industry behind this: It's not just HW-vendors that benefit from you having to buy a new machine, just maintain the same exact performance and functionality. Software devstudios buy entire frameworks instead of developing their own tech. And then they buy frameworks for frameworks for frameworks. The companies selling those frameworks do make a lot of money, as do the companies which then train studios in using them. Etc etc.

 

2. Bethesda isn't really a devstudio. It's more like microsoft or google, who simply buy up promising companies and then assimilate them into their machine. I'm one of the few people who followed Beth's path since their very beginning, and i can tell you even their first games had the same characteristics as their games today: Horrible performance. Unimaginative gamedesign. Tek bought from other companies. My point is: In addition to generic trends described in #1, beth was never good at programming.

 

3. Most players thing the GPU handles all graphics in games. But actually the CPU is babysitting the GPU: For every object that needs to be rendered, and every trivial effect, the CPU needs to send commands to the GPU. This is called "drawcalls", So as graphics have improved in games over the last 10 years, so has the number of drawcalls increased. This means after the 10% hardware performance you're left with after #1 and #2, you can subtract another good chunk because the CPU now has to spend more time telling the GPU what to do.

 

4. The game being 10 years old means it was designed for 10 years old hardware. The compromises made in pathfinding don't magically vanish just because you run it on a new CPU. Instead to take advantage of more CPU-power, somewould would have to redesign pathfinding in Skyrim.

Wow, I definitely learned something new today! lol. What you said makes perfect sense, and it opened my eyes. I just hope beth does a better job with ES6.

Link to comment

There old game Morrowind have plenty of mods to help it take advantage of things not avalible at the game's creation. And there are such mods for Skyrim as well. It take years of tinkering with a game engine that the game designers do not have.

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use