Post #1 · Posted at 2017-12-07 06:34:39pm 6.3 years ago
rapidemboar | |
---|---|
Member | |
646 Posts | |
Reg. 2016-09-20 | |
"Blank for now." |
Is it possible? It doesn't seem to be a feature of the .ssc format.
Planned uses:
-Beginner helper using footcam footage
-Different BG videos for songs with split timing (Like how Lovely Storm was handled as the Another chart for Love Is Dreaminess in IIDX12 CS)
Planned uses:
-Beginner helper using footcam footage
-Different BG videos for songs with split timing (Like how Lovely Storm was handled as the Another chart for Love Is Dreaminess in IIDX12 CS)
Post #2 · Posted at 2017-12-08 08:21:45am 6.3 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Last updated: 2017-12-08 08:22am
You could in theory do that but you'd probably have to write your own theme script to play the specific background videos/animations.
This can leads to problems if you're making these for public use, they won't work properly unless they have your theme. If they're just for you, you could say something like:
I'd recommend reading up on how other people do background changes etc for their themes - like the SN3 team's SuperNOVA 3, Waiei's themes etc.
I'll give it more thought and if I come up with any more thought out suggestions I'll let you know, this was just a quick thought.
This can leads to problems if you're making these for public use, they won't work properly unless they have your theme. If they're just for you, you could say something like:
if difficulty == "difficulty" then
showvideoA
elseif difficulty == "otherdifficulty" then
showvideoB
else
showvideoC
end
If you do that, to simplify it, you could do something like make the videos share the name of the song title or song translated title, then use that variable from the song itself so you could make it work across all your songs.showvideoA
elseif difficulty == "otherdifficulty" then
showvideoB
else
showvideoC
end
I'd recommend reading up on how other people do background changes etc for their themes - like the SN3 team's SuperNOVA 3, Waiei's themes etc.
I'll give it more thought and if I come up with any more thought out suggestions I'll let you know, this was just a quick thought.
Post #3 · Posted at 2017-12-10 05:05:54am 6.3 years ago
FlameyBoy | |
---|---|
Member | |
335 Posts | |
Reg. 2011-03-09 | |
You wouldn't need a theme script to do it, you could just use a BGChange.
Post #4 · Posted at 2017-12-10 05:56:01am 6.3 years ago
KittyBox | |
---|---|
Member | |
207 Posts | |
Reg. 2014-05-01 | |
You can't edit BG Changes while in step timing mode though; You can only edit them while in Song timing mode which prevents you from having different graphics on different difficulties. It'd have to be done in a manner similar to what leadbman said.
Post #5 · Posted at 2017-12-14 06:06:17pm 6.3 years ago
FlameyBoy | |
---|---|
Member | |
335 Posts | |
Reg. 2011-03-09 | |
Yes, but BGScripts can contain Lua, so you don't need to do what leadbman is doing as part of the theme.
Post #6 · Posted at 2017-12-15 12:24:40pm 6.3 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
Quote: FlameyBoy
Yes, but BGScripts can contain Lua, so you don't need to do what leadbman is doing as part of the theme.
But if they use BGScripts, wouldn't they still have to call them within BGChanges? I know BGAnimations can use Lua and can be called via BGChanges, how would you go about doing what you're suggesting?
I'm guessing you'd put within the BGAnimation Lua file something saying if difficulty X show this, if difficulty Y show this etc?
Post #7 · Posted at 2017-12-15 02:43:46pm 6.3 years ago
FlameyBoy | |
---|---|
Member | |
335 Posts | |
Reg. 2011-03-09 | |
Yep.
Post #8 · Posted at 2018-06-01 07:48:22pm 5.9 years ago
pm41224 | |
---|---|
Member | |
315 Posts | |
Reg. 2012-05-19 | |
"DanceDanceRevolution!" |
Hate to bump a months-old thread, but you should definitely look at what Mr. ThatKid did for his SM5 conversion of TaroNuke's
"MAWARU! SETSUGETSUKA!", specifically the boss stage part that will load a different background depending on the difficulty (same background image of the song "U.N. Owen Was Her? (haru_naba remix)", but the only difference is the text overlaid on that image will say either "Survive!" or "Stream like ITGAlex!", again depending on the difficulty selected).
"MAWARU! SETSUGETSUKA!", specifically the boss stage part that will load a different background depending on the difficulty (same background image of the song "U.N. Owen Was Her? (haru_naba remix)", but the only difference is the text overlaid on that image will say either "Survive!" or "Stream like ITGAlex!", again depending on the difficulty selected).
Post #9 · Posted at 2019-12-09 09:14:01pm 4.3 years ago
DMNBT | |
---|---|
Member+ | |
77 Posts | |
Reg. 2014-06-15 | |
Necrobumped because it was never really answered and I found myself just last week fighting SM to actually do this. The method I used does actually require to put some files outside your song directory, but I didn't find a way to do it with scripts internal to the song.
Anyways, what I'll be doing is to set a specific BackgroundEffect to the video that'll allow me to redirect it's path to some other video.
First, let's see some code:
Now, if you have two videos in your song directory (video.avi and alt_video.avi), you can set the second video to override the first video if the Challenge chart is being played. The call to the lua script is part of the BGCHANGES tag:
You can also specify 2 concrete videos and pick one of them to be played:
And the call to the script:
Hope this helped!
Anyways, what I'll be doing is to set a specific BackgroundEffect to the video that'll allow me to redirect it's path to some other video.
First, let's see some code:
--./BackgroundEffects/OverrideVideoOnChallenge.lua
local function overrideFilePath(filePath)
pos = filePath:find_last("/")
rawPath = filePath:sub(1, pos)
rawFile = filePath:sub(pos + 1)
if GAMESTATE:GetHardestStepsDifficulty() == 'Difficulty_Challenge' then
return rawPath .. "alt_" .. rawFile
else
return filePath
end
end
local Color1 = color(Var "Color1")
local t = Def.ActorFrame {
LoadActor(overrideFilePath(Var "File1")) .. {
OnCommand = function(self)
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
self:scale_or_crop_background()
self:diffuse(Color1)
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
if self.loop then
self:loop(false)
self:position(0)
end
self:effectclock("music")
end
GainFocusCommand=cmd(play)
LoseFocusCommand=cmd(pause)
}
}
return t
local function overrideFilePath(filePath)
pos = filePath:find_last("/")
rawPath = filePath:sub(1, pos)
rawFile = filePath:sub(pos + 1)
if GAMESTATE:GetHardestStepsDifficulty() == 'Difficulty_Challenge' then
return rawPath .. "alt_" .. rawFile
else
return filePath
end
end
local Color1 = color(Var "Color1")
local t = Def.ActorFrame {
LoadActor(overrideFilePath(Var "File1")) .. {
OnCommand = function(self)
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
self:scale_or_crop_background()
self:diffuse(Color1)
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
if self.loop then
self:loop(false)
self:position(0)
end
self:effectclock("music")
end
GainFocusCommand=cmd(play)
LoseFocusCommand=cmd(pause)
}
}
return t
Now, if you have two videos in your song directory (video.avi and alt_video.avi), you can set the second video to override the first video if the Challenge chart is being played. The call to the lua script is part of the BGCHANGES tag:
#BGCHANGES:0.000=video.avi=1.000=0=0=0=OverrideVideoOnChallenge;
You can also specify 2 concrete videos and pick one of them to be played:
--./BackgroundEffects/PickVideoOnChallenge.lua
local function pickFilePath(filePath1, filePath2)
if GAMESTATE:GetHardestStepsDifficulty() == 'Difficulty_Challenge' then
return filePath2
else
return filePath1
end
end
local Color1 = color(Var "Color1")
local t = Def.ActorFrame {
LoadActor(pickFilePath(Var "File1", Var "File2")) .. {
OnCommand = function(self)
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
self:scale_or_crop_background()
self:diffuse(Color1)
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
if self.loop then
self:loop(false)
self:position(0)
end
self:effectclock("music")
end
GainFocusCommand=cmd(play)
LoseFocusCommand=cmd(pause)
}
}
return t
local function pickFilePath(filePath1, filePath2)
if GAMESTATE:GetHardestStepsDifficulty() == 'Difficulty_Challenge' then
return filePath2
else
return filePath1
end
end
local Color1 = color(Var "Color1")
local t = Def.ActorFrame {
LoadActor(pickFilePath(Var "File1", Var "File2")) .. {
OnCommand = function(self)
self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)
self:scale_or_crop_background()
self:diffuse(Color1)
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
if self.loop then
self:loop(false)
self:position(0)
end
self:effectclock("music")
end
GainFocusCommand=cmd(play)
LoseFocusCommand=cmd(pause)
}
}
return t
And the call to the script:
#BGCHANGES:0.000=video.avi=1.000=0=0=0=PickVideoOnChallenge=video_challenge.avi;
Hope this helped!
Post #10 · Posted at 2019-12-10 04:47:32am 4.3 years ago
leadbman | |
---|---|
Member | |
263 Posts | |
Reg. 2016-02-01 | |
"Working On: 5thMix BGA bgchanges" |
That's awesome DMNBT! I'll have to try it out later. It'll be handy for songs that have different videos over the years if you want to toggle them. You could even trigger different videos for different modes etc. This is very useful knowledge. I hadn't even thought about doing it via the background effects, I was doing it theme side.
Nice work!
Nice work!
Post #11 · Posted at 2019-12-10 12:08:05pm 4.3 years ago
DMNBT | |
---|---|
Member+ | |
77 Posts | |
Reg. 2014-06-15 | |
Also, eagle-eyed posters may notice that my "custom" BackgroundEffect is, in fact, just the normal StretchNoLoop effect with a function to redirect the video path before actually calling the effect. There's probably some fancy way to parametrize this so that is works on any preexisting effect, but I barely know Lua as it is, so I just pasted some working code, stapled a function to it, and hoped for the best.