When implementing the mod, it will need to change a few base files, controlstab.lua, newtaskbar.lua & uisettings.lua ( these are in ui/newui ), localedat.lua ( in the locale folder ), and keybindings.dat ( in english/scripts ).
To add different languages to the musicplayer, you will need to create the language folder in 'locale' and copy from the english folder the musicplayer.dat and scripts folder to the new language folder, then just translate what it in the musicplayer.dat file.
To add music, first the songs will need to be in wav format. They can be placed in any folder, but preferred in 'sound/music/<folder_name>/'. The songs can not have spaces and can only contain letters, numbers or _ (unsure about other characters, but best not to use them to be safe)
Next you will need to create a file in 'scripts/music' ( for example 'macros.lua' )
the format of the file is as follows
shortname = "" --eg 'default'
longname = "" --eg 'Default Soundtrack'
playlist = nil
name = "", -- eg HW1_Amb01 ( Spaces can exist )
path = "Data:<path_to_file>/<filename>", -- No extension (.wav) eg sound/music/ambient/a01_mission1
minute = 3, -- The minutes the track goes for
second = 5, -- The seconds the track goes for ( This track goes for 3minutes and 5seconds)
-- This isn't required, but allows different battle tracks ( can add multiple times for multiple tracks )
AddBattleMusic( "<shortname>","<long name>","<path & filename>" )
--eg AddBattleMusic( "default","Default Battle Music","data:sound/music/battle/battle_01" )
-- Only add once
AddPlaylist( shortname,longname,playlist )
-- So the game will load this playlist and not the default one
SetPlaylist( shortname )
You can look at 'scripts/music/default.lua' for an example of a playlist
A few features of this musicplayer
. Can select from multiple playlists
. Can change the battle music
. Can use the music keys on your keyboard
A few bugs
. If set to not play battlemusic, when a battle occurs, it will go quiet
. In the controls menu, the music keys (Prev, Next, Play/Stop) appear as letters ( This is a game issue and not a mod issue )
. While the musicplayers options menu can be dragged around the screen, it will reset to it default position on changing playlists or starting a new game