; YeShunguang

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

[Constants]
global $active = 0
global $creditinfo = 0

[Constants]
global persist $armband = 0
global persist $piercing1 = 0
global persist $piercing2 = 0
global persist $piercing3 = 0
global persist $piercing4 = 0
global persist $body1 = 0
global persist $body2 = 1
global persist $bra1 = 0
global persist $bra2 = 0
global persist $bracelet = 1
global persist $hairband = 1
global persist $qipao1 = 0
global persist $qipao2 = 1
global persist $qipao3 = 0
global persist $qipao4 = 1
global persist $qipao5 = 0
global persist $foot = 0
global persist $leg = 1
global persist $pants1 = 0
global persist $pants2 = 0
global persist $pants3 = 0
global persist $pants4 = 0
global persist $shoe1 = 1
global persist $shoe2 = 0
global persist $ribbon = 1
global persist $bell = 0
global persist $tail = 0

global persist $tattoo1 = 1
global persist $tattoo2 = 0

global persist $legtattoo = 1

[KeySwap0]
key = 5
condition = $active == 1
type = cycle
$piercing1 = 0,1,1,0
$piercing2 = 0,0,1,0
$piercing3 = 0,0,0,1

[KeySwap2]
key = 6
condition = $active == 1
type = cycle
$piercing4 = 0,1

[KeySwap3]
key = ctrl right
condition = $active == 1
type = cycle
$body1 = 1,1,0
$body2 = 0,0,1
$armband = 0,1,0

[KeySwap5]
key = alt right
condition = $active == 1
type = cycle
$ribbon = 0,1

[KeySwap6]
key = ctrl up
condition = $active == 1
type = cycle
$hairband = 0,1

[KeySwap7]
key = 7
condition = $active == 1
type = cycle
$bracelet = 0,1

[KeySwap8]
key = ctrl down
condition = $active == 1
type = cycle
$shoe1 = 0,1,0
$shoe2 = 0,0,1
$foot = 1,0,0

[KeySwap4]
key = p
condition = $active == 1
type = cycle
$tail = 0,1

[KeySwap9]
key = 8
condition = $active == 1
type = cycle
$bra1 = 0,1,0
$bra2 = 0,0,1

[KeySwap10]
key = 9
condition = $active == 1
type = cycle
$pants1 = 0,1,0,0,0
$pants2 = 0,0,1,0,0
$pants3 = 0,0,0,1,0
$pants4 = 0,0,0,0,1

[KeySwap11]
key = 0
condition = $active == 1
type = cycle
$tattoo1 = 0,1

[KeySwap12]
key = ctrl left
condition = $active == 1
type = cycle
$qipao1 = 0,1,0,0
$qipao2 = 0,0,1,0
$qipao3 = 0,0,0,1
$bell = 0,0,0,1

[KeySwap13]
key = alt left
condition = $active == 1
type = cycle
$qipao4 = 0,1
$qipao5 = 0,1



[Present]
post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideYeShunguangRibbonBlend]
hash = d7558cdf
handling = skip
vb2 = ResourceYeShunguangRibbonBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangRibbonPosition
	draw = 976, 0
endif

[TextureOverrideYeShunguangRibbonTexcoord]
hash = fc246482
vb1 = ResourceYeShunguangRibbonTexcoord

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

[TextureOverrideYeShunguangBody2Blend]
hash = ae7d7235
handling = skip
vb2 = ResourceYeShunguangBody2Blend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangBody2Position
	draw = 431, 0
endif

[TextureOverrideYeShunguangBody2Texcoord]
hash = 441f1cf2
vb1 = ResourceYeShunguangBody2Texcoord

[TextureOverrideYeShunguangBody2VertexLimitRaise]
hash = 67a50546
override_vertex_count = 431
override_byte_stride = 40

[TextureOverrideYeShunguangBody1Blend]
hash = 79c7949c
handling = skip
vb2 = ResourceYeShunguangBody1Blend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangBody1Position
	draw = 65001, 0
endif
$active = 1

[TextureOverrideYeShunguangBody1Texcoord]
hash = dbb027eb
vb1 = ResourceYeShunguangBody1Texcoord

[TextureOverrideYeShunguangBody1VertexLimitRaise]
hash = f201bd10
override_vertex_count = 65001
override_byte_stride = 40

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

[TextureOverrideYeShunguangTailTexcoord]
hash = cb4b7cc7
if $active == 1
	vb1 = ResourceYeShunguangTailTexcoord
endif

