; Merged Mod: .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShorts.ini, .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShorts.ini, .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShorts.ini

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

[Constants]
global persist $swapvar = 0
global persist $swap_unidentified = -1
global persist $swap_mondstadt = 0
global persist $swap_liyue = -1
global persist $swap_dragonspine = -1
global persist $swap_inazuma = -1
global persist $swap_enkanomiya = -1
global persist $swap_chasm = -1
global persist $swap_sumeru_forest = 2
global persist $swap_sumeru_desert = 2
global persist $swap_fontaine = -1
global persist $swap_teapot = -1
global persist $swapvar_not_assigned = -1
global persist $swap_chenyu = -1
global persist $isfirstload = 1
global $not_assigned = 0
global persist $regioncheck 
global $active
global $creditinfo = 0

[KeySwapMondstadt]
condition = ($active == 1 && $regioncheck == 1)||$isfirstload == 1
key = p
type = cycle
$swap_mondstadt = 1,0
$creditinfo = 0

[KeySwapLiyue]
condition = ($active == 1 && $regioncheck == 2)||$isfirstload == 1
key = p
type = cycle
$swap_liyue = 2
$creditinfo = 0

[KeySwapDragonspine]
condition = ($active == 1 && $regioncheck == 3)||$isfirstload == 1
key = p
type = cycle
$swap_dragonspine = 2
$creditinfo = 0

[KeySwapInazuma]
condition = ($active == 1 && $regioncheck == 4)||$isfirstload == 1
key = p
type = cycle
$swap_inazuma = 2
$creditinfo = 0

[KeySwapEnkanomiya]
condition = ($active == 1 && $regioncheck == 5)||$isfirstload == 1
key = p
type = cycle
$swap_enkanomiya = 2
$creditinfo = 0

[KeySwapChasm]
condition = ($active == 1 && $regioncheck == 6)||$isfirstload == 1
key = p
type = cycle
$swap_chasm = 2
$creditinfo = 0

[KeySwapSumeruForest]
condition = ($active == 1 && $regioncheck == 7)||$isfirstload == 1
key = p
type = cycle
$swap_sumeru_forest = 2,0
$creditinfo = 0

[KeySwapSumeruDesert]
condition = ($active == 1 && $regioncheck == 8)||$isfirstload == 1
key = p
type = cycle
$swap_sumeru_desert = 2,0
$creditinfo = 0

[KeySwapFontaine]
condition = ($active == 1 && $regioncheck == 9)||$isfirstload == 1
key = p
type = cycle
$swap_fontaine = 2
$creditinfo = 0

[KeySwapTeapot]
condition = ($active == 1 && $regioncheck == 10)||$isfirstload == 1
key = p
type = cycle
$swap_teapot = 2
$creditinfo = 0

[KeySwapUnidentified]
condition = ($active == 1 && $regioncheck == 0)||$isfirstload == 1
key = p
type = cycle
$swap_unidentified = 2
$creditinfo = 0

[KeySwapNotAssgigned]
condition = ($active == 1 && $not_assigned == 1)||$isfirstload == 1
key = p
type = cycle
$swapvar_not_assigned = 0,1,2
$isfirstload = 0
$creditinfo = 0

[KeySwapChenyu]
condition = ($active == 1 && $regioncheck == 11)||$isfirstload == 1
key = p
type = cycle
$swap_chenyu = 0

[Present]
post $active = 0
post $not_assigned = 0
$regioncheck = $\global\region\regioncheck
run = CommandListCheckAssigned
run = CommandListSetOutfit

; Shader ------------------------------

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

[TextureOverrideMondstadtNpcShortsPosition]
hash = 9abd4d99
run = CommandListMondstadtNpcShortsPosition
$active = 1

[TextureOverrideMondstadtNpcShortsBlend]
hash = 2a2d8ddf
run = CommandListMondstadtNpcShortsBlend

[TextureOverrideMondstadtNpcShortsTexcoord]
hash = 242c6929
run = CommandListMondstadtNpcShortsTexcoord

[TextureOverrideMondstadtNpcShortsVertexLimitRaise]
hash = 9fe5eb89

[TextureOverrideMondstadtNpcShortsIB]
hash = 9dc29cf4
run = CommandListMondstadtNpcShortsIB

