ENG and WAG File Structure
Aim - this section describes the structure and layout for Open Rails
Index
Typical Engine and Wagon File Layout
Engine and Wagon Example Templates
Introduction
The example
They are based upon NSWGR standards, which may different functions compared to the system that you are modelling. For example NSWGR used single pipe air brakes, if you need vaccum brake, then you will need to adjust the appropriate sections accordingly.
If you wish to use any of these examples as templates, either cut and paste the text into your working file, or you can right click to download the file and then edit it as appropriate.
For simplicity, there are two configuration methods that can be applied when building a
- BASIC - this type of configuration uses data or information that is readily available from the Internet, and is the simplist form for the user to configure. As there are a number of default values coded into Open Rails, some parameters and values can be excluded from the
ENG andWAG file. Typically it will only contain information that is relatively unique to the stock being modelled. - ADVANCED - this type of configuration uses data that may not be readily available, such as from test reports, etc. This allows the user to cutomise the performance of the rolling stock such that it more closely matches the real life performance of the rolling stock.
Naturally a mix of BASIC and ADVANCED configurations can be used.
It is highly recommended that the section formating shown on this page be used, as this will make it easier to read and check files, especially by other people. Also it will act as a check list to ensure that parameters are not omitted or duplicated in different parts of the file.
Typical Engine and Wagon File Layout
For ease of reading and finding information these files should be structured in a systematic fashion. The following layout structures are suggested as a possible way to structure the sections within the relevant
Wagon (WAG) File
Wagon Section
Engine (ENG) File
The
Wagon Section
Engine Section
Diesel Locomotive
Wagon Section
Engine Section
Wagon File Structure
The various sections of the wagon filke are shown below in each of the boxes. Each box contains the following type of information, which shows what is typically grouped in each of the sections (boxes):
- Section Name - is indicated by the comment statement.
- Included in section - indicates the type of information found in the sectionby the comment statement.
- Example code - provides a representative sample of the parameter statements that may appear in each section. Some of the actual statements may be optional depending upon the type of locomotive, and reference should be made to the links to the detailed information in each section.
- Link - provides a link to a relevant CTN physics page if more detailed information is available.
When building the
- comment statements be used to provide relevant documentation that will allow easy finding and checking of information in the relevant file.
- only parameters known to work in OR are included in the files. This will reduce files sizes, and make it easier to read. Alternatively if it is desired to maintain these parameters in the files, then they should be grouped in a separate section of the file, and claearly commented as such.
Included in this section - Type, Shape, Size, Mass, etc
*********************************************************************************** )
Example Code -
Type ( Engine )
WagonShape ( ctn_test_atlantic.s )
Size ( 3.123m 3.79m 11.859m )
Mass ( 82.21t-uk )
WheelRadius ( 18in )
NumWheels ( 3 )
Sanding ( 25mph )
Comment ( ******************************* Coupler Information *******************************
Included in this section - Type, Spring, Buffer, Velocity, etc
*********************************************************************************** )
Example Code -
Coupling (
Type ( Chain )
Spring (
Stiffness ( 1e4N/m 4.5e6N/m )
Break ( 150kN 150kN ) Comment (0.15MN)
r0 ( 10cm 10cm )
)
)
Link -
Couplers
Comment ( ************************************* Brakes *************************************
Included in this section - Type, Force, Reservoir, Application, Release, etc
********************************************************************************** )
Example Code -
BrakeEquipmentType( "Triple_valve, Auxilary_reservoir, Handbrake" )
BrakeSystemType ( "Air_single_pipe" )
MaxBrakeForce ( 29.413kN ) Comment (Assume weight of 6.3t-uk)
MaxHandbrakeForce ( 7.174kN )
EmergencyResVolumeMultiplier ( 1.0 )
TripleValveRatio ( 2.5 )
MaxReleaseRate ( 50.0 )
MaxApplicationRate ( 50.0 )
MaxAuxilaryChargingRate ( 20.0 )
EmergencyResChargingRate ( 20.0 )
EmergencyResCapacity ( 0.447ft^3 ) Comment (Assume brake cylinder (6in) / auxiliary reservoir (0.447 cu ft))
BrakeCylinderPressureForMaxBrakeBrakeForce ( 50.0 )
BrakePipeVolume ( 0.191ft^3 )
ORTSBrakeShoeFriction ( 0.0 0.5 8.0 0.288 16.1 0.241 24.1 0.211 32.2 0.187 40.2 0.173 48.3 0.161 56.3 0.150 64.4 0.142 72.2 0.139 80.5 0.134 88.5 0.129 96.6 0.125 104.6 0.123 112.7 0.121) Comment (Cast Iron Brakeshoes)
Link -
Air Brakes
Vacuum Brakes
Comment ( *************************** Resistance & SuperElevation ***************************
Included in this section - Wheelbase, gauge, friction, etc
*********************************************************************************** )
Example Code -
Comment ( === Level Resistance === )
ORTSBearingType ( Friction )
Comment( Assumptions - speed - 65mph (105km/h), Friction Bearing, 4 axles, frontal area - 4.23m2, Wagon Weight - 7.31 ton (metric))
ORTSDavis_A ( 580.33 )
ORTSDavis_B ( 4.985 )
ORTSDavis_C ( 0.506712 )
Comment ( === Wind Resistance === )
ORTSWagonFrontalArea ( 62.5ft^2 )
ORTSDavisDragConstant ( 0.0012 )
Comment ( === Curve Resistance === )
CentreOfGravity ( 0m 1.61m 0m )
ORTSTrackGauge ( 2ft 0in )
ORTSRigidWheelbase ( 3ft 1.5in )
ORTSUnbalancedSuperelevation ( 6in )
Comment ( === Trailing Locomotive Resistance === )
ORTSTrailLocomotiveResistanceFactor ( 0.2083 )
Link -
Resistance
Example Code -
Light (
Comment ( Rear Marker Lamp - Left - #1 (AI) )
Type ( 0 )
Conditions (
Control ( 1 )
TimeOfDay ( 2 )
Unit ( 3 )
Service ( 2 )
)
FadeIn ( 1 )
FadeOut ( 1 )
Cycle ( 0 )
States ( 1
State ( 1
Duration ( 0.0 )
LightColour ( 80ff0000 )
Position ( -1.212 3.327 -3.436)
Azimuth ( 180 180 180 )
Transition ( 0.0 )
Radius ( 0.2 )
)
)
)
Link -
Lights
Comment ( ************************* Wagon Visual Effects (If used) *************************
Included in this section - Effect type, etc
********************************************************************************** )
Example Code -
Effects (
SpecialEffects (
Comment ( Wagon Smoke )
WagonSmokeFX (
-1.0485 1.0 2.8
-1 0 0
0.1
)
)
Link -
Wagon Effects
Comment ( ********************** Freight and Load Animations (If used) **********************
Included in this section - Freight Animation information, etc
*********************************************************************************** )
Example Code -
ORTSFreightAnims
(
MSTSFreightAnimEnabled (0)
WagonEmptyWeight(10.0t-uk)
IsGondola(0)
UnloadingStartDelay (5)
FreightAnimContinuous
(
IntakePoint ( 0.0 6.0 FuelWater )
FreightWeightWhenFull(54.13t-uk)
FullAtStart(0)
)
)
Link -
Animation
Comment ( **************************** Passenger View (If used) ****************************
Included in this section - File, Location, Direction, etc
********************************************************************************** )
Example Code -
Inside (
PassengerCabinFile ( BZZ_NG2_OR_JackCar1.s )
PassengerCabinHeadPos ( -0.5 2.0 0.5 )
StartDirection ( 0 35 0 )
RotationLimit ( 35 120 0 )
)
Link -
Comment ( **************************** Wagon Heating (If used) ****************************
Included in this section - Car Temperature set point, heating pipe dimensions, etc
********************************************************************************** )
Example Code -
ORTSHeatingCompartmentTemperatureSet ( 55degF )
ORTSHeatingCompartmentPipeAreaFactor ( 2.0 )
ORTSHeatingWindowDeratingFactor ( 0.25 )
ORTSHeatingTrainPipeOuterDiameter ( 2.75in )
Comment ( **************************** Miscellaneous Information ***************************
Included in this section - Name, Sounds, etc
********************************************************************************** )
Example Code -
Sound ( "../../common.sound/ctn-passenger-bogie/ctn-passenger-bogie.sms" )
Name ( "Burrinjuck - State Car" ) NB: Locomotive names go into the miscellaneous section in the engine section of the file.
ORTSWaterScoopFillElevation ( 3 )
ORTSWaterScoopDepth ( 0.2 )
ORTSWaterScoopWidth ( 0.3 )
Link -
Engine File Structure
Steam Locomotive
Comment ( ************************** Engine Effects **************************
Included in this section - Steam emissions, etc
*********************************************************************** )
Example Code -
Effects (
SteamSpecialEffects (
Comment ( Cylinder - Left/Rear )
CylindersFX (
-1.0485 1.0 2.8
-1 0 0
0.1
)
)
Link -
Steam Effects
Comment ( ************************ General Information ************************
Included in this section - Wheels, sanding, etc
*********************************************************************** )
Example Code -
ORTSSteamLocomotiveType ( Simple )
Type ( Steam )
WheelRadius ( 0.310m )
NumWheels ( 2 )
Sanding ( 20mph )
ORTSDriveWheelWeight ( 12.0t-uk )
IsTenderRequired( 1 )
Link -
Steam Settings
Comment ( ******************************* Boiler *******************************
Included in this section - Length, volume, heating area, pressure, etc
*********************************************************************** )
Example Code -
ORTSSteamBoilerType ( Saturated )
BoilerVolume ( 70.8ft^3 )
ORTSEvaporationArea ( 236.8ft^2 )
MaxBoilerPressure ( 180psi )
Link -
Steam Settings
Comment ( ***************************** Cylinders *****************************
Included in this section - Number, Stroke, Diameter, steam usage, etc
*********************************************************************** )
Example Code -
NumCylinders ( 2 )
CylinderStroke ( 11.1875in )
CylinderDiameter ( 8.875in )
Link -
Steam Settings
Comment ( ********************************* Fire *********************************
Included in this section - Fuel Quality, Grate Area, Shoveling Rate, etc
*********************************************************************** )
Example Code -
ORTSFuelCalorific ( 13700btu/lb )
ORTSGrateArea ( 4.3ft^2 )
SteamFiremanMaxPossibleFiringRate( 3000 )
Link -
Steam Settings
Comment ( ********************************* Fuel *********************************
Included in this section - Coal, water, etc
*********************************************************************** )
Example Code -
MaxTenderCoalMass ( 355lb )
MaxTenderWaterMass ( 3000lb )
Link -
Steam Settings
Comment ( ************************* Gearing (If used) *************************
Included in this section - Gear type, ratio, etc
*********************************************************************** )
Example Code -
ORTSSteamGearType ( Select )
ORTSSteamGearRatio ( 9.0 4.5 ) Comment ( Equivalent to TE 6,600 lbf 13,200 lbf)
ORTSSteamMaxGearPistonRate ( 450 )
Link -
Steam Settings
Comment ( *************************** Brake System ***************************
Included in this section - Compressor, Reservoir, Application rates, etc
*********************************************************************** )
Example Code -
Comment ( == Compressor, Main Reservoir and General == )
AirBrakesMainMaxAirPressure( 105.0 )
AirBrakesCompressorRestartPressure( 90.0 )
AirBrakesMainResVolume ( 9.549ft^3 ) Comment (Assume 1 x 9.549 cu ft main reservoir volume)
ORTSMainResChargingRate ( 0.313 ) Comment (Assume 6.0in Compressor)
ORTSBrakePipeChargingRate ( 40.0 )
Comment ( == Automatic Brake valve - Train == )
TrainBrakesControllerMaxSystemPressure ( 70 )
TrainBrakesControllerMaxReleaseRate ( 1.0 )
TrainBrakesControllerMaxQuickReleaseRate ( 20.0 )
TrainBrakesControllerMaxApplicationRate ( 0.5 )
TrainBrakesControllerEmergencyApplicationRate ( 30.0 )
TrainBrakesControllerFullServicePressureDrop ( 25.0 )
TrainBrakesControllerMinPressureReduction ( 7.0 )
Comment ( == Independent Brake valve - Engine & Tender == )
EngineBrakesControllerMaxSystemPressure ( 70 )
EngineBrakesControllerMaxReleaseRate ( 1.0 )
EngineBrakesControllerMaxQuickReleaseRate ( 20.0 )
EngineBrakesControllerMaxApplicationRate ( 0.5 )
EngineBrakesControllerEmergencyApplicationRate ( 30.0 )
EngineBrakesControllerFullServicePressureDrop ( 25.0 )
EngineBrakesControllerMinPressureReduction ( 7.0 )
Link -
Air Brakes --- Air Brake Controllers
Vacuum Brakes --- Vacuum Brake Controllers
Comment ( ************************** Engine Controls **************************
Included in this section - Controllers for Regulator, Reverser, Brakes, etc
*********************************************************************** )
Example Code -
EngineControllers (
Brake_Engine ( 0 1 0.01 0.25
NumNotches ( 5
Notch( 0.0 0 EngineBrakesControllerReleaseStart )
Notch( 0.25 0 EngineBrakesControllerRunningStart )
Notch( 0.50 0 EngineBrakesControllerHoldStart )
Notch( 0.75 0 EngineBrakesControllerFullServiceStart )
Notch( 1.0 0 EngineBrakesControllerEmergencyStart )
)
)
Link -
Comment ( ********************** Miscellaneous Information *********************
Included in this section - Alternate Views, Sounds, etc
*********************************************************************** )
Example Code -
Sound ( "jack_cab.sms" )
CabView ( jack.cvf )
HeadOut ( 1.0 2.3 -2.0 )
Link -
Comment ( ************************* Stock Description *************************
Included in this section - Stock Description, Operating Procedures, etc
*********************************************************************** )
Example Code -
Description (
"CTN Test Stock Atlantic 4-4-2 - based on PRR Locomotive #5266")
EngineOperatingProcedures (
"To move forward\n"+
"1. Press the W key several times to move the Reverser to full Forward.\n"+
Link -
Diesel Locomotive
Comment ( ********************************* Engine Effects *********************************
Included in this section - Diesel emissions, etc
********************************************************************************** )
Example Code -
Effects (
DieselSpecialEffects (
Comment ( Exhaust1 - Left/Rear )
Exhaust1 (
-1.0485 1.0 2.8
-1 0 0
0.1
)
)
Link -
Comment ( ****************************** General Information *******************************
Included in this section - Wheels, sanding, etc
********************************************************************************** )
Example Code -
Type ( Diesel )
WheelRadius ( 0.310m )
NumWheels ( 2 )
Sanding ( 20mph )
ORTSDriveWheelWeight ( 12.0t-uk )
Link -
Diesel Settings
Comment ( ********************************* Traction Motors *********************************
Included in this section - Information relating to traction motors, etc
********************************************************************************** )
Example Code -
MaxPower ( 1560.0hp )
MaxForce ( 50000lb )
MaxContinuousForce ( 30000lb )
ORTSSpeedOfMaxContinuousForce ( 19.5mph )
MaxVelocity ( 90mph )
MaxCurrent ( 2600A )
Link -
Diesel Settings
Comment ( *************************** Diesel Prime Mover (Engine) ***************************
Included in this section - Information about the diesel engine, etc
*********************************************************************************** )
Example Code -
MaxDieselLevel( 1180g-uk )
MaxTemperature ( 120degF )
MaxOilPressure ( 90 )
DieselUsedPerHourAtMaxPower ( 75.2g-uk )
DieselUsedPerHourAtIdle ( 25.5g-uk )
DieselEngineIdleRPM( 450 )
DieselEngineMaxRPM( 850 )
Link -
Diesel Settings
Comment ( ******************************* Gearing (If used) ********************************
Included in this section - Gear type, ratio, etc
********************************************************************************** )
Example Code -
GearBoxNumberOfGears ( 2 )
GearBoxOperation ( Manual )
Link -
Diesel Settings
Comment ( ********************************** Brake System **********************************
Included in this section - Compressor, Reservoir, Application rates, etc
********************************************************************************** )
Example Code -
Comment ( == Compressor, Main Reservoir and General == )
AirBrakesMainMaxAirPressure( 105.0 )
AirBrakesCompressorRestartPressure( 90.0 )
AirBrakesMainResVolume ( 9.549ft^3 ) Comment (Assume 1 x 9.549 cu ft main reservoir volume)
ORTSMainResChargingRate ( 0.313 ) Comment (Assume 6.0in Compressor)
ORTSBrakePipeChargingRate ( 40.0 )
Comment ( == Automatic Brake valve - Train == )
TrainBrakesControllerMaxSystemPressure ( 70 )
TrainBrakesControllerMaxReleaseRate ( 1.0 )
TrainBrakesControllerMaxQuickReleaseRate ( 20.0 )
TrainBrakesControllerMaxApplicationRate ( 0.5 )
TrainBrakesControllerEmergencyApplicationRate ( 30.0 )
TrainBrakesControllerFullServicePressureDrop ( 25.0 )
TrainBrakesControllerMinPressureReduction ( 7.0 )
Comment ( == Independent Brake valve - Engine & Tender == )
EngineBrakesControllerMaxSystemPressure ( 70 )
EngineBrakesControllerMaxReleaseRate ( 1.0 )
EngineBrakesControllerMaxQuickReleaseRate ( 20.0 )
EngineBrakesControllerMaxApplicationRate ( 0.5 )
EngineBrakesControllerEmergencyApplicationRate ( 30.0 )
EngineBrakesControllerFullServicePressureDrop ( 25.0 )
EngineBrakesControllerMinPressureReduction ( 7.0 )
Link -
Air Brakes --- Air Brake Controllers
Vacuum Brakes --- Vacuum Brake Controllers
Comment ( ********************* Locomotive Monitoring Systems (If used) *********************
Included in this section - Monitoring of Overspeed, Emergency Braking, Vigilance, etc
*********************************************************************************** )
Example Code -
OverspeedMonitor(
MonitoringDeviceMonitorTimeLimit( 0 )
MonitoringDeviceAlarmTimeLimit( 0 )
MonitoringDevicePenaltyTimeLimit( 0 )
Link -
Comment ( ********************************* Engine Controls *********************************
Included in this section - Controllers for Regulator, Reverser, Brakes, etc
*********************************************************************************** )
Example Code -
EngineControllers (
Brake_Engine ( 0 1 0.01 0.25
NumNotches ( 5
Notch( 0.0 0 EngineBrakesControllerReleaseStart )
Notch( 0.25 0 EngineBrakesControllerRunningStart )
Notch( 0.50 0 EngineBrakesControllerHoldStart )
Notch( 0.75 0 EngineBrakesControllerFullServiceStart )
Notch( 1.0 0 EngineBrakesControllerEmergencyStart )
)
)
Link -
Comment ( **************************** Miscellaneous Information ***************************
Included in this section - Alternate Views, Sounds, etc
********************************************************************************** )
Example Code -
Sound ( "jack_cab.sms" )
CabView ( jack.cvf )
HeadOut ( 1.0 2.3 -2.0 )
Link -
Comment ( ******************************* Stock Description ********************************
Included in this section - Stock Description, Operating Procedures, etc
********************************************************************************** )
Example Code -
Description (
"CTN Test Stock Atlantic 4-4-2 - based on PRR Locomotive #5266")
EngineOperatingProcedures (
"To move forward\n"+
"1. Press the W key several times to move the Reverser to full Forward.\n"+
Link -
Include Files
- Separation of MSTS and OR parameters - allows the original
ENG orWAG files to be maintined in a form suitable for operation in MSTS. In this case theINCLUDE will only contain parameters required specifically for OR operation. - Duplication of common elements - allows common elements used on multiple occassions by different rolling stock to be managed from a single file. For example, brakes, or couplers could be specified in a single file, and then inserted into multiple
ENG orWAG files.
To implement an
- Create a folder called << Open Rails >> within the root folder of the route, or the piece of rolling stock that you wish to insert the
INCLUDE file to. It is also possible to create a folder anywhere in the OR file structure to storeINCLUDE files, but in this instance the full path name to the folder would be required. - The
INCLUDE file must have the same name as the file that it is
Engine and Wagon Example Templates
A number of sample locomotives are provided on the Stock page. It should be noted that not all these locomotives may be up to date, and have the latest features, so it suggested that if you are searching for a particular feature as an example, you may need to look at a number of the models on this page to find a recent example.
Simple, Saturated Locomotive
Example - Steam Locomotive - Saturated
Simple, Superheated Locomotive
Example - Steam Locomotive - Superheated
Geared Locomotive
Fixed
Example - Steam Locomotive - Fixed Gear
Selelectable
Example - Steam Locomotive - Selectable Gear
Compound Locomotive
Example - Steam Locomotive - Compound
Steam Locomotive Tender
Example - Steam Locomotive Tender (pick the latest example of a steam locomotive from the stock page)
Passenger Carriage
Freight Wagons
Once the files have been built, make sure that they are tested using some of these performance tests