Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Adding music to menus in Ryzom Core is a fairly simple exercise. You can define the loading music via the configuration file and you can define music to be played within the UI based upon conditions using action handlers.

Loading Music

There are a number of places where loading music is performed.

Default Loading Music

The default loading music is defined in the configuration file as SoundOutGameMusic and the default file name is "Main Menu Loop.ogg" You can simply replace this file or change the configuration file.

The SoundOutGameMusic configuration variable is a DEV variable - meaning it cannot be overridden when the client is in FINAL_VERSION.

Teleport Loading Music

Within the net_manager.cpp file the teleport loading music is determined via the loading background:

  • TeleportKamiBackground == "Kami Teleport.ogg"
  • TeleportKaravanBackground == "Karavan Teleport.ogg"
  • ResurectKamiBackground or ResurectKaravanBackground == no music.
  • Default == "Loading Music Loop.ogg"

Death Music

While not strictly "loading music" the music that is played when a player dies is always "death.ogg".

UI Music

Steps

  1. Ensure that your music is in Ogg format and available in the Ryzom path for lookup. Typically you would bundle them up in the sound BNPs but that isn't a requirement just a best practice.
  2. Create a new action tag with a handler of play_music_outgame
  3. Set your conditions accordingly.
  4. Set the params attribute with a pipe-delimited value set:
    1. name = the filename of the song
    2. async = 0 or 1, signally the audio mixer whether to stream the song (1) or load the whole song into memory first (0)

An Example

out_v2_appear.xml excerpt
<!-- SELECT SPECIE -->
<proc id="proc_select_specie">
 
        <!-- ... snipped out a lot of UI config -->
 
        <!-- Music playing -->
        <action handler="play_music_outgame"  cond="eq(@UI:TEMP:CHAR3D:PEOPLE,0)" params="name=Character Creation Fyros.ogg|async=1" />
        <action handler="play_music_outgame"  cond="eq(@UI:TEMP:CHAR3D:PEOPLE,1)" params="name=Character Creation Matis.ogg|async=1" />
        <action handler="play_music_outgame"  cond="eq(@UI:TEMP:CHAR3D:PEOPLE,2)" params="name=Character Creation Trykers.ogg|async=1" />
        <action handler="play_music_outgame"  cond="eq(@UI:TEMP:CHAR3D:PEOPLE,3)" params="name=Character Creation Zorai.ogg|async=1" />
</proc>

 

 

Using Commands

You can also play using using NeL commands defined within the client. The music command takes three arguments:

  1. file name
  2. loop (0 or 1)
  3. fade time (in ms)
music test.ogg 0 1000
  • No labels