; WWMI BETA-8 INI

; Mod State -------------------------

[KeySwapXiezi]
condition = $object_detected == 1
key = 4
type = cycle
$swapvar_xiezi = -1, 0, 1, 2, 3, 4, 5, 6

[KeySwapXiongbu]
condition = $object_detected == 1
key = ALT UP
type = cycle
$swapvar_xiongbu = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23

[KeySwapShoubi]
condition = $object_detected == 1
key = SHIFT LEFT
type = cycle
$swapvar_shoubi = -1, 0, 1, 2, 3

[KeySwapXiaban]
condition = $object_detected == 1
key = SHIFT DOWN
type = cycle
$swapvar_xiaban = -1, 0

[KeySwapTunv]
condition = $object_detected == 1
key = 5
type = cycle
$swapvar_tunv = -1, 0, 1, 2, 3, 4, 5, 6

[KeySwapSuolian]
condition = $object_detected == 1
key = 6
type = cycle
$swapvar_suolian = -1, 0, 1, 2

[KeySwapNeiku]
condition = $object_detected == 1
key = ALT DOWN
type = cycle
$swapvar_neiku = -1, 0, 1

[KeySwapYinmao]
condition = $object_detected == 1
key = 7
type = cycle
$swapvar_yinmao = -1, 0, 1

[KeySwapWeibaJiaohuan]
condition = $object_detected == 1
key = ALT RIGHT
type = cycle
$swapvar_weiba_jiaohuan = -1, 0, 1, 2

[KeySwapShouwanTuer]
condition = $object_detected == 1
key = CTRL LEFT
type = cycle
$swapvar_shouwan_tuer = -1, 0, 1, 2

[KeySwapXiangquan]
condition = $object_detected == 1
key = CTRL RIGHT
type = cycle
$swapvar_xiangquan = -1, 0, 1, 2, 3, 4, 5

[KeySwapWaitao]
condition = $object_detected == 1
key = CTRL UP
type = cycle
$swapvar_waitao = -1, 0, 1, 2, 3, 4

[KeySwapQunzi]
condition = $object_detected == 1
key = CTRL DOWN
type = cycle
$swapvar_qunzi = -1, 0, 1

[KeySwapFashi]
condition = $object_detected == 1
key = ALT LEFT
type = cycle
$swapvar_fashi = -1, 0, 1, 2

[KeySwapDatuibangdai]
condition = $object_detected == 1
key = 8
type = cycle
$swapvar_datuibangdai = -1, 0, 1

[KeySwapA]
condition = $object_detected == 1
key = shift right
type = cycle
$swapvar_A = -1, 0, 1, 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38

[KeySwapH]
condition = $object_detected == 1
key = 0
type = cycle
$H = -1, 0

[KeySwapF]
condition = $object_detected == 1
key = shift up
type = cycle
$F = -1, 0,1,2,3,4,5,6

[KeySwapT5]
condition = $object_detected == 1
key = 9
type = cycle
$T5 =  0,1,2

[Constants]
global $required_wwmi_version = 1.00
global $object_guid = 228846
global $mesh_vertex_count = 294886
global $shapekey_vertex_count = 76330
global $shapekey_vertex_offset_batch0 = 0
global $shapekey_vertex_count_batch0 = 76330
global $mod_id = -1000
global $state_id = 0
global $mod_enabled = 0
global $object_detected = 0
global $merge_status_id = 0
global $merge_status_id_0 = 0
global $merge_status_id_1 = 0
global $merge_status_id_2 = 0
global $merge_status_id_3 = 0
global $merge_status_id_4 = 0
global $merge_status_id_5 = 0
; Swap vars aka toggles defaults
global persist $swapvar_xiezi = 0
global persist $swapvar_xiongbu = 0
global persist $swapvar_shoubi = 0
global persist $swapvar_xiaban = 0
global persist $swapvar_tunv = 0
global persist $swapvar_suolian = 0
global persist $swapvar_neiku = 0
global persist $swapvar_yinmao = 0
global persist $swapvar_weiba_jiaohuan = 0
global persist $swapvar_shouwan_tuer = 0
global persist $swapvar_xiangquan = 0
global persist $swapvar_waitao = 0
global persist $swapvar_qunzi = 0
global persist $swapvar_fashi = 0
global persist $swapvar_datuibangdai = 0
global persist $swapvar_A = 0
global persist $E = 0
global persist $F = 0
global persist $H = 0
global persist $T = 0
global persist $T5 = 0
global persist $G = 0
; Per-object state vars
global $draw_component_0 = 1
global $draw_component_1 = 1
global $draw_component_2 = 1
global $draw_component_3_lingdai = 1
global $draw_component_3_qunzi = 1
global $draw_component_3_qunzi_002 = 1
global $draw_component_3_qunzia = 1
global $draw_component_3_waitaoa = 1
global $draw_component_3_waitaob = 1
global $draw_component_3_waitaoc = 1
global $draw_component_3_waitaod = 1
global $draw_component_3_waitaoe = 1
global $draw_component_4_a = 1
global $draw_component_4_a1_002 = 1
global $draw_component_4_a2_001 = 1
global $draw_component_4_a3_001 = 1
global $draw_component_4_b = 1
global $draw_component_4_b1_001 = 1
global $draw_component_4_b2_001 = 1
global $draw_component_4_b3_001 = 1
global $draw_component_4_c = 1
global $draw_component_4_c1_001 = 1
global $draw_component_4_c2_001 = 1
global $draw_component_4_c3_001 = 1
global $draw_component_4_d = 1
global $draw_component_4_d1_001 = 1
global $draw_component_4_d2_001 = 1
global $draw_component_4_d3_001 = 1
global $draw_component_4_e = 1
global $draw_component_4_e1_001 = 1
global $draw_component_4_e2_001 = 1
global $draw_component_4_e3_001 = 1
global $draw_component_4_neiku1_001 = 1
global $draw_component_4_neiku2_001 = 1
global $draw_component_4_uv_erzhui = 1
global $draw_component_4_uv_fashi1 = 1
global $draw_component_4_uv_fashi2 = 1
global $draw_component_4_uv_fashibudong = 1
global $draw_component_4_yshouzhang = 1
global $draw_component_4_yxiezi = 1
global $draw_component_4_yxiezi2 = 1
global $draw_component_4_datuibangdaia1 = 1
global $draw_component_4_datuibangdaia2 = 1
global $draw_component_4_datuibangdaib1 = 1
global $draw_component_4_datuibangdaib2 = 1
global $draw_component_4_gaogen1 = 1
global $draw_component_4_gaogen2 = 1
global $draw_component_4_ingdanga2_001 = 1
global $draw_component_4_jiao1 = 1
global $draw_component_4_jiao2 = 1
global $draw_component_4_jiaoy = 1
global $draw_component_4_jiaoy2 = 1
global $draw_component_4_jiaohuan = 1
global $draw_component_4_lingdaia = 1
global $draw_component_4_lingdaib = 1
global $draw_component_4_lingdaic = 1
global $draw_component_4_lingdaid = 1
global $draw_component_4_lingdaie = 1
global $draw_component_4_lingdanga1_001 = 1
global $draw_component_4_lingdangb1_001 = 1
global $draw_component_4_lingdangb2_001 = 1
global $draw_component_4_lingdangc1_001 = 1
global $draw_component_4_lingdangc2_001 = 1
global $draw_component_4_lingdangd1_001 = 1
global $draw_component_4_lingdangd2_001 = 1
global $draw_component_4_lingdange1_001 = 1
global $draw_component_4_lingdange2_001 = 1
global $draw_component_4_pingdixie1 = 1
global $draw_component_4_pingdixie2 = 1
global $draw_component_4_shenghen = 1
global $draw_component_4_shenti = 1
global $draw_component_4_shoubia1 = 1
global $draw_component_4_shoubia2 = 1
global $draw_component_4_shoubib1 = 1
global $draw_component_4_shoubib2 = 1
global $draw_component_4_shoubid1 = 1
global $draw_component_4_shouwan = 1
global $draw_component_4_suolian1_001 = 1
global $draw_component_4_suolian2_002 = 1
global $draw_component_4_suolian3_001 = 1
global $draw_component_4_tuer = 1
global $draw_component_4_tunv1_001 = 1
global $draw_component_4_tunv2_001 = 1
global $draw_component_4_tunv3_001 = 1
global $draw_component_4_tunva1_001 = 1
global $draw_component_4_tunvb1_001 = 1
global $draw_component_4_tunvc1_001 = 1
global $draw_component_4_tunvd1_001 = 1
global $draw_component_4_tunve1_001 = 1
global $draw_component_4_tuwei = 1
global $draw_component_4_xiabana1 = 1
global $draw_component_4_xiabanb1 = 1
global $draw_component_4_xiangquan = 1
global $draw_component_4_yinmao1_001 = 1
global $draw_component_4_yinmao2_001 = 1
global $draw_component_5 = 1

