Browse Source

stat_display - add the third way to show row bars - table

rachels 7 years ago
parent
commit
8b6c7717e7
4 changed files with 204 additions and 45 deletions
  1. 1 0
      glife.qproj
  2. 7 3
      locations/Cheatmenu_din
  3. 131 0
      locations/indiktab
  4. 65 42
      locations/stat_display

+ 1 - 0
glife.qproj

@@ -902,6 +902,7 @@
       <Location name="husb"/>
       <Location name="husbSex"/>
       <Location name="indik"/>
+	  <Location name="indiktab"/>
       <Location name="Peterroom"/>
       <Location name="portnoi"/>
       <Location name="portnoi2"/>

+ 7 - 3
locations/Cheatmenu_din

@@ -1294,7 +1294,7 @@ $cheatmenu['display'] = {
 	end
 	nl
 	if Enable_scalepic = 1:
-		pl 'Scalebar as  <a href="exec:Enable_scalepic = 0 & dynamic $cheatmenu[''display'']">Image</a>'
+		pl 'Scalebar is now as <b>Character</b>, you can switch to <a href="exec:Enable_scalepic = 0 & dynamic $cheatmenu[''display'']">Image</a> or <a href="exec:Enable_scalepic = 2 & dynamic $cheatmenu[''display'']">Table</a>'
 		if Enable_scalewidth > 0:
 			pl'Scalebar Width: <a href="exec:input(''Input Scalebar Width (default to 120)'') & dynamic $cheatmenu[''display'']"><<Enable_scalewidth-1>></a>, Set is currently <a href="exec:Enable_scalewidth = 0 & dynamic $cheatmenu[''display'']">ON</a>'
 		else
@@ -1305,14 +1305,18 @@ $cheatmenu['display'] = {
 		else
 			pl'Scalebar Height: Lock is currently <a href="exec:Enable_scaleheight=1+input(''InputS calebar Height (default to 15)'') & dynamic $cheatmenu[''display'']">OFF</a>'
 		end
-	else
-		pl 'Scalebar as <a href="exec:Enable_scalepic = 1 & dynamic $cheatmenu[''display'']">Character</a>'
+	elseif Enable_scalepic = 0:
+		pl 'Scalebar is now as <b>Image</b>, you can switch to <a href="exec:Enable_scalepic = 1 & dynamic $cheatmenu[''display'']">Character</a> or <a href="exec:Enable_scalepic = 2 & dynamic $cheatmenu[''display'']">Table</a>'
 		if cheatStatusBars = 1:
 			pl ' <a href="exec:cheatStatusBars = 0 & dynamic $cheatmenu[''display'']">Switch to larger status bars</a>'
 		else
 			pl ' <a href="exec:cheatStatusBars = 1 & dynamic $cheatmenu[''display'']">Switch to smaller status bars</a>'
 		end
+	elseif Enable_scalepic = 2:
+		pl 'Scalebar is now as <b>Table</b>, you can switch to <a href="exec:Enable_scalepic = 0 & dynamic $cheatmenu[''display'']">Image</a> or <a href="exec:Enable_scalepic = 1 & dynamic $cheatmenu[''display'']">Character</a>'
 	end
+	
+	
 
 }
 

+ 131 - 0
locations/indiktab

@@ -0,0 +1,131 @@
+# indiktab
+! $ARGS[0]
+! ARGS[1] ... percentage
+! ARGS[2] ... real value
+! ARGS[3] ... text for type 3 bar
+
+ap = ARGS[1]
+ar = ARGS[2]
+if ap > 100:ap = 100
+if ap < 0:ap = 0
+$apc = ap
+$apg = 100-ap
+if Enable_Android = 1:
+	$vbcolor = 'gray'
+else
+	$vbcolor = '#d0d0d0'
+end
+
+$vfcolor='rgb(<<(16777216 + bcolor) mod 256>>,<<(16777216 + bcolor)/256 mod 256>>,<<(16777216 + bcolor)/65536>>)'
+
+if $ARGS[0] = '1':
+	if Enable_Android = 1:
+		if ap  >= 65:
+			$vcolor = 'green'
+		elseif ap >= 35:
+			$vcolor = 'blue'
+		else
+			$vcolor = 'red'
+		end
+	else
+		if ap >= 85:
+			$vcolor = 'green'
+		elseif ap >= 70:
+			$vcolor = '#b3b300'
+		elseif ap >= 50:
+			$vcolor = '#00CED1'
+		elseif ap >= 20:
+			$vcolor = 'blue'
+		elseif ap >= 10:
+			$vcolor = '#ff6600'
+		else
+			$vcolor = 'red'
+		end
+	end
+	if ap = 0: $vcolor = $vbcolor
+	if ap = 100: $vbcolor = $vcolor
+	$result = '<TABLE  cellpadding="0" cellspacing="0" width="220"><TR><TD bgcolor="<<$vcolor>>" width="<<$apc>>%"></TD><TD bgcolor="<<$vbcolor>>" width="<<$apg>>%"></TD><TD width="40" align="right"><<ar>></TD></TR></TABLE>'
+end
+
+if $ARGS[0] = '2':
+	if Enable_Android = 1:
+		if ap  >= 85:
+			$vcolor = 'red'
+		elseif ap >= 65:
+			$vcolor = 'orange'
+		elseif ap >= 45:
+			$vcolor = 'yellow>'
+		elseif ap >= 25:
+			$vcolor = 'green'
+		else
+			$vcolor = 'blue'
+		end
+	else
+		if ap >= 90:
+			$vcolor = '#ff0000'
+		elseif ap >= 80:
+			$vcolor = '#ff1a1a'
+		elseif ap >= 70:
+			$vcolor = '#ff3333'
+		elseif ap >= 60:
+			$vcolor = '#ff4d4d'
+		elseif ap >= 50:
+			$vcolor = '#ff6666'
+		elseif ap >= 40:
+			$vcolor = '#ff8080'
+		elseif ap >= 30:
+			$vcolor = '#e68080'
+		elseif ap >= 20:
+			$vcolor = '#cc8080'
+		elseif ap >= 10:
+			$vcolor = '#b38080'
+		else
+			$vcolor = '#998080'
+		end
+	end
+	if ap = 0: $vcolor = $vbcolor
+	if ap = 100: $vbcolor = $vcolor
+	$result = '<font color="<<$vfcolor>>"><TABLE  cellpadding="0" cellspacing="0" width="220"><TR><TD bgcolor="<<$vcolor>>" width="<<$apc>>%"></TD><TD bgcolor="<<$vbcolor>>" width="<<$apg>>%"></TD><TD width="40" align="right"><<ar>></TD></TR></TABLE></font>'
+end
+if $ARGS[0] = '3':
+	ap = ar
+	if Enable_Android = 1:
+		if ap  >= 130:
+			$vcolor = 'green'
+		elseif ap >= 70:
+			$vcolor = 'blue'
+		else
+			$vcolor = 'red'
+		end
+	else
+		if ap < 20:
+			$vcolor = '#b3b300'
+		elseif ap < 60:
+			$vcolor = '#00CED1'
+		elseif ap <= 140:
+			$vcolor = 'blue'
+		elseif ap <= 180:
+			$vcolor = '#00CED1'
+		else
+			$vcolor = '#b3b300'
+		end
+	end
+	if ap < 100:
+		ap = (100-ap)/2
+		apg = 50 - ap
+		$result = '<TABLE  cellpadding="0" cellspacing="0" width="220"><TR><TD bgcolor="<<$vbcolor>>" width="<<apg>>%"></TD><TD bgcolor="<<$vcolor>>" width="<<ap>>%"></TD><TD bgcolor="<<$vbcolor>>" width="50%"><<$ARGS[3]>></TD><TD width="40" align="right">-<<100-ar>></TD></TR></TABLE>'
+	else
+		ap = (ap - 100)/2
+		apg = 50 - ap
+		$result = '<TABLE  cellpadding="0" cellspacing="0" width="220"><TR><TD bgcolor="<<$vbcolor>>" width="50%"><<$ARGS[3]>></TD><TD bgcolor="<<$vcolor>>" width="<<ap>>%"></TD><TD bgcolor="<<$vbcolor>>" width="<<apg>>%"></TD><TD width="40" align="right"><<ar-100>></TD></TR></TABLE>'
+	end
+end
+killvar 'ap'
+killvar 'ar'
+killvar '$apg'
+killvar '$apc'
+killvar '$vcolor'
+killvar '$vfcolor'
+
+--- indiktab ---------------------------------
+

+ 65 - 42
locations/stat_display

@@ -99,6 +99,11 @@ if ETOmenu = 1:
 	$stat_msg += '<BR><b><<$pcs_energy>></b>'
 	$stat_msg += '<BR><b><<$water>></b>'
 	$stat_msg += '<BR><b><<$pcs_sleep>></b>'
+elseif Enable_scalepic = 2:
+$st_temp='rgb(<<(16777216 + fcolor) mod 256>>,<<(16777216 + fcolor)/256 mod 256>>,<<(16777216 + fcolor)/65536>>)'
+$stat_msg += '<p><font color="<<$st_temp>>"><TABLE width="300" cellpadding="1" cellspacing="0"><TR><TD width="85%">'+FUNC('indiktab', '2', pcs_horny, pcs_horny)+'</TD><TD> Arousal</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '2', pain['total'], pain['total'])+'</TD><TD> Pain</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_health * 100 / healthmax, pcs_health)+'</TD><TD> Health</TD></TR>'
+if MagikDostup = 0: $stat_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_manna * 100 / mannamax, pcs_manna)+'</TD><TD> Manna</TD></TR>'
+$stat_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_willpwr * 100 / willpowermax, pcs_willpwr)+'</TD><TD> Willpower</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_stam * 100 / stammax, pcs_stam)+'</TD><TD> Stamina</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_mood, pcs_mood)+'</TD><TD> Mood</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_energy, pcs_energy)+'</TD><TD> Hunger</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_sleep, pcs_sleep)+'</TD><TD> Sleep</TD></TR></TABLE></font></p>'
 else
 	gs 'indik', '2', pcs_horny, pcs_horny
 	$stat_msg += '<BR><<$ind>> Arousal'
