; Nekomata merged

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

[Constants]
global persist $boobanet = 0
; $boobanet = 0 means there is boobanet
global persist $hair = 0
; $hair = 0 means original hair
global $active

[KeySwapBoobaNet]
condition = $active == 1
key = VK_RIGHT
type = cycle
$boobanet = 0,1

[KeySwapHair]
condition = $active == 1
key = VK_UP
type = cycle
$hair = 0,1

[Present]
post $active = 0

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

[TextureOverrideNekomataHairPosition]
hash = 35439aa6
run = CommandListNekomataHairPosition
$active = 1

[TextureOverrideNekomataHairTexcoord]
hash = 9ada013d
run = CommandListNekomataHairTexcoord

[TextureOverrideNekomataHairVertexLimitRaise]
hash = a00df230

[TextureOverrideNekomataBodyPosition]
hash = eaad1408
run = CommandListNekomataBodyPosition
$active = 1

[TextureOverrideNekomataBodyTexcoord]
hash = f589a51f
run = CommandListNekomataBodyTexcoord

[TextureOverrideNekomataBodyVertexLimitRaise]
hash = 0c01e6a5

[TextureOverrideNekomataLegsPosition]
hash = 3c4015fd
handling = skip
vb0 = ResourceNekomataLegsPosition
vb2 = ResourceNekomataLegsBlend
draw = 2406,0

[TextureOverrideNekomataLegsTexcoord]
hash = 2a4f8c9e
vb1 = ResourceNekomataLegsTexcoord

[TextureOverrideNekomataLegsVertexLimitRaise]
hash = 99132d05

[TextureOverrideNekomataHairIB]
hash = da11fd85
handling = skip
drawindexed = auto

[TextureOverrideNekomataHairA]
hash = da11fd85
match_first_index = 0
run = CommandListNekomataHairA

[TextureOverrideNekomataHairADiffuse.1024]
hash = aed3d8bd
run = CommandListNekomataHairADiffuse

[TextureOverrideNekomataHairALightMap.1024]
hash = f8accad8
run = CommandListNekomataHairALightMap

[TextureOverrideNekomataHairAMaterialMap.1024]
hash = 0c22352c
run = CommandListNekomataHairAMaterialMap

[TextureOverrideNekomataHairANormalMap.1024]
hash = c936ea68
run = CommandListNekomataHairANormalMap

[TextureOverrideNekomataHairADiffuse.2048]
hash = 25f3ae9b
run = CommandListNekomataHairADiffuse

[TextureOverrideNekomataHairALightMap.2048]
hash = 548c7f7d
run = CommandListNekomataHairALightMap

[TextureOverrideNekomataHairAMaterialMap.2048]
hash = 4ca5efc6
run = CommandListNekomataHairAMaterialMap

[TextureOverrideNekomataHairANormalMap.2048]
hash = 799eb07d
run = CommandListNekomataHairANormalMap

[TextureOverrideNekomataHairB]
hash = da11fd85
match_first_index = 9156
run = CommandListNekomataHairB

[TextureOverrideNekomataHairBDiffuse.1024]
hash = 60687646
this = ResourceNekomataHairBDiffuse

[TextureOverrideNekomataHairBLightMap.1024]
hash = 4f3f7df0
this = ResourceNekomataHairBLightMap

[TextureOverrideNekomataHairBMaterialMap.1024]
hash = a5529690
this = ResourceNekomataHairBMaterialMap

[TextureOverrideNekomataHairBNormalMap.1024]
hash = c1933b38
this = ResourceNekomataHairBNormalMap

[TextureOverrideNekomataHairBDiffuse.2048]
hash = 207b8e63
this = ResourceNekomataHairBDiffuse

[TextureOverrideNekomataHairBLightMap.2048]
hash = fc53fc6f
this = ResourceNekomataHairBLightMap

[TextureOverrideNekomataHairBMaterialMap.2048]
hash = b3286755
this = ResourceNekomataHairBMaterialMap

[TextureOverrideNekomataHairBNormalMap.2048]
hash = ecaef71c
this = ResourceNekomataHairBNormalMap

[TextureOverrideNekomataBodyIB]
hash = 26a487ff
handling = skip
drawindexed = auto

[TextureOverrideNekomataBodyA]
hash = 26a487ff
match_first_index = 0
run = CommandListNekomataBodyA

[TextureOverrideNekomataLegsIB]
hash = 74688145
handling = skip
drawindexed = auto

[TextureOverrideNekomataLegsA]
hash = 74688145
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceNekomataLegsAIB

[TextureOverrideNekomataFaceIB]
hash = 37119851
run = CommandListSkinTexture

[TextureOverrideNekomataFaceDiffuse.1024]
hash = 0834f635
if $hair == 1
	this = ResourceNekomataFaceDiffuse
