Node Master, a free and versatile A* Pathfinding Plugin

Node Master


A free Pathfinding Plugin created by @Grersh, Logo created with help from @Synthlax.


Why use Node Master
Node Master is a very versatile plugin, allowing quick and easy placement of Nodes and Connectors using its GUI. Node Master also exports the NodeMap in a single easy to read module script containing a dictionary of the Waypoints and WaypointConnections. This exported module is able to be used in conjunction with Node Master’s custom pathfinder object, or easily read for those of you who wish to make your own pathfinder script.

Plugin Link
Pathfinder Link

Export Format

Waypoints are Exported into a ModuleScript called “PathData”. Each waypoint is stored by ID, with its Position, Label and Weight being collected.
image
Located inside of the PathData module, you can find the plug-ins built-in Pathfinder. This Pathfinder object contains methods that make exploring the PathData easy. Documentation for the built-in Pathfinder can be found in it’s ModuleScript.

Interface


The design of this plugin was heavily inspired by Sleitnick’s Node Mapper plugin. The plugin was designed with speed and efficiency in mind.

Nodes that have a higher weight are pictured as closer to yellow (Max/Default weight is 1000, Colors stop lerping > 255)
Nodes with a lower weight are pictured as closer to yellow (minimum at 0)

Bi-Directional path nodes are pictured black parts running from 1 node to another.
Uni-directional nodes are pictured as having arrows which indicate that NodeA can reach NodeB but NodeB can’t reach NodeA.

In the bottom right, you can see the details of the most recently placed/clicked node, allowing you to edit it’s position, label and weight. You can have these automatically set on placement by using the options on the left-hand side of the screen.


Set-up
In order to work properly, Node Master MUST have script injection permission. This is so it can write to the source of the exported ModuleScript containing PathData. One downloaded, go to Manage Plugins in the Plugin tab.



Click the notepad icon.
and turn ON script injection.


Node Master Usage
Node Master is best used in environments that contain static maps. However, using the built-in pathfinder, you could modify waypoints at runtime to account for obstacles and hazards.

Using Pathfinder Object
Here is some example code of visualizing a path that travels along your path data!

local PathData = require(PathData) -- Your Exported NodeMaster PathData
local PathObject = require(PathObject)
local StartPosition = StartLocation.Position
local EndPosition = EndLocation.Position
local AgentInfo = {
	AgentSpeed = 16; -- Not functional at the moment.
	AgentStepHeight = 2.5;
	AgentJumpHeight = 7.5;
}

local MyPath = PathObject.fromWaypoints(PathData[1],PathData[2])
local OrderedWaypoints = MyPath:GetOrderedWaypoints(StartPosition,EndPosition,AgentInfo)
local function Draw(A,B)
	local Part = Instance.new("Part")
	Part.Anchored = true
	Part.Size = Vector3.new(1,1,(A-B).Magnitude)
	Part.CFrame = CFrame.lookAt(A:Lerp(B,0.5),B)
	Part.Parent = workspace
end

local Previous = StartPosition
for _, Waypoint in ipairs(OrderedWaypoints) do
	Draw(Previous, Waypoint.Position) -- Draw path
	Previous = Waypoint.Position
end

Example Files and Plugin Tools
Below, you’ll find an exaple file containing automatic node generation tools and a tree house for you to explore!
NodeMasterExample.rbxl (102.4 KB)

Plugin Tutorial:

Update Log

Node Master, a free and versatile A* Pathfinding Plugin - #16 by Grersh

Credits
Scripting - @Grersh
UI Design - @Grersh, with inspiration drawn from @sleitnick
Logo - @Synthlax, with reference from @Grersh

License
You are free to view, read and edit the modules source. The logos and icons of pressure cooker studios are not included as part of the plugin’s source and therefore are not open-source.

36 Likes

This could really simplify a key aspect of A* pathfinding. I can totally see how this would be helpful for implementing A* pathfinding.

2 Likes

Just did a few hotfixes:

  • Made controls display the ActionText (eg: What each input actually does)
  • Fixed Paint mode, while holding G and clicking a node you will update that node to use the PlacementLabel and PlacementWeight. If done in bulk it will apply in bulk.
1 Like

Working on an update to this plugin to modify how the gridsnap works. Will update this thread once I am done!

New Update!

Next on the chopping block is automatic node connection (connect nodes in a radius from mouse using raycasting) and a new SnapToGrid system that goes local to the surface part.

1 Like

Hello everyone!

I have now applied some new changes to NodeMaster! The changes are listed below:

New Tool Interface: Thank you @Synthlax for the icons
I have rewrote the backend to be cleaner and support custom Tools! Only two tools exist at the moment, but more will be added in the future.
The cursor icon is used for Node placement, node bulk placement, node removal, node bulk removal and node editing.
The hemisphere icon (paint tool) is used to quickly paint groups of nodes to match the specified node weight and node label. You are also able to customize how these tools work (eg: paint radius)

