Train-Sim.Com
Microsoft Train Simulator

AI Engines - How to build

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 #25332

Member since Sep-28-04 · 8 posts

Hi Guys,Can anyone tell me if there is a format or template or "how to" doc to convert an xyz.eng to xyzAI.eng?I've downloaded several great locos but they didn't come with an xyzAI.eng file.Waiting for all your great info.Tim

Alert | IP

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

RE: AI Engines - How to build, huddy, Oct-28-04, 11:06 AM, (1) RE: AI Engines - How to build, timhardin1, Oct-28-04, 11:15 AM, (2) RE: AI Engines - How to build, yellowdog, Oct-28-04, 12:49 PM, (3) RE: AI Engines - How to build, timhardin1, Oct-28-04, 01:19 PM, (4) RE: AI Engines - How to build, yellowdog, Oct-28-04, 02:39 PM, (5) RE: AI Engines - How to build, Swissie, Oct-28-04, 06:12 PM, (6) RE: AI Engines - How to build, timhardin1, Oct-28-04, 07:16 PM, (7) RE: AI Engines - How to build, yellowdog, Oct-29-04, 11:58 AM, (8) RE: AI Engines - How to build, crstagg, Oct-29-04, 05:11 PM, (9) RE: AI Engines - How to build, Swissie, Oct-29-04, 07:15 PM, (10) RE: AI Engines - How to build, yellowdog, Oct-30-04, 10:51 AM, (11)

Conferences | Topics | Previous Topic | Next Topic

Member since Sep-10-03 · 55 posts

RE: AI Engines - How to build

If you wnat to create an AI engine, I'd reccomend downloading Route-Riter because it has a function for creating a AI engines.

#6 Alan Hudson LB/WR
McGregor Bulldogs

Alert | IP

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

Charter Member · 1848 posts

RE: AI Engines - How to build

To do it manually, copy/paste the .eng file into the appropriate folder (you'll get "Copy of xyz.eng"). Change the name to xyz_ai.eng (or whatever). Then open the ai.eng file in Wordpad (unicode text editor). Search for all "Engine" and "Wagon" entries and add ai to it(in whatever fashion, just make it consistent). Then search for Cabview/Headout and delete both of those lines (Headout may not exist). Then search for Sound and delete the one that ends in *cab.sms. Finally, search for Name and add ai inside the quotes (in whatever fashion you want). Save the file and put the loco in any non-driveable consist position you want! That's the manual way (probably longer than Route-Riter, but apparently Route-Riter has a history of messing other things up when changing locos to AI).

Clayton

Alert | IP

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

Charter Member · 1848 posts

RE: AI Engines - How to build

No problem! Try it out and if you screw it up, just delete the xyz_ai.eng file. It's easy to start over from scratch. Also, note that if you can't overwrite files, or if you have trouble saving as a *.eng, check the original file's properties and un-check "Read Only" if necessary. Good luck!

Clayton

Alert | IP

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

Member since Sep-27-02 · 1321 posts

RE: AI Engines - How to build

LAST EDITED ON Oct-28-04 AT 06:17 PM (EDT)

>To do it manually, copy/paste the .eng file into the
>appropriate folder (you'll get "Copy of xyz.eng"). Change
>the name to xyz_ai.eng (or whatever). Then open the ai.eng
>file in Wordpad (unicode text editor). Search for all
>"Engine" and "Wagon" entries and add ai to it(in whatever
>fashion, just make it consistent). Then search for
>Cabview/Headout and delete both of those lines (Headout may
>not exist). Then search for Sound and delete the one that
>ends in *cab.sms. Finally, search for Name and add ai
>inside the quotes (in whatever fashion you want). Save the
>file and put the loco in any non-driveable consist position
>you want! That's the manual way (probably longer than
>Route-Riter, but apparently Route-Riter has a history of
>messing other things up when changing locos to AI). Hi Tim In addition to what Clayton has - correctly - stated, I recommend that you also take out the entire section starting with EngineControllers ( ... ). Taking out the cabview and head-out alone will not be enough as trains headed by the xyz_ai.eng will still appear in the list of driveable engines in the "select a train" screen. Should you indeed select it, that will cause a fatal crash of MSTS upon loading as there is no cabview... As soon as you also remove the EngineControllers section, MSTS recognizes the AI engine as non-player driveable. See default engines intended to act as AI engines only, such as class 310 steam engine, or the Metroliner motor and the Genesis for the NEC route.

The section in question that needs to be removed usually looks like this (taken from default gp38) EngineControllers (
Throttle ( 0 1 0.125 0 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.0125 0.75
NumNotches ( 5
Notch( 0 0 TrainBrakesControllerReleaseStart )
Notch( 0.3 1 TrainBrakesControllerGraduatedSelfLapLimitedHoldingStart )
Notch( 0.85 0 TrainBrakesControllerSuppressionStart )
Notch( 0.9 0 TrainBrakesControllerContinuousServiceStart )
Notch( 0.95 0 TrainBrakesControllerEmergencyStart )
)
)
Brake_Dynamic ( 0 1 0.11 0
NumNotches ( 10
Notch ( 0 0 Dummy )
Notch ( 0.11 0 Dummy )
Notch ( 0.22 0 Dummy )
Notch ( 0.33 0 Dummy )
Notch ( 0.44 0 Dummy )
Notch ( 0.55 0 Dummy )
Notch ( 0.66 0 Dummy )
Notch ( 0.77 0 Dummy )
Notch ( 0.88 0 Dummy )
Notch ( 1 0 Dummy )
)
)
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 0 )
BailOffButton( 0 1 0 )
)Lukas a.k.a Swissie

