; DialynAttack

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

[Constants]
global $active = 0
global $creditinfo = 0
global $toggleinfo1 = 0
global $toggleinfo2 = 0
global persist $arm = 0
global persist $leg = 0

[KeyArm]
condition = $active == 1
key = j
type = cycle
$arm = 0,1
$toggleinfo1 = 0

[KeyLeg]
condition = $active == 1
key = k
type = cycle
$leg = 0,1,2,3
$toggleinfo2 = 0

[Present]
post $active = 0
run = CommandListToggleArmInfo
run = CommandListToggleLegInfo
run = CommandListCreditInfo

; Overrides -------------------------
[TextureOverrideDialynBodyIB]
hash = af39a873
$active = 1

[TextureOverrideDialynAttackHand1ForearmBlend]
hash = c1bec30d
handling = skip
vb2 = ResourceDialynAttackHand1ForearmBlend
if DRAW_TYPE == 1
	vb0 = ResourceDialynAttackHand1ForearmPosition
	draw = 563, 0
endif

[TextureOverrideDialynAttackHand1ForearmTexcoord]
hash = 44e99f8f
vb1 = ResourceDialynAttackHand1ForearmTexcoord

[TextureOverrideDialynAttackHand1ForearmVertexLimitRaise]
hash = a3bb9412
override_vertex_count = 563
override_byte_stride = 40

[TextureOverrideDialynAttackHand1HandBlend]
hash = 4b2bc58c
handling = skip
vb2 = ResourceDialynAttackHand1HandBlend
if DRAW_TYPE == 1
	vb0 = ResourceDialynAttackHand1HandPosition
	draw = 4467, 0
endif

[TextureOverrideDialynAttackHand1HandTexcoord]
hash = 04b87439
vb1 = ResourceDialynAttackHand1HandTexcoord

[TextureOverrideDialynAttackHand1HandVertexLimitRaise]
hash = ab52e440
override_vertex_count = 4467
override_byte_stride = 40

[TextureOverrideDialynAttackHand2ForearmBlend]
hash = 3904b978
handling = skip
vb2 = ResourceDialynAttackHand2ForearmBlend
if DRAW_TYPE == 1
	vb0 = ResourceDialynAttackHand2ForearmPosition
	draw = 590, 0
endif

[TextureOverrideDialynAttackHand2ForearmTexcoord]
hash = abfb492c
vb1 = ResourceDialynAttackHand2ForearmTexcoord

[TextureOverrideDialynAttackHand2ForearmVertexLimitRaise]
hash = 0d94c95c
override_vertex_count = 590
override_byte_stride = 40

[TextureOverrideDialynAttackHand2HandBlend]
hash = 584d6395
handling = skip
vb2 = ResourceDialynAttackHand2HandBlend
if DRAW_TYPE == 1
	vb0 = ResourceDialynAttackHand2HandPosition
	draw = 4478, 0
endif

[TextureOverrideDialynAttackHand2HandTexcoord]
hash = fc6c39ba
vb1 = ResourceDialynAttackHand2HandTexcoord

[TextureOverrideDialynAttackHand2HandVertexLimitRaise]
hash = ab52e440
override_vertex_count = 4478
override_byte_stride = 40

[TextureOverrideDialynAttackLegBlend]
hash = 7bf17bd4
handling = skip
vb2 = ResourceDialynAttackLegBlend
if DRAW_TYPE == 1
	vb0 = ResourceDialynAttackLegPosition
	draw = 31062, 0
endif

[TextureOverrideDialynAttackLegTexcoord]
hash = 63e7c16f
vb1 = ResourceDialynAttackLegTexcoord

[TextureOverrideDialynAttackLegVertexLimitRaise]
hash = af8b4583
override_vertex_count = 31062
override_byte_stride = 40

[TextureOverrideDialynAttackHand1ForearmIB]
hash = eb18a067
handling = skip

[TextureOverrideDialynAttackHand1ForearmA]
hash = eb18a067
match_first_index = 0
ib = ResourceDialynAttackHand1ForearmAIB
Resource\ZZMI\Diffuse = ref ResourceDialynBodyADiffuse
Resource\ZZMI\NormalMap = ref ResourceDialynBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceDialynBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceDialynBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
if $arm == 0
	; Hand1.Forearm1 (268)
	drawindexed = 1263, 0, 0
else
	; Hand1.Forearm2 (295)
	drawindexed = 1380, 1263, 0