New Bulk Place Interface:
Lastly, Bulk Node Placement has been rewrote to use a specified Columns and Rows count, this decision was made due to the GridSnap system not being efficient in tight spaces.

Some Backend Changes:

  • NodeWeight no longer clamps between 0 and 255 and now clamps between 0 and 1000. Clamping is intended to discourage usage of unreasonably high weights.
  • NodeWeight is now 0 by default and low NodeWeights appear closer to orange whilst high NodeWeights are closer to red. (Colors lerp between 0 and 255 to encourage lower node weights)
  • Bulk placement changes mentioned above
  • Tool System mentioned above

Again, if you find any issues please message me here. If you do not here back from me try reaching out via other methods!

2 Likes

the fact that this post only has 1000 views is mind boggling.

Node Master, 2.0 UPDATE!!

Hello everyone! Recently I have found myself delving more and more into custom pathfinding. Doing more research, testing and application of custom pathfinding has allowed me to identify the shortcomings of this plugin! As such, I have added many improvements and fixes to this plugin! Here they are listed by order of importance!

New Changes:

  • I have changed the way Waypoints are saved. Now, waypoints save an additional two pieces of information: Radius and Height. This was added due to some complications I had with my own NPCs. As such, the appropriate changes have been made to the pathfinder as well.

  • I have also changed some code in the Pathfinder, the new Pathfinder now contains new setter methods, as well as an improved Pathfinding algorithm. (I still have to make the new algorithm account for AgentRadius and AgentHeight)

  • In addition to the above, I have also made the plugin more user-friendly! I have added two new tools, an export tool and a cancel export tool. In my recent work I found myself mostly using the plugin to visualize my NavMesh, as such I did not want my NavMesh to run the export code each time I closed it! From now on I recommend closing the plugin using one of those two tools, as closing it from the PluginBar will still export!

  • Lastly, I have also wrote some console bar tools that you can execute by pasting into the console. These tools make the process of NavMesh generation SIGNIFICANTLY EASIER than manual node placement. I highly recommend future usage of these tools for your navigation mesh. (See NodeMasterExample.rbxl for more info)

4 Likes

I love this module soo muchhhh, please for the love of god don’t stop it

1 Like

New Resources
Hello everyone! I have now created some new resources for NodeMaster.

The new AutoGen is now finished. This is not the final version however as I intend on making it based on Part.CFrame rather than Part.Position. This is one of the shortcomings of the AutoGen and will be dealt with eventually. Due to this, implementation of stairs using this AutoGen will be slightly challenging, however once CFrame is used as the default it will be as simple as placing an angled part.

This autogen version is best for those of you who have flat and dynamic maps that can be influenced by structure shifting and placement. Such as RTS games. Attached below you’ll find the most up-to-date autogen module and a game to check it out.

I’m not done with NodeMaster just yet, so stay tuned for updates! Once again, feel free to report any issues back to me.

NodeMasterExample.rbxl (102.4 KB)

1 Like

Heyy I’m having reaaal issues with the heights for one of our maps for our game it all comes from the height difference really, the pathfind really doeeesn’t like it at all, and I was thinking about solutions from this and as I haven’t come with any that isn’t too gorilla, I’m here asking for your help as I really love this module and wouldn’t like to change it at all.

It should do the green path always but sometimes if its close enough of the ledge, it will get to the point and get basically stuck

(As a side note once you jump off the ledge the GetOrderedWaypoints array gets bigger, it has the path that it needs to take but it cycles back to itself and doesnt move or something??)



This is definitely very strange. From the looks of it, I assume you want that crab thingy to follow you down the ledge. I’m not 100% sure what’s going on here, but I think a glance at your NavMesh will help.

Could you please send me a message on discord @grersh, with the map and the node data.

I am going to be preparing a video tutorial that’ll cover efficient usage of NodeMaster. I also will be releasing the new improvements I made to the auto-nav around that time (though from the looks of it I don’t think you are using Autonav here).

2 Likes

I’ve been using it a lot,but i noticed something, the pathfinder object doesn’t get exported along with the path data, also a suggestion, add a key shortcut to bulk connect nodes, and also , maybe avoid obstructions/obstacles when connecting nodes, would help a lot

1 Like

Will absolutely do this. Been redoing some of the code of the plugin (primarily the loading and backend).

Can’t guarantee an automatic connection feature soon, but I will be dropping a new version that will include visualization of bulk node generation to make that process easier.

If you want, I would consider checking out the AutoNav module. I’ll be dropping a new version of that which includes some additional methods along with the tutorial.

1 Like

Node Master, 2.5 UPDATE

Hello! I have made some improvements to the NodeMaster backend.

New Changes:

  • Improved the script injection detection
  • Made it so the Paint tool now paints connections
  • Disabled the plugin-button when in node master, now you have to close via the plugins GUI

Tutorial:
With the new changes, I have created a short tutorial which provides information on how to best use the Nodemaster Plugin. I hope this can answer questions you may have on the plugin.
Tutorial Link

Ill probably re-record when I have a better mic.

6 Likes