Elvas Tower: Dynamic weather - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 6 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Dynamic weather WeatherChange activity event Rate Topic: -----

#1 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 June 2015 - 12:39 PM

A blueprint https://blueprints.l...er-change-event has been generated to specify a WeatherChange activity event. I repeat here the specification.

Following block can be added within an Event Block (be it a Location or a Time event) of an .act file:

ORTSWeatherChange (
ORTSTransitionTimeS ( double )
ORTSWeatherType ( double )
ORTSOvercast ( float )
ORTSFog ( float )
ORTSPrecipitationIntensity ( float )
)

The weather changes consequentially.
The event can also include an ORTSContinue ( 0 ) line, therefore not displaying messages and not suspending activity execution.
Manual commands related to weather interrupt the weather change triggered by the above events.
If a new WeatherChange event is triggered before the action of the preceding has terminated, the old one is interrupted.

MSTS operation is not damaged by the WeatherChange events.
Editing the .act file with the MSTS AE after inclusion of WeatherChange events clears them, so they should be backed up separately.
Opening with the MSTS AE an .act file with WeatherChage events and packaging it without editing it generates an .apk file that contains such events.

Using the location event it is possible to have another weather e.g. when climbing uphill or exiting a continental divide tunnel; using the time event it is possible to have weather changing during the day.

Implementation work not yet started.

#2 User is offline   Driver 

  • Fireman
  • Group: Status: Active Member
  • Posts: 108
  • Joined: 14-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 01 June 2015 - 10:40 PM

View PostCsantucci, on 01 June 2015 - 12:39 PM, said:

A blueprint https://blueprints.l...er-change-event has been generated to specify a WeatherChange activity event. I repeat here the specification.

Following block can be added within an Event Block (be it a Location or a Time event) of an .act file:

ORTSWeatherChange (
ORTSTransitionTimeS ( double )
ORTSWeatherType ( double )
ORTSOvercast ( float )
ORTSFog ( float )
ORTSPrecipitationIntensity ( float )
)

The weather changes consequentially.
The event can also include an ORTSContinue ( 0 ) line, therefore not displaying messages and not suspending activity execution.
Manual commands related to weather interrupt the weather change triggered by the above events.
If a new WeatherChange event is triggered before the action of the preceding has terminated, the old one is interrupted.

MSTS operation is not damaged by the WeatherChange events.
Editing the .act file with the MSTS AE after inclusion of WeatherChange events clears them, so they should be backed up separately.
Opening with the MSTS AE an .act file with WeatherChage events and packaging it without editing it generates an .apk file that contains such events.



Will this also work in timetable mode?

#3 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 02 June 2015 - 08:41 AM

View PostDriver, on 01 June 2015 - 10:40 PM, said:

Will this also work in timetable mode?

Timetable mode doesn't use activity files, so it'll need a separate implementation.

#4 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 02 June 2015 - 08:49 AM

View PostCsantucci, on 01 June 2015 - 12:39 PM, said:

ORTSWeatherChange (
ORTSTransitionTimeS ( double )
ORTSWeatherType ( double )
ORTSOvercast ( float )
ORTSFog ( float )
ORTSPrecipitationIntensity ( float )
)

I am generally happy to try exploring these kinds of ideas. Being able to tie it in to other activity events through the usual means seems very useful, as does the transition time.

Shouldn't ORTSWeatherType be int or string with limited values?

I think we'll also need to double-check how precipitation intensity is working related to real life. :)

#5 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 June 2015 - 11:14 AM

Re weather type in effect a better choice could be made than the one I did. As Weather type is already present in the Activity file as int, I will use that format. That will be then converted in an enum, as already used in OR.
Referring precipitation intensity maybe I'll try to integrate Edward's patch, if he agrees. It would be nice also to have a smooth transition from rain to snow, but that requires fine graphics work.
Another parameter that could be added is wind (intensity, direction, variance - meaning intensity and direction are not constant).

#6 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 02 June 2015 - 04:16 PM

Please set it up so the visual effects may be evoked as a solo effect -- meaning someone can create commands for only wind w/o having to use precipitation as well. Ditto for cloud cover.

The route I work on (The Cal-P) has ~1/3 of the mainline located in a natural wind tunnel: >50km/hr blowing east is standard afternoon wind in the summer months; The west end sees high fog most mornings until noon and a light eastward breeze in late afternoon whereas the inland east end sees little wind, no clouds, and the brightest sun etc. etc. It's quite varied from one end to other and so KUJU's approach of managing it all as a route-wide effect would never serve. All of those natural effects occur w/o rain or snow from May into October.

#7 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 02 June 2015 - 10:20 PM

Dave,
it is foreseen that it will be possible to have solo effects.

#8 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 03 June 2015 - 02:51 PM

Can the trigger be a time of day instead of an action by the player?

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 03 June 2015 - 09:16 PM

You can use time event, that is events that start at a predetermined time interval from activity start.

#10 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 03 June 2015 - 09:54 PM

Great! Sounds like everything is all lined up!

  • 6 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users