:: mod_setting
<<set $here = 'mod_setting'>>
<<set $ARGS = $location_var[$here]>>
<!-- !'Mod system 1.0 by illume'-->
<<gs 'obj_din' 'settingtabs'>>
<<if getvar("$settingmode") == 1>>
	<!-- !value= 2, call from Character creation-->
	<<act '<center><b>Return to character creation</b></center>'>>
		 <<gt 'begin' 'start'>>
	<</act>>
<<else>>
	<!-- !call from Menu - Game settings-->
	<<act 'Exit the menu'>>
		 <<gt 'obj_din' 'menu_exit'>>
	<</act>>
<</if>>
<!-- FAILED TO CONVERT
	*nl '<center><h1>MODs</h1></center>'
-----
	 * ERROR: FAILED TO CONVERT LITERAL: """nl '<center><h1>MODs<""" / ERROR: FAILED TO CONVERT LITERAL: """h1><""" / ERROR: FAILED TO CONVERT LITERAL: """center>'"""

-->
<<warn "CONVERSION ERROR 569caedce52a445722c31f83f54e52e1">>
<center>
<b>WARNING</b>: Game slowdown may occur when installing too many mods, or mods with bad structure.
You may find information on available Mods as well as instructions on installing Mods on this thread:
<a href="https://tfgames.site/phpbb3/viewtopic.php?f=70&t=11793&sid=08ee13168a1ea71fa2348f20815b8380">https://tfgames.site/phpbb3/viewtopic.php?f=70&t=11793&sid=08ee13168a1ea71fa2348f20815b8380</a>
<<if getvar("$mod_list") > 0>>
	<table border=1><tr><td>id</td><td>Name</td><td>Version</td><td>Author</td><td>Description</td><td>Options</td></tr>
	<<set $mod_i = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :'>> % $_alllist
	<<if $mod_name[$mod_i] != ''>>
		<!-- !name-->
		<!-- FAILED TO CONVERT
			*p '<tr><td><<mod_i>></td><td><<$mod_name[mod_i]>></td>'
		-----
			 * ERROR: FAILED TO CONVERT LITERAL: """p '<tr><td><<""" % ERROR: FAILED TO CONVERT LITERAL: """_i>><""" / ERROR: FAILED TO CONVERT LITERAL: """td><td>$""" % ERROR: FAILED TO CONVERT LITERAL: """_name[$mod_i]<""" / ERROR: FAILED TO CONVERT LITERAL: """td>'"""

		-->
		<<warn "CONVERSION ERROR f3cbcccdc5c6fe5a62b3675cef3d35ae">>
		<!-- !version-->
		<!-- FAILED TO CONVERT
			*p '<td><<val($mod_version[mod_i])/10000>>.<<(val($mod_version[mod_i]) mod 10000)/100>> <<iif(val($mod_version[mod_i]) mod 100 > 0, ''fix <<val($mod_version[mod_i]) mod 100>> '', '' '')>></td>'
		-----
			 * p '<td><<val($mod_version[$mod_i]) / 10000>>.<<(val($mod_version[$mod_i]) mod 10000) / ERROR: FAILED TO CONVERT LITERAL: """100>> <<iif(val($""" % _version[$mod_i]) % ERROR: FAILED TO CONVERT LITERAL: """100 > 0""" , 'fix val($mod_version[$mod_i]) mod 100 ' , ERROR: FAILED TO CONVERT LITERAL: """'' '')>><""" / ERROR: FAILED TO CONVERT LITERAL: """td>'"""

		-->
		<<warn "CONVERSION ERROR a8c79ffa14acff79b1f7359e028d28d4">>
		<!-- !author-->
		<!-- FAILED TO CONVERT
			*p '<td><<$mod_author[mod_i]>></td>'
		-----
			 * ERROR: FAILED TO CONVERT LITERAL: """p '<td>$""" % ERROR: FAILED TO CONVERT LITERAL: """_author[$mod_i]<""" / ERROR: FAILED TO CONVERT LITERAL: """td>'"""

		-->
		<<warn "CONVERSION ERROR 1cf831e63ef3a40c869c76cee93d9cfa">>
		<!-- !description and readme-->
		<!-- FAILED TO CONVERT
			*p '<td><a href="exec:gs ''mod_<<$mod_name[mod_i]>>_readme''"><img src="images/system/icons/anptekainfo.jpg"></a> <<$mod_desc[mod_i]>></td>'
		-----
			<<set  * ERROR: FAILED TO CONVERT LITERAL: """p '<td><a href""" = ERROR: FAILED TO CONVERT LITERAL: """"exec:gs ''""" % _$ % ERROR: FAILED TO CONVERT LITERAL: """_name[$mod_i]_readme''"><<image 'images""" / $system / $icons / ERROR: FAILED TO CONVERT LITERAL: """anptekainfo.jpg'>><""" / ERROR: FAILED TO CONVERT LITERAL: """a> $""" % ERROR: FAILED TO CONVERT LITERAL: """_desc[$mod_i]<""" / ERROR: FAILED TO CONVERT LITERAL: """td>'""">>

		-->
		<<warn "CONVERSION ERROR 90866113844920c24605879b6be377c1">>
		<!-- !mod options page-->
		<!-- FAILED TO CONVERT
			*p '<td>'+iif($mod_opt[mod_i] ! '','<a href="exec:gs ''mod_<<$mod_name[mod_i]>>_options''"><<$mod_opt[mod_i]>></a>','')+'</td></tr>'
		-----
			<<set  * ERROR: FAILED TO CONVERT LITERAL: """p '<td>'""" + iif($ % _opt[$mod_i] ! '' , ERROR: FAILED TO CONVERT LITERAL: """'<a href""" = ERROR: FAILED TO CONVERT LITERAL: """"exec:gs ''""" % _$ % ERROR: FAILED TO CONVERT LITERAL: """_name[$mod_i]_options''">$""" % ERROR: FAILED TO CONVERT LITERAL: """_opt[$mod_i]<""" / a>','') + ERROR: FAILED TO CONVERT LITERAL: """'<""" / ERROR: FAILED TO CONVERT LITERAL: """td><""" / ERROR: FAILED TO CONVERT LITERAL: """tr>'""">>

		-->
		<<warn "CONVERSION ERROR 0d91af4d5ea92595071d61d947afeaf9">>
	<<else>>
		ERROR loading mod id <<mod_i>>, no mod name available
	<</if>>
	<<if $mod_list > $mod_i>>
		<<set $mod_i += 1>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump '>> % _alllist'
	<</if>>
	<<set $mod_info to null>>
	</table>