@@ -132,56 +137,74 @@ end
 $stat_msg += '<BR>'
 
 if Enable_showattr = 0:
-	$stat_msg += '<BR> <a href="exec:Enable_showattr = 1 & gs ''$menu_obnovit''">Attributes</a>'
+	$stat_msg += '<BR> <a href="exec:Enable_showattr = 1 & gs ''$menu_obnovit''">Attributes</a><BR>'
 end
 if Enable_showattr = 1:
 	$stat_msg += '<BR> <a href="exec:Enable_showattr = 0 & gs ''$menu_obnovit''">Attributes:</a>'
-	gs 'indik','3', 50+(pcs_dom-sub)/2, 50+(pcs_dom-sub)/2
-	$stat_msg += '<BR><<$ind>> Dominance'
-	if pcs_dom > 10:
-		$stat_msg += ' (dominant)'
-	elseif sub > 10:
-		$stat_msg += ' (submissive)'
+	if Enable_scalepic = 2:
+		if pcs_dom > 10:
+			$dom_stat_msg = 'dominant'
+		elseif sub > 10:
+			$dom_stat_msg = 'submissive'
+		else
+			$dom_stat_msg = 'neutral'
+		end
+
+		$stat_msg += '<font color="<<$st_temp>>"><TABLE cellpadding="1" cellspacing="0" width="300"><TR><TD width="85%">'+FUNC('indiktab', '3', 100+pcs_dom-sub, 100+pcs_dom-sub,$dom_stat_msg)+'</TD><TD> Dominance</TD></TR>  <TR><TD width="85%">'+FUNC('indiktab', '1', pcs_stren, pcs_stren)+'</TD><TD> Strength</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_agil, pcs_agil)+'</TD><TD> Agility</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_vital, pcs_vital)+'</TD><TD> Endurance</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_intel, pcs_intel)+'</TD><TD> Intelligence</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_sprt, pcs_sprt)+'</TD><TD> Spirit</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_react, pcs_react)+'</TD><TD nowrap> Mental Agility</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_chrsm, pcs_chrsm)+'</TD><TD> Charisma</TD></TR><TR><TD width="85%">'+FUNC('indiktab', '1', pcs_prcptn, pcs_prcptn)+'</TD><TD> Perception</TD></TR>'
+		if MagikDostup = 0: $stat_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_magik, pcs_magik)+'</TD><TD> Magic</TD></TR>'
+		$stat_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_apprnc / 2, pcs_apprnc)+'</TD><TD> Attractiveness</TD></TR>'
+		if SchoolAtestat = 0 and StoryLine > 0:$stat_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_grades, pcs_grades)+'</TD><TD nowrap> School Grades</TD></TR>'
+		if pcs_exhibition > 0:$stat_msg += '<TR><TD width="85%">'+FUNC('indiktab', '1', pcs_exhibition, pcs_exhibition)+'</TD><TD> Exhibitionism</TD></TR></TABLE></font>'
+		killvar '$dom_stat_msg'
 	else
