• Welcome to SC4 Devotion Forum Archives.

Traffic Signals in SC4--A Discussion Thread

Started by Tarkus, June 29, 2008, 12:11:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CityMaster563

I looked everywhere, but I can't find the new Thread link.
Coastland Region: The SC4 Story:
http://community.simtropolis.com/journal/4478-coastland-region-the-sc4-
story/
The story of two major counties, Ashville and Coastland, battle out to have an individual city reach 1 million sims, but a major storm destroys one city, and a major. What will now happen?
Coming soon: SimCity 4, Full 3D Art (a museum tour)

Ryan B.

Quote from: CityMaster563 on May 28, 2009, 05:27:47 AM
I looked everywhere, but I can't find the new Thread link.

It'll be called "New Topic", in the red box along the top right of the board.  Here's a picture:



Sorry for taking this OT, folks - should have done this via PM.

Leodido

I've read the entire thread but I'm not sure if there is any way to replace the original maxis lights ?

Omnia, my first MD. Check it out!

j-dub

#183
Yes, there is, but its more advanced.

Swammper provides more detailed information about this back on page 8.
http://sc4devotion.com/forums/index.php?topic=5136.140

Most of the time people seem to be replacing the poles for Maxis signals, people have done new light models, but I don't know of an animated traffic light that has been T-21ed. Animation is even more tricky to figure out, but replacing Maxis lights has been done. I'm okay with the lights I have.

Tarkus

#184
Bringing this topic back up . . . I have a little something to share here.

http://www.youtube.com/v/mv72yWrrp4w

Thanks to OverPoP-san's wonderful BAB tool, I've been able to successfully make an animated signal.

This one here is actually "pseudo-synchronized".  It's not directly synched to StopPaths, but basically has a signal cycle matching the values in the Automata Tuning Exemplar.  The one kink in the system is that the animation seems to reset upon rotating the view.  Edit: It seems Maxis' signals actually suffer from the same problem, so maybe it's not so much of an issue.

Nonetheless, I hope it's a step forward.

-Alex

SuperTimo

cool to see some progress there.

Does anyone know of any modds for british/european traffic lights? even if they are non working, it looks so wrong at the moment with left hand drive plugin to have the traffic lights on the wrong side of the road and the wrong side of the crossing as well!

Andreas

royal from the SFBT is working on German traffic lights at the moment, but for the proper placement, one would have to edit the T21 exemplar files of each intersection (and there are a lot of intersections...).
Andreas

j-dub

@Tarkus, I can't believe you figured something out. I am assuming there will be a third light on that pole when it comes to the double left turn lane/wider networks in the future?
Once thats seen working after those avenue intersections, then I'll believe you.

@SuperTimo, I don't know about British modeled signals, but there were some changes to Maxis props so they go on the left side of the road and avenues.

http://sc4devotion.com/forums/index.php?topic=5161.0

I don't remember that ever being defaulted to NAM for left hand drive users, if its not, it really should.

Hey, wait a minute! For that matter, since it would appear Alex just made another type of working signal, maybe this is the opportunity for new left hand drive ones to be created for after the intersection too.

Tarkus

Quote from: j-dub on August 08, 2009, 09:14:12 AM
Hey, wait a minute! For that matter, since it would appear Alex just made another type of working signal, maybe this is the opportunity for new left hand drive ones to be created for after the intersection too.

The "after the intersection" setup will be possible with these signals, as they're not tied into the StopPaths.  The Maxis Avenue signals are stuck on green if they are not placed before the intersection.

-Alex

Ryan B.

That's great, Alex!  Nice work, and congrats on figuring it out!  I can't wait to adapt it to my signals.

SuperTimo


Blue Lightning

#191
Actually.... I've figured out how to do true synch traffic lights.

The reason why before we couldnt was because this: ATC and AVP files for traffic lights need specific GIDs. However, you also have to edit the IDs inside the ATC file. This is done in HEXEdit. The Reader's regular edit window will NOT retain your changes. This is the similar effect with effdirs.

Quick look at my first ATC file HEX with a TGI of 933D0000, 2A2458F9, 29A5D1EC

EC D1 A5 29 44 0E B5 7A F9 58 24 2A 00 00 3D 93 75 CD AD 09 F9 58 24 2A
00 00 00 00 00 00 00 00 00 00 3D 93 01 00 3D 93 02 00 3D 93 03 00 00 00