<<else>>
	<br>You have no Mods activated.
<</if>>
</center>
<<actCLA '+iif(settingmode = 1, '<center><b>Install new mod</b></center>','Install new mod')+'>>
	<<set $mod_info to null>>
	<!-- FAILED TO CONVERT
		$mod_temp=input('input mod name (as for the example image above, input <B>isample</B>)')
	-----
		<<set $mod_temp = input('input mod name (as for the example image above , ERROR: FAILED TO CONVERT LITERAL: """input <B>isample<""" / ERROR: FAILED TO CONVERT LITERAL: """B>""")')>>

	-->
	<<warn "CONVERSION ERROR cff79c2520e8fc4cb72af924537c6d85">>
	<<if $mod_temp == ''>>
		$exit

	<</if>>
	addqst ' %  / $ % _temp.qsp'
	<<gs 'mod_$mod_temp_setup'>>
	<<if $mod_info[0] == ''>>
		<<msg '<b><<$mod_temp>>.qsp</b> is not a Girl life ECV mod, please contract its author for help'>>
		$exit
	<</if>>
	<<set $mod_list += 1>>
	<<setinit $mod_name[$mod_list] = $mod_info[0]>>
	<<setinit $mod_version[$mod_list] = $mod_info[1]>>
	<<setinit $mod_author[$mod_list] = $mod_info[2]>>
	<<setinit $mod_desc[$mod_list] = $mod_info[3]>>
	<<setinit $mod_opt[$mod_list] = $mod_info[4]>>
	<<gt 'mod_setting'>>
