Browse Source

Merge branch 'Edited-TW' into SC-Master

Stephan Fuchs 8 months ago
parent
commit
1712a3bb57
85 changed files with 280 additions and 264 deletions
  1. 4 0
      sugarcube/src/VersionUpdater.js
  2. 5 5
      sugarcube/src/activities/bootycall/booty_call_after.tw
  3. 1 1
      sugarcube/src/activities/bootycall/booty_call_leave.tw
  4. 1 1
      sugarcube/src/activities/bootycall/booty_call_stats.tw
  5. 2 2
      sugarcube/src/activities/bootycall/booty_call_work_talk1.tw
  6. 2 2
      sugarcube/src/activities/phone/phone.tw
  7. 2 2
      sugarcube/src/activities/school/locations/grounds.tw
  8. 1 3
      sugarcube/src/activities/sex/sex.tw
  9. 4 4
      sugarcube/src/activities/sleep/sleep.tw
  10. 1 1
      sugarcube/src/activities/sleep/sleep_prepare.tw
  11. 1 1
      sugarcube/src/activities/sleep/wake.tw
  12. 1 1
      sugarcube/src/autogenerated/unsorted/Komp.tw
  13. 2 2
      sugarcube/src/autogenerated/unsorted/buklinik.tw
  14. 1 1
      sugarcube/src/autogenerated/unsorted/cikl.tw
  15. 2 2
      sugarcube/src/autogenerated/unsorted/dina.tw
  16. 1 1
      sugarcube/src/autogenerated/unsorted/dreams.tw
  17. 1 1
      sugarcube/src/autogenerated/unsorted/fit.tw
  18. 1 1
      sugarcube/src/autogenerated/unsorted/food_menu.tw
  19. 1 1
      sugarcube/src/autogenerated/unsorted/foto_albums.tw
  20. 1 1
      sugarcube/src/autogenerated/unsorted/foto_events.tw
  21. 3 3
      sugarcube/src/autogenerated/unsorted/gdksport.tw
  22. 3 3
      sugarcube/src/autogenerated/unsorted/hookup.tw
  23. 1 1
      sugarcube/src/autogenerated/unsorted/hookup_after.tw
  24. 1 1
      sugarcube/src/autogenerated/unsorted/hookup_morning.tw
  25. 1 1
      sugarcube/src/autogenerated/unsorted/journal.tw
  26. 2 2
      sugarcube/src/autogenerated/unsorted/mainQW.tw
  27. 2 2
      sugarcube/src/autogenerated/unsorted/miroslava.tw
  28. 4 4
      sugarcube/src/autogenerated/unsorted/model_mari.tw
  29. 14 14
      sugarcube/src/autogenerated/unsorted/pav_aptcourtev.tw
  30. 2 2
      sugarcube/src/autogenerated/unsorted/placer_sex.tw
  31. 5 5
      sugarcube/src/autogenerated/unsorted/sex_ev_after.tw
  32. 10 10
      sugarcube/src/autogenerated/unsorted/sex_ev_condoms.tw
  33. 4 4
      sugarcube/src/autogenerated/unsorted/sex_ev_foreplay.tw
  34. 1 1
      sugarcube/src/autogenerated/unsorted/sex_ev_leave.tw
  35. 32 32
      sugarcube/src/autogenerated/unsorted/sex_ev_sex.tw
  36. 1 1
      sugarcube/src/autogenerated/unsorted/sex_ev_stats.tw
  37. 2 2
      sugarcube/src/autogenerated/unsorted/sex_ev_work_talk1.tw
  38. 1 1
      sugarcube/src/autogenerated/unsorted/sexshop.tw
  39. 1 1
      sugarcube/src/autogenerated/unsorted/soniadisco.tw
  40. 12 12
      sugarcube/src/autogenerated/unsorted/stat_display.tw
  41. 1 3
      sugarcube/src/autogenerated/unsorted/test.tw
  42. 2 2
      sugarcube/src/autogenerated/unsorted/tobiQW.tw
  43. 1 1
      sugarcube/src/autogenerated/unsorted/uni_admin.tw
  44. 1 1
      sugarcube/src/autogenerated/unsorted/uni_library.tw
  45. 1 1
      sugarcube/src/events/street_event.tw
  46. 11 1
      sugarcube/src/js/mergedeep.js
  47. 1 1
      sugarcube/src/locations/brothel.tw
  48. 5 5
      sugarcube/src/locations/city/city_coffee_hole.tw
  49. 1 1
      sugarcube/src/locations/city/city_drugden.tw
  50. 2 2
      sugarcube/src/locations/city/city_industrial.tw
  51. 1 1
      sugarcube/src/locations/city/city_island.tw
  52. 2 2
      sugarcube/src/locations/city/city_sauna.tw
  53. 27 27
      sugarcube/src/locations/pavlov/disco/pav_disco.tw
  54. 2 2
      sugarcube/src/locations/pavlov/gkafe.tw
  55. 1 1
      sugarcube/src/locations/pavlov/hotel/pav_hotel.tw
  56. 3 3
      sugarcube/src/locations/pavlov/lake/pav_lake.tw
  57. 1 1
      sugarcube/src/locations/pavlov/lake/pav_lake_nude.tw
  58. 1 1
      sugarcube/src/locations/pavlov/pav_clinic.tw
  59. 1 1
      sugarcube/src/locations/pavlov/pav_commercial.tw
  60. 3 3
      sugarcube/src/locations/pavlov/pav_library.tw
  61. 4 4
      sugarcube/src/locations/pavlov/pav_park.tw
  62. 1 1
      sugarcube/src/locations/pavlov/pav_train_hall.tw
  63. 3 3
      sugarcube/src/locations/pavlov/residential/pav_complex.tw
  64. 3 3
      sugarcube/src/locations/pavlov/residential/pav_residential.tw
  65. 6 1
      sugarcube/src/macros/0macros.twee-config.json
  66. 1 1
      sugarcube/src/macros/debug.tw
  67. 3 3
      sugarcube/src/menu/characterOverview.tw
  68. 26 13
      sugarcube/src/npcs/_system/NPCsDict.js
  69. 2 2
      sugarcube/src/npcs/katja/katja_chat.tw
  70. 3 3
      sugarcube/src/npcs/martin/MartinTalk.tw
  71. 1 1
      sugarcube/src/npcs/nicholas/nichApartment.tw
  72. 14 1
      sugarcube/src/start/characterSelect.tw
  73. 0 2
      sugarcube/src/start/city/deprecated/intro_city_m.tw
  74. 1 1
      sugarcube/src/start/city/deprecated/intro_city_select.tw
  75. 0 3
      sugarcube/src/start/city/deprecated/intro_city_tg.tw
  76. 1 1
      sugarcube/src/start/city/deprecated/intro_initialization_city.tw
  77. 0 3
      sugarcube/src/start/city/intro_city.tw
  78. 0 2
      sugarcube/src/start/intro_sg_m.tw
  79. 0 3
      sugarcube/src/start/intro_sg_tg.tw
  80. 0 3
      sugarcube/src/start/scenario_selection.tw
  81. 5 5
      sugarcube/src/start/schoolgirl/intro_sg_select_char.tw
  82. 0 2
      sugarcube/src/start/uni/intro_uni.tw
  83. 0 4
      sugarcube/src/start/uni/intro_uni_m.tw
  84. 0 3
      sugarcube/src/start/uni/intro_uni_tg.tw
  85. 1 1
      sugarcube/src/version.js

+ 4 - 0
sugarcube/src/VersionUpdater.js

@@ -50,6 +50,10 @@ setup.versionUpdate = function(fromVersion,variables=null){
 		variables.phone = new setup.Phone();
 		variables.time._timedEvents = {_system:{nextId:0},events:{}};
 	}
+
+	if(fromVersion < 19){
+		variables.startCharacter = 'sg_starting_category';	//Not very accurate, but good enough
+	}
 	
 
     variables.version = Config.saves.version;

+ 5 - 5
sugarcube/src/activities/bootycall/booty_call_after.tw

@@ -114,7 +114,7 @@
 		<<gs 'booty_call_after' 'after_sex1'>>
 		<<gs 'booty_call_after' 'well_continue'>>
 	<</actCLA>>
-	<<if mid($start_type,1,2) == 'sg' and ($time.hour >= 22 or $time.hour < 3)>>
+	<<if setup.startingCharacterTagsIncludes('sg') and ($time.hour >= 22 or $time.hour < 3)>>
 		<<actCLA 'Mom will kill me'>>
 			<<setinit $booty_call['mom_kill'] += 1>>
 			<<setinit $booty_call['blue_ball'] = 1>>
@@ -542,7 +542,7 @@
 					<p>"Because I want to," you scowl at him. "I have to explain what I want to do with <i>my</i> body?"</p>
 					<<gs 'booty_call_after' 'after_sex1'>>
 				<</actCLA>>
-				<<if mid($start_type,1,2) == 'sg'>>
+				<<if setup.startingCharacterTagsIncludes('sg')>>
 					<<actCLA 'Ask my mom'>>
 						"I don't know," you say, rolling your eyes in exhasperation. "Ask my mom why it's so important."
 						<<gs 'booty_call_after' 'after_sex1'>>
@@ -1451,7 +1451,7 @@
 				<p>"Mind if I spend the night?" you ask. "I don't feel like going home tonight."</p>
 				<<gs 'booty_call_after' 'spend_night'>>
 			<</actCLA>>
-			<<if mid($start_type,1,2) == 'sg'>>
+			<<if setup.startingCharacterTagsIncludes('sg')>>
 				<<actCLA 'I`m sick of my mom'>>
 					<<=$npcs.get($sex.npcId,'apt_bedroom')>>
 					<p>"Mind if I spend the night?" you ask. "My mom has been such a bitch lately and I don't want to see her."</p>
@@ -1459,7 +1459,7 @@
 				<</actCLA>>
 			<</if>>
 			<<if $time.hour < 5>>
-				<<if mid($start_type,1,2) == 'sg'>>
+				<<if setup.startingCharacterTagsIncludes('sg')>>
 					<<actCLA 'Avoid my mom'>>
 						<<=$npcs.get($sex.npcId,'apt_bedroom')>>
 						<p>"Mind if I spend the night?" you ask. "If I go home now, my mom will chew me out for coming back to late. She'll still chew me out later, but I don't want to deal with it right now."</p>
@@ -1616,7 +1616,7 @@
 		<<else>>
 			<<gs 'sleep' 'simple'>>
 		<</if>>
-		<<if mid($start_type,1,2) == 'sg' and func('homes_properties', 'has_access', 'homeParents')>>
+		<<if setup.startingCharacterTagsIncludes('sg') and func('homes_properties', 'has_access', 'homeParents')>>
 			<<setinit $sveta_punishment['no_come_home'] = 1>>
 
 		<</if>>

+ 1 - 1
sugarcube/src/activities/bootycall/booty_call_leave.tw

@@ -579,7 +579,7 @@
 	<</if>>
 <</if>>
 <<if $location_var[$here][0] == 'mom_late'>>
-	<<if mid($start_type,1,2) == 'sg' and $time.hour >= 20>>
+	<<if setup.startingCharacterTagsIncludes('sg') and $time.hour >= 20>>
 		<<actCLA 'Mom will kill me'>>
 			<<setinit $booty_call['mom_kill'] = 1>>
 			<<gs 'booty_call_leave' 'dress_loop'>>

+ 1 - 1
sugarcube/src/activities/bootycall/booty_call_stats.tw

@@ -90,7 +90,7 @@
 		<<setn $npc_sleep_fuck += 1>>
 
 	<</if>>
-	<<if $time.hour >= 8 and $time.hour < 14 and $time.weekday < 6 and mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and $time.isSchoolHoliday == 0 and $schoolProgulDay != $time.daystart>>
+	<<if $time.hour >= 8 and $time.hour < 14 and $time.weekday < 6 and setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and $time.isSchoolHoliday == 0 and $schoolProgulDay != $time.daystart>>
 		<!-- !!absence from school-->
 		<<run $npcs.set($sex.npcId,'school_absences',$schoolprogul)>>
 	<</if>>

+ 2 - 2
sugarcube/src/activities/bootycall/booty_call_work_talk1.tw

@@ -105,7 +105,7 @@
 				<p>"I work at the textile factory," <<npc $sex.npcId>><</npc>> says.</p>
 			<<else>>
 				<p>"I work at the textile factory in the next town over," <<npc $sex.npcId>><</npc>> says.</p>
-				<<if mid($start_type,1,2) == 'sg'>>
+				<<if setup.startingCharacterTagsIncludes('sg')>>
 					<p>"The one in Pavlovsk?"</p>
 					<p>"Yeah, how'd you know?"</p>
 					"I grew up in Pav."
@@ -226,7 +226,7 @@
 			<<else>>
 				<<if $npcs.get($sex.npcId,'crime_type') == 'drug_dealer'>>
 					<p>"I work in pharmaceuticals," <<npc $sex.npcId>><</npc>> says.</p>
-					<<if mid($start_type,1,2) == 'sg'>>
+					<<if setup.startingCharacterTagsIncludes('sg')>>
 						"That's cool. My aunt is a pharmacist too."
 						"Oh. Good to know."
 					<<else>>

+ 2 - 2
sugarcube/src/activities/phone/phone.tw

@@ -1411,7 +1411,7 @@
 		<<set $calendarday += $list + 'Unity Day'>>
 
 	<</if>>
-	<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 		<<if getvar("$m1") == 1 and getvar("$d1") == 1>>
 			<<set $calendarday += $list + 'First day of Winter break.'>>
 
@@ -1597,7 +1597,7 @@
 
 	-->
 	<<warn "CONVERSION ERROR 5facac3565a1be3d0f42b2c32934d228">>
-	<<if $d1 == $nyp_day and getvar("$m1") == 12 and getvar("$SchoolAtestat") == 0 and mid($start_type,1,2) == 'sg'>>
+	<<if $d1 == $nyp_day and getvar("$m1") == 12 and getvar("$SchoolAtestat") == 0 and setup.startingCharacterTagsIncludes('sg')>>
 		<<set $calendarday += $list + 'New Year's party at 14:00!'>>
 
 	<</if>>

+ 2 - 2
sugarcube/src/activities/school/locations/grounds.tw

@@ -227,7 +227,7 @@
 		<</actCLA>>
 
 	<</if>>
-	<<if $time.weekday == 6 and $time.hour == 8 and mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and getvar("$detention_set") == 1 and getvar("$SchoolBlock") == 0>>
+	<<if $time.weekday == 6 and $time.hour == 8 and setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and getvar("$detention_set") == 1 and getvar("$SchoolBlock") == 0>>
 		<<actCLA 'Go to detention'>>
 			<<gt 'gschool_detention' 'start'>>
 		<</actCLA>>
@@ -513,7 +513,7 @@
 	<<elseif ($wardrobe.clothingworntype != 'danilovich_outfits' or $wardrobe.shoeworntype != 'danilovich')>>
 		You could go for a run here if you were wearing sports clothes and shoes.
 	<</if>>
-	<<if $time.hour >= 9 and $time.hour < 18 and mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and $time.isSchoolHoliday == 0>>
+	<<if $time.hour >= 9 and $time.hour < 18 and setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and $time.isSchoolHoliday == 0>>
 		'With the school open, you can go to the <<link 'changing rooms'>><<setn $time.minutes += 1>><<gt  'school_grounds'  'change_room'>><</link>> by the gym and change your outfit.'
 
 	<</if>>

+ 1 - 3
sugarcube/src/activities/sex/sex.tw

@@ -1,9 +1,7 @@
 :: sex_test[event]
-	<<act 'Test'>><<gt 'sex' 'A41'>><</act>>
-
 	<<act 'Test2'>>
 		<<set $sex = new setup.Sex({
-			npcId: 'A41'
+			npcId: $npcs.ids({gender:0,age:{filter:'minMax',min:18,max:100}}).pluck()
 		})>>
 
 		<<gt 'sex_ev_foreplay' 'undress'>>

+ 4 - 4
sugarcube/src/activities/sleep/sleep.tw

@@ -407,9 +407,9 @@
 	<font color="red"><b>You also feel that both are <i>permanent</i> choices.</b></font>
 	<<actCLA 'Try to ignore it and go to sleep'>>
 		<<if getvar("$disable_autosave") == 0>>
-			<<if mid($start_type,1,4) == 'city'>>
+			<<if setup.startingCharacterTagsIncludes('city')>>
 				savegame 'autosave_city.sav'
-			<<elseif mid($start_type,1,3) == 'uni'>>
+			<<elseif setup.startingCharacterTagsIncludes('uni')>>
 				savegame 'autosave_uni.sav'
 			<<else>>
 				savegame 'autosave_sg.sav'
@@ -438,9 +438,9 @@
 	<<set $time.minutes += 5>>
 	<<actCLA 'Go to sleep'>>
 		<<if getvar("$disable_autosave") == 0>>
-			<<if mid($start_type,1,4) == 'city'>>
+			<<if setup.startingCharacterTagsIncludes('city')>>
 				savegame 'autosave_city.sav'
-			<<elseif mid($start_type,1,3) == 'uni'>>
+			<<elseif setup.startingCharacterTagsIncludes('uni')>>
 				savegame 'autosave_uni.sav'
 			<<else>>
 				savegame 'autosave_sg.sav'