[Present]
if $object_detected
    if $mod_enabled
        post $object_detected = 0
        run = CommandListInitializeBlendRemaps
        run = CommandListProcessToggles
        run = CommandListUpdateMergedSkeleton
    else
        if $mod_id == -1000
            run = CommandListRegisterMod
        endif
    endif
endif

[CommandListRegisterMod]
$\WWMIv1\required_wwmi_version = $required_wwmi_version
$\WWMIv1\object_guid = $object_guid
Resource\WWMIv1\ModName = ref ResourceModName
Resource\WWMIv1\ModAuthor = ref ResourceModAuthor
Resource\WWMIv1\ModDesc = ref ResourceModDesc
Resource\WWMIv1\ModLink = ref ResourceModLink
Resource\WWMIv1\ModLogo = ref ResourceModLogo
run = CommandList\WWMIv1\RegisterMod
$mod_id = $\WWMIv1\mod_id
if $mod_id >= 0
    $mod_enabled = 1
endif

[CommandListProcessToggles]
; Set display of each object according to toggles logic
$draw_component_4_jiao2 = ($swapvar_xiezi == -1) || ($swapvar_xiezi == 6)
$draw_component_4_yxiezi = ($swapvar_xiezi == 0)
$draw_component_4_yxiezi2 = ($swapvar_xiezi == 1)
$draw_component_4_jiaoy2 = ($swapvar_xiezi == 1)
$draw_component_4_jiaoy = ($swapvar_xiezi == 2)
$draw_component_4_jiao1 = ($swapvar_xiezi == 3) || ($swapvar_xiezi == 4) || ($swapvar_xiezi == 5)
$draw_component_4_gaogen1 = ($swapvar_xiezi == 3)
$draw_component_4_gaogen2 = ($swapvar_xiezi == 4)
$draw_component_4_pingdixie1 = ($swapvar_xiezi == 6)
$draw_component_4_pingdixie2 = ($swapvar_xiezi == 6)
$draw_component_4_e = ($swapvar_xiongbu == -1) || ($swapvar_xiongbu == 20) || ($swapvar_xiongbu == 21) || ($swapvar_xiongbu == 22) || ($swapvar_xiongbu == 23)
$draw_component_4_lingdange1_001 = ($swapvar_xiongbu == -1)
$draw_component_4_lingdange2_001 = ($swapvar_xiongbu == -1)
$draw_component_4_a = ($swapvar_xiongbu == 0) || ($swapvar_xiongbu == 1) || ($swapvar_xiongbu == 2) || ($swapvar_xiongbu == 3) || ($swapvar_xiongbu == 4)
$draw_component_4_a1_002 = ($swapvar_xiongbu == 1)
$draw_component_4_a2_001 = ($swapvar_xiongbu == 2)
$draw_component_4_a3_001 = ($swapvar_xiongbu == 3)
$draw_component_4_ingdanga2_001 = ($swapvar_xiongbu == 4)
$draw_component_4_lingdanga1_001 = ($swapvar_xiongbu == 4)
$draw_component_4_b = ($swapvar_xiongbu == 5) || ($swapvar_xiongbu == 6) || ($swapvar_xiongbu == 7) || ($swapvar_xiongbu == 8) || ($swapvar_xiongbu == 9)
$draw_component_4_b1_001 = ($swapvar_xiongbu == 6)
$draw_component_4_b2_001 = ($swapvar_xiongbu == 7)
$draw_component_4_b3_001 = ($swapvar_xiongbu == 8)
$draw_component_4_lingdangb1_001 = ($swapvar_xiongbu == 9)
$draw_component_4_lingdangb2_001 = ($swapvar_xiongbu == 9)
$draw_component_4_c = ($swapvar_xiongbu == 10) || ($swapvar_xiongbu == 11) || ($swapvar_xiongbu == 12) || ($swapvar_xiongbu == 13) || ($swapvar_xiongbu == 14)
$draw_component_4_c1_001 = ($swapvar_xiongbu == 11)
$draw_component_4_c2_001 = ($swapvar_xiongbu == 12)
$draw_component_4_c3_001 = ($swapvar_xiongbu == 13)
$draw_component_4_lingdangc1_001 = ($swapvar_xiongbu == 14)
$draw_component_4_lingdangc2_001 = ($swapvar_xiongbu == 14)
$draw_component_4_d = ($swapvar_xiongbu == 15) || ($swapvar_xiongbu == 16) || ($swapvar_xiongbu == 17) || ($swapvar_xiongbu == 18) || ($swapvar_xiongbu == 19)
$draw_component_4_d1_001 = ($swapvar_xiongbu == 16)
$draw_component_4_d2_001 = ($swapvar_xiongbu == 17)
$draw_component_4_d3_001 = ($swapvar_xiongbu == 18)
$draw_component_4_lingdangd1_001 = ($swapvar_xiongbu == 19)
$draw_component_4_lingdangd2_001 = ($swapvar_xiongbu == 19)
$draw_component_4_e1_001 = ($swapvar_xiongbu == 21)
$draw_component_4_e2_001 = ($swapvar_xiongbu == 22)
$draw_component_4_e3_001 = ($swapvar_xiongbu == 23)
$draw_component_4_shoubia2 = ($swapvar_shoubi == -1)
$draw_component_4_shoubid1 = ($swapvar_shoubi == 0)
$draw_component_4_yshouzhang = ($swapvar_shoubi == 0)
$draw_component_4_shenghen = ($swapvar_shoubi == 0)
$draw_component_4_shoubib1 = ($swapvar_shoubi == 1)
$draw_component_4_shoubib2 = ($swapvar_shoubi == 2)
$draw_component_4_shoubia1 = ($swapvar_shoubi == 3)
$draw_component_4_xiabanb1 = ($swapvar_xiaban == -1)
$draw_component_4_xiabana1 = ($swapvar_xiaban == 0)
$draw_component_4_tunve1_001 = ($swapvar_tunv == -1)
$draw_component_4_tunv1_001 = ($swapvar_tunv == 1) || ($swapvar_tunv == 2)
$draw_component_4_tunv2_001 = ($swapvar_tunv == 1) || ($swapvar_tunv == 2)
$draw_component_4_tunv3_001 = ($swapvar_tunv == 1)
$draw_component_4_tunva1_001 = ($swapvar_tunv == 3)
$draw_component_4_tunvb1_001 = ($swapvar_tunv == 4)
$draw_component_4_tunvc1_001 = ($swapvar_tunv == 5)
$draw_component_4_tunvd1_001 = ($swapvar_tunv == 6)
$draw_component_4_suolian1_001 = ($swapvar_suolian == -1) || ($swapvar_suolian == 1) || ($swapvar_suolian == 2)
$draw_component_4_suolian2_002 = ($swapvar_suolian == 1) || ($swapvar_suolian == 2)
$draw_component_4_suolian3_001 = ($swapvar_suolian == 1)
$draw_component_4_neiku2_001 = ($swapvar_neiku == -1)
$draw_component_4_neiku1_001 = ($swapvar_neiku == 1)
$draw_component_4_yinmao2_001 = ($swapvar_yinmao == -1)
$draw_component_4_yinmao1_001 = ($swapvar_yinmao == 1)
$draw_component_4_tuwei = ($swapvar_weiba_jiaohuan == -1) || ($swapvar_weiba_jiaohuan == 1)
$draw_component_4_jiaohuan = ($swapvar_weiba_jiaohuan == 1) || ($swapvar_weiba_jiaohuan == 2)
$draw_component_4_tuer = ($swapvar_shouwan_tuer == -1) || ($swapvar_shouwan_tuer == 1)
$draw_component_4_shouwan = ($swapvar_shouwan_tuer == 1) || ($swapvar_shouwan_tuer == 2)
$draw_component_3_lingdai = ($swapvar_xiangquan == 0) || ($swapvar_xiangquan == 1) || ($swapvar_xiangquan == 2) || ($swapvar_xiangquan == 3) || ($swapvar_xiangquan == 4)
$draw_component_4_lingdaia = ($swapvar_xiangquan == 0)
$draw_component_4_lingdaib = ($swapvar_xiangquan == 1)
$draw_component_4_lingdaic = ($swapvar_xiangquan == 2)
$draw_component_4_lingdaid = ($swapvar_xiangquan == 3)
$draw_component_4_lingdaie = ($swapvar_xiangquan == 4)
$draw_component_4_xiangquan = ($swapvar_xiangquan == 5)
$draw_component_3_waitaoa = ($swapvar_waitao == 0)
$draw_component_3_waitaob = ($swapvar_waitao == 1)
$draw_component_3_waitaoc = ($swapvar_waitao == 2)
$draw_component_3_waitaod = ($swapvar_waitao == 3)
$draw_component_3_waitaoe = ($swapvar_waitao == 4)
$draw_component_3_qunzi = ($swapvar_qunzi == 0)
$draw_component_3_qunzi_002 = ($swapvar_qunzi == 0) || ($swapvar_qunzi == 1)
$draw_component_3_qunzia = ($swapvar_qunzi == 1)
$draw_component_4_uv_fashi1 = ($swapvar_fashi == 0) || ($swapvar_fashi == 1)
$draw_component_4_uv_fashi2 = ($swapvar_fashi == 0) || ($swapvar_fashi == 2)
$draw_component_4_datuibangdaia1 = ($swapvar_datuibangdai == 0)
$draw_component_4_datuibangdaia2 = ($swapvar_datuibangdai == 0)
$draw_component_4_datuibangdaib1 = ($swapvar_datuibangdai == 1)
$draw_component_4_datuibangdaib2 = ($swapvar_datuibangdai == 1)

