; Merged Mod: .\PiperMod.01\Piper.ini, .\PiperMod.02\Piper.ini, .\PiperMod.03\Piper.ini, .\PiperMod.04\Piper.ini, .\PiperMod.05\Piper.ini

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

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

[KeySwap]
condition = $active == 1
key = p
type = cycle
$swapvar = 0,1,2,3,4
$creditinfo = 0

[Present]
post $active = 0
run = CommandListCreditInfo

; Shader ------------------------------

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

[TextureOverridePiperbodyPosition]
hash = ffe8fea7
run = CommandListPiperbodyPosition
$active = 1

[TextureOverridePiperbodyTexcoord]
hash = 6357b120
run = CommandListPiperbodyTexcoord

[TextureOverridePiperbodyVertexLimitRaise]
hash = d28231af

[TextureOverridePiperhairPosition]
hash = c4619559
run = CommandListPiperhairPosition
$active = 1

[TextureOverridePiperhairTexcoord]
hash = 8b6b17f8
run = CommandListPiperhairTexcoord

[TextureOverridePiperhairVertexLimitRaise]
hash = da8a2564

[TextureOverridePiperbodyIB]
hash = 585da98b
run = CommandListPiperbodyIB

[TextureOverridePiperbodyA]
hash = 585da98b
match_first_index = 0
run = CommandListPiperbodyA

[TextureOverridePiperbodyADiffuse]
hash = fed40302
run = CommandListPiperbodyADiffuse

[TextureOverridePiper.BodyA.Diffuse.1024]
hash = b450949d
run = CommandListPiper.BodyA.Diffuse.1024

[TextureOverridePiperbodyAMaterialMap]
hash = 9cc2aaa0
run = CommandListPiperbodyAMaterialMap

[TextureOverridePiper.BodyA.LightMap.1024]
hash = db9c7abf
run = CommandListPiper.BodyA.LightMap.1024

[TextureOverridePiperbodyALightMap]
hash = 7fdee30d
run = CommandListPiperbodyALightMap

[TextureOverridePiper.BodyA.MaterialMap.1024]
hash = 73e72a1e
run = CommandListPiper.BodyA.MaterialMap.1024

[TextureOverridePiperhairIB]
hash = 940454ef
run = CommandListPiperhairIB

[TextureOverridePiperhairA]
hash = 940454ef
match_first_index = 0
run = CommandListPiperhairA

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

[CommandListPiperbodyPosition]
if $swapvar == 0
	handling = skip
	vb0 = ResourcePiperbodyPosition.0
	vb2 = ResourcePiperbodyBlend.0
	draw = 18589,0
	$active = 1
else if $swapvar == 1
	handling = skip
	vb0 = ResourcePiperbodyPosition.1
	vb2 = ResourcePiperbodyBlend.1
	draw = 17943,0
	$active = 1
else if $swapvar == 2
	handling = skip
	vb0 = ResourcePiperbodyPosition.2
	vb2 = ResourcePiperbodyBlend.2
	draw = 17670,0
	$active = 1
else if $swapvar == 3
	handling = skip
	vb0 = ResourcePiperbodyPosition.3
	vb2 = ResourcePiperbodyBlend.3
	draw = 17024,0
	$active = 1
else if $swapvar == 4
	handling = skip
	vb0 = ResourcePiperbodyPosition.4
	vb2 = ResourcePiperbodyBlend.4
	draw = 15078,0
	$active = 1
endif

[CommandListPiperbodyTexcoord]
if $swapvar == 0
	vb1 = ResourcePiperbodyTexcoord.0
else if $swapvar == 1
	vb1 = ResourcePiperbodyTexcoord.1
else if $swapvar == 2
	vb1 = ResourcePiperbodyTexcoord.2
else if $swapvar == 3
	vb1 = ResourcePiperbodyTexcoord.3
else if $swapvar == 4
	vb1 = ResourcePiperbodyTexcoord.4
endif

[CommandListPiperhairPosition]
if $swapvar == 0
	handling = skip
	vb0 = ResourcePiperhairPosition.0
	vb2 = ResourcePiperhairBlend.0
	draw = 8848,0
	$active = 1
else if $swapvar == 1
	handling = skip
	vb0 = ResourcePiperhairPosition.1
	vb2 = ResourcePiperhairBlend.1
	draw = 8848,0
	$active = 1
else if $swapvar == 2
	handling = skip
	vb0 = ResourcePiperhairPosition.2
	vb2 = ResourcePiperhairBlend.2
	draw = 8848,0
	$active = 1
else if $swapvar == 3
	handling = skip
	vb0 = ResourcePiperhairPosition.3
	vb2 = ResourcePiperhairBlend.3
	draw = 8848,0
	$active = 1