-		$stat_msg += ' (natural)'
-	end
-	$stat_msg += '<BR>'
-	gs 'indik', '1', pcs_stren, pcs_stren
-	$stat_msg += '<BR><<$ind>> Strength'
-	gs 'indik', '1', pcs_agil, pcs_agil
-	$stat_msg += '<BR><<$ind>> Agility'
-	gs 'indik', '1', pcs_vital, pcs_vital
-	$stat_msg += '<BR><<$ind>> Endurance'
-	gs 'indik', '1', pcs_intel, pcs_intel
-	$stat_msg += '<BR><<$ind>> Intelligence'
-	gs 'indik', '1', pcs_sprt, pcs_sprt
-	$stat_msg += '<BR><<$ind>> Spirit'
-	gs 'indik', '1', pcs_react, pcs_react
-	$stat_msg += '<BR><<$ind>> Mental Agility'
-	gs 'indik', '1', pcs_chrsm, pcs_chrsm
-	$stat_msg += '<BR><<$ind>> Charisma'
-	gs 'indik', '1', pcs_prcptn, pcs_prcptn
-	$stat_msg += '<BR><<$ind>> Perception'
-	if MagikDostup = 0:
-		gs 'indik', '1', pcs_magik, pcs_magik
-		$stat_msg += '<BR><<$ind>> Magic'
-	end
-	gs 'indik', '1', pcs_apprnc / 2, pcs_apprnc
-	$stat_msg += '<BR><<$ind>> Attractiveness'
+		gs 'indik','3', 50+(pcs_dom-sub)/2, 50+(pcs_dom-sub)/2
+		$stat_msg += '<BR><<$ind>> Dominance'
+		if pcs_dom > 10:
+			$stat_msg += ' (dominant)'
+		elseif sub > 10:
+			$stat_msg += ' (submissive)'
+		else
+			$stat_msg += ' (natural)'
+		end
+!		$stat_msg += '<BR>'
+		gs 'indik', '1', pcs_stren, pcs_stren
+		$stat_msg += '<BR><<$ind>> Strength'
+		gs 'indik', '1', pcs_agil, pcs_agil
+		$stat_msg += '<BR><<$ind>> Agility'
+		gs 'indik', '1', pcs_vital, pcs_vital
+		$stat_msg += '<BR><<$ind>> Endurance'
+		gs 'indik', '1', pcs_intel, pcs_intel
+		$stat_msg += '<BR><<$ind>> Intelligence'
+		gs 'indik', '1', pcs_sprt, pcs_sprt
+		$stat_msg += '<BR><<$ind>> Spirit'
+		gs 'indik', '1', pcs_react, pcs_react
+		$stat_msg += '<BR><<$ind>> Mental Agility'
+		gs 'indik', '1', pcs_chrsm, pcs_chrsm
+		$stat_msg += '<BR><<$ind>> Charisma'
+		gs 'indik', '1', pcs_prcptn, pcs_prcptn
+		$stat_msg += '<BR><<$ind>> Perception'
+		if MagikDostup = 0:
+			gs 'indik', '1', pcs_magik, pcs_magik
+			$stat_msg += '<BR><<$ind>> Magic'
+		end
+		gs 'indik', '1', pcs_apprnc / 2, pcs_apprnc
+		$stat_msg += '<BR><<$ind>> Attractiveness'
 	
