#Themekit PIU
#Base para hacer Themes PIU
#Indice

#01# - System
#02# - Pantallas
#03# - Attract loop
#04# - Gameplay loop
#05# - Otras pantallas/debug

;Nota: las anotaciones en los luas están en inglés porque se me dió la gana

#00# - Antes de todo
;[Global]
;FallbackTheme=_themekit_piu

#01# - System
[ArrowEffects]
;En PIU las flechas están separadas 60 pixeles
ArrowSpacing=60

[Background]
;em, no
ShowDancingCharacters=false
;ala prex3 pc?
UseStaticBackground=false

[Common]
;InitialScreen="ScreenInit"
AutoSetStyle=true
DefaultModifiers="1x"
StepsTypesToHide="pump-couple,dance-double,dance-couple,dance-solo,dance-routine,lights-cabinet"
;Si no se usa, no sé siquiera por qué los pongo así
ColorP1Command=diffuse,color("#FFFFFF")
ColorP2Command=diffuse,color("#FFFFFF")

;ya no lo necesito
[CodeDetector]
PrevSteps1=""
PrevSteps2=""
NextSteps1=""
NextSteps2=""

;groups
NextGroup=""
PrevGroup=""

;Sorting
NextSort1=""
NextSort2=""
NextSort3=""
NextSort4=""

;Demases
ModeMenu1=""
ModeMenu2=""
Mirror=""
Left=""
Right=""
Shuffle=""
SuperShuffle=""
NextTransform=""
NextScrollSpeed=""
PreviousScrollSpeed=""
NextAccel=""
NextEffect=""
NextAppearance=""
NextTurn=""
Reverse=""
HoldNotes=""
Mines=""
Dark=""
CancelAll=""
NextTheme=""
NextTheme2=""
NextAnnouncer=""
NextAnnouncer2=""
NextBannerGroup=""
NextBannerGroup2=""
Hidden=""
RandomVanish=""
SaveScreenshot1=""
SaveScreenshot2=""
CancelAllPlayerOptions=""
BackInEventMode=""

[CustomDifficulty]
;Screwy
Names=""

[Gameplay]
ComboIsPerRow=true
MinScoreToContinueCombo="TapNoteScore_W3"
MinScoreToMaintainCombo="TapNoteScore_W4"

[GameState]
GradeTierForExtra1="Grade_Tier03"
GradeTierForExtra2="Grade_Tier03"
MinDifficultyForExtra="Difficulty_Beginner"

AreStagePlayerModsForced=false
AreStageSongModsForced=false

AllowExtra2=false
LockExtraStageSelection=false

[HoldJudgment]
# no
HoldJudgmentLetGoCommand=visible,false
HoldJudgmentHeldCommand=visible,false

[LifeMeterBar]
;note scores
;ADD
LifePercentChangeCheckpointHit=0.008
LifePercentChangeHeld=0.000
LifePercentChangeW1=0.008
LifePercentChangeW2=0.008
LifePercentChangeW3=0.004
;STAY
LifePercentChangeW4=0.000
LifePercentChangeLetGo=0.000
;SUBSTRACT
LifePercentChangeW5=-0.040
LifePercentChangeMiss=-0.080
LifePercentChangeCheckpointMiss=-0.080
;mines
LifePercentChangeHitMine=-0.160

;no pierdes vida si presionas bads
MinStayAlive="TapNoteScore_W5"
;como no funciona de ese modo...
LifeMultiplier=1.2

;la mitad desde el inicio...
InitialValue=0.5

[MenuTimer]
WarningStart=0
WarningBeepStart=11

Text1OnCommand=stopeffect;stoptweening;shadowlength,0;
Text1FormatFunction=function(fSeconds) return string.format("%02i",fSeconds) end;
Text2OnCommand=visible,false

Warning0Command=

[MusicWheel]
SwitchSeconds=0.1
ShowRoulette=false
;probando cosas...
;coverflowish
ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) \
	local x = offsetFromCenter * 250 \
	if offsetFromCenter >= 1 then \
		x = scale(offsetFromCenter+1,-1,1,-0.5,0.5) * 250 \
	elseif offsetFromCenter <= -1 then \
		x = scale(offsetFromCenter-1,-1,1,-0.5,0.5) * 250 \
	end \
	self:x( x ) \
	self:z((-clamp(math.abs(offsetFromCenter),0,1)*250)-math.abs(offsetFromCenter)) \
	self:rotationy( clamp( offsetFromCenter, -1, 1) * 90) \
