Custom Music

Hey Everyone,
Im new to DayZ Mod and am slowly getting used to all the different files, I eager to learn and would appreciate some help/advice.
First, would anyone be able to point me to some basic guide/reading material regarding dayz mod file structure and tools that i might need to edit.
Second, Just for fun, Would it be possible to add custom .ogg music playlists to dayz via scroll menu? ie, more then just one song. Just for learning purposes you see :)
Oh and im running dayz mod 1.8.2 with dayzcc, iv got a few scripts installed, DZAI, fire dance.
Thank you in advance for any help you can offer me.
Dave
 
i believe i have added music to my server, i havent scripted in over a year, but let me see what i can find for you, i think i did it so that i can play what i wanted while in vehicles..

just let me know exactly what you want to do with the music, where do u want to play it..


also what apps do you need, if you have already installed custom scripts then im guesing you have all the necesary progams to do it.. let me know ..i'll try my best to help.
 
Hi deadlokd, and thank you for your reply.

Basicly, I'm just trying to learn how to script and how to sql database works, I dont even know if my dayz server is working properly lol. What I was trying to do was to add a custom scroll wheel menu with a "Jukebox" in the menu and a list of music to play. but once the music starts you cant stop it the play the next track. if looked all over for help but i think im just outta my depth. I know it not practical to have all that music in my mission.pbo but im doing it just to learn.

Thank you in advance for any help you can offer me.

P.s I have the ESS - Enhanced Spawn Selection Script installed, and no matter how i instll the server or the ess script, when i spawn certan skins\models once i log out and in again im bk to the default dayz mod suriviver skin/model. n e ideas
 
ok for the music you can do this :)

100% NOT TESTED :p

in description.ext

add this the very bottom

Code:
class CfgMusic
{
tracks[]={};
class Song1
{
name = "";
sound[] = {"music\song1.ogg", db+0, 1.0};
};
class Song2
{
name = "";
sound[] = {"music\song2.ogg", db+10, 1.0};
};
class Song3
{
name = "";
sound[] = {"music\song3.ogg", db+10, 1.0};
};
};

now you must create a folder called music in your mpmission and put your 3 songs in there they must be in ogg format and must be named the same as above (song1.ogg, song2.ogg, etc)


create new file in the music folder called activate.sqf and paste this into it
Code:
while {alive player} do {
player addaction [("<t color=""#FE9A2E"">" + ("Music Menu") + "</t>"),"music\music_menu.sqf","",6,false,true,"",""];
Sleep 2;
};

now create a new file in the music folder called music_menu.sqf and paste this into it
Code:
_EXECscript1 = 'player execVM "%1"';

MusicMenu =
[
["",true],
["Stop Music", [], "", -5, [["expression", format[_EXECscript1,"music\stop.sqf"]]], "1", "1"],
["Play Song 1", [], "", -5, [["expression", format[_EXECscript1,"music\track1.sqf"]]], "1", "1"],
["Play Song 2", [], "", -5, [["expression", format[_EXECscript1,"music\track2.sqf"]]], "1", "1"],
["Play Song 3", [], "", -5, [["expression", format[_EXECscript1,"music\track3.sqf"]]], "1", "1"],
["", [], "", -5, [["expression", ""]], "1", "0"],
["Exit", [20], "", -5, [["expression", ""]], "1", "1"]
];

showCommandingMenu "#USER:MusicMenu";

now create a new file in the music folder called stop.sqf and past this into it
Code:
playMusic "";

now create a new files in the music folder called track1.sqf and paste the following into it
Code:
//Stop any music currently playing
playMusic "";
//wait
sleep 0.1;
//play track
playMusic "Song1";


now create 2 more files called track2.sqf and track3.sqf and paste the same code above in to them but change Song1 to Song2 (for track2.sqf) and Song3 (for track3.sqf)

now open your init.sqf and past this at the bottom
Code:
// Sheeps Music Menu
[] execVM "music\activate.sqf";

now join your game and enjoy your music :)

NOTES/BUGS: im not sure if this will work if you have music volume turned down in the options, also im not sure if it can be heard by others, also not sure if multiple people can play tracks :)

special thanks to Noxsicarius (creator of Admintools 1.9.1) for the menu and activation code :)
 
Hey FallingSheep, Finaly had a chance to try that script of your's and for the most part it works great.
I had to change the activate.sqf code alittle because once in game the script kept adding a new menu to my menu lol so after 1 min i had like 30 menus on my scrool wheel.

"Your activate.sql"
Code:
while {alive player} do {
player addaction [("<t color=""#FE9A2E"">" + ("Music Menu") + "</t>"),"music\music_menu.sqf","",6,false,true,"",""];
Sleep 2;
};
"My activate.sql"
Code:
private["_veh", "_idx"];
Sleep 5;   
_idx = -1;

while {alive player} do {
    if(_idx == -1) then {
        _idx = (vehicle player) addaction [("<t color=""#FE9A2E"">" + ("JukeBox") + "</t>"),"Custom\Mods\Jukebox\Music_Menu.sqf","",6,false,true,"",""];
        _veh = vehicle player;
    };
    if (_veh != vehicle player) then
    {
        _veh removeAction _idx;
        _idx = -1;     
    };
    Sleep 2;
};
The rest of your code worked perfectly.
The only problem I have is that when the in-game music(ambient music) kicks in, It stops playing my music.
Now the only way I have managed to fix this is buy setting up a custom compiles.sqf and removing(commenting out) the line.
Code:
player_music = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_music.sqf";

Only thing now is that I have no ambient music in game.
Is there a way of having both?
For example, When my music is playing it freezes the ambient music and stops it from playing untill my song has finished?

Thank again for all your help

Dave

special thanks to Noxsicarius (creator of Custom-Actions-Menu) for the menu and activation.sql code
https://github.com/noxsicarius/Custom-Actions-Menu/archive/master.zip
 
Hey FallingSheep, Finaly had a chance to try that script of your's and for the most part it works great.
I had to change the activate.sqf code alittle because once in game the script kept adding a new menu to my menu lol so after 1 min i had like 30 menus on my scrool wheel.

"Your activate.sql"
Code:
while {alive player} do {
player addaction [("<t color=""#FE9A2E"">" + ("Music Menu") + "</t>"),"music\music_menu.sqf","",6,false,true,"",""];
Sleep 2;
};
"My activate.sql"
Code:
private["_veh", "_idx"];
Sleep 5;  
_idx = -1;

while {alive player} do {
    if(_idx == -1) then {
        _idx = (vehicle player) addaction [("<t color=""#FE9A2E"">" + ("JukeBox") + "</t>"),"Custom\Mods\Jukebox\Music_Menu.sqf","",6,false,true,"",""];
        _veh = vehicle player;
    };
    if (_veh != vehicle player) then
    {
        _veh removeAction _idx;
        _idx = -1;    
    };
    Sleep 2;
};
The rest of your code worked perfectly.
The only problem I have is that when the in-game music(ambient music) kicks in, It stops playing my music.
Now the only way I have managed to fix this is buy setting up a custom compiles.sqf and removing(commenting out) the line.
Code:
player_music = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_music.sqf";

Only thing now is that I have no ambient music in game.
Is there a way of having both?
For example, When my music is playing it freezes the ambient music and stops it from playing untill my song has finished?

Thank again for all your help

Dave

special thanks to Noxsicarius (creator of Custom-Actions-Menu) for the menu and activation.sql code
https://github.com/noxsicarius/Custom-Actions-Menu/archive/master.zip
hmm not sure ill mess around with changing the other sound functions and see if i can get it to work
 
Hey FallingSheep and Vampire, Thanx for the reply. I have managed to get my jukebox all working now. it was just for a laugh and to see if I could do it :) Still learning.
 
Back
Top