Ai Train lighting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gusthegator
    Senior Member

    • Dec 2012
    • 254
    • General

    #1

    Ai Train lighting

    It it worth it to add AI train lighting for AI trains with Openrails or does Openrails ignore it completely and just use player lights for AI trains?

    E.G.
    Player Lights
    Light (
    comment( Sphere of Lights Bright )
    Type ( 1 )
    Conditions (
    Headlight ( 3 )
    Unit ( 2 )
    )
    Cycle ( 0 )
    FadeIn ( 0.7 )
    FadeOut ( 0.7 )
    States ( 1
    State (
    Duration ( 0.0 )
    LightColour ( ffffe4ab )
    Position ( -0.0 2.50 7 )
    Transition ( 0 )
    Radius ( 325.0 )
    Angle ( 25.0 )
    )
    )
    )

    AI Controlled Train
    Light (
    comment( Sphere of Lights Bright )
    Type ( 1 )
    Conditions (
    Headlight ( 3 )
    Unit ( 2 )
    Control ( 2 )
    )
    Cycle ( 0 )
    FadeIn ( 0.7 )
    FadeOut ( 0.7 )
    States ( 1
    State (
    Duration ( 0.0 )
    LightColour ( ffffe4ab )
    Position ( -0.0 2.50 7 )
    Transition ( 0 )
    Radius ( 325.0 )
    Angle ( 25.0 )
    )
    )
    )​
  • slipperman
    3500 Post Veteran



    • May 2010
    • 3787
    • Worksop, UK
    • MSOR

    #2
    Hi,
    As far as I am aware, lights on AI trains work the same as they did in MSTS-Bin-enhanced MSTS.
    You need to set the Unit and Control values accordingly.
    See file ID 85983

    Cheers,
    Ged

    Comment

    • DuctTapeGuru
      Senior Member

      • May 2010
      • 104
      • The 6ix
      • MSOR

      #3
      I almost always write new include files for lights, and have stopped coding for AI lights when writing these files. The lights on my AI trains work fine without them. Open Rails T1.5.1-1627-g90cae11a5.

      Comment

      • geepster775
        2500 Post Veteran


        • Sep 2006
        • 2846
        • .
        • General

        #4
        How would DPU lighting be handled? Mid-train vs. rear end location? I just used a shasta sd45t-2 as a rear end helper coupled behind the EOT and had no rear end marker lighting, no headlight, no nothing. Is the code intelligent enough to dim or extinguish headlights of AI trains that are stopped waiting in the siding - vs. on when leading while moving?? To dim/off headlights while waiting in the hole is a prototypical behavior.
        My Open Rails videos https://www.youtube.com/@lakecities3663/videos

        Comment

        • DuctTapeGuru
          Senior Member

          • May 2010
          • 104
          • The 6ix
          • MSOR

          #5
          I'm probably the worst person to answer this, as I only ever run passenger trains. No need for me to concern myself with all this modern diesel stuff like DPU and mid train helpers. One doesn't really see that on passenger trains. There are freights in my timetables; their lights work just fine. I have coded rear end units to have dim lights. Those units never lead one of my freights.

          One parameter very few people code for is TimeOfDay, which leads me to believe that light coding is not all that well understood by many. Using this and some of the newer parameters for light coding may be helpful. I don't really know.

          If one runs all that modern stuff, then I would suppose that coding for AI lighting is worth it. But AI trains will light up just fine without AI coding.

          Comment

          • duboc
            New Member
            • May 2010
            • 20
            • Charente France

            #6
            It seems that AI trains don't use type 1 light, only the type 0.

            Comment

            • gusthegator
              Senior Member

              • Dec 2012
              • 254
              • General

              #7
              Originally posted by slipperman
              Hi,
              As far as I am aware, lights on AI trains work the same as they did in MSTS-Bin-enhanced MSTS.
              You need to set the Unit and Control values accordingly.
              See file ID 85983

              Cheers,
              Ged
              Roger that. From what I've tested, seems without the control line added in, AI trains default to what ever the brightlight and rear marker settings are for the player train. I recently made it so ditch lights are tied to the horn and bell instead of the off/dim/bright. But when the AI train blows the horn the lights stay bright. Will test the control line on my off day.

              Comment

              • gusthegator
                Senior Member

                • Dec 2012
                • 254
                • General

                #8
                Originally posted by geepster775
                How would DPU lighting be handled? Mid-train vs. rear end location? I just used a shasta sd45t-2 as a rear end helper coupled behind the EOT and had no rear end marker lighting, no headlight, no nothing. Is the code intelligent enough to dim or extinguish headlights of AI trains that are stopped waiting in the siding - vs. on when leading while moving?? To dim/off headlights while waiting in the hole is a prototypical behavior.
                From what I've been able to do. The code is intelligent to handle it. Just gotta test it out as multiple marker light codes have to be written out. Heres what my MARC-HHP-8 markers look like:
                This controls the markers when running from the engine:

                Light (
                comment ( Marker Light Engr Side )
                Type ( 0 )
                Conditions (
                Headlight ( 1 )
                Unit ( 2 )
                Horn ( 0 )
                Bell ( 0 )
                )
                FadeIn ( 0.5 )
                FadeOut ( 0.5 )
                Cycle ( 0 )
                States ( 1
                State (
                Duration ( 0.0 )
                LightColour ( FFC00000 )
                Position ( 0.61 2.38 10.15 )
                Transition ( 0.0 )
                Radius ( 0.7 )
                )
                )
                )

                Light (
                comment ( Marker Light Fireman Side )
                Type ( 0 )
                Conditions (
                Headlight ( 1 )
                Unit ( 2 )
                Horn ( 0 )
                Bell ( 0 )
                )
                FadeIn ( 0.5 )
                FadeOut ( 0.5 )
                Cycle ( 0 )
                States ( 1
                State (
                Duration ( 0.0 )
                LightColour ( FFC00000 )
                Position ( -0.56 2.38 10.15 )
                Transition ( 0.0 )
                Radius ( 0.7 )
                )
                )
                )

                This controls the markers when running from a cab car or other engine and the hhp is at the rear and flipped ( didn't make a dual cab so i gotta flip it ):

                Light (
                comment ( Marker Light Engr Side Running from Cabcar )
                Type ( 0 )
                Conditions (
                Headlight ( 0 )
                Unit ( 4 )
                Horn ( 0 )
                Bell ( 0 )
                )
                FadeIn ( 0.5 )
                FadeOut ( 0.5 )
                Cycle ( 0 )
                States ( 1
                State (
                Duration ( 0.0 )
                LightColour ( FFC00000 )
                Position ( 0.61 2.38 10.15 )
                Transition ( 0.0 )
                Radius ( 0.7 )
                )
                )
                )

                Light (
                comment ( Marker Light Fireman Side Running from CabCar )
                Type ( 0 )
                Conditions (
                Headlight ( 0 )
                Unit ( 4 )
                Horn ( 0 )
                Bell ( 0 )
                )
                FadeIn ( 0.5 )
                FadeOut ( 0.5 )
                Cycle ( 0 )
                States ( 1
                State (
                Duration ( 0.0 )
                LightColour ( FFC00000 )
                Position ( -0.56 2.38 10.15 )
                Transition ( 0.0 )
                Radius ( 0.7 )
                )
                )
                )

                This control the markers when running a lite engine:
                Light (
                comment ( Marker Light Engr Side Rear )
                Type ( 0 )
                Conditions (
                Headlight ( 0 )
                Unit ( 3 )
                )
                FadeIn ( 0.5 )
                FadeOut ( 0.5 )
                Cycle ( 0 )
                States ( 1
                State (
                Duration ( 0.0 )
                LightColour ( FFC00000 )
                Position ( 0.55 2.38 -10.38 )
                Azimuth ( 180 180 180 )
                Transition ( 0.0 )
                Radius ( 0.7 )
                )
                )
                )

                Light (
                comment ( Marker Light Fireman Side Rear )
                Type ( 0 )
                Conditions (
                Headlight ( 0 )
                Unit ( 3 )
                )
                FadeIn ( 0.5 )
                FadeOut ( 0.5 )
                Cycle ( 0 )
                States ( 1
                State (
                Duration ( 0.0 )
                LightColour ( FFC00000 )
                Position ( -0.62 2.38 -10.38 )
                Azimuth ( 180 180 180 )
                Transition ( 0.0 )
                Radius ( 0.7 )
                )
                )
                )​


                ​

                Comment

                • gusthegator
                  Senior Member

                  • Dec 2012
                  • 254
                  • General

                  #9
                  Originally posted by dfalshaw
                  I'm probably the worst person to answer this, as I only ever run passenger trains. No need for me to concern myself with all this modern diesel stuff like DPU and mid train helpers. One doesn't really see that on passenger trains. There are freights in my timetables; their lights work just fine. I have coded rear end units to have dim lights. Those units never lead one of my freights.

                  One parameter very few people code for is TimeOfDay, which leads me to believe that light coding is not all that well understood by many. Using this and some of the newer parameters for light coding may be helpful. I don't really know.

                  If one runs all that modern stuff, then I would suppose that coding for AI lighting is worth it. But AI trains will light up just fine without AI coding.
                  Fair enough. Time of day is a neat code. I use it so my marker lights glow at night, it's a pretty cool effect:
                  Open Rails NewYear MG 2025-07-31 12-04-47.png

                  Comment

                  • wmuzeke
                    Member



                    • Jan 2021
                    • 87
                    • Sacramento, CA
                    • General

                    #10
                    ....as multiple marker light codes have to be written out.
                    With the newer versions of Open Rails you can assign multiple conditions to one light.

                    For example on the front Engineer's side:

                    Code:
                        Light (
                            comment ( Marker Light Engr Side )
                            Type ( 0 )
                            Conditions (
                                Headlight ( 1 )
                                Unit ( 2 )
                                )
                            Conditions (
                                Unit ( 4 )
                                )
                            FadeIn ( 0.5 )
                            FadeOut ( 0.5 )
                            Cycle ( 0 )
                            States ( 1
                                State (
                                    Duration ( 0.0 )
                                    LightColour ( FFC00000 )
                                    Position ( 0.61 2.38 10.15 )
                                    Transition ( 0.0 )
                                    Radius ( 0.7 )
                                )
                            )
                        )​
                    The 0 conditions aren't needed (Horn ( 0 ), etc.) as they are default/implied.
                    For more information, check out section 9.1 in the Open Rails Manual.

                    Comment

                    • gusthegator
                      Senior Member

                      • Dec 2012
                      • 254
                      • General

                      #11
                      Originally posted by wmuzeke

                      With the newer versions of Open Rails you can assign multiple conditions to one light.

                      For example on the front Engineer's side:

                      Code:
                      Light (
                      comment ( Marker Light Engr Side )
                      Type ( 0 )
                      Conditions (
                      Headlight ( 1 )
                      Unit ( 2 )
                      )
                      Conditions (
                      Unit ( 4 )
                      )
                      FadeIn ( 0.5 )
                      FadeOut ( 0.5 )
                      Cycle ( 0 )
                      States ( 1
                      State (
                      Duration ( 0.0 )
                      LightColour ( FFC00000 )
                      Position ( 0.61 2.38 10.15 )
                      Transition ( 0.0 )
                      Radius ( 0.7 )
                      )
                      )
                      )
                      The 0 conditions aren't needed (Horn ( 0 ), etc.) as they are default/implied.
                      For more information, check out section 9.1 in the Open Rails Manual.
                      Holy cow I completely forgot about that. I'll work out some light code on the HHP-8 after I finish up the reverse cab.

                      Comment

                      Working...