end;
;7 items
NumWheelItems=7
;sólo dos por el momento, si ocupas más solo acomódalo en tu theme...
SortOrders={ "SortOrder_Group", "SortOrder_Genre" }

;limpio de toda impureza... quiero discs en mi musicwheel :3
[MusicWheelItem]
SongNameOnCommand=zoom,0
CourseOnCommand=zoom,0
SectionExpandedOnCommand=zoom,0
SectionCollapsedOnCommand=zoom,0
SectionCountOnCommand=zoom,0
RouletteOnCommand=zoom,0
SortOnCommand=zoom,0
ModeOnCommand=zoom,0
GradesShowMachine=false

[Player]
ReceptorArrowsYStandard=-173
ReceptorArrowsYReverse=173
DrawDistanceBeforeTargetsPixels=SCREEN_HEIGHT
DrawDistanceAfterTargetsPixels=-100

JudgeHoldNotesOnSameRowTogether=false
HoldCheckpoints=true
CheckpointsUseTimeSignatures=true
CheckpointsTapsSeparateJudgment=false
CheckpointsFlashOnHold=true
ImmediateHoldLetGo=false
RequireStepOnHoldHeads=false
InitialHoldLife=1
MaxHoldLife=1
RollBodyIncrementsCombo=false
ScoreMissedHoldsAndRolls=false

;Grades
[PlayerStageStats]
NumGradeTiersUsed=7
;S
GradePercentTier01=1
;S
GradePercentTier02=1
;A
GradePercentTier03=0.8
;B
GradePercentTier04=0.6
;C
GradePercentTier05=0.4
;D
GradePercentTier06=0.2
;F
GradePercentTier07=-999999
;FPC = SS
GradeTier01IsAllW2s=true
GradeTier02IsAllW2s=false
;FC = S
GradeTier02IsFullCombo=true

[SongManager]
ExtraColorMeter=17
ExtraStage2DifficultyMax=999
NumSongGroupColors=1
SongGroupColor1=color("#ffffff")

#02# - Pantallas
[Screen]
ShowCreditDisplay=true

[ScreenOptionsMaster]
SongMenu="7"
SongMenuDefault=""
SongMenu,1="name,Speed;screen,Speed"
SongMenu,2="name,Noteskins;screen,Noteskins"
SongMenu,3="name,FadeNotes;screen,FadeNotes"
SongMenu,4="name,Scroll;screen,Scroll"
SongMenu,5="name,Effect;screen,Effect"
SongMenu,6="name,Receptor;screen,Receptor"
SongMenu,7="name,ResetOptions"

Speed="10"
SpeedDefault="mod,1x,no randomspeed"
Speed,1="mod,0.5x;name,0.5x"
Speed,2="mod,1x;name,1x"
Speed,3="mod,1.5x;name,1.5x"
Speed,4="mod,2x;name,2x"
Speed,5="mod,3x;name,3x"
Speed,6="mod,4x;name,4x"
Speed,7="mod,5x;name,5x"
Speed,8="mod,6x;name,6x"
Speed,9="mod,7x;name,7x"
Speed,10="mod,8x;name,8x"

FadeNotes="5;selectmultiple"
FadeNotesDefault="mod,no hidden,no sudden,no stealth,no blink"
FadeNotes,1="name,Vanish;mod,hidden"
FadeNotes,2="name,RndVanish;mod,randomvanish"
FadeNotes,3="name,Appear;mod,sudden"
FadeNotes,4="name,Nonstep;mod,stealth"
FadeNotes,5="name,Flash;mod,blink"

Scroll="5;selectmultiple"
ScrollDefault="mod,no boost,no brake,no wave,no expand,no xmode"
Scroll,1="name,Accel;mod,boost"
Scroll,2="name,Decel;mod,brake"
Scroll,3="name,Worm;mod,expand"
Scroll,4="name,Wave;mod,wave"
Scroll,5="name,XMode;mod,xmode"

Effect="6;selectmultiple"
EffectDefault="mod,no dizzy,no tornado,no drunk,no beat,no tiny,no bumpy"
Effect,1="name,Spin;mod,628% dizzy"
Effect,2="name,Snake;mod,25% tornado"
Effect,3="name,Drift;mod,drunk"
Effect,4="name,Beat;mod,beat"
Effect,5="name,Shrink;mod,tiny"
Effect,6="name,Jumps;mod,bumpy"

