Elvas Tower: .eng file format - Elvas Tower

Jump to content

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

.eng file format Rate Topic: -----

#1 User is offline   dforrest 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 978
  • Joined: 12-January 12
  • Gender:Male
  • Location:St. Vincent (formally UK)
  • Simulator:MSTS, Open Rails
  • Country:

Posted 25 October 2021 - 03:47 AM

I have been "brought up" with .eng files consisting of two section, WAGON and ENGINE, and nothing must be included between these to blocks. Now I see that several .eng files written (mainly?) for use in Open Rails have entries (comment statements) outside of these blocks, between the two. Such files will not run in MSTS. They will run in Open Rails but do they have any adverse effect on running Open Rails? Should this format of .eng file be used?

#2 User is offline   scottb613 

  • Vice President
  • Group: Status: First Class
  • Posts: 2,973
  • Joined: 06-July 09
  • Gender:Male
  • Location:Downeast Maine (soon)
  • Simulator:ORTS
  • Country:

Posted 25 October 2021 - 03:59 AM

View Postdforrest, on 25 October 2021 - 03:47 AM, said:

I have been "brought up" with .eng files consisting of two section, WAGON and ENGINE, and nothing must be included between these to blocks. Now I see that several .eng files written (mainly?) for use in Open Rails have entries (comment statements) outside of these blocks, between the two. Such files will not run in MSTS. They will run in Open Rails but do they have any adverse effect on running Open Rails? Should this format of .eng file be used?


Hi David,

None of my ENG files will work in MSTS - however - I use comments all the time - even between the ENG and WAG sections - works fine in ORTS - to the best of my knowledge.

SIMISA@@@@@@@@@@JINX0D0t______

