; Yixuan

; Constants -------------------------

[Constants]
global $active = 0
global persist $jack
global persist $t
global persist $glove
global persist $low
global persist $th
global persist $heel
global persist $cant
global persist $top
global persist $nsfw
global $creditinfo = 0

[KeySwap]
condition = $active == 1
key = no_ctrl alt VK_UP
type = cycle
$jack = 0,1

[KeySwap0]
condition = $active == 1
Key = alt VK_RIGHT
type = cycle
$t = 0,1

[KeySwap1]
condition = $active == 1
Key = ctrl VK_RIGHT
back = ctrl VK_LEFT
type = cycle
$glove = 0,1,2,3

[KeySwap2]
condition = $active == 1
key = ctrl no_alt VK_DOWN
back = ctrl no_alt VK_UP
type = cycle
$low = 0,1,2,3

[KeySwap3]
condition = $active == 1
Key = alt no_ctrl VK_DOWN
type = cycle
$th = 0,1,2

[KeySwap4]
condition = $active == 1
Key = ctrl alt VK_DOWN
type = cycle
$heel = 0,1

[KeySwap5]
condition = $active == 1
Key = ctrl alt VK_UP
type = cycle
$cant = 0,1,2

[KeySwap6]
condition = $active == 1
Key = shift VK_UP
type = cycle
$top = 0,1,2

[KeySwap7]
condition = $active == 1
Key = shift VK_DOWN
type = cycle
$nsfw = 0,1

[Present]
post $active = 0
run = CommandListCreditInfo

; Overrides -------------------------

[TextureOverrideYixuanHairLockBlend]
hash = de9d3ab7
handling = skip
vb2 = ResourceYixuanHairLockBlend
if DRAW_TYPE == 1
	vb0 = ResourceYixuanHairLockPosition
	draw = 1290,0
endif
$active = 1

[TextureOverrideYixuanHairLockTexcoord]
hash = b3123168
vb1 = ResourceYixuanHairLockTexcoord

[TextureOverrideYixuanHairLockVertexLimitRaise]
hash = ba017cf3
override_vertex_count = 1290
override_byte_stride = 92

[TextureOverrideYixuanBodyBlend]
hash = 3e629c05
handling = skip
vb2 = ResourceYixuanBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceYixuanBodyPosition
	draw = 57634,0
endif
$active = 1

[TextureOverrideYixuanBodyTexcoord]
hash = 7af146a0
vb1 = ResourceYixuanBodyTexcoord

[TextureOverrideYixuanBodyVertexLimitRaise]
hash = f922d854
override_vertex_count = 57634
override_byte_stride = 92

[TextureOverrideYixuanJacketBlend]
hash = 0ff3af5a
handling = skip
vb2 = ResourceYixuanJacketBlend
if DRAW_TYPE == 1
	vb0 = ResourceYixuanJacketPosition
	draw = 10329,0
endif
$active = 1

[TextureOverrideYixuanJacketTexcoord]
hash = 9f95d565
vb1 = ResourceYixuanJacketTexcoord

[TextureOverrideYixuanJacketVertexLimitRaise]
hash = 73599fbb
override_vertex_count = 10329
override_byte_stride = 96

[TextureOverrideYixuanCanteenBlend]
hash = 55638d51
handling = skip
vb2 = ResourceYixuanCanteenBlend
if DRAW_TYPE == 1
	vb0 = ResourceYixuanCanteenPosition
	draw = 1083,0
endif
$active = 1

[TextureOverrideYixuanCanteenTexcoord]
hash = f05da93a
vb1 = ResourceYixuanCanteenTexcoord

[TextureOverrideYixuanCanteenVertexLimitRaise]
hash = d000beae
override_vertex_count = 1083
override_byte_stride = 76

[TextureOverrideYixuanCanteen3Blend]
hash = ee9b9cfe
handling = skip
vb2 = ResourceYixuanCanteen3Blend
if DRAW_TYPE == 1
	vb0 = ResourceYixuanCanteen3Position
	draw = 869,0
endif
$active = 1

[TextureOverrideYixuanCanteen3Texcoord]
hash = 9714e6e6
vb1 = ResourceYixuanCanteen3Texcoord

[TextureOverrideYixuanCanteen3VertexLimitRaise]
hash = ddaf88bc
override_vertex_count = 869
override_byte_stride = 92

[TextureOverrideYixuanHairLockIB]
hash = 892858fd
handling = skip
drawindexed = auto

