Hi,
I've took a deeper look into paths again and got some new rudiments. First of all the structures are nearly as I guessed. I am pretty sure that it looks like that:
| CODE |
Nodes (0x20/32b): 4b - UINT32 - MemAddress 4b - UINT32 - Zero (Allways) 2b - UINT16 - Area ID 2b - UINT16 - Node ID 4b - UINT32 - Unknown 2b - UINT16 - Allways 0x7FFE 2b - UINT16 - LinkID 6b - INT16[3] - Position (XYZ) 2b - UINT16 - Path Type (0x100 for Boats) 4b - UINT32 - Flags |
I have not yet tested linking, but I will, after I got an IDE back running here.
Position values appear to be calculated by dividing them with 8 (like in SA). Just Y-position must be divided with -8 (unlike SA). But I am not sure about this yet.
But there is one more thing I found out about this theme. The values I supposed to be ped noes aren't ped nodes. Which means, somehow they are, but not all ped nodes are indexed by the number in the header. In general there are 2522 of those nodes. The special thing about them is that they are located around intersections (But allways on the pavement). I guess they are special nodes which are used to let npc's wait at pedestrian crossings (Pic 1). This means that ped nodes are identified by some kind of flag. My researches about that showed that the flag seems to be a part of the flag-number of the nodes structure, because all other unknown values appear to be some kind of randomly. However I think I will find out more about that when I managed some linking tests.
Flags are nearly the same as in SA. I will create an table like
in the wiki for that. The first part (A - M) seems to be identical or very similar to SA, but I only had a short look to that.
Pictures:

I'll keep you up-to-date, greetings so far,
- Aschratt.
//EDIT (07.01.2009):
I managed it to seperate vehicle from pedestriant and boat nodes (Pic 3). However it is pretty simple and I don't know why I haven't seen this detail a bit earlier, because it is kept from San Andreas.
The unknown value come's before the flags are paths width (which seems to take affect in IV... unlike SA where it did not have any affect) and path type. Path type defines wheather the node is an ped/vehicle/boat/different node. Yes there are different nodes (You can't see them in the picture, because I painted them white, too). Their paths type is always 0x0C. They are located at the Hove Beach harbor, where the player starts in the original game. I have no idea what they are exactly, but I guess I will find out, when I managed some linking.
However you can filter out the path type pretty easy:
| CODE |
if(pathType == 0x01) { // Boats } else (((pathType >> 4) & 0x0E) == 0) { // Cars } else { // Ped's } |
Intersection nodes appear to be checked with 0x0D, but there also seem to be some nodes with 0x0B or 0x0F. I haven't yet found out what's their difference, but it seems to be some number of the current city circuit (Or village what they were in SA.) I think that they are used for some kind of borders or filters. Pedestriants are only walking along paths with the same number. I got to check this later on. Also the rest of the byte is a bit mysterious. It seems to increment by each node (0-F) in saturate arithmetics.
However here is the structure I am using at the moment:
| CODE |
Nodes (0x20/32b): 4b - UINT32 - MemAddress 4b - UINT32 - Zero (Allways) 2b - UINT16 - Area ID 2b - UINT16 - Node ID 4b - UINT32 - Unknown 2b - UINT16 - Allways 0x7FFE 2b - UINT16 - LinkID 6b - INT16[3] - Position (XYZ) 1b - BYTE - Path Width (divide it by 8 to get the floating point value) 1b - BYTE - Path Type (0x100 for Boats) 4b - UINT32 - Flags |

//EDIT (08.01.2009):
I found out that my seperation for car and ped nodes does not allways work, but I also found out for what the first unknown value seems to stand. However it is only used for highways and/or big roads/tunnels. All nodes which are not zero there are vehicle node, unless this does not mean that all vehicle nodes are not zero there.
//EDIT (10.01.2009 #1):
Here is the flag table. I know it is not very nice, but it shows that the flags are averanged nearly like in San Andreas, which let's me come to the conclusion that they are used pretty identical:
| CODE |
04: 2681 05: 2559 06: 27 07: 7790 08: 17606 09: 11473 10: 11634 11: 11571 12: 11714 13: 11622 14: 11681 15: 5290 16: 3098 17: 23654 18: 302 19: 0 20: 27943 21: 1601 22: 1090 23: 4918 24: 7915 25: 1202 26: 4918 27: 0 28: 0 29: 9402 30: 0 31: 7419 |
I will create colored flag maps which show the averange of the flags on the nodes map. Perhaps I found out wheather real PED-Node seperation works with flags.
//EDIT (10.01.2009 #2):
All right... it's nice to have his own online-log
Whatever... Nodetypes realy seem to be influenced by flags. Flag 25 is 100% for boats, flag 29 is an special flag type just for Alderney. I guess it influences appeareance of cars and pedestriants for the "city core": more traffic jams, slower traffic, and so on... But I haven't found an flag type that 100 % matches for all ped or car nodes. I guess R* itself did some bugs there (I already recognized some path bugs ingame, but I could not say if they are on the same locations).
//EDIT: (10.01.2009 #3):
Damn, I made a mistake. I calculated flags into the wrong direction. Here are my results (Now they are exact):
| CODE |
0-4: Unknown... Not link count, as I guessed... somehow related to traffic level. 3 is only set for Alderney, 0 is only set for some nodes, the other values are allways 0.
Flag 05: Emergency only Flag 06: Boats Flag 07: Unknown Flag 08: Exactly the same as 05 Flag 09: Intersection central node Flag 10: Is highway (See SA's node flags) Flag 11: Is not highway (See SA's node flags) Flag 12: zero/unused Flag 13: Identical to 09, but not set for all nodes which have 09. Somehow else related into intersections. Flag 14: Set for almost any vehicle node Flag 15: Set for those vehicle nodes without 14, and some PED nodes Flag 16: Set for those PED nodes without 15 and some vehicle nodes
17-23: apparently randomly set, perhaps some counter
Flag 24: Set for most PED nodes Flag 25: Rarely used, police controls or roadblocks? Flag 26: Used for intersection nodes (those which are defined in the header), but also some more Flag 27: The same as 26, even used a bit more
28-31: Apparently 1 for most nodes, but not for all. Almost never 0, and if so the other 3 flags aren't set, too. |
Perhaps some of the flag stuff is used for navi-nodes (I guess some of the flags 17 - 23), we know from SA. Rockstar uses them for interpolation. I did not have a look to the link flags yet, but I think Rockstar simply put things from the sections 3, 5 and 6 together into one.
//EDIT (11.01.2009):
I checked those flags which do not make any sense again. Still they do not make any sense, lol.
Flags 28-31 are almost everytime 1111 or 0000, except for 3488 nodes. Flags 17-23 do not appear to be any counter. I don't know, what they are. Also I took a look at the link flags. I don't know what the first byte is, but the second appears to be the link length. 3rd and 4th byte are interesting, too. They are sometimes completely zero, but sometimes not. So first I guessed that they are related into interpolation, but after some thinking, I do not think so.
However, still I have no idea from where to gain the link id... I will try to figure this out and do some linking, when I was successfull... perhaps I can say more then.
This post has been edited by Aschratt on Sunday, Jan 11 2009, 10:34