OpenBVE icon indicating copy to clipboard operation
OpenBVE copied to clipboard

[Question And Bug?]Collect some train problems

Open JunmoreHeavyBox opened this issue 2 years ago • 6 comments

Description

Please describe the issue you are experiencing.

  1. ~~When the train jumps to any station, the original Noise of the train is not turned off. The Noise played the second time after the reset is superimposed on the sound of the game started before the reset. Pay attention to the noise volume. To eliminate the original noise, the train has to be derailed, but only to eliminate the noise of the last time. This issue can be a headache for trains that often use change (jump) stations, and the noise gets louder as the trains are reset more often in the game.~~

https://user-images.githubusercontent.com/114210303/195951793-7469b35c-6c27-4b9f-9da2-2b3de89fe025.mp4

  1. ~~The classic problem. In Control Trailer mode (where the driver is not in the power car), it seems that the AI driver is unaware of the wheel skid of the locomotive located at the tail of the train and will only increase the gear of the traction handle to the end. It's not until the AI driver is in the power car that it's aware of the need to consider wheel slippage. I had to use the ReAdhesionDevice to limit traction. Although the ride is uncomfortable, it is a way for the driver to casually top up the traction and still get the train moving. This question is not necessary for Multiple-Unit trains and "trains with good adhesion coefficients and loads". But what good is it going to do? Customize RunInterval trains for the #329 ? I've wanted to bring this up for a long time.~~

  2. ~~Some errors have been found in the use of NotchDescriptions. Master control handle brake position with HoldBrake: There are two unused notches texts between NotchHB and Notch1. Locomotive brake handle: The text that should be Notch0 uses the text of Notch1.~~

<NotchDescriptions>
<Brake /> (EBn-1;HB; ; ;B1;B2;..;Bn-2) Master control handle brake position with HoldBrake
<Brake /> (EBn-1;HB;B1;B2;..;Bn-2) Natural
<LocoBrake /> (B1;B1;B2;..;Bn-1) Locomotive brake handle
<LocoBrake /> (R;B1;B2;..;Bn-1) Natural
</NotchDescriptions>
  1. The classic problem. It's possible to push the AI train with your own car when bored. During the process of pushing, the bogie will drift slowly towards the load.

https://user-images.githubusercontent.com/114210303/196785691-0d769ab0-4409-4aa7-8ca9-1adac921d98d.mp4

  1. I tried to test the windshield function during 2D cab practice, and something went wrong. Regardless of the "Rain" and "Snow" commands on the route, I always saw raindrops and snowflakes all over the panel, and I couldn't get them off with my wipers. 无标题

  2. The Panel is abnormal. I set the 3D cockpit interior space limit, but it actually looks a bit weird... Is it that I can't use it or something else? Incorrect rendering seen in 2D and 3D cab switching, switching to the outside view and then cutting back to the inside view will return to normal. I didn't have an inside model of my train yet, so I didn't bother reproduce the problem.

  3. When the brake is not completely released and the adhesion of the track is too poor. When the train starts, in this case, the speedometer variable of the Animated object of the power car will not rotate for a short time, but in fact, acceleration or dynamic braking is still applied. It looks like a linear metro train constrained by simulated adhesion. Focus on wheels, acceleration and speed.

https://user-images.githubusercontent.com/114210303/195946960-9d6216c6-7b4d-43e0-a043-bd5d19ff2aad.mp4

The question is not obvious and not much is necessary. This is a suggestion.

  1. ~~xml train conversion problems After converting the train to an XML train, there are two LoadingSways in the Car.xml file.~~ The Coupler section works properly in the Train.xml file. However, it does not work in the Car.xml file, which is equivalent to the Coupler section not being set in the ExtensionCFG. The brake handle has an extra notch, which is an unthinking explicit conversion. Simply put, in TrainDAT I have 21 brake Notches, the maximum notch is 20 and the emergency brake is 21. whereas in TrainXML the maximum notch is 21 and the emergency brake is an extra 22. please add a subtraction to the conversion for the brake Notches.

  2. ~~I accidentally tried the shortcut key, something made the game crash. I accidentally used headlights and the game crashed. However, I didn't make headlights. I apply the Windscreen part through the XML sound reference file. When I try to use the wiper, the game will crash.~~

