Train-Sim.Com
MSTS Activity Design

AI Setup

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #1661

Charter Member · 134 posts

I've seen several threads talking about the setup of an AI engine, but nothing that describes the steps you take to change it from a drivable engine to an AI engine. I would appreciate if someone would post the instructions on how to setup an AI with headlight on, and horn sounds.

Carey
Seaboard Air Line
Tampa - Wildwood

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

RE: AI Setup, yardlimit, May-21-03, 10:23 PM, (1) RE: AI Setup, yardlimit, May-21-03, 10:38 PM, (2) RE: AI Setup, scefhwil, May-22-03, 04:45 AM, (3) RE: AI Setup, Bing, May-22-03, 06:02 PM, (4) RE: AI Setup, Bing, May-23-03, 11:24 AM, (5) RE: AI Setup, yardlimit, May-23-03, 03:53 PM, (6) RE: AI Setup, Bing, May-24-03, 11:53 AM, (7)

Conferences | Topics | Previous Topic | Next Topic

Charter Member · 110 posts

RE: AI Setup

There are several steps:1. There's a document folder on your MSTS CD called MSTS Docs. In it is a text doc called HOW_to_Specify_Lights.The wealth of info here alone will solve the lighting option questions. 2. The usual approach is to the create two copies of the .eng and eng.sms (sound) files for that engine. Then rename them to something like h-enginename.eng and h-enginename.sms.Here is an example of an AI engine file I used in an activity. It runs at night with lights on: SIMISA@@@@@@@@@@JINX0D0t______Wagon ( #GN_E7A_512
comment(ENG file by Chris Lee 12/26/01)
Type ( Engine )
WagonShape (GN_E7A_512.s )

comment( real: 10ft+3in 15ft+5in 73ft+2in )
Size ( 3.278m 4.532m 20.6m )
comment( 316k is the maximum )
Mass ( 143.5t )
WheelRadius ( 42in/2 )
InertiaTensor ( Box ( 3.594m 4.431m 21.6m ) )
Coupling (
Type ( Automatic )
Spring (
Stiffness ( 1e6N/m 5e6N/m )
Damping ( 1e6N/m 1e6N/m )
Break ( 5.1e7N 5.1e7N )
r0 ( 20cm 30cm )
)
comment( CouplingHasRigidConnection () )
Velocity ( 0.1m/s )
)
Buffers (
Spring (
Stiffness ( 1e6N/m 5e6N/m )
Damping ( 1e6N/m/s 1e6N/m/s )
r0 ( 0m 1e9 )
)
Centre ( 0.5 )
Radius ( 1 )
Angle ( 0.5deg )
) Adheasion ( 0.17 0.33 2 0 )
DerailRailHeight ( 4cm )
DerailRailForce ( 2.5*143.5t )
DerailBufferForce ( 500kN )
NumWheels ( 1 )
Friction (
1692N/m/s 0 .7mph 20.70N/m/s 1.8
5.1N/rad/s 1 -1rad/s 0 1
) BrakeEquipmentType( "Triple_valve, Auxilary_reservoir,
Emergency_brake_reservoir" ) BrakeSystemType( "Air_single_pipe" )
MaxBrakeForce( 43.05kN ) EmergencyBrakeResMaxPressure( 110 )
TripleValveRatio( 2.5 )
MaxReleaseRate( 2.27 )
MaxApplicationRate( 1.717 )
MaxAuxilaryChargingRate( 1 )
EmergencyResCapacity( 2.604 )
EmergencyResChargingRate( 1 )
BrakeCylinderPressureForMaxBrakeBrakeForce( 64 ) IntakePoint ( 3.33 0.4 FuelDiesel ) Lights ( 8
Light (
comment( Sphere of light )
Type ( 1 )
Conditions (
Headlight ( 1 )
Unit ( 2 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
Cycle ( 0 )
FadeIn ( 0.5 )
FadeOut ( 0.5 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( eef9ec95 )
Position ( 0.0 3.3 14.32 )
Transition ( 0.0 )
Radius ( 400.0 )
Angle ( 15.0 )
)
)
)
Light (
comment( Right Front Dim Light )
Type ( 0 )
Conditions (
Headlight ( 0 )
Unit ( 0 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffe4ab )
Position ( -1.191 2.696 9.86 )
Transition ( 0 )
Radius ( 0.3 )
Azimuth ( -45 -45 -45 )
)
)
)
Light (
comment( Left Front Dim Light )
Type ( 0 )
Conditions (
Headlight ( 0 )
Unit ( 0 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffe4ab )
Position ( 1.191 2.696 9.86 )
Transition ( 0 )
Radius ( 0.3 )
Azimuth ( 45 45 45 )
)
)
)
Light (
comment( Head light dim Right)
Type ( 0 )
Conditions (
Headlight ( 1 )
Unit ( 2 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffe4ab )
Position ( -0.07 2.42 10.3 )
Transition ( 0 )
Radius ( 0.4 )
)
)
)
Light (
comment( Head light dim Left)
Type ( 0 )
Conditions (
Headlight ( 1 )
Unit ( 2 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffe4ab )
Position ( 0.07 2.42 10.3 )
Transition ( 0 )
Radius ( 0.4 )
)
)
)

