Finally got around to trying this out.
Are interlude and hellgate still used? Intro is the phobos base entry level right?
This is what I have right now. About to try it in a minute:
-- You can get much higher quality Doom MP3 tracks from
-- http://www.sirgalahad.org/paul/doom/
-- To use them, edit config.lua, and change music.lua to musicmp3.lua
-- MP3's need to be put in a directory named mp3.
--music_array is a table of pathnames to songs (like what you'd put in
Music{})
--song_num is the total number of songs you want to output (size of
playlist)
local function rand_music(music_array,song_num)
local song_tot = table.maxn(music_array)
local song_count = 0
local music_list = {}
--if song_num > music_array, we want to loop through
--randomization of the array more than once
for i=1,math.ceil(song_num/song_tot) do
--if song_num < music_array, we want to loop less than
the full playlist
local loop_itr = math.min(song_tot,song_num)
song_num = song_num - song_tot
--make a temporary array of music
local song_list = music_array
for j=1,loop_itr do
--pick a random song from the temporary array...
idx = math.random(song_tot-j+1)
song = song_list[idx]
--...add it to the playlist...
music_list[song_count] = song
--...and remove it from the temporary array
table.remove(song_list,j)
song_count = song_count + 1
end
end
return(music_list)
end
local title_playlist = {
"mp3/PSX_Doom_Music/doom_titlescreen.mp3",
"mp3/cdoom.mp3",
"mp3/doom3.mp3",
"DSoP_00_WelcomeToHell(Intro).mp3",
}
local reg_playlist = {
"mp3/PSX_Doom_Music/doom_01hangar.mp3",
"mp3/PSX_Doom_Music/doom_02plant.mp3",
"mp3/PSX_Doom_Music/doom_03toxinrefinery.mp3",
"mp3/PSX_Doom_Music/doom_04commandcontrol.mp3",
"mp3/PSX_Doom_Music/doom_05phoboslab.mp3",
"mp3/PSX_Doom_Music/doom_06centralprocessing.mp3",
"mp3/PSX_Doom_Music/doom_07computerstation.mp3",
"mp3/PSX_Doom_Music/doom_08phobosanomaly.mp3",
"mp3/PSX_Doom_Music/doom_09deimosanomaly.mp3",
"mp3/PSX_Doom_Music/doom_10containmentarea.mp3",
"mp3/PSX_Doom_Music/doom_11refinery.mp3",
"mp3/PSX_Doom_Music/doom_12deimoslab.mp3",
"mp3/PSX_Doom_Music/doom_13commandcenter.mp3",
"mp3/PSX_Doom_Music/doom_16hellgate.mp3",
"mp3/PSX_Doom_Music/doom_17hellkeep.mp3",
"mp3/PSX_Doom_Music/doom_18pandemonium.mp3",
"mp3/PSX_Doom_Music/doom_22limbo.mp3",
"mp3/PSX_Doom_Music/doom_20unholycathedral.mp3",
"mp3/PSX_Doom_Music/doom_21mterebus.mp3",
"mp3/PSX_Doom_Music/doom_24hellbeneath.mp3",
"mp3/PSX_Doom_Music/fdoom_01attack.mp3",
"mp3/PSX_Doom_Music/fdoom_02virgil.mp3",
"mp3/PSX_Doom_Music/fdoom_03canyon.mp3",
"mp3/PSX_Doom_Music/fdoom_04combine.mp3",
"mp3/PSX_Doom_Music/fdoom_05catwalk.mp3",
"mp3/PSX_Doom_Music/fdoom_06fistula.mp3",
"mp3/PSX_Doom_Music/fdoom_07geryon.mp3",
"mp3/PSX_Doom_Music/fdoom_08minos.mp3",
"mp3/PSX_Doom_Music/fdoom_09nessus.mp3",
"mp3/PSX_Doom_Music/fdoom_10paradox.mp3",
}
local spec_playlist = {
"mp3/e1m1.mp3",
"mp3/e1m2.mp3",
"mp3/e1m3.mp3",
"mp3/e1m4.mp3",
"mp3/e1m5.mp3",
"mp3/e1m6.mp3",
"mp3/e1m7.mp3",
"mp3/e1m8.mp3",
"mp3/e1m9.mp3",
"mp3/Hangarmageddon.mp3",
"mp3/PA01Quake_Theme.mp3",
"mp3/Animal_Acoustic.mp3",
}
local boss_playlist = {
"mp3/PSX_Doom_Music/doom_credits.mp3",
"mp3/PSX_Doom_Music/final_doom_end.mp3",
"mp3/PSX_Doom_Music/psx_main_menu.mp3",
"mp3/PSX_Doom_Music/PSX_stats_screen.mp3",
}
Music = {
start = rand_music(title_playlist, 1),
interlude = "mp3/PSX_Doom_Music/fdoom_04combine.mp3",
bunny = "mp3/d2end.mp3",
intro = "mp3/DSoP_00_WelcomeToHell(Intro).mp3",
hellgate = "mp3/PSX_Doom_Music/doom_credits.mp3",
level2 = rand_music(reg_playlist, 20),
level3 = rand_music(reg_playlist, 20),
level4 = rand_music(reg_playlist, 20),
level5 = rand_music(reg_playlist, 20),
level6 = rand_music(reg_playlist, 20),
level7 = rand_music(reg_playlist, 20),
level8 = rand_music(reg_playlist, 20),
level9 = rand_music(reg_playlist, 20),
level10 = rand_music(reg_playlist, 20),
level11 = rand_music(reg_playlist, 20),
level12 = rand_music(reg_playlist, 20),
level13 = rand_music(reg_playlist, 20),
level14 = rand_music(reg_playlist, 20),
level15 = rand_music(reg_playlist, 20),
level16 = rand_music(reg_playlist, 20),
level17 = rand_music(reg_playlist, 20),
level18 = rand_music(reg_playlist, 20),
level19 = rand_music(reg_playlist, 20),
level20 = rand_music(reg_playlist, 20),
level21 = rand_music(reg_playlist, 20),
level22 = rand_music(reg_playlist, 20),
level23 = rand_music(reg_playlist, 20),
level24 = rand_music(reg_playlist, 20),
the_chained_court = rand_music(spec_playlist, 12),
halls_of_carnage = rand_music(spec_playlist, 12),
hells_armory = rand_music(spec_playlist, 12),
hells_arena = rand_music(spec_playlist, 12),
spiders_lair = rand_music(spec_playlist, 12),
city_of_skulls = rand_music(spec_playlist, 12),
the_wall = rand_music(spec_playlist, 12),
unholy_cathedral = rand_music(spec_playlist, 12),
the_mortuary = rand_music(spec_playlist, 12),
the_vaults = rand_music(spec_playlist, 12),
the_lava_pits = rand_music(spec_playlist, 12),
tower_of_babel = rand_music(boss_playlist, 4),
hell_fortress = rand_music(boss_playlist, 4),
dis = rand_music(boss_playlist, 4),
victory = "mp3/Motorhead - Hellraiser.mp3",
}
Does it look right?
***Edit**
Just tried and the game crashed on start up. :( Which part did I do wrong?