Receptor="5;selectmultiple"
ReceptorDefault="mod,no dark,no reverse,no centered"
Receptor,1="name,Freedom;mod,dark"
Receptor,2="name,Reverse;mod,reverse"
Receptor,3="name,Center;mod,centered"
Receptor,4="name,Flip;mod flip"
Receptor,5="name,Invert,mod, invert"

[ScreenPlayerOptions]
;LineNames="1,2,3,4,5,6,7,8,14"
LineNames="1,8"
;Line1="lua,SpeedMods()"
Line1="list,Speed"

[ScreenWithMenuElements]
TimerX=SCREEN_CENTER_X
TimerY=10
TimerOnCommand=
TimerOffCommand=

#03# - Attract loop
[ScreenInit]
PlayMusic=true

#04# - Gameplay loop

;82w
[ScreenTitleMenu]
;Next, Prev y CoinChange Screen
PrevScreen="ScreenInit"
NextScreen="ScreenTitleMenu"
CoinModeChangeScreen="ScreenTitleMenu"

;choices
ChoiceNames="1,2,3,5"
Choice1="text,Play;applydefaultoptions;difficulty,beginner;screen,ScreenProfileLoad"
;ScreenProfileLoad"
Choice2="text,Options;screen,ScreenOptionsService"
Choice3="text,Editor;screen,ScreenOptionsEdit"
Choice4="text,Test;screen,ScreenTest"
Choice5="text,Exit;screen,ScreenExit"

;el scroller
LoopScroller=true
WrapScroller=true
ScrollerSecondsPerItem=0.1
ScrollerNumItemsToDraw=5

ScrollerX=SCREEN_CENTER_X
ScrollerY=SCREEN_CENTER_Y
ScrollerTransform=function(self,offset,itemIndex,numItems) self:x(offset * 200); end

[ScreenProfileLoad]
NextScreen="ScreenSelectMusic"
PrevScreen="ScreenTitleMenu"

;099
[ScreenSelectMusic]
;settings
NextScreen="ScreenStageInformation"
PrevScreen="ScreenProfileSave"
;"ScreenTitleMenu"
;mucho tiempo, aprovéchalo
TimerSeconds=100
;no
ShowOptionsMessageSeconds=0
;em
ScreenModsCommand=
;si, eso
DefaultSort="Group"
;¡No!
DoRouletteOnMenuTimer=false

;plz
SampleMusicLoops=false
SampleMusicDelay=0.5
SampleMusicDelayInit=1.5
;1: oye, esto para qué es?
;2: ez - no - hd - cz - fs - nm - ez - no - hd - cz - fs - nm - ez
;1: ok ok, ya entendí...
WrapChangeSteps=true
;un pequeño agregado mío...
ChangeStepsWithGameButtons=true
PreviousDifficultyButton="MenuUp"
NextDifficultyButton="MenuDown"
########################
# Custom code detector #
########################
CodeNames=GetUserPrefB("OptionsMode") and "Summon" or "Noteskin,Speed,Cancel,Hidden,SuperShuffle,XMode,Left,Dark,GradeReverse"
;main codes
CodeNoteskin="UpLeft,Center,UpRight,Center"
CodeSpeed="UpLeft,UpRight,UpLeft,UpRight,Center"
CodeCancel="DownLeft,DownRight,DownLeft,DownRight,DownLeft,DownRight"
;secondary codes
CodeHidden="UpLeft,UpRight,DownLeft,DownRight,Center"
CodeSuperShuffle="UpLeft,UpRight,UpLeft,UpRight,DownLeft,DownRight,DownLeft,DownRight,Center"
CodeXMode="DownLeft,UpRight,DownLeft,UpRight,DownRight,UpLeft,DownRight,UpLeft,Center"
CodeLeft="DownRight,DownLeft,UpRight,UpLeft,DownRight,DownLeft,UpRight,UpLeft,Center"
CodeDark="UpLeft,DownLeft,UpRight,DownRight,DownRight,UpLeft,UpRight,DownLeft,Center"
;tertiary codes
CodeGradeReverse="UpLeft,UpRight,Center,DownLeft,DownRight,DownRight,DownLeft,Center,UpRight,UpLeft,Center"
CodeSomething="Select,Select,Select,Select,Center"

;special cases or whatever...
CodeSummon="DownLeft,DownRight,DownLeft,DownRight,DownLeft,DownRight"

;confirm
TwoPartSelection=true
TwoPartConfirmsOnly=true

;oplist
;UseOptionsList=true

