[Constants]
global persist $var1 = 0
global persist $var2 = 0
global persist $var3 = 0
global $active = 0

[Present]
post $active = 0

[KeySwitchCostume1]
condition = $active
Key = ctrl no_shift no_alt x
type = cycle
$var1 = 0,1,2,3,4
; Org -> No Flower -> Topless -> No Arm Accessory -> No Necklace

[KeySwitchCostume2]
condition = $active
Key = ctrl no_shift no_alt z
type = cycle
$var2 = 0,1,2,3
; Org -> No Skirt Ribbon -> No Inner Skirt -> No Skirt

[KeySwitchCostume3]
condition = $active
Key = ctrl no_shift no_alt c
type = cycle
$var3 = 0,1,2,3
; Org. -> No Panty -> No Legstrap & Shoes

; Skirt
[TextureOverrideSkirtRibbon01]
hash = 91237e56
match_first_index = 9465
if $var2 > 0 && $active
	handling = skip
endif

[TextureOverrideSkirtRibbon02]
hash = 91237e56
match_first_index = 25179
if $var2 > 0 && $active
	handling = skip
endif

[TextureOverrideSkirtRibbon03]
hash = 91237e56
match_first_index = 11661
if $var2 > 0 && $active
	handling = skip
endif

[TextureOverrideSkirtRibbon04]
hash = 91237e56
match_first_index = 25749
if $var2 > 0 && $active
	handling = skip
endif

[TextureOverrideSkirtRibbon05]
hash = b40215b7
match_first_index = 1128
if $var2 > 0 && $active
	handling = skip
endif

[TextureOverrideInnerSkirt01]
hash = bc59cc69
if $var2 > 1 && $active
	handling = skip
endif

[TextureOverrideOuterSkirt01]
hash = 91237e56
match_first_index = 36732
if $var2 > 2 && $active
	handling = skip
endif

; Top
[TextureOverrideTopFlower01]
hash = 98483126
match_first_index = 70218
if $var1 > 0 && $active
	handling = skip
endif

[TextureOverrideTopFlower02]
hash = 98483126
match_first_index = 3705
if $var1 > 0 && $active
	handling = skip
endif

[TextureOverrideTopFlower03]
hash = 91237e56
match_first_index = 26805
if $var1 > 0 && $active
	handling = skip
endif

[TextureOverrideTopFlower04]
hash = 91237e56
match_first_index = 30447
if $var1 > 0 && $active
	handling = skip
endif

; Top
[TextureOverrideTop01]
hash = 91237e56
match_first_index = 30867
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop02]
hash = 91237e56
match_first_index = 40881
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop03]
hash = 91237e56
match_first_index = 41307
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop04]
hash = 91237e56
match_first_index = 7731
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop05]
hash = 91237e56
match_first_index = 6159
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop06]
hash = 91237e56
match_first_index = 41523
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop07]
hash = 91237e56
match_first_index = 9207
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop08]
hash = 91237e56
match_first_index = 24939
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop09]
hash = 91237e56
match_first_index = 14283
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop10]
hash = b40215b7
match_first_index = 0
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop11]
hash = 91237e56
match_first_index = 1818
if $var1 > 1 && $active
	handling = skip
endif

[TextureOverrideTop12]
hash = 91237e56
match_first_index = 0
if $var1 > 1 && $active
	handling = skip
endif

; Arm Accessory
[TextureOverrideArmAcc01]
hash = 98483126
match_first_index = 79884
if $var1 > 2 && $active
	handling = skip
endif

; Necklace
[TextureOverrideNecklace01]
hash = 98483126
match_first_index = 12966
if $var1 > 3 && $active
	handling = skip
endif

[TextureOverrideNecklace02]
hash = 98483126
match_first_index = 63882
if $var1 > 3 && $active
	handling = skip
endif

[TextureOverrideNecklace03]
hash = 98483126
match_first_index = 61674
if $var1 > 3 && $active
	handling = skip
endif

[TextureOverrideNecklace04]
hash = 98483126
match_first_index = 2553
if $var1 > 3 && $active
	handling = skip
endif

[TextureOverrideNecklace05]
hash = 98483126
match_first_index = 0
if $var1 > 3 && $active
	handling = skip
endif

[TextureOverrideNecklace06]
hash = 98483126
match_first_index = 62826
if $var1 > 3 && $active
	handling = skip
endif

[TextureOverrideNecklace07]
hash = faf7d97d
match_first_index = 1392
if $var1 > 3 && $active
	handling = skip
endif

; Panty
[TextureOverridePanty01]
hash = 98483126
match_first_index = 102942
if $var3 > 0 && $active
	handling = skip
endif

[TextureOverridePanty02]
hash = 98483126
match_first_index = 555
if $var3 > 0 && $active
	handling = skip
endif

[TextureOverridePanty03]
hash = 98483126
match_first_index = 342
if $var3 > 0 && $active
	handling = skip
