Loco Lighting Enhancements

Post your problems and installation issues here!

Loco Lighting Enhancements

Unread postby OlPaint » Thu Jun 27, 2013 10:14 am

I have installed all the Lighting Enhancements mods published by Machinist (Doc) and Krellnut (Walter) that I have found in the library. I very impressed with the results. The shine of the head lights and ditch lights in front of the loco really adds so much to the realism of the scene ahead. The illumination of number boards and the lighted cab dials is marvelous, too.

My question is how can I add the Lighting Enhancements to at least make the head lights and ditch lights shine on the track ahead on all the other locomotives in my collection? I can see where the Lighting Icons have been placed on the enhanced locomotives when I view them in the World Editor. So, how do I place the Lighting Icons on the locomotives in the rest of my collection so they will be enhanced as well?

OlPaint
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby artimrj » Thu Jun 27, 2013 10:24 am

Try looking through the modified .BIN files and look at the code for the lights. Copy and paste it to your new BIN file in the same places.

Explore a little.
Bob Artim - Generation X²
I don't have a PHD, I have a DD214... Freedom carries sacrifice
I'm crawling in the dark looking for the answer
User avatar
artimrj
 
Posts: 4749
Joined: Sun Jan 31, 2010 3:07 pm
Location: Beaver, Pennsylvania

Re: Loco Lighting Enhancements

Unread postby OlPaint » Thu Jun 27, 2013 1:50 pm

Bob

Will do...that is how I learned to add Krellnut's Wagon Sounds mod and GreatNortherner's Couplers mod and JCornell's Coupler Sounds mod to every one of my rolling stock.

Just dig right in to the .BIN files to see how they tick. If it were easy, everyone would do it, correct? I'll let you know how I do.

OlPaint
Last edited by OlPaint on Mon Jul 01, 2013 8:22 am, edited 1 time in total.
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby OlPaint » Sat Jun 29, 2013 9:00 pm

Bob

As you know, I want to get the lights to shine on the locomotives that do not have this feature.

So I have followed your advice and I have studied the .BIN/.XML code for the RSC GP38-2BnPack01 locomotive that has shining lights to start with. It appears that the locomotive head lights, ditch lights, step lights and strobe lights are found and described in the "GP38_2_BN.bin" Engine BluePrint file in section "Blueprint > cEnginBlueprint > ContainerComponent > Children".

I found that there are "cEntityContainerBluepinrt-sChild" entries for each light with an associated ChildName as follows:
Fwd_Headlight_01
Fwd_Headlight_02
Fwd_Headlight_03
Bwd_Headlight_02
Cablight
Steplight_FL
Steplight_FR
Steplight_RR
Steplight_RL
Strobelight

You suggested that I copy and paste these appropriate parts of the .XML code into the proper location in the new loco .XML to get the shining lights added. But I have a question about the "d:ID" numbers I found associated with each ChildName. Where does the d:ID number come from? Is it OK to use the same numbers that are associated with the ChildName entries from the GP38-2 loco to be applied to the new loco? Or do the numbers need to be changed?

OlPaint
Last edited by OlPaint on Mon Jul 01, 2013 8:23 am, edited 1 time in total.
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby OlPaint » Sun Jun 30, 2013 9:19 pm

Bob

After spending several days worth of study attempting to understand how a Locomotive's BluePrint code is written to enable the head lights, step lights, and ditch lights to "shine", I have become very discouraged.

I have found that only in the most recent of RSC's DLC have developers even provided consistent support for 'shining lights'. It appears that the method that has recently been narrowed to uses ChildName items in the ContainerComponent section of the Engine BluePrint .BIN/.XML file for each kind lamp and its location on the loco.

I have also found that many of the older DLC from RSC has no support for "shining" lights at all. And of course, as a consequence, a great deal of 3rd-Party locomotives or re-paints in my assets collection never had "shining" lights either. And I have found some "dated" locomotive assets are using a primitive method to make shining lights which I am struggling to understand.