[TextureOverrideYeShunguangTailVertexLimitRaise]
hash = 3fe83226
if $active == 1
	override_vertex_count = 1381
	override_byte_stride = 40
endif

[TextureOverrideYeShunguangLegBlend]
hash = fb37e9f8
handling = skip
vb2 = ResourceYeShunguangLegBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangLegPosition
	draw = 42885, 0
endif

[TextureOverrideYeShunguangLegTexcoord]
hash = 5d7f073e
vb1 = ResourceYeShunguangLegTexcoord

[TextureOverrideYeShunguangLegVertexLimitRaise]
hash = 25033e92
override_vertex_count = 42885
override_byte_stride = 40

[TextureOverrideYeShunguangBellBlend]
hash = f9b50292
handling = skip
vb2 = ResourceYeShunguangBellBlend
if DRAW_TYPE == 1
	vb0 = ResourceYeShunguangBellPosition
	draw = 250, 0
endif

[TextureOverrideYeShunguangBellTexcoord]
hash = 7e5fb476
vb1 = ResourceYeShunguangBellTexcoord

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

[TextureOverrideYeShunguangRibbonIB]
hash = f9ce7b07
handling = skip

[TextureOverrideYeShunguangRibbonA]
hash = f9ce7b07
match_first_index = 0
ib = ResourceYeShunguangRibbonAIB
Resource\ZZMI\Diffuse = ref ResourceYeShunguangRibbonADiffuse
Resource\ZZMI\NormalMap = ref ResourceYeShunguangRibbonANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangRibbonALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangRibbonAMaterialMap
run = CommandList\ZZMI\SetTextures
if $ribbon == 1 && ($armband == 1 || $body2 == 1)
; ribbon (976)
drawindexed = 2808, 0, 0
endif

[TextureOverrideYeShunguangBody2IB]
hash = 3b1b73fe
handling = skip

[TextureOverrideYeShunguangBody2A]
hash = 3b1b73fe
match_first_index = 0
ib = ResourceYeShunguangBody2AIB
Resource\ZZMI\Diffuse = ref ResourceYeShunguangBody2ADiffuse
Resource\ZZMI\NormalMap = ref ResourceYeShunguangBody2ANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangBody2ALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangBody2AMaterialMap
run = CommandList\ZZMI\SetTextures
if $Qipao4 == 1 && ($Qipao1 == 1 || $Qipao2 == 1)
; Qipao4 (180)
drawindexed = 834, 0, 0
endif
if $Qipao5 == 1 && $Qipao3 == 1
; Qipao5 (251)
drawindexed = 1158, 834, 0
endif

[TextureOverrideYeShunguangBody1IB]
hash = c209c22b
handling = skip

[TextureOverrideYeShunguangBody1A]
hash = c209c22b
match_first_index = 0
ib = ResourceYeShunguangBody1AIB
if $tattoo2 == 0
Resource\ZZMI\Diffuse = ref ResourceYeShunguangBody1ADiffuse
elif $tattoo2 == 1
Resource\ZZMI\Diffuse = ref ResourceYeShunguangBody1ADiffuse2
elif $tattoo2 == 2
Resource\ZZMI\Diffuse = ref ResourceYeShunguangBody1ADiffuse3
endif
Resource\ZZMI\NormalMap = ref ResourceYeShunguangBody1ANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangBody1ALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangBody1AMaterialMap
run = CommandList\ZZMI\SetTextures
if $Qipao1 == 1
; Qipao1  (1123)
drawindexed = 4167, 0, 0
endif
if $Qipao2 == 1
; Qipao2 (2166)
drawindexed = 8226, 4167, 0
endif
if $Qipao3 == 1
; Qipao3 (4123)
drawindexed = 16356, 12393, 0
endif
if $armband == 1
; armband (1136)
drawindexed = 4122, 28749, 0
endif
if $body1 == 1 
; body1 (29375)
drawindexed = 164490, 32871, 0
endif
if $body2 == 1
; body2 (16759)
drawindexed = 87744, 197361, 0
endif
if $bra1 == 1 && $Qipao3 == 0
; bra1 (3738)
drawindexed = 9807, 285105, 0
endif
if $bra2 == 1 && $Qipao3 == 0
; bra2 (4014)
drawindexed = 11094, 294912, 0
endif
if $bracelet == 1
; bracelet (266)
drawindexed = 1080, 306006, 0
endif
if $hairband == 1
; hairband (144)
drawindexed = 420, 307086, 0
endif
if $piercing1 == 1
; piercing1 (588)
drawindexed = 1728, 307506, 0
endif
if $piercing2 == 1
; piercing2 (466)
drawindexed = 1056, 309234, 0
endif
if $piercing3 == 1
; piercing3 (582)
drawindexed = 1956, 310290, 0
endif
if $piercing4 == 1
; piercing4 (521)
drawindexed = 2220, 312246, 0
endif

ib = ResourceYeShunguangLegAIB
vb0 = ResourceBodyVB
vb1 = ResourceYeShunguangLegTexcoord
vb2 = ResourceYeShunguangLegBlend
vb3 = ResourceBodyVB

if $foot == 1
; foot (10034)
drawindexed = 52284, 13548, 0
endif
if $leg == 1
; leg (15139)
drawindexed = 84252, 65832, 0
endif
if $shoe2 == 1
; shoe2 (3496)
drawindexed = 7986, 182634, 0
endif
if $tattoo1 == 1
; tattoo (1007)
drawindexed = 5544, 190620, 0
endif

[TextureOverrideYeShunguangTailIB]
hash = 869976a3
if $active == 1
	handling = skip
endif

[TextureOverrideYeShunguangTailA]
hash = 869976a3
if $active == 1
	match_first_index = 0
	ResourceBodyVB = copy vb0
	ib = ResourceYeShunguangTailAIB

	run = CommandList\ZZMI\SetTextures
	if $tail == 1
	; tail (1381)
	drawindexed = 5202, 0, 0
	endif
endif

[TextureOverrideYeShunguangLegIB]
hash = 4a178546
handling = skip

[ResourceBodyVB]
[TextureOverrideYeShunguangLegA]
hash = 4a178546
match_first_index = 0
ResourceBodyVB = copy vb0
ib = ResourceYeShunguangLegAIB
Resource\ZZMI\Diffuse = ref ResourceYeShunguangLegADiffuse
Resource\ZZMI\NormalMap = ref ResourceYeShunguangLegANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangLegALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangLegAMaterialMap
run = CommandList\ZZMI\SetTextures
if $Qipao1 == 1
; Qipao1 (1072)
drawindexed = 4452, 0, 0
endif
if $Qipao2 == 1
; Qipao2  (1108)
drawindexed = 4548, 4452, 0
endif
if $Qipao3 == 1
; Qipao3  (1108)
drawindexed = 4548, 9000, 0
endif
if $pants1 == 1
; pants1 (280)
drawindexed = 960, 150084, 0
endif
if $pants2 == 1
; pants2 (2652)
drawindexed = 7974, 151044, 0
endif
if $pants3 == 1
; pants3 (2782)
drawindexed = 8400, 159018, 0
endif
if $pants4 == 1
; pants4 (2782)
drawindexed = 8400, 167418, 0
endif
if $shoe1 == 1
; shoe1 (1426)
drawindexed = 6816, 175818, 0
endif

if $foot == 1
; foot (10034)
drawindexed = 52284, 13548, 0
endif
if $leg == 1
; leg (15139)
drawindexed = 84252, 65832, 0
endif
if $shoe2 == 1
; shoe2 (3496)
drawindexed = 7986, 182634, 0
endif
if $tattoo1 == 1
; tattoo (1007)
drawindexed = 5544, 190620, 0
endif

[TextureOverrideYeShunguangBellIB]
hash = 0534b536
handling = skip

[TextureOverrideYeShunguangBellA]
hash = 0534b536
match_first_index = 0
ib = ResourceYeShunguangBellAIB
Resource\ZZMI\Diffuse = ref ResourceYeShunguangBellADiffuse
Resource\ZZMI\NormalMap = ref ResourceYeShunguangBellANormalMap
Resource\ZZMI\LightMap = ref ResourceYeShunguangBellALightMap
Resource\ZZMI\MaterialMap = ref ResourceYeShunguangBellAMaterialMap
run = CommandList\ZZMI\SetTextures
if $bell == 1
; bell (250)
drawindexed = 864, 0, 0
endif

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

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

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

[ResourceYeShunguangRibbonPosition]
type = Buffer
stride = 40
filename = YeShunguangRibbonPosition.buf

[ResourceYeShunguangRibbonBlend]
type = Buffer
stride = 32
filename = YeShunguangRibbonBlend.buf

[ResourceYeShunguangRibbonTexcoord]
type = Buffer
stride = 24
filename = YeShunguangRibbonTexcoord.buf

[ResourceYeShunguangRibbonAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangRibbonA.ib

[ResourceYeShunguangBody2Position]
type = Buffer
stride = 40
filename = YeShunguangBody2Position.buf

[ResourceYeShunguangBody2Blend]
type = Buffer
stride = 32
filename = YeShunguangBody2Blend.buf

[ResourceYeShunguangBody2Texcoord]
type = Buffer
stride = 36
filename = YeShunguangBody2Texcoord.buf

[ResourceYeShunguangBody2AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangBody2A.ib

[ResourceYeShunguangBody1Position]
type = Buffer
stride = 40
filename = YeShunguangBody1Position.buf

[ResourceYeShunguangBody1Blend]
type = Buffer
stride = 32
filename = YeShunguangBody1Blend.buf

[ResourceYeShunguangBody1Texcoord]
type = Buffer
stride = 20
filename = YeShunguangBody1Texcoord.buf

[ResourceYeShunguangBody1AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangBody1A.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

[ResourceYeShunguangLegPosition]
type = Buffer
stride = 40
filename = YeShunguangLegPosition.buf

[ResourceYeShunguangLegBlend]
type = Buffer
stride = 32
filename = YeShunguangLegBlend.buf

[ResourceYeShunguangLegTexcoord]
type = Buffer
stride = 20
filename = YeShunguangLegTexcoord.buf

[ResourceYeShunguangLegAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangLegA.ib

[ResourceYeShunguangBellPosition]
type = Buffer
stride = 40
filename = YeShunguangBellPosition.buf

[ResourceYeShunguangBellBlend]
type = Buffer
stride = 16
filename = YeShunguangBellBlend.buf

[ResourceYeShunguangBellTexcoord]
type = Buffer
stride = 36
filename = YeShunguangBellTexcoord.buf

[ResourceYeShunguangBellAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = YeShunguangBellA.ib

[ResourceYeShunguangRibbonADiffuse]
filename = YeShunguangRibbonADiffuse.dds

[ResourceYeShunguangRibbonANormalMap]
filename = YeShunguangRibbonANormalMap.dds

[ResourceYeShunguangRibbonALightMap]
filename = YeShunguangRibbonALightMap.dds

[ResourceYeShunguangRibbonAMaterialMap]
filename = YeShunguangRibbonAMaterialMap.dds

[ResourceYeShunguangBody2ADiffuse]
filename = YeShunguangBody2ADiffuse.dds

[ResourceYeShunguangBody2ANormalMap]
filename = YeShunguangBody2ANormalMap.dds

[ResourceYeShunguangBody2ALightMap]
filename = YeShunguangBody2ALightMap.dds

[ResourceYeShunguangBody2AMaterialMap]
filename = YeShunguangBody2AMaterialMap.dds

[ResourceYeShunguangBody1ADiffuse]
filename = YeShunguangBody1ADiffuse.dds

[ResourceYeShunguangBody1ADiffuse2]
filename = YeShunguangBody1ADiffuse2.dds

[ResourceYeShunguangBody1ADiffuse3]
filename = YeShunguangBody1ADiffuse3.dds

[ResourceYeShunguangBody1ANormalMap]
filename = YeShunguangBody1ANormalMap.dds

[ResourceYeShunguangBody1ALightMap]
filename = YeShunguangBody1ALightMap.dds

[ResourceYeShunguangBody1AMaterialMap]
filename = YeShunguangBody1AMaterialMap.dds

[ResourceYeShunguangTailADiffuse]
filename = YeShunguangTailADiffuse.dds

[ResourceYeShunguangTailANormalMap]
filename = YeShunguangTailANormalMap.dds

[ResourceYeShunguangTailALightMap]
filename = YeShunguangTailALightMap.dds

[ResourceYeShunguangTailAMaterialMap]
filename = YeShunguangTailAMaterialMap.dds

[ResourceYeShunguangLegADiffuse]
filename = YeShunguangLegADiffuse.dds

[ResourceYeShunguangLegANormalMap]
filename = YeShunguangLegANormalMap.dds

[ResourceYeShunguangLegALightMap]
filename = YeShunguangLegALightMap.dds

[ResourceYeShunguangLegAMaterialMap]
filename = YeShunguangLegAMaterialMap.dds

[ResourceYeShunguangBellADiffuse]
filename = YeShunguangBellADiffuse.dds

[ResourceYeShunguangBellANormalMap]
filename = YeShunguangBellANormalMap.dds

[ResourceYeShunguangBellALightMap]
filename = YeShunguangBellALightMap.dds

[ResourceYeShunguangBellAMaterialMap]
filename = YeShunguangBellAMaterialMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by monsoon.fanbox.cc"

; .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
