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.
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](http://devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/6/f/6/c/6f6c547680806d8717ca094492b7918fa3d1d8c9.png)
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 255)
Nodes with a lower weight are pictured as closer to red (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 MyPath = PathObject.fromWaypoints(PathData[1],PathData[2])
local OrderedWaypoints = MyPath:GetOrderedWaypoints(StartPosition,EndPosition)
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
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.