Elvas Tower: Suggestion - Conditional Include Statements - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Suggestion - Conditional Include Statements A way to provide choices within eng and wag files Rate Topic: -----

#1 User is online   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,248
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 29 November 2020 - 11:00 PM

Conditional include statements could be a powerful way to solve some problems with eng and wag files both in the existing and future possible formats.

Some of the things that could be done with this are:

Changing freight anims and light statements for headlamp shapes, lights, headcodes, EoT markers and so on.

Selecting braking systems for use in any given vehicle in different consists.

Changing performance of electric locomotives under different electrical systems.

Changing between diesel and electric propulsion for bi-mode trains.


The nice thing about this way to make choices in eng and wag files is that many different kinds of choices could be made using the same structure. My initial thought would be to have the choices appear on the F9 menu - with the first item on any list of choices being the default mode.

Structure in an eng or wag file might look something like this:

IncludeOptional(
ListName ( "BrakeSystem" )
Options ( ( 5 )
Include ( Brakes\\LightEngine.inc )
Include ( Brakes\\AirGoods.inc )
Include ( Brakes\\AirPassenger.inc )
Include ( Brakes\\VacuumBraked.inc )
Include ( Brakes\\VacuumUnbraked.inc ) ) )

IncludeOptional (
ListName ( "Headcode" )
Options ( ( 3 )
Include ( Headcode\\0A62.inc )
Include ( Headcode\\5A62.inc )
Include ( Headcode\\1A62.inc ) ) )

IncludeOptional (
ListName ( "TailLamp" )
Options ( 2 )
Include ( NoLamp.inc ) Comment ( No tail lamp shape )
IncludeIfEndOfTrain ( TailLamp.inc ) Comment ( Adds oil tail lamp if at rear of consist ) ) )

Any of the above opitions could then be selected from the F9 menu for that locomotive or wagon.

Include files for brake systems could include both the relevant wag section and the eng section to be used, or even if the brakes controllers were different also the controller - such as separate passenger and goods behaviour for the Westinghouse 26L air brake system. For lamps the include file might refer both to a freight anim shape and a light statement to go with it. Apart from writing the content of the include files I can only see one additional thing that might be require is an alternative definition for freightanims and lights that will allow them to always be at the front or the rear as required even if the main shape is flipped.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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