Mark Wedel | 18 Jun 2012 09:01
Favicon

redoing sound


  This is mostly just a capturing of what was discussed on IRC - this is mostly 
a record of what was discussed just so there is a record.

  The basic problem is that the sound logic is mostly hard coded into the 
server, so adding a new sound is not a trivial matter - this attempts to fix 
that.  Note that this does not 100% of cases for sound, but hopefully gets 90%. 
  The other 10% are probably getting into fairly specific situations which are 
hard to generalize, and could be done with plugin scripts.

== Server/Arch sound definition ==

  Sounds we be specified in the archetype/object, in the format of:

sound <event type> <chance> <volume> <range> <name1>...<name n>

Multiple sound lines could be specified for different events.  If the same event 
is specified, the new line overrides the old one (this would typically be used 
in cases where an objects is overriding the archetype value)

  <event type> would match the events in plugin.h.  This keeps things simpler, 
as the different events are already defined, and also makes it easier to code as 
one knows where to look for the different events.  Only the events that 
correspond to objects could be specified - not sure what, if anything, to do for 
global events.  Note that a special event type like 'continuous' probably needs 
to be added for objects that constantly make sound, like fountains.

<chance> is the chance to play a sound when the event is triggered, in 
percentage.  If an object sets this to 0, that is basically saying to clear the 
event.  This can mostly be used to control the amount of sound - as an example, 
(Continue reading)


Gmane