Frictional Games Forum (read-only)

Full Version: Has anyone figured out .nodes files?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
There's no need to figure out those files, the game will work without them.
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.
When you open the mapviewer, it makes them. I'm not too well versed in them though.
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.
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.