But the biggest issue that I am seeing is there is no commonality of addresses where these light objects can be found in my assets directory structure or even a common naming convention to follow when calling out these light objects for the Engine BluePrint.

So, Bob, it is not as easy a process as you have suggested to simply cut the appropriate code segment from one source blueprint and paste it into the proper location of the target blueprint. I am completely discouraged.

Now I can understand why "Doc" Machinist has lost interest in developing any more "Loco Enhancement" kits or updates.

OlPaint
Last edited by OlPaint on Mon Jul 01, 2013 8:25 am, edited 1 time in total.
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby PapaXpress » Sun Jun 30, 2013 9:25 pm

I think you are only seeing one side of the coin here.

You can add the light emitters to the blueprint, but then they have to be controlled. If you look at the UPY588 you will see how the child objects (including the light emitters) were added to the blueprint. Then if you open the LUA you will see how they are controlled. There is a third part where you hook up the controls and input mapper, but lets leave that for later.

What engine are you trying to add lights to? Can you access the LUA?
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Loco Lighting Enhancements

Unread postby OlPaint » Sun Jun 30, 2013 9:39 pm

PapaX

I am attempting to add shining lights to all the older RSC DLC; like, SD40CnPack01, SD40HnPack01, SE40WnPack01, and even JCornell's GP38-2 and Kuju's SD40-2 and all the Freeware Re-paints based on them. My goal is that I would like to bring my whole loco collection up to GP38-2BnPack01 standards. Machinist's "Loco Enhancement" series is serving as my inspiration.

I have been studying your elegant UPY-588 blueprint code but I must admit that I am getting lost in the details...

OlPaint
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby PapaXpress » Mon Jul 01, 2013 12:35 am

Thanks for the compliment, but knowing what I do now that code is a bit clunky :D I hope you can glean something from it. I can certainly help here and there if you have a question.

MadMike already updated Cornell's 38-2, just look for some of his more recent repaints of that model.

I could swear that someone already update the sd40's but this was two years ago now... I am not sure where to start looking. I would hate for you to reinvent the wheel when it was already upgraded.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Loco Lighting Enhancements

Unread postby CSX2057 » Mon Jul 01, 2013 3:36 am

This little light mine I'm gonna let it shine. !*cheers*!
Hi! I'm Daniel (37). A casual Train Simulator Streamer and Railfanner. 4+ hours of Fun and Adventure with Laughter, Reactions and SoundFX.
CSX2057 YOUTUBE CHANNEL
User avatar
CSX2057
 
Posts: 1383
Joined: Tue Jun 07, 2011 11:18 am
Location: Georgia

Re: Loco Lighting Enhancements

Unread postby krellnut » Mon Jul 01, 2013 7:44 am

Go over to Digirails and look through the locos to download that have updated lights. Download them and look at the engine children section to learn some more about it. Jessie has added better lighting to a lot of them.
krellnut
 

Re: Loco Lighting Enhancements

Unread postby OlPaint » Mon Jul 01, 2013 8:00 am

PapaX

I just found MadMike's EMDX GP38-2 GM Demonstrator. It is a JCornell loco design repaint and it has shining loco lights. And MM has adopted the method of using ChildName Objects as the light emitters in the Children section of the ContainerComponent > cEntityContainerBlueprint section of the Engine blueprint code.

Bob Artim suggested that I copy the relevant code for the lights emitters from the source blueprint and paste into the appropriate section in the target blueprint. Could it be that easy? I guess I also need to know how to add the "behind the scenes" stuff that allows me to turn things on and off from the keyboard or HUD and also sense the loco direction, for example.

I have noticed that each developer's design is a little different as well. Some turn both forward and backward headlights and ditch lights on and off together. Others turn the headlights on an off to match the direction of travel. Still others extinguish just the headlight on the end of the loco facing the consist when coupled up. So, each to his own, I guess. The rules are not evenly applied as I can see it. And there is no common naming convention followed for the light emitter objects in each particular design.

When I study someone else's code, I like to look at several examples and try to recognize a common pattern that makes things work. That was how I was able to add Krellnut's Wagon Sounds, GreatNorthener's Couplers and JCornell's Coupler Sounds to all my rolling stock collection. So far the only common thing I have noticed is the adoption of the method for using ChildName light emitters for each of the loco lamps in the most recently released RSC Locomotive Pack's blueprints, particularly the GP38-2BnPack01 DLC.

I have been looking at the series of Loco Enhancement Packs that Machinist and Krellnut have collaborated on . TandD Forum used to have Loco Enhancement Pack_v1 in their download library but the promised v2 update has become "vaporware". But I did happen to find Loco Enhancement Pack_v2 on NERW Forum, and I stumbled onto SD40-2 Enhancement Pack_v1, SD70 Enhancement_v1 and ES44 Enhancement_v1 in the RWA downloads. The confusing thing about each and every one of the Enhancement Packs' code changes show the "Shining Lights" are handled using a slightly different methodology. Even your UPY-588 shining light enhancement code is slightly different. For example, the "called out" light emitter ChildName objects do not reside at the same reference addresses in the assets directories! So you see, I can't seem to find a common thread to follow.

Edit:
Krellnut

Thanks for the suggestion to study Jessie's locos. I think I have a great many of his locos already installed. I will load each one up in the Editor on TestTrak and take a look-see.

Edit_2:
PapaX

Usually a loco has a common default blueprint shared by all its repaints for the Engine and CabView, at least. It would be cool if the a single Enhancement Pack could be applied to the Default that would carry over to all the repaints. It is just an addressing thing, correct?

I can dream, can't I???

OlPaint
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby PapaXpress » Mon Jul 01, 2013 12:08 pm

OlPaint wrote:PapaX

I just found MadMike's EMDX GP38-2 GM Demonstrator. It is a JCornell loco design repaint and it has shining loco lights. And MM has adopted the method of using ChildName Objects as the light emitters in the Children section of the ContainerComponent > cEntityContainerBlueprint section of the Engine blueprint code.

Bob Artim suggested that I copy the relevant code for the lights emitters from the source blueprint and paste into the appropriate section in the target blueprint. Could it be that easy? I guess I also need to know how to add the "behind the scenes" stuff that allows me to turn things on and off from the keyboard or HUD and also sense the loco direction, for example.
It is that simple... but you can add "more". You could add additional controls to the inputmapper, and trap the events in the LUA to control the ditch light children/nodes separately (something Mike and I did not do with most of our repaints). You can make it as complex as you want...

OlPaint wrote:I have noticed that each developer's design is a little different as well. Some turn both forward and backward headlights and ditch lights on and off together. Others turn the headlights on an off to match the direction of travel. Still others extinguish just the headlight on the end of the loco facing the consist when coupled up. So, each to his own, I guess. The rules are not evenly applied as I can see it. And there is no common naming convention followed for the light emitter objects in each particular design.
Correct. Everyone has their own style of coding, or adding parts to a model. If you follow along my work you will find that start out clunky and then refine my style as I gained experience. With the LUAs I am writing now for VRC I doubt you could tell they were writen by the same person *!lol!* You will however find that I use a common convention with the parts I make, so they can be reused elsewhere. This helps so I don't have 50 scripts calling the refactored parts everywhere. I am big with reusing models and code where I can.

OlPaint wrote:When I study someone else's code, I like to look at several examples and try to recognize a common pattern that makes things work. That was how I was able to add Krellnut's Wagon Sounds, GreatNorthener's Couplers and JCornell's Coupler Sounds to all my rolling stock collection. So far the only common thing I have noticed is the adoption of the method for using ChildName light emitters for each of the loco lamps in the most recently released RSC Locomotive Pack's blueprints, particularly the GP38-2BnPack01 DLC.