;otros elementos
TimerOnCommand=visible,false
BannerOnCommand=visible,false
MusicWheelX=SCREEN_CENTER_X
MusicWheelY=SCREEN_CENTER_Y
MusicWheelOnCommand=SetDrawByZPosition,true;fov,90

CDTitleOnCommand=visible,false;pause;

[ScreenCustomOptionsList]
;with this selectmusic preview still plays when stacking this screen
PlayMusic=false

Class="ScreenSplash"
Fallback="ScreenSplash"
NextScreen="ScreenSelectMusic"
PrevScreen="ScreenSelectMusic"

CodeNames="Prev,Next,Toggle,Back1=Back,Back2=Back"
CodePrev="+DownLeft"
CodeNext="+DownRight"
CodeToggle="Center"
CodeBack1="UpLeft"
CodeBack2="UpRight"

;pnz showoff
[ScreenStageInformation]
TimerSeconds=1
TimerOnCommand=visible,false
NextScreen="ScreenGameplay"
PrevScreen="ScreenSelectMusic"
PrepareScreen="ScreenGameplay"
ShowCreditDisplay=false

;00
;in before iguana play...
[ScreenGameplay]
NextScreen=GameplayNext()
PrevScreen="ScreenSelectMusic"

FailOnMissCombo=StageBreak()

MinSecondsToStep=0.5
MinSecondsToMusic=0
MusicFadeOutSeconds=1

;con toda confianza puedo decir: la (barra de) vida es una mierda XD
LifeP1OnCommand=visible,false
LifeP2OnCommand=visible,false
ScoreP1OnCommand=visible,false
ScoreP2OnCommand=visible,false

PlayerInitCommand=y,240;zoom,(THEME:GetMetric("Common","ScreenHeight")/480)
StartGivesUp=false
BackGivesUp=false

;uh...
PlayerP1OnePlayerOneSideX=SCREEN_CENTER_X-160
PlayerP2OnePlayerOneSideX=SCREEN_CENTER_X+160
PlayerP1TwoPlayersTwoSidesX=SCREEN_CENTER_X-160
PlayerP2TwoPlayersTwoSidesX=SCREEN_CENTER_X+160
PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X
PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X
PlayerP1TwoPlayersSharedSidesX=SCREEN_CENTER_X
PlayerP2TwoPlayersSharedSidesX=SCREEN_CENTER_X

;Si no pones estos, el extra stage te crashea si le das back...
SurviveTimeX=0
SurviveTimeY=0
SurviveTimeOnCommand=visible,false
SurviveTimeOffCommand=

;83
[ScreenEvaluationNormal]
ForceTimer=true
TimerSeconds=10
TimerMetricsGroup="MenuTimerNoSound"
;TimerOnCommand=visible,false
NextScreen=EvaluationNext()

;LT%02d
[ScreenNextStage]
Class="ScreenSplash"
Fallback="ScreenSplash"
PrevScreen="ScreenSelectMusic"
NextScreen="ScreenSelectMusic"

ForceTimer=true
TimerSeconds=3
TimerMetricsGroup="MenuTimerNoSound"
TimerOnCommand=visible,false

;083
[ScreenStageBreak]
Class="ScreenSplash"
Fallback="ScreenSplash"
PrevScreen=StageBreakNext()
NextScreen=StageBreakNext()
ForceTimer=true
TimerSeconds=5
TimerMetricsGroup="MenuTimerNoSound"
TimerOnCommand=visible,false

;guardar perfiles
[ScreenProfileSave]
NextScreen="ScreenGameOver"
PrevScreen="ScreenGameOver"

;84
[ScreenGameOver]
Class="ScreenSplash"
Fallback="ScreenSplash"
PrevScreen=GameOverNext()
NextScreen=GameOverNext()

PlayMusic=true
ForceTimer=true
TimerSeconds=5
TimerMetricsGroup="MenuTimerNoSound"
TimerOnCommand=visible,false

#05# - Otras pantallas/debug
[ScreenOptionsTheme]
Fallback="ScreenOptionsServiceChild"
LineNames="1"
Line1="lua,UserPrefOptionsMode()"

;derivadas de screenoptions
;Sí porque faltan lineas en varias y otras te llevan a pantallas que no quiero...
[ScreenOptionsService]
PrevScreen="ScreenTitleMenu"
;LineNames="SD,1,2,13,3,10,11,4,12,6,5,8,9"

[ScreenOptionsSystemDirection]
Fallback="ScreenOptionsServiceChild"
PrevScreen="ScreenOptionsService"
NextScreen="ScreenOptionsService"
