Garry's Mod

Garry's Mod

NPC Navmesh Navigation
 Dit topic is vastgepind, dus het is waarschijnlijk belangrijk
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://steamoss.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.
Laatst bewerkt door 〔cout〕➜ Brainless❓; 26 dec 2022 om 10:32
< >
1-15 van 20 reacties weergegeven
Does this work with VJ Base entities?
〔cout〕➜ Brainless❓  [ontwikkelaar] 27 dec 2022 om 2:59 
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.
Origineel geplaatst door | 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
will this work for flying npcs in the future?
does this work with dynamic npc squads or inpc?
〔cout〕➜ Brainless❓  [ontwikkelaar] 28 dec 2022 om 9:16 
Origineel geplaatst door 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.





Origineel geplaatst door 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?
Laatst bewerkt door musicfan539; 28 dec 2022 om 12:24
〔cout〕➜ Brainless❓  [ontwikkelaar] 29 dec 2022 om 9:08 
From what i have read about that mod, Some of it would work but i think a couple things might not.
Laatst bewerkt door 〔cout〕➜ Brainless❓; 29 dec 2022 om 9:08
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
Laatst bewerkt door Solar; 3 jan 2023 om 17:02
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.
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:
〔cout〕➜ Brainless❓  [ontwikkelaar] 24 jan 2023 om 9:41 
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.
how do i use the debug tool?

for the love of god tell me!
Laatst bewerkt door LSD Dreamer; 4 mei 2023 om 10:12
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.
Origineel geplaatst door | 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.
Laatst bewerkt door LSD Dreamer; 6 mei 2023 om 4:16
< >
1-15 van 20 reacties weergegeven
Per pagina: 1530 50