; Jane

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

[Constants]
global persist $swapvarupper = 0
global persist $swapvarlower = 0
global persist $swapvart = 0
global persist $swapvars = 0
global persist $detail = 0
global $active = 0
global $creditinfo = 0

[KeySwapUP]
condition = $active == 1
key = no_alt VK_UP
type = cycle
$swapvarupper = 0,1,2,3,4

[KeySwapDOWN]
condition = $active == 1
key = no_alt VK_DOWN
type = cycle
$swapvarlower = 0,1,2,3,4

[KeySwapRIGHT]
condition = $active == 1
key = no_alt VK_RIGHT
type = cycle
$swapvart = 0,1

[KeySwapLEFT]
condition = $active == 1
key = no_alt VK_LEFT
type = cycle
$swapvars = 0,1,2,3

[KeySwapDetail]
condition = $active == 1
key = alt VK_LEFT
type = cycle
$detail = 0,1

[Present]
post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideJaneHairPosition]
hash = 24323bf9
handling = skip
vb0 = ResourceJaneHairPosition
vb2 = ResourceJaneHairBlend
draw = 13372,0
$active = 1

[TextureOverrideJaneHairTexcoord]
hash = 257a90d6
; hash = c8ad344e
vb1 = ResourceJaneHairTexcoord

[TextureOverrideJaneHairVertexLimitRaise]
hash = 5721e4e7
; override_vertex_count = 526
; override_byte_stride = 104

[TextureOverrideJaneBodyPosition]
hash = 06f9bc49
handling = skip
vb0 = ResourceJaneBodyPosition
vb2 = ResourceJaneBodyBlend
draw = 65695,0
$active = 1

[TextureOverrideJaneBodyTexcoord]
hash = 8b85c03e
vb1 = ResourceJaneBodyTexcoord

[TextureOverrideJaneBodyVertexLimitRaise]
hash = d1aa4b85
; override_vertex_count = 65695
; override_byte_stride = 96

[TextureOverrideJaneHairIB]
hash = 7b16a708
handling = skip

[TextureOverrideJaneHairA]
hash = 7b16a708
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceJaneHairAIB
; JaneHairA-vb0=24323bf9.txt
drawindexed = 0, 0, 0
; JaneHairA
	; Hair
	drawindexed = 12294, 0, 0
	; Hair.Long
	if $swapvars == 0 || $swapvars == 1
	drawindexed = 4638, 12294, 0
	else 
	handling = skip
	endif
	; HandCover
	drawindexed = 564, 16932, 0
	; HandPart
	drawindexed = 432, 17496, 0
	; Hands
	if $swapvarupper == 3 || $swapvarupper == 4  
	drawindexed = 9768, 17928, 0
	else
	handling = skip
	endif
	; Jacket2
	if $swapvarupper == 3 || $swapvarupper == 4
	handling = skip
	else
	drawindexed = 15687, 27696, 0
	endif
	; Tie
	if $swapvarupper != 3 && $swapvarupper != 4 && $detail == 0
	drawindexed = 354, 43383, 0
	else 
	handling = skip
	endif

[TextureOverrideJaneHairADiffuse]
hash = f7ef1a53
this = ResourceJaneHairADiffuse

[TextureOverrideJane.HairA.Diffuse.1024]
hash = b33a9770
this = ResourceJaneHairADiffuse

[TextureOverrideJaneHairANormalMap]
hash = 4aa12b36
this = ResourceJaneHairANormalMap

[TextureOverrideJane.HairA.NormalMap.1024]
hash = f0aded31
this = ResourceJaneHairANormalMap

[TextureOverrideJaneHairALightMap]
hash = 9ec4cd4f
this = ResourceJaneHairALightMap

[TextureOverrideJane.HairA.LightMap.1024]
hash = 5e12acc1
this = ResourceJaneHairALightMap

[TextureOverrideJaneHairAMaterialMap]
hash = 5e34e275
this = ResourceJaneHairAMaterialMap

[TextureOverrideJane.HairA.MaterialMap.1024]
hash = 40fca454
this = ResourceJaneHairAMaterialMap

[TextureOverrideJaneHairB]
hash = 7b16a708
match_first_index = 33780
run = CommandListSkinTexture
ib = ResourceJaneHairBIB
; JaneHairB-vb0=24323bf9.txt
drawindexed = 1626, 0, 0

[TextureOverrideJaneBodyIB]
hash = e2c0144e
handling = skip