endif

[TextureOverridePanty04]
hash = 98483126
match_first_index = 6486
if $var3 > 0 && $active
	handling = skip
endif

[TextureOverridePanty05]
hash = 98483126
match_first_index = 7254
if $var3 > 0 && $active
	handling = skip
endif

[TextureOverridePanty06]
hash = faf7d97d
match_first_index = 0
if $var3 > 0 && $active
	handling = skip
endif

; Leg Strap & Shoes
[TextureOverrideLegStrap01]
hash = 98483126
match_first_index = 98460
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideLegStrap02]
hash = 98483126
match_first_index = 95526
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideLegStrap03]
hash = 98483126
match_first_index = 97647
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideLegStrap04]
hash = 98483126
match_first_index = 101814
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideLegStrap05]
hash = 98483126
match_first_index = 94998
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes01]
hash = 98483126
match_first_index = 10854
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes02]
hash = 98483126
match_first_index = 9678
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes03]
hash = 98483126
match_first_index = 73440
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes04]
hash = 98483126
match_first_index = 85050
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes05]
hash = 98483126
match_first_index = 91590
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes06]
hash = 98483126
match_first_index = 85710
if $var3 > 1 && $active
	handling = skip
endif

[TextureOverrideShoes07]
hash = faf7d97d
match_first_index = 144
if $active
	handling = skip
	if $var3 <= 1
		vb0 = ResourceJewelShoesVB
		ib  = ResourceJewelShoesIB
		drawindexed = auto
	endif
	if $var1 <= 3
		vb0 = ResourceJewelNecklaceVB
		ib  = ResourceJewelNecklaceIB
		drawindexed = auto
	endif
endif

[TextureOverrideShoes08]
hash = faf7d97d
match_first_index = 1152
if $var3 > 1 && $active
	handling = skip
endif

; Body
[TextureOverrideNail]
hash = 731a5e6b
match_first_index = 0
if $var3 > 1
	handling = skip
	vb0 = ResourceFingerNailVB
	ib  = ResourceFingerNailIB
	drawindexed = auto	
endif

[TextureOverrideBody]
hash = 513e11b8
match_first_index = 0
$active = 1
handling = skip

if $var1 > 1
	vb0 = ResourceUpperBody1VB
	ib  = ResourceUpperBody1IB
	drawindexed = auto	
else
	vb0 = ResourceUpperBody0VB
	ib  = ResourceUpperBody0IB
	drawindexed = auto
endif

if $var3 > 1
	vb0 = ResourceLowerBody2VB
	ib  = ResourceLowerBody2IB
	drawindexed = auto	
elif $var3 > 0
	vb0 = ResourceLowerBody1VB
	ib  = ResourceLowerBody1IB
	drawindexed = auto
else
	vb0 = ResourceLowerBody0VB
	ib  = ResourceLowerBody0IB
	drawindexed = auto
endif

; Resources
[ResourceUpperBody0VB]
type = Buffer
stride = 80
filename = resources\upper_body_0.vb

[ResourceUpperBody0IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\upper_body_0.ib

[ResourceUpperBody1VB]
type = Buffer
stride = 80
filename = resources\upper_body_1.vb

[ResourceUpperBody1IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\upper_body_1.ib

[ResourceLowerBody0VB]
type = Buffer
stride = 80
filename = resources\Lower_body_0.vb

[ResourceLowerBody0IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\Lower_body_0.ib

[ResourceLowerBody1VB]
type = Buffer
stride = 80
filename = resources\Lower_body_1.vb

[ResourceLowerBody1IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\Lower_body_1.ib

[ResourceLowerBody2VB]
type = Buffer
stride = 80
filename = resources\Lower_body_2.vb

[ResourceLowerBody2IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\Lower_body_2.ib

[ResourceFingerNailVB]
type = Buffer
stride = 76
filename = resources\Finger_Nail.vb

[ResourceFingerNailIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\Finger_Nail.ib

[ResourceJewelShoesVB]
type = Buffer
stride = 60
filename = resources\Jewel_Shoes.vb

[ResourceJewelShoesIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\Jewel_Shoes.ib

[ResourceJewelNecklaceVB]
type = Buffer
stride = 60
filename = resources\Jewel_Necklace.vb

[ResourceJewelNecklaceIB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = resources\Jewel_Necklace.ib

; [ResourceAwakenBodyVB]
; type = Buffer
; stride = 80
; filename = resources\awaken_body.vb

; [ResourceAwakenBodyIB]
; type = Buffer
; format = DXGI_FORMAT_R16_UINT
; filename = resources\awaken_body.ib

; [ResourceAwakenToplessBodyVB]
; type = Buffer
; stride = 80
; filename = resources\awaken_topless_body.vb

; [ResourceAwakenToplessBodyIB]
; type = Buffer
; format = DXGI_FORMAT_R16_UINT
; filename = resources\awaken_topless_body.ib