If you are talking about headlights, then RSC has hard coded the game engine to look for specific child names so they can control them easier. The Fwd and Bwd headlights are an example (but the only example I believe).

OlPaint wrote:I have been looking at the series of Loco Enhancement Packs that Machinist and Krellnut have collaborated on . TandD Forum used to have Loco Enhancement Pack_v1 in their download library but the promised v2 update has become "vaporware". But I did happen to find Loco Enhancement Pack_v2 on NERW Forum, and I stumbled onto SD40-2 Enhancement Pack_v1, SD70 Enhancement_v1 and ES44 Enhancement_v1 in the RWA downloads. The confusing thing about each and every one of the Enhancement Packs' code changes show the "Shining Lights" are handled using a slightly different methodology. Even your UPY-588 shining light enhancement code is slightly different. For example, the "called out" light emitter ChildName objects do not reside at the same reference addresses in the assets directories! So you see, I can't seem to find a common thread to follow.

You will need to make your own path with all the knowledge given to you. I suggest you find someone's style that you are comfortable with, and translate everyone else's work as needed. In my case I already had a style as I am a programer by trade. What I needed to do is get a feel for the RW APIs before I could write my own LUAs from scratch.

OlPaint wrote:Edit:
Krellnut

Thanks for the suggestion to study Jessie's locos. I think I have a great many of his locos already installed. I will load each one up in the Editor on TestTrak and take a look-see.

Edit_2:
PapaX

Usually a loco has a common default blueprint shared by all its repaints for the Engine and CabView, at least. It would be cool if the a single Enhancement Pack could be applied to the Default that would carry over to all the repaints. It is just an addressing thing, correct?

I can dream, can't I???

OlPaint
Dreams are wonderful things... coding dreams can be a nightmare. I recommend you look to simplify your expectations or you will end up being annoyed and end up walking away from railworks. A unified enhancement pack is a pretty tall order.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Loco Lighting Enhancements

Unread postby OlPaint » Mon Jul 01, 2013 2:15 pm

PapaX

I have noticed that Machinist has, in his recently published Loco Enhancement Packs gathered the light emitter objects into an easily addressed \assets\Kuju\RailSimulatorUS\RailVehicles\ assets folder called "WJDoc" in a like manner as Krellnut has done with his Wagon Sounds objects in an assets folder called "WJSound". Maybe this is just the consistancy I am looking for to make the methodology more understandable for me to "hack" the Engine BluePrints for adding shining lights.

A universally available light emitters objects library with a standardize naming convention could reside in an assets folder called "WJLight". After all, once we have an agreed-upon list of descriptive ChildName strings, it would be only the reference addresses that need to be standardized and assembled into a single directory of Children for any Engine BluePrint, correct? Or if that is too difficult to do than maybe an ChildName Objects folder for each Developer/Locomotive Type directory would be easier to setup...Instead of the hodge-podge arrangement we now have that is difficult to understand - let alone use.

OlPaint
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Loco Lighting Enhancements

Unread postby PapaXpress » Mon Jul 01, 2013 3:33 pm

Um... you don't want to pull from Kuju US. Those assets are now payware. Instead you can use RCAP which has the same type of light sources. If you copy the light sources from RCAP all you need to do is include attribution in your readme.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Loco Lighting Enhancements

Unread postby OlPaint » Mon Jul 01, 2013 7:03 pm

PapaX

RCAP would make a darn good resource. Is there an assets/objects listing available to use for my reference? I have never played with these assets before. But RCAP is a great start for standardizing. Soon to be released Version 2 has even more stuff I understand.

I think from the object names I have found in the \RCAP\NorthAmerica\Lights\ directory that Spot_Light.bin would make good Head Light or Ditch Light lamps and Point_light.bin would make a good Step Light lamp. Did I interpret these names correctly or did I get them reversed?

OlPaint
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Next

Return to Problems and Peculiarities

Who is online

Users browsing this forum: No registered users and 2 guests

cron