i wanna make pathfinding possible without making the NPC just make its own way, basically i want it to like select one part that it finds relatively perfect for pathfinding, such as the green map nodes you see here in the picture below this text.
anyways how to make pathfinding only on map nodes?
You would need to use your own algorithm for this. As stated above, most of the people find the A* pathfinding algorithm the best. Here’s a game that contains a few of those algorithms. You can play around and as well, get the source code of the game