[TextureOverrideYixuanHairLock]
hash = 892858fd
match_first_index = 0
ib = ResourceYixuanHairLockIB
Resource\ZZMI\Diffuse = ref ResourceYixuanBodyDiffuse
Resource\ZZMI\LightMap = ref ResourceYixuanBodyLightMap
Resource\ZZMI\MaterialMap = ref ResourceYixuanBodyMaterialMap
Resource\ZZMI\NormalMap = ref ResourceYixuanBodyNormalMap
Resource\ZZMI\GlowMap = ref ResourceYixuanBodyGlowMap
run = CommandList\ZZMI\SetTextures

[TextureOverrideYixuanBodyIB]
hash = 029c1f5a
handling = skip

[TextureOverrideYixuanBody]
hash = 029c1f5a
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceYixuanBodyIB
if $t == 0
	Resource\ZZMI\Diffuse = ref ResourceYixuanBodyDiffuse
	Resource\ZZMI\LightMap = ref ResourceYixuanBodyLightMap
	Resource\ZZMI\MaterialMap = ref ResourceYixuanBodyMaterialMap
else if $t == 1
	Resource\ZZMI\Diffuse = ref ResourceYixuanBodyDiffuse2
	Resource\ZZMI\LightMap = ref ResourceYixuanBodyLightMap2
	Resource\ZZMI\MaterialMap = ref ResourceYixuanBodyMaterialMap2
