Garry's Mod

Garry's Mod

[E2] Navcore Reworked
56 Comments
Kerk 9 Jun, 2024 @ 3:10pm 
This addon is help me make silly robots. 24 glimbo's gold out of 10.
ByakuyaKuchiki 22 Apr, 2023 @ 1:29am 
ah, I didn't have the library
ByakuyaKuchiki 22 Apr, 2023 @ 1:26am 
sv: Expression 2 (generic): addons/wire-master/lua/entities/gmod_wire_expression2/core/extloader.lua:387: attempt to index field 'pather' (a nil value)
iNVERTED  [author] 9 Apr, 2023 @ 9:03pm 
The old system would result in incomplete, possibly incorrect paths if it couldn't find it within a hard limit of checks. With this system, you can run the navPathStepSimple() multiple times to continue an unfinished pathfind and be guaranteed a valid path if the target isn't in an impossible location.
Mikey 9 Apr, 2023 @ 7:43pm 
i feel like you should add back the canPathGenerate() function and add a convar for how long between generations
iNVERTED  [author] 9 Apr, 2023 @ 7:21pm 
While a pather is going, navPathAreasChecked() returns how many areas it has checked, and navTotalAreas() returns how many areas the map in all has. It's not possible to know exactly how much is left, only able to estimate it.
Mikey 9 Apr, 2023 @ 7:21pm 
i have a custom core that i have made as well, just to make the player move
Mikey 9 Apr, 2023 @ 7:21pm 
is it ok if i send an image of my code to you?
Mikey 9 Apr, 2023 @ 7:17pm 
also what if i want to return the current progress the step function has made even if the path isnt fully generated?
Mikey 9 Apr, 2023 @ 7:16pm 
yea
iNVERTED  [author] 9 Apr, 2023 @ 7:14pm 
Minor correction, it would actually return "Complete" not "Success"
Mikey 9 Apr, 2023 @ 7:13pm 
i completely forgot about the string return in the step function
Mikey 9 Apr, 2023 @ 7:13pm 
you know what you're probably right.
iNVERTED  [author] 9 Apr, 2023 @ 7:09pm 
If navPathStepSimple() doesn't return "Success" then navReturnPathSimple() will fail
iNVERTED  [author] 9 Apr, 2023 @ 7:08pm 
About the navReturnPathSimple() had the path finished before it was used?
iNVERTED  [author] 9 Apr, 2023 @ 7:07pm 
Don't know how the core was completely missing, but should hopefully be fixed now
Mikey 9 Apr, 2023 @ 6:44pm 
by you i mean my "bot"
Mikey 9 Apr, 2023 @ 6:43pm 
the path generation doesn't reach the destination, it gets stuck nearby or, on gm_construct, on top of the main building, you just keep walking off the edge and going back to the destination over and over
Mikey 9 Apr, 2023 @ 6:28pm 
but it lags a lot due to a big path being generated when far away.
Mikey 9 Apr, 2023 @ 6:13pm 
i just fixed the problem by setting the max steps to 10000 and using navPathStepSimple(10000)
Mikey 9 Apr, 2023 @ 6:12pm 
ok i just figured out that if the path tries to generate more steps than navPathStepSimple() it errors.
Mikey 9 Apr, 2023 @ 6:04pm 
it only happens when i use navReturnPathSimple()
Mikey 9 Apr, 2023 @ 6:04pm 
attempt to index nil value
Mikey 9 Apr, 2023 @ 6:03pm 
error on line 417
Mikey 9 Apr, 2023 @ 6:01pm 
but it has the same issues i had before
Mikey 9 Apr, 2023 @ 5:56pm 
the github version works
Mikey 9 Apr, 2023 @ 5:54pm 
im gonna try using the github version
Mikey 9 Apr, 2023 @ 5:35pm 
the mod is not working, the commands arent showing and the extension isn't being loaded.
iNVERTED  [author] 9 Apr, 2023 @ 2:46pm 
Rereworked the Pathfinders Library, which should solve various issues with this one.
Bear 3 Mar, 2023 @ 11:14am 
Can you make E2 Shield?
Mikey 23 Feb, 2023 @ 8:22pm 
and the navPathStepSimple function is just returning "Reached Goal"
Mikey 23 Feb, 2023 @ 8:20pm 
so whenever you get too far away from the start of the path generation or go behind a wall or two it errors with "entities/gmod_wire_expression2/core/custom/navcorereworked.lua:347: attempt to index a nil value"
iNVERTED  [author] 28 Dec, 2022 @ 5:17pm 
Changes have been made
StrawWagen 27 Dec, 2022 @ 9:35pm 
ooo
iNVERTED  [author] 27 Dec, 2022 @ 9:09pm 
I've convinced myself to work on this addon again. I've created a new pathfinding base that will allow for splitting up the progress on pathfinding. I've also improved optimization on pathfinding quite a bit, allowing more path generation at once. Changes will be applied fairly soon.
Konstak 8 Nov, 2022 @ 1:01pm 
May we have an actual tutorial on how to use this? Like a youtube tutorial or something. i have 0 clue how to even use this even after checking everything. there's no proper tutorial on what to do or how to make something with it and i haven't seen anyone explaining this on yt.
iNVERTED  [author] 8 Aug, 2022 @ 5:20pm 
I think I may have an idea on how to accomplish that
StrawWagen 1 Aug, 2022 @ 12:46pm 
You think it might be possible to split the pathfinding up between frames?
Allows for longer paths without nuking the session
crazygamerguy10 1 Jul, 2022 @ 1:21pm 
maybe my code is just unoptimized.
crazygamerguy10 1 Jul, 2022 @ 1:20pm 
hmm
iNVERTED  [author] 1 Jul, 2022 @ 12:45pm 
I'm not getting any tick quotas on gm_boreas with the E2s I've been testing with
crazygamerguy10 30 Jun, 2022 @ 4:17pm 
rn im on gm_boreas
crazygamerguy10 30 Jun, 2022 @ 4:17pm 
so for whatever reason when i'm on a big map it just tick quotas even when i turn the area check limit really low
crazygamerguy10 28 Jun, 2022 @ 2:01pm 
The "navSetFollowerSize()" is a game changer, the other Navcore would generate points right up against walls if i was around a corner but now my simfphys taxi doesn't get stuck on walls :steamhappy:
crazygamerguy10 28 Jun, 2022 @ 1:57pm 
thanks
crazygamerguy10 28 Jun, 2022 @ 1:57pm 
yea the old navcore wasn't like that so i was confused for a bit until i realized after using the array's count
iNVERTED  [author] 28 Jun, 2022 @ 1:57pm 
The array should return in the proper order now
iNVERTED  [author] 28 Jun, 2022 @ 1:44pm 
With how A* works, it reconstructs the path from the goal back to the start. I could make it reverse the array before returning.
crazygamerguy10 28 Jun, 2022 @ 1:32pm 
im not sure if thats how its supposed to be or not
crazygamerguy10 28 Jun, 2022 @ 1:32pm 
so i just found out that the array is flipped, so the last vector in the array is the next point for the follower