+ 1 - 1
sugarcube/src/activities/sleep/sleep_prepare.tw

@@ -30,7 +30,7 @@
 
 	<<set $pc.pcs_hairbsh = 0>>
 	<<run $pc.painSet('killer',0)>>
-	<!--<<if mid($start_type,1,2) == 'sg' and $loc != 'bedrPar' and getvar("$SchoolAtestat") == 0>>
+	<!--<<if setup.startingCharacterTagsIncludes('sg') and $loc != 'bedrPar' and getvar("$SchoolAtestat") == 0>>
 		<<set $notathomesleep += 1>>
 	<<else>>
 		<<set $notathomesleep = 0>>

+ 1 - 1
sugarcube/src/activities/sleep/wake.tw

@@ -19,7 +19,7 @@
 		<<set $time.minutes += 10>>
 		<<gt $location>>
 	<</actCLA>>
-	<!--<<if mid($start_type,1,2) == 'sg' and getvar("$locat['Fam_inGad']") == 0 and getvar("$motherQW['bathroom_dildos']") > 0 and $MarishaQW["marisha_sleepover"] == 0>>
+	<!--<<if setup.startingCharacterTagsIncludes('sg') and getvar("$locat['Fam_inGad']") == 0 and getvar("$motherQW['bathroom_dildos']") > 0 and $MarishaQW["marisha_sleepover"] == 0>>
 		<<gt 'mother_sextalk' 'dildo_wakeup1'>>
 
 	<</if>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/Komp.tw

@@ -158,7 +158,7 @@
 <</actCLA>>
 
 		<</if>>
-		<<if (mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0) or func('uniutil', 'student', 'enrolled')>>
+		<<if (setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0) or func('uniutil', 'student', 'enrolled')>>
 			<<actCLA 'Spend time studying'>>
 	<<gt 'komp' 'study'>>
 <</actCLA>>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/buklinik.tw

@@ -72,7 +72,7 @@
 	<center><b>Entrance</b></center>
 	<<image "locations/city/industrial/mercyclinic/bukli_holl.jpg">>
 	The interior is even worse than the exterior, the paint on the wall is falling off and hasn''t been repainted for quite a while. There are some lights working but not all of them and there is this weird smell that you can't really pinpoint what it is.
-	<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and $time.isSchoolHoliday == 0 and $time.weekday < 6 and getvar("$bumtolik") >= 5>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and $time.isSchoolHoliday == 0 and $time.weekday < 6 and getvar("$bumtolik") >= 5>>
 		You can volunteer here on the weekends.
 	<<else>>
 		<<if getvar("$bumtolik") > 4>>
@@ -129,7 +129,7 @@
 	<center><b>Counter</b></center>
 	<<image "locations/city/industrial/mercyclinic/bukli_reg.jpg">>
 	As you approach the counter there are two women chatting with each other, and laughing.
-	<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and getvar("$bumtolik") < 5>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and getvar("$bumtolik") < 5>>
 		<!-- !r125-->
 		<p>You clear you throat, "Hello, my name is $pc.name_first, I found a note that you were looking for volunteers..."</p>
 		One of the women cheerfully replies, "Welcome to our little humble shelter. As you've probably noticed the place is run down and we're really in need of some volunteers." They point further down the corridor, "What you see here is just a small part of the operation that we provide. We also help out with the elderly and the less fortunate outside the shelter."

+ 1 - 1
sugarcube/src/autogenerated/unsorted/cikl.tw

@@ -1011,7 +1011,7 @@
 	<<setinit $suspended['on'] = 0>>
 
 <</if>>
-<<if mid($start_type,1,2) == 'sg'>>
+<<if setup.startingCharacterTagsIncludes('sg')>>
 	<!-- !!Party refresh if you didn''t see sis-->
 	<<if $time.weekday == 1 and getvar("$sisboyparty") != 2>>
 		<<if getvar("$sisterQW['party']") == -1>>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/dina.tw

@@ -78,7 +78,7 @@
 <</widget>>
 :: brodilr_macro[widget]
 <<widget 'brodilr'>>
-	<<if mid($start_type,1,2) == 'sg' and getvar("$accessible_property['homeParents']") == 4>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$accessible_property['homeParents']") == 4>>
 		<<gt 'pav_residential'>>
 	<<elseif getvar("$accessible_property['old_town_apartment']") == 1>>
 		<<gt 'pushkin_sq'>>
@@ -102,7 +102,7 @@
 		<<gt 'sitr' 'start'>>
 	<<elseif getvar("$accessible_property['old_town_apartment']") == 1>>
 		<<gt 'sitr2x' 'start'>>
-	<<elseif mid($start_type,1,2) == 'sg' and getvar("$accessible_property['homeParents']") == 4>>
+	<<elseif setup.startingCharacterTagsIncludes('sg') and getvar("$accessible_property['homeParents']") == 4>>
 		<<gt 'sitrPar'>>
 	<<else>>
 		<<gt 'city_residential' 'start'>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/dreams.tw

@@ -8,7 +8,7 @@
 		Today you had a very strange dream: You were blindfolded, having sex with a stranger. After the two of you are done you remove the blindfold and recognize the stranger to be your stepfather.
 		<<set $pc.horny = 100>>
 		<<set $stepdadqw += 1>>
-	<<elseif getvar("$canBraidHair") == 0 and mid($start_type,1,2) != 'sg' and $pc.pcs_hairlng > 80>>
+	<<elseif getvar("$canBraidHair") == 0 and !setup.startingCharacterTagsIncludes('sg') and $pc.pcs_hairlng > 80>>
 		<<set $canBraidHair = 1>>
 		<<image "characters/pavlovsk/resident/anya/braid.jpg">>
 		You dream about the time your sister taught you how to braid your hair. She was happy to help you out and teach you how to do it, it was one of your more memorable sister bonding moments the two of you had not long before you moved out.

+ 1 - 1
sugarcube/src/autogenerated/unsorted/fit.tw

@@ -328,7 +328,7 @@
 		Your existing subscription package is valid for <<abonement>> more classes.
 
 	<</if>>
-	<<if mid($start_type,1,2) == 'sg'>>
+	<<if setup.startingCharacterTagsIncludes('sg')>>
 		<<if $time.hour >= 10 and $time.hour < 12 and $time.weekday == 7 and getvar("$centr") == 1>>
 			In the hall you see <<link "Mikhail Nikolaevich">><<gt 'VolleyTrenCentr'>><</link>> talking with a strange man.
 

+ 1 - 1
sugarcube/src/autogenerated/unsorted/food_menu.tw

@@ -64,7 +64,7 @@
 	<h2>Borislav''s cafe</h2>
 	<center><img <<$set_imgh>> src="images/shared/menus/borislav.jpg"</center><br>
 	<!-- !'<center><img <<$set_imgh>> src="images/shared/drinks/cafedrinks.jpg"</center><br>'-->
-	<<if mid($start_type,1,2) == 'sg' and func('homes_properties', 'has_access', 'homeParents')>>
+	<<if setup.startingCharacterTagsIncludes('sg') and func('homes_properties', 'has_access', 'homeParents')>>
 		<<set $_eat['0,name'] = 'Vegetarian Piroshki'>>
 		<<set $_eat['0,type'] = 'pirosh'>>
 		<<set $_eat['0,price'] = 'Free'>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/foto_albums.tw

@@ -288,7 +288,7 @@
 	<<if getvar("$anushka['model']") >= 1>>
 		You open up the ninth album and browse through some of the pictures of Anushka placed inside. Well she did say she modeled here, so you are not really surprised to see a album of her here.
 		The photo''s all seem to be single pictures taken from past photo shoots.
-	<<elseif mid($start_type,1,2) == 'sg'>>
+	<<elseif setup.startingCharacterTagsIncludes('sg')>>
 		<<setinit $anushka['model'] = 1>>
 		<p>You open up the ninth album and are surprised to see pictures of Anushka placed inside. She is one of the prettier girls in school and it is not surprising she would like being a model, she loves attention, still you are surprised no one has mentioned it at school, surely someone else has to know right?</p>
 		The photo''s all seem to be single pictures taken from past photo shoots.

+ 1 - 1
sugarcube/src/autogenerated/unsorted/foto_events.tw

@@ -2115,7 +2115,7 @@
 								<<set $finances.cash += $modelpayfin>>
 								<<setinit $modelfoto['earnings'] += $modelpayfin>>
 								<<image "locations/city/citycenter/photo/foto.jpg">>
-								<<if mid($start_type,1,2) == 'sg' and getvar("$pc.age") < 18>>
+								<<if setup.startingCharacterTagsIncludes('sg') and getvar("$pc.age") < 18>>
 									<p>Another hour later, the show is over, the clothes are taken back, and you're left naked in the studio, counting the modelpayfin <b>₽</b> you've been paid and musing over the happenings of the night. Working the runway isn't too bad. But at the same time, this kind of thing has the tendency to circle around and you <i>really</i> hope nobody in Pavlovsk hears about this...</p>
 									<<actCLA 'Back in the studio'>>
 										<<gt 'foto' 'studio'>>

+ 3 - 3
sugarcube/src/autogenerated/unsorted/gdksport.tw

@@ -66,7 +66,7 @@
 		<<gt 'wardrobe' 'start'>>
 	<</actCLA>>
 	<<gs 'wardrobe' 'default_sport_options'>>
-	<<if $inventory.get("shampoo") > 0 or (mid($start_type,1,2) == 'sg' and (getvar("$SchoolAtestat") == 0 or getvar("$SchoolBlock") == 0))>>
+	<<if $inventory.get("shampoo") > 0 or (setup.startingCharacterTagsIncludes('sg') and (getvar("$SchoolAtestat") == 0 or getvar("$SchoolBlock") == 0))>>
 		<<actCLA 'Take a shower'>>
 			<<gt 'gdksport' 'shower'>>
 		<</actCLA>>
@@ -361,7 +361,7 @@
 		You take a lesson in modern dance, which is very popular with people your age.
 		There is nothing you can learn from this dance class with your current skill. You need to find a new teacher or travel to the city to find better dance classes if you wish to improve further, it is still good exercise.
 		<<actCLA 'Leave'>>
-			<<if getvar("$AlbinaQW['StarletsJoined']") == 0 and getvar("$AlbinaQW['StarletsShutDown']") == 0 and mid($start_type,1,2) == 'sg' and ($time.month < 10 or ($time.month == 10 and $time.day < 18))>>
+			<<if getvar("$AlbinaQW['StarletsJoined']") == 0 and getvar("$AlbinaQW['StarletsShutDown']") == 0 and setup.startingCharacterTagsIncludes('sg') and ($time.month < 10 or ($time.month == 10 and $time.day < 18))>>
 				<<if getvar("$alterstrtimg") == 13>>
 					<<gt 'albina_starlets' 'albina3'>>
 				<<elseif ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks')) and $npcs.get('A23','rel') >= 60>>
@@ -673,7 +673,7 @@
 <<if $location_var[$here][0] == 'shower'>>
 	<<set $menu_off = 1>>
 	<<set $location_type = 'bathroom'>>
-	<<if mid($start_type,1,2) == 'sg' and (getvar("$SchoolAtestat") == 0 or getvar("$SchoolBlock") == 0)>>
+	<<if setup.startingCharacterTagsIncludes('sg') and (getvar("$SchoolAtestat") == 0 or getvar("$SchoolBlock") == 0)>>
 		<<set $noShampoo = 1>>
 
 	<</if>>

+ 3 - 3
sugarcube/src/autogenerated/unsorted/hookup.tw

@@ -429,7 +429,7 @@
 						<<gs 'hookup' 'generous_lick'>>
 					<<else>>
 						<p>"Saving yourself for marriage but still give blowjobs to strangers?" he asks pointedly.</p>
-						<<if mid($start_type,1,2) == 'sg'>>
+						<<if setup.startingCharacterTagsIncludes('sg')>>
 							"I don't know," you shrug. "Ask my mom why it matters so much."
 						<<else>>
 							<p>You shrug. "I'm still a virgin aren't I?"</p>
@@ -482,7 +482,7 @@
 						<<gs 'hookup' 'generous_lick'>>
 					<<else>>
 						<p>"Saving yourself for marriage but still give blowjobs to strangers?" he asks pointedly.</p>
-						<<if mid($start_type,1,2) == 'sg'>>
+						<<if setup.startingCharacterTagsIncludes('sg')>>
 							"I don't know. Ask my mom why it matters so much," you shrug.
 						<<else>>
 							<p>You shrug. "I'm still a virgin aren't I?"</p>
@@ -622,7 +622,7 @@
 						"Sorry, but I'm saving myself for marriage," you say apologetically, reaching for your clothes.
 						<<if rand(0,1) == 1>>
 							<p>"Saving yourself for marriage but still give blowjobs to strangers?" he asks pointedly.</p>
-							<<if mid($start_type,1,2) == 'sg'>>
+							<<if setup.startingCharacterTagsIncludes('sg')>>
 								"I don't know. Ask my mom why it matters so much," you shrug.
 							<<else>>
 								<p>You shrug. "I'm still a virgin aren't I?"</p>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/hookup_after.tw

@@ -2042,7 +2042,7 @@
 	<<else>>
 		<<gs 'sleep' 'simple'>>
 	<</if>>
-	<<if mid($start_type,1,2) == 'sg' and func('homes_properties', 'has_access', 'homeParents')>>
+	<<if setup.startingCharacterTagsIncludes('sg') and func('homes_properties', 'has_access', 'homeParents')>>
 		<<setinit $sveta_punishment['no_come_home'] = 1>>
 
 	<</if>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/hookup_morning.tw

@@ -195,7 +195,7 @@
 	end
 	else
 	end} -->
-	<<if mid($start_type,1,2) == 'sg'>>
+	<<if setup.startingCharacterTagsIncludes('sg')>>
 		<<actCLA 'Mom!'>>
 			<<gt 'hookup_morning' 'mom'>>
 		<</actCLA>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/journal.tw

@@ -774,7 +774,7 @@
 	<</if>>
 	<br><center><<link "Locations">><<gs 'journal' 'locations'>><</link>></center>
 	<br><center><<link "Friends & Family">><<gs 'journal' 'friends_family'>><</link>></center>
-	<<if getvar("$SchoolAtestat") == 0 and mid($start_type,1,2) == 'sg' and getvar("$SchoolBlock") == 0>>
+	<<if getvar("$SchoolAtestat") == 0 and setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolBlock") == 0>>
 		<br><center><<link "School">><<gs 'journal_school' 'school'>><</link>></center><br><center><<link "School Courses and Grades">><<gs 'journal_school' 'coursesinfo'>><</link>></center>
 
 	<</if>>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/mainQW.tw

@@ -51,9 +51,9 @@ You sit in the back seat of the black jeep, Gustav starts to drive while Tatiana
 				"Now you should go, Gustav will drive you home."
 				<<actCLA 'Leave'>>
 					<<set $time.minutes += 15>>
-					<<if mid($start_type,1,4) == 'city'>>
+					<<if setup.startingCharacterTagsIncludes('city')>>
 						<<gt 'city_residential'>>
-					<<elseif mid($start_type,1,3) == 'uni'>>
+					<<elseif setup.startingCharacterTagsIncludes('uni')>>
 						<<gt 'city_island'>>
 					<<else>>
 						<<gt 'pav_residential'>>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/miroslava.tw

@@ -556,7 +556,7 @@
 				<</actCLA>>
 			<</if>>
 		<</if>>
-		<<if $npcs.get('A60','rel') >= 15 and getvar("$MiraLoc") != 3 and ($npcs.get('A63','QW') < 11 or $npcs.get('A60','QW') >= 11 or getvar("$mirasex") > 1) and mid($start_type,1,2) == 'sg' and getvar("$grandmaQW['block']") == 0>>
+		<<if $npcs.get('A60','rel') >= 15 and getvar("$MiraLoc") != 3 and ($npcs.get('A63','QW') < 11 or $npcs.get('A60','QW') >= 11 or getvar("$mirasex") > 1) and setup.startingCharacterTagsIncludes('sg') and getvar("$grandmaQW['block']") == 0>>
 			<<if getvar("$mira_guest") == 0>>
 				<<actCLA 'Invite to your grandparent`s'>>
 					<<set $menu_off = 1>>
@@ -638,7 +638,7 @@
 			<</if>>
 		<</if>>
 		<<if $npcs.get('A60','rel') >= 15 and getvar("$Mira_no") == 0 and ($npcs.get('A63','QW') < 11 or $npcs.get('A60','QW') >= 11 or getvar("$mirasex") > 1)>>
-			<<if getvar("$mira_guest") == 0 and getvar("$mira_temp") >= 1 and getvar("$mira_temp") <= 2 and getvar("$mira_go_blok") == 0 and getvar("$MiraLoc") != 3 and mid($start_type,1,2) == 'sg' and getvar("$grandmaQW['block']") == 0>>
+			<<if getvar("$mira_guest") == 0 and getvar("$mira_temp") >= 1 and getvar("$mira_temp") <= 2 and getvar("$mira_go_blok") == 0 and getvar("$MiraLoc") != 3 and setup.startingCharacterTagsIncludes('sg') and getvar("$grandmaQW['block']") == 0>>
 				<<set $menu_off = 1>>
 				<<set $time.minutes += 1>>
 				<<if getvar("$MiraLoc") == 1>>

