; YeShunguang

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

[Constants]
global persist $key1 = 0
global persist $key2 = 0
global persist $key3 = 0
global persist $key4 = 0
global persist $key5 = 0
global persist $key6 = 0
global $EnlightenedMind = 1
global $active = 0
global $creditinfo = 0

[key1]
condition = $active ==1
key= Numpad1
type = cycle
$key1 = 0,1

[key2]
condition = $active ==1
key= Numpad2
type = cycle
$key2 = 0,1,2

[key3]
condition = $active ==1
key= Numpad3
type = cycle
$key3 = 0,1,2,3,4

[key4]
condition = $active ==1
key= Numpad4
type = cycle
$key4 = 0,1,2

[key5]
condition = $active ==1
key= Numpad5
type = cycle
$key5 = 0,1,2

[key6]
condition = $active ==1
key= Numpad6
type = cycle
$key6 = 0,1

[key7]
condition = $active ==1
key= Numpad7
type = cycle
$key7 = 0,1

[Present]
post $active = 0
post $EnlightenedMind = 0
run = CommandListCreditInfo

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

[TextureOverrideYeShunguangFrontPanelBlend]
hash = ae7d7235
handling = skip
vb2 = ResourceYeShunguangFrontPanelBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangFrontPanelPosition
	draw = 256, 0
endif
$active = 1

[TextureOverrideYeShunguangFrontPanelTexcoord]
hash = 441f1cf2
vb1 = ResourceYeShunguangFrontPanelTexcoord

[TextureOverrideYeShunguangFrontPanelVertexLimitRaise]
hash = 67a50546
override_vertex_count = 256
override_byte_stride = 40

[TextureOverrideYeShunguangLegsBlend]
hash = fb37e9f8
handling = skip
vb2 = ResourceYeShunguangLegsBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangLegsPosition
	draw = 29679, 0
endif
$active = 1

[TextureOverrideYeShunguangLegsTexcoord]
hash = 5d7f073e
vb1 = ResourceYeShunguangLegsTexcoord

[TextureOverrideYeShunguangLegsVertexLimitRaise]
hash = 25033e92
override_vertex_count = 29679
override_byte_stride = 40

[TextureOverrideYeShunguangBodyBlend]
hash = 79c7949c
handling = skip
vb2 = ResourceYeShunguangBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangBodyPosition
	draw = 20415, 0
endif
$active = 1

[TextureOverrideYeShunguangBodyTexcoord]
hash = dbb027eb
vb1 = ResourceYeShunguangBodyTexcoord

[TextureOverrideYeShunguangBodyVertexLimitRaise]
hash = f201bd10
override_vertex_count = 20415
override_byte_stride = 40

[TextureOverrideYeShunguangRibbonsBlend]
hash = d7558cdf
handling = skip
vb2 = ResourceYeShunguangRibbonsBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangRibbonsPosition
	draw = 976, 0
endif
$active = 1

[TextureOverrideYeShunguangRibbonsTexcoord]
hash = fc246482
vb1 = ResourceYeShunguangRibbonsTexcoord

[TextureOverrideYeShunguangRibbonsVertexLimitRaise]
hash = 19c6b04a
override_vertex_count = 976
override_byte_stride = 40

[TextureOverrideYeShunguangPartBlend]
hash = f9b50292
handling = skip
vb2 = ResourceYeShunguangPartBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangPartPosition
	draw = 250, 0
endif
$active = 1

[TextureOverrideYeShunguangPartTexcoord]
hash = 7e5fb476
vb1 = ResourceYeShunguangPartTexcoord

[TextureOverrideYeShunguangPartVertexLimitRaise]
hash = a93cc204
override_vertex_count = 250
override_byte_stride = 40

[TextureOverrideYeShunguangTailBlend]
hash = 690ba2b1
handling = skip
vb2 = ResourceYeShunguangTailBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangTailPosition
	draw = 2616, 0
endif
$active = 1

[TextureOverrideYeShunguangTailTexcoord]
hash = cb4b7cc7
vb1 = ResourceYeShunguangTailTexcoord

[TextureOverrideYeShunguangTailVertexLimitRaise]
hash = 3fe83226
override_vertex_count = 2616
override_byte_stride = 40

[TextureOverrideYeShunguangFrontPanelIB]
hash = 3b1b73fe
handling = skip

[TextureOverrideYeShunguangFrontPanelA]
hash = 3b1b73fe
match_first_index = 0
ib = ResourceYeShunguangFrontPanelAIB
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangFrontPanelAMaterialMap
run = CommandList\ZZMI\SetTextures
; 前挡1 (64)
if $key2 == 2
drawindexed = 294, 0, 0
endif
; 前挡2 (192)
if $key3 == 4
drawindexed = 864, 294, 0
endif

[TextureOverrideYeShunguangLegsIB]
hash = 4a178546
handling = skip

[TextureOverrideYeShunguangLegsA]
hash = 4a178546
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceYeShunguangLegsAIB
CheckTextureOverride = ps-t14
CheckTextureOverride = ps-t13
if $EnlightenedMind == 0
if $key6 == 0
    Resource\ZZMI\Diffuse = ref ResourceYeShunguangLegsADiffuse
endif
if $key6 == 1
    Resource\ZZMI\Diffuse = ref ResourceYeShunguangEnlightenedMindLegsADiffuse
endif
else
    Resource\ZZMI\Diffuse = ref ResourceYeShunguangEnlightenedMindLegsADiffuse
endif
Resource\ZZMI\NormalMap = ref ResourceYeShunguangLegsANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangLegsALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangLegsAMaterialMap
run = CommandList\ZZMI\SetTextures
; 挂饰 (1108)
if $key3 == 3
drawindexed = 4548, 0, 0
endif
if $key3 == 4
drawindexed = 4548, 0, 0
endif
; 脚 (11040)
if $key5 == 0
drawindexed = 60060, 4548, 0
endif
; 腿 (14199)
drawindexed = 80844, 64608, 0
; 鞋 (1704)
if $key5 == 1
drawindexed = 8100, 145452, 0
endif
; 高跟 (1628)
if $key5 == 2
drawindexed = 7428, 153552, 0
endif

[TextureOverrideYeShunguangBodyIB]
hash = c209c22b
handling = skip

[TextureOverrideYeShunguangBodyA]
hash = c209c22b
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceYeShunguangBodyAIB
if $EnlightenedMind == 0
    Resource\ZZMI\Diffuse = ref ResourceYeShunguangBodyADiffuse
else
    Resource\ZZMI\Diffuse = ref ResourceYeShunguangEnlightenedMindBodyADiffuse
endif
Resource\ZZMI\NormalMap = ref ResourceYeShunguangBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
; 手1 (1928)
if $key1 == 0
drawindexed = 8748, 0, 0
endif
; 手2 (6114)
if $key1 == 1
drawindexed = 26478, 8748, 0
endif
; 腰带 (1011)
if $key3 == 1
drawindexed = 3741, 35226, 0
endif
if $key3 == 2
drawindexed = 3741, 35226, 0
endif
if $key3 == 3
drawindexed = 3741, 35226, 0
endif
if $key3 == 4
drawindexed = 3741, 35226, 0
endif
; 衣服 (1549)
if $key2 == 1
drawindexed = 6132, 38967, 0
endif
if $key2 == 2
drawindexed = 6132, 38967, 0
endif
; 裙摆 (1150)
if $key3 == 2
drawindexed = 4476, 45099, 0
endif
if $key3 == 3
drawindexed = 4476, 45099, 0
endif
if $key3 == 4
drawindexed = 4476, 45099, 0
endif
; 身体 (8663)
drawindexed = 49182, 49575, 0

[TextureOverrideYeShunguangRibbonsIB]
hash = f9ce7b07
handling = skip

[TextureOverrideYeShunguangRibbonsA]
hash = f9ce7b07
match_first_index = 0
ib = ResourceYeShunguangRibbonsAIB
run = CommandList\ZZMI\SetTextures
; YeShunguangRibbonsA-vb0=0a74e427.txt.001 (976)
if $key1 == 1
drawindexed = 2808, 0, 0
endif

[TextureOverrideYeShunguangPartIB]
hash = 0534b536
handling = skip

[TextureOverrideYeShunguangPartA]
hash = 0534b536
match_first_index = 0
ib = ResourceYeShunguangPartAIB
run = CommandList\ZZMI\SetTextures
; YeShunguangPartA-vb0=cad13a53.txt.001 (250)
if $key2 == 1
drawindexed = 864, 0, 0
endif
if $key2 == 2
drawindexed = 864, 0, 0
endif

[TextureOverrideYeShunguangTailIB]
hash = 869976a3
handling = skip

[TextureOverrideYeShunguangTailA]
hash = 869976a3
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceYeShunguangTailAIB
run = CommandListYeShunguangTailA
run = CommandList\ZZMI\SetTextures
; 大尾巴 (1235)
if $key4 == 1
drawindexed = 4734, 0, 0
endif
; 小尾巴 (1381)
if $key4 == 0
drawindexed = 5202, 4734, 0
endif


[TextureOverrideYeShunguangLegsAGlowMap]
hash = b31acdf9
if $key6 == 0
this = ResourceYeShunguangLegsAGlowMap
endif

[TextureOverrideYeShunguangEnlightenedMindLegsAGlowMap]
hash = e996b641
this = ResourceYeShunguangEnlightenedMindLegsAGlowMap

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

[TextureOverrideEnlightenedMindDectect]
hash = 2d72a119
$EnlightenedMind = 1

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

[ResourceYeShunguangFrontPanelPosition]
type = Buffer
stride = 40
filename = YeShunguangFrontPanelPosition.buf

[ResourceYeShunguangFrontPanelBlend]
type = Buffer
stride = 32
filename = YeShunguangFrontPanelBlend.buf

[ResourceYeShunguangFrontPanelTexcoord]
type = Buffer
stride = 36
filename = YeShunguangFrontPanelTexcoord.buf

[ResourceYeShunguangFrontPanelAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangFrontPanelA.ib

[ResourceYeShunguangLegsPosition]
type = Buffer
stride = 40
filename = YeShunguangLegsPosition.buf

[ResourceYeShunguangLegsBlend]
type = Buffer
stride = 32
filename = YeShunguangLegsBlend.buf

[ResourceYeShunguangLegsTexcoord]
type = Buffer
stride = 20
filename = YeShunguangLegsTexcoord.buf

[ResourceYeShunguangLegsAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangLegsA.ib

[ResourceYeShunguangBodyPosition]
type = Buffer
stride = 40
filename = YeShunguangBodyPosition.buf

[ResourceYeShunguangBodyBlend]
type = Buffer
stride = 32
filename = YeShunguangBodyBlend.buf

[ResourceYeShunguangBodyTexcoord]
type = Buffer
stride = 20
filename = YeShunguangBodyTexcoord.buf

[ResourceYeShunguangBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangBodyA.ib

[ResourceYeShunguangRibbonsPosition]
type = Buffer
stride = 40
filename = YeShunguangRibbonsPosition.buf

[ResourceYeShunguangRibbonsBlend]
type = Buffer
stride = 32
filename = YeShunguangRibbonsBlend.buf

[ResourceYeShunguangRibbonsTexcoord]
type = Buffer
stride = 24
filename = YeShunguangRibbonsTexcoord.buf

[ResourceYeShunguangRibbonsAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangRibbonsA.ib

[ResourceYeShunguangPartPosition]
type = Buffer
stride = 40
filename = YeShunguangPartPosition.buf

[ResourceYeShunguangPartBlend]
type = Buffer
stride = 16
filename = YeShunguangPartBlend.buf

[ResourceYeShunguangPartTexcoord]
type = Buffer
stride = 36
filename = YeShunguangPartTexcoord.buf

[ResourceYeShunguangPartAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangPartA.ib

[ResourceYeShunguangTailPosition]
type = Buffer
stride = 40
filename = YeShunguangTailPosition.buf

[ResourceYeShunguangTailBlend]
type = Buffer
stride = 32
filename = YeShunguangTailBlend.buf

[ResourceYeShunguangTailTexcoord]
type = Buffer
stride = 20
filename = YeShunguangTailTexcoord.buf

[ResourceYeShunguangTailAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangTailA.ib

[ResourceYeShunguangLegsADiffuse]
filename = YeShunguangLegsADiffuse.dds

[ResourceYeShunguangEnlightenedMindLegsADiffuse]
filename = YeShunguangEnlightenedMindLegsADiffuse.dds

[ResourceYeShunguangLegsANormalMap]
filename = YeShunguangLegsANormalMap.jpg

[ResourceYeShunguangLegsALightMap]
filename = YeShunguangLegsALightMap.dds

[ResourceYeShunguangLegsAMaterialMap]
filename = YeShunguangLegsAMaterialMap.dds

[ResourceYeShunguangBodyADiffuse]
filename = YeShunguangBodyADiffuse.dds

[ResourceYeShunguangEnlightenedMindBodyADiffuse]
filename = YeShunguangEnlightenedMindBodyADiffuse.dds

[ResourceYeShunguangBodyANormalMap]
filename = YeShunguangBodyANormalMap.jpg

[ResourceYeShunguangBodyALightMap]
filename = YeShunguangBodyALightMap.dds

[ResourceYeShunguangBodyAMaterialMap]
filename = YeShunguangBodyAMaterialMap.dds

[ResourceYeShunguangFrontPanelAMaterialMap]
filename = YeShunguangFrontPanelAMaterialMap.dds

[ResourceYeShunguangLegsAGlowMap]
filename = YeShunguangLegsAGlowMap.dds

[ResourceYeShunguangEnlightenedMindLegsAGlowMap]
filename = YeShunguangEnlightenedMindLegsAGlowMap.dds

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