[CommandListUpdateMergedSkeleton]
$merge_status_id_0 = 0
$merge_status_id_1 = 0
$merge_status_id_2 = 0
$merge_status_id_3 = 0
$merge_status_id_4 = 0
$merge_status_id_5 = 0
ResourceMergedSkeleton = copy ResourceMergedSkeletonRW
ResourceExtraMergedSkeleton = copy ResourceExtraMergedSkeletonRW
run = CommandListRemapMergedSkeleton

[ResourceMergedSkeletonRemap]
[ResourceExtraMergedSkeletonRemap]

[ResourceBlendBufferOverride]
[ResourceExtraMergedSkeletonOverride]
[ResourceMergedSkeletonOverride]

[ResourceRemappedBlendBufferRW]
[ResourceRemappedSkeletonRW]
[ResourceExtraRemappedSkeletonRW]

[ResourceRemappedBlendBufferComponent4]
[ResourceRemappedSkeletonComponent4]
[ResourceExtraRemappedSkeletonComponent4]

[CommandListInitializeBlendRemaps]
local $blend_remaps_initialized
if !$blend_remaps_initialized
    ResourceRemappedSkeletonRW = copy ResourceMergedSkeletonRW
    ResourceExtraRemappedSkeletonRW = copy ResourceExtraMergedSkeletonRW

    $\WWMIv1\custom_vertex_count = $mesh_vertex_count
    $\WWMIv1\weights_per_vertex_count = 8
    cs-t34 = ref ResourceBlendRemapReverseBuffer
    cs-t35 = ref ResourceBlendRemapVertexVGBuffer

    $\WWMIv1\blend_remap_id = 0
    ResourceRemappedBlendBufferRW = copy ResourceBlendBufferNoStride
    cs-u4 = ref ResourceRemappedBlendBufferRW
    run = CustomShader\WWMIv1\BlendRemapper
    ResourceRemappedBlendBufferComponent4 = copy ResourceRemappedBlendBufferRW
    ResourceRemappedBlendBufferComponent4 = copy_desc ResourceBlendBuffer

    $blend_remaps_initialized = 1
endif

[CommandListRemapMergedSkeleton]
ResourceMergedSkeletonRemap = copy ResourceMergedSkeletonRW
ResourceExtraMergedSkeletonRemap = copy ResourceExtraMergedSkeletonRW

cs-t37 = ResourceBlendRemapForwardBuffer

$\WWMIv1\blend_remap_id = 0
$\WWMIv1\vg_count = 125
cs-t38 = ResourceMergedSkeletonRemap
cs-u5 = ResourceRemappedSkeletonRW
run = CustomShader\WWMIv1\SkeletonRemapper
ResourceRemappedSkeletonComponent4 = copy ResourceRemappedSkeletonRW
cs-t38 = ResourceExtraMergedSkeletonRemap
cs-u5 = ResourceExtraRemappedSkeletonRW
run = CustomShader\WWMIv1\SkeletonRemapper
ResourceExtraRemappedSkeletonComponent4 = copy ResourceExtraRemappedSkeletonRW

; Resources: Mod Info -------------------------

[ResourceModName]
type = Buffer
data = "Unnamed Mod"

[ResourceModAuthor]
type = Buffer
data = "Unknown Author"

[ResourceModDesc]
; type = Buffer
; data = "Empty Mod Description"

[ResourceModLink]
; type = Buffer
; data = "Empty Mod Link"

[ResourceModLogo]
; filename = Textures/Logo.dds

; Shading: Draw Call Stacks Processing -------------------------

[TextureOverrideMarkBoneDataCB]
hash = f02baf77
match_priority = 0
filter_index = 3381.7777

[CommandListMergeSkeleton]
if $merge_status_id == 0
	if vs-cb4 == 3381.7777
		cs-cb8 = ref vs-cb4
		cs-u6 = ResourceMergedSkeletonRW
		$\WWMIv1\custom_mesh_scale = 1.00
		run = CustomShader\WWMIv1\SkeletonMerger
		$merge_status_id = 1
	endif
endif
if $merge_status_id == 1
	if vs-cb4 == 3381.7777 && vs-cb3 == 3381.7777
		cs-cb8 = ref vs-cb3
		cs-u6 = ResourceExtraMergedSkeletonRW
		$\WWMIv1\custom_mesh_scale = 1.00
		run = CustomShader\WWMIv1\SkeletonMerger
		$merge_status_id = 2
	endif
endif

[CommandListTriggerResourceOverrides]
CheckTextureOverride = ps-t0
CheckTextureOverride = ps-t1
CheckTextureOverride = ps-t2
CheckTextureOverride = ps-t3
CheckTextureOverride = ps-t4
CheckTextureOverride = ps-t5
CheckTextureOverride = ps-t6
CheckTextureOverride = ps-t7
CheckTextureOverride = ps-t8
CheckTextureOverride = vs-cb3
CheckTextureOverride = vs-cb4

[CommandListOverrideSharedResources]
ResourceBypassVB0 = ref vb0
ib = ResourceIndexBuffer
vb0 = ResourcePositionBuffer
vb1 = ResourceVectorBuffer
vb2 = ResourceTexcoordBuffer
vb3 = ResourceColorBuffer
if ResourceBlendBufferOverride === null
    vb4 = ResourceBlendBuffer
    if vs-cb4 == 3381.7777
        vs-cb4 = ref ResourceMergedSkeleton
		if vs-cb3 == 3381.7777
			vs-cb3 = ref ResourceExtraMergedSkeleton
		endif
	elif vs-cb3 == 3381.7777
		vs-cb3 = ref ResourceMergedSkeleton
    endif
else
    vb4 = ref ResourceBlendBufferOverride
    if vs-cb4 == 3381.7777
        vs-cb4 = ref ResourceMergedSkeletonOverride
		if vs-cb3 == 3381.7777
			vs-cb3 = ref ResourceExtraMergedSkeletonOverride
		endif
	elif vs-cb3 == 3381.7777
		vs-cb3 = ref ResourceMergedSkeletonOverride
    endif
endif

[CommandListCleanupSharedResources]
vb0 = ref ResourceBypassVB0
if ResourceBlendBufferOverride !== null
    ResourceBlendBufferOverride = null
    ResourceMergedSkeletonOverride = null
    ResourceExtraMergedSkeletonOverride = null
endif

[TextureOverrideComponent0]
hash = aa9d9edb
match_first_index = 0
match_index_count = 20499
$object_detected = 1
if $mod_enabled
    if $merge_status_id_0 != 2
        $\WWMIv1\vg_offset = 0
        $\WWMIv1\vg_count = 30
		$merge_status_id = $merge_status_id_0
		run = CommandListMergeSkeleton
		$merge_status_id_0 = $merge_status_id
	endif
    if ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListTriggerResourceOverrides
        run = CommandListOverrideSharedResources
        ; Draw Component 0
        if $draw_component_0
			drawindexed = 20499, 0, 0
        endif
        run = CommandListCleanupSharedResources
    endif