+ 4 - 4
sugarcube/src/autogenerated/unsorted/model_mari.tw

@@ -107,7 +107,7 @@
 	<<gs 'model_mari' 'mari_1.2'>>
 <</if>>
 <<if $location_var[$here][0] == 'mari_1.2'>>
-	<<if mid($start_type,1,2) == 'sg'>>
+	<<if setup.startingCharacterTagsIncludes('sg')>>
 		<<actCLA '"You`re from Gadukino?"'>>
 			 			<<image "characters/city/models/mari/meeting/4a.jpg">>
 			<p>"You're from Gadukino?" you exclaim. "My grandparents live in Gadukino! I'm from Pavlovsk right down the road!"</p>
@@ -397,7 +397,7 @@
 	<<image "characters/city/models/mari/talking/reading3.jpg">>
 	<p>"Any siblings Mari?"</p>
 	<p>"No, none for me. I'm an only child. What about you?"</p>
-	<<if mid($start_type,1,2) == 'sg'>>
+	<<if setup.startingCharacterTagsIncludes('sg')>>
 		<<if $npcs.get('A34','rel') < 20>>
 			<p>"Yeah, I've got two. My sister who's about the same age as you are and my stupid little brother. He's such a pain in the ass!"</p>
 			<p>Mari sits up a bit. "Really? What's so bad about him?"</p>
@@ -826,7 +826,7 @@
 	<</actCLA>>
 <</if>>
 <<if $location_var[$here][0] == 'mari_parents'>>
-	<<if getvar("$mari['parent_ask']") < 1 and mid($start_type,1,2) == 'sg'>>
+	<<if getvar("$mari['parent_ask']") < 1 and setup.startingCharacterTagsIncludes('sg')>>
 		<<actCLA 'Ask about her parents'>>
 			<<setinit $mari['parent_ask'] = 1>>
 			<<image "characters/city/models/mari/talking/reading2.jpg">>
@@ -925,7 +925,7 @@
 						<<actCLA 'I`m age.'>>
 							<<image "characters/city/models/mari/talking/reading2.jpg">>
 							"I'm $pc.age. I didn''t work here when I was still underage, but I still needed the fake to buy booze and stuff," you grin.
-							<<if mid($start_type,1,2) == 'sg'>>
+							<<if setup.startingCharacterTagsIncludes('sg')>>
 								"That's fair enough I guess. Not everyone has a neighbor like Misha brewing moonshine vodka in his barn," she laughs.
 							<<else>>
 								"That's fair enough I guess. I didn''t drink when I lived in the village, but if I ever wanted one, I had a neighbor who would brew moonshine in his barn," she laughs.

+ 14 - 14
sugarcube/src/autogenerated/unsorted/pav_aptcourtev.tw

@@ -146,13 +146,13 @@
 	<<set $location_type = 'public_outdoors'>>
 	<<set $time.minutes += 2>>
 	<<warn 'JUMP MARKER ENCOUNTERED: :reroll_jump1'>>
-	<<if getvar("$rolanmeet") == 0 or mid($start_type,1,2) != 'sg'>>
+	<<if getvar("$rolanmeet") == 0 or !setup.startingCharacterTagsIncludes('sg')>>
 		<<set $events = rand(0,17)>>
 	<<else>>
 		<<set $events = rand(0,22)>>
 	<</if>>
 	<<if getvar("$anushkaQW['first_visit']") == 0 and $npcs.get('A144','rel') > 50 and rand(0,1) == 1 and $anushka_met != $time.daystart>>
-		<<if mid($start_type,1,2) != 'sg'>>
+		<<if !setup.startingCharacterTagsIncludes('sg')>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump1'>>
 
 		<</if>>
@@ -188,7 +188,7 @@
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
 	<<elseif getvar("$events") == 2>>
-		<<if mid($start_type,1,2) != 'sg'>>
+		<<if !setup.startingCharacterTagsIncludes('sg')>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump1'>>
 
 		<</if>>
@@ -247,7 +247,7 @@
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
 	<<elseif getvar("$events") == 9>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday < 6 and $time.hour < 14) or ($time.weekday == 3 and $time.hour >= 16)>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday < 6 and $time.hour < 14) or ($time.weekday == 3 and $time.hour >= 16)>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump1'>>
 
 		<</if>>
@@ -299,9 +299,9 @@
 		<<set $time.minutes += 3>>
 		<<image "locations/pavlovsk/resident/apartment/events/sex/evbj#.jpg" 1 2>>
 		<<set $text_rand = rand(0,2)>>
-		<<if getvar("$text_rand") == 1 and mid($start_type,1,2) == 'sg' and ($time.weekday > 5 or $time.hour >= 14)>>
+		<<if getvar("$text_rand") == 1 and setup.startingCharacterTagsIncludes('sg') and ($time.weekday > 5 or $time.hour >= 14)>>
 			You spot Lavrenti leaning against a wall near the storage buildings and are surprised to see Lena squatting down in front of him as she sucks his dick, seemingly enjoying it as much as Lavrenti. After a few minutes, you hear him moan, his cock never leaving her mouth as she continues to milk him for another minute before standing up. They walk away together as you wonder if Vitek is aware of what his sister is getting up to, though you definitely aren''t going to ask him.
-		<<elseif getvar("$text_rand") == 2 and mid($start_type,1,2) == 'sg' and (getvar("$locat['Anya']") == 9 or getvar("$locat['Anya']") == 13 or getvar("$locat['Anya']") == 14 or getvar("$locat['Anya']") == 24) and (getvar("$sisterQW['AnyaRomaQW']") == 0 or getvar("$sisterQW['partytalk']") > 0)>>
+		<<elseif getvar("$text_rand") == 2 and setup.startingCharacterTagsIncludes('sg') and (getvar("$locat['Anya']") == 9 or getvar("$locat['Anya']") == 13 or getvar("$locat['Anya']") == 14 or getvar("$locat['Anya']") == 24) and (getvar("$sisterQW['AnyaRomaQW']") == 0 or getvar("$sisterQW['partytalk']") > 0)>>
 			<p>You spot a guy you think you recognize leaning against a wall near the storage buildings, but it's hard to tell as his face is turned to the side and tilted down. There's a girl kneeling in front of him, giving him an enthusiastic blowjob. You move to get a better view and realize it is Roma, your sister's boyfriend and... Oh god! It's your sister! She's sucking him for all she's worth, taking his dick all the way down her throat. Part of you knows you shouldn't watch, but another can't look away. Where did your sister learn these skills? Can she teach you?</p>
 			You're pulled out of your thoughts when you hear Roma moan, his hand gripping the back of Anya''s head as he cums hard in her mouth. Anya doesn''t resist and continues to suck, even after Roma removes his hand from her head. She sucks his cock clean before standing up. You instinctively duck, hoping you're not noticed. They briefly kiss before walking away hand in hand.
 		<<else>>
@@ -314,7 +314,7 @@
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
 	<<elseif getvar("$events") == 15>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday < 5 and $time.hour < 14)>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday < 5 and $time.hour < 14)>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump1'>>
 
 		<</if>>
@@ -334,7 +334,7 @@
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
 	<<elseif getvar("$events") == 16>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday == 3 and $time.hour >= 16) or ($time.weekday < 5 and $time.hour < 14)>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday == 3 and $time.hour >= 16) or ($time.weekday < 5 and $time.hour < 14)>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump1'>>
 
 		<</if>>
@@ -460,9 +460,9 @@
 		<<set $time.minutes += 3>>
 		<<image "locations/pavlovsk/resident/apartment/events/sex/evbjn.jpg">>
 		<<set $text_rand = rand(0,2)>>
-		<<if getvar("$text_rand") == 1 and mid($start_type,1,2) == 'sg' and (($time.weekday > 5 and $time.hour < 4) or $time.hour < 7)>>
+		<<if getvar("$text_rand") == 1 and setup.startingCharacterTagsIncludes('sg') and (($time.weekday > 5 and $time.hour < 4) or $time.hour < 7)>>
 			You spot Lavrenti leaning against a wall near the storage buildings and are surprised to see Lena squatting down in front of him as she sucks his dick, seemingly enjoying it as much as Lavrenti. After a few minutes, you hear him moan, his cock never leaving her mouth as she continues to milk him for another minute before standing up. They walk away together as you wonder if Vitek is aware of what his sister is getting up to, though you definitely aren''t going to ask him.
-		<<elseif getvar("$text_rand") == 2 and mid($start_type,1,2) == 'sg' and (getvar("$locat['Anya']") == 9 or getvar("$locat['Anya']") == 13 or getvar("$locat['Anya']") == 14 or getvar("$locat['Anya']") == 24) and (getvar("$sisterQW['AnyaRomaQW']") == 0 or getvar("$sisterQW['partytalk']") > 0)>>
+		<<elseif getvar("$text_rand") == 2 and setup.startingCharacterTagsIncludes('sg') and (getvar("$locat['Anya']") == 9 or getvar("$locat['Anya']") == 13 or getvar("$locat['Anya']") == 14 or getvar("$locat['Anya']") == 24) and (getvar("$sisterQW['AnyaRomaQW']") == 0 or getvar("$sisterQW['partytalk']") > 0)>>
 			<p>You spot a guy you think you recognize leaning against a wall near the storage buildings, but it's hard to tell as his face is turned to the side and tilted down. There's a girl kneeling in front of him, giving him an enthusiastic blowjob. You move to get a better view and realize it is Roma, your sister's boyfriend and... Oh god! It's your sister! She's sucking him for all she's worth, taking his dick all the way down her throat. Part of you knows you shouldn't watch, but another can't look away. Where did your sister learn these skills? Can she teach you?</p>
 			You're pulled out of your thoughts when you hear Roma moan, his hand gripping the back of Anya''s head as he cums hard in her mouth. Anya doesn''t resist and continues to suck, even after Roma removes his hand from her head. She sucks his cock clean before standing up. You instinctively duck, hoping you're not noticed. They briefly kiss before walking away hand in hand.
 		<<else>>
@@ -475,7 +475,7 @@
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
 	<<elseif getvar("$nightevents") == 5>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump2'>>
 
 		<</if>>
@@ -508,7 +508,7 @@
 			<<gt 'pav_complex' 'start'>>
 		<</actCLA>>
 	<<elseif getvar("$nightevents") == 8>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump2'>>
 
 		<</if>>
@@ -592,7 +592,7 @@
 			<</if>>
 		<</actCLA>>
 	<<elseif getvar("$nightevents") == 9>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday == 3 and $time.hour <= 23) or ($time.weekday == 5 and $time.hour >= 20) or ($time.weekday == 6 and $time.hour >= 20) or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday == 3 and $time.hour <= 23) or ($time.weekday == 5 and $time.hour >= 20) or ($time.weekday == 6 and $time.hour >= 20) or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump2'>>
 
 		<</if>>
@@ -658,7 +658,7 @@
 			<</if>>
 		<</actCLA>>
 	<<elseif getvar("$nightevents") == 10>>
-		<<if mid($start_type,1,2) != 'sg' or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
+		<<if !setup.startingCharacterTagsIncludes('sg') or ($time.weekday < 6 and $time.hour > 3) or $time.hour > 6>>
 			<<warn 'JUMP COMMAND ENCOUNTERED: jump reroll_jump2'>>
 
 		<</if>>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/placer_sex.tw

@@ -1254,9 +1254,9 @@
 <</if>>
 <<if $location_var[$here][0] == 'sleep'>>
 	<<if getvar("$disable_autosave") == 0>>
-		<<if mid($start_type,1,4) == 'city'>>
+		<<if setup.startingCharacterTagsIncludes('city')>>
 			savegame 'autosave_city.sav'
-		<<elseif mid($start_type,1,3) == 'uni'>>
+		<<elseif setup.startingCharacterTagsIncludes('uni')>>
 			savegame 'autosave_uni.sav'
 		<<else>>
 			savegame 'autosave_sg.sav'

+ 5 - 5
sugarcube/src/autogenerated/unsorted/sex_ev_after.tw

@@ -174,7 +174,7 @@
 		<<gs 'sex_ev_after' 'after_sex1'>>
 		<<gs 'sex_ev_after' 'well_continue'>>
 	<</actCLA>>
-	<<if mid($start_type,1,2) == 'sg' and ($time.hour >= 22 or $time.hour < 3) and $sex_ev['loc'] != 'pc_home'>>
+	<<if setup.startingCharacterTagsIncludes('sg') and ($time.hour >= 22 or $time.hour < 3) and $sex_ev['loc'] != 'pc_home'>>
 		<<actCLA 'Mom will kill me'>>
 			<<setinit $sex_ev['mom_kill'] += 1>>
 			<<setinit $sex_ev['blue_ball'] = 1>>
@@ -710,7 +710,7 @@
 					<p>"Because I want to," you scowl at him. "I have to explain what I want to do with <i>my</i> body?"</p>
 					<<gs 'sex_ev_after' 'after_sex1'>>
 				<</actCLA>>
-				<<if mid($start_type,1,2) == 'sg'>>
+				<<if setup.startingCharacterTagsIncludes('sg')>>
 					<<actCLA 'Ask my mom'>>
 						"I don't know," you say, rolling your eyes in exasperation. "Ask my mom why it's so important."
 						<<gs 'sex_ev_after' 'after_sex1'>>
@@ -1662,7 +1662,7 @@
 				<p>$sex_ev['spend_night_question']. "I don't feel like going home tonight."</p>
 				<<gs 'sex_ev_after' 'spend_night'>>
 			<</actCLA>>
-			<<if mid($start_type,1,2) == 'sg'>>
+			<<if setup.startingCharacterTagsIncludes('sg')>>
 				<<actCLA 'I`m sick of my mom'>>
 					$sex_ev['bed_room']
 					<p>$sex_ev['spend_night_question']. "My mom has been such a bitch lately and I don't want to see her."</p>
@@ -1670,7 +1670,7 @@
 				<</actCLA>>
 			<</if>>
 			<<if $time.hour < 5>>
-				<<if mid($start_type,1,2) == 'sg'>>
+				<<if setup.startingCharacterTagsIncludes('sg')>>
 					<<actCLA 'Avoid my mom'>>
 						$sex_ev['bed_room']
 						<p>$sex_ev['spend_night_question']. "If I go home now, my mom will chew me out for coming back to late. She'll still chew me out later, but I don't want to deal with it right now."</p>
@@ -1856,7 +1856,7 @@
 		<<else>>
 			<<gs 'sleep' 'simple'>>
 		<</if>>
-		<<if mid($start_type,1,2) == 'sg' and func('homes_properties', 'has_access', 'homeParents')>>
+		<<if setup.startingCharacterTagsIncludes('sg') and func('homes_properties', 'has_access', 'homeParents')>>
 			<<setinit $sveta_punishment['no_come_home'] = 1>>
 
 		<</if>>

+ 10 - 10
sugarcube/src/autogenerated/unsorted/sex_ev_condoms.tw

@@ -155,8 +155,8 @@
 			<<setinit $sex_ev['position'] = 'miss'>>
 
 		<</if>>
-		<<actCLA 'Let $npcs.get('+$sex.npcId,'firstname')+' fuck you'>>
-			<<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']_goto'>>
+		<<actCLA 'Let him fuck you'>>
+			<<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']_goto'>>
 		<</actCLA>>
 	<</if>>
 <</if>>
@@ -607,8 +607,8 @@
 					<<setinit $sex_ev['position'] = 'miss'>>
 
 				<</if>>
-				<<actCLA 'Let $npcs.get('+$sex.npcId,'firstname')+' fuck you'>>
-					<<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']_goto'>>
+				<<actCLA 'Let him fuck you'>>
+					<<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']_goto'>>
 				<</actCLA>>
 			<<else>>
 				<p>"What the fuck! Why didn't you say so!" he says, immediately reaching for a condom.</p>
@@ -626,8 +626,8 @@
 					<<setinit $sex_ev['position'] = 'miss'>>
 
 				<</if>>
-				<<actCLA 'Let $npcs.get('+$sex.npcId,'firstname')+' fuck you'>>
-					<<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']_goto'>>
+				<<actCLA 'Let him fuck you'>>
+					<<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']_goto'>>
 				<</actCLA>>
 			<<else>>
 				<p>"Ugh, fine," <<npc $sex.npcId>><</npc>> grumbles, reaching for a condom.</p>
@@ -836,7 +836,7 @@
 				<<gs 'sex_ev_condoms' 'disable_condoms_options1'>>
 			<</actCLA>>
 			<<if $pc.sexStat('dangerous_day') != 1>>
-				<<actCLA 'I'll tell you when it's safe'>>
+				<<actCLA "I'll tell you when it's safe">>
 					<<setinit $sex_ev['temp_bareback'] = 2>>
 					$sex_ev['bed_room']
 					<<setinit $sex_ev['disable_condoms_desc'] = '"Hey," you smile. "We don`t need to use condoms every time.'>>
@@ -1164,9 +1164,9 @@
 	List of potential fathers:
 	<<warn 'JUMP MARKER ENCOUNTERED: :potfather_loop'>>
 	<<if $wombpotfath[$potfather_counter] != 'unknown'>>