endif
Resource\ZZMI\NormalMap = ref ResourceYixuanBodyNormalMap
Resource\ZZMI\GlowMap = ref ResourceYixuanBodyGlowMap
run = CommandList\ZZMI\SetTextures
; YixuanBody (3835)
drawindexed = 17724, 0, 0
; YixuanBody
	; ArmBrace (115)
	if $glove == 0
		drawindexed = 504, 17724, 0
	else if $glove == 1
		drawindexed = 504, 17724, 0
	else if $glove == 2
		drawindexed = 504, 17724, 0
	else if $glove == 3
	endif
	
	; Arms (6334)
	if $glove == 0
	else if $glove == 1
	else if $glove == 2
		drawindexed = 34080, 18228, 0
	else if $glove == 3
		drawindexed = 34080, 18228, 0
	endif
	
	; Belt (1302)
	if $low == 0
		drawindexed = 4101, 52308, 0
	else if $low == 1
		drawindexed = 4101, 52308, 0
	else if $low == 2
		drawindexed = 4101, 52308, 0
	else if $low == 3
	endif
	
	; BodyBottom (1624)
	if $low == 0
	else if $low == 1
		drawindexed = 8928, 56409, 0
	else if $low == 2
		drawindexed = 8928, 56409, 0
	else if $low == 3
		drawindexed = 8928, 56409, 0
	endif
	
	; BodyTop (3720)
	if $top == 0
	else if $top == 1
		drawindexed = 20976, 65337, 0
	else if $top == 2
		drawindexed = 20976, 65337, 0
	endif
	
	; Feet (672)
	if $heel == 0
	else if $heel == 1
		if $th == 0
			drawindexed = 3156, 86313, 0
		else if $th == 1
		else if $th == 2
			drawindexed = 3156, 86313, 0
		endif
	endif
	
	; FeetTH (672)
	if $heel == 0
	else if $heel == 1
		if $th == 0
		else if $th == 1
			drawindexed = 3156, 89469, 0
		else if $th == 2
		endif
	endif
	
	; Gloves (6964)
	if $glove == 0
	else if $glove == 1
		drawindexed = 35712, 92625, 0
	else if $glove == 2
	else if $glove == 3
	endif
	
	; GlovesOG (4680)
	if $glove == 0
		drawindexed = 17727, 128337, 0
	else if $glove == 1
	else if $glove == 2
	else if $glove == 3
	endif
	
	; LegL (1447)
	if $th == 0
		drawindexed = 8136, 146064, 0
	else if $th == 1
	else if $th == 2
		drawindexed = 8136, 146064, 0
	endif
	
	; LegR (747)
	if $th == 0
	else if $th == 1
	else if $th == 2
		drawindexed = 4104, 154200, 0
	endif
	
	; Leotard (852)
	if $low == 0
	else if $low == 1
		drawindexed = 4128, 158304, 0
	else if $low == 2
	else if $low == 3
	endif
	
	; Mole (16)
	if $t == 0
		drawindexed = 42, 162432, 0
	else if $t == 1
	endif
	
	; OGHeels (4456)
	if $heel == 0
		drawindexed = 20604, 162474, 0
	else if $heel == 1
	endif
	
	; P (694)
	if $low == 0
	else if $low == 1
	else if $low == 2
		if $nsfw == 0
		else if $nsfw == 1
			if $t == 0
				drawindexed = 3408, 183078, 0
			else if $t == 1
			endif
		endif
	else if $low == 3
		if $nsfw == 0
		else if $nsfw == 1
			if $t == 0
				drawindexed = 3408, 183078, 0
			else if $t == 1
			endif
		endif
	endif
	
	; P2 (333)
	if $low == 0
	else if $low == 1
	else if $low == 2
		if $nsfw == 0
		else if $nsfw == 1
			if $t == 0
			else if $t == 1
				drawindexed = 1704, 186486, 0
			endif
		endif
	else if $low == 3
		if $nsfw == 0
		else if $nsfw == 1
			if $t == 0
			else if $t == 1
				drawindexed = 1704, 186486, 0
			endif
		endif
	endif

	; Shorts (3832)
	if $low == 0
		drawindexed = 19980, 188190, 0
	else if $low == 1
	else if $low == 2
	else if $low == 3
	endif
	
	; ThighHighOG2 (50)
	if $th == 0
		drawindexed = 144, 208170, 0
	else if $th == 1
	else if $th == 2
	endif
	
	; ThighHighs (2405)
	if $th == 0
	else if $th == 1
		drawindexed = 13392, 208314, 0
	else if $th == 2
	endif
	
	; ThighR (733)
	if $th == 0
	else if $th == 1
	else if $th == 2
		if $low == 0
		else if $low == 1
			drawindexed = 4032, 221706, 0
		else if $low == 2
			drawindexed = 4032, 221706, 0
		else if $low == 3
			drawindexed = 4032, 221706, 0
		endif
	endif

	; ThighR2 (733)
	if $th == 0
		if $low == 0
		else if $low == 1
			drawindexed = 4032, 225738, 0
		else if $low == 2
			drawindexed = 4032, 225738, 0
		else if $low == 3
			drawindexed = 4032, 225738, 0
		endif
	else if $th == 1
		if $low == 0
		else if $low == 1
			drawindexed = 4032, 225738, 0
		else if $low == 2
			drawindexed = 4032, 225738, 0
		else if $low == 3
			drawindexed = 4032, 225738, 0
		endif
	else if $th == 2
	endif
	
	; ThighR3 (733)
	if $low == 0
		if $th == 0
			drawindexed = 4032, 229770, 0
		else if $th == 1
			drawindexed = 4032, 229770, 0
		else if $th == 2
		endif
	else if $low == 1
	else if $low == 2
	else if $low == 3
	endif

	; ThighR4 (733)
	if $low == 0
		if $th == 0
		else if $th == 1
		else if $th == 2
			drawindexed = 4032, 233802, 0
		endif
	else if $low == 1
	else if $low == 2
	else if $low == 3
	endif

	; Thong (916)
	if $low == 0
	else if $low == 1
	else if $low == 2
		if $nsfw == 0
			drawindexed = 3588, 237834, 0
		else if $nsfw == 1
		endif
	else if $low == 3
		if $nsfw == 0
			drawindexed = 3588, 237834, 0
		else if $nsfw == 1
		endif
	endif

	; Top (3006)
	if $top == 0
		drawindexed = 12486, 241422, 0
	else if $top == 1
		drawindexed = 12486, 241422, 0
	else if $top == 2
	endif

	; Top2 (6030)
	if $top == 0
		drawindexed = 33504, 253908, 0
	else if $top == 1
	else if $top == 2
	endif

[TextureOverrideYixuanBodyDiffuse]
hash = 2a4f37a6
this = ResourceYixuanBodyDiffuse

[TextureOverrideYiXuan.BodyA.Diffuse.1024]
hash = d7db2bc6
this = ResourceYixuanBodyDiffuse


[TextureOverrideYixuanBodyLightMap]
hash = 5a291e85
this = ResourceYixuanBodyLightMap

[TextureOverrideYiXuan.BodyA.LightMap.1024]
hash = 96f754a7
this = ResourceYixuanBodyLightMap


[TextureOverrideYixuanBodyMaterialMap]
hash = d28370ec
this = ResourceYixuanBodyMaterialMap

[TextureOverrideYiXuan.BodyA.MaterialMap.1024]
hash = aa1056a5
this = ResourceYixuanBodyMaterialMap

[TextureOverrideYixuanJacketIB]
hash = 8c2fc05e
handling = skip