[TextureOverrideJaneBodyA]
hash = e2c0144e
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceJaneBodyAIB
; JaneBodyA-vb0=06f9bc49.txt
drawindexed = 0, 0, 0
; JaneBodyA
	; Body.Covered
	if $swapvart == 0 && $swapvarlower != 4
	drawindexed = 69372, 0, 0
	else 
	handling = skip
	endif
	; Body.Covered.001
	if  $swapvart == 1 || $swapvarlower == 4 
	drawindexed = 69372, 69372, 0
	else 
	handling = skip
	endif
	; Body.Exposed
	if $swapvarupper != 3 && $swapvart == 0 && $swapvarupper != 0 && $swapvarlower != 4
	drawindexed = 69372, 138744, 0
	else 
	handling = skip
	endif
	; Body.Exposed.001
	if $swapvarupper != 3 && $swapvarupper != 0 && ($swapvart == 1 && $swapvarupper != 0 || $swapvarlower == 4)
	drawindexed = 69372, 208116, 0
	else 
	handling = skip
	endif
	; Boots
	drawindexed = 11796, 277488, 0
	; Jacket.Covered
	if $swapvarupper == 0
	drawindexed = 9426, 289284, 0
	else 
	handling = skip
	endif
	; Jacket.Exposed
	if $swapvarupper == 1 || $swapvarupper == 2
	drawindexed = 9426, 298710, 0
	else 
	handling = skip
	endif
	; Neck
	drawindexed = 636, 308136, 0
	; Panties
	if $swapvarlower == 1 || $swapvarlower == 3 
	drawindexed = 2142, 308772, 0
	else 
	handling = skip
	endif
	; Shorts
	if $swapvarlower == 0
	drawindexed = 3762, 310914, 0
	else 
	handling = skip
	endif
	; Shorts.Exposed
	if $swapvarlower == 1 || $swapvarlower == 2
	drawindexed = 3075, 314676, 0
	else 
	handling = skip
	endif
	; Stockings
	if $swapvart == 0 && $swapvarlower != 4
	drawindexed = 4671, 317751, 0
	else 
	handling = skip
	endif
	; Straps
	if $swapvarupper == 0 || $swapvarupper == 1
	drawindexed = 2088, 322422, 0
	else 
	handling = skip
	endif
	; Tail
	if $swapvars == 0 || $swapvars == 2
	drawindexed = 4548, 324510, 0
	else 
	handling = skip
	endif
	; Top
	if $swapvarupper == 0 || $swapvarupper == 3
	drawindexed = 1752, 329058, 0
	else 
	handling = skip
	endif

[TextureOverrideJaneBodyADiffuse]
hash = d1f56c7d
this = ResourceJaneBodyADiffuse

[TextureOverrideJane.BodyA.Diffuse.1024]
hash = e62ae3b5
this = ResourceJaneBodyADiffuse

[TextureOverrideJaneBodyANormalMap]
hash = 0165f71c
this = ResourceJaneBodyANormalMap

[TextureOverrideJane.BodyA.NormalMap.1024]
hash = 387dfc9f
this = ResourceJaneBodyANormalMap

[TextureOverrideJaneBodyALightMap]
hash = 3087f82a
this = ResourceJaneBodyALightMap

[TextureOverrideJane.BodyA.LightMap.1024]
hash = 52fa9861
this = ResourceJaneBodyALightMap

[TextureOverrideJaneBodyAMaterialMap]
hash = 99eae42e
this = ResourceJaneBodyAMaterialMap

[TextureOverrideJane.BodyA.MaterialMap.1024]
hash = 5dce2408
this = ResourceJaneBodyAMaterialMap

[TextureOverrideJaneFaceADiffuse]
hash = ef86fc9f
run = CommandListSkinTexture

[TextureOverrideJaneFaceADiffuse2]
hash = 8974fb74
this = ResourceJaneFaceADiffuse

[TextureOverrideJane.HeadA.Diffuse.1024]
hash = 689639a5
this = ResourceJaneFaceADiffuse

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

[ResourceJaneHairPosition]
type = Buffer
stride = 40
filename = JaneHairPosition.buf

[ResourceJaneHairBlend]
type = Buffer
stride = 32
filename = JaneHairBlend.buf

[ResourceJaneHairTexcoord]
type = Buffer
stride = 20
;stride = 32
filename = JaneHairTexcoord.buf

[ResourceJaneBodyPosition]
type = Buffer
stride = 40
filename = JaneBodyPosition.buf

[ResourceJaneBodyBlend]
type = Buffer
stride = 32
filename = JaneBodyBlend.buf

[ResourceJaneBodyTexcoord]
type = Buffer
stride = 24
filename = JaneBodyTexcoord.buf

[ResourceJaneHairAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = JaneHairA.ib

[ResourceJaneHairBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = JaneHairB.ib

[ResourceJaneBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = JaneBodyA.ib

[ResourceJaneHairADiffuse]
filename = JaneHairADiffuse.dds

[ResourceJaneHairANormalMap]
filename = JaneHairANormalMap.dds

[ResourceJaneHairALightMap]
filename = JaneHairALightMap.dds

[ResourceJaneHairAMaterialMap]
filename = JaneHairAMaterialMap.dds

[ResourceJaneBodyADiffuse]
filename = JaneBodyADiffuse.dds

[ResourceJaneBodyANormalMap]
filename = JaneBodyANormalMap.dds

[ResourceJaneBodyALightMap]
filename = JaneBodyALightMap.dds

[ResourceJaneBodyAMaterialMap]
filename = JaneBodyAMaterialMap.dds

[ResourceJaneFaceADiffuse]
filename = JaneFaceADiffuse.dds

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

; .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