[Tool/Web/Other] How to get information inside nodes*.dat files? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (
https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] How to get information inside nodes*.dat files? (
/showthread.php?tid=664614)
How to get information inside nodes*.dat files? -
FR0DG3R - 05.03.2019
I need to read these files and obtain information about the nodes inside it, I've seen tools that help you edit or see the content inside the files like
Kyle's GPS Route Finder,
JGuntherS@NL's SA Path Editor and
Deniska's SA Path Tool but what I really want is to make my own reading of the files.
What I want, in details, is:
- Decompile nodes*.dat and/or read them through an algorithm
- Use a C++ code or something to filter this content and obtain what I want (e.g. nodes coords)
- Implement this nodes in my own SA-MP scripting project
Seems like an easy thing to do since many are doing without explaining how.
Please let me know if I can explain something better.
Re: How to get information inside nodes*.dat files? -
NaS - 05.03.2019
Just use the GPS Plugin (either by Gamer_Z or kvann's, which is better) and see the GPS.dat.
It's the original node net including fixes. If you don't want any fixes, use the older GPS.dat which is a 1:1 conversion.
You can also access the Node Data through the Plugin Natives (eg GetNodePos).
FCNPC also supports the original node data. You can check its source to see how to read and process binary data or use FCNPC's natives to access the paths.
Note that the GPS Plugins only have the road Nodes. FCNPC has all of them, boats, navi, veh and ped.
If you want to parse them yourself, they are pretty well documented on various sites:
https://gta.fandom.com/wiki/Paths_(GTA_SA)
Re: How to get information inside nodes*.dat files? -
FR0DG3R - 06.03.2019
Thanks
a lot man, exactly what I needed.