else if $swapvar == 4
	handling = skip
	vb0 = ResourcePiperhairPosition.4
	vb2 = ResourcePiperhairBlend.4
	draw = 8848,0
	$active = 1
endif

[CommandListPiperhairTexcoord]
if $swapvar == 0
	vb1 = ResourcePiperhairTexcoord.0
else if $swapvar == 1
	vb1 = ResourcePiperhairTexcoord.1
else if $swapvar == 2
	vb1 = ResourcePiperhairTexcoord.2
else if $swapvar == 3
	vb1 = ResourcePiperhairTexcoord.3
else if $swapvar == 4
	vb1 = ResourcePiperhairTexcoord.4
endif

[CommandListPiperbodyIB]
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
endif

[CommandListPiperbodyA]
if $swapvar == 0
	run = CommandListSkinTexture
	ib = ResourcePiperbodyAIB.0
else if $swapvar == 1
	run = CommandListSkinTexture
	ib = ResourcePiperbodyAIB.1
else if $swapvar == 2
	run = CommandListSkinTexture
	ib = ResourcePiperbodyAIB.2
else if $swapvar == 3
	run = CommandListSkinTexture
	ib = ResourcePiperbodyAIB.3
else if $swapvar == 4
	run = CommandListSkinTexture
	ib = ResourcePiperbodyAIB.4
endif

[CommandListPiperbodyADiffuse]
if $swapvar == 0
	this = ResourcePiperbodyADiffuse.0
	ps-t4 = ResourcePiperbodyANormalMap.0
else if $swapvar == 1
	this = ResourcePiperbodyADiffuse.1
	ps-t4 = ResourcePiperbodyANormalMap.1
else if $swapvar == 2
	this = ResourcePiperbodyADiffuse.2
	ps-t4 = ResourcePiperbodyANormalMap.2
else if $swapvar == 3
	this = ResourcePiperbodyADiffuse.3
	ps-t4 = ResourcePiperbodyANormalMap.3
else if $swapvar == 4
	this = ResourcePiperbodyADiffuse.4
	ps-t4 = ResourcePiperbodyANormalMap.4
endif

[CommandListPiper.BodyA.Diffuse.1024]
if $swapvar == 0
	this = ResourcePiperbodyADiffuse.0
	ps-t4 = ResourcePiperbodyANormalMap.0
else if $swapvar == 1
	this = ResourcePiperbodyADiffuse.1
	ps-t4 = ResourcePiperbodyANormalMap.1
else if $swapvar == 2
	this = ResourcePiperbodyADiffuse.2
	ps-t4 = ResourcePiperbodyANormalMap.2
else if $swapvar == 3
	this = ResourcePiperbodyADiffuse.3
	ps-t4 = ResourcePiperbodyANormalMap.3
else if $swapvar == 4
	this = ResourcePiperbodyADiffuse.4
	ps-t4 = ResourcePiperbodyANormalMap.4
endif

[CommandListPiperbodyAMaterialMap]
if $swapvar == 0
	this = ResourcePiperbodyAMaterialMap.0
else if $swapvar == 1
	this = ResourcePiperbodyAMaterialMap.1
else if $swapvar == 2
	this = ResourcePiperbodyAMaterialMap.2
else if $swapvar == 3
	this = ResourcePiperbodyAMaterialMap.3
else if $swapvar == 4
	this = ResourcePiperbodyAMaterialMap.4
endif

[CommandListPiper.BodyA.LightMap.1024]
if $swapvar == 0
	this = ResourcePiperbodyAMaterialMap.0
else if $swapvar == 1
	this = ResourcePiperbodyAMaterialMap.1
else if $swapvar == 2
	this = ResourcePiperbodyAMaterialMap.2
else if $swapvar == 3
	this = ResourcePiperbodyAMaterialMap.3
else if $swapvar == 4
	this = ResourcePiperbodyAMaterialMap.4
endif

[CommandListPiperbodyALightMap]
if $swapvar == 0
	this = ResourcePiperbodyALightMap.0
else if $swapvar == 1
	this = ResourcePiperbodyALightMap.1
else if $swapvar == 2
	this = ResourcePiperbodyALightMap.2
else if $swapvar == 3
	this = ResourcePiperbodyALightMap.3
else if $swapvar == 4
	this = ResourcePiperbodyALightMap.4
endif

[CommandListPiper.BodyA.MaterialMap.1024]
if $swapvar == 0
	this = ResourcePiperbodyALightMap.0
else if $swapvar == 1
	this = ResourcePiperbodyALightMap.1
else if $swapvar == 2
	this = ResourcePiperbodyALightMap.2
else if $swapvar == 3
	this = ResourcePiperbodyALightMap.3
else if $swapvar == 4
	this = ResourcePiperbodyALightMap.4
endif

[CommandListPiperhairIB]
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
endif

[CommandListPiperhairA]
if $swapvar == 0
	run = CommandListSkinTexture
	ib = ResourcePiperhairAIB.0
else if $swapvar == 1
	run = CommandListSkinTexture
	ib = ResourcePiperhairAIB.1
else if $swapvar == 2
	run = CommandListSkinTexture
	ib = ResourcePiperhairAIB.2
else if $swapvar == 3
	run = CommandListSkinTexture
	ib = ResourcePiperhairAIB.3
else if $swapvar == 4
	run = CommandListSkinTexture
	ib = ResourcePiperhairAIB.4
endif

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

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

[ResourcePiperbodyPosition.0]
type = Buffer
stride = 40
filename = .\PiperMod.01\PiperbodyPosition.buf

[ResourcePiperbodyBlend.0]
type = Buffer
stride = 32
filename = .\PiperMod.01\PiperbodyBlend.buf

[ResourcePiperbodyTexcoord.0]
type = Buffer
stride = 16
filename = .\PiperMod.01\PiperbodyTexcoord.buf

[ResourcePiperhairPosition.0]
type = Buffer
stride = 40
filename = .\PiperMod.01\PiperhairPosition.buf

[ResourcePiperhairBlend.0]
type = Buffer
stride = 32
filename = .\PiperMod.01\PiperhairBlend.buf

[ResourcePiperhairTexcoord.0]
type = Buffer
stride = 20
filename = .\PiperMod.01\PiperhairTexcoord.buf

[ResourcePiperbodyAIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.01\PiperbodyA.ib

[ResourcePiperhairAIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.01\PiperhairA.ib

[ResourcePiperbodyADiffuse.0]
filename = .\PiperMod.01\PiperbodyADiffuse.dds

[ResourcePiperbodyANormalMap.0]
filename = .\PiperMod.01\PiperbodyANormalMap.dds

[ResourcePiperbodyAMaterialMap.0]
filename = .\PiperMod.01\PiperbodyAMaterialMap.dds

[ResourcePiperbodyALightMap.0]
filename = .\PiperMod.01\PiperbodyALightMap.dds

[ResourceCreditInfo.0]
type = Buffer
data = "Created by ming chen"

[ResourcePiperbodyPosition.1]
type = Buffer
stride = 40
filename = .\PiperMod.02\PiperbodyPosition.buf

[ResourcePiperbodyBlend.1]
type = Buffer
stride = 32
filename = .\PiperMod.02\PiperbodyBlend.buf

[ResourcePiperbodyTexcoord.1]
type = Buffer
stride = 16
filename = .\PiperMod.02\PiperbodyTexcoord.buf

[ResourcePiperhairPosition.1]
type = Buffer
stride = 40
filename = .\PiperMod.02\PiperhairPosition.buf

[ResourcePiperhairBlend.1]
type = Buffer
stride = 32
filename = .\PiperMod.02\PiperhairBlend.buf

[ResourcePiperhairTexcoord.1]
type = Buffer
stride = 20
filename = .\PiperMod.02\PiperhairTexcoord.buf

[ResourcePiperbodyAIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.02\PiperbodyA.ib

[ResourcePiperhairAIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.02\PiperhairA.ib

[ResourcePiperbodyADiffuse.1]
filename = .\PiperMod.01\PiperbodyADiffuse.dds

[ResourcePiperbodyANormalMap.1]
filename = .\PiperMod.01\PiperbodyANormalMap.dds

[ResourcePiperbodyAMaterialMap.1]
filename = .\PiperMod.01\PiperbodyAMaterialMap.dds

[ResourcePiperbodyALightMap.1]
filename = .\PiperMod.01\PiperbodyALightMap.dds

[ResourceCreditInfo.1]
type = Buffer
data = "Created by ming chen"

[ResourcePiperbodyPosition.2]
type = Buffer
stride = 40
filename = .\PiperMod.03\PiperbodyPosition.buf

[ResourcePiperbodyBlend.2]
type = Buffer
stride = 32
filename = .\PiperMod.03\PiperbodyBlend.buf

[ResourcePiperbodyTexcoord.2]
type = Buffer
stride = 16
filename = .\PiperMod.03\PiperbodyTexcoord.buf

[ResourcePiperhairPosition.2]
type = Buffer
stride = 40
filename = .\PiperMod.03\PiperhairPosition.buf

[ResourcePiperhairBlend.2]
type = Buffer
stride = 32
filename = .\PiperMod.03\PiperhairBlend.buf

[ResourcePiperhairTexcoord.2]
type = Buffer
stride = 20
filename = .\PiperMod.03\PiperhairTexcoord.buf

[ResourcePiperbodyAIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.03\PiperbodyA.ib

[ResourcePiperhairAIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.03\PiperhairA.ib

[ResourcePiperbodyADiffuse.2]
filename = .\PiperMod.01\PiperbodyADiffuse.dds

[ResourcePiperbodyANormalMap.2]
filename = .\PiperMod.01\PiperbodyANormalMap.dds

[ResourcePiperbodyAMaterialMap.2]
filename = .\PiperMod.01\PiperbodyAMaterialMap.dds

[ResourcePiperbodyALightMap.2]
filename = .\PiperMod.01\PiperbodyALightMap.dds

[ResourceCreditInfo.2]
type = Buffer
data = "Created by ming chen"

[ResourcePiperbodyPosition.3]
type = Buffer
stride = 40
filename = .\PiperMod.04\PiperbodyPosition.buf

[ResourcePiperbodyBlend.3]
type = Buffer
stride = 32
filename = .\PiperMod.04\PiperbodyBlend.buf

[ResourcePiperbodyTexcoord.3]
type = Buffer
stride = 16
filename = .\PiperMod.04\PiperbodyTexcoord.buf

[ResourcePiperhairPosition.3]
type = Buffer
stride = 40
filename = .\PiperMod.04\PiperhairPosition.buf

[ResourcePiperhairBlend.3]
type = Buffer
stride = 32
filename = .\PiperMod.04\PiperhairBlend.buf

[ResourcePiperhairTexcoord.3]
type = Buffer
stride = 20
filename = .\PiperMod.04\PiperhairTexcoord.buf

[ResourcePiperbodyAIB.3]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.04\PiperbodyA.ib

[ResourcePiperhairAIB.3]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.04\PiperhairA.ib

[ResourcePiperbodyADiffuse.3]
filename = .\PiperMod.01\PiperbodyADiffuse.dds

[ResourcePiperbodyANormalMap.3]
filename = .\PiperMod.01\PiperbodyANormalMap.dds

[ResourcePiperbodyAMaterialMap.3]
filename = .\PiperMod.01\PiperbodyAMaterialMap.dds

[ResourcePiperbodyALightMap.3]
filename = .\PiperMod.01\PiperbodyALightMap.dds

[ResourceCreditInfo.3]
type = Buffer
data = "Created by ming chen"

[ResourcePiperbodyPosition.4]
type = Buffer
stride = 40
filename = .\PiperMod.05\PiperbodyPosition.buf

[ResourcePiperbodyBlend.4]
type = Buffer
stride = 32
filename = .\PiperMod.05\PiperbodyBlend.buf

[ResourcePiperbodyTexcoord.4]
type = Buffer
stride = 16
filename = .\PiperMod.05\PiperbodyTexcoord.buf

[ResourcePiperhairPosition.4]
type = Buffer
stride = 40
filename = .\PiperMod.05\PiperhairPosition.buf

[ResourcePiperhairBlend.4]
type = Buffer
stride = 32
filename = .\PiperMod.05\PiperhairBlend.buf

[ResourcePiperhairTexcoord.4]
type = Buffer
stride = 20
filename = .\PiperMod.05\PiperhairTexcoord.buf

[ResourcePiperbodyAIB.4]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.05\PiperbodyA.ib

[ResourcePiperhairAIB.4]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\PiperMod.05\PiperhairA.ib

[ResourcePiperbodyADiffuse.4]
filename = .\PiperMod.01\PiperbodyADiffuse.dds

[ResourcePiperbodyANormalMap.4]
filename = .\PiperMod.01\PiperbodyANormalMap.dds

[ResourcePiperbodyAMaterialMap.4]
filename = .\PiperMod.01\PiperbodyAMaterialMap.dds

[ResourcePiperbodyALightMap.4]
filename = .\PiperMod.01\PiperbodyALightMap.dds

[ResourcePiperbodyPosition.5]
type = Buffer
stride = 30
filename = .\PiperMod.05\PiperbodyPosition.buf

[ResourcePiperbodyBlend.5]
type = Buffer
stride = 02
filename = .\PiperMod.05\PiperbodyBlend.buf

[ResourcePiperbodyTexcoord.5]
type = Buffer
stride = 06
filename = .\PiperMod.05\PiperbodyTexcoord.buf


[ResourceCreditInfo.4]
type = Buffer
data = "Created by ming chen"



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