Page 1 of 1

The New Three Position Headlight Switch...(SD75 Solved)

Unread postPosted: Mon Sep 22, 2014 2:01 am
by Ericmopar
It seems some engines have had their Headlights messed up with this new three position switch.
On my SD75s, the lights in positions one and three are on externally but not projecting ahead. In position two, they project for night driving, but the lights in the external view are off. **!!bang!!**

Re: The New Three Position Headlight Switch...

Unread postPosted: Mon Sep 22, 2014 4:18 am
by RSMattP
Hi Eric

Can you confirm exactly which locomotive(s) you're experiencing problems with and whether they are Steam DLC or downloads from elsewhere?

Thanks
Matt Peddlesden
Dovetail Games

Re: The New Three Position Headlight Switch...

Unread postPosted: Mon Sep 22, 2014 4:50 am
by _o_OOOO_oo-Kanawha
Confirmed.

Headlights consist of two parts: the emitting projector casting the light, and the glowing shape on the locomotive body.
Each of them being "on"or "off" used to be simply controlled by the game engine reading the engine blueprint and through the proper naming convention.
With the introduction of more lights, the engine script nowadays takes control of the lights.

The Headlights value in the <ControlValues> section now has possible values of 0,1,2,3. Formerly, engines used only to allow 0 (off), 1 (forwards) or 2 (backwards).
The SD75 engine script is thankfully still in cleartext lua, and it shows that headlight positions 0,1,2,3 are defined.
Code: Select all
if Call("*:GetControlValue", "Headlights", 0) == 0 then

Call( "Fwd_Headlight_01:Activate", 0)
Call( "Fwd_Headlight_02:Activate", 0)
Call( "Fwd_Headlight_03:Activate", 0)
Call( "Bwd_Headlight_01:Activate", 0)


Call ( "ActivateNode", "lights_front", 0 )
Call ( "ActivateNode", "lights_rear", 0 )

elseif Call("*:GetControlValue", "Headlights", 0) == 1 then

Call( "Fwd_Headlight_01:Activate", 1)
Call( "Fwd_Headlight_02:Activate", 1)
Call( "Fwd_Headlight_03:Activate", 1)
Call( "Bwd_Headlight_01:Activate", 0)

Call ( "ActivateNode", "lights_front", 1 )
Call ( "ActivateNode", "lights_rear", 0 )

elseif Call("*:GetControlValue", "Headlights", 0) == 2 then

Call( "Fwd_Headlight_01:Activate", 0)
Call( "Fwd_Headlight_02:Activate", 0)
Call( "Fwd_Headlight_03:Activate", 0)
Call( "Bwd_Headlight_01:Activate", 1)


Call ( "ActivateNode", "lights_front", 0 )
Call ( "ActivateNode", "lights_rear", 1 )

elseif Call("*:GetControlValue", "Headlights", 0) == 3 then

Call( "Fwd_Headlight_01:Activate", 1)
Call( "Fwd_Headlight_02:Activate", 1)
Call( "Fwd_Headlight_03:Activate", 1)
Call( "Bwd_Headlight_01:Activate", 1)


Call ( "ActivateNode", "lights_front", 1 )
Call ( "ActivateNode", "lights_rear", 1 )

end

0 = dark, 1 = forwards, 2 = backwards, 3 = all on. Looks OK, right?
The position and projection matrices of the emitters in the blueprint seem OK to me as well.

Yet it doesn't work as programmed. Why? !*don-know!*
The shapefile nodes on the locomotive body come on and off as intended, so it must be the projectors. Game engine interference because of bright and dimmed settings?
Trying a single SD75M.
In position 0, the engine is dark
In position 1, the forwards headlight shapes light up, as do the numberboards, but no light emitters.
In position 2, the emitters come on depending on reverser position, the backwards headlight lights up, but the forwards headlight shapes remain unlit.
In position 3, no emitters come on, and all headlight shapes are lit, numberboards as well.
<ApplyToConsist> is set to False, so no propagation along a m.u. consist.

What are the intended headlight positions in TS2015?
Where is the new features list?
What other engine has working bright/dim headlights? The SD75 enginescript can perhaps be adapted.

Re: The New Three Position Headlight Switch...

Unread postPosted: Mon Sep 22, 2014 6:36 am
by _o_OOOO_oo-Kanawha
I looked over the IECT that comes with Munich-Garmish Partenkirchen.
It has a six position headlights switch, and a new naming convention in the blueprint.
I see overlapping emitters of varying intensity.
Fwd_Headlight11 = dim
Fwd_Headlight21 = medium
Fwd_Headlight31 = bright
Fwd_Headlight12 = dim
Fwd_Headlight13 = dim
Fwd_Headlight32 = bright
Fwd_Headlight33 = bright
Headlightx1 is upper emitter, centered
Headlightx2 is lower emitter, right side
Headlightx3 is lower emitter, left side
With the ICET this produces:
0 = dark
1 = parking lights? No emitters, nodes only?
2 = dim headlights depending on reverser position, taillights other end. No visible emitters
3 = medium headlights depending on reverser position, taillights other end. Track illuminated.
4 = double row of medium headlights depending on reverser position, taillights other end. Track illuminated some more.
5 = double rom of bright headlights depending on reverser position, taillights other end. Track brightly illuminated.

