improved dynamic music script so you can add your own music easily.
THIS SCRIPT IS ONLY A TEMPLATE YOU NEED TO ADD YOUR OWN MUSIC ( copyright reasons )
YOU NEED TO ACTIVATE DYNAMIC MUSIC IN GAME OPTIONS IF YOU WANT THIS TO WORK.
Then you get in battle the dynamic music starts
- I installed this addon but i only hear basic battle music, are you scamming me ?
You need to add your own music for that you need to modify script in this part adding to gamedata your own songs in ogg format.
local combat_themes = {
{
"music\\combat\\theme1_part_1",
"music\\combat\\theme1_part_2",
"music\\combat\\theme1_part_3"
},
{
"music\\combat\\theme2_part_1",
"music\\combat\\theme2_part_2",
"music\\combat\\theme2_part_3"
}
}
you need to change it to this and add folder and files to gamedata starting with folder music.
in the end it should look like this
local combat_themes = {
{
"music\\combat\\custom_folder_theme1\\your_custom_song",
"music\\combat\\custom_folder_theme1\\your_custom_song"
},
{
"music\\combat\\custom_folder_theme2\\your_custom_song",
"music\\combat\\custom_folder_theme2\\your_custom_song",
"music\\combat\\custom_folder_theme2\\your_custom_song"
}
}
- Hey but we already got this in original script, why should i use this one ?
i did some improvements so now its work better with independ songs.
how its works you the songs goes in groups called themes ( you need at least two songs in theme and two themes or it will crash ) when first song finish in mid or combat the script will select random track from same theme until you leave completely the combat and music stop, then it will select other theme on random and do same thing.
with this improvements you will not keep hearing same song all the time.
you can check some examples here: Justpaste.it
DOOM and DUSK soundtrack time
I get this error and crash everytime it tries to play my custom musics
FATAL ERROR
[error]Expression : ovi
[error]Function : CSoundRender_Source::LoadWave
[error]File : SoundRender_Source_loader.cpp
[error]Line : 77
[error]Description : Invalid source info:
[error]Arguments : c:/games/stalker anomaly1/bin/..\gamedata\sounds\music\combat\stealth\stealth_music_hunter.ogg
stack trace:
Solved by myself, the musics frequency needs to be at 44100 Hz and at 125-250Kbps bitrate to work, you should add this on description, it's possible to change these properties of any music using Format Factory, this program also tells the current properties too.
So for each theme and it's designed parts i should create in a folder under music\\combat\\ ?
so i add my own music (courtsy of your pastebin link)
and now none of them are even playing
in short
how do i make my own music for the addon?