endif

[TextureOverrideComponent1]
hash = aa9d9edb
match_first_index = 20499
match_index_count = 31572
$object_detected = 1
if $mod_enabled
    if $merge_status_id_1 != 2
        $\WWMIv1\vg_offset = 30
        $\WWMIv1\vg_count = 40
		$merge_status_id = $merge_status_id_1
		run = CommandListMergeSkeleton
		$merge_status_id_1 = $merge_status_id
	endif
    if ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListTriggerResourceOverrides
        run = CommandListOverrideSharedResources
        ; Draw Component 1
        if $draw_component_1
			drawindexed = 31572, 20499, 0
        endif
        run = CommandListCleanupSharedResources
    endif
endif

[TextureOverrideComponent2]
hash = aa9d9edb
match_first_index = 52071
match_index_count = 14676
$object_detected = 1
if $mod_enabled
    if $merge_status_id_2 != 2
        $\WWMIv1\vg_offset = 70
        $\WWMIv1\vg_count = 1
		$merge_status_id = $merge_status_id_2
		run = CommandListMergeSkeleton
		$merge_status_id_2 = $merge_status_id
	endif
    if ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListTriggerResourceOverrides
        run = CommandListOverrideSharedResources
        ; Draw Component 2
        if $draw_component_2
			drawindexed = 14676, 52071, 0
        endif
        run = CommandListCleanupSharedResources
    endif
endif

[TextureOverrideComponent3]
hash = aa9d9edb
match_first_index = 66747
match_index_count = 79839
$object_detected = 1
if $mod_enabled
    if $merge_status_id_3 != 2
        $\WWMIv1\vg_offset = 71
        $\WWMIv1\vg_count = 111
		$merge_status_id = $merge_status_id_3
		run = CommandListMergeSkeleton
		$merge_status_id_3 = $merge_status_id
	endif
    if ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListTriggerResourceOverrides
        run = CommandListOverrideSharedResources
        ; Draw Component 3.lingdai
        if $draw_component_3_lingdai
			drawindexed = 2292, 66747, 0
        endif
        ; Draw Component 3.qunzi
        if $draw_component_3_qunzi
			drawindexed = 35046, 69039, 0
        endif
        ; Draw Component 3.qunzi.002
        if $draw_component_3_qunzi_002
			drawindexed = 1284, 104085, 0
        endif
        ; Draw Component 3.qunziA
        if $draw_component_3_qunzia
			drawindexed = 35046, 105369, 0
        endif
        ; Draw Component 3.waitaoA
        if $draw_component_3_waitaoa
			drawindexed = 28152, 140415, 0
        endif
        ; Draw Component 3.waitaoB
        if $draw_component_3_waitaob
			drawindexed = 28152, 168567, 0
        endif
        ; Draw Component 3.waitaoC
        if $draw_component_3_waitaoc
			drawindexed = 28152, 196719, 0
        endif
        ; Draw Component 3.waitaoD
        if $draw_component_3_waitaod
			drawindexed = 28152, 224871, 0
        endif
        ; Draw Component 3.waitaoE
        if $draw_component_3_waitaoe
			drawindexed = 28152, 253023, 0
        endif
        run = CommandListCleanupSharedResources
    endif
endif

[TextureOverrideComponent4]
hash = aa9d9edb
match_first_index = 146586
match_index_count = 80718
$object_detected = 1
if $mod_enabled
    if $merge_status_id_4 != 2
        $\WWMIv1\vg_offset = 182
        $\WWMIv1\vg_count = 121
		$merge_status_id = $merge_status_id_4
		run = CommandListMergeSkeleton
		$merge_status_id_4 = $merge_status_id
	endif
    if ResourceMergedSkeleton !== null
        handling = skip
        ResourceBlendBufferOverride = ref ResourceRemappedBlendBufferComponent4
        ResourceMergedSkeletonOverride = ref ResourceRemappedSkeletonComponent4
        ResourceExtraMergedSkeletonOverride = ref ResourceExtraRemappedSkeletonComponent4
        run = CommandListTriggerResourceOverrides
        run = CommandListOverrideSharedResources
        ; Draw Component 4.A
        if $draw_component_4_a
			drawindexed = 12492, 281175, 0
        endif
        ; Draw Component 4.A1.002
        if $draw_component_4_a1_002
			drawindexed = 9978, 293667, 0
        endif
        ; Draw Component 4.A2.001
        if $draw_component_4_a2_001
			drawindexed = 4212, 303645, 0
        endif
        ; Draw Component 4.A3.001
        if $draw_component_4_a3_001
			drawindexed = 2016, 307857, 0
        endif
        ; Draw Component 4.B
        if $draw_component_4_b
			drawindexed = 12492, 309873, 0
        endif
        ; Draw Component 4.B1.001
        if $draw_component_4_b1_001
			drawindexed = 9978, 322365, 0
        endif
        ; Draw Component 4.B2.001
        if $draw_component_4_b2_001
			drawindexed = 4212, 332343, 0
        endif
        ; Draw Component 4.B3.001
        if $draw_component_4_b3_001
			drawindexed = 2016, 336555, 0
        endif
        ; Draw Component 4.C
        if $draw_component_4_c
			drawindexed = 12492, 338571, 0
        endif
        ; Draw Component 4.C1.001
        if $draw_component_4_c1_001
			drawindexed = 9978, 351063, 0
        endif
        ; Draw Component 4.C2.001
        if $draw_component_4_c2_001
			drawindexed = 4212, 361041, 0
        endif
        ; Draw Component 4.C3.001
        if $draw_component_4_c3_001
			drawindexed = 2016, 365253, 0
        endif
        ; Draw Component 4.D
        if $draw_component_4_d
			drawindexed = 12492, 367269, 0
        endif
        ; Draw Component 4.D1.001
        if $draw_component_4_d1_001
			drawindexed = 9978, 379761, 0
        endif
        ; Draw Component 4.D2.001
        if $draw_component_4_d2_001
			drawindexed = 4212, 389739, 0
        endif
        ; Draw Component 4.D3.001
        if $draw_component_4_d3_001
			drawindexed = 2016, 393951, 0
        endif
        ; Draw Component 4.E
        if $draw_component_4_e
			drawindexed = 12492, 395967, 0
        endif
        ; Draw Component 4.E1.001
        if $draw_component_4_e1_001
			drawindexed = 9978, 408459, 0
        endif
        ; Draw Component 4.E2.001
        if $draw_component_4_e2_001
			drawindexed = 4212, 418437, 0
        endif
        ; Draw Component 4.E3.001
        if $draw_component_4_e3_001
			drawindexed = 2016, 422649, 0
        endif
        ; Draw Component 4.Neiku1.001
        if $draw_component_4_neiku1_001
			drawindexed = 9504, 424665, 0
        endif
        ; Draw Component 4.Neiku2.001
        if $draw_component_4_neiku2_001
			drawindexed = 918, 434169, 0
        endif
        ; Draw Component 4.UV.erzhui
        if $draw_component_4_uv_erzhui
			drawindexed = 42, 435087, 0
        endif
        ; Draw Component 4.UV.fashi1
        if $draw_component_4_uv_fashi1
			drawindexed = 1356, 435129, 0
        endif
        ; Draw Component 4.UV.fashi2
        if $draw_component_4_uv_fashi2
			drawindexed = 4212, 436485, 0
        endif
        ; Draw Component 4.UV.fashibudong
        if $draw_component_4_uv_fashibudong
			drawindexed = 2952, 440697, 0
        endif
        ; Draw Component 4.Yshouzhang
        if $draw_component_4_yshouzhang
			drawindexed = 24135, 443649, 0
        endif
        ; Draw Component 4.Yxiezi
        if $draw_component_4_yxiezi
			drawindexed = 15738, 467784, 0
        endif
        ; Draw Component 4.Yxiezi2
        if $draw_component_4_yxiezi2
			drawindexed = 11220, 483522, 0
        endif
        ; Draw Component 4.datuibangdaiA1
        if $draw_component_4_datuibangdaia1
			drawindexed = 888, 494742, 0
        endif
        ; Draw Component 4.datuibangdaiA2
        if $draw_component_4_datuibangdaia2
			drawindexed = 1254, 495630, 0
        endif
        ; Draw Component 4.datuibangdaiB1
        if $draw_component_4_datuibangdaib1
			drawindexed = 888, 496884, 0
        endif
        ; Draw Component 4.datuibangdaiB2
        if $draw_component_4_datuibangdaib2
			drawindexed = 1254, 497772, 0
        endif
        ; Draw Component 4.gaogen1
        if $draw_component_4_gaogen1
			drawindexed = 16074, 499026, 0
        endif
        ; Draw Component 4.gaogen2
        if $draw_component_4_gaogen2
			drawindexed = 12468, 515100, 0
        endif
        ; Draw Component 4.ingdangA2.001
        if $draw_component_4_ingdanga2_001
			drawindexed = 2376, 527568, 0
        endif
        ; Draw Component 4.jiao1
        if $draw_component_4_jiao1
			drawindexed = 62796, 529944, 0
        endif
        ; Draw Component 4.jiao2
        if $draw_component_4_jiao2
			drawindexed = 62796, 592740, 0
        endif
        ; Draw Component 4.jiaoY
        if $draw_component_4_jiaoy
			drawindexed = 62796, 655536, 0
        endif
        ; Draw Component 4.jiaoY2
        if $draw_component_4_jiaoy2
			drawindexed = 17028, 718332, 0
        endif
        ; Draw Component 4.jiaohuan
        if $draw_component_4_jiaohuan
			drawindexed = 2784, 735360, 0
        endif
        ; Draw Component 4.lingdaiA
        if $draw_component_4_lingdaia
			drawindexed = 6186, 738144, 0
        endif
        ; Draw Component 4.lingdaiB
        if $draw_component_4_lingdaib
			drawindexed = 6186, 744330, 0
        endif
        ; Draw Component 4.lingdaiC
        if $draw_component_4_lingdaic
			drawindexed = 6186, 750516, 0
        endif
        ; Draw Component 4.lingdaiD
        if $draw_component_4_lingdaid
			drawindexed = 6186, 756702, 0
        endif
        ; Draw Component 4.lingdaiE
        if $draw_component_4_lingdaie
			drawindexed = 6186, 762888, 0
        endif
        ; Draw Component 4.lingdangA1.001
        if $draw_component_4_lingdanga1_001
			drawindexed = 2532, 769074, 0
        endif
        ; Draw Component 4.lingdangB1.001
        if $draw_component_4_lingdangb1_001
			drawindexed = 2532, 771606, 0
        endif
        ; Draw Component 4.lingdangB2.001
        if $draw_component_4_lingdangb2_001
			drawindexed = 2376, 774138, 0
        endif
        ; Draw Component 4.lingdangC1.001
        if $draw_component_4_lingdangc1_001
			drawindexed = 2532, 776514, 0
        endif
        ; Draw Component 4.lingdangC2.001
        if $draw_component_4_lingdangc2_001
			drawindexed = 2376, 779046, 0
        endif
        ; Draw Component 4.lingdangD1.001
        if $draw_component_4_lingdangd1_001
			drawindexed = 2532, 781422, 0
        endif
        ; Draw Component 4.lingdangD2.001
        if $draw_component_4_lingdangd2_001
			drawindexed = 2376, 783954, 0
        endif
        ; Draw Component 4.lingdangE1.001
        if $draw_component_4_lingdange1_001
			drawindexed = 2532, 786330, 0
        endif
        ; Draw Component 4.lingdangE2.001
        if $draw_component_4_lingdange2_001
			drawindexed = 2376, 788862, 0
        endif
        ; Draw Component 4.pingdixie1
        if $draw_component_4_pingdixie1
			drawindexed = 2628, 791238, 0
        endif
        ; Draw Component 4.pingdixie2
        if $draw_component_4_pingdixie2
			drawindexed = 312, 793866, 0
        endif
        ; Draw Component 4.shenghen
        if $draw_component_4_shenghen
			drawindexed = 90, 794178, 0
        endif
        ; Draw Component 4.shenti
        if $draw_component_4_shenti
			drawindexed = 11316, 794268, 0
        endif
        ; Draw Component 4.shoubiA1
        if $draw_component_4_shoubia1
			drawindexed = 23892, 805584, 0
        endif
        ; Draw Component 4.shoubiA2
        if $draw_component_4_shoubia2
			drawindexed = 23892, 829476, 0
        endif
        ; Draw Component 4.shoubiB1
        if $draw_component_4_shoubib1
			drawindexed = 23892, 853368, 0
        endif
        ; Draw Component 4.shoubiB2
        if $draw_component_4_shoubib2
			drawindexed = 23892, 877260, 0
        endif
        ; Draw Component 4.shoubiD1
        if $draw_component_4_shoubid1
			drawindexed = 12672, 901152, 0
        endif
        ; Draw Component 4.shouwan
        if $draw_component_4_shouwan
			drawindexed = 13920, 913824, 0
        endif
        ; Draw Component 4.suolian1.001
        if $draw_component_4_suolian1_001
			drawindexed = 9186, 927744, 0
        endif
        ; Draw Component 4.suolian2.002
        if $draw_component_4_suolian2_002
			drawindexed = 113280, 936930, 0
        endif
        ; Draw Component 4.suolian3.001
        if $draw_component_4_suolian3_001
			drawindexed = 2640, 1050210, 0
        endif
        ; Draw Component 4.tuer
        if $draw_component_4_tuer
			drawindexed = 7710, 1052850, 0
        endif
        ; Draw Component 4.tunv1.001
        if $draw_component_4_tunv1_001
			drawindexed = 10668, 1060560, 0
        endif
        ; Draw Component 4.tunv2.001
        if $draw_component_4_tunv2_001
			drawindexed = 6594, 1071228, 0
        endif
        ; Draw Component 4.tunv3.001
        if $draw_component_4_tunv3_001
			drawindexed = 2640, 1077822, 0
        endif
        ; Draw Component 4.tunvA1.001
        if $draw_component_4_tunva1_001
			drawindexed = 9132, 1080462, 0
        endif
        ; Draw Component 4.tunvB1.001
        if $draw_component_4_tunvb1_001
			drawindexed = 9132, 1089594, 0
        endif
        ; Draw Component 4.tunvC1.001
        if $draw_component_4_tunvc1_001
			drawindexed = 9132, 1098726, 0
        endif
        ; Draw Component 4.tunvD1.001
        if $draw_component_4_tunvd1_001
			drawindexed = 9132, 1107858, 0
        endif
        ; Draw Component 4.tunvE1.001
        if $draw_component_4_tunve1_001
			drawindexed = 9132, 1116990, 0
        endif
        ; Draw Component 4.tuwei
        if $draw_component_4_tuwei
			drawindexed = 960, 1126122, 0
        endif
        ; Draw Component 4.xiabanA1
        if $draw_component_4_xiabana1
			drawindexed = 71139, 1127082, 0
        endif
        ; Draw Component 4.xiabanB1
        if $draw_component_4_xiabanb1
			drawindexed = 71139, 1198221, 0
        endif
        ; Draw Component 4.xiangquan
        if $draw_component_4_xiangquan
			drawindexed = 1296, 1269360, 0
        endif
        ; Draw Component 4.yinmao1.001
        if $draw_component_4_yinmao1_001
			drawindexed = 5460, 1270656, 0
        endif
        ; Draw Component 4.yinmao2.001
        if $draw_component_4_yinmao2_001
			drawindexed = 5667, 1276116, 0
        endif
        run = CommandListCleanupSharedResources
    endif
endif

[TextureOverrideComponent5]
hash = aa9d9edb
match_first_index = 227304
match_index_count = 1542
$object_detected = 1
if $mod_enabled
    if $merge_status_id_5 != 2
        $\WWMIv1\vg_offset = 303
        $\WWMIv1\vg_count = 1
		$merge_status_id = $merge_status_id_5
		run = CommandListMergeSkeleton
		$merge_status_id_5 = $merge_status_id
	endif
    if ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListTriggerResourceOverrides
        run = CommandListOverrideSharedResources
        ; Draw Component 5
        if $draw_component_5
			drawindexed = 1542, 1281783, 0
        endif
        run = CommandListCleanupSharedResources
    endif
endif

; Author:HammyCatte
; Description: 3Dmigoto overlay with draggable image functionalit
;
; === 用户配置指南 ===
; 必须配置项：
; 1. [ResourceImageToRender]中的图片路径
; 2. [Constants]中的图片尺寸
; 3. [TextureOverrideCheckHash]中的角色hash值
;
; 可选配置项：
; 1. 图片初始位置（0-1范围）
; 2. 呼出快捷键（默认ctrl /键）
; 3. 复位快捷键（默认ctrl R键）