endif

[TextureOverrideDialynAttackHand1HandIB]
hash = 831d7c49
handling = skip

[TextureOverrideDialynAttackHand1HandA]
hash = 831d7c49
match_first_index = 0
ib = ResourceDialynAttackHand1HandAIB
Resource\ZZMI\Diffuse = ref ResourceDialynBodyADiffuse
Resource\ZZMI\NormalMap = ref ResourceDialynBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceDialynBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceDialynBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
if $arm == 0
	; Hand1.Hand1 (3506)
	drawindexed = 18909, 0, 0
else
	; Hand1.Hand2 (961)
	drawindexed = 4071, 18909, 0
endif

[TextureOverrideDialynAttackHand2ForearmIB]
hash = 0fd3db5b
handling = skip

[TextureOverrideDialynAttackHand2ForearmA]
hash = 0fd3db5b
match_first_index = 0
ib = ResourceDialynAttackHand2ForearmAIB
Resource\ZZMI\Diffuse = ref ResourceDialynBodyADiffuse
Resource\ZZMI\NormalMap = ref ResourceDialynBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceDialynBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceDialynBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
if $arm == 0
	; Hand2.Forearm1 (295)
	drawindexed = 1380, 0, 0
else
	; Hand2.Forearm2 (295)
	drawindexed = 1380, 1380, 0
endif

[TextureOverrideDialynAttackHand2HandIB]
hash = 6b3ba1a6
handling = skip

[TextureOverrideDialynAttackHand2HandA]
hash = 6b3ba1a6
match_first_index = 0
ib = ResourceDialynAttackHand2HandAIB
Resource\ZZMI\Diffuse = ref ResourceDialynBodyADiffuse
Resource\ZZMI\NormalMap = ref ResourceDialynBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceDialynBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceDialynBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
if $arm == 0
	; Hand2.Hand1 (3492)
	drawindexed = 18792, 0, 0
else
	; Hand2.Hand2 (986)
	drawindexed = 4215, 18792, 0
endif

[TextureOverrideDialynAttackLegIB]
hash = 1020e6dc
handling = skip

[TextureOverrideDialynAttackLegA]
hash = 1020e6dc
match_first_index = 0
ib = ResourceDialynAttackLegAIB
Resource\ZZMI\Diffuse = ref ResourceDialynBodyADiffuse
Resource\ZZMI\NormalMap = ref ResourceDialynBodyANormalMap
Resource\ZZMI\LightMap = ref ResourceDialynBodyALightMap
Resource\ZZMI\MaterialMap = ref ResourceDialynBodyAMaterialMap
run = CommandList\ZZMI\SetTextures
if $leg == 0
	; OG鞋袜 (1466)
	drawindexed = 4461, 6117, 0
elif $leg == 2
	; 果足 (3050)
	drawindexed = 15891, 10578, 0
elif $leg == 1
	; 踩脚袜 (4114)
	drawindexed = 20040, 26469, 0
elif $leg == 3
	; 高跟鞋 (20704)
	drawindexed = 33588, 46509, 0
; elif $leg == 4
; 	; OG鞋 (1728)
; 	drawindexed = 6117, 0, 0
endif

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

[CommandListToggleArmInfo]
if $toggleinfo1 == 0 && $active > 0
	if $arm == 0
		pre Resource\ShaderFixes\help.ini\Notification = ResourceArmInfo0
		pre run = CustomShader\ShaderFixes\help.ini\FormatText
		pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
		$toggleinfo1 = 1
	elif $arm == 1
		pre Resource\ShaderFixes\help.ini\Notification = ResourceArmInfo1
		pre run = CustomShader\ShaderFixes\help.ini\FormatText
		pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
		$toggleinfo1 = 1
	endif
endif

