Ditchlights

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 1996fan
    Member

    • Mar 2015
    • 97

    #1

    Ditchlights

    I recently downloaded the NS Dash 9 pack in the OR locomotives section and copied the ditch lights section from the SLI Horsehsoe Curve Dash 9s to add the flash feature to these and the ditch lights show but appear to be behind the housing. How do I go about moving these towards the front of the housing? Picture for reference. The lights are on ther dim setting here, when I put them to full that's when the flash is activated.
    Attached Files
  • oper190
    1000 Post Veteran



    • May 2010
    • 1498
    • Port Charlotte, FL
    • English
    • MSOR

    #2
    The position is in the light coding. So you'll have to be familiar with that. It will be a line like this:

    Untitled.png
    The numbers are based on the model's main piece center. They are: left/right , up/down , forward/rearward of the center point of the main piece that the shape uses, not the center of the shape ( Engine ).
    (-)number are left, down, and rearward.
    In your case you'll need to increase the right most number, keep in mind they are in meters. ( approximately 3.3 feet per meter )
    Last edited by oper190; 03-20-2025, 16:52.
    Geary "Mr. Hart" Gerhardt - Owner and CEO of Hart Rail Lines, Hart Commuter Railways, and Hart Rail Cars. Also the defunct Hart Electric Transit.
    Its Your Train Sim World, sim as you please.

    Comment

    • Whatever2006
      Senior Member

      • Aug 2022
      • 615
      • Philippines
      • English, Nonsensical Things and Passive Spitefulness.
      • General

      #3
      My suggestion is editing the position coordination of the ditch lights, you may also use the Shaper Viewer to view the locomotive's engine file there and use the view 'Axes/Attachment' option which shows the positions of the corona lights.

      Edit: Oper got there before me, looks like I'm late there.
      Motto: Loneliness stands by with me and my own isolation.

      Comment

      • SantaFe801
        Senior Member



        • Jan 2015
        • 247
        • General

        #4
        I included two sets of .eng files with them. By default, the engines come already using the experimental code that will have the ditchlights flash automatically for a bit when you blow the horn. If you use that engine file in the stable release of ORTS, however the lights will not work correctly because that code isn't supported there yet. I recommend using the .eng file set from the "STANDARD_LIGHT_CODE" folder if you're using stable 1.5.1. This will have it so the headlight is always on, the ditchlights turn on solid at dim setting, and on bright, they will start flashing.

        Comment

        • dcarleton
          1000 Post Veteran


          • Nov 2008
          • 1004
          • MSOR

          #5
          ORTS version 1.6 is being prepared for release soon, and then the new ditchlight code will work..

          Comment

          • LinxGet22
            Member

            • May 2023
            • 73
            • Europe
            • English
            • ORTS

            #6
            Is there any information that will be in version 1.6?

            Comment

            • dcarleton
              1000 Post Veteran


              • Nov 2008
              • 1004
              • MSOR

              #7
              Originally posted by LinxGet22
              Is there any information that will be in version 1.6?

              Comment

              • wwhall
                Senior Member


                • May 2010
                • 652
                • Kansas
                • MSOR

                #8
                First, an editorial comment: I really don't understand the reluctance of people to try the New Year Monogame releases from Carlo. I download them into a separate folder from the "regular" OpenRails folder, so that the "stable" release is not disturbed. The OR executables are not big disk drive hogs, so having a separate MG folder is not a big deal. I say this because what I'm about to post will likely not work in the 1.5 stable OR release. I'm currently running the R160.1 MG release (I usually wait a week or two before installing the latest NY MG release for any bugs to be worked out of it).

                Now, talking about flashing lights and light spheres. OR MG will allow multiple light spheres to be coded--BUT only 2 can be active at the same time. So, attached is the code that I have cobbled together for Nash's NS Dash 9 model, using his code as the base. Note that it has multiple light spheres defined, but judicious use of the various "switches" available in OR, only 2 are active at any one time. What this code provides is active headlights and ditchlights for both short-hood forward and long-hood forward running, PLUS light spheres for both. The rear (long hood) spheres are only available when the reverser is in reverse; the forward spheres are available when the reverser is in neutral or forward position. The sphere limitations that OR "inherited" from MSTS make this an imperfect solution, but it does add some realism to NS and other locomotives that will sometimes run long-hood forward.

                For the flashing lights to operate, this code should be present in the .eng file--a good place to insert it is a line or two above the Lights section:
                ORTSHornLightsTimer ( 15 )
                The number is the number of seconds that the lights flash after the horn button is released.

                The light section that I put together, modifying a lot of Nash's already very good code, is attached as a .txt file.

                Attached Files

                Comment

                • uli2
                  Senior Member
                  • Jan 2008
                  • 503
                  • Berlin/Germany
                  • MSOR

                  #9
                  Thanks a lot for sharing your light code for the NS units. It looks great under OR MG 161 👍.

                  Comment

                  • Whatever2006
                    Senior Member

                    • Aug 2022
                    • 615
                    • Philippines
                    • English, Nonsensical Things and Passive Spitefulness.
                    • General

                    #10
                    After downloading and copying the light sphere code from Hall's modified engine file for the NS C40-9W, I inserted it into the ATSF C44-9Ws, ATSF #643 and ATSF #620, as I'm curious on the multiple light spheres and it works as multiple one way light spheres on my end, so the results for me is good and leads for the possibility of running locomotives at night with a single light sphere active on both ends depending on the direction of the locomotive is set.



                    For reference with the code I inserted into the engine file:

                    Code:
                                 Light      (
                                            comment( Sphere of Lights Bright Front )
                                            Type            ( 1 )
                                            Conditions      (
                                                            Headlight ( 3 )
                                                            Unit ( 2 )
                                                            Reverser ( 5 )
                                                            )
                                            Cycle           ( 0 )
                                            FadeIn  ( 1.5 )
                                            FadeOut ( 1.5 )
                                            States  (       1
                                                    State   (
                                                            Duration ( 0.0 )
                                                            LightColour ( 95FFFFCA )
                                                            Position ( 0.0 3.3 8.0 )
                                                            Azimuth ( 0 0 0 )
                                                            Transition ( 1.0 )
                                                            Radius ( 55 )
                                                            Angle ( 17.0 )
                                                            )
                                                    )
                                            )
                                Light       (                      
                                            Comment ( Sphere of lights Dim Front )
                                            Type            ( 1 )
                                            Conditions      (
                                                            Headlight ( 2 )
                                                            Unit ( 2 )
                                                            Reverser ( 5 )
                                                            )
                                            Cycle           ( 0 )
                                            FadeIn  ( 1.5 )
                                            FadeOut ( 1.5 )
                                            States  (       1
                                                    State   (
                                                            Duration ( 0.0 )
                                                            LightColour ( 70FFFFCA )
                                                            Position ( 0.0 3.3 8.0 )
                                                            Azimuth ( 0 0 0 )
                                                            Transition ( 0 )
                                                            Radius ( 45.0 )
                                                            Angle ( 20.0 )
                                                            )
                                                    )
                                            )
                                Light       (
                                            Comment ( Sphere of Lights Dim Rear )
                                            Type            ( 1 )
                                            Conditions      (
                                                            HeadLight ( 4 )
                                                            Unit ( 2 )
                                                            Reverser ( 2 )
                                                            )
                                            Cycle           ( 0 )
                                            FadeIn  ( 1.5 )
                                            FadeOut ( 1.5 )
                                            States  (       1
                                                    State   (
                                                            Duration ( 0.0 )
                                                            LightColour ( 70FFFFCA )
                                                            Position ( 0.0 3.3 -8.0 )
                                                            Azimuth ( -180 -180 -180 )
                                                            Transition ( 0 )
                                                            Radius ( 45.0 )
                                                            Angle ( 20.0 )
                                                            )
                                                    )
                                            )    
                                Light       (                      
                                            Comment ( Sphere of lights Dim Idle Front )
                                            Type            ( 1 )
                                            Conditions      (
                                                            Headlight ( 1 )
                                                            Unit ( 2 )
                                                            Reverser ( 5 )
                                                            )
                                            Cycle           ( 0 )
                                            FadeIn  ( 1.5 )
                                            FadeOut ( 1.5 )
                                            States  (       1
                                                    State   (
                                                            Duration ( 0.0 )
                                                            LightColour ( 40ffef8f )
                                                            Position ( 0.0 3.3 8.0 )
                                                            Azimuth ( 0 0 0 )
                                                            Transition ( 0 )
                                                            Radius ( 43.0 )
                                                            Angle ( 20.0 )
                                                            )
                                                    )
                                            )  
                                Light       (                      
                                            Comment ( Sphere of lights Dim Idle Rear )
                                            Type            ( 1 )
                                            Conditions      (
                                                            Headlight ( 1 )
                                                            Unit ( 2 )
                                                            Reverser ( 2 )
                                                            )
                                            Cycle           ( 0 )
                                            FadeIn  ( 1.5 )
                                            FadeOut ( 1.5 )
                                            States  (       1
                                                    State   (
                                                            Duration ( 0.0 )
                                                            LightColour ( 40ffef8f )
                                                            Position ( 0.0 3.3 -8.0 )
                                                            Azimuth ( -180 -180 -180 )
                                                            Transition ( 0 )
                                                            Radius ( 43.0 )
                                                            Angle ( 20.0 )
                                                            )
                                                    )
                                            )
                    After some testing, I discovered an goof up with my copy of the engine file for the ATSF C44-9Ws, the locomotive's rear light sphere shows even if another locomotive or a rolling stock is behind said locomotive, I checked the culprit and sorted it out, aside from that I also worked on the MU/DPU lighting effects and they work but I haven't tested them fully...







                    P.S. I will make my last post in this thread as I don't want to hijack it, so I apologize to the OP if I'm currently hijacking it...​
                    Last edited by Whatever2006; 03-26-2025, 21:06.
                    Motto: Loneliness stands by with me and my own isolation.

                    Comment

                    • 1996fan
                      Member

                      • Mar 2015
                      • 97

                      #11
                      I also ran into this with the BNSF SD70MAC packs recently released in the file library. When dim they emit light but on full there is nothing. Is there a fix for this in the engine file or does it require some sort of shape editing?
                      Attached Files

                      Comment

                      Working...