Jump to content
Sign In to follow this  
MayorBean

EuroStoplightsMOD

54 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online: A long, long time ago... 
 
Date: 1/26/2005 7:14:10 PM
Author: Mexicanboy13r
hello since you know how to move the lights? I was wondering if you could make the aves. street lights across the street instead of right in front.. In the US it seems much better .. Just wondering If you had the time.. you do not need to tho..
quote>

Not possible. AFAIK, the stoplights have to be on the same tile as the stop paths they control. Otherwise, they won't be able to switch. Since avenue intersections have more than one tile, you'd have to move the stoplights off their associated tiles.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
Date: 1/28/2005 6:20:08 PM
Author: ardecila

Date: 1/26/2005 7:14:10 PM
Author: Mexicanboy13r
hello since you know how to move the lights? I was wondering if you could make the aves. street lights across the street instead of right in front.. In the US it seems much better .. Just wondering If you had the time.. you do not need to tho..


Not possible.  AFAIK, the stoplights have to be on the same tile as the stop paths they control.  Otherwise, they won't be able to switch.  Since avenue intersections have more than one tile, you'd have to move the stoplights off their associated tiles.

 Damn! Well Now I know I was about to make a thread..thanks

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     
    Date: 1/28/2005 6:20:08 PM
    Author: ardecila
    Not possible. AFAIK, the stoplights have to be on the same tile as the stop paths they control. Otherwise, they won't be able to switch. Since avenue intersections have more than one tile, you'd have to move the stoplights off their associated tiles.
    quote>

    ardecila, I don't agree with you at this point. Afaik the avenue intersection is a 1x2 tile (2x2 for ave2ave), right? So I'm, pretty sure that it IS possible, since the traffic light stays on the same tile for which there is a stop point. It should work in a similar way as the thing I posted on the top of this thread.

    Though, as I said, I'll continue on this when RH arrives.

    BTW:
    I try to figure out, how the animation is triggered by the game. All I get so far is:

    - Each network tile (IID) has a related path file, where the stop points are defined.

    ? I noticed the value '255' right before the stop coordinates. Does anybody know, if this controls the stop time somehow? Although I believe, that red/gree phases are controlled by the EXE, depending on traffic volume.

    - Recently the control of traffic flow (and animations) seems to be related to the north/south and east/west axis. Sad, I wished I could realize IE a separated left turn light...

    - the network tile is hooked to a type 21 network exemplar (the network 'LOT' so to say) by the 'kPropertyID_LotConfigNetworkTileId' property.

    - All the simulation (commute time calculation, animation of the automata, animation of stop lights etc.) seems only to be hooked to the network tile referenced in the network exemplar, not to the exemplar itself (oh, I wish T7T would be back...)

    - Traffic lights/stop signs are added as simple PROPS to this exemplar. The automata simulation/animation isn't affected by this PROPS anyway.

    - The traffic light animation seems to MUST be a ResourceKeyType0 model. I tried to put a golfer (ResourceKeyType4) on the LOT and it shows up as a grey square - no animation anyhow.

    - The traffic light PROP exemplars (poles/lights) have an 'OccupantGroups' property value 0x00005002. This seems to ONLY control the [shift+left click] behaviour. And this obviously only if there is also an 'UserVisibleNameKey' property. Removing the OG property doesn't effect neither the traffic light animation nor the traffic flow, it disables only the manually changing of the signal.

    That's all by know. If anybody has additional information, I'll appreciate if you could let me know about.

    ~bean~

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    MayorBean,


    I did a limited amount of testing to see if a traffic light could be placed on the far side of an avenue intersection.  I looked briefly at two ways of doing it.


    One was to use an offset prop that shows up outside of the network tile it is placed on.  I did not try using a traffic light when I tried this, but it looked like the network tiles are more strict about props like this compared to lots.


    Another way is to use a type 4 resource key.   This key uses one or more groups of values to specify the props.  The values are like this:


    (0 or 1 e.g. for day or night)
    (X offset in meters * 16 to the 4 power)
    (Z offset in meters * 16 to the 4 power)
    (Y offset in meters * 16 to the 4 power)
    (value of resource key 0 or 1)
    (Type ID of the prop)
    (Group ID of the prop)
    (Instance ID of the prop)


    As you can see, this allows you to offset the prop.  Maxis uses the X and Y offsets in streetlight cones - a prop that rotates to face the user no matter what viewing angle is used.  However, I have not been able to get a resource key type 4 to work properly using a 3DS prop or and ordinary prop, unless the X and Y offsets are zero.  I discuss this here: https://www.simtropolis.com/idealbb/view.asp?topicID=51269

    I tried it, anyway, with a traffic light.  It behaved much less well than on a lot.  I am not sure but I may have managed to get it to work - for only one viewing angle - once.


    I did not get it to work, but I did not put a lot of effort into it.  Someone else is welcome to try.


    smoncrie

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Smoncrie, thanks for your assistance!

    I'm not pretty firm with the differences between the ResourceKeyTypes at all. Your link will probably provide some kind of enlightning.

    I haven't encountered any problem in replacing the traffic lights so far. My first try was already done with SC4preRH. But as Andreas_Roth stated, it works with RH, too (shows up differently due tue Maxis had made some changes to the IID assignments).

    Also adding additional traffic light units was easy (as you have already done it for the avenue turning lanes.

    I wasn't able to reproduce the behaviour of stopped animations ('...shows up only green...') you described in one of your postings.

    For now I already don't have any clue, how the triggering is done (see posting above). I first thought this could be found in the RUL or path files. But afaik RULs only describe the matching of network tiles. So I abandoned any further research in this file type. And (as I supposed) according to daeley there is also nothing to be found within LUA.

    ~bean~

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Okay, I finally gathered up all of the stoplight pole/mast assemblies from SC4 without RH (commonly known as SC4 Vanilla). The file can be found here: l('http://home.arcor.de/anroth/simcity/pre-RH_stoplights.zip''>http://home.arcor.de/anroth/simcity/pre-RH_stoplights.zip');>http://home.arcor.de/anroth/simcity/pre-RH_stoplights.zip . Thanks to Andreas Roth for hosting the file for me. There are two files in the zip file: StoplightArms.dat and SingleStoplights.dat. The StoplightArms file contains all of the Exemplars/Models/FSH files for the stoplight pole/mast assemblies from SC4 Vanilla. The only difference is I renumbered the files. For example, instead of 28f50000, the number is 28f5a000. I did this on purpose so the files would not conflict with SC4 RH's files. The SingleStoplights file contains the Exemplars/FSH/ATC/AVP files for the stoplight that is attached to the pole over the road in the picture at the beginning of this thread.

    Intended Users: There are three intended users of these files: Modders, Testers, Lot Editors. The files can be installed to the SimCity\Plugins folder or the MyDocs\Plugins folder. It doesn't matter which one.

    Modders: When you are creating the intersections, make sure you use the Instance ID's 28f5a000 (standard stoplight mast/pole) and 29e2a000 (diagonal stoplight mast/pole). That way the testers who have the files will be able to see the changes that have been made. The SingleStoplights file will overwrite the exemplars that Maxis has for RH and make them appear properly.

    Testers: You will need these files in order to see what the modders of this project have done.

    Lot Editors: You can use these files if you want to. Especially if you want to use the old stoplight props from SC4 Vanilla.

    Direct any questions or comments about these files to me, either here or by PM (prefered to reduce clutter in this thread).
    -Swamper77

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    So, after it took quite a while to get RH installed as I want it to be (man, what a weird procedure!) I went on with this MOD.

    Looking up the traffic light animations I found this:

    FSH 0x28f5000 - referenced in the 28f5 Exemplar as ResourceKeyType0:
    0x28f500001am.jpg width=256 alt=0x28f500

    FSH 0x2b2d000 - referenced in the 28f5 Exemplar as unknown (supposed to be ResourceKeyType0xm):
    0x2b2d00005rg.jpg width=256 alt=0x2b2d00

    If I got it right, those to FSHs should depict the forwards/backwards view of an object. Agreed?

    So, what's wrong with the pictures? See it?

    @swamper77: the images don't seem to be flipped/mirrored. they are a kind of 'turned' (don't know the right word) by 90

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    I just agreed with swamper, that he would take care of the mast arm traffic lights (avenues) and I'll do the single pole ones. Since I'll be short on time during next week, please don't post plain 'when will it be ready?' questions.
    Constructive ideas and critics are always welcome, though!

    ~bean~

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    I'm confused somehow. Tried to find some specs of AVP files - not really successfull.

    Look at this, the first animation framesets (zoom 3) of the traffic lights (note the pixel scale, red line added for better orientation):
    0x28f50000anim12sr.jpg width=545 alt=0x2

    And these are the related AVP values:
    0x28f50000anim1reader0rx.jpg width=485 a

    So,
    - 'file pos' is the x-start coordinate for the frameset
    - 'width' is the with of each single frame
    - 'height' is the height of each single frame (makes not really sense regarding frameset 1 and 2, but may do)
    - 'pos1' I have no idea (spacing?)
    - 'pos2' probably has something to do with height

    For zoom 4+5 things look even more weird to me.

    Any idea? Any link to specs?

    ~bean~


    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    This is all I got so far, an AVP spec by karybdis:

    -CHUNK REPEATING
    +00 BYTE : Bitmap Plane # in the FSH
    +01 BYTE : unknown (Pixel offset of some type. Should be 0x08 )
    +02 WORD : X,Y Position of the Start point for the frame.
    +04 BYTE : Pixel width for the animation FSH crop
    +05 BYTE : Height width for the animation FSH crop
    +06 BYTE : unknown (bounding box position related)
    +07 BYTE : unknown (bounding box position related)


    Are the bounding box coordinates relevant for showing up in game in any way? Or are they only needed for positioning the prop within the LOT editor?

    ~bean~

    Edit: Got the 'file pos' value so far. The value shown by the reader is irritating. The reader calculates one decimal from x/y start position WORD. I think, the 1st half of the WORD describes the x value (left to right), the second value does the same for y (top to bottom). Probably two BYTES instead of one WORD?

    @swamper77: If you don't have known about this: you obviously can change those values only with the readers HEX editor.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Wayyyyyyyyy outdated 2.gif

    Structure
    Header (36 bytes)
    Repeating Chunk (8 bytes)


    -Header
    DWORD - TypeID for AVPF
    DWORD - Number of entries in the File
    DWORD - Major Revision
    DWORD - Minor Revision
    DWORD[4] - User Data (reserved data for later)
    DWORD - Number of Frames in this AVPF (same as DWORD 2)
    -

    -CHUNK REPEATING
    +00 BYTE : Bitmap Plane # in the FSH
    +01 BYTE : Frame Data Storage Type (Only type 08 is used currently)
    -- Type 8 --
    +02 WORD : X,Y Position of the Start point on FSH for frame
    +04 BYTE : Pixel width for the animation FSH crop
    +05 BYTE : Height width for the animation FSH crop
    +06 BYTE : Pixel offset from right of Sprite Bounding Box.
    +07 BYTE : Pixel offset from bottom of sprite bounding box

    The bounding box coordinates are for the actual sprite inside of its bounding box. IE if your bounding box is on the bottom right of the lot, then you'll be moving the animation around inside that. All 2d animations are displayed within a 3d space 1.gif

    Just looking for the X,Y bit for you...

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Karybdis,
    thanks for your explanation! Honestly I haven't really understand the positioning of the bounding box thing. I played around with it somehow, but have not understand the mechanism in detail.

    ==============================

    UK traffic lights - update:
    I've finished a first public beta version of UK road traffic lights. This one should replace most of the traffic lights on those intersections where there are already 4 of them.
    It replaces only one FSH by now and should be compatible with the NAM (I think). It won't work together with any of my previous traffic light MODs!
    It is independend from having the UK version of SC4 RH installed or not.

     Since I haven't done very much testing so far, I'd like to get some feedback.
    Especially:
    - are there any glitches?
    - on what intersection it doesn't show up
    Please describe as detailed as possible or post screenshots!
    Important note:
    Though I don't suppose any problems to be caused by this (graphical) MOD, you MUST realize that it isn't completed yet (IE T-intersections are not included) and that I make this early beta available primary to interested testers.

    ~bean~

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Looks great, you need rush hour, the games not complete without it (still isn't, but it helps), and in the way of other lights from other countries, well im from the netherlands, where the lights are on poles across the road and on the pole on the side, execpt that, that pole is almost always on a divide in the center of the road, which i wish was there.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    If you read through *all* postings in this thread, you'll notice, that I've RH installed since last last weekend. Any further development will be based on this. 2.gif

    ~bean~

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Ginger,

    you already lost me! What do you mean by this?

    BTW this MOD is on hold for the moment since I have not figured out in detail how to deal with the bounding box positioning.

    @karybdis: could you please assist me with that?

    ~bean~

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Hi Ginger,
    if you are interested in testing out the published beta, I recommend to put it in the <program files>-plugins.

    Hope to get some feedback...

    ~bean~

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    when would i be able to download the mod
    to test it

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     

    Well, wgb24,

    if you want to help finishing this mod, you can download a early beta state attached to my post from 1/31/2005 and give some feedback herein...

    ~bean~

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    the mod works with rush hour but there seem to be a few conflicts with the network addon mod wich result traffic lights not facing the drection that the traffic is coming to the intersection.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online: A long, long time ago... 
     
    wgb24,
    could you please post a screenshot?

    ~bean~

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections