Jump to content
Sign in to follow this  
HorribleGoat

Road re-pathing tip

Recommended Posts

I had set my object folder to P:\CA in the project parameters but later found out that it should be left blank if I wanted to use custom objects from separate addons. (correct me if I am wrong)

Anyway I already had quite a few kilometers of road laid out and did not want to redo all of them so I set out to find a solution. Searching through the forums I found some reference to a tool called depew by Mikero, but could not find much documentation on how to use it. Also it did give me an error message while trying it with my .pew file so I had to find another way.

I read about how some people have worked together on maps creating areas and the just copying them on the master file and this gave me an idea. Although I could not just simply change the path in the Visitor road tool I hoped to make a new version of my map with correct project/object path and somehow copy my roads on it with the right paths to the road pieces and for my relief I got it working.

Anyways if someone else happens to come across the same issue as I hopefully this helps

Step 1

Make BACKUPS.

Step 2

Copy "mymap.pew" to "mymap2.pew"

Step 3

Open up "mymap2.pew" in visitor, hide all other objects but roads -> select all roads and delete them

Step 4

Open Roads tool and select the first road type, hit edit and open the straight parts tab and take down the names of the pieces.

Example: roads2\asf1_6

Then delete them all.

Step 5

Hit browse and find the same file again in the CA\roads2\ folder. Note the file path is now CA\roads2\asf1_6.p3d and name is CA\roads2\asf1_6. Now change the name to roads2\asf1_6 as it was before in the old road pieces and repeat the same on all pieces. (Remember to redo crossroads too!)

Step 6

Now you should have re-pathed and renamed all roadpieces and the next step is to open the old map file along the new. Visitor can open multiple simultaneous projects, so while the "yourmap2.pew" is open, hit project menu and open up the original "yourmap.pew" Now hit window menu and tile and you have both maps open side by side.

Then hide all other elements on the original map so that only roads are visible and hit ctrl+a to select all. Then copy the roads, select the re-pathed mapwindow and hit shift+v to paste the pieces on their actual location.

TADAA if everything went correctly you should have your road network back where it belongs with new pathing that works with custom models.

In conclusion the road tool seems to be related to the road group name and the names of the pieces, so if the piece name stays the same, the object it draws can be any type of road?

This method could probably be used to change road types on multiple sections.. Ill post up about that if I get a change to test it.

Share this post


Link to post
Share on other sites

There's an easier way to do this... with another one of Mikero's tools.. "MoveObject"...

MoveObject.exe is primarily designed to repath internal references in objects, or even foldersful of objects, but it also works just nicely on .pew files...

My normal procedure for a job like this would be to copy my "yourmap.pew" into my MoveObjects tool folder - just for path convenience, and then run the following commandline...

moveobject.exe yourmap.pew roads2\ ca\roads2\

hit enter and you're done in seconds...

All internal "roads2\" paths in that .pew now read "ca\roads2\" - ALL paths... that includes your Road Tool templates as well as every road object currently placed on your map... in other words - Job Done...

B

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×