Comment ( ########## WAGON SECTION ########## )
Wagon ( USRA_Loco
	Type ( Engine ) 
	WagonShape ( USRA_Loco.S ) 
	Size ( 3.26m 4.81m 14.5m )   
	Mass ( 145.45t-us )
	WheelRadius ( 33in/2 )
	ORTSNumberAxles (2)

Comment ( ##### INCLUDE FILES [WAGON] ##### )
	include ( ".\\INCLUDE\\USRA282LOC_COUPLERS.inc" )
	include ( ".\\INCLUDE\\USRA282LOC_FRICTION.inc" )
	include ( ".\\INCLUDE\\USRA282LOC_LIGHTS.inc" )
	include ( ".\\INCLUDE\\USRA282LOC_BRAKES_WAGON.inc" )

Comment ( ##### MISC WAGON ##### )
	Sound ( "Mik-h-eng.sms" ) 
	FreightAnim ( Crew.s 1 1 ) 
)

Comment ( ########## ENGINE SECTION ########## )
Engine ( USRA_Loco
	Wagon ( USRA_Loco ) 
	Type ( Steam )  
	ORTSSteamLocomotiveType ( Simple )
	ORTSDriveWheelWeight ( 221500lb  )
	IsTenderRequired ( 1 ) 
	WheelRadius ( 63.12in/2 )
	ORTSNumberDriveAxles ( 4 )

Comment ( ##### INCLUDE FILES [ENGINE] ##### )
	include ( ".\\INCLUDE\\USRA282LOC_POWER.inc" )
	include ( ".\\INCLUDE\\USRA282LOC_BRAKES_ENGINE.inc" )
	include ( ".\\INCLUDE\\USRA282LOC_EFFECTS.inc" )
	include ( ".\\INCLUDE\\USRA282LOC_CONTROLS.inc" )
	
Comment ( ##### MISC ENGINE ##### )
	FreightAnim ( crew.s 1 1 ) 
	Sound ( "Mik-h-cab.sms" ) 
	Name ( "SCO USRA282RUT #37 Loco" ) 
	CabView ( sps_700.cvf ) 
	HeadOut ( 1.95 3.5 -7.0 )
	Description ( "The USRA Light Mikado was a USRA standard class of steam locomotive designed under the control of the United States Railroad Administration. This was the standard light freight locomotive of the USRA types, and was of 2-8-2 wheel arrangement. As someone put it - it was the SD40-2 of its day and probably one of the most mass produced steam locomotives of all time. The first one was completed in 1918 and the class saw service until the end of steam.
	
	Type: USRA 2-8-2 Mikado
	Engine/Tender Weight: 479,100 lbs
	Tractive Effort: 54,724 lbs
	Drivers: 63 in
	Pistons: 26 in x 30 in
	Tender Capacity: 10,000 Gallons Water - 16 Tons Coal \n"+
)


Regards,
Scott

#3 User is offline   DirtyRam 

  • Fireman
  • Group: Status: First Class
  • Posts: 108
  • Joined: 23-October 12
  • Gender:Male
  • Location:Northwest Lake Ontario
  • Simulator:OR
  • Country:

Posted 25 October 2021 - 04:54 AM

View Postdforrest, on 25 October 2021 - 03:47 AM, said:

I have been "brought up" with .eng files consisting of two section, WAGON and ENGINE, and nothing must be included between these to blocks. Now I see that several .eng files written (mainly?) for use in Open Rails have entries (comment statements) outside of these blocks, between the two. Such files will not run in MSTS. They will run in Open Rails but do they have any adverse effect on running Open Rails? Should this format of .eng file be used?


Hey Dave, there are many different ways to do .eng and .wag files. What matters is the orientation of the information in those files.
Engine and wagon file templates are available here, as well as all kinds of info needed for Open Rails.
https://www.coalston...mat/#top-diesel

Here's another example in addition to Scott's effort,

Wagon ( AUnit_CPR_4028
WagonShape ( "AUnit_CPR_4028.s" )

Include ( "..\\Common.ORPower\\Frt\\Mesh\\MeshMLT3DTFP7A.inc" )
Include ( "..\\Common.ORPower\\Frt\\Couplers\\CouplerFreightAARTypeE.inc" )
Include ( "..\\Common.ORPower\\Frt\\Brakes\\BrakesCastIndependentSmallSinglePipe90psi.inc" )
Include ( "..\\Common.ORPower\\Frt\\BrakePipeVolume\\BrakePipeVolume54ft.inc" )
Include ( "..\\Common.ORPower\\Frt\\ResistanceSE\\ResistanceEMDFP7A.inc" )
Include ( "..\\Common.ORPower\\Frt\\Lights\\LightsEMDFP7AMLT3DT.inc" )
Include ( "..\\Common.ORPower\\Frt\\Cabs\\CabORTS3DCabV53DT.inc" )
Sound ( "..\\..\\NAVS_COMMON\\audio\\EMD_567\\X_567BC-0-K3L.sms" )
)
Engine ( AUnit_CPR_4028
Wagon ( AUnit_CPR_4028 )

Include ( "..\\Common.ORPower\\Frt\\Exhaust\\ExhaustEMDFP7AMLT3DT.inc" )
Include ( "..\\Common.ORPower\\Frt\\EngineInfo\\EngineInfoEMDFP7A.inc" )
Include ( "..\\Common.ORPower\\Frt\\Traction\\TractiveEMDFP7A65MPH.inc" )
Include ( "..\\Common.ORPower\\Frt\\PrimeMovers\\EngineEMDFP7A.inc" )
Include ( "..\\Common.ORPower\\Frt\\AirCompressors\\AirCompressorEMDFP7A.inc" )
Include ( "..\\Common.ORPower\\Frt\\Brakes26LSinglePipe90psi.inc" )
Include ( "..\\Common.ORPower\\Frt\\Brakes\\BrakesDynEMDFP7A.inc" )
Include ( "..\\Common.ORPower\\Frt\\AntiSlipThrottlePowerDown.inc" )
Include ( "..\\Common.ORPower\\Frt\\EngineMonitors.inc" )
Include ( "..\\Common.ORPower\\Frt\\Controllers\\BrakeCastContEMD567Frt90psi.inc" )
Include ( "..\\Common.ORPower\\Frt\\Fuel\\FuelLevel1200.inc" )
Include ( "..\\Common.ORPower\\Frt\\Cabs\\CabORFUnitV53DT.inc" )
Sound ( "..\\..\\NAVS_COMMON\\audio\\EMD_567\\567BC-0-K3L.sms" )
Name ( "MLT CPR 4028 FP7A" )
Include ( "..\\Common.ORPower\\Frt\\UnitText\\Text3DTEMDFP7AB.inc" )
)

Mike

#4 User is offline   Genma Saotome 

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

Posted 25 October 2021 - 10:41 AM

Another way is to plan for include files to be shared across multiple .wags and .engs. That means some include files would be used fleet wide, stuff like couplers, other include files that service the same model skinned for different roads work for several folders in \trainset, and a third set that is specific to just one model in one folder.

For the shared folders, I started with
\common.inc\fleet\etc. etc
\common.inc\models\USRA_DS_Boxcars\etc., etc.

but after a while I came to realize there would be problems when two different people released .s files of the same locomotive or car as well as two different people distributing include files for the same model. So now I use this structure:

\Common.Inc\Fleet\DHNelson\Std_Type_D_Coupler_Generic_Draft_Gear.inc
\Common.Inc\Models\Tim_Muir\USRA_DS_Boxcar

That solves both problems.

As for payware, this example:
\Common.Inc\Models\BLW\SD9_BLW_Payware

#5 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,447
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 25 October 2021 - 02:13 PM

One other OR format style should be mentioned. It is relative easy to do, an introduction to the more sophisticated and detailed methods already outlined. It does not alter the MSTS engine file...which remains intact in the parent folder. You simply add an OpenRails folder in the locomotive parent folder -- think of it as just another folder like the CabView and Sound folders found there. In that folder is an "include" engine file that introduces ORTS specific parameters and physics that are used in preference to those found in the MSTS engine file.

To answer your question:

Quote

They will run in Open Rails but do they have any adverse effect on running Open Rails? Should this format of .eng file be used?

No, they do not have any adverse effect on running Open Rails...they have an enhanced effect of introducing more realistic behavior to the simulation. ....And, No you do not have to use any of these OR style engine formats...OR will run the MSTS style engine files-- it generally does a decent job of it. However, the simulation will display more of a game like behavior instead of a true simulation.

include ( "..\\UP_SD70M_4348.eng" )
Wagon (
    Mass ( 183.025t )
    include ( "..\\..\\..\\..\\..\\Common.inc\\Locomotives\\Couplers\\Std_TypeF_TIGHT_Coupler.inc" )
    include ( "..\\..\\..\\..\\..\\Common.inc\\Locomotives\\Brakes\\Std_Loco_Brakes.inc" )
    ORTSAdhesion ( ORTSCurtius_Kniffler ( 6.727 27.695 0.161 0.7 ) )
    ORTSAdhesion ( ORTSSlipWarningThreshold ( 62 ) )
    ORTSNumberAxles ( 0 )
    ORTSBearingType ( Low )
    ORTSDavis_A ( 1780.35 )
    ORTSDavis_B ( 40.1447 )
    ORTSDavis_C ( 8.222643 )
    ORTSWagonFrontalArea ( 153.92ft^2 )
    Comment( == Assumptions -Locomotive diesel/electric - speed - 65mph (105km/h), Low Torque Bearing, 6 axles, frontal area - 14.3m2, Wagon Weight - 183.0 ton (metric), Drag 1.0 == )
)
Engine (
    Effects (
    	DieselSpecialEffects (
    		Exhaust1 (
    		0 4.6 1
    		0 1 0
    		0.23
    		)
    	)
    )
    ORTSDriveWheelWeight ( 183.025t )
    ORTSNumberDriveAxles ( 6 )
    include ( "..\\..\\..\\..\\..\\Common.inc\\Locomotives\\Std_EngV3_SD70M.inc" )
    include ( "..\\..\\..\\..\\..\\Common.inc\\Locomotives\\Brakes\\Dynamic\\SD70M_183t_DynBrakes.inc" )
)

Think of this line in the above file -- include ( "..\\..\\..\\..\\..\\Common.inc\\ -- the same as a path line to the Common.Snd or Common.Cab folders in the Trainset. The common.inc folder resides alongside these other two folders and is the repository for all the common files OR will use. If you notice you'll find these same lines in all the other examples. The only difference is that they are pointing to different levels above the parent folder.

#6 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 949
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 25 October 2021 - 10:30 PM

Ezt I am using this solution for now without include lines. This makes it possible to retain the unique characteristics of a given locomotive. Eg smoke or individual engine settings according to vehicle wear.
Your solution allows you to have certain items that are definitely the same in a file.
This is a very excellent compromise.

#7 User is offline   Genma Saotome 

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

Posted 25 October 2021 - 10:58 PM

This .eng file keeps stuff like smoke in the .eng instead of a .inc file so it can be customized, locomotive by locomotive. Also note the extensive comments at the end.
SIMISA@@@@@@@@@@JINX0D0t______

Wagon ( S-2_SP_1300db
	WagonShape ( S-2_SP_1300db.s )

	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Fixed_Specs.inc"  )
	Include ( "..\\Common.Inc\\Fleet\\DHNelson\\Std_Late_Steam_Era_Diesel_Switcher_Coupler.inc"  )
	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Weight.inc"  )
	Include ( "..\\Common.Inc\\Fleet\\DHNelson\\Std_Early_Road_Diesel_Independant_AB_Brake.inc" )
	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Lights.inc"  )
	Sound ( ALS4eng.sms )
)
Engine ( S-2_SP_1300db
	Effects (
		DieselSpecialEffects
		(
			Exhaust1
			(
				-0.33 4.58 -0.89
				0 1 0
				.1
			)
		)
	)
	DieselSmokeEffectInitialMagnitude( 1 )
	DieselSmokeEffectMaxMagnitude( 2 )
	DieselSmokeEffectInitialSmokeRate( 1 )
	DieselSmokeEffectMaxSmokeRate( 4 )

	Wagon ( S-2_SP_1300db )
	CabView ( GenSx-rear.cvf )
	Headout ( 1.6 3.4 -4.9 )

 	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Locomotive_Specs.inc"  )
 	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Locomotive_Controllers.inc"  )
	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Monitors.inc"  )
	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Air_Compressor.inc"  )
	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Brakestand.inc"  )

	EngineBrakesControllerDirectControlExponent( 1 )
 
	Sound ( ALS4cab.sms )
	Name ( "SP S-2 1300 Blk 1943-46" )
	Include ( "..\\Common.Inc\\Models\\Percy_&_Norton\\ALCO_S2\\S2_Text.inc"  )
)

OpenRails (
	ClassificationTags (
		Ownership (
			Railroad ( "Southern Pacific" )
			RailroadInitials ( "SP" )
			Built ( 1947 )
			Retired ( 2011 )
			RRClass ( "Unknown" )
		)
		LocomotiveInfo (
			Builder ( "Alco" ) 
			Usage ( Switching )
			Truck_Configuration ( "4-4 ")
			CommonName ( "S-2" )
		Skins (
			ID ( "SP 1300" )
			Paint ( "Black" )
			PaintApplied ( 1943 )
			PaintReplaced ( 1946 )
		)
	)
)


#8 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,447
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 26 October 2021 - 04:22 PM

Dave is this the extensive comments section at the end?
OpenRails (
        ClassificationTags (
                Ownership (
                        Railroad ( "Southern Pacific" )
                        RailroadInitials ( "SP" )
                        Built ( 1947 )
                        Retired ( 2011 )
                        RRClass ( "Unknown" )
                )
                LocomotiveInfo (
                        Builder ( "Alco" ) 
                        Usage ( Switching )
                        Truck_Configuration ( "4-4 ")
                        CommonName ( "S-2" )
                Skins (
                        ID ( "SP 1300" )
                        Paint ( "Black" )
                        PaintApplied ( 1943 )
                        PaintReplaced ( 1946 )
                )
        )
)


This usage/section is new to me, no actual "Comment" is needed? Does OR give any warnings in the log when it reads all the data after "OpenRails"?
How does OR deal with this?

#9 User is offline   Genma Saotome 

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

Posted 26 October 2021 - 10:33 PM

I forgot what it does but it doesn't stop working. I stuck it into one or two .eng files when I was thinking about what sort of data should be displayed by sprites above your train as well as what sort of tags would be useful in a consist editor. Nobody was interested in doing anything with the idea.

The working alternative I use to get around being blown off is to put some of that information into the Name() field. For this .eng that's whats documented in Skins(). For other models the same sort of information goes into the .eng file and .s file names. For example:
  • CGW_#103A_1955.eng
  • CGW_#103A_1955_Extra.eng
  • CGW_#103A_1955_No_Crew.eng
  • CGW_#103A_1955_Section.eng
  • CGW_#103A_1958.eng
  • CGW_#103A_1958_Extra.eng
  • CGW_#103A_1958_No_Crew.eng
  • CGW_#103A_1958_Section.eng
  • CGW_#103A_1962.eng
  • CGW_#103A_1962_Extra.eng
  • CGW_#103A_1962_No_Crew.eng
  • CGW_#103A_1962_Section.eng


The skins vary with the years cited, the rest of the stuff is flags and invisible crew for a trailing locomotive. I'm of the opinion flags and/or crew should be dealt with in the consist file but there are enough squirlly issues about that file already. As for the various skins, I'd prefer to put a subsitution statement into the .eng file, essentially treating a reskin statement to be handled much like a .fa statement.

#10 User is offline   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,447
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 26 October 2021 - 10:42 PM

That's an intriguing idea...having a "history" ( for want of a better word ) sprite above a locomotive..."Alco S2 built 1947 retired 2011" ... or whatever. I'd think that with all the interest in history -- hereabouts -- there would be some favorable movement towards something like this. Perhaps its' day will come.

  • 3 Pages +
  • 1
  • 2
  • 3
  • 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