Set speed?

View previous topic View next topic Go down

Set speed?

Post by call2 on Fri Feb 03, 2017 4:41 pm

Well, there was a request for setting train times, so I thought that I would ask if it was possible to set the trains maximum speed? Mainly for the classes of freight trains where anything between 25mph and 75mph is an allowed top speed, even though the line speed may be higher, would be very useful.

Tony

call2

Posts : 37
Join date : 2011-08-31

Back to top Go down

Re: Set speed?

Post by Glory! koshikii on Fri Feb 03, 2017 8:38 pm

Do you mean speed limits that discriminate different types of trains or an universal speed limit disregarding the tracks'? If the first case, there would have to be some sort of device to differentiate train types, I have no idea on how limits work, but you may need to add a differentiated limit command for freight trains. If you want an universal speed limit, and probably should do it if you use multiple (e.g. passenger and cargo versions) route files, you can set it so with Train.Velocity speedInKph.

Glory! koshikii

Posts : 43
Join date : 2016-06-18
Age : 19
Location : Train-less countryside

Back to top Go down

Re: Set speed?

Post by leezer3 on Fri Feb 03, 2017 10:37 pm

Hmm, a little confused by what you're after Smile

Some thoughts:

  • As noted above, the max speed for a pretrain may be set via Train.Velocity    This however IIRC applies to all AI trains, not just one. Should be relatively easy to set add a command which sets the max speed on a per-train basis, and would likely be able to retain backwards compatibility in this case (The sim generally speaking just ignores or adds an error if an extra parameter is addded)
  • Classification based speed limits for player trains could be added easily enough, but would only apply to new routefiles/ trains, and would probably break backwards compatibility.
  • Assuming a player train, should exceeding these limits be noted in either on-screen or in review messages?


Can certainly do something, just need to figure out exactly what and the best way to do it.

leezer3

Posts : 988
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Set speed?

Post by call2 on Fri Feb 03, 2017 11:33 pm

On NWM there are a lot of train diagrams to drive. Normally, passenger trains run at the indicated line speeds throughout the route. But I have several freight workings where the speed of the train is limited by the type of wagons in the train consist, and it is often easy to exceed the train class speed limit and not be penalised by doing so, (the on-screen messages and review).

A train diagram set speed limit would override any line speed and penalise the driver for exceeding the train class speed limit.

As things stand, train driving is not very prototypical.

Tony

call2

Posts : 37
Join date : 2011-08-31

Back to top Go down

Re: Set speed?

Post by Glory! koshikii on Sat Feb 04, 2017 1:27 am

I see. Well, I have an idea for the old BVE format, specify the train type in extensions.cfg, any arbitrary string, and specify the limit for each type.
Code:
[identifier]
class = classString
id = idString
Code:
Train.ClassVelocity(classString) speedInKph
Train.IdVelocity(idString) speedInKph
much like Route.Aspect and HTML. ID will probably be useful in some cases such as the Tokaido Shinkansen, where the speed limit for older trains is 210 kph, and newer ones 270, mainly because of tilting.
I believe this way will not break compatibility, but it would be implemented more elegantly with the xml format.


Last edited by Glory! koshikii on Sat Feb 04, 2017 1:11 pm; edited 2 times in total (Reason for editing : where to specify?)

Glory! koshikii

Posts : 43
Join date : 2016-06-18
Age : 19
Location : Train-less countryside

Back to top Go down

Re: Set speed?

Post by call2 on Sat Feb 04, 2017 12:51 pm

Don't worry about this anymore. I have used this in the past, in the driveable route file, (for 75mph top speed), and it works ok. I just thought that there might be something that could be done to improve things a little.


With route
.Signal(1) 121
.Signal(2) 121
.Signal(3) 121

call2

Posts : 37
Join date : 2011-08-31

Back to top Go down

Re: Set speed?

Post by leezer3 on Sun Feb 05, 2017 10:13 pm

It's no problem Tony, just something added to the 'list' of stuff that people are after.

A lot of this will have to wait until I rebuild the way trains are defined, which is somewhat in the pipeline. As I see it, we really need three distinct things here:

  • Variable global route speed limits based upon train type.
  • Variable signal aspect speed limits, again based upon train type.
  • A maximum speed for any given train. 



All of these really depend upon the train, where we definitely don't have anywhere appropriate where this sort of stuff could be added at present.
extensions.cfg would be possible, but I don't particularly want to start adding more stuff to it- Bogies were a special-case as there were already several hacks about.

leezer3

Posts : 988
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Set speed?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum