BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Door Speed in Openbve

4 posters

Go down

Door Speed in Openbve Empty Door Speed in Openbve

Post by miguelbreis009 Sun Mar 21, 2021 5:56 pm

i was wondering if there is a way to change the door opening and closing speed of a train in openbve i have a couple of train and their doors take some time to close

those trains have a door chime that sound a long single tone note and closes the door but the doors close while the chime is still playing
but they should close after the chime and they close quite slowly if someone can help me find where i can change the door speed i would be grateful

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Re: Door Speed in Openbve

Post by graymac Sun Mar 21, 2021 7:13 pm

try adjusting the duration of the door sound files, that has a bearing on the operation. Experiment using a free sound editor like "Audacity".
graymac
graymac

Posts : 2127
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Door Speed in Openbve Empty Re: Door Speed in Openbve

Post by miguelbreis009 Sun Mar 21, 2021 7:48 pm

nah that wont work becouse i have another train with the same door sound and this train's door closes a lot faster but i will tray it anyways

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Door Speed in Openbve

Post by miguelbreis009 Sun Mar 21, 2021 7:58 pm

I tried what you have said to no results at all the door still opens and closes at the same speed one thing that i noticed on the sound folder of the train is that there is a sound file entitled "Doorclss"

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Re: Door Speed in Openbve

Post by leezer3 Sun Mar 21, 2021 8:09 pm

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

To be exact:
If Close Left and Close Right are specified, the door closing speed is determined by the average of the two file lengths.
If only Close Left or Close Right is specified, then the door closing speed is determined by the present file length.

A similar pattern applies for the opening speed.

(I'm presuming this must replicate BVE4 behaviour, will add it to the documentation in a second)


My suspicion is that you've got both a Left and Right defined, and are getting caught out by the averaging Smile

leezer3

Posts : 1785
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Door Speed in Openbve Empty Door Speed in Openbve

Post by miguelbreis009 Sun Mar 21, 2021 8:23 pm

Sorry but i didint understand what you said
and the github link with that page full of coding i didint understand tha either becouse i am not a developer

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Re: Door Speed in Openbve

Post by leezer3 Sun Mar 21, 2021 8:41 pm

In the sound.cfg file, you have two entries for the door open / close sounds.
Open Left
Open Right


If BOTH are present, add the length (duration) of these two files together.
Then, divide this by two.
This gives you the length of time in which the doors open / close.

If ONE is present, the length of time in which the doors open / close is the length of this file.

If NEITHER are present, the doors take 0.8s to open / close.

I can't make it any simpler than that.

leezer3

Posts : 1785
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Door Speed in Openbve Empty Door Speed in Openbve

Post by miguelbreis009 Sun Mar 21, 2021 8:45 pm

oh now i get it

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Door Speed in Openbve

Post by miguelbreis009 Sun Mar 21, 2021 8:52 pm

ok i added both opening and closing sound times togheter and the result is 5 seconds now how this helps me?
the sound file is in this format

[Door]
Open Left = Som\DoorOpn.wav
Open Right = Som\DoorOpn.wav
Close Left = Som\DoorCls.wav
Close Right = Som\DoorCls.wav

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Re: Door Speed in Openbve

Post by SP1900 Sun Mar 21, 2021 9:46 pm

There are methods to allow much smoother door animations but you need to understand how .animated files work to be able to create formulas for more realistic animations. You will need to study the openBVE developer documentation on .animated files
SP1900
SP1900

Posts : 259
Join date : 2017-12-08
Age : 19
Location : Cambridge, England

Back to top Go down

Door Speed in Openbve Empty Hello SP1900

Post by miguelbreis009 Sun Mar 21, 2021 10:37 pm

hi did you got an email that i sent through the forum you asking for a legacy A stock model for openbve i found an old post that was deleted from the forum i found it on wayback machine i thougt that you might have it so i sent an email also do you have the D stock Beta from the download section

miguelbreis009

Posts : 18
Join date : 2021-03-17
Location : Brazil

Back to top Go down

Door Speed in Openbve Empty Re: Door Speed in Openbve

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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