[CommandListToggleLegInfo]
if $toggleinfo2 == 0 && $active > 0
	if $leg == 0
		pre Resource\ShaderFixes\help.ini\Notification = ResourceLegInfo0
		pre run = CustomShader\ShaderFixes\help.ini\FormatText
		pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
		$toggleinfo2 = 1
	elif $leg == 1
		pre Resource\ShaderFixes\help.ini\Notification = ResourceLegInfo1
		pre run = CustomShader\ShaderFixes\help.ini\FormatText
		pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
		$toggleinfo2 = 1
	elif $leg == 2
		pre Resource\ShaderFixes\help.ini\Notification = ResourceLegInfo2
		pre run = CustomShader\ShaderFixes\help.ini\FormatText
		pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
		$toggleinfo2 = 1
	elif $leg == 3
		pre Resource\ShaderFixes\help.ini\Notification = ResourceLegInfo3
		pre run = CustomShader\ShaderFixes\help.ini\FormatText
		pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
		$toggleinfo2 = 1
	; elif $leg == 4
	; 	pre Resource\ShaderFixes\help.ini\Notification = ResourceLegInfo4
	; 	pre run = CustomShader\ShaderFixes\help.ini\FormatText
	; 	pre $\ShaderFixes\help.ini\notification_timeout = time + 1.0
	; 	$toggleinfo2 = 1
	endif
endif

[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 -------------------------

[ResourceDialynAttackHand1ForearmPosition]
type = Buffer
stride = 40
filename = DialynAttackHand1ForearmPosition.buf

[ResourceDialynAttackHand1ForearmBlend]
type = Buffer
stride = 32
filename = DialynAttackHand1ForearmBlend.buf

[ResourceDialynAttackHand1ForearmTexcoord]
type = Buffer
stride = 20
filename = DialynAttackHand1ForearmTexcoord.buf

[ResourceDialynAttackHand1ForearmAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DialynAttackHand1ForearmA.ib

[ResourceDialynAttackHand1HandPosition]
type = Buffer
stride = 40
filename = DialynAttackHand1HandPosition.buf

[ResourceDialynAttackHand1HandBlend]
type = Buffer
stride = 32
filename = DialynAttackHand1HandBlend.buf

[ResourceDialynAttackHand1HandTexcoord]
type = Buffer
stride = 28
filename = DialynAttackHand1HandTexcoord.buf

[ResourceDialynAttackHand1HandAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DialynAttackHand1HandA.ib

[ResourceDialynAttackHand2ForearmPosition]
type = Buffer
stride = 40
filename = DialynAttackHand2ForearmPosition.buf

[ResourceDialynAttackHand2ForearmBlend]
type = Buffer
stride = 32
filename = DialynAttackHand2ForearmBlend.buf

[ResourceDialynAttackHand2ForearmTexcoord]
type = Buffer
stride = 20
filename = DialynAttackHand2ForearmTexcoord.buf

[ResourceDialynAttackHand2ForearmAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DialynAttackHand2ForearmA.ib

[ResourceDialynAttackHand2HandPosition]
type = Buffer
stride = 40
filename = DialynAttackHand2HandPosition.buf

[ResourceDialynAttackHand2HandBlend]
type = Buffer
stride = 32
filename = DialynAttackHand2HandBlend.buf

[ResourceDialynAttackHand2HandTexcoord]
type = Buffer
stride = 28
filename = DialynAttackHand2HandTexcoord.buf

[ResourceDialynAttackHand2HandAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DialynAttackHand2HandA.ib

[ResourceDialynAttackLegPosition]
type = Buffer
stride = 40
filename = DialynAttackLegPosition.buf

[ResourceDialynAttackLegBlend]
type = Buffer
stride = 32
filename = DialynAttackLegBlend.buf

[ResourceDialynAttackLegTexcoord]
type = Buffer
stride = 28
filename = DialynAttackLegTexcoord.buf

[ResourceDialynAttackLegAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DialynAttackLegA.ib

[ResourceDialynBodyADiffuse]
filename = DialynBodyADiffuse.dds

[ResourceDialynBodyANormalMap]
filename = DialynBodyANormalMap.dds

[ResourceDialynBodyALightMap]
filename = DialynBodyALightMap.dds

[ResourceDialynBodyAMaterialMap]
filename = DialynBodyAMaterialMap.dds

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

[ResourceArmInfo0]
type = buffer
data = "Arm = 0 (Bare Hands)"

[ResourceArmInfo1]
type = buffer
data = "Arm = 1 (Gloves)"

[ResourceLegInfo0]
type = buffer
data = "Leg = 0 (OG)"

[ResourceLegInfo1]
type = buffer
data = "Leg = 1 (Stirrup)"

[ResourceLegInfo2]
type = buffer
data = "Leg = 2 (Bare Foot)"

[ResourceLegInfo3]
type = buffer
data = "Leg = 3 (High Heel)"

; [ResourceLegInfo4]
; type = buffer
; data = "Leg = 4 (OG + Bare Leg)"

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