[TextureOverrideYixuanJacket]
hash = 8c2fc05e
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceYixuanJacketIB
if $t == 0
	Resource\ZZMI\Diffuse = ref ResourceYixuanBodyDiffuse
	Resource\ZZMI\LightMap = ref ResourceYixuanBodyLightMap
	Resource\ZZMI\MaterialMap = ref ResourceYixuanBodyMaterialMap
else if $t == 1
	Resource\ZZMI\Diffuse = ref ResourceYixuanBodyDiffuse2
	Resource\ZZMI\LightMap = ref ResourceYixuanBodyLightMap2
	Resource\ZZMI\MaterialMap = ref ResourceYixuanBodyMaterialMap2
endif
Resource\ZZMI\NormalMap = ref ResourceYixuanBodyNormalMap
Resource\ZZMI\GlowMap = ref ResourceYixuanBodyGlowMap
run = CommandList\ZZMI\SetTextures
; YixuanJacket (5857)
if $jack == 0
	drawindexed = 19710, 0, 0
else if $jack == 1
endif
; YixuanJacket
	; ThighHighOG (4470)
	if $th == 0
		drawindexed = 21216, 19710, 0
	else if $th == 1
	else if $th == 2
	endif

[TextureOverrideYixuanJacketDiffuse]
hash = e6dca725
this = ResourceYixuanBodyDiffuse

[TextureOverrideYiXuan.CoatA.Diffuse.1024]
hash = 1fcedcc3
this = ResourceYixuanBodyDiffuse

[TextureOverrideYixuanJacketLightMap]
hash = 59b2daf9
this = ResourceYixuanBodyLightMap

[TextureOverrideYiXuan.CoatA.LightMap.1024]
hash = c4d167c3
this = ResourceYixuanBodyLightMap

[TextureOverrideYixuanJacketMaterialMap]
hash = bb581f1e
this = ResourceYixuanBodyMaterialMap

[TextureOverrideYiXuan.CoatA.MaterialMap.1024]
hash = fd56fa4b
this = ResourceYixuanBodyMaterialMap

[TextureOverrideYixuanJacketGlowMap]
hash = 19188e28
this = ResourceYixuanBodyGlowMap

[TextureOverrideYixuanCanteenIB]
hash = 0219df6e
handling = skip
drawindexed = auto

[TextureOverrideYixuanCanteenA]
hash = 0219df6e
match_first_index = 0
if $cant == 0
	if $low == 0
		ib = ResourceYixuanCanteenAIB
	else if $low == 1
		ib = ResourceYixuanCanteenAIB
	else if $low == 2
		ib = ResourceYixuanCanteenAIB
	else if $low == 3
		this = null
	endif
else if $cant == 1
	if $low == 0
		ib = ResourceYixuanCanteenAIB
	else if $low == 1
		ib = ResourceYixuanCanteenAIB
	else if $low == 2
		ib = ResourceYixuanCanteenAIB
	else if $low == 3
		this = null
	endif
else if $cant == 2
	this = null
endif



[TextureOverrideYixuanCanteenB]
hash = 0219df6e
match_first_index = 66
if $cant == 0
	if $low == 0
		ib = ResourceYixuanCanteenBIB
	else if $low == 1
		ib = ResourceYixuanCanteenBIB
	else if $low == 2
		ib = ResourceYixuanCanteenBIB
	else if $low == 3
		this = null
	endif
else if $cant == 1
	if $low == 0
		ib = ResourceYixuanCanteenBIB
	else if $low == 1
		ib = ResourceYixuanCanteenBIB
	else if $low == 2
		ib = ResourceYixuanCanteenBIB
	else if $low == 3
		this = null
	endif
else if $cant == 2
	this = null
endif


[TextureOverrideYixuanCanteen3IB]
hash = 67c61080
handling = skip
drawindexed = auto

[TextureOverrideYixuanCanteen3]
hash = 67c61080
match_first_index = 0
if $cant == 0
	if $low == 0
		ib = ResourceYixuanCanteen3IB
	else if $low == 1
		ib = ResourceYixuanCanteen3IB
	else if $low == 2
		ib = ResourceYixuanCanteen3IB
	else if $low == 3
		this = null
	endif
else if $cant == 1
	this = null
else if $cant == 2
	this = null
endif

[TextureOverrideYixuanCanteen2IB]
hash = 0fdae851
handling = skip
if $cant == 0
	if $low == 0
		drawindexed = auto
	else if $low == 1
		drawindexed = auto
	else if $low == 2
		drawindexed = auto
	else if $low == 3
		this = null
	endif
