Logo

DDR II (Wii) Screen Filters implementation

Register Log In Back To Forums

Post #1 · Posted at 2018-01-20 03:15:01am 6.1 years ago

Offline clydedatastruct
clydedatastruct Avatar Member
10 Posts
Not Set
Reg. 2017-12-24


Last updated: 2018-02-08 07:55am
Anyone know where I can find those screen filters that look like these:
https://www.gamezone.com/wp-content/uploads/2017/10/ddrii_2.jpg
(image found on Google Search)

Post #2 · Posted at 2018-01-20 03:54:04am 6.1 years ago

Offline SupremeX
SupremeX Avatar Member
1,652 Posts
Not Set
Reg. 2010-01-25

what kind of filters you are talking about?
https://zenius-i-vanisher.com/simfiles/DDR%20GOLD%2020%20simfiles/DDR%20GOLD%2020%20simfiles.png?1620131017 https://i.imgur.com/HXpMEwl.png
10 years OMG. 10 years in this forum. I can't believe this!!!

Post #3 · Posted at 2018-01-20 04:02:01am 6.1 years ago

Offline Zowayix
Zowayix Avatar Member
1,144 Posts
Not Set
Reg. 2009-09-19

The pattern that appears behind the lane of arrows to distinguish it from the background, like the Screen Filter mod from DDR X onward.

Post #4 · Posted at 2018-01-20 04:06:28am 6.1 years ago

Offline SupremeX
SupremeX Avatar Member
1,652 Posts
Not Set
Reg. 2010-01-25


Last updated: 2018-01-20 04:07am
ouu ok, so I have the blue one in a stepmania theme which i save it in a CD. It will take time looking for it.
https://zenius-i-vanisher.com/simfiles/DDR%20GOLD%2020%20simfiles/DDR%20GOLD%2020%20simfiles.png?1620131017 https://i.imgur.com/HXpMEwl.png
10 years OMG. 10 years in this forum. I can't believe this!!!

Post #5 · Posted at 2018-01-21 04:27:19am 6.1 years ago

Offline reiaya
reiaya Avatar Member
81 Posts
Colombia
Reg. 2006-08-18


Last updated: 2018-01-21 04:27am

Post #6 · Posted at 2018-01-21 06:23:23am 6.1 years ago

Offline clydedatastruct
clydedatastruct Avatar Member
10 Posts
Not Set
Reg. 2017-12-24


Last updated: 2018-01-21 06:43am
Thanks! Now to try to integrate this into Inori's X3 theme (which I use at the moment).

EDIT: This code got me stuck (Notefield board.lua)

--Lifted from default, appears to have been written by Kyzentun
local filter_color= color("0,0,0,1")
local this_pn

local args= {
--the danger display
Def.Quad{
InitCommand=function(self) self
:diffusealpha(0)
:diffuseshift()
:effectcolor1(color("1,0,0,0.8"))
:effectcolor2(color("1,0,0,0"))
:effectclock("music")
:fadeleft(1/32)
:faderight(1/32)
:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
this_pn= pn
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
HealthStateChangedMessageCommand= function(self, param)
if this_pn and param.PlayerNumber == this_pn then
self:linear(0.1)
:diffusealpha((param.HealthState == 'HealthState_Danger') and 1 or 0)
end
end
},
--the screen filter
Def.Quad{
InitCommand= function(self)
self:hibernate(math.huge):diffuse(filter_color)
:fadeleft(1/32)
:faderight(1/32)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
local style= GAMESTATE:GetCurrentStyle(pn)
local alf= getenv("ScreenFilter"..ToEnumShortString(pn)) or 0
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):diffusealpha(alf/10):hibernate(0)
end,
}
}

return Def.ActorFrame(args)

Post #7 · Posted at 2018-01-24 04:57:37pm 6.1 years ago

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

I'm actually going to start on a version of the DDR II filters that is compatible with Inori's X3 and related themes pretty soon.

Post #8 · Posted at 2018-02-08 07:54:15am 6.1 years ago

Offline clydedatastruct
clydedatastruct Avatar Member
10 Posts
Not Set
Reg. 2017-12-24