-		<<setinit $potfather_temp[2] = '<<link "$npcs.get($wombpotfath[$potfather_counter,'usedname')] ($wombpotfath[$potfather_counter])">><<set $wombthfath = '$npcs.get($wombpotfath[$potfather_counter,'usedname')]' set $wombthfathID = '$wombpotfath[$potfather_counter]' d_cycreport_actor  7 gs 'stat'>><</link>>'>>
+		<<setinit $potfather_temp[2] = `<<link "$npcs.get($wombpotfath[$potfather_counter,'usedname')] ($wombpotfath[$potfather_counter])">><<set $wombthfath = '$npcs.get($wombpotfath[$potfather_counter,'usedname')]' set $wombthfathID = '$wombpotfath[$potfather_counter]' d_cycreport_actor  7 gs 'stat'>><</link>>`>>
 	<<else>>
-		<<setinit $potfather_temp[2] = '<<link "Unknown (-)">><<set $wombthfath = '$npcs.get($wombpotfath[$potfather_counter,'usedname')]' set $wombthfathID = '$wombpotfath[$potfather_counter]' d_cycreport_actor  7 gs 'stat'>><</link>>'>>
+		<<setinit $potfather_temp[2] = `<<link "Unknown (-)">><<set $wombthfath = '$npcs.get($wombpotfath[$potfather_counter,'usedname')]' set $wombthfathID = '$wombpotfath[$potfather_counter]' d_cycreport_actor  7 gs 'stat'>><</link>>`>>
 	<</if>>
 	<<if $sex.npcId == $potfather_temp[2]>>
 		<<setn $potfather_counter += 1>>
@@ -1463,7 +1463,7 @@
 				<<gs 'sex_ev_sex' 'position_choose'>>
 			<</actCLA>>
 		<<else>>
-			<<actCLA ''+$sex_ev['safe_day_act']+''>>
+			<<actCLA $sex_ev['safe_day_act']>>
 				<<setinit $sex_ev['safe_day'] = 1>>
 				<<setinit $sex_ev['no_condom'] = 1>>
 				$sex_ev['bed_room']

+ 4 - 4
sugarcube/src/autogenerated/unsorted/sex_ev_foreplay.tw

@@ -18,7 +18,7 @@
 <<case 'bed_start'>>
 	<<setinit $sex_ev['start_time'] = $totminut>>
 	<!-- !! $sex_ev['bed_room']-->
-	<<if rand(0,1) == 1>>
+	<<either>>
 		<!-- !! he wins initiative-->
 		<<if $npcs.get($sex.npcId,'caretaker') == 1 or $npcs.get($sex.npcId,'pussyeater') == 1>>
 			<<gs 'sex_ev_foreplay' 'generous_initiative'>>
@@ -31,11 +31,11 @@
 				<<gs 'sex_ev_foreplay' 'selfish_initiative'>>
 			<</either>>
 		<</if>>
-	<<else>>
+	<<or>>
 		<!-- !! player wins initiative-->
-		<!-- !!		'You both tear your clothes off, getting naked as fast as possible, you finishing just before he does. You take the extra moment to decide what you want to do...'-->
+		You both tear your clothes off, getting naked as fast as possible, you finishing just before he does. You take the extra moment to decide what you want to do...
 		<<gs 'sex_ev_foreplay' 'foreplay_choose'>>
-	<</if>>
+	<</either>>
 
 <!-- !! --------------------- Boy''s choices ------------------------------------------------------------------------>
 <<case 'generous_initiative'>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/sex_ev_leave.tw

@@ -895,7 +895,7 @@
 	<</if>>
 <</if>>
 <<if $location_var[$here][0] == 'mom_late'>>
-	<<if mid($start_type,1,2) == 'sg' and $time.hour >= 20 and $sex_ev['loc'] != 'pc_home'>>
+	<<if setup.startingCharacterTagsIncludes('sg') and $time.hour >= 20 and $sex_ev['loc'] != 'pc_home'>>
 		<<actCLA 'Mom will kill me'>>
 			<<setinit $sex_ev['mom_kill'] = 1>>
 			<<gs 'sex_ev_leave' 'dress_loop'>>

+ 32 - 32
sugarcube/src/autogenerated/unsorted/sex_ev_sex.tw

@@ -20,7 +20,7 @@
 			<<gs 'sex_ev_virgin' 'start1'>>
 		<</actCLA>>
 	<<elseif getvar("$sex_ev['fuck_count']") == 0 and ($sex_ev['position'] != 'miss' or $sex_ev['position'] != 'doggy' or $sex_ev['position'] != 'cowgirl')>>
-		<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+		<<actCLA 'Fuck'>>
 			<<setinit $sex_ev['must_fuck'] = 1>> <<gs 'sex_ev_sex' 'sex_pre'>>
 		<</actCLA>>
 	<<elseif getvar("$sex_ev['cock_inserted']") == 1 and $sex_ev['last_cum'] == 'creampie' and ($sex_ev['position'] == 'miss' or $sex_ev['position'] == 'doggy' or $sex_ev['position'] == 'cowgirl')>>
@@ -38,7 +38,7 @@
 					<<if getvar("$sex_ev['no_condom']") != 1>>
 						<<gs 'sex_ev_condoms' 'condoms'>>
 					<<else>>
-						<<gt 'sex_ev_$sex_ev['reset_pos']' $sex_ev['pos_speed']>>
+						<<gt `'sex_ev_'+$sex_ev['reset_pos']` $sex_ev['pos_speed']>>
 					<</if>>
 				<</actCLA>>
 				<<actCLA 'Change positions'>>
@@ -240,26 +240,26 @@
 <<if $location_var[$here][0] == 'fuck_arousal_code'>>
 	<<setinit $sex_ev['fuck_time_temp'] = rand(1,4)>>
 	<<setinit $sex_ev['fuck_time_total'] += $sex_ev['fuck_time_temp']>>
-	<<arouse 'vaginal' $sex_ev`['fuck_time_temp'] ['no_orgasm_msg']`>>
+	<<arouse 'vaginal' $sex_ev['fuck_time_temp'] `['no_orgasm_msg']`>>
 	<<arouse 'vaginal'  `[- $sex_ev['fuck_time_temp'] 'no_orgasm_msg']`>>
 <</if>>
 <<if $location_var[$here][0] == 'fuck_rough_arousal_code'>>
 	<<setinit $sex_ev['fuck_time_temp'] = rand(1,4)>>
 	<<setinit $sex_ev['fuck_time_total'] += $sex_ev['fuck_time_temp']>>
-	<<arouse 'vaginal' $sex_ev`['fuck_time_temp'] ['no_orgasm_msg','rough']`>>
+	<<arouse 'vaginal' $sex_ev['fuck_time_temp'] `['no_orgasm_msg','rough']`>>
 	<<arouse 'vaginal'  `[- $sex_ev['fuck_time_temp'] 'no_orgasm_msg','rough']`>>
 <</if>>
 <<if $location_var[$here][0] == 'fuck_rough_no_cum_code'>>
 	<<set $orgasm_or = 'no'>>
 	<<setinit $sex_ev['fuck_time_temp'] = rand(1,4)>>
 	<<setinit $sex_ev['fuck_time_total'] += $sex_ev['fuck_time_temp']>>
-	<<arouse 'vaginal' $sex_ev`['fuck_time_temp'] ['no_orgasm_msg','rough']`>>
+	<<arouse 'vaginal' $sex_ev['fuck_time_temp'] `['no_orgasm_msg','rough']`>>
 <</if>>
 <<if $location_var[$here][0] == 'fuck_no_cum_code'>>
 	<<set $orgasm_or = 'no'>>
 	<<setinit $sex_ev['fuck_time_temp'] = rand(1,4)>>
 	<<setinit $sex_ev['fuck_time_total'] += $sex_ev['fuck_time_temp']>>
-	<<arouse 'vaginal' $sex_ev`['fuck_time_temp'] ['no_orgasm_msg']`>>
+	<<arouse 'vaginal' $sex_ev['fuck_time_temp'] `['no_orgasm_msg']`>>
 <</if>>
 <<if $location_var[$here][0] == 'fuck_arousal_cum_code'>>
 	<<setinit $sex_ev['fuck_time_temp'] = 1>>
@@ -268,11 +268,11 @@
 		<<setinit $sex_ev['ask_creampie_count'] += 1>>
 
 	<</if>>
-	<<arouse 'vaginal' $sex_ev`['fuck_time_temp'] ['no_orgasm_msg']`>>
+	<<arouse 'vaginal' $sex_ev['fuck_time_temp'] `['no_orgasm_msg']`>>
 <</if>>
 <<if $location_var[$here][0] == 'girl_orgasm_change_position'>>
 	<<if $sex_ev['position'] == $npcs.get($sex.npcId,'fav_pos') or rand(1,2) == 1>>
-		<<gs 'sex_ev_$sex_ev['position']' '$sex_ev['position']_girl_orgasm_continue'>>
+		<<gs `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']_girl_orgasm_continue'>>
 	<<else>>
 		<<if rand(1,2) == 1>>
 			<<gs 'sex_ev_miss' 'miss_girl_orgasm_continue'>>
@@ -297,55 +297,55 @@
 	<<if getvar("$sex_ev['girl_orgasm']") == 0>>
 		<<if getvar("$sex_ev['bored']") == 1>>
 			<<actCLA 'Keep going'>>
-				<<gt 'sex_ev_$sex_ev['position']' '$sex_ev['pos_speed'].bored'>>
+				<<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['pos_speed'].bored'>>
 			<</actCLA>>
 		<<elseif getvar("$sex_ev['fuck_enjoyment']") == -1>>
 			<<set $orgasm_or = 'no'>>
 			<<if getvar("$sex_ev['speed']") == 3>>
 				<<actCLA 'Sob'>>
-					<<setinit $sex_ev['fuck_pain'] = 4>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+					<<setinit $sex_ev['fuck_pain'] = 4>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 				<</actCLA>>
 				<<actCLA 'Try to hold back tears'>>
-					<<setinit $sex_ev['fuck_pain'] = 3>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+					<<setinit $sex_ev['fuck_pain'] = 3>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 				<</actCLA>>
 			<<else>>
 				<<actCLA 'Hold back tears'>>
-					<<setinit $sex_ev['fuck_pain'] = 3>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+					<<setinit $sex_ev['fuck_pain'] = 3>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 				<</actCLA>>
 			<</if>>
 			<<actCLA 'Perservere'>>
-				<<setinit $sex_ev['fuck_pain'] = 2>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<setinit $sex_ev['fuck_pain'] = 2>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<<actCLA 'The pain is fading'>>
-				<<setinit $sex_ev['fuck_pain'] = 1>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<setinit $sex_ev['fuck_pain'] = 1>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 		<<elseif getvar("$sex_ev['fuck_enjoyment']") == 0>>
 			<<set $orgasm_or = 'no'>>
 			<<actCLA 'Just keep fucking'>>
-				<<setinit $sex_ev['moan'] = 1>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<setinit $sex_ev['moan'] = 1>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<<actCLA 'Fake some moans'>>
-				<<setinit $sex_ev['moan'] = 2>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<setinit $sex_ev['moan'] = 2>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<<actCLA 'Starting to feel good'>>
-				<<setinit $sex_ev['fuck_pain'] = -1>> <<set $orgasm_or = ''>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<setinit $sex_ev['fuck_pain'] = -1>> <<set $orgasm_or = ''>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 		<<else>>
 			<<actCLA 'Focus on the sensations'>>
-				<<set $orgasm_or = ''>> <<setinit $sex_ev['dirty_talk'] = 0>> <<set $sex_ev['moan'] = 0>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<set $orgasm_or = ''>> <<setinit $sex_ev['dirty_talk'] = 0>> <<set $sex_ev['moan'] = 0>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<<actCLA 'Moan softly'>>
-				<<set $orgasm_or = ''>> <<setinit $sex_ev['dirty_talk'] = 0>> <<set $sex_ev['moan'] = 1>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<set $orgasm_or = ''>> <<setinit $sex_ev['dirty_talk'] = 0>> <<set $sex_ev['moan'] = 1>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<<actCLA 'Moan loudly'>>
-				<<set $orgasm_or = ''>> <<setinit $sex_ev['dirty_talk'] = 0>> <<set $sex_ev['moan'] = 2>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<set $orgasm_or = ''>> <<setinit $sex_ev['dirty_talk'] = 0>> <<set $sex_ev['moan'] = 2>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<!-- !!		act'Dirty talk...':gs 'sex_ev_sex', 'dirty_talk1'-->
 			<<actCLA 'Dirty talk'>>
 				<<set $orgasm_or = ''>>
 				<<setinit $sex_ev['moan'] = 0>>
 				<<setinit $sex_ev['dirty_talk'] = 1>>
-				<<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+				<<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 			<</actCLA>>
 			<!-- !!{			if $sex_ev['speed'] ! 3:
 			act'Talk while fucking':
@@ -359,7 +359,7 @@
 			end} -->
 			<<if getvar("$sex_ev['fuck_enjoyment']") != 2>>
 				<<actCLA 'Fake enjoyment'>>
-					<<setinit $sex_ev['bored'] = 1>> <<set $sex_ev['moan'] = 3>> <<set $orgasm_or = 'no'>> <<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+					<<setinit $sex_ev['bored'] = 1>> <<set $sex_ev['moan'] = 3>> <<set $orgasm_or = 'no'>> <<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 				<</actCLA>>
 			<</if>>
 		<</if>>
@@ -397,7 +397,7 @@
 		<<elseif $npcs.get($sex.npcId,'fav_pos') == 'cowgirl' and rand(0,1) == 1>>
 			<<gs 'sex_ev_cowgirl' 'cowgirl_girl_orgasm_continue'>>
 		<<else>>
-			<<gs 'sex_ev_$sex_ev['position']' '$sex_ev['position']_girl_orgasm_continue'>>
+			<<gs `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']_girl_orgasm_continue'>>
 		<</if>>
 	<</if>>
 <</if>>
@@ -549,7 +549,7 @@
 	<<set $orgasm_or = ''>>
 	<<setinit $sex_ev['moan'] = 0>>
 	<<setinit $sex_ev['dirty_talk'] = 1>>
-	<<gt 'sex_ev_$sex_ev['position']' '$sex_ev['position']sex_ev['speed'].2'>>
+	<<gt `'sex_ev_'+$sex_ev['position']` '$sex_ev['position']sex_ev['speed'].2'>>
 <</if>>
 <<if $location_var[$here][0] == 'take_a_break'>>
 	<<actCLA 'Take a break'>>
@@ -947,7 +947,7 @@
 			<<setinit $sex_ev['reset_pos'] = $sex_ev['position']>>
 			<<gs 'sex_ev_sex' 'reset'>>
 			<<gs 'sex_ev_condoms' 'condoms'>>
-			<<gt 'sex_ev_$sex_ev['reset_pos']' $sex_ev['pos_speed']>>
+			<<gt `'sex_ev_'+$sex_ev['reset_pos']` $sex_ev['pos_speed']>>
 		<</actCLA>>
 	<</if>>
 <</if>>
@@ -1432,12 +1432,12 @@
 		<p>You moan with hoarse arousal, spreading your legs wider so <<npc $sex.npcId>><</npc>> can keep fucking you.</p>
 		<<if getvar("$npc_sex_speed") <= 2>>
 			<<setinit $sex_ev['speed'] = 1>>
-			<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+			<<actCLA 'Fuck'>>
 				<<gs 'sex_ev_miss' 'miss1.2'>>
 			<</actCLA>>
 		<<else>>
 			<<setinit $sex_ev['speed'] = 3>>
-			<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+			<<actCLA 'Fuck'>>
 				<<gs 'sex_ev_miss' 'miss3.1'>>
 			<</actCLA>>
 		<</if>>
@@ -1465,12 +1465,12 @@
 			<p>You moan with hoarse arousal as your orgasm fades and control comes back to your body, spreading your legs wider so <<npc $sex.npcId>><</npc>> can keep fucking you.</p>
 			<<if getvar("$npc_sex_speed") <= 2>>
 				<<setinit $sex_ev['speed'] = 1>>
-				<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+				<<actCLA 'Fuck'>>
 					<<gs 'sex_ev_miss' 'miss1.2'>>
 				<</actCLA>>
 			<<else>>
 				<<setinit $sex_ev['speed'] = 3>>
-				<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+				<<actCLA 'Fuck'>>
 					<<gs 'sex_ev_miss' 'miss3.1'>>
 				<</actCLA>>
 			<</if>>
@@ -1584,7 +1584,7 @@
 	<</actCLA>>
 <</if>>
 <<if $location_var[$here][0] == 'wakeup_fondling'>>
-	<<arouse 'foreplay' -rand(5,10) `['no_orgasm_msg']`>>
+	<<arouse 'foreplay' `-rand(5,10)` `['no_orgasm_msg']`>>
 	<<image "shared/sex/sleep/fondle1.jpg">>
 	"Mmmmm..."
 	You stir as you feel a hands roaming your body. One passes over your breasts, squeezing them on the way down to your stomach. The other is already snaking its way between your legs.
