![]() |
|
|
Activity Editor
After reading some of the forums on using the Activity Editor, it was with some trepidation that webTrainSim, with a new monitor capable of 1024x768 resolution, no longer had an excuse for not trying to create his first activity. After some trial and error, using the AE is not so daunting, but it does take time to create an activity and test it in the real world of MSTS. Sometimes the AE behaves itself and a path you create is where you expect it in MSTS - other times, for an unkown reason, it turn outs to be something different all together. As they say, It's back to the drawing board, on these occasions. webTrainSim began his AE experience with the Modern City Tramway route since it looked fairly straightforward - Piccadilly to Manchester International Airport to Piccadilly on the return line. The first lesson learnt was that you have to work within the constraints of the design of the route. For example, on MCT, one tram seems to want to own the complete section of route from Nunnery Depot to Manchester Airport to Nunnery Depot. On the other hand, it's easy to have plenty of traffic, such as a tram/minute coming towards you. AE's help is quite good, all said and done, and if you follow the steps it lays out, you should get something created. It's only when you attempt to set up more complicated events, such as wanting an AI train to move into a siding while your player train passes it, that problems arise. That's when you refer to the accumulated experience of others on the Train-Sim.com activities forum. Please note this write up is not complete - it's the ramblings of an activity creator apprentice, up to the time of posting on the site. Another page you might want to browse is Creating Paths in the Activity Editor, to read through how webTrainSim has used a method suggested by Kevin Arceneaux (see An Easy Start below). Update 24-Jun-2006: There's a collection of hints and tips on the Activity creation - hints and tips page or look under Activities on the menu at the right. The first timeSo you don't get frightened by the possibility of doing any damage, the best way to start is to aim at creating a new activity for one of the routes installed on your system. At the moment, webTrainSim is trying to create an interesting activity for Modern England, so he's looking at that route now in the Activity Editor. Being a passenger train activity, he's creating plenty of extra services under the Traffic Pattern to make the route busy. Similar thinking (using train of thought would be too obvious a pun) applies to the Modern City Tramway. Click on File/New and you'll be asked to choose a route. Then you'll have to give a couple of names, one for the activity name and another for the activity display name. Do all these things and you'll get a route map loaded in the left-hand side. You might have the Tool Windows open - close it to better see the route. You can open it again if you want from the Window menu. To zoom the route map in/out, hold down the mouse's right button and move the mouse up/down. To move the map around, hold down the left button and you can move in whatever direction you require. Zoom in on the map so that you start seeing red and black dots, and blue and green stripes across the tracks - if you zoom in on a named location with a platform, you'll see these markings. Now you may not see all the icons mentioned above. So go to the Views menu - webTrainSim has got ticks next to these items: Platforms, Platform names, Sidings, Siding names, Signals, Traffic paths, Selected timetable path, Service information.
Let's get back to creating a new activity... the next step is to create a Player Service. What happens when...Click New for a new Player Service - the Service Editor window opens. You're asked to name this service and a title for display in MSTS. You need to start thinking about a scheme for naming your services and to help you focus, you'll see the Service Editor is going to ask you for a consist and a path. So it's probably a good idea to include an abbreviation for the train or loco you're going to be driving and where you're going to/from (e.g., a passenger service) or what you're doing (e.g., shunting). For example, in reference to webTrainSim's activity on Modern England, he's called his Player Service: wDTS-KX-Man-HST to designate a HST Class 43/XPT service from King's Cross to Manchester. The wDTS- prefix tells everybody who is to blame for this unexciting activity! Your next task is to choose a consist. We won't go into using the Consist Editor (a part of AE) so choose something from the drop-down list. Now the Path section. The route you're working with will already have several paths - the route builder will have made some so we can Explore the route. Don't choose a route and edit it! That could have dire consequences for other activities. If there's a path in the list that looks like it might work for your activity, select it and choose to Use as a template. This enables you to name it as you please and make any alterations. Whether you choose to use a selected path as a template or decide you'll make a new path, the Service Editor window closes, you're asked for some names for your path and the Path Editor window opens. If you're using a path as a template, Starting location and Ending location will be filled in. Otherwise, fill these in with names that mean something to you, both now and for the future. Including platform numbers is a good idea and you'll probably need to abbreviate station names (.e.g, King's Cross as KX). Clicking the Highlight button will show up your path in green. The ..prev and ..next buttons enable you to see your path from start to end, one section at a time between points (switches). Note that points along your player's path are shown as green dots. A right-click on one of these pops up a menu with the choice of changing your path: Take other exit. Ticking the Mouse box will lock your mouse to your path when it's near it. Now find where the path begins. It's designated as a blue dot with a green border. Your player's path heads off from this dot. Remember this dot marks the end of your player consist. One of the choices on the popup menu if you right-click on your start point is to change the direction of the path. Sometimes you'll need to tell AE which is the correct direction. Now find the end player dot - it's a blue dot with a red border. A right-click over this dot also gives a popup menu. Clicking Leave path editor lets you save any changes, closes the Path Editor and re-opens the Service Editor. If you're working on a passenger activity, one last job you'll want to do is to tick the stations at which you want to pick up passengers - at least tick the starting and ending stations. Some do'sDo:
Some don'tsDon't:
An easy startHere's one way to get going. Your task is simply to create one or more paths - in any route you want - for driving in Explore mode. Once you've got the idea of creating paths - and spending a bit of time testing them - you've got one skill conquered. webTrainSim uses the following method (adapted from a post by Kevin Arceneaux in the Train-sim.com activity forum):
See the page, Creating Paths in the Activity Editor, to read through how webTrainSim is using this method. AE needs scriptingWhen it's all said and done, what we're trying to do in AE when creating activities is to schedule or create a timetable, i.e. make sure no two things are at the same place at the same time. webTrainSim spent many of his hours, days and weeks to construct school timetables. Regardless of what the Artificial Intelligence people say, a school timetable is one scheduling task that's not possible with a computer program. That's not quite true - it is possible, but all the educational values associated with a balanced timetable that take into account such practicalities as the morning is the best time for maths, are not possible (guess who used to be a maths teacher). As well, there are many other variables that are just too difficult to cope with in a timetabling computer program. As an exercise, webTrainSim did write a program for one school's timetable - it used the brute-force method. In other words, it tried to do what webTrainSim was doing with his little white cards and coloured pins. Scripting in AE to enable us to cope with a wider variety of events seems the only solution to all the different problems that activity creators come across. There are numerous situations where an if this then that construct is required. What we usually do is fiddle with departure times or paths to achieve an objective. The AE already has two of the important variables we'd need in scripting: time and position. It also has a third, the names of trains and consists. Further, scripting is already in MSTS in its definition of a route's signalling system. So what sorts of problems would scripting solve? Off the top of the head, there's the situation where an AI train is due to start at a certain time from a given station but the earlier scheduled one hasn't got far and there's a consequent service placed on top of another error. Another is the optional path problem for single tracks with a passing loop. For those who get this to work, it's more by good fortune than design and it involves much fiddling with the starting time and position of the AI train. In general terms, for traffic intensive passenger train type activities, scripting would enable some general rules to be set for the timetabled trains such that the activity creator could be assured that the timetabled trains wouldn't cause problems between each other. Of course, the AE dispatcher already has some in-built rules, but what activity creation needs is more flexibility in applying these rules and the capability of making new ones. Scheduling is all about considering various conditions and applying some consequent action (gee, that's make it sound so easy... if it were only so in reality).
If ai-train is located here AND
driver-train is located there AND
this-route-section-is-single AND
this-route-section-has-passing-siding-nearby AND
driver-train-priority is greater than ai-train-priority THEN
ai-train goes into this-passing-siding
EndIf
If ai-train is located here at this-time then
ai-train remains in player-view until driver-train is out-of-view
Else
ai-train can be removed from player-view
EndIf
While activity-is-running AND location is KX-platform-16
If ai-train-departure-time is now AND
ai-train-previous location is still here THEN
don't start ai-train yet
Else
start ai-train
EndIf
endDoWhile
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||