Tried to implement the filter feature myself, but it didn't work. Here are the files I changed (using Inori's X3 theme here):

Languages/en.ini:

[OptionTitles]
...
FilterWiiStyle=WII
...


Scripts/ThemePrefs.ini:

function OptionRowScreenFilter()
-- (previous code)
Choices = { THEME:GetString('OptionNames','Off'),
THEME:GetString('OptionTitles', 'FilterDark'),
THEME:GetString('OptionTitles', 'FilterDarker'),
THEME:GetString('OptionTitles', 'FilterDarkest'),
THEME:GetString('OptionTitles', 'FilterWiiStyle'),
},
-- (following code)


And tried to mess with Graphics/NoteField board.lua but did not work. Some commented codes are already tried but did not fix:

--Lifted from default, appears to have been written by Kyzentun
local filter_color= color("0,0,0,1")
local this_pn

local args= {
--the danger display
Def.Quad{
InitCommand=function(self) self
:diffusealpha(0)
:diffuseshift()
:effectcolor1(color("1,0,0,0.8"))
:effectcolor2(color("1,0,0,0"))
:effectclock("music")
:fadeleft(1/32)
:faderight(1/32)
:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
this_pn= pn
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
HealthStateChangedMessageCommand= function(self, param)
if this_pn and param.PlayerNumber == this_pn then
self:linear(0.1)
:diffusealpha((param.HealthState == 'HealthState_Danger') and 1 or 0)
end
end
},
--the screen filter
Def.Quad{
InitCommand= function(self)
self:hibernate(math.huge):diffuse(filter_color)
:fadeleft(1/32)
:faderight(1/32)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
local style= GAMESTATE:GetCurrentStyle(pn)
local alf= getenv("ScreenFilter"..ToEnumShortString(pn)) or 0
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):diffusealpha(alf/10):hibernate(0)
end,
}
}

local args2 = {
--the danger display
Def.Quad{
InitCommand=function(self) self
:diffusealpha(0)
:diffuseshift()
:effectcolor1(color("1,0,0,0.8"))
:effectcolor2(color("1,0,0,0"))
:effectclock("music")
:fadeleft(1/32)
:faderight(1/32)
:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
this_pn= pn
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
HealthStateChangedMessageCommand= function(self, param)
if this_pn and param.PlayerNumber == this_pn then
self:linear(0.1)
:diffusealpha((param.HealthState == 'HealthState_Danger') and 1 or 0)
end
end
},
--the screen filter
--[[
Def.Quad{
InitCommand= function(self)
self:hibernate(math.huge):diffuse(filter_color)
:fadeleft(1/32)
:faderight(1/32)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
local style= GAMESTATE:GetCurrentStyle(pn)
local alf= getenv("ScreenFilter"..ToEnumShortString(pn)) or 0
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):diffusealpha(alf/10):hibernate(0)
end,
}
]]
Def.Sprite{
Name="WiiScreenFilter",
Texture=THEME:GetCurrentThemeDirectory() .. "Graphics/Filters/4Panel_Blue.png",
InitCommand=function(self)
self:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
}
}

--if getenv("ScreenFilter"..ToEnumShortString(PlayerNumber)) < 10
return Def.ActorFrame(args)
--else
-- return Def.ActorFrame(args2)
--end



Was wondering now what did I do wrong when implementing the filter.

Post #9 · Posted at 2018-02-08 09:38:16pm 6.1 years ago

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

Did you update ChoiceToAlpha also?

(That said, I really should get to work on a proper version of this.)

Post #10 · Posted at 2018-02-09 01:00:33am 6.1 years ago

Offline clydedatastruct
clydedatastruct Avatar Member
10 Posts
Not Set
Reg. 2017-12-24

Yes.


local choiceToAlpha = {0, 3, 6, 9, 10}
local alphaToChoice = {[0]=1, [3]=2, [6]=3, [9]=4, [10]=5}

Post #11 · Posted at 2018-02-09 01:21:14am 6.1 years ago

Offline reiaya
reiaya Avatar Member
81 Posts
Colombia
Reg. 2006-08-18


Last updated: 2018-02-09 01:21am
These filters have already been implemented in the old theme of the "DDR 2013" by Strider...



