Logo

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

Registrarse Conectarse Regresar A Los Foros

Post #61 · Publicado en 2014-07-08 08:18:43pm Hace 9.9 años

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

"ITG, The Best Dance Machine!"
Completely Agree, obviously, we are not just copying codes and edit a little and, here is it... My code working for my Theme, of course not.

Is true that the documentation is a little hard to understand, more for me (for example) because I speak Spanish and is hard because it is on English, and even some documentation in Spanish is hard too. But, I hope soon, exist a documentation more easier for us.

Is helpful see others Themes' Code and see how it works in a determinate screen, I think, this is the first Step to learn and understand How the LUA code WORKS

Big Grin
Quote: Released Themes for SM5 Beta 3
Quote: Released Themes for SM5 Beta 4 & 5.0.7
Quote: Simfles Packs Released

Post #62 · Publicado en 2014-07-17 04:43:22am Hace 9.9 años

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

I can't seem to get my big '1st STAGE' graphic to appear in my ScreenStageInformation. I'm using


if GAMESTATE:GetCurrentStageIndex() == 1 then
t[#t+1] =Def.ActorFrame{
LoadActor( "../Common ScreenStages/1" )..{
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;sleep,0.000;sleep,3.8;accelerate,0.3;rotationz,360;accelerate,0.05;zoom,1.6;decelerate,0.083;zoom,0.95;decelerate,0.016;zoom,1;sleep,3.5;linear,0.3;rotationz,-360;zoom,0;addy,60);
};
};
end
return t


It appears just fine when I'm not using any conditionals, but when I try various ways of checking the stage number/index, the graphic doesn't show up, or the whole screen blanks.

What function do I need here?

Post #63 · Publicado en 2014-07-17 04:47:46am Hace 9.9 años

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

"I'm honestly pissed off."
Post the entirety of the lua file for that screen here, with your attempt at a condition that checks the stage number.
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 #64 · Publicado en 2014-07-17 09:46:35pm Hace 9.9 años

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


local playMode = GAMESTATE:GetPlayMode()
if playMode ~= 'PlayMode_Regular' and playMode ~= 'PlayMode_Rave' and playMode ~= 'PlayMode_Battle' then
curStage = playMode;
end;
local sStage = GAMESTATE:GetCurrentStage();
local tRemap = {
Stage_1st = 1,
Stage_2nd = 2,
Stage_3rd = 3,
Stage_4th = 4,
Stage_5th = 5,
Stage_6th = 6,
};

if tRemap[sStage] == PREFSMAN:GetPreference("SongsPerPlay") then
sStage = "Stage_Final";
else
sStage = sStage;
end;





local t = Def.ActorFrame {};

t[#t+1] =Def.ActorFrame{

LoadActor("../door1.png")..{
InitCommand=cmd(zoomx,1.41;x,SCREEN_CENTER_X-SCREEN_WIDTH;y,SCREEN_CENTER_Y);
OnCommand=cmd(linear,0.25;x,SCREEN_CENTER_X/2+2);
};

};
t[#t+1] =Def.ActorFrame{

LoadActor("../door2.png")..{
InitCommand=cmd(zoomx,1.41;x,SCREEN_CENTER_X+SCREEN_WIDTH;y,SCREEN_CENTER_Y);
OnCommand=cmd(linear,0.25;x,SCREEN_CENTER_X*3/2-2);
};

};

t[#t+1] =Def.ActorFrame{
LoadActor( "../header" )..{
InitCommand=cmd(zoomx,1.34;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y-211;addy,-56);
OnCommand=cmd(sleep,2.116;linear,0.5;addy,56;sleep,5;linear,0.133;addy,-56);

};

LoadActor( "../footer" )..{
InitCommand=cmd(zoomx,1.34;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y+230;addy,23);
OnCommand=cmd(sleep,2.116;linear,0.5;addy,-23;sleep,5;linear,0.133;addy,24);

};

LoadActor( "../Common ScreenStages/banner_frame_side" )..{
InitCommand=cmd(x,SCREEN_CENTER_X+147;y,SCREEN_CENTER_Y-127;vertalign,bottom;zoom,0);
OnCommand=cmd(sleep,2.8;rotationz,67;linear,0.133;zoom,1.5;sleep,0.000;linear,0.133;zoom,1;sleep,5.1;linear,0.133;zoom,0);
};

LoadActor( "../Common ScreenStages/banner_frame_side" )..{
InitCommand=cmd(x,SCREEN_CENTER_X-146;y,SCREEN_CENTER_Y-127;vertalign,bottom;zoom,0);
OnCommand=cmd(rotationy,180;sleep,0.000;sleep,2.8;rotationz,67;linear,0.133;zoom,1.5;sleep,0.000;linear,0.133;zoom,1;sleep,5.1;linear,0.133;zoom,0);
};
};

