• Welcome to SC4 Devotion Forum Archives.

SC4Paths: A Tutorial by Blue Lightning

Started by Blue Lightning, March 10, 2009, 04:59:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Blue Lightning

SC4Paths: A Tutorial by Blue Lightning

Last updated 04/05/09 @ 2:14 PM EST

     A vital part of transit networks are the path files. Path files define where automata, sims, and UDI goes through a tile. Path files can be applied to draggable network, an override network (like the RHW, GLR, etc.), puzzle pieces, and TE-Lots. First, we will talk about the format of a path file. Second, we will look at each individual part. Third, we will dicuss tools and how to use them. Fourth, how to apply them. ANd finally fifth, diagnostics.

NOTE: This path file contains a stop point. Most paths do not have stop points, most intersection paths do.

SC4PATHS
1.2
2
1
0
-- car_1_3_a
1
1
1
3
0
2
2.5,8,0
2.5,-8,0
-- car_1_3
1
2
1
3
0
2
-2.5,8,0
-2.5,-8,0
-- stop_car_1_255
1
1
1
1
255
2.5,0,0


Now, lets break down this path file:

SC4PATHS...This starts the SC4Path file; it is a simple declaration that come before the rest of the file.
1.2...............This is the path version. There are 1.0 and 1.1, which were the original two versons that came with SC4, and 1.2, which comes from Rush Hour. In most cases, use 1.2, as it covers all of the older types and has the most current options
2..................This number tells how many paths are in this file. Goes from 1 to unlimited. Always remember to keep this number accurate to the number of paths you have.
1..................This is the number of stop points in this file. Be sure to keep this number accurate.
0..................This is the 3D key of the path file. 1=Draggable type (GID 69668828) 0=Puzzle Piece (GID A966883F)
<spacer>
<spacer>
<spacer>
-- car_1_3_a..This is a comment line. This allows for people to be able to diffientiate between different paths. Also helps debugging bad paths.
1....................This is the transit type ID. 1 is car, 2 is ped, 3 is heavy rail, 4 is subway, 5 isn't used, 6 is light rail, and 7 is monorail.
1....................This is the path ID. This shows what path it is. Remember, start with one, and count up. No matter what transit type it is, always count from the first one up.
1....................This is the entrance side of the path. 0 is west, 1 is north, 2 is east, 3 is south, and 255 is special (stub, neighbor connection, etc.).
3....................This is the exit side of the path. 0 is west, 1 is north, 2 is east, 3 is south, and 255 is special (stub, neighbor connection, etc.).
0....................This is the junction key. It decides if the path is a junction. This is mainly used for rail type transit. 1 is yes, 0 is no. This is a boolean value.
2....................This is the number-of-points key. It defines the number of X,Y,Z points in the file.
2.5,8,0............This is the X,Y,Z coordinates of the path. There can be as many points as the number-of0points key defines.
<spacer>
<spacer><note> Repeat the section starting with the comment until you have all the required paths.
<spacer>
-- stop_car_1_255..This is the start of the stop points section. This comment line helps a person differ the stop paths from regular paths.
1....................This is the LHD/RHD ID key (or UK/US). 1 is RHD and 2 is LHD
1....................This is the Transport type. See above.
1....................This is the stop point ID, similar to the path ID. Remember, start from one at the first stop point.
1....................This is the entrance side. See above.
255.................This is the exit side. See above. This value is almost almost always 255. There are a few exceptions.


Here are the tools that you will need to create path files:
1. Notepad (for drafting; optional)
2. Ilive's Reader (MUST HAVE)
3. GMAX/BAT/3DSMAX (optional, good for pathing transit models you made)
4. Daeley's Path Creater (a Java program; very useful, takes guesswork out of the 2d (maybe 3d) plane equation)
5. SC4-RH (duh)


Here's how to use them:
1. Notepad is very self-explanatory. Type it in!
2. Ilive's Reader is a basic and advanced modding tool. You will need to have some knowledge of the Reader to insert and modify path files, and for that matter, any modding. A sc4path file is defined in the file type column as SC4Paths. When you click on it, the rightmost pane will show text and numbers. To edit a path file, simply click the top-right button labeled "edit" Then, simply type in or paste your path file. After editing it, if you are happy with the file, click the "Apply" button near the top. If you would like to undo your changes, click "Roll Back." In order to make your file work, you must have the right IID, GID, and have made sure you have re-indexed the file. Make sure that it has been referenced properly by a RUL entry, SC4Lot, or any other file that requires a path file.
3. If you made a transit model in the 3D modeling program, then you can path in it via line tool, however, this only provides you with the coordinates, not any other type of data.
4. This program is a Java based program by Daeley. The program is simple and easy to use. Simply right click to add a point for a path. To add another path, simpley go to the menu and select "Add Path." You can also edit the paths in the menu (transit type, entrance side, etc.).
5. This is where you test your paths (duh). You can test via UDI, Automata, or if you have the ExtraCheats.dll, DrawPaths.



