1
1
Fork 0
mirror of https://github.com/cave-story-randomizer/cave-story-randomizer synced 2025-03-24 19:09:22 +00:00

adds WIP kero blaster orgs courtesy of CoryWelchMusic

This commit is contained in:
duncathan 2021-07-26 22:15:09 -06:00 committed by duncathan salt
parent d76b811fda
commit b5f7c9eddd
19 changed files with 51 additions and 20 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +1,9 @@
local song = Class:extend() local song = Class:extend()
function song:new(name, id, jingle, beta) function song:new(name, id, jingle, game)
self.name = name self.name = name
self.id = id self.id = id
self.jingle = jingle or false self.jingle = jingle or false
self.beta = beta or false self.game = game or "vanilla"
end end
local songs = { local songs = {
@ -49,11 +49,37 @@ local songs = {
sealChamber = song("Seal Chamber", "0039"), sealChamber = song("Seal Chamber", "0039"),
torokosTheme = song("Toroko's Theme", "0040"), torokosTheme = song("Toroko's Theme", "0040"),
white = song('"White"', "0041"), white = song('"White"', "0041"),
windFortress = song("Wind Fortress", "0042", false, true), windFortress = song("Wind Fortress", "0042", false, "beta"),
halloween2 = song("Halloween 2", "0043", false, true), halloween2 = song("Halloween 2", "0043", false, true),
peopleOfTheRoot = song("People of the Root", "0044", false, true), peopleOfTheRoot = song("People of the Root", "0044", false, "beta"),
pierWalk = song("Pier Walk", "0045", false, true), pierWalk = song("Pier Walk", "0045", false, "beta"),
snoopyCake = song("Snoopy Cake", "0046", false, true) snoopyCake = song("Snoopy Cake", "0046", false, "beta"),
dataSlots = song("Data Slots", "0047", false, "kero"),
catAndFrog = song("Cat & Frog Corp.", "0048", false, "kero"),
--itsMyBlaster = song("It's My Blaster!", "0049", false, "kero"),
shoppingCart = song("Shopping Cart", "0050", false, "kero"),
prothallium = song("Prothallium", "0051", false, "kero"),
hardCording = song("Hard Cording", "0052", false, "kero"),
newItem = song("New Item!", "0053", false, "kero"), --kind of jingle, kind of not?
checkinOut = song("Check'IN Out", "0054", false, "kero"),
sukima = song("SUKIMA", "0055", false, "kero"),
relaxation = song("Relaxation", "0056", false, "kero"),
chemistry = song("Chemistry", "0057", false, "kero"),
--arrival = song("Arrival", "0058", false, "kero"),
freezeDraft = song("Freeze Draft", "0059", false, "kero"),
magicNumber = song("Magic Number", "0060", false, "kero"),
--timeTable = song("Time Table", "0061", false, "kero"),
--number1119 = song("Number 1119", "0061", false, "kero"),
trainStation = song("Train Station", "0062", false, "kero"),
--totoStation = song("ToTo Station", "0063", false, "kero"),
kaishaMan = song("Kaisha Man", "0064", false, "kero"),
zombeat = song("Zombeat", "0065", false, "kero"),
--oyasumiSong = song("Oyasumi Song", "0066", false, "kero"),
--changeSpec = song("Change Spec", "0067", false, "kero"),
--curtainRise = song("Curtain Rise", "0068", false, "kero"),
--creditsOfKero = song("Credits of Kero", "0069", false, "kero"),
--myPreciousDays = song("My Precious Days", "0070", false, "kero"),
--excuseMe = song("Excuse Me...", "0071", false, "kero"),
} }
local cue = Class:extend() local cue = Class:extend()
@ -181,18 +207,22 @@ local music = Class:extend()
function music:new() function music:new()
self.vanillaEnabled = true self.vanillaEnabled = true
self.betaEnabled = false self.betaEnabled = false
self.secretEnabled = false self.keroEnabled = false
self.songs = songs self.songs = songs
self.cues = cues self.cues = cues
self.flavor = "Shuffle" self.flavor = "Shuffle"
end end
local _isValid = function(key, song, self) local _isValid = function(key, song, self, canRemap)
return not song.jingle and (not song.beta or self.betaEnabled) if song.jingle then return false end
if song.game == "vanilla" and (canRemap or self.vanillaEnabled) then return true end
if song.game == "beta" and self.betaEnabled then return true end
if song.game == "kero" and self.keroEnabled then return true end
return false
end end
function music:getShuffledSongs() function music:getShuffledSongs()
return _.shuffle(_.filter(self.songs, _isValid, self)) return _.shuffle(_.filter(self.songs, _isValid, self))
end end
function music:getCues() function music:getCues()
@ -211,7 +241,8 @@ function music:_shuffle(tscFiles)
local idmap = _.map(self.songs, function (k,v) local idmap = _.map(self.songs, function (k,v)
-- don't remap any invalid songs -- don't remap any invalid songs
if not _isValid(k,v,self) then return v.id, v.id end if not _isValid(k,v,self,true) then return v.id, v.id end
if #shuffled == 0 then shuffled = self:getShuffledSongs() end
return v.id, _.pop(shuffled).id return v.id, _.pop(shuffled).id
end) end)

View file

@ -39,7 +39,7 @@ function C:getDefaults()
musicShuffle = false, musicShuffle = false,
musicVanilla = true, musicVanilla = true,
musicBeta = false, musicBeta = false,
musicSecret = false, musicKero = false,
musicFlavor = "Shuffle", musicFlavor = "Shuffle",
noFallingBlocks = false, noFallingBlocks = false,
completableLogic = false, completableLogic = false,
@ -73,7 +73,7 @@ function C:serialize()
line = line .. tab .. ("musicShuffle = %s,\r\n"):format(self.settings.musicShuffle) line = line .. tab .. ("musicShuffle = %s,\r\n"):format(self.settings.musicShuffle)
line = line .. tab .. ("musicVanilla = %s,\r\n"):format(self.settings.musicVanilla) line = line .. tab .. ("musicVanilla = %s,\r\n"):format(self.settings.musicVanilla)
line = line .. tab .. ("musicBeta = %s,\r\n"):format(self.settings.musicBeta) line = line .. tab .. ("musicBeta = %s,\r\n"):format(self.settings.musicBeta)
line = line .. tab .. ("musicSecret = %s,\r\n"):format(self.settings.musicSecret) line = line .. tab .. ("musicKero = %s,\r\n"):format(self.settings.musicKero)
line = line .. tab .. ("musicFlavor = %q,\r\n"):format(self.settings.musicFlavor) line = line .. tab .. ("musicFlavor = %q,\r\n"):format(self.settings.musicFlavor)
line = line .. tab .. ("noFallingBlocks = %s,\r\n"):format(self.settings.noFallingBlocks) line = line .. tab .. ("noFallingBlocks = %s,\r\n"):format(self.settings.noFallingBlocks)
line = line .. tab .. ("completableLogic = %s,\r\n"):format(self.settings.completableLogic) line = line .. tab .. ("completableLogic = %s,\r\n"):format(self.settings.completableLogic)

View file

@ -28,7 +28,7 @@ function C:setup()
self:loadMyChar(Settings.settings.mychar) self:loadMyChar(Settings.settings.mychar)
self:loadSpawn(Settings.settings.spawn) self:loadSpawn(Settings.settings.spawn)
self:loadSeqSettings(Settings.settings.seqbreaks, Settings.settings.dboosts) self:loadSeqSettings(Settings.settings.seqbreaks, Settings.settings.dboosts)
self:loadMusicSettings(Settings.settings.musicShuffle, Settings.settings.musicFlavor, Settings.settings.musicVanilla, Settings.settings.musicBeta, Settings.settings.musicSecret) self:loadMusicSettings(Settings.settings.musicShuffle, Settings.settings.musicFlavor, Settings.settings.musicVanilla, Settings.settings.musicBeta, Settings.settings.musicKero)
self:loadNoFallingBlocks(Settings.settings.noFallingBlocks) self:loadNoFallingBlocks(Settings.settings.noFallingBlocks)
self:loadCompleteableLogic(Settings.settings.completableLogic) self:loadCompleteableLogic(Settings.settings.completableLogic)
@ -43,7 +43,7 @@ settings.randoButton:onPress(function()
Screen:loadObjective(love.math.random(4)-1) Screen:loadObjective(love.math.random(4)-1)
settings.seedselect.value = false settings.seedselect.value = false
settings.seedrandom.value = true settings.seedrandom.value = true
Screen:loadMyChar(love.math.random(9)) --Screen:loadMyChar(love.math.random(9))
Screen:loadSpawn(love.math.random(3)-1) Screen:loadSpawn(love.math.random(3)-1)
Screen:loadSeqSettings(fifty(), { Screen:loadSeqSettings(fifty(), {
cthulhu = fifty(), cthulhu = fifty(),
@ -55,7 +55,7 @@ settings.randoButton:onPress(function()
plantation = fifty(), plantation = fifty(),
rocket = fifty() rocket = fifty()
}) })
Screen:loadMusicSettings(fifty(), fifty(), love.math.random(3)) --Screen:loadMusicSettings(fifty(), love.math.random(3), fifty())
Screen:loadNoFallingBlocks(fifty()) Screen:loadNoFallingBlocks(fifty())
end) end)
@ -152,11 +152,11 @@ function C:loadSeqSettings(breaks, seq)
end end
end end
function C:loadMusicSettings(shuffle, flavor, cs, beta, secret) function C:loadMusicSettings(shuffle, flavor, cs, beta, kero)
music.music.value = shuffle music.music.value = shuffle
music.cavestory.value = cs music.cavestory.value = cs
music.beta.value = beta music.beta.value = beta
--music.secret.value = secret music.kero.value = kero
if flavor == "Shuffle" or flavor == 1 then if flavor == "Shuffle" or flavor == 1 then
music.shuffle.value = true music.shuffle.value = true
music.random.value = false music.random.value = false
@ -231,7 +231,7 @@ layout.go:onPress(function()
Randomizer.shuffleMusic = music.music.value Randomizer.shuffleMusic = music.music.value
Randomizer.music.vanillaEnabled = music.cavestory.value Randomizer.music.vanillaEnabled = music.cavestory.value
Randomizer.music.betaEnabled = music.beta.value Randomizer.music.betaEnabled = music.beta.value
-- Randomizer.music.secretEnabled = music.secret.value Randomizer.music.keroEnabled = music.kero.value
if music.shuffle.value then Randomizer.music.flavor = "Shuffle" end if music.shuffle.value then Randomizer.music.flavor = "Shuffle" end
if music.random.value then Randomizer.music.flavor = "Random" end if music.random.value then Randomizer.music.flavor = "Random" end
if music.chaos.value then Randomizer.music.flavor = "Chaos" end if music.chaos.value then Randomizer.music.flavor = "Chaos" end

View file

@ -35,7 +35,7 @@ return { style = 'dialog',
]] ]]
{ type = 'check', id = 'cavestory', value = true, text = 'Enable Cave Story music', minheight = 27 }, { type = 'check', id = 'cavestory', value = true, text = 'Enable Cave Story music', minheight = 27 },
{ type = 'check', id = 'beta', value = false, text = 'Enable beta music', minheight = 27, status = "Only compatible with the included Doukutsu.exe - no other platforms." }, { type = 'check', id = 'beta', value = false, text = 'Enable beta music', minheight = 27, status = "Only compatible with the included Doukutsu.exe - no other platforms." },
--{ type = 'check', id = 'secret', value = false, text = 'Enable [redacted] music', minheight = 27, status = "Only compatible with the included Doukutsu.exe - no other platforms." }, { type = 'check', id = 'kero', value = false, text = 'Enable Kero Blaster music', minheight = 27, status = "Only compatible with the included Doukutsu.exe - no other platforms." },
}, },
{ type = 'sash' }, { type = 'sash' },
{ {