Clarification of callback 33 (vehicle sound effect)

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 979
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Clarification of callback 33 (vehicle sound effect)

Post by frosch »

This is about clarifying the behaviour of callback 33 (vehicle sound effect).
The specs do not quite define for which vehicles (front engine, articulated part, wagon, secondary engine) the callback is called for each of the effects.

As usual the behaviour of TTDP and OTTD do not agree in all cases, while they agree in some cases in a way which is obviously non-sense :p

Anyway, let's discuss the behaviour for trains. RV should just behave the same as trains, and aircraft and ships are easy anyway (though not neccessarily correct in TTDP/OTTD :p).


Overview: Wrt. TTDP I am confident but not entirely sure I read the source for effects 06 and 09 correctly :)

Code: Select all

Effect                                    | TTDP                                         | OTTD              | Discussion
------------------------------------------|----------------------------------------------|-------------------|-------------
01 Start sound                            | front                                        | front             |
                                          |                                              |                   |
02 Tunnel sound                           | front                                        | front             |
                                          |                                              |                   |
03 Breakdown sound                        | front                                        | front             |
                                          |                                              |                   |
04 Running sound per distance interval    | front                                        | various           | (M)
                                          |                                              |                   |
05 Plane touch down                       | (front)                                      | (front)           |
                                          |                                              |                   |
06 Visual effect generation               | every vehicle that spawns an effect          | front             | (V)
                                          | according to CB10 (not sure)                 |                   |
                                          |                                              |                   |
07 Running sound per time interval        | front                                        | various           | (M)
                                          |                                              |                   |
08 Stopped sound per time interval        | front                                        | various           | (M)
                                          |                                              |                   |
09 Load/unload sound                      | front, each gradual loading step (not sure), | front, instead of | (L)
                                          | independent of payment sound                 | payment sound     |
                                          |                                              |                   |
10 Bridge sound                           | (bridge)                                     | (bridge)          |
General questions:
  1. Did anyone ever use effects (V) and (L), i.e. is there a test GRF out there?
  2. (V) and (L) could be triggered quite often. For (M) there are engine ticks and motion counter to allow the NewGRF to control the sound amount.
    Should there be random bits to play the effect only sometimes?
    Or are vehicle ticks enough?
  3. Some sound effect might benefit from additional info. E.g. visual effect might need the type of visual effect that was spawned.
    So I guess var 10 should be clarified/changed to only use bits 0 to 7 for the sound effect type.
(M) discussion: For which vehicles should moving/idle sounds be called?
  1. Called only for front. (weird for consists with multiple engines, esp. with only cab car in front)
  2. Called for all engines in the consist (independent of powered-ness), not called for articulated parts or rear-heads.
  3. Called for all engines in the consist (independent of powered-ness), including articulated parts and rear-heads.
  4. Called for all vehicles in the consist, including wagons, articulated parts and rear-heads.
(V) discussion: For which vehicles should the visual effect sound be called?
  1. I guess the TTDP behaviour makes sense. Play sound whenever CB10 says to make an effect.
(L) discussion: For which vehicles should the load/unload effect sound be called?
All options include "play independent of/in addition to payment sound".
  1. Called only for front when loading/unloading starts (i.e. not per gradual loading step).
  2. Called for all vehicles (including articulated parts) in the consist whenever they load/unload stuff (i.e. per gradual loading step)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁

Eddi
Tycoon
Tycoon
Posts: 7424
Joined: 17 Jan 2007 00:14

Re: Clarification of callback 33 (vehicle sound effect)

Post by Eddi »

Ad (M):

1 is obviously the easiest thing to do, but it would also be the worst, especially if combining stuff (e.g. use the invisible engine to overcome some GRF restrictions. not that i would condone this kind of approach :)).

i think 4 is the best approach here, allow everything, and let the GRF author decide. problem here is that many (possibly similar) sounds are playing at the same time.
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Clarification of callback 33 (vehicle sound effect)

Post by kyosuke1989 »

(M) discussion: 4. It should be that way. Current behaviour is 1, and personally, i don't like it at all.

And in addition, effect 07 shouldn't be called when consist is waiting on red block signal. Effect 08 should be called instead, of course.

User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Clarification of callback 33 (vehicle sound effect)

Post by kyosuke1989 »

An important addition, i think start sound (01) should be called whenever train starts accelerating from speed = 0. With current behaviour, at a situation when train stops on signal and then accelerates out of it, the sound effect goes directly from 08 to 07. It should go this way instead: 08-> 01-> 07. Currently the effect 01 is called only when departing on station, but not after red signal or manual stopping using red flag.

michael blunck
Tycoon
Tycoon
Posts: 5283
Joined: 27 Apr 2005 07:09
Contact:

Re: Clarification of callback 33 (vehicle sound effect)

Post by michael blunck »

kyosuke1989 wrote:An important addition, i think start sound (01) should be called whenever train starts accelerating from speed = 0. With current behaviour, at a situation when train stops on signal and then accelerates out of it, the sound effect goes directly from 08 to 07. It should go this way instead: 08-> 01-> 07. Currently the effect 01 is called only when departing on station, but not after red signal or manual stopping using red flag.
And that´s correct:
01 Start sound, called when leaving a station or depot [...]
hence your opinion is a misinterpretation.

In DBXL I´m using it exactly as a "train leaving sound".

regards
Michael
Image

User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Clarification of callback 33 (vehicle sound effect)

Post by kyosuke1989 »

In that case, there should be "acceleration sound effect callback", which would be called whenever train starts accelerating from speed = 0.

Eddi
Tycoon
Tycoon
Posts: 7424
Joined: 17 Jan 2007 00:14

Re: Clarification of callback 33 (vehicle sound effect)

Post by Eddi »

or maybe you should check the speed when deciding the sound, so you have a different sound for <=10km/h and >10km/h?
You might not exactly be interested in Ferion, but if you are, have fun :)

Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest