[BETA] Jukebox, just a jukebox. (with some cd's)

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
Samuzero15tlh
Forum Regular
Posts: 253
Joined: Wed Sep 09, 2015 2:21 pm
Location: In home, sweet Home
Clan Tag: <skr>

[BETA] Jukebox, just a jukebox. (with some cd's)

#1

Post by Samuzero15tlh » Thu Jan 18, 2018 2:44 pm

Hello there, happy new year! (WAAAY late i know)

This is a Jukebox. A Music Player, desingned to be used anytime and anywhere. And also be used in any server of your liking.

The main goal of jukebox its to demostrate an example about the Plug-and-Play feature, using wads and pk3, with a better compiler like it is GDCC, i could do this and more.
Not tested on Multiplayer YET.

The jukebox does'nt have any CD-wads, but luckly you can make them to add it on the jukebox! by default int only containd the doom 2 midis by teting. (So use it on doom 2 to see the difference).
Spoiler: How to make your 'cd-wad' (Open)

Code: Select all

///////////////////////////////////////////////
/////You need the GDCC-ACC compiler to do this!/////
///////////////////////////////////////////////

// Aiming format
// N = Name of the song.
// F = File of the song.
// C = Composer/s name.
// A = Album name.
// N[****]  F[****]  C[****]  A[****]

Step 1: Create a new wad archive and store all of the songs, 
	remember to do not duplicate it with other CD-Wads.

Step 2: Go to Jukebox.pk3/source and create a new source file, 
	leave this file here temporally to make it easier, also name it
	at the same name of the album.
	
Step 3: Copy this template and change the folowing values:
///////////////////////////////////////////////////////////////////////////////
	#include "JukeBox.acs"

#define AlbumNAME "A[****]" <<-- Put the name of the Album or CD-Wad here.
#define AlbumNumSongs N <<-- To the number of tracks that it contains this wad.
// for this example, 7 songs here.
str tracks[AlbumNumSongs] = 
{
	"N[++++]  F[++++]  C[++++]", <<-- Follow the same format that it's given up here. //wip
	"N[----]      F[----]      C[----]", <<-- You can take ome distance to keep some order on the adding of the songs.
	//"N[----]      F[----]     ", <<-- This is wrong, at least there it should be a N[],C[],or F[] tags.
	//"N[----]      F[----]F[]    C[][]", <<-- This is also wrong. Only 1 tag is needed to add the music.
	"N[----]      F[----]      C[]", <<-- If you dont know the composer you can leave it like this to set it unknown..
	"N[----]      F[]     C[----]", <<-- It's valid, but not recommended, since youre pointing to the "" file. (No existent file.)
	//"N[----]      F[----]     " <<-- Last one to add, lacks a comma.
}; 

script AlbumNAME OPEN
{
	///.... Engine of the Cd wad, DONT TOUCH IT!
 bool wait = false;
 bool done = false;
 ToLoad++;
 while(done == false && Initialized == false)
  {
   if(AllowAlbums == true)
   {
	for (int i=0; i<AlbumNumSongs; i++)
  	parseSongEntry(StrConcat(tracks[i],AlbumNAME));
	EndOfAlbum();
	done = true;
   }
   else
   {
	  delay(1);
	  if(wait != true && AllowAlbums == true)
	   {
			wait = true;
	   }
   }
  }
}
///////////////////////////////////////////////////////////////////////////////
Step 4: After doing your checks, compile this source-code with the 
		GDCC-ACC compiler

Step 5: Now go to Jukebox.pk3/acs and take the .o archive with the name of the 
	source code file (Or just the name of the album) to the CD-Wad where you
	store the musics for it.
	
Step 6: Remember to make the A_Start & A_End markers, 
	place the .O archive BETWEEN them.
	
Step 7: Create a new entry with the name LoadACS, and inside this file, 
	write the name of the .O archive, (without the .O extension).	
	
Step 8: Save and test it. If something goes wrong repeat the step 3 to the 8.
	
Step 9: If you had no problem with the adobe, then good job! you made a CD-Wad!
	Ready to use in the jukebox!, optionally move the source code to your cd wad.
Spoiler: Here you have some downloadble examples: (Open)
Spoiler: Commands (Open)
  • JkBox_Play: Plays a song from the list.
    If you dont have the list open, using this command will play the same music that you played last time you selected in the list.
  • JkBox_Stop: Silences the music, hearing the quiet and calm silence...
  • JkBox_Toggle: Opens and closes the song and album list.
  • JkBox_Next_Song: Goes to the next song of the list (If you opened the list).");
  • JkBox_Previous_Song: Goes to the previous song of the list (If you opened the list).
  • JkBox_Next_Album: Goes to the next album of the list (If you opened the list).
  • JkBox_Previous_Album: Goes to the previous album of the list (If you opened the list).
  • JkBox_FindNPlay: Find's the album and song specified and plays it!.
    1st param = Num. Album to find.
    2nd param = Num. Song to find.
  • JkBox_showSongs: Shows all of the songs that it contains on a album!
    1st param = Num. Album to check songs.
  • JkBox_showAlbums: Shows all of the albums that it contains the JukeBox!
  • JkBox_Help: Shows this message again :D
So much commands? No worries, here in the jukebox.pk3 includes some key binds (not by default) that it will give you the basic usage of this mod.

So... yeah get the jukebox here! Jukebox.pk3 V1

I dont know if i should place some screenshots. I think that it's not needed right now...

Ps: Sorry for constant submiting and editing, internet gets crazy some times... shit happens.
But yeah see ya later!

Post Reply