-	if SchoolAtestat = 0 and StoryLine > 0:
-		gs 'indik', '1', pcs_grades, pcs_grades
-		$stat_msg += '<BR><<$ind>> School Grades'
-	end
-	if pcs_exhibition > 0:
-		gs 'indik', '1', pcs_exhibition, pcs_exhibition
-		$stat_msg += '<BR><<$ind>> exhibitionism'
+		if SchoolAtestat = 0 and StoryLine > 0:
+			gs 'indik', '1', pcs_grades, pcs_grades
+			$stat_msg += '<BR><<$ind>> School Grades'
+		end
+		if pcs_exhibition > 0:
+			gs 'indik', '1', pcs_exhibition, pcs_exhibition
+			$stat_msg += '<BR><<$ind>> exhibitionism'
+		end
+		$stat_msg += '<BR>' 
 	end
 end
-
+killvar '$st_temp'
 !!----------------Mental skills--------------------------
 if Enable_show_mental_skill = 0:
-	$stat_msg += '<BR> <a href="exec:Enable_show_mental_skill = 1 & gs ''$menu_obnovit''">Mental Skills</a>'
+	$stat_msg += ' <a href="exec:Enable_show_mental_skill = 1 & gs ''$menu_obnovit''">Mental Skills</a>'
 end
 if Enable_show_mental_skill = 1:
 	st_count=0
@@ -190,7 +213,7 @@ if Enable_show_mental_skill = 1:
 	if pcs_humint > 0: gs 'show_table', '<<pcs_humint>> People skills', '2'
 	if pcs_persuas > 0: gs 'show_table', '<<pcs_persuas>> Persuasion', '2'
 	if pcs_observ > 0: gs 'show_table', '<<pcs_observ>> Observation', '2'
-	if st_count > 0 :$stat_msg += '<BR> <a href="exec:Enable_show_mental_skill = 0 & gs ''$menu_obnovit''">Mental Skills:</a> <TABLE BORDER=1><<$show_table>></TR></TABLE>'
+	if st_count > 0 :$stat_msg += ' <a href="exec:Enable_show_mental_skill = 0 & gs ''$menu_obnovit''">Mental Skills:</a> <TABLE BORDER=1><<$show_table>></TR></TABLE>'
 end
 
 !!-----------------Sport skills--------------------------