; WWMI ALPHA-2 INI

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

[Constants]
global $required_wwmi_version = 0.70
global $object_guid = 285591
global $mesh_vertex_count = 66970
global $shapekey_vertex_count = 34742
global $mod_id = -1000
global $mod_enabled = 0
global $object_detected = 0

[Present]
if $object_detected
	if $mod_enabled
		post $object_detected = 0
	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

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

[ResourceModName]
type = Buffer
data = "ChangLi Megatoggle with Bikini"

[ResourceModAuthor]
type = Buffer
data = "LewdLad"

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

[ResourceModLink]
type = Buffer
data = "www.patreon.com/lewd_lad"

[ResourceModLogo]
; filename = Textures/Logo.dds

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

[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

[CommandListOverrideSharedResources]
ResourceBypassVB0 = ref vb0
ib = ResourceIndexBuffer
vb0 = ResourcePositionBuffer
vb1 = ResourceVectorBuffer
vb2 = ResourceTexcoordBuffer
vb3 = ResourceColorBuffer
vb4 = ResourceBlendBuffer

[CommandListCleanupSharedResources]
vb0 = ref ResourceBypassVB0

[TextureOverrideComponent0]
hash = 5f8aac45
match_first_index = 0
match_index_count = 40269
$object_detected = 1
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 0 Bangs
	drawindexed = 40269, 0, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent1]
hash = 5f8aac45
match_first_index = 40269
match_index_count = 18657
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 1 BackHair
	drawindexed = 18657, 40269, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent2]
hash = 5f8aac45
match_first_index = 58926
match_index_count = 11904
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 2 Face
	drawindexed = 11904, 58926, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent3]
hash = 5f8aac45
match_first_index = 70830
match_index_count = 81513
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 3 ArmBand
	drawindexed = 432, 70830, 0
	; Draw Component 3 Black Choker
	drawindexed = 384, 71262, 0
	; Draw Component 3 Body.UpperTorso
	drawindexed = 37320, 71646, 0
	; Draw Component 3 Nipple Rings and String
	drawindexed = 9060, 108966, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent4]
hash = 5f8aac45
match_first_index = 152343
match_index_count = 46512
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 4 1.2 Body Lower Half.StockingsHeels.Gape
	drawindexed = 33402, 118026, 0
	; Draw Component 4 Gape Rings and Strings
	drawindexed = 18756, 151428, 0
	; Draw Component 4.Headwear
	drawindexed = 17652, 170184, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent5]
hash = 5f8aac45
match_first_index = 198855
match_index_count = 84606
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 5.Full Jacket
	drawindexed = 42108, 187836, 0
	; Draw Component 5.Sleeves Full
	drawindexed = 38922, 229944, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent6]
hash = 5f8aac45
match_first_index = 283461
match_index_count = 2028
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 6.Eyes
	drawindexed = 2028, 268866, 0
	run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent7]
hash = 5f8aac45
match_first_index = 285489
match_index_count = 102
if $mod_enabled
	handling = skip
	run = CommandListTriggerResourceOverrides
	run = CommandListOverrideSharedResources
	; Draw Component 7.Tattoo
	drawindexed = 102, 270894, 0
	run = CommandListCleanupSharedResources
endif

; Shading: Textures -------------------------

[ResourceTexture0]
filename = Textures/Components-0 t=30017835.dds

[TextureOverrideTexture0]
hash = 30017835
match_priority = 0
this = ResourceTexture0

[ResourceTexture1]
filename = Textures/Components-0 t=5fff67ee.dds

[TextureOverrideTexture1]
hash = 5fff67ee
match_priority = 0
this = ResourceTexture1

[ResourceTexture2]
filename = Textures/Components-0 t=8094e3ca.dds

[TextureOverrideTexture2]
hash = 8094e3ca
match_priority = 0
this = ResourceTexture2

[ResourceTexture3]
filename = Textures/Components-0 t=d6f4003a.dds

[TextureOverrideTexture3]
hash = d6f4003a
match_priority = 0
this = ResourceTexture3

[ResourceTexture4]
filename = Textures/Components-0-1-2-3-4-5 t=9f6eaf2e.dds

[TextureOverrideTexture4]
hash = 9f6eaf2e
match_priority = 0
this = ResourceTexture4

[ResourceTexture5]
filename = Textures/Components-0-1-2-3-4-5 t=ab012b35.dds

[TextureOverrideTexture5]
hash = ab012b35
match_priority = 0
this = ResourceTexture5

[ResourceTexture6]
filename = Textures/Components-0-2-3-4-5-6 t=5019e88f.dds

[TextureOverrideTexture6]
hash = 5019e88f
match_priority = 0
this = ResourceTexture6

[ResourceTexture7]
filename = Textures/Components-0-2-6 t=8383cbbf.dds

[TextureOverrideTexture7]
hash = 8383cbbf
match_priority = 0
this = ResourceTexture7

[ResourceTexture8]
filename = Textures/Components-1 t=1d3ad29f.dds

[TextureOverrideTexture8]
hash = 1d3ad29f
match_priority = 0
this = ResourceTexture8

[ResourceTexture9]
filename = Textures/Components-1 t=6f7a2dab.dds

[TextureOverrideTexture9]
hash = 6f7a2dab
match_priority = 0
this = ResourceTexture9

[ResourceTexture10]
filename = Textures/Components-1 t=92c11772.dds

[TextureOverrideTexture10]
hash = 92c11772
match_priority = 0
this = ResourceTexture10