; 配置区 ---------------------------------------------------------

; ※※ 必须配置 ※※

; 1. 配置图片资源
[ResourceImageToRender]
filename = Textures/help.png

; 2. 配置图片尺寸 (单位：像素)
[Constants]
; 图片宽度
global $image_width = 500
; 图片高度
global $image_height = 800

; 3. 配置用以检测当前角色的hash值
[TextureOverrideCheckHash]
hash = aa9d9edb
$active = 1

; === 可选配置 ===

; 1. 图片初始位置
[Constants]
; 初始水平位置（0.0=最左，1.0=最右）
global $set_x = 0.5
; 初始垂直位置（0.0=顶部，1.0=底部）
global $set_y = 0.5

; 2. 图片呼出快捷键
[KeyHelp]
condition = $active == 1
key = ctrl alt
type = cycle
$help = 0,1

; 3. 图片复位快捷键
[KeyResetPosition]
condition = $help == 1 && $active == 1
key = ctrl R
type = cycle
$img_x = 0
$img_y = 0

; 功能区 ---------------------------------------------------------

[Constants]
global $active
global $help
; 持久化存储位置
global persist $img_x = 0
global persist $img_y = 0
; 归一化尺寸
global $norm_width
global $norm_height
; 拖拽控制变量
global $mouse_clicked = 0
global $click_outside = 0
global $is_dragging = 0
global $drag_x = 0
global $drag_y = 0

; 鼠标拖拽检测
[KeyMouseDrag]
condition = $help == 1 && $active == 1
key = VK_LBUTTON
type = hold
$mouse_clicked = 1

; 主渲染逻辑
[Present]
post $active = 0
if $help == 1 && $active == 1
    ; 计算归一化尺寸
    $norm_width = $image_width / res_width
    $norm_height = $image_height / res_height

    ; 位置初始化
    if $img_x == 0 && $img_y == 0
        ; 坐标转换（限制在屏幕内）
        $img_x = $set_x * (1 - $norm_width)
        $img_y = $set_y * (1 - $norm_height)
    endif

    ; 拖拽检测
    if $mouse_clicked
        if cursor_x > $img_x && cursor_x < $img_x + $norm_width && cursor_y > $img_y && cursor_y < $img_y + $norm_height
            $click_outside = 0
            if $is_dragging == 0
                $drag_x = cursor_x - $img_x
                $drag_y = cursor_y - $img_y
                $is_dragging = 1
            endif
        else
            $click_outside = 1
        endif
    else
        $is_dragging = 0
    endif
    ; 点击图片外隐藏
    if $click_outside == 1 && $mouse_clicked == 0
        $help = 0
        $click_outside = 0
    endif

    ; 移动逻辑
    if $is_dragging
        $img_x = cursor_x - $drag_x
        $img_y = cursor_y - $drag_y
    endif

    ; 执行渲染
    ps-t100 = ResourceImageToRender
    run = CustomShaderDraw
endif

; 着色器配置
[CustomShaderDraw]
hs = null
ds = null
gs = null
cs = null
vs = Textures/draw_2d.hlsl
ps = Textures/draw_2d.hlsl
x87 = $norm_width
y87 = $norm_height
z87 = $img_x
w87 = $img_y
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_strip
o0 = set_viewport bb
Draw = 4,0
clear = ps-t100
; Shading: Textures -------------------------

[ResourceTexture0]
filename = Textures/Components-0-1-2-4-5 t=c9bbe473.dds

[TextureOverrideTexture0]
hash = c9bbe473
match_priority = 0
$object_detected = 1
if $swapvar_A == 0
    this = ResourceA1
else if $swapvar_A == 1
    this = ResourceA2
else if $swapvar_A == 2
    this = ResourceA3
else if $swapvar_A == 3
    this = ResourceA4
else if $swapvar_A == 4
    this = ResourceA5
else if $swapvar_A == 5
    this = ResourceA6
else if $swapvar_A == 6
    this = ResourceA7
else if $swapvar_A == 7
    this = ResourceA8
else if $swapvar_A == 8
    this = ResourceB1
else if $swapvar_A == 9
    this = ResourceB2
else if $swapvar_A == 10
    this = ResourceB3
else if $swapvar_A == 11
    this = ResourceB4
else if $swapvar_A == 12
    this = ResourceB5
else if $swapvar_A == 13
    this = ResourceB6
else if $swapvar_A == 14
    this = ResourceB7
else if $swapvar_A == 15
    this = ResourceB8
else if $swapvar_A == 16
    this = ResourceC1
else if $swapvar_A == 17
    this = ResourceC2
else if $swapvar_A == 18
    this = ResourceC3
else if $swapvar_A == 19
    this = ResourceC4
else if $swapvar_A == 20
    this = ResourceC5
else if $swapvar_A == 21
    this = ResourceC6
else if $swapvar_A == 22
    this = ResourceC7
else if $swapvar_A == 23
    this = ResourceC8
else if $swapvar_A == 24
    this = ResourceD1
else if $swapvar_A == 25
    this = ResourceD2
else if $swapvar_A == 26
    this = ResourceD3
else if $swapvar_A == 27
    this = ResourceD4
else if $swapvar_A == 28
    this = ResourceD5
else if $swapvar_A == 29
    this = ResourceD6
else if $swapvar_A == 30
    this = ResourceD7
else if $swapvar_A == 31
    this = ResourceD8
else if $swapvar_A == 32
    this = ResourceE1    
    else if $swapvar_A == 33
    this = ResourceE2
    else if $swapvar_A == 34
    this = ResourceE3
    else if $swapvar_A == 35
    this = ResourceE4
    else if $swapvar_A == 36
    this = ResourceE5
    else if $swapvar_A == 37
    this = ResourceE6
    else if $swapvar_A == 38
    this = ResourceE7
    else if $swapvar_A == -1
    this = ResourceE8
endif

[ResourceTexture1]
filename = Textures/Components-0-1-2-4-5 t=f73250e5.dds

[TextureOverrideTexture1]
hash = f73250e5
match_priority = 0
$object_detected = 1
if $swapvar_A == 0 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 1 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 2 && $T5 == 0
    this = ResourceAT5a 
else if $swapvar_A == 3 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 4 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 5 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 6 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 7 && $T5 == 0
    this = ResourceAT5a
else if $swapvar_A == 8 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 9 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 10 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 11 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 12 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 13 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 14 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 15 && $T5 == 0
    this = ResourceBT5a
else if $swapvar_A == 16 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 17 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 18 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 19 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 20 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 21 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 22 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 23 && $T5 == 0
    this = ResourceCT5a
else if $swapvar_A == 24 && $T5 == 0
    this = ResourceDT5a
else if $swapvar_A == 25 && $T5 == 0
    this = ResourceDT5a
else if $swapvar_A == 26 && $T5 == 0
    this = ResourceDT5a
else if $swapvar_A == 27 && $T5 == 0
    this = ResourceDT5a
else if $swapvar_A == 28 && $T5 == 0
    this = ResourceDT5c
else if $swapvar_A == 29 && $T5 == 0
    this = ResourceDT5c
else if $swapvar_A == 30 && $T5 == 0
    this = ResourceDT5c
else if $swapvar_A == 31 && $T5 == 0
    this = ResourceDT5c
    else if $swapvar_A == 32 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == 33 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == 34 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == 35 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == 36 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == 37 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == 38 && $T5 == 0
    this = ResourceET5a
    else if $swapvar_A == -1 && $T5 == 0
    this = ResourceET5a
endif

if $swapvar_A == 0 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 1 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 2 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 3 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 4 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 5 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 6 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 7 && $T5 == 1
    this = ResourceAT5b
else if $swapvar_A == 8 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 9 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 10 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 11 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 12 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 13 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 14 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 15 && $T5 == 1
    this = ResourceBT5b
else if $swapvar_A == 16 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 17 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 18 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 19 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 20 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 21 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 22 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 23 && $T5 == 1
    this = ResourceCT5b
else if $swapvar_A == 24 && $T5 == 1
    this = ResourceDT5b
else if $swapvar_A == 25 && $T5 == 1
    this = ResourceDT5b
else if $swapvar_A == 26 && $T5 == 1
    this = ResourceDT5b
else if $swapvar_A == 27 && $T5 == 1
    this = ResourceDT5b
else if $swapvar_A == 28 && $T5 == 1
    this = ResourceDT5d