Reproduction

If the issue occurs in multiple routes/ trains, please provide one or two samples. In order to reproduce the issue and debug it, it's helpful to have the following:

Route

Please provide a link to where the route may be downloaded.

Train

Please provide a link to the train may be downloaded.

Logs

Logs may be accessed through the 'Report Problem' button on the bottom left of the screen. Please provide a log, and a crash-log if the game actually crashes.

About the game crash, I tried to use the headlights. CrashHeadLightKey_log.txt CrashHeadLightKey_OpenBVE Crash- 2022.10.13[01.13].log

About the game crash, I tried the wiper in the case of using XML sound reference files. CrashWindSXMLSound_log.txt CrashWindSXMLSound_OpenBVE Crash- 2022.10.12[21.19].log

Related information

  • Windows 7
  • Method of control: keyboard and mouse
  • OpenBVE Version: 1.8.4.2
  • Render: Old (GL 1.2)- GL 3.0 not available

JunmoreHeavyBox avatar Oct 14 '22 22:10 JunmoreHeavyBox

Fixed some of the easier ones of these :) Will try and get the rest sorted over the next few days.

4 may prove to be somewhat of a challenge. Pushing the AI train is (sorta) allowed by the physics systems. If derailments are disabled, I think it'll push in pretty much any situation, and it's at least theoretically valid to do so. Might want a on-screen message if you collide or something, but I'm not sure about going much further.

leezer3 avatar Oct 19 '22 16:10 leezer3

I think the noise issue should now be fixed, we weren't checking whether a CarSound was already playing before re-starting it. Not usually an issue, as most CarSounds are single play (bings etc.), or are stopped / started on a per-frame basis (plugin sounds)

This might have unwanted effects however, so please keep a slight eye on that.

leezer3 avatar Oct 20 '22 11:10 leezer3

I think the notch description code should now be right as well. (a new build will generate in a few minutes)

Will try and look into what's happening with the windscreen later or tomorrow.

leezer3 avatar Oct 20 '22 13:10 leezer3

Issues 1,2,8(1/3),9,10(1/2),11(1/3) have been verified as fixed! (I will remove this.) I may modify the delineation based on actual playtest results.

Some questions

  1. ~~In the daily snapshot I tried to test other issues with my trains and the game crashed. It worked fine in openBVE 1.8.4.2 and earlier. Given that I didn't have any crashes using my collection of trains to verify the problem, it's possible that this is some sort of fault-tolerant failure.~~

  2. This forced me to use pure MotorCar in TrainDAT or other methods to solve this problem, after all the XML MotorCar assignment takes precedence. ~~In TrainXML, a powered car that should make a motor sound has no motor sound if the car is not in the MotorCar index calculated by TrainDAT.~~ But this also led to another problem. In order to get the air brakes to work properly, I had to set the BrakeControlType in TrainDAT to 0 or set BrakeControlSpeed to infinite. I have not tried the BVE5 motor sound...

  3. When the interface size is set to medium, the handle text is not as visible as when the interface size is set to small. The locomotive brake handle text is not visible when the interface size is set to small. ~~The locomotive brake notch description does not seem to take into account the excessive number of characters in the other notch descriptions.~~ NDIssue

  4. ~~The development documentation for NotchDescriptions does not contain a reference list of the relationship between the list positions and the handle notches.~~ (Issue 826)

Logs

JunmoreHeavyBox avatar Oct 20 '22 14:10 JunmoreHeavyBox

Fudge, the MotorSound crash is my fault. Fixed that.

With regards to the XML motor sounds issue, this looks to me to occur if the train.xml is used without a sound.xml Try the latest build and see if that helps. Alternatively, adding a per-car sound.xml file should work around the issue.

Not quite sure exactly what you're doing with the air brakes to mess up the BrakeControl speed at the minute, still thinking about that one.....

leezer3 avatar Oct 20 '22 16:10 leezer3

Motor sound and braking control characteristics follow the indexed arrangement of the power vehicles assigned by calculation in TrainDAT, even in XML trains. I think that's the crux of the matter. I suspect it behaves in such a way that the game indexes XML vehicles and assigns brake controls based on the calculated power cars. It is mentioned in the game as in the event that the train's speed is greater than the train's control speed, these cars are adjusted or refused to use air brakes depending on the type of brake controller of the train. It defaults to having power brake motors for this XML trailer.

What can I do in order to use XML trains? The same index assignment as TrainDAT for powered vehicles would not require any modification. However, I have chosen to set the number of powered vehicles in TrainDAT to the number of vehicles in the train and ignore the trailers. So I either have to make the electric and air brakes work together, or use only the air brakes. The former adjusts the type of control, the latter the speed of the control. I want the number of power car trailers and power car index assignments for XML trains to be based on XML cars, and can ignore the number of TrainDAT vehicles, which might also solve the problem.

I mention something about the Sound[CarIndex].xml you mentioned. See https://github.com/leezer3/OpenBVE/issues/820/#issuecomment-1272625981

JunmoreHeavyBox avatar Oct 20 '22 17:10 JunmoreHeavyBox

In the fix for issue 3 ~~There appears to be some overlap in the handle descriptions tested.~~^1 The disappearance of the notch description for locomotive brakes is no longer limited to the interface size setting. NDBug

~~The train handle type is combined type and uses NotchDescriptions. The game crashes if the brake notch is not in the emergency brake.~~^1

Logs

OpenBVE Crash.log log.txt

JunmoreHeavyBox avatar Oct 31 '22 23:10 JunmoreHeavyBox

@leezer3 I am sorry to disturb you, I have waited for a long time without seeing your response. (some kind of anxiety) I want to fix the daily snapshot error sooner.

JunmoreHeavyBox avatar Nov 05 '22 08:11 JunmoreHeavyBox

It looks like the motors on some XML trains don't make a sound, and the power cars on these trains are a bit far from the driver's car. The problem is not fixed very well... I am not using XMLSound. To start reading here, Some of the comments have been edited, but I don't want to repeat them.

Motor sound and braking control characteristics follow the indexed arrangement of the power vehicles assigned by calculation in TrainDAT, even in XML trains...

If nothing is changed, I would like the XML motor sound to revert to the way it was before the restoration for the time being.

JunmoreHeavyBox avatar Nov 14 '22 07:11 JunmoreHeavyBox

All I've done is to strikethrough the stuff that's been changed. Otherwise it gets really confusing trying to read back through things......

~~It appears to work for me at the minute, which makes me suspect something in the configuration is interacting with something else. Can you please share an example train for which the motor car sounds aren't working as you want?~~

~~Don't really need the actual sound files (can just dump in generics), exterior or anything, just the train.dat, sound.cfg, extensions.cfg and any XMLs.~~

leezer3 avatar Nov 14 '22 13:11 leezer3

OK, try the build from today.

I think I might have got to the bottom of this- If the first motor car was not one set via train.dat, this was confusing matters.

leezer3 avatar Nov 14 '22 14:11 leezer3

Latest nightly build 2022-11-14:

00:15:58  Unsupported motor sound type in XML node Motor
00:15:58  Unsupported motor sound type in XML node Motor
00:15:58  Unsupported motor sound type in XML node Motor
00:15:58  Unsupported motor sound type in XML node Motor
00:15:58  Unsupported motor sound type in XML node Motor
00:15:58  Unsupported motor sound type in XML node Motor

See if this helps repo.zip

Kenny-Hui avatar Nov 15 '22 16:11 Kenny-Hui

I don't understand what tests you had done?

JunmoreHeavyBox avatar Nov 15 '22 21:11 JunmoreHeavyBox

Me?

A large amount of messing around with a rather large train collection.

The basic trouble however is that users do 'unexpected' things, or try to design something different to the initial test case I'd worked up ;) There are large amounts of interacting subsystems, many of which use assumptions calculated on the internal rules of the original train.dat

leezer3 avatar Nov 15 '22 21:11 leezer3

I am asking @Kenny-Hui I don't know what he meant. A sample file and

00:15:58 Unsupported motor sound type in XML node Motor

JunmoreHeavyBox avatar Nov 15 '22 21:11 JunmoreHeavyBox

Having sorted out the motor sound issue, there are still a few things to sort out. In Issue 8 and "The disappearance of the notch description for locomotive brakes" I'm not sure if there's anything else still tied to TrainDAT's pre-calculated power car index...

JunmoreHeavyBox avatar Nov 15 '22 22:11 JunmoreHeavyBox