Breakdown of bytes:
EC D1 A5 29: Type of ATC (0x29A5D1EC)
44 0E B5 7A: Animation File Type (Animation FSH TID)
F9 58 24 2A: Animation File Group (Animation FSH GID)
00 00 3D 93: Animation File Instance (Animation FSH IID)
75 CD AD 09: AVP TID (0x09ADCD75)
F9 58 24 2A: AVP GID (0x2A2458F9)

These are the important chunks that will have to be edited. the IIDs may vary, but the TID and GID must be these values.

In order to function correctly, you must have two sets of animation files. They can be identical (in my case they were) as long as they have different IIDs. These will be ref'd in the prop exemplar.

Now as for the second part: The exemplar. The BAB does not generate the proper exemplar for traffic lights. You must manually edit it.

The correct type should look like this:

Yes, I know I have a duplicate property, I didnt notice while I was modding.

The items of interest are RKT0, RKTMisc, States as Frames, Prop Occupant class ID, Occupant groups, kSc4BuildingModelRotationproperty, kSC4BuildingModelClass Property

A breakdown of such:
RKT0: TGI of the first ATC file
RTKMisc: TGI of the second ATC file
States as frames: Tells Sc4 that frame one is red, frame 2 is yellow, and frame 3 is green (in this case). Booleen value. Set to true. EDIT: Yellow 1, Red 2, Green 3
Edit2: I'm being confused here, i just got a long green, long yellow, and a 1 second red. Though heres what Im going to try: 1. red 2. red 3. green 4. yellow.

Prop Occupant class ID: tells the game that this is a type of stoplight animation
Occupant Groups: Self explanatory, HEX value is 0x00005002
kSc4BuildingModelRotationProperty: Tells SC4 that this model that it is rotatable. Booleen value. Set to true.
Self Illuminated: Sc4 will or will not apply lighting and shadow deform to the model according to the booleen.
kSC4BuildingModelClassProperty: sets this into a prop class (probably traffic light animation)

Anyways, these steps are important or else you will get brown boxes, constant loop animation instead of synched animation, or nothing at all.

Attached is the file I have made. Works on 4 way turnlane road intersections.
You can also see the inner mechanics of the files.



EDIT: REmoved file due to brown box issue that popped up when I changed a value.
Also known as Wahrheit

Occasionally lurks.

RHW Project

sithlrd98

These last few posts..(Alex and Vince) are very exciting! There are so many nice models (many are in this thread) that could use these discoveries! Great job!

Jayson

Andreas

This is very interesting indeed! I'd be excited if you manage to make a traffic light that has more than three phases, since the German sequence is green - yellow - red - red+yellow - green.
Andreas

Frankie

A very interesting accomplishment indeed. I would like to try this myself with rail signals at some point..

Blue Lightning

#195
Andreas: I was toying around earlier with using more than 3 frames, and it seems possible that you can extend it as green-yellow-red-yellow+red. However I have to look more into this later.

Anyways.... fixed everything up, figured the right sequence (Green-yellow-red), found out why things weren't synching properly (traffic lights sync perpendicular to their LE orientation arrows)

Attached to this post is the dat file. It appears on the road x road intersection with turn lanes in all directions. I will upload a video of it once it finishes (in about half an hour)

EDIT: Whoops. Forgot to attach file. Install into the Network Addon Mod/Plugins folder (must load AFTER the turning lane plugin)

EDIT2: here is the video LINK
http://www.youtube.com/v/3_zlUJr_htQ
Also known as Wahrheit

Occasionally lurks.

RHW Project

sithlrd98

#196
So, I've tried it , still have it running and it works except one strange thing...when I re-draw the intersection , I am getting a strange flash with the lights. Let me see if I can get a vid..

Jayson

Yes , they work great!
Well , the vid doesn't show it as well..but as an added note , I am using Heblems HD lamp posts..and the signals do cover the sign so, maybe thats the deal?

Blue Lightning

Jayson: The flashing is normal, it happens on maxis lights too (just not as noticeable, since their signals are quite a bit simpler) As for compatability with Heblem's posts... that might aslo be a problem, but then again, keep in mind that this is a proof of concept work only.
Also known as Wahrheit

Occasionally lurks.

RHW Project

Tarkus

Blue, you are officially awesome.  This is fantastic, groundbreaking work here! :thumbsup:

-Alex

sithlrd98

Hey , all I know is that this is an excellent breakthrough! I know its a proof of , just passing along what I see ;D Alex hit it right on
Quote from: Tarkus on August 08, 2009, 05:55:55 PM
Blue, you are officially awesome.  This is fantastic, groundbreaking work here! :thumbsup:

-Alex

Jayson