@@ -1788,12 +1788,12 @@
 	<<setinit $sex_ev['start_time'] = $totminut>>
 	<<if getvar("$npc_sex_speed") <= 2>>
 		<<setinit $sex_ev['speed'] = 1>>
-		<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+		<<actCLA 'Fuck'>>
 			<<gs 'sex_ev_miss' 'miss1.2'>>
 		<</actCLA>>
 	<<else>>
 		<<setinit $sex_ev['speed'] = 3>>
-		<<actCLA 'Fuck $npcs.get('+$sex.npcId,'firstname')+''>>
+		<<actCLA 'Fuck'>>
 			<<gs 'sex_ev_miss' 'miss3.1'>>
 		<</actCLA>>
 	<</if>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/sex_ev_stats.tw

@@ -96,7 +96,7 @@
 		<<setn $npc_sleep_fuck += 1>>
 
 	<</if>>
-	<<if $time.hour >= 8 and $time.hour < 14 and $time.weekday < 6 and mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and getvar("$kanikuli") == 0 and $schoolProgulDay != $time.daystart>>
+	<<if $time.hour >= 8 and $time.hour < 14 and $time.weekday < 6 and setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and getvar("$kanikuli") == 0 and $schoolProgulDay != $time.daystart>>
 		<!-- !!absence from school-->
 		<<run $npcs.set($sex.npcId,'school_absences',$schoolprogul)>>
 	<</if>>

+ 2 - 2
sugarcube/src/autogenerated/unsorted/sex_ev_work_talk1.tw

@@ -103,7 +103,7 @@
 				<p>"I work at the textile factory," <<npc $sex.npcId>><</npc>> says.</p>
 			<<else>>
 				<p>"I work at the textile factory in the next town over," <<npc $sex.npcId>><</npc>> says.</p>
-				<<if mid($start_type,1,2) == 'sg'>>
+				<<if setup.startingCharacterTagsIncludes('sg')>>
 					<p>"The one in Pavlovsk?"</p>
 					<p>"Yeah, how'd you know?"</p>
 					"I grew up in Pav."
@@ -224,7 +224,7 @@
 			<<else>>
 				<<if $npcs.get($sex.npcId,'crime_type') == 'drug_dealer'>>
 					<p>"I work in pharmaceuticals," <<npc $sex.npcId>><</npc>> says.</p>
-					<<if mid($start_type,1,2) == 'sg'>>
+					<<if setup.startingCharacterTagsIncludes('sg')>>
 						"That's cool. My aunt is a pharmacist too."
 						"Oh. Good to know."
 					<<else>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/sexshop.tw

@@ -365,7 +365,7 @@
 			<<set $meet_kendra = 1>>
 			<<run $npcs.set('A84','rel',45)>>
 			<<image "locations/city/redlight/erotomaniac/sex/shkend01.jpg">>
-			<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+			<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 				<p>You ask her about her clothes and start talking with her. You tell her that you live in Pavlovsk and are in your final year of school and she replies by saying that she's a student from the Republic of Congo and is attending the local university on a student visa. You talk about a wide range of subjects for a while before she eventually says "You're very pretty. I love making pretty little Russian bitches my slaves. Call me Mistress Kendra, $pc.name_nick, and become mine." Should you call her mistress? You have no doubt where that will lead.</p>
 			<<else>>
 				<p>You ask her about her clothes and start talking with her. You tell her a bit about yourself and she replies by saying that she's a student from the Republic of Congo and is attending the local university on a student visa. You talk about a wide range of subjects for a while before she eventually says "You're very pretty. I love making pretty little Russian bitches my slaves. Call me Mistress Kendra, $pc.name_nick, and become mine." Should you call her mistress? You have no doubt where that will lead.</p>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/soniadisco.tw

@@ -6,7 +6,7 @@
 <!-- !!We should update Sonia code to work like the rest. I already did it with the new code soniaQW[$soniafall_block], but the rest like soniaPS or soniafall should be updated to soniaQW[$soniaPS] and soniaQW[$soniafall] I didn''t do it because last time I tried I messed some stuff up so I will leave it to one of you coders to update it.-->
 <<if $location_var[$here][0] == 'cikl'>>
 	<!-- !!Making Sonia''s fall progress if the player do not see the scenes at the disco, by making it such that if at a Sunday her fall have not advanced this weekend it will automatically advance.-->
-	<<if mid($start_type,1,2) == 'sg' and $time.weekday == 7 and $npcs.get('A25','slutStatus',0) == 0 and $time.month > 9 and $time.daystart >= $soniafallDay + 6>>
+	<<if setup.startingCharacterTagsIncludes('sg') and $time.weekday == 7 and $npcs.get('A25','slutStatus',0) == 0 and $time.month > 9 and $time.daystart >= $soniafallDay + 6>>
 		<<if getvar("$soniafall") < 7>>
 			<<set $soniafallDay = $time.daystart - 1>>
 			<<set $soniafall += 1>>

+ 12 - 12
sugarcube/src/autogenerated/unsorted/stat_display.tw

@@ -11,7 +11,7 @@
 	<<set $stat_msg += '<BR>$stat_android $time.weekday_name[$time.weekday] day $time.month year'>>
 
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") != 1 and $holyday != ''>>
+<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") != 1 and $holyday != ''>>
 	<<set $stat_msg += '<BR>$holyday'>> <<set $stat_msg += '<BR>'>>
 
 <</if>>
@@ -155,10 +155,10 @@
 	<<else>>
 		<<set $stat_school_schedule = ''>>
 	<</if>>
-	<<if mid($start_type,1,2) == 'sg' and $SchoolAtestat == 0 and $kanikuli == 0 and $time.weekday < 6 and $time.hour < 9>>
+	<<if setup.startingCharacterTagsIncludes('sg') and $SchoolAtestat == 0 and $kanikuli == 0 and $time.weekday < 6 and $time.hour < 9>>
 		<<set $stat_school_msg = 'You have to be at school before 07:55 if you don`t want to be late.'>>
 		<<set $stat_school_tooltip = 'School starts at 07:55.'>>
-	<<elseif mid($start_type,1,2) == 'sg' and $SchoolAtestat == 0 and $time.weekday == 6 and $time.hour < 9 and $detention_set == 1 and $SchoolAtestat == 0>>
+	<<elseif setup.startingCharacterTagsIncludes('sg') and $SchoolAtestat == 0 and $time.weekday == 6 and $time.hour < 9 and $detention_set == 1 and $SchoolAtestat == 0>>
 		<<set $stat_school_msg = 'You have detention this morning and must be at school before 09:00.'>>
 		<<set $stat_school_tooltip = 'Detention starts at 09:00.'>>
 	<<else>>
@@ -770,7 +770,7 @@
 		<<gs 'show_table' 'BF $loverdesc[2]: loverrelation[2]' '2'>>
 
 	<</if>>
-	<<if mid($start_type,1,2) == 'sg'>>
+	<<if setup.startingCharacterTagsIncludes('sg')>>
 		<<if getvar("$npcs.get('A29','rel')") > 0>>
 			<<gs 'show_table' 'Mother: npc_rel['A29']' '2'>>
 
@@ -1072,9 +1072,9 @@
 	<<set $stat_msg += $stat_panty_text>>
 	<<set $stat_msg += $stat_clothes_text>>
 	<<if $SchoolBlock == 0>>
-		<<if $stat_school_msg != '' and mid($start_type,1,2) == 'sg' and $SchoolAtestat == 0 and $kanikuli == 0 and $time.weekday < 6 and $time.hour < 9>>
+		<<if $stat_school_msg != '' and setup.startingCharacterTagsIncludes('sg') and $SchoolAtestat == 0 and $kanikuli == 0 and $time.weekday < 6 and $time.hour < 9>>
 			<<set $stat_msg += '<BR><b>$stat_school_msg</b>'>>
-		<<elseif $stat_school_msg != '' and mid($start_type,1,2) == 'sg' and $SchoolAtestat == 0 and $time.weekday == 6 and $time.hour < 9 and getvar("$detention_set") == 1 and $SchoolAtestat == 0>>
+		<<elseif $stat_school_msg != '' and setup.startingCharacterTagsIncludes('sg') and $SchoolAtestat == 0 and $time.weekday == 6 and $time.hour < 9 and getvar("$detention_set") == 1 and $SchoolAtestat == 0>>
 			<<set $stat_msg += '<BR><b>$stat_school_msg</b>'>>
 		<</if>>
 	<</if>>
@@ -1135,24 +1135,24 @@
 
 <</if>>
 <!-- !!--------------- mid($start_type,1,2) = 'sg' Events (Start) -------------------------->
-<<if mid($start_type,1,2) == 'sg' and $sisboyday + 1 == $time.daystart and $time.hour < 18 and (getvar("$npcs.get('A33','QW')") == 3 or getvar("$npcs.get('A33','QW')") == 5 or getvar("$npcs.get('A33','QW')") == 7 or (getvar("$npcs.get('A33','QW')") >= 9 and getvar("$sisboytrioQW") != 1))>>
+<<if setup.startingCharacterTagsIncludes('sg') and $sisboyday + 1 == $time.daystart and $time.hour < 18 and (getvar("$npcs.get('A33','QW')") == 3 or getvar("$npcs.get('A33','QW')") == 5 or getvar("$npcs.get('A33','QW')") == 7 or (getvar("$npcs.get('A33','QW')") >= 9 and getvar("$sisboytrioQW") != 1))>>
 	<<set $stat_msg += '<BR>'>> <<set $stat_msg += '<BR>You promised your sister not to go into your room at 16:00.'>>
 
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and $sisboyday + 1 == $time.daystart and $time.hour < 18 and getvar("$sisboytrioQW") == 1>>
+<<if setup.startingCharacterTagsIncludes('sg') and $sisboyday + 1 == $time.daystart and $time.hour < 18 and getvar("$sisboytrioQW") == 1>>
 	<<set $stat_msg += '<BR>'>> <<set $stat_msg += '<BR>You promised your sister to meet her in your room at 16:00.'>>
 
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and $time.day == $nyp_day and $time.month == 12 and $SchoolAtestat == 0 and $time.hour >= 5 and $time.hour <= 14 and mid($start_type,1,2) == 'sg'>>
+<<if setup.startingCharacterTagsIncludes('sg') and $time.day == $nyp_day and $time.month == 12 and $SchoolAtestat == 0 and $time.hour >= 5 and $time.hour <= 14 and setup.startingCharacterTagsIncludes('sg')>>
 	<<set $stat_msg += '<BR>At 14:00, your school's New Year's party will start.'>>
-<<elseif mid($start_type,1,2) == 'sg' and getvar("$InvitationToDimkaNYparty") == 1 and $time.month == 12 and $time.day == 31>>
+<<elseif setup.startingCharacterTagsIncludes('sg') and getvar("$InvitationToDimkaNYparty") == 1 and $time.month == 12 and $time.day == 31>>
 	<<set $stat_msg += '<BR><b>Go to the residential area between 15:00 and 18:00 to go to Dimka's New Year party.</b>'>>
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and getvar("$gopnik_initiation") == 1 and $gopnik_initiation_day == $time.daystart and $time.hour > 15 and $time.hour < 21>>
+<<if setup.startingCharacterTagsIncludes('sg') and getvar("$gopnik_initiation") == 1 and $gopnik_initiation_day == $time.daystart and $time.hour > 15 and $time.hour < 21>>
 	<<set $stat_msg += '<BR><b>Meet Lena and Lera at the apartment garages at eight.</b>'>>
 
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and getvar("$nerd_night_game") == 1 and $nerd_night_game_day == $time.daystart and $time.hour > 15 and $time.hour < 21>>
+<<if setup.startingCharacterTagsIncludes('sg') and getvar("$nerd_night_game") == 1 and $nerd_night_game_day == $time.daystart and $time.hour > 15 and $time.hour < 21>>
 	<<set $stat_msg += '<BR><b>Join nerds at the community center at eight.</b>'>>
 
 <</if>>

+ 1 - 3
sugarcube/src/autogenerated/unsorted/test.tw

@@ -1,5 +1,3 @@
 :: test[menu]
-	<<skillHistoryDiagram 'highHeels' 'High Heels Skill'>>
-	<<skillHistoryDiagram 'makeup'>>
-	<<skillHistoryDiagram 'inhibition'>>
+	<<debugVar 'State.variables'>>
 

+ 2 - 2
sugarcube/src/autogenerated/unsorted/tobiQW.tw

@@ -123,11 +123,11 @@
 	 	<<image "system/1_openings/shared/npc_reinhold.jpg">>
 	"OK, I have to go. Look after yourself, and don't do anything to attract too much attention."
 	After these words, Reinhold creates a vortex into which he is pulled, and everything is back to normal.
-	<<if mid($start_type,1,4) == 'city'>>
+	<<if setup.startingCharacterTagsIncludes('city')>>
 		<<actCLA 'Get out of bed'>>
 			<<gt 'bedr'>>
 		<</actCLA>>
-	<<elseif mid($start_type,1,2) == 'sg'>>
+	<<elseif setup.startingCharacterTagsIncludes('sg')>>
 		<<actCLA 'Get out of bed'>>
 			<<gt 'bedrPar'>>
 		<</actCLA>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/uni_admin.tw

@@ -57,7 +57,7 @@
 			<<gt 'uni_admin' 'take_test'>>
 		<</actCLA>>
 	<</if>>
-	<<if (getvar("$university['entrance_exam_passed']") == 1 or getvar("$university['prep_enrolled']") == 0) and getvar("$university['student']") == 0 and getvar("$university['diploma']") == 0 and getvar("$pc.age") >= 17 and (mid($start_type,1,2) != 'sg' or getvar("$SchoolAtestat") == 1) and $time.month < 9 and $time.month > 4 and getvar("$university['exam_week']") == 0>>
+	<<if (getvar("$university['entrance_exam_passed']") == 1 or getvar("$university['prep_enrolled']") == 0) and getvar("$university['student']") == 0 and getvar("$university['diploma']") == 0 and getvar("$pc.age") >= 17 and (!setup.startingCharacterTagsIncludes('sg') or getvar("$SchoolAtestat") == 1) and $time.month < 9 and $time.month > 4 and getvar("$university['exam_week']") == 0>>
 		<<actCLA 'Enroll at the university'>>
 			<<gt 'uni_admin' 'enrollment'>>
 		<</actCLA>>

+ 1 - 1
sugarcube/src/autogenerated/unsorted/uni_library.tw

@@ -27,7 +27,7 @@
 	<!-- !!if locat['albina'] = 6:-->
 	<!-- !!'You see '+iif(AlbinaQW['know_albina_uni'] = 0 and ($start_type = 'city_tg' or $start_type = 'uni_tg'), 'an attractive looking brunette', '<<link "Albina">><<gt 'albina_uni' 'library'>><</link>>')+' searching the shelves for books.'-->
 	<!-- !!end-->
-	<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") > 1 and $time.weekday > 5 and $time.hour >= 12 and $time.hour < 14>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") > 1 and $time.weekday > 5 and $time.hour >= 12 and $time.hour < 14>>
 		<<if $nataliaQW['library_day_check'] != $time.daystart>>
 			<<setinit $nataliaQW['library_day_check'] = $time.daystart>>
 			<<if rand(0,3) == 0>>

+ 1 - 1
sugarcube/src/events/street_event.tw

@@ -564,7 +564,7 @@ ie. gt'street_event','home'
 			<</actCLA>>
 			$exit
 		<</if>>
-		<<if getvar("$pcs_magik") >= 1 and getvar("$mainQW") == 0 and mid($start_type,1,4) == 'city'>>
+		<<if getvar("$pcs_magik") >= 1 and getvar("$mainQW") == 0 and setup.startingCharacterTagsIncludes('city')>>
 			<<set $menu_off = 1>>
 			<<set $mainQW = 1>>
 			<<image "locations/city/citycenter/lab/event/main.jpg">>

+ 11 - 1
sugarcube/src/js/mergedeep.js

@@ -14,7 +14,17 @@ setup.mergeDeep = function (target, ...sources) {
 				if (!target[key]) 
 					Object.assign(target, { [key]: {} });
 				setup.mergeDeep(target[key], source[key]);
-			} else {
+			}
+			else if(Array.isArray(source[key])){
+				if (!target[key]) 
+					Object.assign(target, { [key]: source[key] });
+				else if(Array.isArray(target[key]))
+					Object.assign(target, { [key]: [...target[key],...source[key]]});
+				else
+					console.error('Error in setup.mergeDeep: cant maerge array with non-array');
+				
+			}
+			else {
 				Object.assign(target, { [key]: source[key] });
 			}
 		}

+ 1 - 1
sugarcube/src/locations/brothel.tw

@@ -282,7 +282,7 @@
 	<<set $pc.pcs_hairbsh = -1>>
 	<<set $pc.isSleeping= 1>>
 	<<run $pc.painSet('killer',0)>>
-	<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 		<<set $notathomesleep += 1>>
 	<<else>>
 		<<set $notathomesleep = 0>>

+ 5 - 5
sugarcube/src/locations/city/city_coffee_hole.tw

@@ -37,13 +37,13 @@
 		<<setinit $locat['A144'] = 9>>
 		You see a familiar face working behind the counter, your former classmate <<link "Anushka.">><<gt 'city_coffee_hole' 'anushka_work'>><</link>>
 	<</if>>
