Robespierre Posted May 25, 2008 Share Posted May 25, 2008 *Blows just off the cover*, *cough*, *splutter*. This topic hasn't been brought up in a while, but I figured that now might be a relevant time to revive the topic. A brief history: As far as I can see, the issue of .pth files was first raised by Pavlos regarding the previously unused M4-78 modules. DSTONEY642000 and Seamhainn both raised the topic, though the issue has been left at a standstill. Mainly because of a "the enemy you do know is better than the enemy you don't know" - essentially using waypoints is better than potentially wasting hours look up how to make custom .pth files. The reason this topic has not been brought up more often is that it does not affect 99% of modders - it only becomes an issue when using modules not included in game. Seamhainn raised it when restoring the Shadowland level, DStoney and Pavols raised it when restoring M4-78. But because custom modules have not previously been a possibility when modding Kotor, the issue has not raised more often. A summary: But what are these crazy files? Why are they so important? Path files are, essentially, the accompaniment to waypoints. If you look at this image: You can see that because the NPC cannot reach Waypoint 2 from Waypoint 1 in a straight line, they have to use certain "paths" to get to the desired location. I believe they are also important when you set random citizens to walk around a module - they follow these paths on their wanderings. A deeper exploration: If you have a look at this module in Kotor Tool Module editor: And now if you look at it in K-GFF viewer, you can see that there are two main structs; Path Connections and Path Points. "Path_points" seem to just be where on the map the points are and how many connections it forms. But I can't wrap my head around the "First_Connection", and the number of connections doesn't seem to be consistent to how many connections it shows in the KotOR Tool. And then there are "Path_Connections", which I can't even begin to comprehend. Any thoughts? Mission Outline: If nothing comes of this, then I'm not fussed. I just thought that it would be good to restart the discussion, especially since now more and more new modules are appearing, to see if anything can come out of this. I'll be posting up my experiments and discoveries as they come, but I'll start by gutting a module and seeing if I can't make a simple path file between two waypoints. -Robespierre Link to comment Share on other sites More sharing options...
stoffe Posted May 27, 2008 Share Posted May 27, 2008 I believe they are also important when you set random citizens to walk around a module - they follow these paths on their wanderings. If I remember correctly this depends on the method of movement used in the scripts that make them walk. ActionMoveToObject() would make them pathfind to reach the destination object. ActionMoveToLocation() would make them move in a straight line to the destination location, and any blocking scenery in the way would prevent them from reaching it. Since the pathfinding can be rather CPU intensive in some areas this can be useful to keep in mind. The pathfinding is further complicated by not taking placeables with collision boxes into account. If you put such a placeable on top of a path the game's pathfinding would not be aware that it is there and try to move the NPC through it, often making them get stuck anyway. Link to comment Share on other sites More sharing options...
Seamhainn Posted May 27, 2008 Share Posted May 27, 2008 If you find out anything, please, share it. I thought about creating a simple .pth file in the past, too (Shadowlands!). Then I considered the same unsolved questions you raised. And as the NPCs I created only got stuck once during many, many tests I dropped the ball altogether. But if you want to give it a go, I am all for it! Considering how old those two games are, it is a mystery to me how much work is still put into them (including myself)... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.