; ZhuYuan

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

[Constants]
global $active = 0
global persist $bvar = 1
global persist $pvar = 1
global persist $gvar = 1
global persist $svar = 1
global persist $mvar = 1
global persist $basevar = 0
global $tvar = 0
global $creditinfo = 0

[KeyBoobAccessories]
condition = $active == 1
key = VK_UP
type = cycle
$bvar = 0,1

[KeyPanty]
condition = $active == 1
key = VK_DOWN
type = cycle
$pvar = 0,1

[KeyGun]
condition = $active == 1
key = /
type = cycle
$gvar = 0,1

[KeyStocking]
condition = $active == 1
key = VK_RIGHT
type = cycle
$svar = 0,1

[KeyMechanicLeg]
condition = $active == 1
key = VK_LEFT
type = cycle
$mvar = 0,1

[Present]
if $bvar == 0 && $pvar == 0
	$basevar = 1
else
	$basevar = 0
endif

if $bvar == 0 && $gvar == 0
	$tvar = 0
else if $bvar == 1 && $gvar == 0
	$tvar = 0
else if $bvar == 1 && $gvar == 1
	$tvar = 1
else if $bvar == 0 && $gvar == 1
	$tvar = 0
endif

post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideZhuYuanHairBlend]
hash = 9d35aee2
handling = skip
vb2 = ResourceZhuYuanHairBlend
if DRAW_TYPE == 1
	vb0 = ResourceZhuYuanHairPosition
	draw = 6787,0
endif
$active = 1

[TextureOverrideZhuYuanHairTexcoord]
hash = f3c092c5
vb1 = ResourceZhuYuanHairTexcoord

[TextureOverrideZhuYuanHairVertexLimitRaise]
hash = a3091843
override_vertex_count = 6787
override_byte_stride = 92

[TextureOverrideZhuYuanBodyBlend]
hash = 01e0c8d9
handling = skip
vb2 = ResourceZhuYuanBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceZhuYuanBodyPosition
	draw = 253933,0
endif
$active = 1

[TextureOverrideZhuYuanBodyTexcoord]
hash = cb885260
vb1 = ResourceZhuYuanBodyTexcoord

[TextureOverrideZhuYuanBodyVertexLimitRaise]
hash = 291f7f5a
override_vertex_count = 253933
override_byte_stride = 96

[TextureOverrideZhuYuanShoulderAmmoBlend]
hash = e6fca033
handling = skip
vb2 = ResourceZhuYuanShoulderAmmoBlend
if DRAW_TYPE == 1
	vb0 = ResourceZhuYuanShoulderAmmoPosition
	draw = 930,0
endif
$active = 1

[TextureOverrideZhuYuanShoulderAmmoTexcoord]
hash = 1c68a02f
vb1 = ResourceZhuYuanShoulderAmmoTexcoord

[TextureOverrideZhuYuanShoulderAmmoVertexLimitRaise]
hash = dd91b126
override_vertex_count = 930
override_byte_stride = 68

[TextureOverrideZhuYuanExtrasBlend]
hash = 0f5035dd
handling = skip
vb2 = ResourceZhuYuanExtrasBlend
if DRAW_TYPE == 1
	vb0 = ResourceZhuYuanExtrasPosition
	draw = 1503,0
endif
$active = 1

[TextureOverrideZhuYuanExtrasTexcoord]
hash = ac21fba4
vb1 = ResourceZhuYuanExtrasTexcoord

[TextureOverrideZhuYuanExtrasVertexLimitRaise]
hash = 52e3c65f
override_vertex_count = 1503
override_byte_stride = 92

[TextureOverrideZhuYuanHipAmmoBlend]
hash = 9a268159
handling = skip
vb2 = ResourceZhuYuanHipAmmoBlend
if DRAW_TYPE == 1
	vb0 = ResourceZhuYuanHipAmmoPosition
	draw = 354,0
endif
$active = 1

[TextureOverrideZhuYuanHipAmmoTexcoord]
hash = 75c5e659
vb1 = ResourceZhuYuanHipAmmoTexcoord

[TextureOverrideZhuYuanHipAmmoVertexLimitRaise]
hash = 82889576
override_vertex_count = 354
override_byte_stride = 68

[TextureOverrideZhuYuanHairIB]
hash = 9821017e
handling = skip
drawindexed = auto

[TextureOverrideZhuYuanHairA]
hash = 9821017e
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceZhuYuanHairAIB

[TextureOverrideZhuYuanHairADiffuse]
hash = 7f823598
this = ResourceZhuYuanHairADiffuse