[ResourceTexture11]
filename = Textures/Components-1 t=b54a043e.dds

[TextureOverrideTexture11]
hash = b54a043e
match_priority = 0
this = ResourceTexture11

[ResourceTexture12]
filename = Textures/Components-1-2 t=e0b2f0d3.dds

[TextureOverrideTexture12]
hash = e0b2f0d3
match_priority = 0
this = ResourceTexture12

[ResourceTexture13]
filename = Textures/Components-2 t=05187cd9.dds

[TextureOverrideTexture13]
hash = 05187cd9
match_priority = 0
this = ResourceTexture13

[ResourceTexture14]
filename = Textures/Components-2 t=225aad5a.dds

[TextureOverrideTexture14]
hash = 225aad5a
match_priority = 0
this = ResourceTexture14

[ResourceTexture15]
filename = Textures/FaceLightMap t=e04dea55.dds

[TextureOverrideTexture15]
hash = 435d999a
match_priority = 0
this = ResourceTexture15

[ResourceTexture16]
filename = Textures/Components-3 t=8a125464.dds

[TextureOverrideTexture16]
hash = 8a125464
match_priority = 0
this = ResourceTexture16

[ResourceTexture17]
filename = Textures/Components-3 t=dfe134cd.dds

[TextureOverrideTexture17]
hash = dfe134cd
match_priority = 0
this = ResourceTexture17

[ResourceTexture18]
filename = Textures/Components-3 t=f23483e3.dds

[TextureOverrideTexture18]
hash = f23483e3
match_priority = 0
this = ResourceTexture18

[ResourceTexture19]
filename = Textures/Components-3-6 t=a260e7f7.dds

[TextureOverrideTexture19]
hash = a260e7f7
match_priority = 0
this = ResourceTexture19

[ResourceTexture20]
filename = Textures/Components-4 t=00e5703f.dds

[TextureOverrideTexture20]
hash = 00e5703f
match_priority = 0
this = ResourceTexture20

[ResourceTexture21]
filename = Textures/Components-4 t=998bc53c.dds

[TextureOverrideTexture21]
hash = 998bc53c
match_priority = 0
this = ResourceTexture21

[ResourceTexture22]
filename = Textures/Components-4 pubes.dds

[TextureOverrideTexture22]
hash = a45bfe26
match_priority = 0
this = ResourceTexture22

[ResourceTexture23]
filename = Textures/Components-5 t=2782d638.dds

[TextureOverrideTexture23]
hash = 2782d638
match_priority = 0
this = ResourceTexture23

[ResourceTexture24]
filename = Textures/Components-5 t=c02dbf56.dds

[TextureOverrideTexture24]
hash = c02dbf56
match_priority = 0
this = ResourceTexture24

[ResourceTexture25]
filename = Textures/Components-5 t=f98c7e7c.dds

[TextureOverrideTexture25]
hash = f98c7e7c
match_priority = 0
this = ResourceTexture25

[ResourceTexture26]
filename = Textures/Components-6 t=eb70f116.dds

[TextureOverrideTexture26]
hash = eb70f116
match_priority = 0
this = ResourceTexture26

[ResourceTexture27]
filename = Textures/Components-7 t=c235c6a7.dds

[TextureOverrideTexture27]
hash = c235c6a7
match_priority = 0
this = ResourceTexture27

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

[TextureOverrideShapeKeyOffsets]
hash = 1ccb8008
match_priority = 0
override_byte_stride = 24
override_vertex_count = $mesh_vertex_count

[TextureOverrideShapeKeyScale]
hash = 060f5303
match_priority = 0
override_byte_stride = 4
override_vertex_count = $mesh_vertex_count

[CommandListSetupShapeKeys]
$\WWMIv1\shapekey_checksum = 2156
cs-t33 = ResourceShapeKeyOffsetBuffer
cs-u5 = ResourceCustomShapeKeyValuesRW
cs-u6 = ResourceShapeKeyCBRW
run = CustomShader\WWMIv1\ShapeKeyOverrider

[CommandListLoadShapeKeys]
$\WWMIv1\shapekey_vertex_count = $shapekey_vertex_count
cs-t0 = ResourceShapeKeyVertexIdBuffer
cs-t1 = ResourceShapeKeyVertexOffsetBuffer
cs-u6 = ResourceShapeKeyCBRW
run = CustomShader\WWMIv1\ShapeKeyLoader

[TextureOverrideShapeKeyLoaderCallback]
hash = 1ccb8008
match_priority = 0
if $mod_enabled
	if cs == 3381.3333
		handling = skip
		run = CommandListSetupShapeKeys
		run = CommandListLoadShapeKeys
	endif
endif

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

[TextureOverrideShapeKeyMultiplierCallback]
hash = 1ccb8008
match_priority = 0
if $mod_enabled
	if cs == 3381.4444
		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: 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 = 8
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

[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

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

; This mod.ini was automatically generated by WWMI Tools Blender addon v0.9.0 and requires WWMI v0.7.0+ to function
; WWMI GameBanana: https://gamebanana.com/tools/17252
; WWMI Tools GameBanana: https://gamebanana.com/tools/17289
; WWMI GitHub: https://github.com/SpectrumQT/WWMI
; WWMI Tools GitHub: https://github.com/SpectrumQT/WWMI_Tools
; AGMG Modding Community Discord: https://discord.com/invite/agmg

; SHA256 CHECKSUM: 1733707d187a31e7c11785c44ef1ab389b2413a9e4d75aa6400fdc9247d10ad3
