Page 1 of 2
'Random' activities
Posted: Tue Aug 01, 2006 10:48 pm
by tialho
I've been following recent threads concerning MSTS limitations / 'wish lists' and had the following idea - I'd try it myself but I'm not sufficiently computer literate!
One of the recurring gripes is that when running an activity, the service pattern is exactly the same every time. My thought is that a utility could be devised to randomise activities by making slight alterations (say +/- 5 minutes) to the timing of AI services within the activity. Mode of operation would be along the following lines:
1. User selects activity to be 'randomised'
2. User selects 'randomisation factors' e.g. +/- 5minutes on AI start times, +/- 5% on AI performence.
3. Utility scans .act file, and modifies AI service start times (numeric values in lines starting 'service definition'). This value is in seconds, so a variation of +/-300 would represent a +/-5 minute variation in start time.
4. Utility scans .act file and modifies AI traffic performance values (numeric values in lines starting 'efficiency') by (say) +/-5% (values are in range 0-1); this would affect performance of AI passenger trains between stations and therefore arrival / departure times.
5. Utility saves randomised .act file (provision to be made for back-up of original .act fiel to be restored at later date).
6. User fires up MSTS and runs activity.
Obviously, this might not work for all activities; single track routes might be particularly sensitive, resulting in 'stand-offs' if service patterns are altered too much. It's also possible that on activities with dense traffic, crashes may be caused by services being superimposed, or too many objects being placed on a tile.
Please add your comments on this proposal; if there is anyone out there with the knowledge to construct such a utility, feel free to have a go! If I have time, I will manually "randomise" an activity or two by manually editing the .act files as detailed above (I'll use a random number generator to amend values) and report back.
Posted: Tue Aug 01, 2006 11:07 pm
by salopiangrowler
The game Engine MSTS was written on doesnt support random senario's within the same activity, hopefully Random Scenaro options will be available in the new Kuju Rail Simulator
Posted: Wed Aug 02, 2006 7:11 am
by Lad491
The only way to do this would be to edit the whole activity, and you risk completely messing it up if you do

I try to include an element of randomisation in my activities, depending on how you drive, by having AI traffic which interacts with the player service. Driving slower will have a different effect than driving faster as you may get blocked, lose time etc. But the same basic problem remains, once youve driven it correctly the first time and maybe a couple of times after, it will always be the same

Where it does score slightly though is that sometimes it will take you two or three goes to arrive on time

Posted: Wed Aug 02, 2006 8:05 am
by csantucci
tialho,
that's an idea I also suggested some time ago on another forum. I also think it could bring much more interest in running activities more than once, and as you probably know, BVE has such a tool. But up to now no software expert has decided to engage himself into such a task...
Carlo
Posted: Wed Aug 02, 2006 5:46 pm
by laurie_heath
I shall look into the feasibility of this and try and try a bit of experimention over the weekend.
I don't promse anything at the moment but will let you know.
Posted: Wed Aug 02, 2006 5:52 pm
by csantucci
laurie_heath wrote:I shall look into the feasibility of this and try and try a bit of experimention over the weekend.
I don't promse anything at the moment but will let you know.
WOW!!!!
Carlo
Posted: Wed Aug 02, 2006 8:09 pm
by ForburyLion
Here's an idea
An activity writer makes say 10 variations of the same activity and someone creates a programe that randomly copies one into the activities section of MSTS replacing the existing file of the same name (Too complicated for me, but it may be possible for those with the skills).
The different activities could include adjusted timings, different weather conditions, different stock etc etc.
Posted: Wed Aug 02, 2006 9:37 pm
by johndibben
An excellent idea if possible.
Would give MSTS a new life.
Cheers
John
Posted: Wed Aug 02, 2006 10:23 pm
by tialho
I've now written a tool in MS Excel to allow rapid calculation of 'randomised' AI traffic start times and performance along the lines I detailed at the top of this thread; with this, it took a couple of minutes to manually edit a typical .act file (45-minute activity, 6 items of AI traffic). I'm going to run this a few times to see the effect - I'll report back on progress!
Cheers
Tim
Posted: Wed Aug 02, 2006 10:34 pm
by johndibben
Sounds very promising.
Could revolutionise MSTS if it works.
Cheers
John
Posted: Thu Aug 03, 2006 12:36 pm
by Lad491
it took a couple of minutes to manually edit a typical .act file (45-minute activity, 6 items of AI traffic).
Not really an adequate test though. Currently im working on a 1:30min activity which has over 50 pieces of AI traffic, all different no repeats, and quite a few more to go as ive only done Southbound traffic, still got Northbound traffic to do, probably 18 - 20 consists/AI services to add.
Since almost every piece involves the train being in a set place at a set time to interact with the player service -especially the northbound services - I dont think it would work - except for very simple activities.
Posted: Thu Aug 03, 2006 1:34 pm
by Baily9531
For me if it could be done, which i dowt, a utiltiy to select a pool of locos from train store, then fire up MSTS and it picks one for you to drive in the selected activity would be good, and also funny when you expect a 47 and get an 03

Posted: Thu Aug 03, 2006 3:32 pm
by jbilton
Baily9531 wrote:
and also funny when you expect a 47 and get an 03

And difficult to keep time.....
Seriously I seem to remember 'Activity Analyser' can alter the time of day ,time of year etc....which is half way there.
It also has an AI service generator, although once written its fixed of course.
Also I think it depends on the type of activity, on TM high speed express activities, often the AI local passing traffic was repeated to cut down on number of consists needed.....and you only see them for around 10 secs.
Cheers
Jon
Posted: Thu Aug 03, 2006 4:25 pm
by csantucci
Well, in my opinion changes with respect to the basic activity should be the same you could find in the real world, that is in principle delays in AI traffic (generated reducing the efficiency level of the services and/or delaying the start hour), more people at platforms than expected which means longer pauses of AI and player train at stations...and I think that could be alreadh quite satisfying.
Changing consists and heavily changing timetable is another thing.
Personally I am not interested in a random generator of activities, but in a generator of random (but usual) events within a well defined activity (and the most interesting activities for me are those that follow an official timetable).
Carlo
Posted: Thu Aug 03, 2006 8:04 pm
by tialho
Not really an adequate test though. Currently im working on a 1:30min activity which has over 50 pieces of AI traffic, all different no repeats, and quite a few more to go as ive only done Southbound traffic, still got Northbound traffic to do, probably 18 - 20 consists/AI services to add.
Since almost every piece involves the train being in a set place at a set time to interact with the player service -especially the northbound services - I dont think it would work - except for very simple activities.
I wasn't aiming at the more complex / challenging activities with this thread (I'm a great admirer of Lad491's work and appreciate the challenge that creating these activities presents - particularly with respect to interaction with AI traffic, having tried and failed on numerous occasions myself!) - rather looking for a way to 'tweak' basic activities to present different challenges, without mucking around with the activity editior.
I've conducted a few tests based on my initial hypothesis above and am experiencing delayed success! Let's just say I'm learning some interesting things about MSTS file architecture, and have now developed an alternative hypothesis on how to achieve activity 'randomisation' - I'll test this tonight before going public again!
Cheers
Tim