endif	

[TextureOverrideNekomataFaceDiffuse.2048]
hash = ba411d22
if $hair == 1
	this = ResourceNekomataFaceDiffuse
endif

[ShaderOverrideNekomataDaggerEffect1]
hash = 92f0094df159ca0c
;same hash also appears in ABA mod weapon ult effect
allow_duplicate_hash = overrule
if $active == 1
	handling = skip
endif	

[ShaderOverrideNekomataDaggerEffect2]
hash = 4753a6c783b4a2f6
;allow_duplicate_hash = overrule
if $active == 1
	handling = skip
endif

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

[CommandListNekomataHairPosition]
if $hair == 0
	handling = skip
	vb0 = ResourceNekomataHairPosition.0
	vb2 = ResourceNekomataHairBlend.0
	draw = 3051,0
else if $hair == 1
	handling = skip
	vb0 = ResourceNekomataHairPosition.1
	vb2 = ResourceNekomataHairBlend.1
	draw = 4777,0
endif

[CommandListNekomataHairTexcoord]
if $hair == 0
	vb1 = ResourceNekomataHairTexcoord.0
else if $hair == 1
	vb1 = ResourceNekomataHairTexcoord.1
endif

[CommandListNekomataBodyPosition]
if $boobanet == 0 && $hair == 0
	handling = skip
	vb0 = ResourceNekomataBodyPosition.0
	vb2 = ResourceNekomataBodyBlend.0
	draw = 13424,0
else if $boobanet == 1 && $hair == 0
	handling = skip
	vb0 = ResourceNekomataBodyPosition.1
	vb2 = ResourceNekomataBodyBlend.1
	draw = 12429,0	
else if $boobanet == 0 && $hair == 1
	handling = skip
	vb0 = ResourceNekomataBodyPosition.2
	vb2 = ResourceNekomataBodyBlend.2
	draw = 13132,0
else if $boobanet == 1 && $hair == 1
	handling = skip
	vb0 = ResourceNekomataBodyPosition.3
	vb2 = ResourceNekomataBodyBlend.3
	draw = 12137,0
endif

[CommandListNekomataBodyTexcoord]
if $boobanet == 0 && $hair == 0
	vb1 = ResourceNekomataBodyTexcoord.0
else if $boobanet == 1 && $hair == 0	
	vb1 = ResourceNekomataBodyTexcoord.1
else if $boobanet == 0 && $hair == 1
	vb1 = ResourceNekomataBodyTexcoord.2
else if $boobanet == 1 && $hair == 1
	vb1 = ResourceNekomataBodyTexcoord.3
endif	

[CommandListNekomataHairA]
if $hair == 0
	run = CommandListSkinTexture
	ib = ResourceNekomataHairAIB.0
else if $hair == 1
	run = CommandListSkinTexture
	ib = ResourceNekomataHairAIB.1
endif

[CommandListNekomataHairADiffuse]
if $hair == 0
	this = ResourceNekomataHairADiffuse.0
else if $hair == 1
	this = ResourceNekomataHairADiffuse.1
endif
	
[CommandListNekomataHairALightMap]
if $hair == 0
	this = ResourceNekomataHairALightMap.0
else if $hair == 1
	this = ResourceNekomataHairALightMap.1
endif

[CommandListNekomataHairAMaterialMap]
if $hair == 0
	this = ResourceNekomataHairAMaterialMap.0
else if $hair == 1
	this = ResourceNekomataHairAMaterialMap.1
endif

[CommandListNekomataHairANormalMap]
if $hair == 0
	this = ResourceNekomataHairANormalMap.0
else if $hair == 1
	this = ResourceNekomataHairANormalMap.1
endif	

[CommandListNekomataHairB]
if $hair == 0
	run = CommandListSkinTexture
	ib = ResourceNekomataHairBIB.0
else if $hair == 1
	run = CommandListSkinTexture
	ib = ResourceNekomataHairBIB.1
endif

[CommandListNekomataBodyA]
if $boobanet == 0 && $hair == 0
	run = CommandListSkinTexture
	ib = ResourceNekomataBodyAIB.0
else if $boobanet == 1 && $hair == 0
	run = CommandListSkinTexture
	ib = ResourceNekomataBodyAIB.1
else if $boobanet == 0 && $hair == 1
	run = CommandListSkinTexture
	ib = ResourceNekomataBodyAIB.2
else if $boobanet == 1 && $hair == 1	
	run = CommandListSkinTexture
	ib = ResourceNekomataBodyAIB.3
endif

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

[ResourceNekomataHairPosition.0]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit\NekomataHairPosition.buf

[ResourceNekomataHairPosition.1]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit_celine_hair\NekomataHairPosition.buf

