Closed enjoysoftware closed 2 years ago
That sounds like a bug will take poke.
I didn't know it was a bug. I'm sorry to write it in an incomprehensible way. Therefore, I change the title.
Now that's really interesting....
OpenBVE never seems to have implemented these. This is from 2016- https://github.com/leezer3/OpenBVE/blob/0d929f4042cfc566c405e0829cd1ddaf67f8b348/openBVE/OpenBve/OldParsers/TrainDatParser.cs#L200 The parser only goes up to the 4th parameter, and ignores everything beyond that. Presumably an oversight from Michelle etc. originally.
When the independant LocoBrake was introduced (not widely used), these two parameter numbers were used to control the loco brake delay. Should be able to sort something out, but it might be a little messy :/
See what you think with today's build.
For the minute, I haven't added this to the hold brake, only manually activated brake applications (as otherwise it wouldn't work at all well IMHO), but open to suggestions if you think it should work differently.
I checked if the electric brake delay works properly on the Keisei Chiba Line on the official website of BVE Trainsim 4. According to train.dat of this train data, the electric brake should be activated 1 second after the brake is activated, but it still did not work properly with OpenBVE.
Hmm...
Reworked the approach slightly, please give it another try.
I've also added a small tweak so that it displays a readme file (if present) when the train.txt isn't missing, which makes the Keisei train look a little better.
The electric brake now works properly! thank you. When I tested, there were still a few bugs in the brakes.
Delay: Ah, I think you're expecting it to keep the previous deceleration when the notch changes for the value of the delay period. Might need a little more twiddling to work in this way..... Probably ought to see what BVE4 does in this regard too.
Air brake: This hasn't been touched (and this code can't affect it as far as I can see). Is this the handle delay in action?
This hasn't been touched
In BVE Trainsim,the air brake operates from the time the handle delay time has elapsed until the electric brake starts operating. I'm sorry for the expressions that are difficult to understand. I am not good at English, so I have to study it harder :) If you thought it difficult to understand what I say , feel free to let me know. In that case, we will send you a comparison video with BVE4.
It's no problem, that's what I thought.
I think we might have a wider issue here, which probably would explain things: Looking a little closer at Mackoy's documentation, it suggests that the delay section should be structured in this order:
On the other hand, OpenBVE has always had this order: https://openbve-project.net/documentation_hugo/en/trains/train_dat.html#delay
Essentially, I think we've always been reading the electric brake delay values into brake delay. This is something I'm not necessarily happy with changing, as most trains designed for OpenBVE are likely to have been written with this bug in mind. A possibility might be to detect the BVE2 / BVE4 header & flip these two values in only this circumstance, but there are plenty of trains with an OpenBVE exterior and an older train.dat version. The other thing is that in most (all?) cases, these values are likely to be very similar, and hence changing them isn't likely to have much effect??
Certainly Mackoy documentation says:
- PowerUp
- PowerDown
- ElectricBrakeUp
- ElectricBrakeDown
- BrakeUp
- BrakeDown
This is the order of the User Interface of BVE Trainsim's Train Editor items, not the order of the train.dat entries. I edited train.dat in the Train Editor for BVE Trainsim and found that entries in train.dat was written like following:
PowerUp PowerDown BrakeUp BrakeDown ElectricBrakeUp ElectricBrakeDown Therefore, it seems to have little impact on other old train data.
Thanks- I'm glad that's not the case :) (This sort of mess is one of the major reasons I'd like to fully complete the XML formats- At least these are 100% clear on what you're editing)
Have sorted the delay when changing up brake notch, but done nothing to the air brake at the minute. Needs more investigation on that one.....
When I tested it again at Keisei Chiba Line, the delay of electric brake worked fine!
Sorry for the late reply. Thank you for setting the electric brake delay in the train editor as well. We will close this issue because it has been resolved. I will open the issue of air brake if needed. I'm really thankful to you.
Description
In BVE2,4, there is an item in train.dat that allows you to set the delay time of the electric brake as shown in the image below. In this setting item, you can set the time from when the brake is applied until the electric brake is activated. However, OpenBVE completely ignores this item. With OpenBVE, the electric brake will start immediately after the brake is applied, resulting in unnatural operation. In the example in this image, the electric brake is activated 0.5 seconds after the brake is applied. Documentation in BVE Trainsim Official Website Can OpenBVE do this?
Route
--
Train
Any trains made for BVE Trainsim
Logs
--
Related information
Any platforms