Light (
comment( Upper Head light )
Type ( 0 )
Conditions (
Headlight ( 0 )
Unit ( 0 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffe4ab )
Position ( 0.0 3.13 10.15 )
Transition ( 0 )
Radius ( 1.5 )
)
)
)
Light (
comment( Upper Head light2 )
Type ( 0 )
Conditions (
Headlight ( 0 )
Unit ( 0 )
Service (2 )
Control ( 1 )
TimeOfDay ( 0 )
)
FadeIn ( 0.5 )
FadeOut ( 0.5 )
Cycle ( 0 )
States ( 1
State (
Duration ( 0.0 )
LightColour ( ffffe4ab )
Position ( 0.0 3.13 10.15 )
Transition ( 0 )
Radius ( 1.5 )
)
)
)
) Sound ( "#AI_GenEng2.sms" ))Engine (#GN_E7A_512 Effects
(
DieselSpecialEffects
(
comment
(
the format of these little blocks is as follow: offset.x offset.y offset.z
normal.x normal.y normal.z
width in metres defining the offset from the shape pivot point
where steam / smoke should appear, the direction
it should go and the width of the nozzle
) Exhaust1
(
0.1 4.45 1
0 1 0
0.3
)
Exhaust2
(
0 4.45 -1.4
0 1 0
0.3
)
)
) Wagon ( #GN_E7A_512)
Type ( Diesel )
MaxPower ( 1683kW )
MaxForce ( 235.755kN )
MaxContinuousForce ( 129.888kN )
MaxDieselLevel( 1200gal )
MaxVelocity ( 92mph )
MaxCurrent ( 1800A )
WheelRadius ( 21in )
comment( sanding system is switched off when faster than given velocity )
Sanding ( 29mph )
NumWheels ( 1 )
MaxTemperature ( 120 )
MaxOilPressure ( 90 ) AirBrakesAirCompressorPowerRating( 3.93 )
AirBrakesMainMinResAirPressure( 140 )
AirBrakesMainMaxAirPressure( 130 )
AirBrakesMainResVolume( 11.57 )
AirBrakesAirCompressorWattage( 19000 )
AirBrakesCompressorRestartPressure( 135 )
AirBrakesAirUsedPerPoundsOfBrakePipePressure( 2 )
AirBrakesHasLowPressureTest( 0 )
AirBrakesIsCompressorElectricOrMechanical( 1 ) EngineBrakesControllerMinPressureReduction( 6 )
TrainBrakesControllerMinPressureReduction( 6 )
EngineBrakesControllerHasProportionalBrake( 1 )
EngineBrakesProportionalBrakeLag( 0.9 )
EngineBrakesControllerMaxApplicationRate( 2.667 )
TrainBrakesControllerMaxApplicationRate( 2.667 )
EngineBrakesControllerMaxReleaseRate( 20 )
TrainBrakesControllerMaxReleaseRate( 2.667 )
EngineBrakesControllerEmergencyApplicationRate( 7.7 )
TrainBrakesControllerEmergencyApplicationRate( 7.7 )
EngineBrakesControllerMinSystemPressure( 0 )
TrainBrakesControllerMinSystemPressure( 0 )
EngineBrakesControllerMaxSystemPressure( 90 )
TrainBrakesControllerMaxSystemPressure( 90 )
EngineBrakesControllerEmergencyBrakeTimePenalty( 60 )
TrainBrakesControllerEmergencyBrakeTimePenalty( 60 )
EngineBrakesControllerFullServicePressureDrop( 26 )
TrainBrakesControllerFullServicePressureDrop( 26 ) BrakesEngineBrakeType( "Air_single_pipe" )
BrakesTrainBrakeType( "Air_single_pipe" )
BrakesEngineControllers( "Independent, Train," ) EngineBrakesControllerDirectControlExponent( 1 )


MaxDieselLevel ( 1200gal )
DieselUsedPerHourAtMaxPower ( 124.5gal )
DieselUsedPerHourAtIdle ( 3.5gal ) DieselSmokeEffectInitialMagnitude( 1.5 )
DieselSmokeEffectMaxMagnitude( 2 )
DieselSmokeEffectInitialSmokeRate( 0.2 )
DieselSmokeEffectMaxSmokeRate( 5 ) DieselEngineIdleRPM( 270 )
DieselEngineMaxRPM( 800 )
DieselEngineSpeedOfMaxTractiveEffort( 27.5mph )
DieselEngineMaxRPMChangeRate( 25 ) DoesHornTriggerBell( 0 )

comment( infinate sanding time )
MaxSandingTime( -1 ) EmergencyStopMonitor(
MonitoringDeviceMonitorTimeLimit( 0 )
MonitoringDeviceAlarmTimeLimit( 0 )
MonitoringDevicePenaltyTimeLimit( 0 )
MonitoringDeviceCriticalLevel( 0 )
MonitoringDeviceResetLevel( 0 )
MonitoringDeviceAppliesFullBrake( 0 )
MonitoringDeviceAppliesEmergencyBrake( 1 )
MonitoringDeviceAppliesCutsPower( 1 )
MonitoringDeviceAppliesShutsDownEngine( 0 )
) VigilanceMonitor(
MonitoringDeviceMonitorTimeLimit( 25 )
MonitoringDeviceAlarmTimeLimit( 17 )
MonitoringDevicePenaltyTimeLimit( 0 )
MonitoringDeviceCriticalLevel( 0 )
MonitoringDeviceResetLevel( 0 )
MonitoringDeviceAppliesFullBrake( 1 )
MonitoringDeviceAppliesEmergencyBrake( 0 )
MonitoringDeviceAppliesCutsPower( 0 )
MonitoringDeviceAppliesShutsDownEngine( 0 )
)

OverspeedMonitor(
MonitoringDeviceMonitorTimeLimit( 0 )
MonitoringDeviceAlarmTimeLimit( 0 )
MonitoringDevicePenaltyTimeLimit( 0 )
MonitoringDeviceCriticalLevel( 76 )
MonitoringDeviceResetLevel( 0.1 )
MonitoringDeviceAppliesFullBrake( 1 )
MonitoringDeviceAppliesEmergencyBrake( 1 )
MonitoringDeviceAppliesCutsPower( 1 )
MonitoringDeviceAppliesShutsDownEngine( 0 )
MonitoringDeviceAlarmTimeBeforeOverSpeed( 5 )
MonitoringDeviceDoesSuppressionReset( 0 )
MonitoringDeviceTriggerOnOverspeed( 70 )
MonitoringDeviceResetOnZeroSpeed( 1 )
MonitoringDeviceResetOnResetButton( 0 )
)

EngineControllers (
Throttle ( 0 1 0.125 0
NumNotches ( 9
Notch ( 0 0 Dummy )
Notch ( 0.125 0 Dummy )
Notch ( 0.25 0 Dummy )
Notch ( 0.375 0 Dummy )
Notch ( 0.5 0 Dummy )
Notch ( 0.625 0 Dummy )
Notch ( 0.75 0 Dummy )
Notch ( 0.875 0 Dummy )
Notch ( 1 0 Dummy )
)
)
Brake_Engine ( 0 1 0.0125 0
NumNotches ( 1
Notch ( 0 1 Dummy )
)
)
Brake_Train ( 0 1 0.0250 0.7
NumNotches ( 5
Notch( 0 1 TrainBrakesControllerReleaseStart )
Notch( 0.2 1 TrainBrakesControllerRunningStart )
Notch( 0.4 1 TrainBrakesControllerSelfLapStart )
Notch( 0.6 1 TrainBrakesControllerApplyStart )
Notch( 0.8 1 TrainBrakesControllerEmergencyStart )
)
)
DirControl ( -1 0 1 1 )
BellToggle( 0 1 0 )
AWS ( 0 1 0 )
Sanding ( 0 1 0 )
Horn ( 0 1 0 )
Wipers ( 0 1 0 )
EmergencyStopResetToggle( 0 1 0 )
EmergencyStopToggle( 0 1 0 )
Vigilance ( 0 1 0 )
Headlights ( 0 0.25 1 2 )
BailOffButton( 0 1 0 )
) comment( fuel_level )
EngineVariables ( 1200 )
comment( non-drv engine)
Skip Sound ( "emc_cab.sms" )
Name ( "#GN_E7A_512" )

)
Notice the unique wagon name. This is how it shows up listed in the consist editor along with the regular engine name. As far as the program execution code is concerned, its just another engine contained within that folder.Notice also that cabview and headout settings are either skipped or eliminated altogether. Why? AI engines don't need them, and there is no point committing memory buffers for them needlessly. It also tips off the program code that no one else will be driving. Notice the engine sound file it points at earlier in the code.Sound ( "#AI_GenEng2.sms" )A unique name again; distinguishing it from the regular engine sms file in the SOUND folder. The AI engine is directed to use this sound folder only, and heres what it looks like:SIMISA@@@@@@@@@@JINX0x1t______
Tr_SMS (

Skip( **** ******************************************* **** )
Skip( **** Copy of Generic Diesel SMS Used for SL 0 **** )
Skip( **** ******************************************* **** )
Skip(**** Put this in AI eng sound folder ****) ScalabiltyGroup( 0
Activation ( ExternalCam () Distance (750) )
Deactivation (CabCam () PassengerCam () Distance (750) )
Volume (1.0)
LoadAllWaves (1)
Streams ( 1
Stream (
Priority ( 6 )
Triggers ( 6 Variable_Trigger ( Speed_Inc_Past 1.0 StartLoop ( 1 File ( "x_emc_ac_eng_1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Inc_Past 5.0 StartLoop ( 1 File ( "x_emc_ai_eng_4.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Inc_Past 5.0 ReleaseLoopRelease () )
Variable_Trigger ( Speed_Dec_Past 4.0 StartLoop ( 1 File ( "x_emc_ac_eng_1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) )
Variable_Trigger ( Speed_Dec_Past 4.0 ReleaseLoopRelease () )
Variable_Trigger ( Speed_Dec_Past 1.0 ReleaseLoopRelease () )
)
VolumeCurve(
SpeedControlled
CurvePoints ( 3
0.0 1.0
10.0 2.0
100.0 2.0
)
Granularity ( 0.05 )
)
)
)
))Not much to it, is there? Thats cause AI engines only are directed to use the scaleabilityGroup 0 settings. Of course; these settings and files can be modified depending on how fancy you want to get.
Real drama is possible if you want to work on it, otherwise the default stuff will do in a pinch. This one has been slightly modfied, but if you compare it with SG group 0 in a generic sms file
you will see that it is not much different.One last little point. Notice this setting in the engine file earlier.Headlights ( 0 0.25 1 2 )The last number is usually 0. Setting it to 2 indicates headlights will be on, if I remember correctly. Be aware though, that the light
settings earlier in the engine code will still have to be modified to get this to behave properly.There is really a lot of threads in this forum that go to great detail on this stuff. Search back further than just current topics.
You will be rewarded. This should get you pointed in the right direction I hope.Best wishes,

Yardlimit

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 110 posts

RE: AI Setup

P.S. With regard to the question about horns. I currently know of no way to get an AI train to sound a horn as it passes. It would have to be able to detect when a player train (or CAM) was within sound range, then trigger a "oneshot" type sound execution. It may yet be possible, but I am not currently aware of a method.

Yardlimit

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 224 posts

RE: AI Setup

1. Use RouteRiter to create non-driveable loco's, it has a autofunction for this so gets it right every time.2. AI's play whatever is setup under ScalibilityGroup( 0 in the .sms refered to in the Wagon () section of the AI's .eng file.3. Can't help re: lights, but the tech doc's is the place to look.4. Check out the current thread in the Sound Forum called "Sounds of other trains" for details on how to get AI horns to play.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 814 posts

RE: AI Setup

Careful of them there lights settings. I just added headlights and non-flashing ditch lights to the AI SD40. When the consist with a SD40 on the point came into view, it had lights all right. One of them was a ball, a regularly shaped sphere, about fifteen scale feet over the loco hood. Very small differences in the position numbers can produce wild results.I also just did AI lights for the default Dash 9, these included flashers and they work like a charm. Tedious and sometimes frustrating work, but when its done correctly it makes for greatly more interesting operation, I think.Now ... if someone will come up with a way to light the number boards with more than a single, round light, I will be happy. Doesn't look right, it works but it is obviously one circular light source, not a fully lighted number board.ANy ideas?Bing

Just say "Yo!".

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 814 posts

RE: AI Setup

The master craftsmen have answered the enquiry: No, there isn't a convincing way to light loco number boards via the conventional light coding methods. Instead, special "reflective" material has to be called in the shape file. That's a bit beyond me at the present time, so I will either drop the idea - or maybe experiment with a second pair of lights. Though that tends to run the Light count up; when it gets to a certain number the MSTS engine will start turning off lights, such as signal lamps, that sort of thing. Better to be able to see the signals. Somewhere around thirty seems to be the magic number, though I wouldn't be surprised if other factors came into play. Factors other than the loco alone, that is. Fascinating stuff.Bing

Just say "Yo!".

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 110 posts

RE: AI Setup

LAST EDITED ON May-23-03 AT 03:54 PM (EDT)

>Careful of them there lights settings. I just added
>headlights and non-flashing ditch lights to the AI SD40.
>When the consist with a SD40 on the point came into view, it
>had lights all right. One of them was a ball, a regularly
>shaped sphere, about fifteen scale feet over the loco hood.
>Very small differences in the position numbers can produce
>wild results.
>>
>Bing You're quite right about this. I once experimented with the Sphere of light feature on an AI train hoping to get some ground reflection.
It produced a phenomenon rolling in front of the train that could only be described as a nuclear blast ground shock wave.
Scairt the crap out of me. I put that idea away for another time.

Yardlimit

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 814 posts

RE: AI Setup

The very first time the AI consist rounded the bend, oncoming towards my cabview, was a "I don't believe what I am seeing, time to clean the eyeglasses or stop drinking so much Columbian Drug Lord coffee ??". It was a totally visible sphere of light, riding along in the air, above the nose of the AI loco. I guessed position might be the problem. That turned out to be true, what impressed me was the dynamic: Small differences in position numbers make a LOT of difference in how the lights appear. Fascinating. Love working with the lights. Not incidentally many of the default cars won't show anything for FRED / EOT flasher, the states are wrong. Adding lights to AI locos is easier than I thought, all I did was follow the excellent tutorial from: http://www.railpage.org.au/steam4me/trainsim/tutorials/index.html - a ton of tutorials there, all useful.Bing

Just say "Yo!".

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | File Library ] Copyright © 2002 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured July 8, 2003. About this archive.