if GAMESTATE:GetCurrentStageIndex() == 1 then
t[#t+1] =Def.ActorFrame{
LoadActor( "../Common ScreenStages/1" )..{
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;sleep,0.000;sleep,3.8;accelerate,0.3;rotationz,360;accelerate,0.05;zoom,1.6;decelerate,0.083;zoom,0.95;decelerate,0.016;zoom,1;sleep,3.5;linear,0.3;rotationz,-360;zoom,0;addy,60);
};
};
end

return t

Post #65 · Publicado en 2014-07-17 10:23:03pm Hace 9.9 años

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


Last updated: 2014-07-17 11:05pm
Try this: http://codepad.org/FDs6qcJf

Here are some thoughts:
1. You never use (or properly define) the variable curStage, so I deleted that.

2. You never use the playMode or sStage or tRemap variables, so I deleted those, too.

3. You put everything in its own ActorFrame, which is valid, but seems like overkill to me. See lines 3 through 11 of the codepad link. Sometimes putting things inside an ActorFrame is desirable, however. For example, if you wanted to move multiple Actors simultaneously, it would be easier to put them in an ActorFrame and then move that ActorFrame. ActorFrames are a special type of Actor, and as such, can have InitCommands, OnCommands, and [Thing]Commands, too. Learning to leverage this is worth undertaking. Let me know if you'd like an example of this.

4. I deleted the semicolons you didn't need.

5. This is kind of personal preference, but I find it easier to type _screen.cx instead of SCREEN_CENTER_X and _screen.cy instead of SCREEN_CENTER_Y. These convenience variables are defined in _fallback/Scripts/01 alias.lua

6. It appears that you're trying to load a unique graphic for each stage via an if statement (though, in the code above, you only do stage 1). Assuming that is what you're doing, it's better to use a single variable than a many-tiered if statement. See lines 36 through 56 of the codepad link.

7. You should handle Event Mode in some fashion. I'll leave that one as an exercise for you, but link you to my own theme's equivalent StageInformation file: http://codepad.org/uo6JUFbK

When you have more questions, just ask.

Post #66 · Publicado en 2014-07-17 11:56:41pm Hace 9.9 años

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

Quote: dbk2
Try this: http://codepad.org/FDs6qcJf

Here are some thoughts:
1. You never use (or properly define) the variable curStage, so I deleted that.

2. You never use the playMode or sStage or tRemap variables, so I deleted those, too.

3. You put everything in its own ActorFrame, which is valid, but seems like overkill to me. See lines 3 through 11 of the codepad link. Sometimes putting things inside an ActorFrame is desirable, however. For example, if you wanted to move multiple Actors simultaneously, it would be easier to put them in an ActorFrame and then move that ActorFrame. ActorFrames are a special type of Actor, and as such, can have InitCommands, OnCommands, and [Thing]Commands, too. Learning to leverage this is worth undertaking. Let me know if you'd like an example of this.

4. I deleted the semicolons you didn't need.

5. This is kind of personal preference, but I find it easier to type _screen.cx instead of SCREEN_CENTER_X and _screen.cy instead of SCREEN_CENTER_Y. These convenience variables are defined in _fallback/Scripts/01 alias.lua

6. It appears that you're trying to load a unique graphic for each stage via an if statement (though, in the code above, you only do stage 1). Assuming that is what you're doing, it's better to use a single variable than a many-tiered if statement. See lines 36 through 56 of the codepad link.

7. You should handle Event Mode in some fashion. I'll leave that one as an exercise for you, but link you to my own theme's equivalent StageInformation file: http://codepad.org/uo6JUFbK

When you have more questions, just ask.

I'll keep trying, but the code provided produced a blacked out screen much like some of my previous attempts. Thanks for the effort tho.

The LUA we're building is ScreenStageInformation underlay/default.lua, placed in BGAnimations.

I have separate png images of 1st ~ 9th, along with "1th", "2th" and "3th" for 11-13. I also have 1~9 images as the leading figure in 2-figure stage indices. I suspect it might be practical to make a font with these images, as long as I can still make the Stage ID do a little spin when it appears.

Post #67 · Publicado en 2014-07-18 01:24:42am Hace 9.9 años

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

Hmm. I didn't necessarily mean that you would just be able to copy and paste my code and that it would magically just work. There is too much of your theme I'm unfamiliar with/don't have access to. I meant that you could use it as food for thought.

I apologize if that was unclear.

Post #68 · Publicado en 2014-07-26 05:02:51am Hace 9.8 años

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