else if $cant == 1
	if $low == 0
		drawindexed = auto
	else if $low == 1
		drawindexed = auto
	
	else if $low == 2
		drawindexed = auto
	else if $low == 3
		this = null
	endif
else if $cant == 2
	this = null
endif

[TextureOverrideYixuanHairLockGlowMap]
hash = c0e8476d
this = ResourceYixuanBodyGlowMap

[TextureOverrideYixuanFaceHeadIB]
hash = 8b067f99
run = CommandListSkinTexture
Resource\ZZMI\Diffuse = ref ResourceYixuanFaceHeadDiffuse
run = CommandList\ZZMI\SetTextures

[TextureOverrideYixuanFaceHeadDiffuse]
hash = 7d9ee001
this = ResourceYixuanFaceHeadDiffuse

[TextureOverrideYiXuan.FaceA.Diffuse.1024]
hash = 9efd1605
this = ResourceYixuanFaceHeadDiffuse


; CommandList -----------------------

[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1
    pre Resource\ShaderFixes\help.ini\Notification = ResourceCreditInfo
    pre run = CustomShader\ShaderFixes\help.ini\FormatText
    pre $\ShaderFixes\help.ini\notification_timeout = time + 7.0
    $creditinfo = 1
endif

; Resources -------------------------

[ResourceYixuanHairLockPosition]
type = Buffer
stride = 40
filename = YixuanHairLockPosition.buf

[ResourceYixuanHairLockBlend]
type = Buffer
stride = 32
filename = YixuanHairLockBlend.buf

[ResourceYixuanHairLockTexcoord]
type = Buffer
stride = 20
filename = YixuanHairLockTexcoord.buf

[ResourceYixuanBodyPosition]
type = Buffer
stride = 40
filename = YixuanBodyPosition.buf

[ResourceYixuanBodyBlend]
type = Buffer
stride = 32
filename = YixuanBodyBlend.buf

[ResourceYixuanBodyTexcoord]
type = Buffer
stride = 20
filename = YixuanBodyTexcoord.buf

[ResourceYixuanJacketPosition]
type = Buffer
stride = 40
filename = YixuanJacketPosition.buf

[ResourceYixuanJacketBlend]
type = Buffer
stride = 32
filename = YixuanJacketBlend.buf

[ResourceYixuanJacketTexcoord]
type = Buffer
stride = 24
filename = YixuanJacketTexcoord.buf

[ResourceYixuanCanteenPosition]
type = Buffer
stride = 40
filename = YixuanCanteenPosition.buf

[ResourceYixuanCanteenBlend]
type = Buffer
stride = 16
filename = YixuanCanteenBlend.buf

[ResourceYixuanCanteenTexcoord]
type = Buffer
stride = 20
filename = YixuanCanteenTexcoord.buf

[ResourceYixuanCanteen3Position]
type = Buffer
stride = 40
filename = YixuanCanteen3Position.buf

[ResourceYixuanCanteen3Blend]
type = Buffer
stride = 32
filename = YixuanCanteen3Blend.buf

[ResourceYixuanCanteen3Texcoord]
type = Buffer
stride = 20
filename = YixuanCanteen3Texcoord.buf

[ResourceYixuanBodyIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YixuanBody.ib

[ResourceYixuanJacketIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YixuanJacket.ib

[ResourceYixuanCanteenAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YixuanCanteenA.ib

[ResourceYixuanCanteenBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YixuanCanteenB.ib

[ResourceYixuanCanteen3IB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YixuanCanteen3.ib

[ResourceYixuanHairLockIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YixuanHairLock.ib

[ResourceYixuanBodyDiffuse]
filename = YixuanBodyDiffuse.dds

[ResourceYixuanBodyLightMap]
filename = YixuanBodyLightMap.dds

[ResourceYixuanBodyMaterialMap]
filename = YixuanBodyMaterialMap.dds

[ResourceYixuanBodyNormalMap]
filename = YixuanBodyNormalMap.dds

[ResourceYixuanBodyDiffuse2]
filename = YixuanBodyDiffuse2.dds

[ResourceYixuanBodyLightMap2]
filename = YixuanBodyLightMap2.dds

[ResourceYixuanBodyMaterialMap2]
filename = YixuanBodyMaterialMap2.dds

[ResourceYixuanBodyGlowMap]
filename = YixuanBodyGlowMap.dds

[ResourceYixuanFaceHeadDiffuse]
filename = YixuanFaceHeadDiffuse.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by Hazeker"

; .ini generated by XXMI (XX-Model-Importer)
; If you have any issues or find any bugs, please open a ticket at https://github.com/leotorrez/XXMI-Tools/issues