I could find no evidence of the ICET enginescript controlling the headlights.
Its scripts are obfuscated and very complex due to the tilting mechanics, PZB, LZB and AFB.

So I assume the game engine overrides the emitter definitions in the SD75 engine blueprint and/or engine simulation.

Re: The New Three Position Headlight Switch...

Unread postPosted: Mon Sep 22, 2014 12:00 pm
by Chacal
_o_OOOO_oo-Kanawha wrote:The SD75 engine script is thankfully still in cleartext lua


Please, please DTG make this the norm for all DLC

Re: The New Three Position Headlight Switch...

Unread postPosted: Mon Sep 22, 2014 1:40 pm
by Ericmopar
RSMattP wrote:Hi Eric

Can you confirm exactly which locomotive(s) you're experiencing problems with and whether they are Steam DLC or downloads from elsewhere?

Thanks
Matt Peddlesden
Dovetail Games


So far I've only found the SD 75 DLC is affected Matt. I haven't run all of them yet.
It's a Steam Download and it's set for the Phoenix Arizona server.
I also tried to copy and paste a backup of that DLC from a copy of TS 2013, but I got the same results, so I don't think it's the DLC exactly, unless it wasn't patched pre release to go with the new effects.
Maybe something with the core game engine update.
I run with the headlight bloom off BTW, just in case that's got something to do with it.

I was fine with off and on headlights, but I guess some people wanted dimable ones. !*don-know!*

Just for kicks I updated my Nvidia drivers to the release version of 340.XXX.
I've also validated and cleared the cache.
I don't know if this has anything to do with this, but Microsoft updated the .net framework very recently.

I feel naked when it comes to graphics issues. I can sift through brake code in a heartbeat, but know little about these graphics issues.

Re: The New Three Position Headlight Switch...

Unread postPosted: Mon Sep 22, 2014 2:53 pm
by RSMattP
Thanks for the update guys, i'll pass the details on to the content team.

Matt.

Re: The New Three Position Headlight Switch...

Unread postPosted: Tue Sep 30, 2014 4:20 am
by qwhite451
i would also like to add the Amtrak F40PH 'California Zephyr is suffering from the same effects as the SD75 with the wonky headlights thing

Re: The New Three Position Headlight Switch...(SD75 Solved)

Unread postPosted: Sun Nov 02, 2014 4:06 am
by Ericmopar
I know now what's causing the headlight hiccup on the SD75Pack01. *!greengrin!*
There are three variations of the engine.
SD75I
SD75M Default
SD75M BNSF

Of those there are a total of 3 "Engine" folders with a total of 6 ".bin" files.
There are 2 .bins in each "Engine" folder. 1 for the driver version and 1 for the ND version.
The problems are in those .bins.
The notched setting in the Headlight "ControlValue" has one too many notches added.
The first section for the Headlight control blueprint, shows a "MaximumValue" of "3" for a three notch interior headlight switch. The maximum value should be set to "2" , 0-1-2 being the three positions.

The second section Headlight "InteriorNotchedLever" has a value of "4" for a three position switch. It should be set to a value of "3" for the number of actual notches.

Someone accidentally set it up for a engine with a running light position, the F40PH pack being a good example, in which the 4 position system works correctly.

I'm just going to post a fix for that and the brakes, but that is enough info for someone familiar with engine blueprints to fix theirs in the mean time.

Re: The New Three Position Headlight Switch...(SD75 Solved)

Unread postPosted: Sun Nov 02, 2014 10:23 am
by plethaus
Ericmopar wrote:I know now what's causing the headlight hiccup on the SD75Pack01. *!greengrin!*
There are three variations of the engine.
SD75I
SD75M Default
SD75M BNSF

Of those there are a total of 3 "Engine" folders with a total of 6 ".bin" files.
There are 2 .bins in each "Engine" folder. 1 for the driver version and 1 for the ND version.
The problems are in those .bins.
The notched setting in the Headlight "ControlValue" has one too many notches added.
The first section for the Headlight control blueprint, shows a "MaximumValue" of "3" for a three notch interior headlight switch. The maximum value should be set to "2" , 0-1-2 being the three positions.

The second section Headlight "InteriorNotchedLever" has a value of "4" for a three position switch. It should be set to a value of "3" for the number of actual notches.

Someone accidentally set it up for a engine with a running light position, the F40PH pack being a good example, in which the 4 position system works correctly.

I'm just going to post a fix for that and the brakes, but that is enough info for someone familiar with engine blueprints to fix theirs in the mean time.


Nice work, thank you :)