Last updated: 2014-07-26 05:02am
Quote: dbk2
Hmm. I didn't necessarily mean that you would just be able to copy and paste my code and that it would magically just work. There is too much of your theme I'm unfamiliar with/don't have access to. I meant that you could use it as food for thought.

I apologize if that was unclear.

No prob; And it just might give me the ideas I need yet.

I am thinking about the bitmapfont approach, but the Texture Font Generator doesn't start on my computer; see previous post.

I've now got most of my gameplay graphics in place, and now all my Stage Display on the pre-gameplay information needs only fine-tuning. I decided to build a font and display it as a text item rather than use a stack of if statements or a load of different graphic files.

I've been learning a few things about ScreenGameplay, in particular:

Within ScreenGameplay, there's metrics and images for LifeMeter, which itself makes use of StreamDisplay, which appears to be the glowing part of the lifemeter that grows and shrinks based on remaining health.

It is on this subject I could use a little help:

I found this function on the Default theme


PillTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) \
local offset = itemIndex / numItems \
local rate = 4 \
local fItemWidth = ( 256 / numItems ) \
self:x( ((itemIndex-(numItems/2))*fItemWidth) + ( numItems / 2 ) ); \
self:zoomtowidth(fItemWidth); \
self:diffuseramp(); \
self:effectcolor2(color("1,1,1,1")); \
self:effectcolor1(color("0.5,0.5,0.5,1")); \
self:effectclock('beat'); \
self:effecttiming(rate*0.75,rate*0.125,rate*0.125,0); \
self:effectoffset(1.25-offset); \
end;


I'd like to make the animation slower, and not have a part of the meter seemingly turn invisible. I tried adjusting the first effect color and the rate, but the effect wasn't noticeable.

Also, which metrics control its Size and screen position?

Post #69 · Publicado en 2014-07-26 05:59:16am Hace 9.8 años

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

"I'm honestly pissed off."
Quote: Musashi
I'd like to make the animation slower, and not have a part of the meter seemingly turn invisible. I tried adjusting the first effect color and the rate, but the effect wasn't noticeable.
If you're talking about the scrolling texture effect, it's hardcoded. I'm not sure what you're talking about when you say part of it turns invisible.
The effectcolor adds a diffuse color to the sprite, changing what color it is slightly. You probably just weren't looking close enough to notice the difference.
Quote
Also, which metrics control its Size and screen position?
The StreamDisplay as a whole is constructed as a bunch of "pills", which must be swallowed 2 every 3 hours until gone.
The number of pills is set by the NumPills metric in the StreamDisplay section.
The PillTransformFunction is called to position each pill and set its initial size and initial state. It's only called once for each pill, when the screen is loading.
The "self" parameter is the actual sprite for the pill.
offsetFromCenter is always -1. (the StreamDisplay isn't meant to have a center)
itemIndex is the index of the pill, from 0 to numItems-1
numItems is the number of pills.

The position of the StreamDisplay as a whole is controlled by the StreamX and StreamY metrics in the LifeMeterBar section.
The position of the LifeMeterBar is set by the LifeP1X and LifeP1Y metrics in the ScreenGameplay section. (similar metric names for P2)
So, the position of a pill is thus:
LifeP1X/Y + StreamX/Y + PillTransformFunction(pill, -1, pill_index, num_pills) = Position
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 #70 · Publicado en 2014-07-29 03:25:04am Hace 9.8 años

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

Thanks for the lifebar/stream info. I still haven't decided what I'm going to do for it, but I'm debating between an approach like the DDR X2 AC Preview or possibly using a custom like Moonlight does.

All the while, I've got the judgment and combo just about ready, although I was wondering if there was a metric or another command that will allow my FullComboW1, 2, and 3 Commands to take effect immediately, without requiring that a certain amount of the song already be played?

Post #71 · Publicado en 2014-07-29 03:29:36am Hace 9.8 años

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

"I'm honestly pissed off."
[Player]
PercentUntilColorCombo=0.25

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 #72 · Publicado en 2014-08-01 01:41:49pm Hace 9.8 años

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

Quote: Kyzentun
[Player]
PercentUntilColorCombo=0.25

Thanks; that's what I needed.

Gameplay has just about everything I need now, though I might see about some Danger graphics before I'm done. Along the way I had some strange observations:

I had a problem at one point where if I gave the combo special colors for Full Marvelous/Perfect, the Pulse effect would stop functioning. I solved this by putting the combo colors in the LUA instead of having FullComboW1Command in the metrics.

I also figured out how to fix the previous problem with the life bar stream display, where it was alternating between invisible (or in some cases my red header graphic) and normal-looking sections: simply add "(stretch)" to the filename of the stream display graphic.

Also: With my Select Style (Single/VS/Double) screen, I found that when Player 2 is alone, the "Gain Focus" animation of the Style Art is different from when Player 1 is alone. Both players present have the same animation as Player 1 alone. The controlling LUA doesn't have any code suggesting different Commands depending on Players present. I'll share it if anyone's curious, though I'm thinking the best workaround might be to require that both players be logged in to Select Versus or Double.

Up next is Evaluation, after that we'll be semi-operational.

I know I can use a button to skip from gameplay to evaluation, but for more instensive testing, can anyone recommend a very short song?

Post #73 · Publicado en 2014-08-01 06:07:19pm Hace 9.8 años

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

"retired"
SSC is about 20 seconds and I abuse the hell out of it during theme development.

Post #74 · Publicado en 2014-08-01 06:19:54pm Hace 9.8 años

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

"I'm honestly pissed off."
You can also just get to Evaluation, then use the debug menu to reload the screen after you change part of 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 #75 · Publicado en 2014-08-04 03:12:38am Hace 9.8 años

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

I attempted to Franken-theme the Full Combo flash at the end of the song from another Theme but it as yet won't appear. Adding it as a piece of the Overlay caused all the other gfx to vanish, to I'm experimenting with as an an Underlay. This is the default.lua I have for \BGAnimations\ScreenGameplay underlay :



local pn = ...;
assert(pn);

local Center1Player = PREFSMAN:GetPreference('Center1Player');
local NumPlayers = GAMESTATE:GetNumPlayersEnabled();
local NumSides = GAMESTATE:GetNumSidesJoined();
local pss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn);
local st = GAMESTATE:GetCurrentStyle():GetStepsType();

