Logo

[Need Help] Custom Select Music Screen

Register Log In Back To Forums

Post #1 · Posted at 2017-03-20 12:44:03pm 7 years ago

Offline kenny
kenny Avatar Member
572 Posts
United States
Reg. 2014-06-14

Is it possible to actually have 2 select music screens? cause I've tried it many times and it keeps crashing when trying to go to the select music screen. Is there anyway you guys can help me?

Post #2 · Posted at 2017-03-20 02:46:44pm 7 years ago

Offline MadkaT
MadkaT Avatar Member
820 Posts
Not Set
Reg. 2009-11-24


Last updated: 2017-03-20 02:47pm
Yes, you can have multiple select screens, you need to define them in the metrics and can evaluate them from a branch to let the game decide wich one to use. For example in metrics you could use

Quote
[ScreenSelectMusicAlternate]
fallback="ScreenSelectMusic"

This use the original select music screen as a fallback, and you just need to add the variations to the "Alternate" version in this case

For the screen selection, just create in branches.lua a function, and evaluate the conditions to choose the correct screen and return the screen name.

And in the previous screen in the metrics you need to add the funcion in the nextscreen line, for example:

Quote
[ScreenTest]
nextscreen=AlternateBranch()

This assumes that your function name to decide the branch is called "AlternateBranch"

Post #3 · Posted at 2017-03-20 03:28:48pm 7 years ago

Offline kenny
kenny Avatar Member
572 Posts
United States
Reg. 2014-06-14

Quote: MadkaT
Yes, you can have multiple select screens, you need to define them in the metrics and can evaluate them from a branch to let the game decide wich one to use. For example in metrics you could use

Quote
[ScreenSelectMusicAlternate]
fallback="ScreenSelectMusic"

This use the original select music screen as a fallback, and you just need to add the variations to the "Alternate" version in this case

For the screen selection, just create in branches.lua a function, and evaluate the conditions to choose the correct screen and return the screen name.

And in the previous screen in the metrics you need to add the funcion in the nextscreen line, for example:

Quote
[ScreenTest]
nextscreen=AlternateBranch()

This assumes that your function name to decide the branch is called "AlternateBranch"

Like This?

Quote
Branch.SELMUSIC = function return "ScreenSelectMusic2" end

Post #4 · Posted at 2017-03-20 04:42:11pm 7 years ago

Offline MadkaT
MadkaT Avatar Member
820 Posts
Not Set
Reg. 2009-11-24

The function has no evaluation, if you simply wanna go to that screen use the name directly:

Quote
[ScreenTest]
nextscreen="ScreenSelectMusicAlternate"

Post #5 · Posted at 2017-03-20 05:25:29pm 7 years ago

Offline kenny
kenny Avatar Member
572 Posts
United States
Reg. 2014-06-14

I already tried that it crashed also the theme I'm making is similar to ddr x3 where you have a 2nd mix mode the title screen and the select game mode for that works fine but the only problem I have for now is the select music

Post #6 · Posted at 2017-03-20 07:34:30pm 7 years ago

Offline Inorizushi
Inorizushi Avatar Member
487 Posts
Not Set
Reg. 2012-10-25

"huhbluh"
ALRIGHT.
Here's a somewhat more proper way to do this.

Quote: DDR X3 Branches

function CorrectSSM()
Trace "Yes, we get called"
if IsStarterMode() then
return "ScreenSelectMusicStarter"
else
local stage = GAMESTATE:GetCurrentStage()
Trace(stage)
if getenv("MIXMODE") then
return "Screen2ndMIXSelectMusic"
else
return "ScreenSelectMusic"
end
end
end

function SelectMusicOrCourse()
if IsNetSMOnline() then
return "ScreenNetSelectMusic"
elseif GAMESTATE:IsCourseMode() then
return "ScreenSelectCourse"
else
return CorrectSSM()
end
end

In this block of code, we use the CorrectSSM function to return the correct name for SelectMusic depending on 2 if statements.

When Starter/Happy Mode is selected, we have the game set load up some lua script to handle Starter Sorting and other various things. In that script we have the "IsStarterMode()" function where it returns a true state once the script is loaded and is reset using "setenv("StarterMode",false)" at TitleMenu.

We also have 2ndMIX handling for the second if statement where we set "setenv("MIXMODE",true)" as soon as the player reacher Screen2ndMIXLogo and is once again reset at the titlemenu.

If neither of those are true, we return the regular SelectMusic screen.

In the second block, we use SelectMusicorCourse in order to actually call on the screen.
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-19 07:25:10
This page took 0.007 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language