[TextureOverrideMondstadtNpcShortsHead]
hash = 9dc29cf4
match_first_index = 0
run = CommandListMondstadtNpcShortsHead

[TextureOverrideMondstadtNpcShortsFPosition]
hash = 29116c2c
run = CommandListMondstadtNpcShortsFPosition
$active = 1

[TextureOverrideMondstadtNpcShortsFBlend]
hash = 3587d23e
run = CommandListMondstadtNpcShortsFBlend

[TextureOverrideMondstadtNpcShortsFTexcoord]
hash = 23df895c
run = CommandListMondstadtNpcShortsFTexcoord

[TextureOverrideMondstadtNpcShortsFVertexLimitRaise]
hash = 5010f7b6

[TextureOverrideMondstadtNpcShortsFIB]
hash = 7da949f3
run = CommandListMondstadtNpcShortsFIB

[TextureOverrideMondstadtNpcShortsFHead]
hash = 7da949f3
match_first_index = 0
run = CommandListMondstadtNpcShortsFHead

[TextureOverrideMondstadtNpcShortsFFPosition]
hash = 273d8e41
run = CommandListMondstadtNpcShortsFFPosition
$active = 1

[TextureOverrideMondstadtNpcShortsFFBlend]
hash = d8b31796
run = CommandListMondstadtNpcShortsFFBlend

[TextureOverrideMondstadtNpcShortsFFTexcoord]
hash = 6c28b6dd
run = CommandListMondstadtNpcShortsFFTexcoord

[TextureOverrideMondstadtNpcShortsFFVertexLimitRaise]
hash = 145c6554

[TextureOverrideMondstadtNpcShortsFFIB]
hash = 4ea675e3
run = CommandListMondstadtNpcShortsFFIB

[TextureOverrideMondstadtNpcShortsFFHead]
hash = 4ea675e3
match_first_index = 0
run = CommandListMondstadtNpcShortsFFHead

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

[CommandListMondstadtNpcShortsPosition]
if $swapvar == 0
	vb0 = ResourceMondstadtNpcShortsPosition.0
else if $swapvar == 1
	vb0 = ResourceMondstadtNpcShortsPosition.1
else if $swapvar == 2
	vb0 = ResourceMondstadtNpcShortsPosition.2
endif

[CommandListMondstadtNpcShortsBlend]
if $swapvar == 0
	vb1 = ResourceMondstadtNpcShortsBlend.0
	handling = skip
	draw = 55287,0
else if $swapvar == 1
	vb1 = ResourceMondstadtNpcShortsBlend.1
	handling = skip
	draw = 55467,0
else if $swapvar == 2
	vb1 = ResourceMondstadtNpcShortsBlend.2
	handling = skip
	draw = 26576,0
endif

[CommandListMondstadtNpcShortsTexcoord]
if $swapvar == 0
	vb1 = ResourceMondstadtNpcShortsTexcoord.0
else if $swapvar == 1
	vb1 = ResourceMondstadtNpcShortsTexcoord.1
else if $swapvar == 2
	vb1 = ResourceMondstadtNpcShortsTexcoord.2
endif

[CommandListMondstadtNpcShortsIB]
if $swapvar == 0
	handling = skip
	drawindexed = auto
else if $swapvar == 1
	handling = skip
	drawindexed = auto
else if $swapvar == 2
	handling = skip
	drawindexed = auto
endif

[CommandListMondstadtNpcShortsHead]
if $swapvar == 0
	ib = ResourceMondstadtNpcShortsHeadIB.0
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.0
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.0
else if $swapvar == 1
	ib = ResourceMondstadtNpcShortsHeadIB.1
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.1
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.1
else if $swapvar == 2
	ib = ResourceMondstadtNpcShortsHeadIB.2
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.2
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.2
endif

[CommandListMondstadtNpcShortsFPosition]
if $swapvar == 0
	vb0 = ResourceMondstadtNpcShortsPosition.0
else if $swapvar == 1
	vb0 = ResourceMondstadtNpcShortsPosition.1
else if $swapvar == 2
	vb0 = ResourceMondstadtNpcShortsPosition.2
endif

[CommandListMondstadtNpcShortsFBlend]
if $swapvar == 0
	vb1 = ResourceMondstadtNpcShortsBlend.0
	handling = skip
	draw = 55287,0