<</actCLA>>
<<if getvar("$mod_list") > 0>>
	<<actCLA '+iif(settingmode = 1, '<center><b>Disable all mods</b></center>','Disable all mods')+'>>
		<<if input('Are you sure? ALL % will be disabled !< $br>>
			<<if getvar("$mod_list") > 0>>
				<<set $mod_i = $mod_list>>
				<<warn 'JUMP MARKER ENCOUNTERED: :'>> % $_data_remover
				<<if $mod_name[$mod_i] != ''>>
					<<set $mod_su_name = 'mod_$mod_name[$mod_i]_onremove'>>
					<<if $LOC($mod_su_name)>>
						<<gs $mod_su_name>>

					<</if>>
				<</if>>
				<<if getvar("$mod_i") > 0>>
					<<set $mod_i -= 1>>
					<<warn 'JUMP COMMAND ENCOUNTERED: jump '>> % _data_remover'
				<</if>>
				<<set $mod_su_name to null>>
				<<set $mod_i to null>>
			<</if>>
			$killqst
			<<set $mod_list = 0>>
			<<set $mod_name to null>>
			<<set $mod_version to null>>
			<<set $mod_author to null>>
			<<set $mod_desc to null>>
			<<set $mod_opt to null>>
			<<msg 'All mod disabled. You can re-install them later.'>>
			<<gt 'mod_setting'>>
		<</if>>
	<</actCLA>>
	<!-- ! Delete single mod-->
	<<actCLA '+iif(settingmode = 1, '<center><b>Uninstall mod</b></center>','Uninstall mod')+'>>
		<<set $mod_temp = input('Input mod name to uninstall (Case Sensetive)')>>
		<<set $mod_removed_temp = 0>>
		<<if $mod_temp != ''>>
			<<set $mod_i = $mod_list>>
			<<warn 'JUMP MARKER ENCOUNTERED: :'>> % $_data_remover
			<<if $mod_name[$mod_i] == $mod_temp>>
				<<set $mod_su_name = 'mod_$mod_name[$mod_i]_onremove'>>
				<<if $LOC($mod_su_name)>>
					<<gs $mod_su_name>>

				<</if>>
				<<set $mod_removed_temp += 1>>
				<<setinit $mod_name_temp[$mod_i] = ''>>
			<<else>>
				<<setinit $mod_name_temp[$mod_i] = $mod_name[$mod_i]>>
				<<setinit $mod_version_temp[$mod_i] = $mod_version[$mod_i]>>
				<<setinit $mod_author_temp[$mod_i] = $mod_author[$mod_i]>>
				<<setinit $mod_desc_temp[$mod_i] = $mod_desc[$mod_i]>>
				<<setinit $mod_opt_temp[$mod_i] = $mod_opt[$mod_i]>>
			<</if>>
			<<if getvar("$mod_i") > 1>>
				<<set $mod_i -= 1>>
				<<warn 'JUMP COMMAND ENCOUNTERED: jump '>> % _data_remover'
			<</if>>
			<<set $mod_su_name to null>>
			<<set $mod_i to null>>
		<</if>>
		<<if getvar("$mod_removed_temp") > 0>>
			$killqst
			<<set $mod_name to null>>
			<<set $mod_version to null>>
			<<set $mod_author to null>>
			<<set $mod_desc to null>>
			<<set $mod_opt to null>>
			<<set $mod_i = 1>>
			<<set $mod_restored_i = 1>>
			<<warn 'JUMP MARKER ENCOUNTERED: :'>> % $_data_restore
			<<if $mod_name_temp[$mod_i] != ''>>
				<<set $mod_name_add_temp = $mod_name_temp[$mod_i]>>
				addqst ' %  / $ % _name_add_temp.qsp'
				<<set $mod_name_add_temp to null>>
				<<setinit $mod_name[$mod_restored_i] = $mod_name_temp[$mod_i]>>
				<<setinit $mod_version[$mod_restored_i] = $mod_version_temp[$mod_i]>>
				<<setinit $mod_author[$mod_restored_i] = $mod_author_temp[$mod_i]>>
				<<setinit $mod_desc[$mod_restored_i] = $mod_desc_temp[$mod_i]>>
				<<setinit $mod_opt[$mod_restored_i] = $mod_opt_temp[$mod_i]>>
				<<set $mod_restored_i += 1>>
			<</if>>
			<<if $mod_i < $mod_list>>
				<<set $mod_i += 1>>
				<<warn 'JUMP COMMAND ENCOUNTERED: jump '>> % _data_restore'
			<</if>>
			<<set $mod_list = $mod_restored_i - 1>>
			<<set $mod_name_temp to null>>
			<<set $mod_version_temp to null>>
			<<set $mod_author_temp to null>>
			<<set $mod_desc_temp to null>>
			<<set $mod_opt_temp to null>>
			<<set $mod_i to null>>
			<<set $mod_restored_i to null>>
			<<if getvar("$mod_removed_temp") > 0>>
				<<msg 'Mod <<$mod_temp>> was disabled.'>>
			<</if>>
		<<else>>
			<<msg 'Mod <<$mod_temp>> was not installed.'>>
		<</if>>
		<<set $mod_removed_temp to null>>
		<<set $mod_temp to null>>
		<<gt 'mod_setting'>>
	<</actCLA>>
<</if>>
