Can environmental settings be controlled via script?

Pendolino

Cab mode weirdo
I made a session with variable weather, but I am disappointed because the lighting remains the same, regardless of the weather. I have seen the rain coming down on a sunny day, but this is a quite rare occurrence: usually the lighting during a thunderstorm is radically different from that of a sunny day - except in Trainz, of course... ;)

I found this to be a bit annoying, so I wondered: can the environmental settings be altered in-game? I looked for some scripting function capable of performing this task, but I found none.

Does anybody know if this is possible?
 
There are the weather functions in world.gs if you were talking about Trainzscript.

I live in the same area as N3V and we often get showers of rain in brilliant sunshine.
 
There are the weather functions in world.gs if you were talking about Trainzscript.

I live in the same area as N3V and we often get showers of rain in brilliant sunshine.
We get those up here in northeastern New England in the spring and summer.

The issue is we used to have dark skies and brilliant lightning flashes prior to T: ANE. When T: ANE came out the weather system was broken, even Tony admitted it back then, and it has never been repaired. In the meantime, the floorboards have holes in the attic and you have to be careful when you take the Christmas tree down.
 
Last edited:
Thanks for the replies, folks! We also get rain and sunshine together here in Italy at times, but I was talking about really ugly rainy days.

@pcas1986: thanks for the reference, I was just thinking about tampering with some values there, but I found no functions referring to the "Sun" and "Ambient" settings.

My goal was to obtain something like this when rain is pouring down:

500px-Shadows_Sun_Minimal.png


I found two pairs of functions, i.e. Set/GetBadWeatherFog and Set/GetGoodWeatherFog that could be used to achieve some similar effects, but all of them are marked as "obsolete in TRS19", and I don't want put our scripters at work on the equivalent of a C&O steam turbine...

Thanks a lot you all, anyway!
 
Didn’t know about the broken weather but we really do get unexpected showers in an otherwise brilliant southern Queensland summer or spring day. But I was looking at World.gs recently while trying to get some windscreen wiper code working using Dundun92’s WagonX library code. That’s why I knew about the functions. You can also change the weather on the fly using settings in Driver mode.
 
Back
Top