else if $swapvar == 1
	vb1 = ResourceMondstadtNpcShortsBlend.1
	handling = skip
	draw = 55467,0
else if $swapvar == 2
	vb1 = ResourceMondstadtNpcShortsBlend.2
	handling = skip
	draw = 26576,0
endif

[CommandListMondstadtNpcShortsFTexcoord]
if $swapvar == 0
	vb1 = ResourceMondstadtNpcShortsTexcoord.0
else if $swapvar == 1
	vb1 = ResourceMondstadtNpcShortsTexcoord.1
else if $swapvar == 2
	vb1 = ResourceMondstadtNpcShortsTexcoord.2
endif

[CommandListMondstadtNpcShortsFIB]
if $swapvar == 0
	handling = skip
	drawindexed = auto
else if $swapvar == 1
	handling = skip
	drawindexed = auto
else if $swapvar == 2
	handling = skip
	drawindexed = auto
endif

[CommandListMondstadtNpcShortsFHead]
if $swapvar == 0
	ib = ResourceMondstadtNpcShortsHeadIB.0
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.0
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.0
else if $swapvar == 1
	ib = ResourceMondstadtNpcShortsHeadIB.1
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.1
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.1
else if $swapvar == 2
	ib = ResourceMondstadtNpcShortsHeadIB.2
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.2
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.2
endif

[CommandListMondstadtNpcShortsFFPosition]
if $swapvar == 0
	vb0 = ResourceMondstadtNpcShortsPosition.0
else if $swapvar == 1
	vb0 = ResourceMondstadtNpcShortsPosition.1
else if $swapvar == 2
	vb0 = ResourceMondstadtNpcShortsPosition.2
endif

[CommandListMondstadtNpcShortsFFBlend]
if $swapvar == 0
	vb1 = ResourceMondstadtNpcShortsBlend.0
	handling = skip
	draw = 55287,0
else if $swapvar == 1
	vb1 = ResourceMondstadtNpcShortsBlend.1
	handling = skip
	draw = 55467,0
else if $swapvar == 2
	vb1 = ResourceMondstadtNpcShortsBlend.2
	handling = skip
	draw = 26576,0
endif

[CommandListMondstadtNpcShortsFFTexcoord]
if $swapvar == 0
	vb1 = ResourceMondstadtNpcShortsTexcoord.0
else if $swapvar == 1
	vb1 = ResourceMondstadtNpcShortsTexcoord.1
else if $swapvar == 2
	vb1 = ResourceMondstadtNpcShortsTexcoord.2
endif

[CommandListMondstadtNpcShortsFFIB]
if $swapvar == 0
	handling = skip
	drawindexed = auto
else if $swapvar == 1
	handling = skip
	drawindexed = auto
else if $swapvar == 2
	handling = skip
	drawindexed = auto
endif

[CommandListMondstadtNpcShortsFFHead]
if $swapvar == 0
	ib = ResourceMondstadtNpcShortsHeadIB.0
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.0
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.0
else if $swapvar == 1
	ib = ResourceMondstadtNpcShortsHeadIB.1
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.1
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.1
else if $swapvar == 2
	ib = ResourceMondstadtNpcShortsHeadIB.2
	ps-t0 = ResourceMondstadtNpcShortsHeadDiffuse.2
	ps-t1 = ResourceMondstadtNpcShortsHeadLightMap.2
endif


[CommandListCheckAssigned]
if $regioncheck == 0 && $swap_unidentified == -1
	$not_assigned = 1
else if $regioncheck == 1 && $swap_mondstadt == -1
	$not_assigned = 1
else if $regioncheck == 2 && $swap_liyue == -1
	$not_assigned = 1
else if $regioncheck == 3 && $swap_dragonspine == -1
	$not_assigned = 1
else if $regioncheck == 4 && $swap_inazuma == -1
	$not_assigned = 1
else if $regioncheck == 5 && $swap_enkanomiya == -1
	$not_assigned = 1
else if $regioncheck == 6 && $swap_chasm == -1
	$not_assigned = 1
else if $regioncheck == 7 && $swap_sumeru_forest == -1
	$not_assigned = 1
else if $regioncheck == 8 && $swap_sumeru_desert == -1
	$not_assigned = 1