[ResourceNekomataHairBlend.0]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit\NekomataHairBlend.buf

[ResourceNekomataHairBlend.1]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit_celine_hair\NekomataHairBlend.buf

[ResourceNekomataHairTexcoord.0]
type = Buffer
stride = 20
filename = .\nekomata_bodysuit\NekomataHairTexcoord.buf

[ResourceNekomataHairTexcoord.1]
type = Buffer
stride = 20
filename = .\nekomata_bodysuit_celine_hair\NekomataHairTexcoord.buf

[ResourceNekomataBodyPosition.0]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit\NekomataBodyPosition.buf

[ResourceNekomataBodyPosition.1]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit_no_booba_net\NekomataBodyPosition.buf

[ResourceNekomataBodyPosition.2]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit_celine_hair\NekomataBodyPosition.buf

[ResourceNekomataBodyPosition.3]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit_celine_hair_no_booba_net\NekomataBodyPosition.buf

[ResourceNekomataBodyBlend.0]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit\NekomataBodyBlend.buf

[ResourceNekomataBodyBlend.1]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit_no_booba_net\NekomataBodyBlend.buf

[ResourceNekomataBodyBlend.2]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit_celine_hair\NekomataBodyBlend.buf

[ResourceNekomataBodyBlend.3]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit_celine_hair_no_booba_net\NekomataBodyBlend.buf

[ResourceNekomataBodyTexcoord.0]
type = Buffer
stride = 24
filename = .\nekomata_bodysuit\NekomataBodyTexcoord.buf

[ResourceNekomataBodyTexcoord.1]
type = Buffer
stride = 24
filename = .\nekomata_bodysuit_no_booba_net\NekomataBodyTexcoord.buf

[ResourceNekomataBodyTexcoord.2]
type = Buffer
stride = 24
filename = .\nekomata_bodysuit_celine_hair\NekomataBodyTexcoord.buf

[ResourceNekomataBodyTexcoord.3]
type = Buffer
stride = 24
filename = .\nekomata_bodysuit_celine_hair_no_booba_net\NekomataBodyTexcoord.buf

[ResourceNekomataLegsPosition]
type = Buffer
stride = 40
filename = .\nekomata_bodysuit\NekomataLegsPosition.buf

[ResourceNekomataLegsBlend]
type = Buffer
stride = 32
filename = .\nekomata_bodysuit\NekomataLegsBlend.buf

[ResourceNekomataLegsTexcoord]
type = Buffer
stride = 24
filename = .\nekomata_bodysuit\NekomataLegsTexcoord.buf

[ResourceNekomataHairAIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit\NekomataHairA.ib

[ResourceNekomataHairAIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit_celine_hair\NekomataHairA.ib

[ResourceNekomataHairBIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit\NekomataHairB.ib

[ResourceNekomataHairBIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit_celine_hair\NekomataHairB.ib

[ResourceNekomataBodyAIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit\NekomataBodyA.ib

[ResourceNekomataBodyAIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit_no_booba_net\NekomataBodyA.ib

[ResourceNekomataBodyAIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit_celine_hair\NekomataBodyA.ib

[ResourceNekomataBodyAIB.3]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit_celine_hair_no_booba_net\NekomataBodyA.ib

[ResourceNekomataLegsAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\nekomata_bodysuit\NekomataLegsA.ib

[ResourceNekomataHairADiffuse.0]
filename = .\textures\NekomataHairADiffuse.dds

[ResourceNekomataHairADiffuse.1]
filename = .\textures\NekomataHairADiffuse_celine.dds

[ResourceNekomataHairANormalMap.0]
filename = .\textures\NekomataHairANormalMap.dds

[ResourceNekomataHairANormalMap.1]
filename = .\textures\NekomataHairANormalMap_celine.dds

[ResourceNekomataHairALightMap.0]
filename = .\textures\NekomataHairALightMap.dds

[ResourceNekomataHairALightMap.1]
filename = .\textures\NekomataHairALightMap_celine.dds

[ResourceNekomataHairAMaterialMap.0]
filename = .\textures\NekomataHairAMaterialMap.dds

[ResourceNekomataHairAMaterialMap.1]
filename = .\textures\NekomataHairAMaterialMap_celine.dds

[ResourceNekomataHairBDiffuse]
filename = .\textures\NekomataHairBDiffuse.dds

[ResourceNekomataHairBNormalMap]
filename = .\textures\NekomataHairBNormalMap.dds

[ResourceNekomataHairBLightMap]
filename = .\textures\NekomataHairBLightMap.dds

[ResourceNekomataHairBMaterialMap]
filename = .\textures\NekomataHairBMaterialMap.dds

[ResourceNekomataFaceDiffuse]
filename = .\textures\NekomataFaceDiffuse.dds