; Merged Mod: .\ZhongliModf0001\Zhongli.ini, .\ZhongliModf0002\Zhongli.ini, .\ZhongliModf0003\Zhongli.ini, .\ZhongliModf0004\Zhongli.ini, .\ZhongliModf0005\Zhongli.ini, .\ZhongliModf0006\Zhongli.ini, .\ZhongliModf0007\Zhongli.ini

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

[Constants]
global $speed = 3
global $frameStart= 0
global $frameEnd = 7
global $swapvar = 0
global $swapvarAux = 0
global $auxTime = 0
global $swapvarcolor = 0

global $delay = 3
global $temp
global $stop_blink = 0


[KeySwapcolor]
condition = $active == 1
Key = ]
Back = [
type = cycle
$swapvarcolor = 0,1,2,3


[Present]

if $stop_blink == 0
    if ($swapvarAux + (1/$speed)) < $frameEnd
        $swapvarAux = $swapvarAux + (1/$speed)
        $temp = time
    else
        $swapvarAux = $frameStart
        $stop_blink = 1
    endif
else if time - $temp > $delay
    $stop_blink = 0
endif
$swapvar = $swapvarAux//1
;post $active = 0

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

[TextureOverrideZhongliPosition]
hash = a75ba32e
run = CommandListZhongliPosition
;$active = 1

[TextureOverrideZhongliBlend]
hash = f0a40042
run = CommandListZhongliBlend

[TextureOverrideZhongliTexcoord]
hash = eb3aaca2
run = CommandListZhongliTexcoord

[TextureOverrideZhongliVertexLimitRaise]
hash = 6fa3d7f4

[TextureOverrideZhongliIB]
hash = 4c8480f5
;hash = 7450ea2a
run = CommandListZhongliIB

[TextureOverrideZhongliHead]
hash = 4c8480f5
;hash = 7450ea2a
match_first_index = 0
run = CommandListZhongliHead

[TextureOverrideZhongliBody]
hash = 4c8480f5
;hash = 7450ea2a
match_first_index = 8976
run = CommandListZhongliBody

[TextureOverrideZhongliDress]
hash = 4c8480f5
;hash = 7450ea2a
match_first_index = 37530
run = CommandListZhongliDress

[TextureOverrideZhongliFaceHeadDiffuse]
hash = 1db9961f
handling = skip


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

[CommandListZhongliPosition]
if $swapvar == 0
	vb0 = ResourceZhongliPosition.0
else if $swapvar == 1
	vb0 = ResourceZhongliPosition.1
else if $swapvar == 2
	vb0 = ResourceZhongliPosition.2
else if $swapvar == 3
	vb0 = ResourceZhongliPosition.3
else if $swapvar == 4
	vb0 = ResourceZhongliPosition.4
else if $swapvar == 5
	vb0 = ResourceZhongliPosition.5
else if $swapvar == 6
	vb0 = ResourceZhongliPosition.6
endif

[CommandListZhongliBlend]
if $swapvar == 0
	vb1 = ResourceZhongliBlend.0
	handling = skip
	draw = 22715,0
else if $swapvar == 1
	vb1 = ResourceZhongliBlend.1
	handling = skip
	draw = 22715,0
else if $swapvar == 2
	vb1 = ResourceZhongliBlend.2
	handling = skip
	draw = 22715,0
else if $swapvar == 3
	vb1 = ResourceZhongliBlend.3
	handling = skip
	draw = 22715,0
else if $swapvar == 4
	vb1 = ResourceZhongliBlend.4
	handling = skip
	draw = 22715,0
else if $swapvar == 5
	vb1 = ResourceZhongliBlend.5
	handling = skip
	draw = 22715,0
else if $swapvar == 6
	vb1 = ResourceZhongliBlend.6
	handling = skip
	draw = 22715,0
endif

[CommandListZhongliTexcoord]
if $swapvar == 0
	vb1 = ResourceZhongliTexcoord.0
else if $swapvar == 1
	vb1 = ResourceZhongliTexcoord.1
else if $swapvar == 2
	vb1 = ResourceZhongliTexcoord.2
else if $swapvar == 3
	vb1 = ResourceZhongliTexcoord.3
else if $swapvar == 4
	vb1 = ResourceZhongliTexcoord.4
else if $swapvar == 5
	vb1 = ResourceZhongliTexcoord.5
else if $swapvar == 6
	vb1 = ResourceZhongliTexcoord.6
endif

[CommandListZhongliIB]
if $swapvar == 0
	handling = skip
	drawindexed = auto
else if $swapvar == 1
	handling = skip
	drawindexed = auto
else if $swapvar == 2
	handling = skip
	drawindexed = auto
else if $swapvar == 3
	handling = skip
	drawindexed = auto
else if $swapvar == 4
	handling = skip
	drawindexed = auto
else if $swapvar == 5
	handling = skip
	drawindexed = auto
else if $swapvar == 6
	handling = skip
	drawindexed = auto
endif

[CommandListZhongliHead]
if $swapvar >= $frameStart && $swapvar <= $frameEnd
	ps-t0 = ResourceZhongliHeadDiffuse.0
	ps-t1 = ResourceZhongliHeadLightMap.0

endif
if $swapvar == 0
	ib = ResourceZhongliHeadIB.0
else if $swapvar == 1
	ib = ResourceZhongliHeadIB.1
else if $swapvar == 2
	ib = ResourceZhongliHeadIB.2
else if $swapvar == 3
	ib = ResourceZhongliHeadIB.3
else if $swapvar == 4
	ib = ResourceZhongliHeadIB.4
else if $swapvar == 5
	ib = ResourceZhongliHeadIB.5
else if $swapvar == 6
	ib = ResourceZhongliHeadIB.6
endif

[CommandListZhongliBody]
if $swapvar >= $frameStart && $swapvar <= $frameEnd
	ps-t0 = ResourceZhongliBodyDiffuse.0
	ps-t1 = ResourceZhongliBodyLightMap.0
	endif
else if $swapvar >= $frameStart && $swapvar <= $frameEnd
	if $swapvarcolor == 1
	ps-t0 = ResourceZhongliBodyDiffuse.1
	ps-t1 = ResourceZhongliBodyLightMap.0
	endif
else if $swapvar >= $frameStart && $swapvar <= $frameEnd
	if $swapvarcolor == 2
	ps-t0 = ResourceZhongliBodyDiffuse.2
	ps-t1 = ResourceZhongliBodyLightMap.0
	endif
else if $swapvar >= $frameStart && $swapvar <= $frameEnd
	if $swapvarcolor == 3
	ps-t0 = ResourceZhongliBodyDiffuse.3
	ps-t1 = ResourceZhongliBodyLightMap.0
endif
if $swapvar == 0
	ib = ResourceZhongliBodyIB.0
else if $swapvar == 1
	ib = ResourceZhongliBodyIB.1
else if $swapvar == 2
	ib = ResourceZhongliBodyIB.2
else if $swapvar == 3
	ib = ResourceZhongliBodyIB.3
else if $swapvar == 4
	ib = ResourceZhongliBodyIB.4
else if $swapvar == 5
	ib = ResourceZhongliBodyIB.5
else if $swapvar == 6
	ib = ResourceZhongliBodyIB.6
endif

[CommandListZhongliDress]
if $swapvar >= $frameStart && $swapvar <= $frameEnd && $swapvarcolor == 0
	ps-t0 = ResourceZhongliDressDiffuse.0
	ps-t1 = ResourceZhongliDressLightMap.0
	endif
else if $swapvar >= $frameStart && $swapvar <= $frameEnd
	if $swapvarcolor == 1
	ps-t0 = ResourceZhongliBodyDiffuse.1
	ps-t1 = ResourceZhongliDressLightMap.0
	endif
else if $swapvar >= $frameStart && $swapvar <= $frameEnd
	if $swapvarcolor == 2
	ps-t0 = ResourceZhongliBodyDiffuse.2
	ps-t1 = ResourceZhongliDressLightMap.0
	endif
else if $swapvar >= $frameStart && $swapvar <= $frameEnd
	if $swapvarcolor == 3
	ps-t0 = ResourceZhongliBodyDiffuse.3
	ps-t1 = ResourceZhongliDressLightMap.0
endif
if $swapvar == 0
	ib = ResourceZhongliDressIB.0
else if $swapvar == 1
	ib = ResourceZhongliDressIB.1
else if $swapvar == 2
	ib = ResourceZhongliDressIB.2
else if $swapvar == 3
	ib = ResourceZhongliDressIB.3
else if $swapvar == 4
	ib = ResourceZhongliDressIB.4
else if $swapvar == 5
	ib = ResourceZhongliDressIB.5
else if $swapvar == 6
	ib = ResourceZhongliDressIB.6
endif


[CommandListZhongliFaceHeadDiffuse]
if $swapvar == 0
	ps-t0 = ResourceZhongliFaceHeadDiffuse.0
;else if $swapvar == 1
;	ps-t0 = ResourceZhongliFaceHeadDiffuse.1
;else if $swapvar == 2
;	ps-t0 = ResourceZhongliFaceHeadDiffuse.2
;else if $swapvar == 3
;	ps-t0 = ResourceZhongliFaceHeadDiffuse.3
;else if $swapvar == 4
;	ps-t0 = ResourceZhongliFaceHeadDiffuse.4
;else if $swapvar == 5
;	ps-t0 = ResourceZhongliFaceHeadDiffuse.5
;else if $swapvar == 6
;	ps-t0 = ResourceZhongliFaceHeadDiffuse.6
endif

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

[ResourceZhongliPosition.0]
type = Buffer
stride = 40
filename = .\ZhongliModf0001\ZhongliPosition.buf

[ResourceZhongliBlend.0]
type = Buffer
stride = 32
filename = .\ZhongliModf0001\ZhongliBlend.buf

[ResourceZhongliTexcoord.0]
type = Buffer
stride = 20
filename = .\ZhongliModf0001\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0001\ZhongliHead.ib

[ResourceZhongliBodyIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0001\ZhongliBody.ib

[ResourceZhongliDressIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0001\ZhongliDress.ib

[ResourceZhongliHeadDiffuse.0]
filename = .\ZhongliModf0001\ZhongliHeadDiffuse.dds

[ResourceZhongliHeadLightMap.0]
filename = .\ZhongliModf0001\ZhongliHeadLightMap.dds

[ResourceZhongliBodyDiffuse.0]
filename = .\ZhongliModf0001\ZhongliBodyDiffuse.dds

[ResourceZhongliBodyLightMap.0]
filename = .\ZhongliModf0001\ZhongliBodyLightMap.dds

[ResourceZhongliDressDiffuse.0]
filename = .\ZhongliModf0001\ZhongliDressDiffuse.dds

[ResourceZhongliDressLightMap.0]
filename = .\ZhongliModf0001\ZhongliDressLightMap.dds

[ResourceZhongliFaceHeadDiffuse.0]
filename = .\ZhongliModf0001\ZhongliFaceHeadDiffuse.dds

[ResourceZhongliPosition.1]
type = Buffer
stride = 40
filename = .\ZhongliModf0002\ZhongliPosition.buf

[ResourceZhongliBlend.1]
type = Buffer
stride = 32
filename = .\ZhongliModf0002\ZhongliBlend.buf

[ResourceZhongliTexcoord.1]
type = Buffer
stride = 20
filename = .\ZhongliModf0002\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0002\ZhongliHead.ib

[ResourceZhongliBodyIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0002\ZhongliBody.ib

[ResourceZhongliDressIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0002\ZhongliDress.ib








[ResourceZhongliPosition.2]
type = Buffer
stride = 40
filename = .\ZhongliModf0003\ZhongliPosition.buf

[ResourceZhongliBlend.2]
type = Buffer
stride = 32
filename = .\ZhongliModf0003\ZhongliBlend.buf

[ResourceZhongliTexcoord.2]
type = Buffer
stride = 20
filename = .\ZhongliModf0003\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0003\ZhongliHead.ib

[ResourceZhongliBodyIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0003\ZhongliBody.ib

[ResourceZhongliDressIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0003\ZhongliDress.ib








[ResourceZhongliPosition.3]
type = Buffer
stride = 40
filename = .\ZhongliModf0004\ZhongliPosition.buf

[ResourceZhongliBlend.3]
type = Buffer
stride = 32
filename = .\ZhongliModf0004\ZhongliBlend.buf

[ResourceZhongliTexcoord.3]
type = Buffer
stride = 20
filename = .\ZhongliModf0004\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.3]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0004\ZhongliHead.ib

[ResourceZhongliBodyIB.3]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0004\ZhongliBody.ib

[ResourceZhongliDressIB.3]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0004\ZhongliDress.ib








[ResourceZhongliPosition.4]
type = Buffer
stride = 40
filename = .\ZhongliModf0005\ZhongliPosition.buf

[ResourceZhongliBlend.4]
type = Buffer
stride = 32
filename = .\ZhongliModf0005\ZhongliBlend.buf

[ResourceZhongliTexcoord.4]
type = Buffer
stride = 20
filename = .\ZhongliModf0005\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.4]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0005\ZhongliHead.ib

[ResourceZhongliBodyIB.4]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0005\ZhongliBody.ib

[ResourceZhongliDressIB.4]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0005\ZhongliDress.ib








[ResourceZhongliPosition.5]
type = Buffer
stride = 40
filename = .\ZhongliModf0006\ZhongliPosition.buf

[ResourceZhongliBlend.5]
type = Buffer
stride = 32
filename = .\ZhongliModf0006\ZhongliBlend.buf

[ResourceZhongliTexcoord.5]
type = Buffer
stride = 20
filename = .\ZhongliModf0006\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.5]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0006\ZhongliHead.ib

[ResourceZhongliBodyIB.5]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0006\ZhongliBody.ib

[ResourceZhongliDressIB.5]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0006\ZhongliDress.ib








[ResourceZhongliPosition.6]
type = Buffer
stride = 40
filename = .\ZhongliModf0007\ZhongliPosition.buf

[ResourceZhongliBlend.6]
type = Buffer
stride = 32
filename = .\ZhongliModf0007\ZhongliBlend.buf

[ResourceZhongliTexcoord.6]
type = Buffer
stride = 20
filename = .\ZhongliModf0007\ZhongliTexcoord.buf

[ResourceZhongliHeadIB.6]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0007\ZhongliHead.ib

[ResourceZhongliBodyIB.6]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0007\ZhongliBody.ib

[ResourceZhongliDressIB.6]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\ZhongliModf0007\ZhongliDress.ib




[ResourceZhongliBodyDiffuse.1]
filename = .\ZhongliModf0001\ZhongliBodyDiffuse1.dds

[ResourceZhongliBodyDiffuse.2]
filename = .\ZhongliModf0001\ZhongliBodyDiffuse2.dds

[ResourceZhongliBodyDiffuse.3]
filename = .\ZhongliModf0001\ZhongliBodyDiffuse3.dds





; .ini generated by GIMI (Genshin-Impact-Model-Importer) mod merger script
; If you have any issues or find any bugs, please open a ticket at https://github.com/SilentNightSound/GI-Model-Importer/issues or contact SilentNightSound#7430 on discord