Part 4: Implementation
Now, path files can have one of 2 GIDs; one for 3D (puzzle pieces) and one for texturing (draggable).
Draggable    T:296678F7 G:69668828 I:Request IID from NAM member
Puzzle Piece T:296678F7 G:A966883F I:Request IID from NAM member

Part 5: Diagnostics

If you test your path and it is flashing red or is missing, here is the info you need to fix it.

Quote from Alex:
Quote
1.  Path is flashing red.
The enter/exit points on the path are incorrect and do not match the direction of the coordinates.  Below is an enter/exit chart that shows what the coordinates should be:

x=-8---West (0)
x=+8---East (2)
y=-8---South (3)
y=+8---North (1)

Depending on the situation, you either need to change the enter/exit values, or change the path itself if it is not facing the direction you want.

2.  All paths are missing.

This usually means one of two things: a) you have the wrong Group ID specified for the path file, or b) you have two paths with the same entry/exit points and the same path number. (i.e. both are listed as entering at 0, exiting at 2, and both are path number 1.)

3.  One path is missing from the tile.

This means that the number of paths specified is too low.

-Alex
Also known as Wahrheit

Occasionally lurks.

RHW Project

Blue Lightning

#1
Placeholder

(Comments and questions are welcome on the existing portions)

Path Table

Car
-road, OWR, AVE, RHW2, RHW4
Right lane, Left lane
2.5, -2.5

Peds
-Road, OWR, street, RHW2
Right side Left side
7, -7

-Avenue
One side only: 7 (right side of ave) -7(left side of ave)


Also known as Wahrheit

Occasionally lurks.

RHW Project

b22rian

This looks quite helpful and well organized so far.. Blue...
As im not aware of any other tutorials on Pathing.. in the forums..
This is something badly needed by those wanting to get started with transit Modding...
Hope to see new posts here for this very well-done tutorial..

Thanks For all your hard work getting this together..

Brian

choco

pretty good tut, vince.  :thumbsup:  i didn't know what a couple of those lines were......and had no clue about the stop points.  thanks for taking the time!

you may wanna add daeley's path creator as a tool.  its also an 'essential'..... ;) 

Tarkus

Vince, excellent tutorial!  Thanks for writing this up . . . I think it will come in handy for a lot of folks.  I'd also second choco on adding some info in about Daeley's tool, as it makes the job very easy.  I've also just stickied it, and you'll be getting a +1 Karma point as well. ;)

Also, I'd like to add some info in regarding using the DrawPaths cheat to spot errors in path files.  Here's a list of them, with solutions:

1.  Path is flashing red.
The enter/exit points on the path are incorrect and do not match the direction of the coordinates.  Below is an enter/exit chart that shows what the coordinates should be:

x=-8---West (0)
x=+8---East (2)
y=-8---South (3)
y=+8---North (1)

Depending on the situation, you either need to change the enter/exit values, or change the path itself if it is not facing the direction you want.

2.  All paths are missing.

This usually means one of two things: a) you have the wrong Group ID specified for the path file, or b) you have two paths with the same entry/exit points and the same path number. (i.e. both are listed as entering at 0, exiting at 2, and both are path number 1.)

3.  One path is missing from the tile.

This means that the number of paths specified is too low.

-Alex


Blue Lightning

B22rian (Brian): Thank you!

Choco: Thank you! I have added Daeley's tool and am preparing to provide a detailed guide on it.

Tarkus (Alex): Thank you for that invaluble data! That will be very helpful to those who messed up :P Anyway, thanks for the Karma point!
Also known as Wahrheit

Occasionally lurks.

RHW Project

daeley

Quote
This is the path ID. This shows what path it is. Remember, start with one, and count up. No matter what transit type it is, always count from the first one up.

as far as I know, this indicates the path number which is only used if several paths enter the same side, exit the same side and have the same traffic type. For example on an avenue, you have two car paths from side 0 to 2, the "a" car path is number 0, the "b" path is number 1. Peds going 0 -> 2 are again numbered 0. If you had cars going somewhere else, for example cars 0->3 or 1->3 because this is a crossing, they would also be numbered 0, 1, 2...

