Logo

SM 5 Theming - Gameplay to Evaluation transition, Menus and Options

Register Log In Back To Forums

Post #21 · Posted at 2014-06-25 03:30:28am 9.7 years ago

Offline dbk2
dbk2 Avatar Member
332 Posts
Not Set
Reg. 2012-04-30


Last updated: 2014-06-25 03:34am
You may find the decorations portion of the SM5 Theming Basics Tutorial helpful: http://kki.ajworld.net/wiki/Tutorials:SM5_Theming_Basics

The bottom half of that section is especially important.
Quote
Decoration declarations are simple functions that load metric commands for an object from its name (MetricName), and also request a graphic (GraphicName) from the Graphics folder.

Like so:

Quote
StandardDecorationFromFile( MetricName, GraphicName )

I don't have a lot of experience with decorations in SM5, but it sounds an awful lot like you don't have Header, Footer, or Help metrics defined under [ScreenSelectMusic] which is causing an error on one of those three lines, which is why you have to comment them out to get the Testpic to appear.

Let us know, I guess.

Post #22 · Posted at 2014-06-26 03:22:57am 9.7 years ago

Offline Musashi
Musashi Avatar Member
108 Posts
United States
Reg. 2014-05-03


Last updated: 2014-06-26 03:24am
Quote: dbk2
You may find the decorations portion of the SM5 Theming Basics Tutorial helpful: M5_Theming_Basics" target="_blank">http://kki.ajworld.net/wiki/TutorialsConfusedM5_Theming_Basics

The bottom half of that section is especially important.
Quote
Decoration declarations are simple functions that load metric commands for an object from its name (MetricName), and also request a graphic (GraphicName) from the Graphics folder.

Like so:

Quote
StandardDecorationFromFile( MetricName, GraphicName )

I don't have a lot of experience with decorations in SM5, but it sounds an awful lot like you don't have Header, Footer, or Help metrics defined under [ScreenSelectMusic] which is causing an error on one of those three lines, which is why you have to comment them out to get the Testpic to appear.

Let us know, I guess.

I've made a strange discovery; not sure if its just me.

Initially, the test pic came back when I only disabled the header, and long story short you were right about it needing some metrics. The Groove radar started showing up too, when I fixed the header metrics.

But here's where it gets interesting:

Much like other screens I've worked on, the header was showing but not the footer. But then I tried reversing the names of header and footer, and sure enough it appeared. Finally, I tried adding using a t[#t+1] to add a decoration called "Bart" (Bottom Art), and renamed all footer files and metrics to 'bart'. And it showed up.

My current conclusion, pending any other data anyone has, is that Stepmania doesn't like the layer name 'Footer'. I'm hoping that for all the other screens, renaming it 'bart' will get it working.

In any event, thanks for the other ideas.

Post #23 · Posted at 2014-06-26 05:17:15am 9.7 years ago

Offline Mad Matt
Mad Matt Avatar Member
65 Posts
United States
Reg. 2011-10-26

Quote: Musashi
My current conclusion, pending any other data anyone has, is that Stepmania doesn't like the layer name 'Footer'.
I assure you, that is not the case.

Post #24 · Posted at 2014-06-26 04:02:33pm 9.7 years ago

Offline Musashi
Musashi Avatar Member
108 Posts
United States
Reg. 2014-05-03


Last updated: 2014-06-26 04:03pm
Quote: Mad Matt
Quote: Musashi
My current conclusion, pending any other data anyone has, is that Stepmania doesn't like the layer name 'Footer'.
I assure you, that is not the case.

It could be some other oversight of mine as to why new layers named footer won't show but other names will.

I'll post the theme when its ready, at which point yall're welcome to check it out and see why it wasn't showing footers when I used that name; Like all things stepmania, it's something I'd be curious to learn.

Post #25 · Posted at 2014-06-26 04:39:53pm 9.7 years ago

Offline Th3_Ov3rHell_3XoduZ
Th3_Ov3rHell_3XoduZ Avatar Member
313 Posts
Chile
Reg. 2012-09-13

"ITG, The Best Dance Machine!"
In my Theme, I just disabled the Header and Footer via Metrics.ini/Graphics, and I added my Headers/Footers via LUA on BGAnimations using the LoadActor in each Screen of my Theme.

Why not try something like that, also... If you gonna post your Theme, that would be nice for give you some feedbacks.
Quote: Released Themes for SM5 Beta 3
Quote: Released Themes for SM5 Beta 4 & 5.0.7
Quote: Simfles Packs Released

Post #26 · Posted at 2014-06-26 08:36:19pm 9.7 years ago

Offline dbk2
dbk2 Avatar Member
332 Posts
Not Set
Reg. 2012-04-30


Last updated: 2014-06-26 09:06pm
Have you ever tried checking your error log? That usually helps* me determine what errors I'm getting and where in my code they are.

Assuming you are on Windows (not OS X or Linux), you can find your log.txt file at:

Quote
%appdata%\StepMania 5\Logs

