Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat
Welcome, Guest. Please login or register.
Did you miss your activation email?

May 11, 2021, 08:49:05 AM

Login with username, password and session length

Author Topic: SC4Paths: A Tutorial by Blue Lightning  (Read 23263 times)

0 Members and 1 Guest are viewing this topic.

Offline Blue Lightning

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1098
  • Total likes: 16
  • Reputation: 16
  • AKA Wahrheit
SC4Paths: A Tutorial by Blue Lightning
« on: March 10, 2009, 06:59:09 PM »
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
« Last Edit: June 13, 2011, 05:03:21 PM by Blue Lightning »
Also known as Wahrheit

Occasionally lurks.

RHW Project

Offline Blue Lightning

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1098
  • Total likes: 16
  • Reputation: 16
  • AKA Wahrheit
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #1 on: March 10, 2009, 07:16:40 PM »
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)


« Last Edit: July 01, 2009, 06:08:45 PM by Blue Lightning »
Also known as Wahrheit

Occasionally lurks.

RHW Project

Offline b22rian

  • RTMT Team
  • Forums Guru
  • *
  • Posts: 3429
  • Total likes: 662
  • Reputation: 13
  • CL:
    ...let us ch@t...
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #2 on: March 10, 2009, 08:59:37 PM »
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

Offline choco

  • NAM Team
  • Forums Senator
  • *
  • Posts: 783
  • Total likes: 19
  • Reputation: 10
  • "bridge" engineer...
  • CL: SC4 Bridgemeister
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #3 on: March 11, 2009, 04:28:01 PM »
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'..... ;) 

Online Tarkus

  • Administrator
  • Forums Legend
  • *
  • Posts: 11615
  • Total likes: 5634
  • Reputation: 74
  • NAM Team Tankadillo
    • NAM HQ
  • CL: Dr. PuzzlePiece
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #4 on: March 11, 2009, 06:27:08 PM »
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


Offline Blue Lightning

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1098
  • Total likes: 16
  • Reputation: 16
  • AKA Wahrheit
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #5 on: March 15, 2009, 05:43:52 PM »
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

Offline daeley

  • BSC Team
  • Forums Senator
  • *
  • Posts: 574
  • Total likes: 20
  • Reputation: 32
  • CL: The Wizard of MODS
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #6 on: March 16, 2009, 08:18:17 AM »
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!

Online Tarkus

  • Administrator
  • Forums Legend
  • *
  • Posts: 11615
  • Total likes: 5634
  • Reputation: 74
  • NAM Team Tankadillo
    • NAM HQ
  • CL: Dr. PuzzlePiece
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #7 on: March 16, 2009, 01:51:08 PM »
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

Offline choco

  • NAM Team
  • Forums Senator
  • *
  • Posts: 783
  • Total likes: 19
  • Reputation: 10
  • "bridge" engineer...
  • CL: SC4 Bridgemeister
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #8 on: March 16, 2009, 02:31:03 PM »
it didn't work for me when pathing the RHW10 bridge.....but im a novice pather, so i could have missed something else......

Offline Swamper77

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1284
  • Total likes: 2
  • Reputation: 19
  • BSC Grease Monkey
    • Swamper's Twitter
  • CL: ()swamper77() BSC Mechanic
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #9 on: March 16, 2009, 04:26:02 PM »
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!

Offline onlycoop

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #10 on: April 10, 2009, 10:41:42 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
« Last Edit: April 11, 2009, 01:42:51 AM by onlycoop »

Offline choco

  • NAM Team
  • Forums Senator
  • *
  • Posts: 783
  • Total likes: 19
  • Reputation: 10
  • "bridge" engineer...
  • CL: SC4 Bridgemeister
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #11 on: April 11, 2009, 07:50:48 AM »
the above is parts 1-3.....he's currently working on part 4.  :)

Offline Lowkee33

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #12 on: February 10, 2011, 08:20:13 PM »
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?

Offline catty

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #13 on: February 10, 2011, 08:52:07 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.

Offline Blue Lightning

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1098
  • Total likes: 16
  • Reputation: 16
  • AKA Wahrheit
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #14 on: February 11, 2011, 07:51:12 AM »
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

Offline Lowkee33

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #15 on: February 11, 2011, 10:37:34 AM »
Thanks  :)

Offline ruzvelt

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #16 on: March 25, 2011, 11:47:39 AM »
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)

Offline catty

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #17 on: March 25, 2011, 12:05:02 PM »
... 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

 :)
« Last Edit: March 25, 2011, 12:07:17 PM by catty »
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.

Offline ruzvelt

Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #18 on: May 05, 2011, 05:05:49 AM »
Yes, that did the trick, thanks

Offline ivo_su

  • Forums Senator
  • *
  • Posts: 727
  • Total likes: 0
  • Reputation: 0
  • Master of Regional Development and Management
Re: SC4Paths: A Tutorial by Blue Lightning
« Reply #19 on: May 25, 2011, 05:01:23 AM »
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