ainslec / adventuron-issue-tracker

Adventuron Issues Tracker
4 stars 0 forks source link

[FEATURE] Automatic room and object audio #433

Open nww02 opened 3 years ago

nww02 commented 3 years ago

Currently, if the developer names a graphic the same as a location handle, then (unless overridden), the graphic will be displayed when you enter that location.

It would be interesting if you could do the same for audio clips. Currently they all have to start with "incidental" and somesuch, so either you could add "description" or "narration_" which denotes that the audio relates to an object with the same handle.

When a redescribe occurs, and the d(current_location()) is printed, you could play the audio clip. The same could be done for objects when in the layout or when look is called?

However:-

  1. This could get annoying, so you would need to allow for a shorter description to be used when the room is revisited, so maybe a theme setting for audio_room_short_decriptions so that if narration_locationid_short exists, it's used on subsequent revisits (but maybe not 'look').
  2. You would also need audio clips with the same IDs as system_messages, so that when can_not_take is called, and if there's a description_can_not_take audio clip, that's played too.
  3. You'd need to be able to toggle it on and off from within the code, in the same way you can toggle layouts, so you could have it in the theme_settings (say). audio_room_descriptions_enabled audio_object_descriptions_enabled and audio_system_messages_enabled.