I leave this video where I have added them in the latest version of the theme "DDR A" by Kemp

Post #12 · Posted at 2018-02-09 05:00:49am 6.1 years ago

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

Oh, you're doing ToEnumShortString(PlayerNumber). In that context, PlayerNumber is actually the global variable that represents the PlayerNumber enum, so ToEnumShortString won't work. The easiest thing to do would probably be to have both filters load themselves and have whichever filter is not in use hide itself or maybe just not quit hibernating when it gets the PlayerStateSetCommand.

Post #13 · Posted at 2018-02-09 06:22:09am 6.1 years ago

Offline clydedatastruct
clydedatastruct Avatar Member
10 Posts
Not Set
Reg. 2017-12-24

Oh.
The other thing that stumped me is how to convert a Quad to an Actor to make this work. The arcade-style filters in Inori's theme use Quads while the DDR II-styled filters are actual images.

Post #14 · Posted at 2018-02-09 04:24:03pm 6.1 years ago

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

Quads are actors, the only difference between a Quad and a Sprite (well, not the only one, but the only salient one here) is that Sprites have a Texture that shows the image to display. In this case, you'd just put both the Quad and the Sprite into the same actor frame, given that your definition for the Sprite at least looks fine at first glance.

Post #15 · Posted at 2018-02-10 03:02:14am 6.1 years ago

Offline clydedatastruct
clydedatastruct Avatar Member
10 Posts
Not Set
Reg. 2017-12-24

Here's my Notefield board.lua modification as of this moment.
Tried getting the alpha value directly from the args but it didn't work.

--Lifted from default, appears to have been written by Kyzentun
local filter_color= color("0,0,0,1")
local this_pn
local this_alf

local args= {
--the danger display
Def.Quad{
InitCommand=function(self) self
:diffusealpha(0)
:diffuseshift()
:effectcolor1(color("1,0,0,0.8"))
:effectcolor2(color("1,0,0,0"))
:effectclock("music")
:fadeleft(1/32)
:faderight(1/32)
:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
this_pn= pn
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
HealthStateChangedMessageCommand= function(self, param)
if this_pn and param.PlayerNumber == this_pn then
self:linear(0.1)
:diffusealpha((param.HealthState == 'HealthState_Danger') and 1 or 0)
end
end
},
--the screen filter
Def.Quad{
InitCommand= function(self)
self:hibernate(math.huge):diffuse(filter_color)
:fadeleft(1/32)
:faderight(1/32)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
local style= GAMESTATE:GetCurrentStyle(pn)
local alf= getenv("ScreenFilter"..ToEnumShortString(pn)) or 0
this_alf = alf
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):diffusealpha(alf/10):hibernate(0)
end,
}
}

local args2 = {
--the danger display
Def.Quad{
InitCommand=function(self) self
:diffusealpha(0)
:diffuseshift()
:effectcolor1(color("1,0,0,0.8"))
:effectcolor2(color("1,0,0,0"))
:effectclock("music")
:fadeleft(1/32)
:faderight(1/32)
:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
this_pn= pn
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
HealthStateChangedMessageCommand= function(self, param)
if this_pn and param.PlayerNumber == this_pn then
self:linear(0.1)
:diffusealpha((param.HealthState == 'HealthState_Danger') and 1 or 0)
end
end
},
--the screen filter
Def.Sprite{
Name="WiiScreenFilter",
Texture=THEME:GetCurrentThemeDirectory() .. "Graphics/Filters/4Panel_Blue.png",
InitCommand=function(self)
self:hibernate(math.huge)
end,
PlayerStateSetCommand= function(self, param)
local pn= param.PlayerNumber
local style= GAMESTATE:GetCurrentStyle(pn)
local width= style:GetWidth(pn) + 32
self:setsize(width, _screen.h*4096):hibernate(0)
end,
}
}

if this_alf < 10
return Def.ActorFrame(args)
else
return Def.ActorFrame(args2)
end

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: 4% · Database: 4% · Server Time: 2024-03-29 13:54:06
This page took 0.011 seconds to execute.
Theme: starlight · Language: englishuk
Reset Theme & Language