Alert | IP

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

Charter Member · 1848 posts

RE: AI Engines - How to build

>take out the entire section starting
>with EngineControllers ( ... ). Taking out the cabview and
>head-out alone will not be enough as trains headed by the
>xyz_ai.eng will still appear in the list of driveable
>engines in the "select a train" screen. I was not aware of this--thanks, Swissie! I guess since I use Conbuilder (which lists locos by their "Name") I never had any trouble placing an AI loco in a driveable position. Do you (or anyone else) know if this section of the ai.eng file negatively affects the performance of MSTS for a properly placed AI locomotive?

Clayton

Alert | IP

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

Member since Sep-27-02 · 1321 posts

RE: AI Engines - How to build

LAST EDITED ON Oct-29-04 AT 07:17 PM (EDT)

Hi Clayton> Do you (or anyone else) know if this section of the ai.eng file negatively affects the performance of MSTS In which respect do you mean? Leaving out the EngineControllers (and engine operating procedures) doesn't harm the .eng performance per se, nor its use either a) as an AI-controlled unit leading a AI train, and/or
b) as trailing engine in any consist (AI or player operated)The only effect is that it has no controlls for the player.On the other hand, the removal of these two lengthy sections in the .eng file makes the file a bit shorter, and some users (especially when running MSTS already near the limit) report a slight improvement in frame rates. There's been a debate about how much of a positive effect that makes, as MSTS seems to only apply simplified physics to AI trains anyways. Another - and sometimes more important - justification for creating an AI version of an engine is that you can have a leaner lights section (remember, MSTS has a limit on the total number of lights it can display, causing dark signals if exceeded), and that you can also have a dedicated AI.sms file with speed-controlled power sounds, so that trailing locos will not just be idling along but will roar by at full throttle when doing 79mph. Uhm, does this sound like another topic or two to dig into? Well, there's a couple of posts regarding these two issues in the fora here, and a tutorial on AI lights over at Yuri's steam4me-site.Lukas a.k.a Swissie

Alert | IP

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

Charter Member · 1848 posts

RE: AI Engines - How to build

Hmm, sounds interesting! The sound stuff I knew about (and I usually just copy/paste AI sounds from the newly released locos rather than trying to create my own). I also knew about the light restrictions, but haven't messed around with creating lighting sections for AI trains. Looks like I'll have to take a glance at the forums over at Yuri's place.

Clayton

Alert | IP


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

Restored from the Train-Sim.Com archive, captured November 22, 2004. About this archive.