'Random' activities

General MSTS related discussion that doesn't really fit into any of the other specific forums.

Moderator: Moderators

User avatar
tialho
Established Forum Member
Posts: 312
Joined: Tue Mar 04, 2003 10:45 pm
Location: Swindon

'Random' activities

Post 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.
User avatar
salopiangrowler
Very Active Forum Member
Posts: 7796
Joined: Mon Aug 12, 2002 8:56 pm
Location: Shrewsbury
Contact:

Post 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
Image
Lad491
Very Active Forum Member
Posts: 10013
Joined: Mon Aug 11, 2003 9:25 pm
Location: West Sussex

Post 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 :)
csantucci
Been on the forums for a while
Posts: 101
Joined: Sun Nov 17, 2002 9:31 am

Post 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
User avatar
laurie_heath
Been on the forums for a while
Posts: 149
Joined: Sun Jun 06, 2004 7:47 am
Location: Kingston-Upon-Thames

Post 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.
csantucci
Been on the forums for a while
Posts: 101
Joined: Sun Nov 17, 2002 9:31 am

Post 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!!!! :angel: :angel: :angel:

Carlo
User avatar
ForburyLion
Very Active Forum Member
Posts: 1225
Joined: Fri Jun 14, 2002 7:30 pm
Location: Reading

Post 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.
User avatar
johndibben
Bletchley Park:home of first programmable computer
Posts: 14007
Joined: Mon Dec 03, 2001 12:00 am
Location: Bletchley

Post by johndibben »

An excellent idea if possible.

Would give MSTS a new life.

Cheers

John
User avatar
tialho
Established Forum Member
Posts: 312
Joined: Tue Mar 04, 2003 10:45 pm
Location: Swindon

Post 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
User avatar
johndibben
Bletchley Park:home of first programmable computer
Posts: 14007
Joined: Mon Dec 03, 2001 12:00 am
Location: Bletchley

Post by johndibben »

Sounds very promising.

Could revolutionise MSTS if it works.

Cheers

John
Lad491
Very Active Forum Member
Posts: 10013
Joined: Mon Aug 11, 2003 9:25 pm
Location: West Sussex

Post 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.
User avatar
Baily9531
Very Active Forum Member
Posts: 2474
Joined: Sun Nov 17, 2002 4:09 pm
Location: Wales/Chester/Bury
Contact:

Post 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 :lol:
Restoring D8233 & D5705
http://www.d8233.org.uk
Image
User avatar
jbilton
Very Active Forum Member
Posts: 19267
Joined: Fri Oct 10, 2003 12:08 pm
Location: At home ..waiting to go to Work.
Contact:

Post by jbilton »

Baily9531 wrote: and also funny when you expect a 47 and get an 03 :lol:
And difficult to keep time..... :lol:


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
------------------------Supporting whats good in the British community------------------------
Image
csantucci
Been on the forums for a while
Posts: 101
Joined: Sun Nov 17, 2002 9:31 am

Post 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
User avatar
tialho
Established Forum Member
Posts: 312
Joined: Tue Mar 04, 2003 10:45 pm
Location: Swindon

Post 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
Locked

Return to “[MSTS1] General MSTS Discussion”