Frictional Games Forum (read-only)
Has anyone figured out .nodes files? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Has anyone figured out .nodes files? (/thread-14926.html)



Has anyone figured out .nodes files? - FragdaddyXXL - 04-19-2012

I was looking at some of Amnesia's source files and I noticed a 10_daniels_room_servant_grunt.nodes file. I was wondering if anyone knows of an easy way to make one. I say easy because one of the values needed are distance values between each node. Ex.
Code:
<Node Name="PathNodeArea_1" ID="580">
        <Edge Node="PathNodeArea_28" Distance="1.67661678791046142578" />
        <Edge Node="PathNodeArea_25" Distance="1.74686419963836669922" />
        <Edge Node="PathNodeArea_4" Distance="2.35236239433288574219" />
        <Edge Node="PathNodeArea_2" Distance="3.08871102333068847656" />
        <Edge Node="PathNodeArea_29" Distance="3.24689984321594238281" />
        <Edge Node="PathNodeArea_7" Distance="4.88411092758178710938" />
    </Node>
Of course it's possible to calculate the distance between two points, but it would be quite tedious to do so. Or am I just crazy, and that Distance value means something else completely. I would like to use such a file so that I can just clear the current path nodes from the AI and call up paths that I have already pre-made.

Oh, and they use it like so:
Code:
AddEnemyPatrolNode("grunt_normal_1", "PathNodeArea_28", 0, "");

Or is that just how far the enemy can stray from the nodes?



RE: Has anyone figured out .nodes files? - Your Computer - 04-19-2012

There's no need to figure out those files, the game will work without them.


RE: Has anyone figured out .nodes files? - Homicide13 - 04-20-2012

I think the game tends to generate those files by itself (in the same way that it generates .mesh files).

I could be wrong though.



RE: Has anyone figured out .nodes files? - Putmalk - 04-20-2012

When you open the mapviewer, it makes them. I'm not too well versed in them though.



RE: Has anyone figured out .nodes files? - Knittel - 04-20-2012

These nodes are for the movement of an enemy following the player (I'm not sure, but this would make sense). It shows every Pathnode and the Pathnodes, where no Object is in between. The distance is also saved, I don't know why. Maybe to save performance.
For creating of a custom_story it is unimportant, you don't need to change them. The Mapviewer (and Game sometimes) creates it.



RE: Has anyone figured out .nodes files? - Cranky Old Man - 04-20-2012

This is my guess:
The monster will of course choose the path to the player that has the least distance. By lowering the distance values between two nodes, you can made the monster prefer this path. For instance, if the player is hiding on the other side of a spike pit, you can set the distance leading over the pit to be really long. In that way the monster will percieve the paths leading around the pit to be shorter, and take that path instead. Only if those paths are blocked off, will the monster try to cross the spike trap.