Logo

[SM5] Different background videos on different difficulties

Register Log In Back To Forums

Post #1 · Posted at 2017-12-07 06:34:39pm 6.3 years ago

Offline rapidemboar
rapidemboar Avatar Member
646 Posts
United States
Reg. 2016-09-20

Nintendo Network ID: rapidemboarGame Center Nickname: rapidemboar
"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)

Post #2 · Posted at 2017-12-08 08:21:45am 6.3 years ago

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
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:
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.

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.
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.

Post #3 · Posted at 2017-12-10 05:05:54am 6.3 years ago

Offline FlameyBoy
FlameyBoy Avatar Member
335 Posts
United States
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

Offline KittyBox
KittyBox Avatar Member
207 Posts
United States
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

Offline FlameyBoy
FlameyBoy Avatar Member
335 Posts
United States
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

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
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?
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.

Post #7 · Posted at 2017-12-15 02:43:46pm 6.3 years ago

Offline FlameyBoy
FlameyBoy Avatar Member
335 Posts
United States
Reg. 2011-03-09

Yep.

Post #8 · Posted at 2018-06-01 07:48:22pm 5.9 years ago

Offline pm41224
pm41224 Avatar Member
315 Posts
United States
Reg. 2012-05-19

Nintendo Network ID: pm412243DS Friend Code: 4210-4460-8178
"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).

Post #9 · Posted at 2019-12-09 09:14:01pm 4.3 years ago

Offline DMNBT
DMNBT Avatar Member+
77 Posts
Chile
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:
--./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


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


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

Offline leadbman
leadbman Avatar Member
263 Posts
Australia
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!
https://zenius-i-vanisher.com/ddrsig/18213.png?t=1510895050
Really need to add my scores to the tracker soon.
Always learning, always trying to push the boundaries of SM.

Post #11 · Posted at 2019-12-10 12:08:05pm 4.3 years ago

Offline DMNBT
DMNBT Avatar Member+
77 Posts
Chile
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.
Register Log In Back To Forums

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 5% · Database: 4% · Server Time: 2024-04-25 08:35:50
This page took 0.01 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language