else if $swapvar_A == 29 && $T5 == 1
    this = ResourceDT5d
else if $swapvar_A == 30 && $T5 == 1
    this = ResourceDT5d
else if $swapvar_A == 31 && $T5 == 1
    this = ResourceDT5d
    else if $swapvar_A == 32 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == 33 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == 34 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == 35 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == 36 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == 37 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == 38 && $T5 == 1
    this = ResourceET5b
    else if $swapvar_A == -1 && $T5 == 1
    this = ResourceET5b
endif

if $swapvar_A == 0 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 1 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 2 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 3 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 4 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 5 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 6 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 7 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 8 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 9 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 10 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 11 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 12 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 13 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 14 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 15 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 16 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 17 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 18 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 19 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 20 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 21 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 22 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 23 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 24 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 25 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 26 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 27 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 28 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 29 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 30 && $T5 == 2
    this = ResourceET5c
else if $swapvar_A == 31 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 32 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 33 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 34 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 35 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 36 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 37 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == 38 && $T5 == 2
    this = ResourceET5c
    else if $swapvar_A == -1 && $T5 == 2
    this = ResourceET5c
endif

[ResourceTexture2]
filename = Textures/Components-1 t=47e8b051.dds

[TextureOverrideTexture2]
hash = 47e8b051
match_priority = 0
if $H == 0
    this = ResourceHB1
endif
if $H == -1
    this = ResourceHB2
endif

[ResourceTexture3]
filename = Textures/Components-1-4 t=6d4a87ef.dds

[TextureOverrideTexture3]
hash = 6d4a87ef
match_priority = 0
if $object_detected
    this = ResourceTexture3
endif

[ResourceTexture4]
filename = Textures/Components-1-4 t=dbfb288a.dds

[TextureOverrideTexture4]
hash = dbfb288a
match_priority = 0
$object_detected = 1
if $swapvar_A == 0
    this = ResourceAT4
else if $swapvar_A == 1
    this = ResourceAT4
else if $swapvar_A == 2
    this = ResourceAT4
else if $swapvar_A == 3
    this = ResourceAT4
else if $swapvar_A == 4
    this = ResourceAT4
else if $swapvar_A == 5
    this = ResourceAT4
else if $swapvar_A == 6
    this = ResourceAT4
else if $swapvar_A == 7
    this = ResourceAT4
else if $swapvar_A == 8
    this = ResourceBT4
else if $swapvar_A == 9
    this = ResourceBT4
else if $swapvar_A == 10
    this = ResourceBT4
else if $swapvar_A == 11
    this = ResourceBT4
else if $swapvar_A == 12
    this = ResourceBT4
else if $swapvar_A == 13
    this = ResourceBT4
else if $swapvar_A == 14
    this = ResourceBT4
else if $swapvar_A == 15
    this = ResourceBT4
else if $swapvar_A == 16
    this = ResourceCT4
else if $swapvar_A == 17
    this = ResourceCT4
else if $swapvar_A == 18
    this = ResourceCT4
else if $swapvar_A == 19
    this = ResourceCT4
else if $swapvar_A == 20
    this = ResourceCT4
else if $swapvar_A == 21
    this = ResourceCT4
else if $swapvar_A == 22
    this = ResourceCT4
else if $swapvar_A == 23
    this = ResourceCT4
else if $swapvar_A == 24
    this = ResourceDT4a
else if $swapvar_A == 25
    this = ResourceDT4a
else if $swapvar_A == 26
    this = ResourceDT4a
else if $swapvar_A == 27
    this = ResourceDT4a
else if $swapvar_A == 28
    this = ResourceDT4b
else if $swapvar_A == 29
    this = ResourceDT4b
else if $swapvar_A == 30
    this = ResourceDT4b
else if $swapvar_A == 31
    this = ResourceDT4b
else if $swapvar_A == 32
    this = ResourceET4
    else if $swapvar_A == 33
    this = ResourceET4
    else if $swapvar_A == 34
    this = ResourceET4
    else if $swapvar_A == 35
    this = ResourceET4
    else if $swapvar_A == 36
    this = ResourceET4
    else if $swapvar_A == 37
    this = ResourceET4
    else if $swapvar_A == 38
    this = ResourceET4
    else if $swapvar_A == -1
    this = ResourceET4
endif

[ResourceTexture5]
filename = Textures/Components-2 t=c917c0f0.dds

[TextureOverrideTexture5]
hash = a17125b7
match_priority = 0
$object_detected = 1
if $F == 0
    this = ResourceF1
endif
if $F == 1
    this = ResourceF2
endif
if $F == 2
    this = ResourceF3
endif
if $F == 3
    this = ResourceF4
endif
if $F == 4
    this = ResourceF1
endif
if $F == 5
    this = ResourceF2
endif
if $F == 6
    this = ResourceF3
endif
if $F == -1
    this = ResourceF4
endif

[ResourceTexture6]
filename = Textures/Components-5 t=3f7bfcca.dds

[TextureOverrideTexture6]
hash = acbed1bb
match_priority = 0
$object_detected = 1
if $F == 0
    this = ResourceE1A
endif
if $F == 1
    this = ResourceE1A
endif
if $F == 2
    this = ResourceE1A
endif
if $F == 3
    this = ResourceE1A
endif
if $F == 4
    this = ResourceE2A
endif
if $F == 5
    this = ResourceE2A
endif
if $F == 6
    this = ResourceE2A
endif
if $F == -1
    this = ResourceE2A
endif


[ResourceTexture7]
filename = Textures/YS1.dds

[TextureOverrideTexture7]
hash = ac811d4b
match_priority = 0
if $object_detected
    this = ResourceTexture7
endif

[TextureOverrideTexture8]
hash = 0a136c79
match_priority = 0
$object_detected = 1
if $H == 0
    this = ResourceHA1
endif
if $H == -1
    this = ResourceHA2
endif


; Skinning: Shape Keys Override -------------------------

[TextureOverrideShapeKeyOffsets]
hash = 82ed6a64
match_priority = 0
override_byte_stride = 24
override_vertex_count = $mesh_vertex_count

[TextureOverrideShapeKeyScale]
hash = 02ff8fd2
match_priority = 0
override_byte_stride = 4
override_vertex_count = $mesh_vertex_count

[CommandListSetupShapeKeysBatch]
$\WWMIv1\shapekey_checksum_batch0 = 2742
$\WWMIv1\shapekey_vertex_offset_original_batch0 = 0
$\WWMIv1\shapekey_vertex_offset_custom_batch0 = $shapekey_vertex_offset_batch0
cs-t33 = ResourceShapeKeyOffsetBuffer
cs-u5 = ResourceCustomShapeKeyValuesRW
cs-u6 = ResourceShapeKeyCBRW
run = CustomShader\WWMIv1\ShapeKeyBatchOverrider

[CommandListLoadShapeKeysBatch]
$\WWMIv1\shapekey_dispatch_size_y_original_batch0 = 1551
$\WWMIv1\shapekey_vertex_count_batch0 = $shapekey_vertex_count_batch0
cs-t0 = ResourceShapeKeyVertexIdBuffer
cs-t1 = ResourceShapeKeyVertexOffsetBuffer
cs-u6 = ResourceShapeKeyCBRW
run = CommandList\WWMIv1\LoadShapeKeysBatch

[TextureOverrideShapeKeyLoaderCallback]
hash = 82ed6a64
match_priority = 0
if $mod_enabled
    if cs == 3381.3333 && ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListSetupShapeKeysBatch
        run = CommandListLoadShapeKeysBatch
    endif
endif

[CommandListMultiplyShapeKeys]
$\WWMIv1\custom_vertex_count = $mesh_vertex_count
run = CustomShader\WWMIv1\ShapeKeyMultiplier

[TextureOverrideShapeKeyMultiplierCallback]
hash = 82ed6a64
match_priority = 0
if $mod_enabled
    if cs == 3381.4444 && ResourceMergedSkeleton !== null
        handling = skip
        run = CommandListMultiplyShapeKeys
    endif
endif

; Resources: Shape Keys Override -------------------------

[ResourceShapeKeyCBRW]
type = RWBuffer
format = R32G32B32A32_UINT
array = 66

[ResourceCustomShapeKeyValuesRW]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 32

; Resources: Skeleton Override -------------------------

[ResourceMergedSkeleton]

[ResourceMergedSkeletonRW]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 1536

[ResourceExtraMergedSkeleton]

