Ok, so all music in Lugdunon (and all audio / image / sprite assets for that matter) are loaded from mods. To add new music will require the creation and installation of a mod, which is fairly straightforward. Mods take the form of .jar files, which are simply .zip archives that follow an expected path structure.
You must provide both .ogg and .mp3 (.mp3 may be changing to .m4a very soon however) versions of your audio files.
An example mod, named 'com.fstltna.music', and consisting of a single music track named 'MyMusicTrack' would be structured like this:
- Code: Select all
META-INF/
MANIFEST.MF
com/
fstltna/
music/
MyMusicTrack.mp3
MyMusicTrack.ogg
mod.json
The
META-INF/MANIFEST.MF file is a plain-text file that must contain the following:
- Code: Select all
Manifest-Version: 1.0
Lugdunon-Asset-Provider: true
The
com/fstltna/music/mod.json file is a plain-text file containing the mod definition in json format, and might look something like this:
- Code: Select all
{
name :"FSTLTNA's Music",
description:"Provides FSTLTNA's musical score in Lugdunon.",
version :"0.0.1",
manifest :{
AUD:
[
{key:"MUSIC.MY.MUSIC.TRACK",def:"com.fstltna.music.MyMusicTrack"},
]
}
}
Once you have created your mod file structure, zip it up, and rename it to com.fstltna.music.jar. You can then place it into your SERVER-ROOT/dat/world/mods/ directory, then edit the SERVER-ROOT/dat/world/etc/mods.json file to add your mod "com.fstltna.music". NOTE: This step will be changing slightly for 0.6.4, and I will update it next week when the release actually goes out.
Once that is done, you should be able to start up your server and play the new music track in game by typing the following into the chat console and hitting enter:
- Code: Select all
/ex game.playMusic("MUSIC.MY.MUSIC.TRACK");
I hope this helps, and tomorrow I will post up instructions on how to make specific tracks play automatically for a give instance.
Cheers,
Chris