-- ComboGraphic
local bComboGraphic = ComboGraphic(pn);

local t = Def.ActorFrame {
OffCommand = function(self)
local grade = pss:GetGrade();
if grade ~= "Grade_Tier08" and pss:FullComboOfScore('TapNoteScore_W1') or pss:FullComboOfScore('TapNoteScore_W2') or pss:FullComboOfScore('TapNoteScore_W3') or pss:FullComboOfScore('TapNoteScore_W4') then
self:queuecommand("Fullcombo");
end;
end;
};

local function GetPosition(pn)
if Center1Player and NumPlayers == 1 and NumSides == 1 then return SCREEN_CENTER_X; end;
local strPlayer = (NumPlayers == 1) and "OnePlayer" or "TwoPlayers";
local strSide = (NumSides == 1) and "OneSide" or "TwoSides";
return THEME:GetMetric("ScreenGameplay","Player".. ToEnumShortString(pn) .. strPlayer .. strSide .."X");
end;

local function GradationWidth()
if st == "StepsType_Dance_Double" then return (2);
elseif st == "StepsType_Dance_Solo" then return (1.5);
else return (1);
end;
end;

local function DownGradationWidth()
if st == "StepsType_Dance_Double" then return (SCREEN_WIDTH);
elseif st == "StepsType_Dance_Solo" then return (384);
else return (256);
end;
end;

local function TextZoom()
if st == "StepsType_Dance_Double" then return (1.61);
elseif st == "StepsType_Dance_Solo" then return (1.3);
else return (1);
end;
end;

-- FullCombo color base from Default Extended by A.C
local function GetFullComboEffectColor(pss)
if pss:FullComboOfScore('TapNoteScore_W1') then
return color("#ffffff");
elseif pss:FullComboOfScore('TapNoteScore_W2') then
return color("#fafc44");
elseif pss:FullComboOfScore('TapNoteScore_W3') then
return color("#06fd32");
elseif pss:FullComboOfScore('TapNoteScore_W4') then
return color("#00ffff");
else
return color("#ffffff");
end;
end;

-- Ring color
local function GetRingColor(pss)
if pss:FullComboOfScore('TapNoteScore_W1') then
return color("#fff999");
elseif pss:FullComboOfScore('TapNoteScore_W2') then
return color("#fff999");
elseif pss:FullComboOfScore('TapNoteScore_W3') then
return color("#ffffe7");
elseif pss:FullComboOfScore('TapNoteScore_W4') then
return color("#ffffe7");
else
return color("#ffffff");
end;
end;

-- Sound
t[#t+1] = LoadActor("Combo_Splash") .. {
FullcomboCommand=function(self)
self:play();
end;
};