-	<<if getvar("$locat['katja']") == 30 and (katjaQW['know_going_to_teaching_degree'] == 1 or mid($start_type,1,2) == 'sg')>>
+	<<if getvar("$locat['katja']") == 30 and (katjaQW['know_going_to_teaching_degree'] == 1 or setup.startingCharacterTagsIncludes('sg'))>>
 		You see your classmate <<link "Katja">><<gt 'katja_chat' 'coffee_hole'>><</link>> sitting at a table with a pile of books, a cup of coffee and a plate of food.
 	<</if>>
 	<!-- !!if locat['albina'] = 17 and AlbinaQW['know_albina_uni'] > 0 or mid($start_type,1,2) = 'sg'):-->
 	<!-- !!'You see <<link "Albina">><<gt 'city_coffee_hole' 'albina'>><</link>> sitting at a table with a woman who has her back turned to you.'-->
 	<!-- !!end-->
-	<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") >= 2 and $time.day == 2 and getvar("$nerd_game['fixed_uni_day']") == 0 and $time.hour >= 18>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") >= 2 and $time.day == 2 and getvar("$nerd_game['fixed_uni_day']") == 0 and $time.hour >= 18>>
 		You see some familiar faces sitting in one of the corners. Some of the <<link "nerds">><<gt 'nerd_game_night' 'crash_gamenight_uni'>><</link>> you went to school with back in Pavlovsk are gathered around a table. It looks like they're playing some sort of game.
 	<</if>>
 	<<if $nerd_game['game_day'] == $time.daystart and $time.hour == 18>>
@@ -54,7 +54,7 @@
 	<</if>>
 	<<if $time.weekday < 6 and $time.hour >= 17>>
 		<<set $temprand = rand(1,10)>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") == 2>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") == 2>>
 			<<if getvar("$temprand") == 1>>
 				You see a familiar face sitting at one of the tables, your classmate <<link "Lazar.">><<gt 'city_coffee_hole' 'lazar'>><</link>>
 			<<elseif getvar("$temprand") == 2>>
@@ -157,7 +157,7 @@
 	<<set $menu_arg = 'counter'>>
 	<<set $menu_off = 0>>
 	<<set $time.minutes += 5>>
-	<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") >= 2 and ((($time.weekday == 2 or $time.weekday == 4 or $time.weekday == 7) and $time.hour >= 18) or ($time.weekday == 5 and $time.hour >= 10 and $time.hour < 16))>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") >= 2 and ((($time.weekday == 2 or $time.weekday == 4 or $time.weekday == 7) and $time.hour >= 18) or ($time.weekday == 5 and $time.hour >= 10 and $time.hour < 16))>>
 		<<gt 'city_coffee_hole' 'anushka_work'>>
 	<<else>>
 		<<set $temprand = rand(1,2)>>
@@ -496,7 +496,7 @@
 			<<set $meet_kendra = 1>>
 			<<run $npcs.set('A84','rel',45)>>
 			<<image "characters/shared/headshots_main/big84.jpg">>
-			<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+			<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 				<p>You start talking with her, telling her that you live in Pavlovsk and are in your final year of school. She replies by saying she's a student from the Republic of Congo who attends the local university on a student visa. You talk about a wide range of subjects for a while before she eventually says, "You're beautiful. I love making pretty little Russian bitches my slaves. Call me Mistress Kendra, $pc.name_nick, and become mine." Should you call her mistress? You have no doubt where that will lead.</p>
 			<<else>>
 				<p>You start talking with her and tell her a bit about yourself, and she replies by saying that she's a student from the Republic of Congo attending the local university on a student visa. You talk about a wide range of subjects for a while before she eventually says, "You're beautiful. I love making pretty little Russian bitches my slaves. Call me Mistress Kendra, $pc.name_nick, and become mine." Should you call her mistress? You have no doubt where that will lead.</p>

+ 1 - 1
sugarcube/src/locations/city/city_drugden.tw

@@ -33,7 +33,7 @@ A local drug den, where you know addicts come to buy and use heroin in peace.
 		<<actCLA 'Ask for cocaine'>>
 			<<gt 'city_drugden' 'cocaine'>>
 		<</actCLA>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$snarkozak") == 0>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$snarkozak") == 0>>
 			<<actCLA 'Ask for a drop-off point in Pavlovsk'>>
 	<<setn $time.minutes += 5>> <<gs 'events' 'narkozakladka'>>
 <</actCLA>>

+ 2 - 2
sugarcube/src/locations/city/city_industrial.tw

@@ -101,9 +101,9 @@
 	<<else>>
 		The community centre is currently closed. It's only open during the week between 09:00 and 17:00.
 	<</if>>
-	<<if $time.hour >= 9 and $time.hour <= 17 and (mid($start_type,1,2) != 'sg' or getvar("$SchoolAtestat") == 0) or getvar("$bumtolik") > 3>>
+	<<if $time.hour >= 9 and $time.hour <= 17 and (!setup.startingCharacterTagsIncludes('sg') or getvar("$SchoolAtestat") == 0) or getvar("$bumtolik") > 3>>
 		<<link "Mercy clinic">><<gt 'buklinik' 'start'>><</link>> is open.
-	<<elseif ($time.hour < 9 or $time.hour > 17) and (mid($start_type,1,2) != 'sg' or getvar("$SchoolAtestat") == 0) or getvar("$bumtolik") > 3>>
+	<<elseif ($time.hour < 9 or $time.hour > 17) and (!setup.startingCharacterTagsIncludes('sg') or getvar("$SchoolAtestat") == 0) or getvar("$bumtolik") > 3>>
 		Mercy clinic is closed.
 	<</if>>
 	<<if $time.hour >= 8 and $time.hour <= 20>>

+ 1 - 1
sugarcube/src/locations/city/city_island.tw

@@ -68,7 +68,7 @@ The university and shops and clubs that cater to the students dominate this area
 	The <<link "University dorms">><<gt 'uni_dorm' 'start'>><</link>> offers small, but cheap, living space, for university students.
 
 <</if>>
-<<if getvar("$pcs_magik") >= 1 and getvar("$mainQW") == 0 and mid($start_type,1,3) == 'uni'>>
+<<if getvar("$pcs_magik") >= 1 and getvar("$mainQW") == 0 and setup.startingCharacterTagsIncludes('uni')>>
 	<<set $menu_off = 1>>
 	<<set $mainQW = 1>>
 	<<image "locations/city/citycenter/lab/event/main.jpg">>

+ 2 - 2
sugarcube/src/locations/city/city_sauna.tw

@@ -223,9 +223,9 @@
 						<<set $finances.cash -= 850>>
 					<</if>>
 					<<if getvar("$disable_autosave") == 0>>
-						<<if mid($start_type,1,4) == 'city'>>
+						<<if setup.startingCharacterTagsIncludes('city')>>
 							savegame 'autosave_city.sav'
-						<<elseif mid($start_type,1,3) == 'uni'>>
+						<<elseif setup.startingCharacterTagsIncludes('uni')>>
 							savegame 'autosave_uni.sav'
 						<<else>>
 							savegame 'autosave_sg.sav'

+ 27 - 27
sugarcube/src/locations/pavlov/disco/pav_disco.tw

@@ -99,7 +99,7 @@
 		<<actCLA 'Go to the toilets'>>
 			<<gt 'gdktoilet' 'start'>>
 		<</actCLA>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") <= 1>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") <= 1>>
 			You see a few of your <<link "classmates">><<gt 'pav_disco_classmates' 'classmates'>><</link>>. Some of them dancing, while others stick to their own groups and talk.
 
 		<</if>>
@@ -107,7 +107,7 @@
 			<<gt 'dimaRevenge' 5 'disco'>>
 
 		<</if>>
-		<<if rand(1,3) == 2 and $npcs.get('A25','slutStatus',0) < 1 and $soniadisco_day != $time.daystart and getvar("$SchoolAtestat") == 0 and $time.month > 9 and $npcs.get('A25','grupTipe') != 5 and mid($start_type,1,2) == 'sg' and $q.school?.get('attendedDays') > 0 and $time.hour < 22>>
+		<<if rand(1,3) == 2 and $npcs.get('A25','slutStatus',0) < 1 and $soniadisco_day != $time.daystart and getvar("$SchoolAtestat") == 0 and $time.month > 9 and $npcs.get('A25','grupTipe') != 5 and setup.startingCharacterTagsIncludes('sg') and $q.school?.get('attendedDays') > 0 and $time.hour < 22>>
 			You notice Sonia talking to Vitek about something.
 			<<actCLA 'Watch Sonia'>>
 				<<set $soniadisco_day = $time.daystart>> <<gt 'soniadisco' 'start'>>
@@ -230,13 +230,13 @@
 						<<run $q.school.func('groupRelInc','gopniks',1)>>
 						You're having a lot of fun out on the dance floor. Most people would have a hard time telling you were drunk as you expertly move your body in a seductive manner to the beat of the music.
 					<</if>>
-					<<if mid($start_type,1,2) == 'sg' and getvar("$katjaQW['QWstage']") > 1 and rand(1,10) == 1>>
+					<<if setup.startingCharacterTagsIncludes('sg') and getvar("$katjaQW['QWstage']") > 1 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'katja_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A25','rel') >= 50 and rand(1,10) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A25','rel') >= 50 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,10) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A144','rel') >= 50 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,10) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<</if>>
 				<<elseif $pc.alko < 10>>
@@ -265,13 +265,13 @@
 							<<run $q.school.func('groupRelInc','gopniks',2)>>
 							You're very drunk and forget that you don't have any panties on. Most people would have a hard time knowing you were very drunk as you expertly move your body around in a seductive manner, but you are too drunk to notice your skirt riding up, exposing your pussy to the observant people on the dance floor with you.
 						<</if>>
-						<<if mid($start_type,1,2) == 'sg' and getvar("$katjaQW['QWstage']") > 1 and rand(1,5) == 1>>
+						<<if setup.startingCharacterTagsIncludes('sg') and getvar("$katjaQW['QWstage']") > 1 and rand(1,5) == 1>>
 							<<gt 'pav_disco' 'katja_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A25','rel') >= 50 and rand(1,7) == 1>>
+						<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A25','rel') >= 50 and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'sonia_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
+						<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'anushka_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,7) == 1>>
+						<<elseif setup.startingCharacterTagsIncludes('sg') and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'albina_too_drunk'>>
 						<</if>>
 					<<else>>
@@ -295,13 +295,13 @@
 							<<run $q.school.func('groupRelInc','jocks',-1)>>
 							You're very drunk, but are having a lot of fun out on the dance floor anyway. Most people would have a hard time knowing you were drunk as you expertly move your body around in a seductive manner to the beat of the music.
 						<</if>>
-						<<if mid($start_type,1,2) == 'sg' and getvar("$katjaQW['QWstage']") > 1 and rand(1,5) == 1>>
+						<<if setup.startingCharacterTagsIncludes('sg') and getvar("$katjaQW['QWstage']") > 1 and rand(1,5) == 1>>
 							<<gt 'pav_disco' 'katja_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A25','rel') >= 50 and rand(1,7) == 1>>
+						<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A25','rel') >= 50 and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'sonia_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
+						<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'anushka_too_drunk'>>
-						<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,7) == 1>>
+						<<elseif setup.startingCharacterTagsIncludes('sg') and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,7) == 1>>
 							<<gt 'pav_disco' 'albina_too_drunk'>>
 						<</if>>
 					<</if>>
@@ -311,13 +311,13 @@
 					<<run $q.school.func('groupRelInc','gopniks',-1)>>
 					<<image "locations/pavlovsk/community/disco/wasted_dance.jpg">>
 					You're far too drunk and are barely able to stay on your feet. You're mostly just drunkenly bumping into other people as you try and dance.
-					<<if mid($start_type,1,2) == 'sg' and getvar("$katjaQW['QWstage']") > 1 and rand(1,3) == 1>>
+					<<if setup.startingCharacterTagsIncludes('sg') and getvar("$katjaQW['QWstage']") > 1 and rand(1,3) == 1>>
 						<<gt 'pav_disco' 'katja_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A25','rel') >= 50 and rand(1,5) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A25','rel') >= 50 and rand(1,5) == 1>>
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,5) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A144','rel') >= 50 and rand(1,5) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,5) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand(1,5) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<</if>>
 				<</if>>
@@ -365,25 +365,25 @@
 				<<elseif $pc.alko < 4>>
 					You're tipsy and stand against the wall while watching the others dance.
 				<<elseif $pc.alko < 6>>
-					<<if mid($start_type,1,2) == 'sg' and getvar("$katjaQW['QWstage']") > 1 and rand(1,10) == 1>>
+					<<if setup.startingCharacterTagsIncludes('sg') and getvar("$katjaQW['QWstage']") > 1 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'katja_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A25','rel') >= 50 and rand(1,10) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A25','rel') >= 50 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,10) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A144','rel') >= 50 and rand(1,10) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand (1,10) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand (1,10) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<<else>>
 						You're pretty drunk and stand against the wall for support as you watch the others dance.
 					<</if>>
 				<<else>>
-					<<if mid($start_type,1,2) == 'sg' and getvar("$katjaQW['QWstage']") > 1 and rand(1,5) == 1>>
+					<<if setup.startingCharacterTagsIncludes('sg') and getvar("$katjaQW['QWstage']") > 1 and rand(1,5) == 1>>
 						<<gt 'pav_disco' 'katja_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A25','rel') >= 50 and rand(1,7) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A25','rel') >= 50 and rand(1,7) == 1>>
 						<<gt 'pav_disco' 'sonia_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and $npcs.get('A144','rel') >= 50 and rand(1,7) == 1>>
 						<<gt 'pav_disco' 'anushka_too_drunk'>>
-					<<elseif mid($start_type,1,2) == 'sg' and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand (1,7) == 1>>
+					<<elseif setup.startingCharacterTagsIncludes('sg') and (getvar("$AlbinaQW['Friends']") == 2 or ($npcs.get('A23','rel') >= 70 and ($q.school.func('isGroupMember','cool') or $q.school.func('isGroupMember','jocks') or $q.school.func('isGroupMember','nerds')))) and rand (1,7) == 1>>
 						<<gt 'pav_disco' 'albina_too_drunk'>>
 					<<else>>
 						You're too drunk to dance and lean against the wall for support to stop yourself from falling.
@@ -445,7 +445,7 @@
 				<<gt 'pav_disco'>>
 			<</actCLA>>
 		<</actCLA>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 			<<actCLA 'Look for your classmates'>>
 	<<gt 'pav_disco_classmates' 'classmates'>>
 <</actCLA>>

+ 2 - 2
sugarcube/src/locations/pavlov/gkafe.tw