However this is how maxis did it. As far as I know (but I may be wrong) there doesn't seem to be any harm in doing it your way - giving all paths a different number.
1. Install SC4+RH
2. Install LEX (CD&DVD helps) and latest NAM + updates
3. Play the game
4. ? ? ? ?
5. Profit!

Tarkus

Quote from: daeley on March 16, 2009, 06:18:17 AM
As far as I know (but I may be wrong) there doesn't seem to be any harm in doing it your way - giving all paths a different number.

I've not tried that method myself, but I'm also fairly certain it'll work just fine--Jan (Swamper77) would have a better idea. as he's probably the most experienced pather on the team.  But I like that it seems to be a fool-proof way to avoid #2b in my troubleshooting list above.

-Alex

choco

it didn't work for me when pathing the RHW10 bridge.....but im a novice pather, so i could have missed something else......

Swamper77

Quote from: Tarkus on March 16, 2009, 11:51:08 AM
I've not tried that method myself, but I'm also fairly certain it'll work just fine--Jan (Swamper77) would have a better idea. as he's probably the most experienced pather on the team.  But I like that it seems to be a fool-proof way to avoid #2b in my troubleshooting list above.

-Alex

I start all of my paths that go the same direction with 0 and count up from there. Starting with 1 instead doesn't seem to affect anything. However, when dealing with a multi-tile object such as an interchange, you should try to be consistent with the numbering of the lanes. For example: inside lane = 1, middle lane = 2, and outside lane = 3. This will prevent cars from switching lanes at each tile.

-Jan
You can call me Jan, if you want to.
Pagan and Proud!

onlycoop

#10
Quote from: Blue Lightning on March 10, 2009, 04:59:09 PM
SC4Paths: A Tutorial by Blue Lightning

Last updated 04/05/09 @ 2:14 PM EST

NOTICE: This is currently an unfinished tutorial. Part 3/4 done, on part 4.

Quote from Alex:

hello i'm new to the game and this site, but could you post links to parts 1 and 2 please. cause i know there has to be more then just copying a sc4path file with reader and placing it in with the file group you want one in and just renaming it's group and instance or is it?
                                     thank you lol

choco

the above is parts 1-3.....he's currently working on part 4.  :)

Lowkee33

Some quick questions:

1) Should all TE lots have paths?  I have a 1x2 piece that acts as a transition between SAM textures.
2) Sort of over rides #1, but, what problems occur when a TE lot does not have paths?

catty

Quote from: Lowkee33 on February 10, 2011, 06:20:13 PM
...but, what problems occur when a TE lot does not have paths?

If the TE Lot is only for SIMs and road traffic you should be fine and the game will automatically flip the paths depending on whether you have a left or right hand version of the game, but you most definitely need path files if the TE Lot is being used for any type of rail traffic, and you will need to have two path files (left paths and right paths for the different game versions)

:)
I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.

Blue Lightning

In the case of your SAM transition, custom paths aren't needed, the game will apply default street paths (which work for the SAM)
Also known as Wahrheit

Occasionally lurks.

RHW Project


ruzvelt

I' sorry if this is the wrong place, I just can't seem to find the answer anywhere on SC4D (or Simtropolis for that matter)

Here's the thing... Whenever I make a road-train track crossing (whether a ground crossing or using train/road puzzle pieces or even overpasses) my traffic network seems to be cut at that point - all road traffic that was happily going to the neighbor city simply no longer "sees" the road network past the crossing and uses the neighbor connection on the other side of the map that doesn't have a train/road crossing...

I have only installed the latest NAM (dated 2011)

catty

#17
Quote from: ruzvelt on March 25, 2011, 09:47:39 AM
... Whenever I make a road-train track crossing (whether a ground crossing or using train/road puzzle pieces or even overpasses) my traffic network seems to be cut at that point - all road traffic that was happily going to the neighbor city simply no longer "sees" the road network past the crossing and uses the neighbor connection on the other side of the map that doesn't have a train/road crossing...

I have only installed the latest NAM (dated 2011)

Hi ruzvelt

There are two versions of SimCity - Lefthand Drive and Righthand Drive (do your vehicles drive on the left or the right side of the road?), there are also two versions of the NAM to match each game version.

if you have a Lefthand version of the game and have installed a Righthand NAM or vice versa you will have this problem, you just need to re-install NAM (select in the install options) to match your game version.

hope that helps

:)
I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.

ruzvelt


ivo_su

I read this lesson very carefully and try to figure it out but encounter serious difficulties. Can I ask you to do something simpler for us and we beginners to get into an hour. Maybe if there are pictures with the steps in the programs used will be much easier for everyone to start doing paths and thus to facilitate the work of NAM.

Ivo