-- Parts
t[#t+1] = Def.ActorFrame{
InitCommand=cmd(x,GetPosition(pn);diffusealpha,0);
FullcomboCommand = function(self)
self:diffusealpha(1);
self:diffuse(GetFullComboEffectColor(pss));
end;

-- Note flash star
Def.ActorFrame{
InitCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+152);
else
self:y(SCREEN_CENTER_Y-160);
end;
end;
-- Left
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:addx(-32);
self:rotationz(-25);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(65);
self:linear(0.25);
self:zoom(0);
self:rotationz(155);
end;
};
-- Right
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:addx(32);
self:rotationz(35);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(-55);
self:linear(0.25);
self:zoom(0);
self:rotationz(-145);
end;
};
-- Left2
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:addx(-96);
self:rotationz(-60);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(30);
self:linear(0.25);
self:zoom(0);
self:rotationz(120);
end;
};
-- Right2
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:addx(96);
self:rotationz(90);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(0);
self:linear(0.25);
self:zoom(0);
self:rotationz(-90);
end;
};
-- Left3 Solo and Double
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" or st == "StepsType_Dance_Solo" then
self:diffusealpha(0.5);
self:addx(-160);
self:rotationz(-15);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(75);
self:linear(0.25);
self:zoom(0);
self:rotationz(165);
else
self:visible(false);
end;
end;
};
-- Right3 Solo and Double
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" or st == "StepsType_Dance_Solo" then
self:diffusealpha(0.5);
self:addx(160);
self:rotationz(90);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(0);
self:linear(0.25);
self:zoom(0);
self:rotationz(-90);
else
self:visible(false);
end;
end;
};
-- Left4 Double
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" then
self:visible(true);
self:diffusealpha(0.5);
self:addx(-224);
self:rotationz(-60);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(30);
self:linear(0.25);
self:zoom(0);
self:rotationz(120);
else
self:visible(false);
end;
end;
};
-- Right4 Double
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" then
self:diffusealpha(0.5);
self:addx(224);
self:rotationz(35);
self:zoomx(0.5);
self:zoomy(1);
self:linear(0.5);
self:zoom(0.3);
self:rotationz(-55);
self:linear(0.25);
self:zoom(0);
self:rotationz(-145);
else
self:visible(false);
end;
end;
};
};

-- Up gradation
LoadActor("Down") .. {
InitCommand=cmd(vertalign,bottom);
FullcomboCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_BOTTOM);
self:diffusealpha(0.5);
self:zoomx(GradationWidth());
self:zoomy(1);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(GradationWidth()+0.25);
self:zoomy(2);
self:linear(0.25);
self:zoomx(GradationWidth());
self:zoomy(1.5);
self:diffusealpha(0);
else
self:y(SCREEN_TOP);
self:diffusealpha(0.5);
self:zoomx(GradationWidth());
self:zoomy(-1);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(GradationWidth()+0.25);
self:zoomy(-2);
self:linear(0.25);
self:zoomx(GradationWidth());
self:zoomy(-1.5);
self:diffusealpha(0);
end;
end;
};

-- Slim light
Def.ActorFrame{
InitCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+152);
else
self:y(SCREEN_CENTER_Y-160);
end;
end;
-- Center
LoadActor("Slim") .. {
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
end;
};
-- Left
LoadActor("Slim") .. {
InitCommand=cmd(addx,-64);
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
end;
};
-- Right
LoadActor("Slim") .. {
InitCommand=cmd(addx,64);
FullcomboCommand=function(self)
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
end;
};
-- Solo and Double left
LoadActor("Slim") .. {
InitCommand=cmd(addx,-128);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" or st == "StepsType_Dance_Solo" then
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
else
self:visible(false);
end;
end;
};
-- Solo and Double right
LoadActor("Slim") .. {
InitCommand=cmd(addx,128);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" or st == "StepsType_Dance_Solo" then
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
else
self:visible(false);
end;
end;
};
-- Double left
LoadActor("Slim") .. {
InitCommand=cmd(addx,-192);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" then
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
else
self:visible(false);
end;
end;
};
-- Double right
LoadActor("Slim") .. {
InitCommand=cmd(addx,192);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" then
self:diffusealpha(0.5);
self:zoomx(0);
self:zoomy(0.5);
self:linear(0.25);
self:diffusealpha(0.25);
self:zoomx(1);
self:zoomy(1.75);
self:linear(0.25);
self:zoomx(0);
self:zoomy(0.5);
self:diffusealpha(0);
else
self:visible(false);
end;
end;
};
};
--[[
-- Star
LoadActor("Star") .. {
InitCommand=cmd(blend,Blend.Add);
FullcomboCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+152);
self:diffusealpha(1);
self:zoomx(0);
self:linear(0.1);
self:zoomx(4);
self:zoomy(1);
self:linear(0.12);
self:zoomx(1);
self:addy(-120);
self:linear(0.36);
self:addy(-360);
else
self:y(SCREEN_CENTER_Y-160);
self:diffusealpha(1);
self:zoomx(0);
self:linear(0.1);
self:zoomx(4);
self:zoomy(1);
self:linear(0.12);
self:zoomx(1);
self:addy(120);
self:linear(0.36);
self:addy(360);
end;
end;
}; ]]--

