How To Animate An Electric Loco (And Make Parts Move Using The P Key): Section 7
by Paul DeVerter

A Port City Car Co. Project Copyright © 2005

SECTION 7 - The Engine File

The typical engine file is 6 or 7 pages long. It includes sections on lights, engine power, air brakes for the train and for the engine, engine controllers, a description, and an operating procedure. Further, you must have Sound and Cabview Folders. I believe that the TSM default electric eng file is designed for the Acela locomotive.

Compare this to the wagon file for a passenger or freight car. It is often only one page long and does not require any additional Folders.

If we were building a powered animated electric locomotive, such as the Crane, or the Linecar, then we would need a full eng file. There are a number of changes we would make, such as changing the type of coupling, changing the brakes and their values, removing the emergency monitoring, etc. But we would still need a fairly complete eng file. However, if we are building a non-powered side dump gondola, and are only using the electric locomotive because it has a P key which we can use to animate the object, then we have a lot of stuff in the eng file that is of no use to us. So, what can we eliminate? What can we pare the file down to?"

That is the subject of this Section. I started off with the TSM default eng file for an electric locomotive, and began hacking away at un-necessary portions. I also changed a few items to fit typical North American freight car practice. I ended up with an eng file that is no longer than a short wag file, and was even able to eliminate the Sound and Cabview Folders. And the animation still works, as desired.

Now I know little of the numbers that belong in the parts I have left, so there is probably a lot of tweaking that could be done by an eng file expert. That is to say, I have not adjusted the Mass, Coupling Spring, Brake Charging Rates, and other numbers that are left. I will leave that to someone more knowledgeable than I.

I did make adjustments to MaxPower, and others in that group, by reducing them to zero. When I tried to eliminate these parameters entirely, the file would not load. So, here is the eng file, along with a few comments on what is left in.

	SIMISA@@@@@@@@@@JINX0D0t______
	Wagon ( SideDump7
	Type ( Engine )
	  WagonShape ( SideDump7.s )
		Size  ( 2.85118m 1.28016m 9.144m )
		CentreOfGravity ( 0.0m 0.0m 0.0m )
		Mass ( 90.7t )
		WheelRadius ( 0.5m )
		InertiaTensor ( Box ( 2.85118m 1.28016m 9.144m ) )
		Coupling (
		 Type ( Automatic )
			Spring (
			Stiffness ( 2e7N/m 0  )
			Damping ( 0.2e7N/m/s 0 )
			Break ( 1e7N 0 )
			r0 ( 0.1 1e9 )
		)
		CouplingHasRigidConnection ( 1 )
	 Buffers (
		Spring (
		 Stiffness ( 1e7N/m 0 )
		 Damping ( 1e6N/m/s 0 )
		 r0 ( 0m 1e9 )
		)
		Centre ( 0.5 )
		Radius ( 1 )
		Angle ( 0.5deg )
	 )
	
		comment( guessed brake force )
	 MaxBrakeForce ( 150kN )
	 Adheasion ( 0.2 0.4 2 0 )
	 DerailRailHeight ( 4cm )
	 DerailRailForce ( 230kN )
	 DerailBufferForce ( 200kN )
	 NumWheels ( 8 )
	 Friction (
	 150N/m/s		1		-1mph		0		1
	 5.1N/rad/s		1		-1rad/s		0		1
	 )

	 BrakeEquipmentType( "Handbrake, Triple_valve, Auxilary_reservoir, Emergency_brake_reservoir" )
	 BrakeSystemType( "Air_single_pipe" )
	 MaxBrakeForce( 180kN )
	comment ( added Handbrake does not retard car )
	 MaxHandbrakeForce ( 35kN )
	 EmergencyBrakeResMaxPressure( 110 )
	 TripleValveRatio( 2.5 )
	 MaxReleaseRate( 20 )
	 MaxApplicationRate( 20 )
	 MaxAuxilaryChargingRate( 30 )
	 EmergencyResCapacity( 10 )
	 EmergencyResChargingRate( 30 )
	 BrakeCylinderPressureForMaxBrakeBrakeForce( 70 )
	 )
	
	Engine ( SideDump7
	     Wagon ( SideDump7 )
	     Type ( Electric )
	     MaxPower ( 0kW )
	     MaxForce ( 0kW )
	     MaxContinuousForce ( 0kN )
	     MaxVelocity ( 0mph )
	  MaxCurrent ( 0A )
	     WheelRadius ( 0.5m )
	     NumWheels ( 1 )
	     BrakesEngineBrakeType( "Air_single_pipe"  )
	     BrakesTrainBrakeType( "Air_single_pipe" )
	     BrakesEngineControllers( "Independent, Train" )
	
	 Sound ( "GenFreightWag1.sms" )
	Name ( "SideDumpHopper7" )
	 )
	) 

My sound expert, Chuck Zeiler, tells me that I should substitute "GenPassWagModern.sms" for the Sound in the next to last entry. In truth, you can leave out the whole line, as it is not needed to make the Gondola work.

Notice that the numbers relating to MaxPower through MaxCurrent have all been reduced to zero. These headings must still be there for the eng file to work.

I changed the default BrakeEquipmentTypes, and added the "Handbrake" as well. I then added the lines about "MaxHandBrakeForce" and "NumberOfHandbrakeLeverSteps". This causes the car to turn red when using F9 and double clicking it in the train, but I can not tell that it adds any retarding force to the car, so you may be able to leave these out also.

The Coupler has been changed from Bar to Automatic. The BrakeSystemType has been changed to Air_single_pipe in all three places. The eng sound and wag sound items have been removed, hence there is no need for a dependent Sound Folder. Also the reference to the Cabview is gone, so the Cabview Folder is likewise gone.

All of the items in the EngineControllers section have been removed, and amazingly enough that includes the "PantographToggle1" line. When the car is coupled to an electric engine, the P key still operates to animate the gondola. When the car is uncoupled, it is not animated, but upon recoupling, it again animates. I think this is because the lead locomotive is used by MSTS to control the whole train, even if there are additional locomotives.

Since this is still a locomotive, disguised as a freight car, when you make a consist in Consist Editor, you will find the object in the Electric Locomotives listing, and since it has no Cabview, there is no controller handle in front of the listing.

Lessons Learned

The complexity and extent of the eng file can be considerably reduced, if you are using it solely as a vehicle to animate a freight or passenger car that is not self powered. By doing so, the P key still operates to actuate the animation. The numbers given above are not accurate for a freight car, and need to be adjusted for that sort of physics. I imagine the couplers section likewise needs attention.

Well, that completes this Section. So, we will move on to Section 8 and discuss the Trolley Wheel, and its rotation.