@@ -6,7 +6,7 @@
 		<<image "locations/pavlovsk/trainstation/cafe/gkafe2.jpg">>
 		A small shabby cafe attached to the train station.
 		/*<<gs 'gkafe' 'menu'>>
-		<<if mid($start_type,1,2) == 'sg'>>
+		<<if setup.startingCharacterTagsIncludes('sg')>>
 			<<if getvar("$SchoolBlock") == 0>>
 				<<if func('homes_properties', 'has_access', 'homeParents')>>
 					<p>Since your <<=$npcs.get('A29','nickname')>> works here, you can eat-in for free.</p>
@@ -94,7 +94,7 @@
 		<</actCLA>>
 	<<else>>
 		
-		<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 			<<if (getvar("$sunWeather") == 0 or getvar("$weather.temperature") <= 0) and ($time.hour >= 18 and $time.hour < 20 and $time.weekday < 6) or ($time.weekday >= 6 and $time.hour >= 9 and $time.hour < 20)>>
 				'<<link 'Vitek, Dan and Vasily'>><<setn $time.minutes += 3>><<gt  'gopskver'>><</link>> are sitting at a table in the far corner.'
 			<</if>>

+ 1 - 1
sugarcube/src/locations/pavlov/hotel/pav_hotel.tw

@@ -404,7 +404,7 @@ setup.npcs["pav_hotel_receptionist"] = {
 			<</actCLA>>
 		<</actCLA>>
 	<</if>>
-	<<if $npcs.get('A217','rel') > 19 and $proshotelday != $time.daystart and mid($start_type,1,2) == 'sg' and getvar("$TwinQW") < 0>>
+	<<if $npcs.get('A217','rel') > 19 and $proshotelday != $time.daystart and setup.startingCharacterTagsIncludes('sg') and getvar("$TwinQW") < 0>>
 		<!-- !!! TwinQW: 0 quest not started; > 0: quest started; < 5: talking with sis; 5: sis agreed; 6: finished-->
 		<!-- !!! changing 'TwinQW < 0' in the above if statement to 'TwinQW < 1' reenables the quest line-->
 		<!-- !!! Kevin Smarts:-->

+ 3 - 3
sugarcube/src/locations/pavlov/lake/pav_lake.tw

@@ -22,14 +22,14 @@
 			Your ice skating skill is <<=$pc.skillLevel("iceskating")>>.
 		<</if>>
 	<</if>>
-	<!--<<if mid($start_type,1,2) == 'sg' and ($time.month <= 2 or $time.month == 12)>>
+	<!--<<if setup.startingCharacterTagsIncludes('sg') and ($time.month <= 2 or $time.month == 12)>>
 		<<if $time.weekday >= 6 and $time.hour >= 8 and $time.hour <= 11>>
 			Looking out over the frozen lake, you see a figure in the distance figure skating and doing all types of crazy moves. Stepping onto the ice and skating out, you notice that it's <<link "Veronika">><<gt 'gschool_socialchg1' 'tVeronika'>><</link>>.
 		<</if>>
 	<</if>>-->
 	<!--
 	<<if getvar("$konki_cloth") == 1 or getvar("$pcs_ski_worn") == 0>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$weather.temperature") >= 20 and getvar("$sunWeather") == 1 and $time.month >= 5 and $time.month <= 9 and $time.hour >= 12 and $time.hour <= 14 and (($time.isSchoolHoliday == 0 and $time.weekday == 7) or (getvar("$kanikuli") > 0 and $time.weekday % 2 == 0))>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$weather.temperature") >= 20 and getvar("$sunWeather") == 1 and $time.month >= 5 and $time.month <= 9 and $time.hour >= 12 and $time.hour <= 14 and (($time.isSchoolHoliday == 0 and $time.weekday == 7) or (getvar("$kanikuli") > 0 and $time.weekday % 2 == 0))>>
 			<<if $wardrobe.clothingworntype == 'nude'>>
 				As you walk down to the beach area of the lake, you see the jocks and cool kids hanging out and hope none of them have seen you naked. You should put on a bikini before approaching them if you want to hang out, or just avoid them and do your own thing today.
 			<<else>>
@@ -39,7 +39,7 @@
 				<</actCLA>>
 			<</if>>
 		<</if>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and (($time.month >= 3 and $time.month <= 5) or ($time.month >= 9 and $time.month <= 11)) and $time.weekday <= 5 and $time.hour >= 15 and $time.hour <= 20 and $q.christina?.get('subpath') == 1 and $socialchg['tchristina_day'] != $time.daystart>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and (($time.month >= 3 and $time.month <= 5) or ($time.month >= 9 and $time.month <= 11)) and $time.weekday <= 5 and $time.hour >= 15 and $time.hour <= 20 and $q.christina?.get('subpath') == 1 and $socialchg['tchristina_day'] != $time.daystart>>
 			<<link "<<npc 'A18'>><</npc>>">><<gt 'Zvereva_sub_1' 'chris_sub'>><</link>> is standing by the beach looking out over the lake as Lina stands next to her, breathing heavily.
 		<</if>>
 		<<gs 'camera' 'check_location'>>

+ 1 - 1
sugarcube/src/locations/pavlov/lake/pav_lake_nude.tw

@@ -30,7 +30,7 @@
 	<center>This small natural beach is hidden away from the general public on an inlet of the lake, and is only accessible through a nearby forest trail. Other than those seeking privacy and some of the local kids, nobody really comes here outside of winter, when people come to use the nearby sauna.</center>
 	<center>The lake in Pavlovsk has been frozen over ever since winter arrived. However, the ice is broken in a small part of the inlet, so those brave enough to take a dip in the icy cold water can.</center>
 <</if>>
-/*<<if mid($start_type,1,2) == 'sg' and $time.month >= 3 and $time.month <= 8 and $time.weekday >= 6 and $time.hour >= 8 and $time.hour <= 10 and $ivanfedorseennaked != $time.daystart and rand(0,3) == 0 and getvar("$fedorKozlovQW") >= 0>>
+/*<<if setup.startingCharacterTagsIncludes('sg') and $time.month >= 3 and $time.month <= 8 and $time.weekday >= 6 and $time.hour >= 8 and $time.hour <= 10 and $ivanfedorseennaked != $time.daystart and rand(0,3) == 0 and getvar("$fedorKozlovQW") >= 0>>
 	<<if $wardrobe.clothingworntype == 'nude'>>
 		<<arouse 'flash' -5 `['exhibitionism']`>>
 		<<run $pc.fameInc('pav','sex',3)>>

+ 1 - 1
sugarcube/src/locations/pavlov/pav_clinic.tw

@@ -551,7 +551,7 @@
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
-		<<if getvar("$pc.narkoman") == 1 and mid($start_type,1,2) == 'sg'>>
+		<<if getvar("$pc.narkoman") == 1 and setup.startingCharacterTagsIncludes('sg')>>
 			<<actCLA 'Seek help for your weakness and pain'>>
 				<<set $menu_off = 1>>
 				<<set $time.minutes += 5>>

+ 1 - 1
sugarcube/src/locations/pavlov/pav_commercial.tw

@@ -29,7 +29,7 @@
 <</if>>
 -->
 <!--
-<<if mid($start_type,1,2) == 'sg' and $time.hour < 4 and getvar("$motherWorry") == 0 and getvar("$SchoolAtestat") == 0 and getvar("$pc.age") < 18 and func('homes_properties', 'has_access', 'homeParents')>>
+<<if setup.startingCharacterTagsIncludes('sg') and $time.hour < 4 and getvar("$motherWorry") == 0 and getvar("$SchoolAtestat") == 0 and getvar("$pc.age") < 18 and func('homes_properties', 'has_access', 'homeParents')>>
 	<<set $motherWorry = 1>>
 <</if>>
  -->

+ 3 - 3
sugarcube/src/locations/pavlov/pav_library.tw

@@ -13,10 +13,10 @@
 /*<<if getvar("$q.school.homeworkLeft") > 0>>
 	You could do your homework with the help of one of the computers.
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and $time.isSchoolHoliday == 0 and $time.weekday < 6 and $nerdstudynight['day'] != $time.daystart and $time.hour > 14>>
+<<if setup.startingCharacterTagsIncludes('sg') and $time.isSchoolHoliday == 0 and $time.weekday < 6 and $nerdstudynight['day'] != $time.daystart and $time.hour > 14>>
 	The nerds are sitting at a table studying together.
 <</if>>
-<<if mid($start_type,1,2) == 'sg' and $time.isSchoolHoliday == 0 and $time.weekday > 5 and $time.hour >= 12 and $time.hour < 14>>
+<<if setup.startingCharacterTagsIncludes('sg') and $time.isSchoolHoliday == 0 and $time.weekday > 5 and $time.hour >= 12 and $time.hour < 14>>
 	<<if $nataliaQW['library_day_check'] != $time.daystart>>
 		<<setinit $nataliaQW['library_day_check'] = $time.daystart>>
 		<<if rand(0,3) == 0>>
@@ -209,7 +209,7 @@
 			If you had homework to do, you could use one of the computers here to do so.
 		<</if>>
 	<</if>>
-	/*<<if mid($start_type,1,2) == 'sg' and $time.isSchoolHoliday == 0 and $time.weekday < 6 and $nerdstudynight['day'] != $time.daystart and $time.hour > 14>>
+	/*<<if setup.startingCharacterTagsIncludes('sg') and $time.isSchoolHoliday == 0 and $time.weekday < 6 and $nerdstudynight['day'] != $time.daystart and $time.hour > 14>>
 		<<actCLA 'Join the nerd`s study group'>>
 			<<gt 'pav_library_nerdstudy' 'nerd_study_night'>>
 		<</actCLA>>

+ 4 - 4
sugarcube/src/locations/pavlov/pav_park.tw

@@ -164,11 +164,11 @@
 			<<gt 'rex_events' 'skver'>>
 		<</actCLA>>
 	<</if>>
-	<<if $time.weekday >= 6 and $time.hour >= 8 and $time.hour <= 9 and mid($start_type,1,2) == 'sg' and $socialchg['tVanya_day'] != $time.daystart>>
+	<<if $time.weekday >= 6 and $time.hour >= 8 and $time.hour <= 9 and setup.startingCharacterTagsIncludes('sg') and $socialchg['tVanya_day'] != $time.daystart>>
 		<<link "Vanya">><<gt 'gschool_socialchg1' 'tVanya'>><</link>> is out on a light jog and is slowly approaching you.
 
 	<</if>>
-	<<if mid($start_type,1,2) == 'sg' and getvar("$locat['<<npc 'A18'>><</npc>>']") == 9 and $socialchg['tChris_Lina_jog'] != $time.daystart>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$locat['<<npc 'A18'>><</npc>>']") == 9 and $socialchg['tChris_Lina_jog'] != $time.daystart>>
 		You spot <<link "<<npc 'A18'>><</npc>>">><<gt 'Zvereva_events' 'Chris_Lina_park'>><</link>> and Lina jogging around the park.
 
 	<</if>>
@@ -180,7 +180,7 @@
 			<<gt 'kseniyaQW' 'event1' 1>>
 
 		<</if>>
-		<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0 and getvar("$mey_vika['mey_vika_qw']") > 0 and getvar("$mey_vika['mey_vika_qw']") < 27 and $mey_vika['qw_day'] != $time.daystart and getvar("$locat['Vicky']") == 11>>
+		<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0 and getvar("$mey_vika['mey_vika_qw']") > 0 and getvar("$mey_vika['mey_vika_qw']") < 27 and $mey_vika['qw_day'] != $time.daystart and getvar("$locat['Vicky']") == 11>>
 			<<gs 'mey_vika_events' 'park_meet'>>
 		<<else>>
 			<<gs 'pav_parkev' 'go_for_walk1'>>
@@ -473,7 +473,7 @@
 		<<else>>
 			<p>It's pretty dark now and you have nowhere to stay nearby. Maybe you should try to sleep on a bench?</p>
 		<</if>>
-		<<if mid($start_type,1,2) == 'sg'>>
+		<<if setup.startingCharacterTagsIncludes('sg')>>
 			<p>You could also try your luck at Uncle Shulgin's apartment?</p>
 
 		<</if>>

+ 1 - 1
sugarcube/src/locations/pavlov/pav_train_hall.tw

@@ -30,7 +30,7 @@
 		<</if>>
 	<</if>>*/
 	/*
-	<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 
 		<<if ($sunWeather == 0 or $weather.temperature <= 0) and $time.hour >= 18 and $time.hour < 20 and $time.weekday < 6>>
 			You see your classmates <<link "Vitek, Dan and Vasily">><<set $time.minutes +  = 3>> <<set $prevloc = $loc>> <<gt 'gopskver'>><</link>> hanging around here.

+ 3 - 3
sugarcube/src/locations/pavlov/residential/pav_complex.tw

@@ -10,7 +10,7 @@
 
 	<<datingNPCsShow>>
 
-	/*<<if $time.weekday <= 5 and getvar("$cheerleaders_on") == 0 and $time.hour >= 14 and $time.hour <= 18 and mid($start_type,1,2) == 'sg' and (getvar("$LariskaQW['story']") == 0 or getvar("$LariskaQW['story']") == 1) and $npcs.get('A13','rel') > 40 and $lariska_ball != $time.daystart>>
+	/*<<if $time.weekday <= 5 and getvar("$cheerleaders_on") == 0 and $time.hour >= 14 and $time.hour <= 18 and setup.startingCharacterTagsIncludes('sg') and (getvar("$LariskaQW['story']") == 0 or getvar("$LariskaQW['story']") == 1) and $npcs.get('A13','rel') > 40 and $lariska_ball != $time.daystart>>
 		Walking along the apartment complex, you hear a bouncing sound. Turning the corner, you see <<link "Lariska">><<gt 'lariska_storyline' 'story_intro'>><</link>> hitting a volleyball against a wall.
 
 	<</if>>
@@ -185,7 +185,7 @@
 		Between the garages and the courtyard is a series of smaller storage buildings that can be rented, as well as the complex's maintenance and laundry buildings.
 		The layout of the buildings leaves a maze of walkways between them, which are a popular place for kids to play or for teenagers to hang out.
 	</p>
-	<<if mid($start_type,1,2) == 'sg'>>
+	<<if setup.startingCharacterTagsIncludes('sg')>>
 		<p>Your stepfather's garage is around here somewhere.</p>
 		<<ConnectedLocation "Stepfather's garage" 'gargazel' '' 'locations/pavlovsk/resident/apartment/garage/gargazel_empty.jpg' 5>>
 	<</if>>
@@ -496,7 +496,7 @@
 		<<actCLA 'Go back to the courtyard'>>
 			<<set $time.minutes += 2>> <<gt 'pav_complex' 'start'>>
 		<</actCLA>>
-		<<if mid($start_type,1,2) == 'sg'>>
+		<<if setup.startingCharacterTagsIncludes('sg')>>
 			<<actCLA 'Go to your stepfather`s garage'>>
 				<<setn $time.minutes += 5>> <<gt 'gargazel'>>
 			<</actCLA>>

+ 3 - 3
sugarcube/src/locations/pavlov/residential/pav_residential.tw

@@ -246,7 +246,7 @@
 	<<gs 'street_event' 'pav_residential' 'extras'>>
 
 	<!--
-	<<if mid($start_type,1,2) == 'sg' and ($time.hour >= 8 or $time.hour < 23) and $pc.cumAtLocation(11) == 1 and rand(0, 3) == 0 and $npcdaycheck[54] != $time.daystart>>
+	<<if setup.startingCharacterTagsIncludes('sg') and ($time.hour >= 8 or $time.hour < 23) and $pc.cumAtLocation(11) == 1 and rand(0, 3) == 0 and $npcdaycheck[54] != $time.daystart>>
 		<<set $menu_off = 1>>
 		<<setinit $npcdaycheck[54] = $time.daystart>>
 		<<if getvar("$sosedknow") == 0>>
@@ -265,7 +265,7 @@
 
 	<!--
 	Magic Stuff
-	<<if getvar("$pcs_magik") >= 1 and getvar("$mainQW") == 0 and mid($start_type,1,2) == 'sg' and $start_subtype != 'nomagic'>>
+	<<if getvar("$pcs_magik") >= 1 and getvar("$mainQW") == 0 and setup.startingCharacterTagsIncludes('sg') and $start_subtype != 'nomagic'>>
 		<<set $menu_off = 1>>
 		<<set $mainQW = 1>>
 		<<image "locations/city/citycenter/lab/event/main.jpg">>
@@ -279,7 +279,7 @@
 	 -->
 
 	<!-- AndRev?
-	 <<if mid($start_type,1,2) == 'sg' and getvar("$AndRev") == 1 and ($time.hour >= 22 or $time.hour <= 2) and rand(1,100) >= 90 and $AndRevstart != $time.daystart>>
+	 <<if setup.startingCharacterTagsIncludes('sg') and getvar("$AndRev") == 1 and ($time.hour >= 22 or $time.hour <= 2) and rand(1,100) >= 90 and $AndRevstart != $time.daystart>>
 		<<set $menu_off = 1>>
 		<<image "locations/city/citycenter/lab/event/main.jpg">>
 		It is late and you are hurrying to get home when you are suddenly grabbed from behind. A large hand covers your mouth and you cannot scream. A powerful arm wraps around you and lifts you from your feet. You are dragged into an alleyway between two buildings and the arm around you loosens for just a minute.

+ 6 - 1
sugarcube/src/macros/0macros.twee-config.json

@@ -142,7 +142,12 @@
 			"warn": {"description":"Writes a string to the warn-console","parameters": ["text"]},
 			"error": {"description":"CAUTION: My hold execution of some code in subpassages and widgets. Only use this for severe errors. Also writes a string to the error-console","parameters": ["text"]},
 			"debug": {"container": true},"todo": {"container": true},
-			"debugVar": {},
+			"debugVar": {
+				"description":"Prints the requested variables (e.g. '$pc' in Debug-mode",
+				"parameters": [
+					"text"
+				]
+			},
 			"notice":{"container": true},
 			"addTimeLink":{},
 			"datingNPCsShow":{},

+ 1 - 1
sugarcube/src/macros/debug.tw

@@ -8,7 +8,7 @@
 <</widget>>
 
 <<widget 'debugVar'>>
-<<set _debugVar = _args[0]>>
+<<set _debugVar = _args[0]>><<if typeof _debugVar === "string">><<set _debugVar = getvar(_debugVar)>><</if>>
 <<debug>>
 <pre>
 <<=JSON.stringify(_debugVar,null,'\t') >>

+ 3 - 3
sugarcube/src/menu/characterOverview.tw

@@ -1259,7 +1259,7 @@
 
 	<</if>>
 	<b>Other Skills</b>
-	<<if getvar("$SchoolAtestat") == 0 and mid($start_type,1,2) == 'sg'>>
+	<<if getvar("$SchoolAtestat") == 0 and setup.startingCharacterTagsIncludes('sg')>>
 		<<if getvar("$schoolprogul") > 0>>
 			<p>School absenteeism - schoolprogul days</p>
 
@@ -1340,7 +1340,7 @@
 		It has been <<daystart>> days since the game started.
 
 	<</if>>
-	<<if getvar("$SchoolAtestat") == 0 and mid($start_type,1,2) == 'sg'>>
+	<<if getvar("$SchoolAtestat") == 0 and setup.startingCharacterTagsIncludes('sg')>>
 		<<gs 'grades' 'assing_grade_description' 'school'>>
 		<<gs 'grades' 'grade above' 'school' 90>>
 		<<gs 'grades' 'grade above' 'school' 70>>
@@ -2253,7 +2253,7 @@
 			In the residential area it is well known by all the guys that you are a whore.
 
 		<</if>>
-		<<if mid($start_type,1,2) == 'sg'>>
+		<<if setup.startingCharacterTagsIncludes('sg')>>
 			<<if getvar("$motherKnowWhore") > 0>>
 				Your mother knows that you are sexually active and considers you a whore.
 			<<elseif getvar("$motherKnowSpravka") > 0>>

+ 26 - 13
sugarcube/src/npcs/_system/NPCsDict.js

@@ -257,19 +257,32 @@ class NPCsDict{
         return data;
     }
 
-    npcFitsFilter(npcId,filters={}){
-        for (const [filterKey, filterValue] of Object.entries(filters)) {
-            let npcValue = undefined;
-            if(typeof filterValue === "number")
-                npcValue = this.get(npcId,filterKey,0);
-            else
-                npcValue = this.get(npcId,filterKey,'');
-            if(npcValue != filterValue){
-                return false;
-            }
-        }
-        return true;
-    }
+	npcFitsFilter(npcId,filters={}){
+		outerLoop:for (const [filterKey, filterValue] of Object.entries(filters)) {
+			let npcValue = undefined;
+
+			if(typeof filterValue === "object" && filterValue.filter){
+				
+				switch(filterValue.filter){
+					case 'minMax':
+						let min = filterValue.min ?? -Infinity;
+						let max = filterValue.max ?? Infinity;
+						npcValue = this.get(npcId,filterKey,0);
+						if(npcValue > max || npcValue < min)
+							return false;
+						continue outerLoop;
+				}
+			}
+			else if(typeof filterValue === "number")
+				npcValue = this.get(npcId,filterKey,0);
+			else
+				npcValue = this.get(npcId,filterKey,'');
+			if(npcValue != filterValue){
+				return false;
+			}
+		}
+		return true;
+	}
 
 	npcLikesAppearance(npcId){
 		let appearanceDemand = this.get(npcId,'appearanceDemand',[null,null,5]);

+ 2 - 2
sugarcube/src/npcs/katja/katja_chat.tw

@@ -406,7 +406,7 @@
 
 	-->
 	<<warn "CONVERSION ERROR 4029e684e881e264583b0951f1d08c9b">>
-	<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") >= 2 and ((($time.weekday == 2 or $time.weekday == 4 or $time.weekday == 7) and $time.hour >= 18) or ($time.weekday == 5 and $time.hour >= 10 and $time.hour < 16))>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") >= 2 and ((($time.weekday == 2 or $time.weekday == 4 or $time.weekday == 7) and $time.hour >= 18) or ($time.weekday == 5 and $time.hour >= 10 and $time.hour < 16))>>
 		<<if $npcs.get('A144','rel') >= 60>>
 			<p>After a while, Anushka comes over and gives you a friendly smile. "Welcome to the Coffee Hole. Need your hole filled with something hot and black again? We also have <i>freshly glazed</i> pastries if that's more your thing," she says with a wink, even making ordering coffee sound dirty.</p>
 			You smile at her. "You are so bad."
@@ -443,7 +443,7 @@
 <<if $location_var[$here][0] == 'coffee_hole_event'>>
 	<<set $time.minutes += 5>>
 	<!-- !! This is to have random events when you are sitting with Katja-->
-	<<if mid($start_type,1,2) == 'sg' and getvar("$time.yearstart") >= 2 and ((($time.weekday == 2 or $time.weekday == 4 or $time.weekday == 7) and $time.hour >= 18) or ($time.weekday == 5 and $time.hour >= 10 and $time.hour < 16)) and getvar("$katjaQW['brunch_bought']") == 1>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$time.yearstart") >= 2 and ((($time.weekday == 2 or $time.weekday == 4 or $time.weekday == 7) and $time.hour >= 18) or ($time.weekday == 5 and $time.hour >= 10 and $time.hour < 16)) and getvar("$katjaQW['brunch_bought']") == 1>>
 		<<setinit $katjaQW['brunch_bought'] = 0>>
 		You and Katja spend a few minutes chatting about school, what you've both been up to and gossiping about your old school mates while waiting on Anushka to return with the order. Minutes later, Anushka comes back with a tray carrying the order.
 		<<if $npcs.get('A144','rel') >= 60>>

+ 3 - 3
sugarcube/src/npcs/martin/MartinTalk.tw

@@ -697,7 +697,7 @@
 		<p>Martin smiles and shakes his head. "Can you imagine? A guy like me in Hollywood?"</p>
 		The warmth in his expression makes you forget about the actor. "Sounds like you and your siblings are close," you note, sharing his smile.
 		"Yeah, I guess we are. We don't talk much, but," he taps his chest, just above the heart, "in here, where it counts, we care about each other. Always have."
-		<<if mid($start_type,1,2) == 'sg' and ($npcs.get('A33','rel') >= 50 or $npcs.get('A34','rel') >= 50)>>
+		<<if setup.startingCharacterTagsIncludes('sg') and ($npcs.get('A33','rel') >= 50 or $npcs.get('A34','rel') >= 50)>>
 			"Yeah, I know what you mean," you nod, thinking of your own siblings. "No matter where they are, you always know that somebody''s there for you."
 			<p>"You have siblings?"</p>
 			<!-- FAILED TO CONVERT
@@ -708,7 +708,7 @@
 			-->
 			<<warn "CONVERSION ERROR 983a76ea4b6947bf14f45eb18a6ee10b">>
 			"There''s always a favorite sibling," he chuckles. "Usually the one who shared the most candy with you."
-		<<elseif mid($start_type,1,2) == 'sg'>>
+		<<elseif setup.startingCharacterTagsIncludes('sg')>>
 			"I wish I knew what that's like. I have siblings, but we're not very close."
 			"I was the same around your age," Martin admits, "but trust me: That can change quickly. Sometimes, the tiniest event can pull you closer together."
 		<<else>>
@@ -792,7 +792,7 @@
 		"Yeah, but that doesn''t earn any money, and probably won''t for some time, so..." You shrug.
 		<p>Martin nods understandingly. "I get it. At least you have a place to live near the center. Though it can get pretty wild there during the weekend, I heard," he comments, "and drunk people can be unpredictable. So, you watch yourself, okay?"</p>
 		<span class="innerThought">He wouldn't be Martin if he didn't tell me to "watch out" at least once a day,</span> you think and roll your eyes, but still smile and say "I always do" before he has to get back to work.'
-	<<elseif mid($start_type,1,2) == 'sg' and func('homes_properties', 'has_access', 'homeParents')>>
+	<<elseif setup.startingCharacterTagsIncludes('sg') and func('homes_properties', 'has_access', 'homeParents')>>
 		"I still live with my parents, in Pavlovsk," you admit.
 		"Oh, well, that can't be easy at your age."
 		"Yeah, it... has some downsides. But my parents are cool, and money''s tight, so..."

+ 1 - 1
sugarcube/src/npcs/nicholas/nichApartment.tw

@@ -449,7 +449,7 @@
 	<p>Tanya is so giddy that you almost don't dare to voice your concerns: "And where do you get the idea that your stepfather would employ me? I've never worked as a maid before and I'm sure that, with his kind of money, he could get a much better one."</p>
 	<!-- !!TODO: check whether PC has worked as maid in hotel. If so she will mention or think it.-->
 	"Believe me, if I ask him <i>nicely</i>, he will hire you", Tanya smiles lasciviously.
-	<<if mid($start_type,1,2) == 'sg' and getvar("$SchoolAtestat") == 0>>
+	<<if setup.startingCharacterTagsIncludes('sg') and getvar("$SchoolAtestat") == 0>>
 		<<actCLA 'Refuse (still at school)'>>
 			<<set $nichJobRefused = 1>>
 			<p>"I'm still at school Tanya. I can't work here full time and go to school can I? It is sweet that you want me to be here all the time though."</p>

+ 14 - 1
sugarcube/src/start/characterSelect.tw

@@ -1,9 +1,10 @@
 :: introCharacterSelectScript[script]
 setup.getStartingCharacter = function(id){
 	let currentData = clone(setup.startingCharacters[id]);
+	currentData.inheritance = [id];
 	if("parent" in currentData){
 		let parentData = setup.getStartingCharacter(currentData.parent);
-		let newcurrentData = setup.mergeDeep(parentData,currentData);
+		let newcurrentData = setup.mergeDeep(parentData,currentData,{inheritance:[...parentData.inheritance,...currentData.inheritance]});
 
 		currentData = newcurrentData;
 		delete currentData.parent;
@@ -26,6 +27,12 @@ setup.getStartingCharactersByFilter = function(filters,shallow = true){
 	return result;
 }
 
+setup.startingCharacterTagsIncludes = function(tag){
+	const startData = setup.getStartingCharacter(State.variables.startCharacter) ?? {};
+	const startDataTags = startData.tags ?? [];
+	return startDataTags.includes(tag);
+}
+
 
 :: introCharacterSelectWidgets[widget]
 	<<widget 'characterSelect'>>
@@ -98,8 +105,13 @@ setup.getStartingCharactersByFilter = function(filters,shallow = true){
 	<<set _optionKey =  $location_var[$here][0]>>
 	<<set _optionData = setup.getStartingCharacter(_optionKey)>>
 
+	<!-- Meta Data -->	
+	<<set $startCharacter = _optionKey>>
+
+	<!-- Appearance -->	
 	<<set $pc.avatar = _optionData.image>>
 
+	<!-- Time -->	
 	<<if _optionData.time>>
 		<<if _optionData.time.start>>
 			<<run $time.initTime(
@@ -185,5 +197,6 @@ setup.getStartingCharactersByFilter = function(filters,shallow = true){
 			<</switch>>
 		<</for>>
 	<</for>>
+
 	
 

+ 0 - 2
sugarcube/src/start/city/deprecated/intro_city_m.tw

@@ -2,8 +2,6 @@
 <<set $here = 'intro_city_m'>>
 <<set $ARGS = $location_var[$here]>>
 
-<<set $start_type to null>>
-<<set $start_type = 'city_m'>>
 <<if $location_var[$here][0] == 'start'>>
 	<<set $menu_off = 1>>
 	<<image "system/1_openings/shared/site_gadukino.jpg">>

+ 1 - 1
sugarcube/src/start/city/deprecated/intro_city_select.tw

@@ -50,7 +50,7 @@
 	<<set $pc.pcs_hydra = 100>>
 	<<set $pc.pcs_sleep = 100>>
 	<<set $pc.willpowermax = 60>>
-	<<if mid($start_type,1,4) == 'city'>>
+	<<if setup.startingCharacterTagsIncludes('city')>>
 		<<gs 'homes_properties' 'give_access' 'homeParents'>>
 		<<set $SchoolAtestat = 1>>
 		<<gs 'homes_properties' 'rent_property' 'city_apartment' 61>>

+ 0 - 3
sugarcube/src/start/city/deprecated/intro_city_tg.tw

@@ -3,9 +3,6 @@
 <<set $ARGS = $location_var[$here]>>
 <!-- !!2022/03/17-->
 
-<<set $start_type to null>>
-<<set $start_type = 'city_tg'>>
-<<set $start_subtype = 'tg'>>
 <<if $location_var[$here][0] == 'start'>>
 	<<set $menu_off = 1>>
 	<h2>Apartment</h2>

+ 1 - 1
sugarcube/src/start/city/deprecated/intro_initialization_city.tw

@@ -35,7 +35,7 @@
 
 <</if>>
 <!-- !! apartment access and two months of rent paid-->
-<<if mid($start_type,1,4) == 'city'>>
+<<if setup.startingCharacterTagsIncludes('city')>>
 	<<gs 'homes_properties' 'give_access' 'homeParents'>>
 	<<set $SchoolAtestat = 1>>
 	<<gs 'homes_properties' 'rent_property' 'city_apartment' 61>>

+ 0 - 3
sugarcube/src/start/city/intro_city.tw

@@ -92,9 +92,6 @@ setup.startingCharacters.city_orphan_average = {
 <<set $here = 'intro_city'>>
 <<set $ARGS = $location_var[$here]>>
 <<if $location_var[$here][0] == 'start'>>
-	
-	<<set $start_type to null>>
-	<<set $start_type = 'city'>>
 	<<set $start_subtype = 'nomagic'>>
 	<<gt 'intro_city' 'city_intro'>>
 <</if>>

+ 0 - 2
sugarcube/src/start/intro_sg_m.tw

@@ -2,8 +2,6 @@
 <<set $here = 'intro_sg_m'>>
 <<set $ARGS = $location_var[$here]>>
 
-<<set $start_type to null>>
-<<set $start_type = 'sg_m'>>
 <<if $location_var[$here][0] == 'four'>>
 	<<set $menu_off = 1>>
 	<<image "system/1_openings/shared/site_gadukino.jpg">>

+ 0 - 3
sugarcube/src/start/intro_sg_tg.tw

@@ -2,9 +2,6 @@
 <<set $here = 'intro_sg_tg'>>
 <<set $ARGS = $location_var[$here]>>
 
-<<set $start_type to null>>
-<<set $start_subtype = 'tg'>>
-<<set $start_type = 'sg_tg'>>
 <<if $location_var[$here][0] == 'start'>>
 	<<set $locM = 'intro_sg_tg'>>
 	<<set $locM_arg = 'start'>>

+ 0 - 3
sugarcube/src/start/scenario_selection.tw

@@ -7,7 +7,6 @@
 		You will be able to customize this start further in the following steps.
 	</p>
 	<<actCLA '<center><b>Schoolgirl</b></center>'>>
-		<<set $start_type = 'sg'>>
 		<<set $start_subtype = 'nomagic'>>
 		<<gt 'start_selection_schoolgirl_location'>><!-- File: location_and_time.tw -->
 	<</actCLA>>
@@ -22,7 +21,6 @@
 	</p>
 
 	<<actCLA '<center><b>Male</b></center>'>>
-		<<set $start_type = 'sg_tg'>>
 		<<gt 'intro_sg_tg' 'start'>>
 	<</actCLA>>
 
@@ -52,7 +50,6 @@
 
 
 	<<actCLA '<center><b>City</b></center>'>>
-		<<set $start_type = 'city'>>
 		<<set $start_subtype = 'nomagic'>>
 		<<gt 'intro_city'>>
 	<</actCLA>>

+ 5 - 5
sugarcube/src/start/schoolgirl/intro_sg_select_char.tw

@@ -95,7 +95,8 @@ setup.startingCharacters.sg_starting_category = {
 				}
 			}
 		}
-	}
+	},
+	tags: ['sg']
 }
 
 setup.startingCharacters.nerd = {
@@ -144,7 +145,8 @@ setup.startingCharacters.nerd = {
 				}
 			}
 		}
-	}
+	},
+	tags: ['nerd']
 };
 
 setup.startingCharacters.nerd_queen = {
@@ -1968,9 +1970,7 @@ setup.startingCharacters.ugly = {
 		He became a gopnik and the two of you slowly started hanging out often, although you still consider each other to be friends.
 		On the plus side, doing well in school has made your parents happy and has left you with some extra spending money as a reward for your hard work. Now...
 	</p>
-	<<actCLA 'I am the Queen of the Nerds!'>>
-		<<gt 'intro_sg_select_char_nerdqueen'>>
-	<</actCLA>>
+
 	<<actCLA 'I am a good student'>>
 		<<gt 'intro_sg_select_char_goodstudent'>>
 	<</actCLA>>

+ 0 - 2
sugarcube/src/start/uni/intro_uni.tw

@@ -3,8 +3,6 @@
 <<set $ARGS = $location_var[$here]>>
 
 <<if $location_var[$here][0] == 'start'>>
-	<<set $start_type to null>>
-	<<set $start_type = 'uni'>>
 	<<set $start_subtype = 'nomagic'>>
 	<<gt 'intro_uni' 'intro'>>
 <</if>>

+ 0 - 4
sugarcube/src/start/uni/intro_uni_m.tw

@@ -2,10 +2,6 @@
 <<set $here = 'intro_uni_m'>>
 <<set $ARGS = $location_var[$here]>>
 <<if $location_var[$here][0] == 'start'>>
-	
-	<<set $start_type to null>>
-	<<set $start_type = 'uni_m'>>
-	<<set $menu_off = 1>>
 	<<image "system/1_openings/shared/site_gadukino.jpg">>
 	<p>After your last year of school, your grades were good enough for you to get into university. Your <<=$npcs.get('A29','nickname')>> convinced you to spend the day at your grandparents farm in the village of Gadukino, but there's nothing to do here but watch animals graze and help your grandparents, which does earn you some extra cash, even if it's very tedious.</p>
 	<<actCLA 'Take a walk'>>

+ 0 - 3
sugarcube/src/start/uni/intro_uni_tg.tw

@@ -4,9 +4,6 @@
 <!-- !2022/01/09-->
 <!-- !!The TF Story Elements-->
 
-<<set $start_type to null>>
-<<set $start_type = 'uni_tg'>>
-<<set $start_subtype = 'tg'>>
 <<if $location_var[$here][0] == 'start'>>
 	<<set $menu_off = 1>>
 	<h2>Apartment</h2>

+ 1 - 1
sugarcube/src/version.js

@@ -1,4 +1,4 @@
-Config.saves.version = 18;
+Config.saves.version = 19;
 
 Macro.add('version', {
 	skipArgs : true,