Garry's Mod

Garry's Mod

NPC Navmesh Navigation
 Topik ini telah disematkan, kemungkinan topiknya penting
Cheerful  [pengembang] 23 Des 2022 @ 10:26am
FAQ
Here is a FAQ section. Hopefully it will answer some questions you might have, Also feel free to help others out if you know the solution to a problem.

Q : NPCs are not moving?

A : 1 Firstly, Make sure the map you are playing on has a navmesh. You can generate one with the nav_generate console command.

A2: Is the mod enabled. ( Check in your addons list and in the spawnmenu settings. )

A3: Are their navmesh nodes near the NPCs? Can the NPCs reach their destination VIA the navmesh?You can check with ( nav_edit 1 ) and explore the location.

Q: Does this work with SNPCs? ( VJ Base for example )

A: Yes and no, No it does not work with SNPCs unless the developer of that mod adds support.

Q: I got an error / Bug ! What do it do?

A: Its best to report it to the Bugs and errors report section.
https://psteamcommunity.yuanyoumao.com/workshop/filedetails/discussion/2905690962/3730700942539928185/

Q: NPCs like to jump around a lot?

A: Thats because their navigator is detecting different heights between the waypoints so they jump.

If you want you can try turning off ( Allow jump Up ) and ( Allow jump down ) settings in the spawnmenu.

If all else fails try setting the console command ( z_npc_nav_allow_forward_jumps ) to 0

Q: Will this work with maps that have AI Nodes on them?

A: Yes, The navigator will only take over when an NPC can't seem to pathfind to its desired point.

Q: Will this work with addons that command NPCs to move to locations?

A: Yes, When the navigator detects that an NPC wants to move to a location it will override if they can't get there.

Q: Does this work with other gamemodes?

A: Yes. An example of some gamemodes is smashing survival or the wave breaker.

Q: What are console commands? How do i open console?

A: To open console you need to make sure its enabled. Open you main menu ( Not the spawnmenu ) Go to options, Then advanced options and tick the box that says ( enable developer console ) Good now you can open the console,
Click apply and open it.The default key for console is the tilder key ( below Esc and to the left of the 1 key on most keyboards )
If you don't have a tilder key you can change it in your options.
Terakhir diedit oleh Cheerful; 26 Des 2022 @ 10:32am
< >
Menampilkan 1-15 dari 20 komentar
meatfrog 26 Des 2022 @ 10:21am 
Does this work with VJ Base entities?
Cheerful  [pengembang] 27 Des 2022 @ 2:59am 
Unfortunately, VJ Base SNPCs seem to use a different way of setting their destination. I can't see a reason why it would not be implemented in the future tho.
meatfrog 27 Des 2022 @ 4:33am 
Diposting pertama kali oleh | 2 |-Brainless-| 4 |:
Unfortunately, VJ Base SNPCs seem to use a different way of setting their destination. I can't see a reason why it would not be implemented in the future tho.
ah ok
Solar 27 Des 2022 @ 10:07am 
will this work for flying npcs in the future?
SLIME 28 Des 2022 @ 1:19am 
does this work with dynamic npc squads or inpc?
Cheerful  [pengembang] 28 Des 2022 @ 9:16am 
Diposting pertama kali oleh Solar:
will this work for flying npcs in the future?

flying NPCs use a different form of AI Nodes, simply called air nodes.
I will have to see if there is a way to get flying NPCs desired destination for my navigator to navigate to. So possibly in the future yes.





Diposting pertama kali oleh frordon geeman:
does this work with dynamic npc squads or inpc?

Most likely not.
When NPCs don't have their normal AI Nodes they use, Their AI behaviour is less functional, My mod actually controls them a little to fix it, But INPC might try and fight for control over the NPCs with this mod.
However, NPC squad improvements.should be fine.
Does this work with enhanced sandbox npcs?
Terakhir diedit oleh computer.boy89; 28 Des 2022 @ 12:24pm
Cheerful  [pengembang] 29 Des 2022 @ 9:08am 
From what i have read about that mod, Some of it would work but i think a couple things might not.
Terakhir diedit oleh Cheerful; 29 Des 2022 @ 9:08am
Solar 3 Jan 2023 @ 4:59pm 
will npc's be able to obey the navigation areas marked with crouch, jump, sprint, danger, running, etc properties applied on them? and will they finally use ladders if theres a navmesh on the usable ladder brush that is
Terakhir diedit oleh Solar; 3 Jan 2023 @ 5:02pm
Cheerful  [pengembang] 5 Jan 2023 @ 9:43am 
The source engine has a very strange way that ladders work with the navmesh, They actually don't count has navmesh nodes directly. Instead they are their own unique kind of node thats complex to implement into the pathfinder.

I have actually got ladders to work before in some gamemodes of mine ( smashing survivals player bots can use ladders as an example.)

As for making them obey areas mark with attributes, Yes i can do that. Crouch would be a bit of a pain to implement tho, Since NPCs ( In code ) have a strange way of handling this.
ByFyves 24 Jan 2023 @ 7:13am 
Is it possible to get the NPCs to walk instead of run? I'd like for them to walk to their points, they always look like they're rushing :melon:
Cheerful  [pengembang] 24 Jan 2023 @ 9:41am 
Thats actually a feature thats coming in the next update, So eventually, Yes! The update is quite close to being dropped in the next few days / weeks.
LSD Dreamer 4 Mei 2023 @ 10:12am 
how do i use the debug tool?

for the love of god tell me!
Terakhir diedit oleh LSD Dreamer; 4 Mei 2023 @ 10:12am
Cheerful  [pengembang] 6 Mei 2023 @ 1:39am 
The debug tool is useful if you find the NPCs are getting stuck somewhere on the navmesh.
Which after you found the problem you can edit the navmesh and fix it etc.....

One thing to note is its a good idea for the map to have a navmesh.

-------------
To use the tool,
Right click on a NPC to select them. ( Only one NPC can be selected at a time )

You can use left click to make the selected NPC move to the location that you fired the toolgun at.
--------------

Pressing your reload key will make the selected NPC move to a random location nearby.

All the settings in the spawnmenu should be self explanatory.
Diposting pertama kali oleh | 2 |-Brainless-| 4 |:
The debug tool is useful if you find the NPCs are getting stuck somewhere on the navmesh.
Which after you found the problem you can edit the navmesh and fix it etc.....

One thing to note is its a good idea for the map to have a navmesh.

-------------
To use the tool,
Right click on a NPC to select them. ( Only one NPC can be selected at a time )

You can use left click to make the selected NPC move to the location that you fired the toolgun at.
--------------

Pressing your reload key will make the selected NPC move to a random location nearby.

All the settings in the spawnmenu should be self explanatory.
thank you. altho sometimes i have to refresh it. but that is easely fixed by left clicking on the ground with a hostile npc.
Terakhir diedit oleh LSD Dreamer; 6 Mei 2023 @ 4:16am
< >
Menampilkan 1-15 dari 20 komentar
Per halaman: 1530 50