[ResourceExtraMergedSkeletonRW]
type = RWBuffer
format = R32G32B32A32_FLOAT
array = 1536

; Resources: Buffers -------------------------

[ResourceBypassVB0]

[ResourceIndexBuffer]
type = Buffer
format = DXGI_FORMAT_R32_UINT
stride = 12
filename = Meshes/Index.buf

[ResourcePositionBuffer]
type = Buffer
format = DXGI_FORMAT_R32G32B32_FLOAT
stride = 12
filename = Meshes/Position.buf

[ResourceBlendBuffer]
type = Buffer
format = DXGI_FORMAT_R8_UINT
stride = 16
filename = Meshes/Blend.buf

[ResourceBlendBufferNoStride]
type = Buffer
format = DXGI_FORMAT_R8_UINT
filename = Meshes/Blend.buf

[ResourceVectorBuffer]
type = Buffer
format = DXGI_FORMAT_R8G8B8A8_SNORM
stride = 8
filename = Meshes/Vector.buf

[ResourceColorBuffer]
type = Buffer
format = DXGI_FORMAT_R8G8B8A8_UNORM
stride = 4
filename = Meshes/Color.buf

[ResourceTexCoordBuffer]
type = Buffer
format = DXGI_FORMAT_R16G16_FLOAT
stride = 16
filename = Meshes/TexCoord.buf

[ResourceBlendRemapVertexVGBuffer]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = Meshes/BlendRemapVertexVG.buf

[ResourceBlendRemapForwardBuffer]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = Meshes/BlendRemapForward.buf

[ResourceBlendRemapReverseBuffer]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = Meshes/BlendRemapReverse.buf

[ResourceShapeKeyOffsetBuffer]
type = Buffer
format = DXGI_FORMAT_R32G32B32A32_UINT
stride = 16
filename = Meshes/ShapeKeyOffset.buf

[ResourceShapeKeyVertexIdBuffer]
type = Buffer
format = DXGI_FORMAT_R32_UINT
stride = 4
filename = Meshes/ShapeKeyVertexId.buf

[ResourceShapeKeyVertexOffsetBuffer]
type = Buffer
format = DXGI_FORMAT_R16_FLOAT
stride = 2
filename = Meshes/ShapeKeyVertexOffset.buf

[ResourceA1]
filename = Textures/A1.dds
[ResourceA2]
filename = Textures/A2.dds
[ResourceA3]
filename = Textures/A3.dds
[ResourceA4]
filename = Textures/A4.dds
[ResourceA5]
filename = Textures/A5.dds
[ResourceA6]
filename = Textures/A6.dds
[ResourceA7]
filename = Textures/A7.dds
[ResourceA8]
filename = Textures/A8.dds

[ResourceB1]
filename = Textures/B1.dds
[ResourceB2]
filename = Textures/B2.dds
[ResourceB3]
filename = Textures/B3.dds
[ResourceB4]
filename = Textures/B4.dds
[ResourceB5]
filename = Textures/B5.dds
[ResourceB6]
filename = Textures/B6.dds
[ResourceB7]
filename = Textures/B7.dds
[ResourceB8]
filename = Textures/B8.dds

[ResourceC1]
filename = Textures/C1.dds
[ResourceC2]
filename = Textures/C2.dds
[ResourceC3]
filename = Textures/C3.dds
[ResourceC4]
filename = Textures/C4.dds
[ResourceC5]
filename = Textures/C5.dds
[ResourceC6]
filename = Textures/C6.dds
[ResourceC7]
filename = Textures/C7.dds
[ResourceC8]
filename = Textures/C8.dds

[ResourceD1]
filename = Textures/D1.dds
[ResourceD2]
filename = Textures/D2.dds
[ResourceD3]
filename = Textures/D3.dds
[ResourceD4]
filename = Textures/D4.dds
[ResourceD5]
filename = Textures/D5.dds
[ResourceD6]
filename = Textures/D6.dds
[ResourceD7]
filename = Textures/D7.dds
[ResourceD8]
filename = Textures/D8.dds


[ResourceAT4]
filename = Textures/AT4.dds
[ResourceBT4]
filename = Textures/BT4.dds
[ResourceCT4]
filename = Textures/CT4.dds
[ResourceDT4]
filename = Textures/DT4.dds
[ResourceET4]
filename = Textures/ET4.dds
[ResourceDT4a]
filename = Textures/DT4a.dds
[ResourceDT4b]
filename = Textures/DT4b.dds

[ResourceAT5]
filename = Textures/AT5.dds
[ResourceBT5]
filename = Textures/BT5.dds
[ResourceCT5]
filename = Textures/CT5.dds
[ResourceDT5]
filename = Textures/DT5.dds

[ResourceAT5a]
filename = Textures/AT5a.dds
[ResourceAT5b]
filename = Textures/AT5b.dds
[ResourceAT5c]
filename = Textures/AT5c.dds
[ResourceBT5a]
filename = Textures/BT5a.dds
[ResourceBT5b]
filename = Textures/BT5b.dds
[ResourceBT5c]
filename = Textures/BT5c.dds
[ResourceCT5a]
filename = Textures/CT5a.dds
[ResourceCT5b]
filename = Textures/CT5b.dds
[ResourceCT5c]
filename = Textures/CT5c.dds
[ResourceDT5a]
filename = Textures/DT5a.dds
[ResourceDT5b]
filename = Textures/DT5b.dds
[ResourceDT5c]
filename = Textures/DT5c.dds
[ResourceDT5d]
filename = Textures/DT5d.dds

[ResourceET5a]
filename = Textures/ET5a.dds
[ResourceET5b]
filename = Textures/ET5b.dds
[ResourceET5c]
filename = Textures/ET5c.dds

[ResourceE1]
filename = Textures/E1.dds
[ResourceE2]
filename = Textures/E2.dds
[ResourceE3]
filename = Textures/E3.dds
[ResourceE4]
filename = Textures/E4.dds
[ResourceE5]
filename = Textures/E5.dds
[ResourceE6]
filename = Textures/E6.dds
[ResourceE7]
filename = Textures/E7.dds
[ResourceE8]
filename = Textures/E8.dds


[ResourceE1A]
filename = Textures/E1A.dds
[ResourceE2A]
filename = Textures/E2A.dds

[ResourceF1]
filename = Textures/F1.dds
[ResourceF2]
filename = Textures/F2.dds
[ResourceF3]
filename = Textures/F3.dds
[ResourceF4]
filename = Textures/F4.dds

[ResourceHA1]
filename = Textures/HA1.dds
[ResourceHA2]
filename = Textures/HA2.dds
[ResourceHA3]
filename = Textures/HA3.dds
[ResourceHA4]
filename = Textures/HA4.dds

[ResourceHB1]
filename = Textures/HB1.dds
[ResourceHB2]
filename = Textures/HB2.dds
[ResourceHB3]
filename = Textures/HB3.dds
[ResourceHB4]
filename = Textures/HB4.dds

[ResourceAX1]
filename = Textures/AX1.dds
[ResourceAX2]
filename = Textures/AX2.dds
[ResourceBX1]
filename = Textures/BX1.dds
[ResourceBX2]
filename = Textures/BX2.dds
[ResourceCX1]
filename = Textures/CX1.dds
[ResourceCX2]
filename = Textures/CX2.dds
[ResourceDX1]
filename = Textures/DX1.dds

[ResourceHAT1]
filename = Textures/HAT1.dds
[ResourceHAT2]
filename = Textures/HAT2.dds

[ResourceHBT1]
filename = Textures/HBT1.dds
[ResourceHBT2]
filename = Textures/HBT2.dds
[ResourceA0]
filename = Textures/A0.dds
[ResourceT5]
filename = Textures/T5.dds

; Autogenerated -------------------------

; This mod.ini was generated by WWMI Tools Blender addon v1.7.3 and requires WWMI v1.0.0+ to function

; XXMI Launcher GameBanana: https://gamebanana.com/tools/17252
; XXMI Launcher GitHub: https://github.com/SpectrumQT/XXMI-Launcher
; WWMI Package GitHub: https://github.com/SpectrumQT/WWMI-Package
; WWMI Tools GameBanana: https://gamebanana.com/tools/17289
; WWMI Tools GitHub: https://github.com/SpectrumQT/WWMI-Tools
; AGMG Modding Community Discord: https://discord.com/invite/agmg
; SHA256 CHECKSUM: 8aed14a700274852155b89b88958c13e289ca3cb3de5ac53bba1cd25d8208c9f