I am asking @Kenny-Hui I don't know what he meant. A sample file and

00:15:58 Unsupported motor sound type in XML node Motor

I can't get the motor sound to play on an xml train on the latest Nightly Build either and has always worked before, I assumed it's the same bug as yours but maybe it's a separate bug or I just did something wrong?

(I should've also included the actual sound instead of just the xml, but oh well)

Kenny-Hui avatar Nov 16 '22 03:11 Kenny-Hui

My problem here is the same, in the case of using XML sound files.

JunmoreHeavyBox avatar Nov 16 '22 03:11 JunmoreHeavyBox

I tested it and it should be the latest daily build only that has the XMLSound file motor sound fault.

JunmoreHeavyBox avatar Nov 16 '22 04:11 JunmoreHeavyBox

Nope, it's me, try again with the most recent build :(

(Missed the case where XML was being used as a replacement for sound.cfg with a non-default motor car)

FWIW, the sounds themselves aren't really helpful as such and just add extra to what you're uploading. I can replace with generic stuff easily enough, and for testing any specific sound issues, I tend to replace them with a chime or something anyway as that's normally much easier to distinguish.

leezer3 avatar Nov 16 '22 11:11 leezer3

Nope, it's me, try again with the most recent build :(

(Missed the case where XML was being used as a replacement for sound.cfg with a non-default motor car)

FWIW, the sounds themselves aren't really helpful as such and just add extra to what you're uploading. I can replace with generic stuff easily enough, and for testing any specific sound issues, I tend to replace them with a chime or something anyway as that's normally much easier to distinguish.

Thanks, that solves it.

Kenny-Hui avatar Nov 16 '22 17:11 Kenny-Hui

A crash related to TFO. It is normal in the official version.

JunmoreHeavyBox avatar Nov 18 '22 04:11 JunmoreHeavyBox

Fixed, another case of the same issue above....

leezer3 avatar Nov 18 '22 19:11 leezer3

Thanks for the fix!

JunmoreHeavyBox avatar Nov 18 '22 19:11 JunmoreHeavyBox

When the Reverse Consist function is switched on or when Reversed is set to true in the TFO file, the spacing between train cars is incorrect. It looks like the coupler index 0 becomes 1, 1 becomes 2 and so on. The original car coupler index 0 is the default value.

JunmoreHeavyBox avatar Nov 20 '22 10:11 JunmoreHeavyBox

Thanks, fixed.

leezer3 avatar Nov 21 '22 21:11 leezer3

No 7: https://github.com/leezer3/OpenBVE/blob/master/source/TrainManager/Car/CarBase.cs#L1376

The speedometer variable comes from the Percieved Speed which takes into account wheelspin / wheelock, although these are approximated as the original code doesn't really have a rotating wheel concept, just a series of fudges based upon magic numbers.

If you're looking for the absolute speed value, try Speed or Speed[CarIndex] animation variables.

There's nothing which currently takes into account wheelspin directly in terms of wheel rotations. As an approximate fudge with recently added variables, try multiplying the current speed by 100 or so if the Wheelslip variable is 1.

leezer3 avatar Nov 28 '22 13:11 leezer3

I'm so stupid, I didn't think about the If function to determine acceleration thinking very thoroughly. I think question 7 is basically almost.

JunmoreHeavyBox avatar Nov 28 '22 14:11 JunmoreHeavyBox

Value+Delta*If[If[Speed<0,AccelerationMotor<0,AccelerationMotor>0],If[WheelSlip,Speedometer,Speed],Speedometer]/RADIUS
;Replaces the Speedometer variable in wheel spin function.

This is one If function I can think of to detect positive acceleration to solve the rotation problem when the wheel is locked.

However, it is an unsolved mystery(Real world) that the motor still has braking force when the wheels are locked. (Except for linear motors)

JunmoreHeavyBox avatar Nov 28 '22 15:11 JunmoreHeavyBox

Can adding "and wheel is not locked" to the motor deceleration action condition solve the unsolved mystery of electric braking?

And then consider the WheelLock variable? Feedback on panels and plugin. WheelSlip and WheelLock come together as a pair.

JunmoreHeavyBox avatar Dec 01 '22 06:12 JunmoreHeavyBox