[TextureOverrideZhuYuanHairANormalMap]
hash = 4ac1defe
this = ResourceZhuYuanHairANormalMap

[TextureOverrideZhuYuanHairALightMap]
hash = d4ee59c7
this = ResourceZhuYuanHairALightMap

[TextureOverrideZhuYuanHairAMaterialMap]
hash = 12a407b1
this = ResourceZhuYuanHairAMaterialMap

[TextureOverrideZhuYuanBodyIB]
hash = 6619364f
handling = skip

[TextureOverrideZhuYuanBodyA]
hash = 6619364f
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceZhuYuanBodyAIB
; ZhuYuanBodyA-vb0=f595d24d.txt.001 (3026)
drawindexed = 11262, 0, 0
; ZhuYuanBodyA-vb0=f595d24d.txt.001

	; BeltWaist (4739)
	drawindexed = 14112, 11262, 0
	; Collar (2748)
	drawindexed = 10752, 489981, 0

if $basevar == 0
	; BodyFullAcc (38897)
	drawindexed = 220641, 25374, 0
else
	handling = skip
endif

if $basevar == 1
	; BodyNoBoobNoPanty (38953)
	drawindexed = 220638, 246015, 0
else
	handling = skip
endif

if $bvar == 0
	handling = skip
else if $bvar == 1
	; ChainBoobs (1862)
	drawindexed = 9072, 466653, 0
	; ChainChest (2926)
	drawindexed = 14256, 475725, 0
	; Nipple.LAcc (9306)
	drawindexed = 49536, 1059171, 0
	; Nipple.RAcc (17854)
	drawindexed = 104664, 1108707, 0
endif


if $gvar == 0
	handling = skip
else if $gvar == 1
	; Gun (57727)
	drawindexed = 215712, 500733, 0
	; GunAcc (2889)
	drawindexed = 12600, 716445, 0
endif

if $tvar == 0
	handling = skip
else if $tvar == 1
	; TubeConnector (3698)
	drawindexed = 20736, 1256511, 0
endif

	; HighHeel (15311)
	drawindexed = 87216, 729045, 0
if $mvar == 0
	handling = skip
else if $mvar == 1
	; Leg.RUpper (35817)
	drawindexed = 211710, 816261, 0
endif
	; LegRing.L (4845)
	drawindexed = 11040, 1027971, 0
	; LegringLower.L (5467)
	drawindexed = 20160, 1039011, 0

if $pvar == 0
	handling = skip
else if $pvar == 1
	; Panty (3517)
	drawindexed = 19488, 1213371, 0
endif
	; ShinRing.L (263)
	drawindexed = 780, 1232859, 0
if $svar == 0
	handling = skip
else if $svar == 1
	; Sock.L (1761)
	drawindexed = 10056, 1233639, 0
endif
	; TieLower (2327)
	drawindexed = 12816, 1243695, 0


[TextureOverrideZhuYuanBodyADiffuse]
hash = a271e894
this = ResourceZhuYuanBodyADiffuse

[TextureOverrideZhuYuanBodyANormalMap]
hash = d81fb56e
this = ResourceZhuYuanBodyANormalMap

[TextureOverrideZhuYuanBodyALightMap]
hash = d02bc66c
this = ResourceZhuYuanBodyALightMap

[TextureOverrideZhuYuanBodyAMaterialMap]
hash = 3e808ef6
this = ResourceZhuYuanBodyAMaterialMap

[TextureOverrideZhuYuanShoulderAmmoIB]
hash = 5e717358
handling = skip
drawindexed = auto

[TextureOverrideZhuYuanShoulderAmmoA]
hash = 5e717358
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceZhuYuanShoulderAmmoAIB

[TextureOverrideZhuYuanShoulderAmmoADiffuse]
hash = 6a33b25e
this = ResourceZhuYuanShoulderAmmoADiffuse

[TextureOverrideZhuYuanShoulderAmmoANormalMap]
hash = fb35b7e9
this = ResourceZhuYuanShoulderAmmoANormalMap

[TextureOverrideZhuYuanShoulderAmmoALightMap]
hash = e30f025b
this = ResourceZhuYuanShoulderAmmoALightMap

[TextureOverrideZhuYuanShoulderAmmoAMaterialMap]
hash = 58d5c840
this = ResourceZhuYuanShoulderAmmoAMaterialMap

[TextureOverrideZhuYuanExtrasIB]
hash = fcac8411
handling = skip
drawindexed = auto

[TextureOverrideZhuYuanExtrasA]
hash = fcac8411
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceZhuYuanExtrasAIB

[TextureOverrideZhuYuanExtrasB]
hash = fcac8411
match_first_index = 204
run = CommandListSkinTexture
ib = ResourceZhuYuanExtrasBIB

[TextureOverrideZhuYuanHipAmmoIB]
hash = a63028ae
handling = skip
drawindexed = auto

[TextureOverrideZhuYuanHipAmmoA]
hash = a63028ae
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceZhuYuanHipAmmoAIB

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

[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1
    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 -------------------------

[ResourceZhuYuanHairPosition]
type = Buffer
stride = 40
filename = ZhuYuanHairPosition.buf

[ResourceZhuYuanHairBlend]
type = Buffer
stride = 32
filename = ZhuYuanHairBlend.buf

[ResourceZhuYuanHairTexcoord]
type = Buffer
stride = 20
filename = ZhuYuanHairTexcoord.buf

[ResourceZhuYuanBodyPosition]
type = Buffer
stride = 40
filename = ZhuYuanBodyPosition.buf

[ResourceZhuYuanBodyBlend]
type = Buffer
stride = 32
filename = ZhuYuanBodyBlend.buf

[ResourceZhuYuanBodyTexcoord]
type = Buffer
stride = 24
filename = ZhuYuanBodyTexcoord.buf

[ResourceZhuYuanShoulderAmmoPosition]
type = Buffer
stride = 40
filename = ZhuYuanShoulderAmmoPosition.buf

[ResourceZhuYuanShoulderAmmoBlend]
type = Buffer
stride = 8
filename = ZhuYuanShoulderAmmoBlend.buf

[ResourceZhuYuanShoulderAmmoTexcoord]
type = Buffer
stride = 20
filename = ZhuYuanShoulderAmmoTexcoord.buf

[ResourceZhuYuanExtrasPosition]
type = Buffer
stride = 40
filename = ZhuYuanExtrasPosition.buf

[ResourceZhuYuanExtrasBlend]
type = Buffer
stride = 32
filename = ZhuYuanExtrasBlend.buf

[ResourceZhuYuanExtrasTexcoord]
type = Buffer
stride = 20
filename = ZhuYuanExtrasTexcoord.buf

[ResourceZhuYuanHipAmmoPosition]
type = Buffer
stride = 40
filename = ZhuYuanHipAmmoPosition.buf

[ResourceZhuYuanHipAmmoBlend]
type = Buffer
stride = 8
filename = ZhuYuanHipAmmoBlend.buf

[ResourceZhuYuanHipAmmoTexcoord]
type = Buffer
stride = 20
filename = ZhuYuanHipAmmoTexcoord.buf

[ResourceZhuYuanHairAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ZhuYuanHairA.ib

[ResourceZhuYuanBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ZhuYuanBodyA.ib

[ResourceZhuYuanShoulderAmmoAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ZhuYuanShoulderAmmoA.ib

[ResourceZhuYuanExtrasAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ZhuYuanExtrasA.ib

[ResourceZhuYuanExtrasBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ZhuYuanExtrasB.ib

[ResourceZhuYuanHipAmmoAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ZhuYuanHipAmmoA.ib

[ResourceZhuYuanHairADiffuse]
filename = ZhuYuanHairADiffuse.dds

[ResourceZhuYuanHairANormalMap]
filename = ZhuYuanHairANormalMap.dds

[ResourceZhuYuanHairALightMap]
filename = ZhuYuanHairALightMap.dds

[ResourceZhuYuanHairAMaterialMap]
filename = ZhuYuanHairAMaterialMap.dds

[ResourceZhuYuanBodyADiffuse]
filename = ZhuYuanBodyADiffuse.dds

[ResourceZhuYuanBodyANormalMap]
filename = ZhuYuanBodyANormalMap.dds

[ResourceZhuYuanBodyALightMap]
filename = ZhuYuanBodyALightMap.dds

[ResourceZhuYuanBodyAMaterialMap]
filename = ZhuYuanBodyAMaterialMap.dds

[ResourceZhuYuanShoulderAmmoADiffuse]
filename = ZhuYuanShoulderAmmoADiffuse.dds

[ResourceZhuYuanShoulderAmmoANormalMap]
filename = ZhuYuanShoulderAmmoANormalMap.dds

[ResourceZhuYuanShoulderAmmoALightMap]
filename = ZhuYuanShoulderAmmoALightMap.dds

[ResourceZhuYuanShoulderAmmoAMaterialMap]
filename = ZhuYuanShoulderAmmoAMaterialMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by Lull"

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