else if $regioncheck == 9 && $swap_fontaine == -1
	$not_assigned = 1
else if $regioncheck == 10 && $swap_teapot == -1
	$not_assigned = 1
else if $regioncheck == 11 && $swap_chenyu == -1
	$not_assigned = 1
endif

[CommandListSetOutfit]
if $regioncheck == 0 && $swap_unidentified != -1
	$swapvar = $swap_unidentified
else if $regioncheck == 1 && $swap_mondstadt != -1
	$swapvar = $swap_mondstadt
else if $regioncheck == 2 && $swap_liyue != -1
	$swapvar = $swap_liyue
else if $regioncheck == 3 && $swap_dragonspine != -1
	$swapvar = $swap_dragonspine		
else if $regioncheck == 4 && $swap_inazuma != -1
	$swapvar = $swap_inazuma
else if $regioncheck == 5 && $swap_enkanomiya != -1
	$swapvar = $swap_enkanomiya
else if $regioncheck == 6 && $swap_chasm != -1
	$swapvar = $swap_chasm
else if $regioncheck == 7 && $swap_sumeru_forest != -1
	$swapvar = $swap_sumeru_forest
else if $regioncheck == 8 && $swap_sumeru_desert != -1
	$swapvar = $swap_sumeru_desert
else if $regioncheck == 9 && $swap_fontaine != -1
	$swapvar = $swap_fontaine
else if $regioncheck == 10 && $swap_teapot != -1
	$swapvar = $swap_teapot
else if $regioncheck == 11 && $swap_chenyu != -1
	$swapvar = $swap_chenyu
else
	$swapvar = $swapvar_not_assigned
endif


; Resources ---------------------------

[ResourceMondstadtNpcShortsPosition.0]
type = Buffer
stride = 40
filename = .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShortsPosition.buf

[ResourceMondstadtNpcShortsBlend.0]
type = Buffer
stride = 32
filename = .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShortsBlend.buf

[ResourceMondstadtNpcShortsTexcoord.0]
type = Buffer
stride = 12
filename = .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShortsTexcoord.buf

[ResourceMondstadtNpcShortsHeadIB.0]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShortsHead.ib

[ResourceMondstadtNpcShortsHeadDiffuse.0]
filename = .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShortsHeadDiffuse.dds

[ResourceMondstadtNpcShortsHeadLightMap.0]
filename = .\00 MondstadtNpcShortsModFullNude\MondstadtNpcShortsHeadLightMap.dds

[ResourceMondstadtNpcShortsPosition.1]
type = Buffer
stride = 40
filename = .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShortsPosition.buf

[ResourceMondstadtNpcShortsBlend.1]
type = Buffer
stride = 32
filename = .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShortsBlend.buf

[ResourceMondstadtNpcShortsTexcoord.1]
type = Buffer
stride = 12
filename = .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShortsTexcoord.buf

[ResourceMondstadtNpcShortsHeadIB.1]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShortsHead.ib

[ResourceMondstadtNpcShortsHeadDiffuse.1]
filename = .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShortsHeadDiffuse.dds

[ResourceMondstadtNpcShortsHeadLightMap.1]
filename = .\01 MON MondstadtNpcShortsModMaid\MondstadtNpcShortsHeadLightMap.dds

[ResourceMondstadtNpcShortsPosition.2]
type = Buffer
stride = 40
filename = .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShortsPosition.buf

[ResourceMondstadtNpcShortsBlend.2]
type = Buffer
stride = 32
filename = .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShortsBlend.buf

[ResourceMondstadtNpcShortsTexcoord.2]
type = Buffer
stride = 12
filename = .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShortsTexcoord.buf

[ResourceMondstadtNpcShortsHeadIB.2]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShortsHead.ib

[ResourceMondstadtNpcShortsHeadDiffuse.2]
filename = .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShortsHeadDiffuse.dds

[ResourceMondstadtNpcShortsHeadLightMap.2]
filename = .\02 SUF MondstadtNpcShortsModEscort\MondstadtNpcShortsHeadLightMap.dds



; .ini generated by GIMI (Genshin-Impact-Model-Importer) mod merger script
; If you have any issues or find any bugs, please open a ticket at https://github.com/SilentNightSound/GI-Model-Importer/issues or contact SilentNightSound#7430 on discord