What I recommend doing is starting SM5, navigating to the screen which is giving you trouble, and then pressing F3+w to flush log. You can then open log.txt in any text editor to see what errors are being logged.

You'll want LogOutput=1 set in your Preferences.ini

While you're in your Preferences.ini file, make sure your IgnoredDialogs is set to an empty string, so that it looks like:
Quote
IgnoredDialogs=

The "dialogs" are pretty much always theme errors and that you shouldn't be ignoring as a themer.

- - -
* Because I'm on OS X, I run SM5 from Xcode and it gives me "live" error log output. I could also check the log.txt file if I were so inclined but I find Xcode's live output more helpful. You get similar results on Linux when you start the SM5 from your command line.

Post #27 · Posted at 2014-06-29 03:54:56am 9.7 years ago

Offline Musashi
Musashi Avatar Member
108 Posts
United States
Reg. 2014-05-03

Music Selection and song wheel are coming along great. I've been looking at the 3D song wheel methods here: http://kki.ajworld.net/wiki/MusicWheel

I've tried changing some of the metrics with various results, but what I'd like to get is a wheel such that songs/folders aren't closer together when they are farther from the currently selected item. I'd actually like them a tiny bit farther apart as they move away from the current song.

What metric change(s) will accomplish this?

Post #28 · Posted at 2014-06-29 12:54:57pm 9.7 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
Reg. 2008-02-20

"I'm honestly pissed off."
Set the ItemTransformFunction metric in the MusicWheel section to your own function. It gets passed a (fake) item and the offset (in item index) from the item at the center of the wheel. Calculate the position you want the item to be in from the offset and apply it to the item as if the item were an actor.
silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Post #29 · Posted at 2014-07-02 01:24:14am 9.7 years ago

Offline Musashi
Musashi Avatar Member
108 Posts
United States
Reg. 2014-05-03


Last updated: 2014-07-02 02:14am
Quote: Kyzentun
Set the ItemTransformFunction metric in the MusicWheel section to your own function. It gets passed a (fake) item and the offset (in item index) from the item at the center of the wheel. Calculate the position you want the item to be in from the offset and apply it to the item as if the item were an actor.

I ended up adjusting the "sin(0.675)" argument in the Y transform to a higher number and got what I wanted. Still not sure what I did; I've yet to understand what each argument in the Y transform.

Next question is about Font colors. I borrowed this ScreenSelectMusic Stage Display LUA from the 5th mix theme and altered it a bit:

function MakeBitmapText()
return LoadFont("Adams") .. {
InitCommand=cmd(zoom,0.55);
};
end

local t = Def.ActorFrame {
BeginCommand=cmd(playcommand,"Set";);
CurrentSongChangedMessageCommand=cmd(finishtweening;playcommand,"Set";);
MakeBitmapText()..{
SetCommand=function(self)
local curStage = GAMESTATE:GetCurrentStage();
local curStageNum = GAMESTATE:GetCurrentStageIndex(); -- 0-based
local maxStages = PREFSMAN:GetPreference("SongsPerPlay")

local song = GAMESTATE:GetCurrentSong()
if song then
-- check how many stages this song is
local songStages = 1;
if song:IsLong() then songStages = 2
elseif song:IsMarathon() then songStages = 3
end
local totalStages = curStageNum+songStages

if totalStages == maxStages then
curStage = 'Stage_Final'
else
if curStage == 'Stage_Event' then
local stageStr = FormatNumberAndSuffix(curStageNum+1)
curStage = 'Stage_'..stageStr
end
end

self:diffusetopedge( color("0.6,0.08,0.07,1") );
self:diffusebottomedge( color("0,0,0,1") );
self:strokecolor( color("1,1,1,1") );
self:settext( StageToLocalizedString(curStage).." STAGE" )
else
if curStage == 'Stage_Event' then
local stageStr = FormatNumberAndSuffix(curStageNum+1)
curStage = 'Stage_'..stageStr
end
self:diffuse( StageToColor(curStage) );
self:settext( StageToLocalizedString(curStage) )
end
end
};
};

return t;


I wanted to give the Stage Display (text reading 1st Stage, 2nd Stage, etc) a white outline, but the bolded strokecolor function doesn't seem to be doing anything. I can change the color inside in a bunch of ways, but it seems to have no effect. Is there another function I can use to make the outline of the letters white?

Post #30 · Posted at 2014-07-02 01:32:51am 9.7 years ago

Offline AJ 187
AJ 187 Avatar Member
130 Posts
Not Set
Reg. 2008-10-14