-- Down gradation
LoadActor("Down") .. {
InitCommand=cmd(vertalign,bottom);
FullcomboCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_TOP);
self:diffusealpha(0);
self:sleep(0.48);
self:diffusealpha(0.5);
self:zoomto(64,0);
self:linear(0.5);
self:zoomto(DownGradationWidth()+52,-480);
self:linear(0.3);
self:diffusealpha(0);
self:zoomto(DownGradationWidth(),-480);
else
self:y(SCREEN_BOTTOM);
self:diffusealpha(0);
self:sleep(0.48);
self:diffusealpha(0.5);
self:zoomto(64,0);
self:linear(0.5);
self:zoomto(DownGradationWidth()+52,480);
self:linear(0.3);
self:diffusealpha(0);
self:zoomto(DownGradationWidth(),480);
end;
end;
};

-- Left gradation
LoadActor("Gradation") .. {
InitCommand=cmd(vertalign,top;horizalign,right);
FullcomboCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_BOTTOM);
self:addx(46);
self:zoomx(0.75);
self:zoomy(-0.5);
self:diffusealpha(0);
self:sleep(0.24);
self:diffusealpha(1);
self:linear(0.24);
self:zoomy(-1);

self:linear(0.5);
self:zoomx(1);
self:addx(-14);
self:linear(0.1);
self:addx(-28);
self:linear(0.2);
self:addx(-GradationWidth()*128-64);
self:diffusealpha(0);
else
self:y(SCREEN_TOP);
self:addx(46);
self:zoomx(0.75);
self:zoomy(0.5);
self:diffusealpha(0);
self:sleep(0.24);
self:diffusealpha(1);
self:linear(0.24);
self:zoomy(1);

self:linear(0.5);
self:zoomx(1);
self:addx(-14);
self:linear(0.1);
self:addx(-28);
self:linear(0.2);
self:addx(-GradationWidth()*128-64);
self:diffusealpha(0);
end;
end;
};

-- Right gradation
LoadActor("Gradation") .. {
InitCommand=cmd(vertalign,top;horizalign,right);
FullcomboCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_BOTTOM);
self:addx(-46);
self:zoomx(-0.75);
self:zoomy(-0.5);
self:diffusealpha(0);
self:sleep(0.24);
self:diffusealpha(1);
self:linear(0.24);
self:zoomy(-1);

self:linear(0.5);
self:zoomx(-1);
self:addx(14);
self:linear(0.1);
self:addx(28);
self:linear(0.2);
self:addx(GradationWidth()*128+64);
self:diffusealpha(0);
else
self:y(SCREEN_TOP);
self:addx(-46);
self:zoomx(-0.75);
self:zoomy(0.5);
self:diffusealpha(0);
self:sleep(0.24);
self:diffusealpha(1);
self:linear(0.24);
self:zoomy(1);

self:linear(0.5);
self:zoomx(-1);
self:addx(14);
self:linear(0.1);
self:addx(28);
self:linear(0.2);
self:addx(GradationWidth()*128+64);
self:diffusealpha(0);
end;
end;
};

-- Double only left gradation2
LoadActor("Gradation") .. {
InitCommand=cmd(horizalign,right);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" then
self:y(SCREEN_CENTER_Y);
self:addx(46);
self:diffusealpha(0);
self:zoomx(0.75);
self:sleep(0.98);
self:linear(0.1);
self:diffusealpha(1);
self:zoomx(1);
self:addx(-14);
self:linear(0.1);
self:addx(-28);
self:linear(0.2);
self:addx(-GradationWidth()*128-64);
self:diffusealpha(0);
else
self:visible(false);
end;
end;
};

-- Double only right gradation2
LoadActor("Gradation") .. {
InitCommand=cmd(horizalign,right);
FullcomboCommand=function(self)
if st == "StepsType_Dance_Double" then
self:y(SCREEN_CENTER_Y);
self:addx(-46);
self:diffusealpha(0);
self:zoomx(-0.75);
self:sleep(0.98);
self:linear(0.1);
self:diffusealpha(1);
self:zoomx(-1);
self:addx(14);
self:linear(0.1);
self:addx(28);
self:linear(0.2);
self:addx(GradationWidth()*128+64);
self:diffusealpha(0);
else
self:visible(false);
end;
end;
};

-- Ring star
LoadActor( "Star" ) .. {
InitCommand=function(self)
self:zoom(0);
self:blend(Blend.Add);
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+57);
else
self:y(SCREEN_CENTER_Y-65);
end;
end;
FullcomboCommand=function(self)
self:sleep(0.65);
self:diffusealpha(1);
self:zoomx(2);
self:zoomy(0);
self:linear(0.1);
self:zoomy(2);
self:rotationz(0);
self:linear(0.5);
self:zoom(1.2);
self:diffusealpha(0.4);
self:rotationz(90);
self:linear(0.05);
self:diffusealpha(0);
end;
};


};

-- Ring
t[#t+1] = Def.ActorFrame{
InitCommand=cmd(x,GetPosition(pn);diffusealpha,0);
FullcomboCommand=cmd(diffusealpha,1);
-- Ring star highlight
LoadActor( "SStar" ) .. {
InitCommand=function(self)
self:zoom(0);
self:blend(Blend.Add);
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+57);
else
self:y(SCREEN_CENTER_Y-65);
end;
end;
FullcomboCommand=function(self)
self:diffuse(color("#ffffff"));
self:sleep(0.65);
self:diffusealpha(0.8);
self:zoomx(2);
self:zoomy(0);
self:linear(0.1);
self:zoomy(2);
self:rotationz(0);
self:linear(0.5);
self:zoom(1.2);
self:rotationz(90);
self:diffusealpha(0.4);
self:linear(0.05);
self:diffusealpha(0);
end;
};
-- Ring
LoadActor( "Fullcombo01" ) .. {
InitCommand=function(self)
self:zoom(0);
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+57);
else
self:y(SCREEN_CENTER_Y-65);
end;
end;
FullcomboCommand=function(self)
self:diffuse(GetRingColor(pss));
self:sleep(0.65);
self:zoomx(2);
self:zoomy(0);
self:linear(0.1);
self:zoomy(2);
self:rotationz(0);
self:linear(0.5);
self:zoom(1.2);
self:rotationz(90);
self:linear(0.15);
self:zoomy(0);
self:zoomx(0.5);
self:diffusealpha(0);
end;
};
-- Ring bar
LoadActor( "Fullcombo02" ) .. {
InitCommand=function(self)
self:zoom(0);
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+57);
else
self:y(SCREEN_CENTER_Y-65);
end;
end;
FullcomboCommand=function(self)
self:diffuse(GetRingColor(pss));
self:sleep(0.65);
self:zoomx(4);
self:zoomy(0);
self:linear(0.1);
self:zoomy(4);
self:rotationz(0);
self:linear(0.5);
self:zoom(1.25);
self:rotationz(-90);
self:linear(0.15);
self:zoomy(0);
self:zoomx(0.5);
self:diffusealpha(0);
end;
};
};

-- Star highlight
t[#t+1] = LoadActor("SStar") .. {
InitCommand=cmd(x,GetPosition(pn);diffusealpha,0;blend,Blend.Add);
FullcomboCommand=function(self)
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+152);
self:diffusealpha(0.95);
self:zoomx(0);
self:linear(0.1);
self:zoomx(4);
self:zoomy(1);
self:linear(0.12);
self:zoomx(1);
self:addy(-120);
self:linear(0.36);
self:addy(-360);
else
self:y(SCREEN_CENTER_Y-160);
self:diffusealpha(0.95);
self:zoomx(0);
self:linear(0.1);
self:zoomx(4);
self:zoomy(1);
self:linear(0.12);
self:zoomx(1);
self:addy(120);
self:linear(0.36);
self:addy(360);
end;
end;
};

-- FullCombo Text
t[#t+1] = Def.Sprite {
InitCommand=function(self)
self:x(GetPosition(pn));
self:diffusealpha(0);
if GAMESTATETonguelayerIsUsingModifier(pn,'reverse') then
self:y(SCREEN_CENTER_Y+57);
else
self:y(SCREEN_CENTER_Y-65);
end;
end;
FullcomboCommand=function(self)
if pss:FullComboOfScore('TapNoteScore_W1') then
if bComboGraphic == 'x3' or bComboGraphic == '2013' then
if GetScreenAspectRatio() > 1.7 then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X3_Marvelous_FullCombo"));
else
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X3_Marvelous2_FullCombo"));
end;
elseif bComboGraphic == 'x2' then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X2_Marvelous_FullCombo"));
else
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_Marvelous_FullCombo"));
end;
elseif pss:FullComboOfScore('TapNoteScore_W2') then
if bComboGraphic == 'x3' or bComboGraphic == '2013' then
if GetScreenAspectRatio() > 1.7 then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X3_Perfect_FullCombo"));
else
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X3_Perfect2_FullCombo"));
end;
elseif bComboGraphic == 'x2' then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X2_Perfect_FullCombo"));
else
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_Perfect_FullCombo"));
end;
elseif pss:FullComboOfScore('TapNoteScore_W3') then
if bComboGraphic == 'x3' or bComboGraphic == '2013' then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X3_Great_FullCombo"));
elseif bComboGraphic == 'x2' then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X2_Great_FullCombo"));
else
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_Great_FullCombo"));
end;
elseif pss:FullComboOfScore('TapNoteScore_W4') then
if bComboGraphic == 'x3' or bComboGraphic == '2013' then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X3_Good_FullCombo"));
elseif bComboGraphic == 'x2' then
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_X2_Good_FullCombo"));
else
self:Load(THEME:GetPathB("ScreenGameplay","underlay/Text_Good_FullCombo"));
end;
end;
self:sleep(0.6);
self:diffusealpha(1);
self:zoomy(0);
self:linear(0.1);
self:zoom(TextZoom());
self:linear(0.5);
self:zoom(TextZoom()*1.15);
self:linear(0.05);
self:diffusealpha(0.66);
self:zoomx(TextZoom()*1.165);
self:linear(0.1);
self:zoomy(0);
self:zoomx(TextZoom()*1.195);
self:diffusealpha(0);
end;
};

return t;


I'm pretty sure I have all the graphics called for. They all have a (doubleres) appended to them if that affects things.

This script works for the Theme I stole it from; not sure why it won't work for mine. I added Metrics for PlayerP1OnePlayerOneSideX etc. Are there other Scripts/Metrics I need? Or is there some typo I just didn't see?

Post #76 · Publicado en 2014-08-04 03:22:22am Hace 9.8 años

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

"I'm honestly pissed off."

Last updated: 2014-08-04 03:25am
Whoever wrote that code needs to learn how to use a loop. There's no reason to copy paste 16 lines of code 8 times when the only differences are the x position and the rotation.

http://www.lua.org/pil/4.3.5.html
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 #77 · Publicado en 2014-08-05 03:44:46am Hace 9.8 años

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

Quote: Kyzentun
Whoever wrote that code needs to learn how to use a loop. There's no reason to copy paste 16 lines of code 8 times when the only differences are the x position and the rotation.

http://www.lua.org/pil/4.3.5.html

If I've time I could consider cleaning up the stolen code.

In any event, after much madness, I finally have some of the Full Combo Flash happening. Although I coulda swore at some point I had code not working, then the exact same code working, but maybe not.

I started by disabling all the code with --[[ --]] borders, then I've been reactivating statement by statement, although any time I find and fix an offending statement, I usually try to full activate it just to see I'm done. As before, I'm using test pictures to see if the layer is compiling.

One such offender was a call for Combographic(mpn), with mpn being a local for Master Player Number. My first thought was that the theme I'm cannibalizing must have a Script where function Combographic(var1) is defined, but I combed every script I saw and found nothing. Although, I DID find this one function called FirstRemix_ComboGraphic, but you can't call a function by typing only part of its name...right?

But yea, the good news is that I have the flash sound playing when a full combo is scored, but not when combo is broken, so the rest of the FC flash is most definitely within reach.

Post #78 · Publicado en 2014-08-05 08:16:57am Hace 9.8 años

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


Last updated: 2014-08-05 08:17am
Quote: Musashi
Are there other Scripts/Metrics I need? Or is there some typo I just didn't see?

Are you using a nightly build of SM5? As noted in this thread:

Quote: Kyzentun
when an error occurs, it will be reported on screen in stepmania, pop up a dialog box, and record the error in the log file. Previously, if you wanted to know if there were errors in your theme, you had to open up Logs/log.txt and look at it. Adding on screen error reporting should make finding theme mistakes much easier.

Post #79 · Publicado en 2014-08-05 11:42:15am Hace 9.8 años

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

Quote: dbk2
Quote: Musashi
Are there other Scripts/Metrics I need? Or is there some typo I just didn't see?

Are you using a nightly build of SM5? As noted in this thread:

Quote: Kyzentun
when an error occurs, it will be reported on screen in stepmania, pop up a dialog box, and record the error in the log file. Previously, if you wanted to know if there were errors in your theme, you had to open up Logs/log.txt and look at it. Adding on screen error reporting should make finding theme mistakes much easier.

This would be the first I've heard about nightly builds. I can check it out later.

Post #80 · Publicado en 2014-08-05 05:47:56pm Hace 9.8 años

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

"I'm honestly pissed off."
Quote: Musashi
This would be the first I've heard about nightly builds. I can check it out later.
I posted a thread about nightly builds 1.5 months ago.
http://zenius-i-vanisher.com/v5.2/viewthread.php?threadid=6740
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.
Registrarse Conectarse Regresar A Los Foros

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

©2006-2024 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 8% · Database: 4% · Server Time: 2024-06-13 05:08:46
Esta página tomó 0.018 segundos en ejecutarse.
Theme: starlight · Language: spanish
Reset Theme & Language