"retired"
Well, you need to make sure the font in question has the stroke outline page (it'll have "[main-stroke]" in the filename); if there isn't one, it won't show up.

(also this place could really use a code tag)

Post #31 · Posted at 2014-07-02 01:37:17am 9.7 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
Reg. 2008-02-20

"I'm honestly pissed off."
It has a code tag, Musashi doesn't know how to use it.

silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Post #32 · Posted at 2014-07-03 03:16:50am 9.7 years ago

Offline Musashi
Musashi Avatar Member
108 Posts
United States
Reg. 2014-05-03


Last updated: 2014-07-03 03:16am
Quote: AJ 187
Well, you need to make sure the font in question has the stroke outline page (it'll have "[main-stroke]" in the filename); if there isn't one, it won't show up.

(also this place could really use a code tag)

That would be it. I made one with GIMP in a matter of seconds. I also discovered that to make it work I had to use GIMP to convert the "built-in stroke" on the intended font to alpha.

Good work team!

Getting ever closer with the Music Selection, and I'd like to advise themers that when building this screen, there are many elements involved:

ScreenSelectMusic: The background and overlays
MusicWheel: Set the curvature of the wheel, the look of the slots.
MusicWheelItem
TextBanner: Arrange the song title, subtitle, and artist
SongManager: Set the color(s) of the text for Songs on the wheel
BPMDisplay: Shows the BPM of the song selected

and possibly others, which I would encourage more experienced themers to add.

Post #33 · Posted at 2014-07-03 03:52:20am 9.7 years ago

Offline CrzP
CrzP Avatar Member
36 Posts
China
Reg. 2014-02-21

In my theme's ScreenSelectMusic,there are even more elements.
Not all of them are necessary:

SegmentDisplay: Show this song has special timing segment types or not.
Help: Help text.
GrooveRadar: A radar shows step's infomation.
GroupTitle: Current Song's Group name.
SongTime:Current Song's Length.
PercentScore&Grade: Current Song's Best PercentScore&Grade.
StageDisplay: Show Current Stage number.
Difficulty List: Show all playable steps
Pane Display: Detailed step infomation.
Jacket: Show Jacket Image.
CDtitle: Show CDtitle Image.
Banner: Show Banner Image.
Title Image: (My theme's unique function)Show Title Image.

Post #34 · Posted at 2014-07-03 03:55:44pm 9.7 years ago

Offline Mad Matt
Mad Matt Avatar Member
65 Posts
United States
Reg. 2011-10-26

SMWE Select Music for life.

Post #35 · Posted at 2014-07-03 05:51:58pm 9.7 years ago

Offline dbk2
dbk2 Avatar Member
332 Posts
Not Set
Reg. 2012-04-30

I would attempt to make a SWME Select Music, myself, but I'm presently buried in work related to writing my thesis lazy.

Post #36 · Posted at 2014-07-03 06:49:56pm 9.7 years ago

Offline Mad Matt
Mad Matt Avatar Member
65 Posts
United States
Reg. 2011-10-26

Quote: dbk2
I would attempt to make a SWME Select Music, myself, but...
It's only useful if you want to do things that you can't do on SSMusic.

Post #37 · Posted at 2014-07-03 09:27:00pm 9.7 years ago

Offline AJ 187
AJ 187 Avatar Member
130 Posts
Not Set
Reg. 2008-10-14

"retired"
It's only worth attempting if you can shut off your life (e.g. obligations, etc.) for the amount of time it takes to write the screen ;)

Post #38 · Posted at 2014-07-03 11:32:35pm 9.7 years ago

Offline Kyzentun
Kyzentun Avatar Member
3,209 Posts
United States
Reg. 2008-02-20

"I'm honestly pissed off."
Writing a custom SSMusic is only useful if you want to reinvent the wheel.
silenttype01: Kyzentun is never harsh. He says it how it is.

GENERATION 24: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Post #39 · Posted at 2014-07-04 12:58:06am 9.7 years ago

Offline Musashi
Musashi Avatar Member
108 Posts
United States
Reg. 2014-05-03

Strange things happening again:

I wanted to slightly adjust my MusicWheel. As it is, the currently selected song sticks out a little and I'd like to either bring it back or bring the rest of the songs out a little to make it smoother, but every attempt I make to adjust it only makes it crash.

As mentioned, I'm using the 3D wheel suggested here, with a few adjustments to some of the input variables and constants: http://kki.ajworld.net/wiki/MusicWheel

I tried using an if statement to apply an exception to the current song. I even borrowed syntax from the Optical Master theme to do so.
I tried moving the function to the a LUA in the Scripts folder and providing a function call in the metrics (see above page for an example).

These both resulted in crashes upon entering Music Selection.

Other themes do not appear to need exceptions for the current song to keep it from sticking out, and while they do not use self: z or self: rotationx command like mine, they use virtually identical self:x and self:y.

So: how would I fix this?

Post #40 · Posted at 2014-07-04 02:20:02am 9.7 years ago

Offline AJ 187
AJ 187 Avatar Member
130 Posts
Not Set
Reg. 2008-10-14

"retired"

Last updated: 2014-07-04 02:20am
Quote: Kyzentun
Writing a custom SSMusic is only useful if you want to reinvent the wheel.
*rimshot*

Quote: Musashi
Strange things happening again:

I wanted to slightly adjust my MusicWheel...but every attempt I make to adjust it only makes it crash.

Would you mind pasting your MusicWheelTransform in the thread?
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: 3% · Database: 8% · Server Time: 2024-03-28 11:08:00
This page took 0.014 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language