1
0
Kaynağa Gözat

[WIP] Dynamic Housing & Artem

Stephan Fuchs 9 ay önce
ebeveyn
işleme
1b9b1901f9

+ 4 - 0
glife.code-workspace

@@ -30,6 +30,10 @@
 			{
 				"filePath": "sugarcube\\src\\npcs\\_system\\NPCsDict.js",
 				"group": "Default"
+			},
+			{
+				"filePath": "sugarcube\\src\\quests\\quests.js",
+				"group": "Default"
 			}
 		]
 	}

+ 3 - 0
sugarcube/src/PassageFooter.tw

@@ -19,6 +19,9 @@
 		<<run $location.passage = _thisMainPassage>>
 		<<set $menuReturnPassage = _thisMainPassage>>
 		<<set _menuDeactivated = false>>
+		<<if !_tags.includes('dynamicHousing') && $dynamicHousingRoom>>
+			<<unset $dynamicHousingRoom>>
+		<</if>>
 	<<elseif _tags.includes('quest')>>
 		<!-- This should be able to be returned to -->
 		<<set _menuDeactivated = false>>

+ 35 - 30
sugarcube/src/activities/school/chats/gschool_nerd_chats.tw

@@ -5,49 +5,54 @@
 		<<if _npcNote = $npcs.get('A2','notes')>><p>_npcNote</p><hr/><</if>>
 		<<if getvar("$artQW") == 3 or getvar("$artQW") == 20>>
 			<<run $npcs.inc('A2','rel',1)>>
-			Artem notices you walking over, quickly grabs an empty chair and makes room for you to sit next to him. "I was worried we wouldn''t see each other today." He jokes, but you can tell there''s a part of him that was being sincere. Artem isn''t one for public affection, but he still can't go without some kind of physical contact with you, which leaves him sitting close enough to you that your legs bump and rub against each other under the table as you talk.
+			<<npc 'A2'>><</npc>> notices you walking over, quickly grabs an empty chair and makes room for you to sit next to him. "I was worried we wouldn''t see each other today." He jokes, but you can tell there''s a part of him that was being sincere. <<npc 'A2'>><</npc>> isn''t one for public affection, but he still can't go without some kind of physical contact with you, which leaves him sitting close enough to you that your legs bump and rub against each other under the table as you talk.
 		<<elseif $npcs.get('A2','rel') >= 50 and $pc.fame('pav_slut') < 200>>
 			<<run $npcs.inc('A2','rel',1)>>
 			<<if $q.school.func('isGroupMember','nerds')>>
-				<p>"There you are $pc.name_nick. How's it going?" Artem greets you as you sit down. "I figure we can get a head-start on Yenotin's lesson while we talk." He moves the textbook towards you so you can look at it. While you work, Artem keeps up a lively conversation, talking about a range of different topics.</p>
+				<p>"There you are $pc.name_nick. How's it going?" <<npc 'A2'>><</npc>> greets you as you sit down. "I figure we can get a head-start on Yenotin's lesson while we talk." He moves the textbook towards you so you can look at it. While you work, <<npc 'A2'>><</npc>> keeps up a lively conversation, talking about a range of different topics.</p>
 			<<else>>
-				<p>"Hey, Artem, how's it going?" you ask while taking a seat at a desk across from him. His desk is covered with worksheets and a stack of textbooks.</p>
+				<p>"Hey, <<npc 'A2'>><</npc>>, how's it going?" you ask while taking a seat at a desk across from him. His desk is covered with worksheets and a stack of textbooks.</p>
 				<p>"Oh hey $pc.name_nick. I'm just putting together a study guide," he tells you with a smile while continuing to write in his notebook. As you watch him work, you realize that he's writing quite a lot, more than is needed for one person.</p>
 				<p>"Who are you writing all that for?" you ask.</p>
 				"Well, I tutor a lot of the jocks, so it's mostly for them, but I also help some of the popular kids."
 				<p>"You mean actually tutoring them or just doing their work for them?" you ask suspiciously with a raised brow.</p>
-				Artem chuckles sheepishly, obviously a bit flustered by the question. "The jocks aren''t too bad and the popular kids... Well, they need all the help they can get and, well, I'm happy to help if I can," he replies before quickly changing the subject. You decide not to insist and keep him company while he works.
+				<<npc 'A2'>><</npc>> chuckles sheepishly, obviously a bit flustered by the question. "The jocks aren''t too bad and the popular kids... Well, they need all the help they can get and, well, I'm happy to help if I can," he replies before quickly changing the subject. You decide not to insist and keep him company while he works.
 			<</if>>
 		<<elseif $npcs.get('A2','rel') <= 20 and $pc.fame('pav_slut') < 200>>
 			<<run $npcs.inc('A2','rel',1)>>
 			<<if $q.school.func('isGroupMember','nerds')>>
-				You try to chat to Artem, but he doesn''t seem all that interested in the conversation. His answers are short and he doesn''t even bother to stop writing in his notebook as you talk.
+				You try to chat to <<npc 'A2'>><</npc>>, but he doesn't seem all that interested in the conversation. His answers are short and he doesn't even bother to stop writing in his notebook as you talk.
 			<<else>>
-				<p>"Sorry $pc.name_nick, but why are you talking to me? We're not exactly friends you know..." Artem asks weakly. He's careful not to offend you, but it's clear he's hesitant to talk to you.</p>
+				<p>"Sorry $pc.name_nick, but why are you talking to me? We're not exactly friends you know..." <<npc 'A2'>><</npc>> asks weakly. He's careful not to offend you, but it's clear he's hesitant to talk to you.</p>
 			<</if>>
 		<<elseif $pc.fame('pav_slut') >= 200>>
 			<p>When he sees you walking over, he gives you a disgusted look. "Get away from me, you disgusting slut!" he says as he moves away from you.</p>
 		<<else>>
 			<<run $npcs.inc('A2','rel',1)>>
-			You strike up a conversation with Artem. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.
+			You strike up a conversation with <<npc 'A2'>><</npc>>. He seems a bit hesitant at first, but quickly engages you in some idle chatter about school.
 		<</if>>
 		<<actCLA 'Time for the next class'>>
 			<<gt 'gschool_lessons' 'short_break'>>
 		<</actCLA>>
-		<<if getvar("$artemLernQW") == 0 and $npcs.get('A2','rel') > 20>>
+		<<if $npcs.get('A2','rel') > 20 and !$q.questIsStarted('artemTutoring')>>
 			<<actCLA 'Ask for help studying'>>
-				<<set $artemLernQW = 1>>
+				<<run $q.questStart('artemTutoring')>>
 				<<image "characters/shared/headshots_main/big2.jpg">>
+				<p>
 				<<if $pc.fame('pav_slut') >= 200>>
-					You approach Artem and explain how you're struggling in school and could really use his help studying.
-					Artem looks around. "I've been hearing some pretty bad rumors about you. So long as you don't tell anyone, you can come by my place after school and we can do our homework together."
+					You approach <<npc 'A2'>><</npc>> and explain how you're struggling in school and could really use his help studying.
+					<<npc 'A2'>><</npc>> looks around. "I've been hearing some pretty bad rumors about you. So long as you don't tell anyone, you can come by my place after school and we can do our homework together."
 				<<else>>
-					You approach Artem and explain how you're struggling in school and could really use his help studying.
-					<p>Artem is a bit surprised. "What... You want my help? I thought you were doing great in school, but if you need my help I would be happy to assist. Meet me at my place if you want to do homework together."</p>
+					You approach <<npc 'A2'>><</npc>> and explain how you're struggling in school and could really use his help studying.
+					<<npc 'A2'>><</npc>> is a bit surprised. "What... You want my help? I thought you were doing great in school, but if you need my help I would be happy to assist. Meet me at my place if you want to do homework together."
 				<</if>>
-				<<actCLA 'Time for the next class'>>
+				</p>
+				<p>
+					<<npc 'A2'>><</npc>> lives in the same building as your parents.
+				</p>
+				<<act 'Time for the next class'>>
 					<<gt 'gschool_lessons' 'short_break'>>
-				<</actCLA>>
+				<</act>>
 			<</actCLA>>
 		<</if>>
 
@@ -169,7 +174,7 @@
 		<<elseif getvar("$juliaQW['study_unlocked']") == 0 and $npcs.get('A12','rel') >= 60>>
 			<<setinit $juliaQW['study_unlocked'] = 1>>
 			<<if $pc.fame('pav_slut') >= 175>>
-				You approach Julia and explain how you're struggling in school and could really use her help studying. She obliquely comments on your damaged reputation at school, but agrees to help you anyway. She doesn''t seem to care much either way as long as you don't tell anyone.
+				You approach Julia and explain how you're struggling in school and could really use her help studying. She obliquely comments on your damaged reputation at school, but agrees to help you anyway. She doesn't seem to care much either way as long as you don't tell anyone.
 			<<else>>
 				<p>You approach Julia and explain how you're struggling in school and could really use her help studying. She thinks it over for a second, but happily agrees. "Sure thing, $pc.name_nick. That could be fun!"</p>
 			<</if>>
@@ -403,7 +408,7 @@
 				<h2>Girls Bathroom</h2>
 				<<image "locations/pavlovsk/school/bathroom/girlsbathroom.jpg">>
 				You grab Natasha by the hand and pull her along with you. "Come to the bathroom with me."
-				She looks at you questioningly, but doesn''t protest as you pull her into the bathroom and past a few girls using the mirrors. You take her into a stall with you. You sit down on the toilet and pull down your panties, then spread your legs. "Down on your knees. Time to pay off a little debt."
+				She looks at you questioningly, but doesn't protest as you pull her into the bathroom and past a few girls using the mirrors. You take her into a stall with you. You sit down on the toilet and pull down your panties, then spread your legs. "Down on your knees. Time to pay off a little debt."
 				She looks a little shocked at first, but gets down on her knees and lowers her face to your crotch.
 				<<actCLA 'Continue'>>
 					<!-- !!ToDo: Expand this content (nutluck) - this needs a lot of code work too (Alaratt)-->
@@ -416,7 +421,7 @@
 					<<set $orgasm_or = 'yes'>>
 					<<image "characters/pavlovsk/school/girl/natasha/sex/school/Natschoolowe.jpg">>
 					Her tongue starts to lick your clit. You bite your lip to try and keep from moaning too loudly as you lean back and relax as you let Natasha pleasure you with her tongue. She's getting a lot better at this and if you're not mistaken, she's starting to like it a lot.
-					She starts using her fingers on you as well and is really getting into it as you start to pant and moan. Clamping a hand over your mouth to keep yourself from crying out, it doesn''t take her long to bring you to a climax.
+					She starts using her fingers on you as well and is really getting into it as you start to pant and moan. Clamping a hand over your mouth to keep yourself from crying out, it doesn't take her long to bring you to a climax.
 					<<gs 'arousal' 'cuni' -10 'lesbian' 'dom'>>
 					Your whole body shudders as the orgasm rocks your body and you grind your pussy against her face as it does. Once the sensation passes, you look down and see Natasha smiling up at you, obviously pleased with herself. You lean down and give her a long slow passionate kiss, tasting your own pussy juices on her lips. A few seconds later, the bell rings and you both merrily hurry to class.
 					<<arousalEnd>>
@@ -677,13 +682,13 @@
 				<p>She doesn't even look at you. "Sorry $pc.name_nick, but I'm very busy with this now and I don't think we have anything to say each other anyway, considering we have two very different hobbies..."</p>
 				Even though she tries not to be rude, you know exactly what she's referring to with her remark.
 				When she notices you still standing there, she turns off the game, gets up and walks over to the other nerds in the classroom.
-				"I just wanted to..." you start, but she's already gone and can't hear you. "... ask you something... It doesn''t matter, I guess."
+				"I just wanted to..." you start, but she's already gone and can't hear you. "... ask you something... It doesn't matter, I guess."
 				As you still have a lot of time before the next lesson starts, you get up and refresh yourself.
 			<<else>>
 				<p>"Hello $pc.name_nick. Are you looking for something?" Zinaida asks when she sees you approaching her.</p>
 				"No, not really. I just wanted to come and have a quick chat with you and see what you're doing on your phone," you reply.
 				"Oh, okay... I'm playing this game. I don't think you know it..." she says indifferently.
-				When you're tired of standing, you sit next to her on the desk. She glances at you and moves back a little. She doesn''t tell you to leave, but it's very clear she wouldn''t like to be associated with you in any way.
+				When you're tired of standing, you sit next to her on the desk. She glances at you and moves back a little. She doesn't tell you to leave, but it's very clear she wouldn''t like to be associated with you in any way.
 				<p>You watch her playing for a few minutes while occasionally asking about the game. She only shrugs or gives you a one-word answer.</p>
 				You don't want to bother her more, so you wish her good luck with the game and go back to your desk to wait for the next lesson.
 			<</if>>
@@ -703,13 +708,13 @@
 				<p>"Oh, hey $pc.name_nick. Uhm, I'm sorry, but we're in the middle of a very important conversation," she says on a cold, indifferent tone.</p>
 				You wait for a minute or so and hope they'll finish chatting shortly. When you realize they're so immersed in the conversation, you tap Zinaida''s shoulder.
 				<p>She turns around immediately. "Sorry, but I told you we're busy here! Maybe you could just go and hang out with your own social group in the hallway?" With that, she turns back and starts talking to Feofan.</p>
-				You understand it was a sign that she isn''t really interested in talking to you since she doesn''t think you''d have too much in common to talk about.
+				You understand it was a sign that she isn''t really interested in talking to you since she doesn't think you''d have too much in common to talk about.
 			<<else>>
-				You see Zinaida talking to Artem and Gerasim about something and decide to approach her.
+				You see Zinaida talking to <<npc 'A2'>><</npc>> and Gerasim about something and decide to approach her.
 				<p>"Hey Zinaida, I've wanted to talk to you for a long time!" you say and grab her arm and pull her away from the boys.</p>
 				<p>She seems confused, but doesn't argue. "What's up $pc.name_nick?" she asks with an inquiring look.</p>
 				"You're always on your phone, so you might know the solution for this problem," you reply as you take your phone out of your pocket and show her your social media accounts. "You see, there''s things I would like to change, but I don't know how it works."
-				"Yeah, I play a lot on my phone, but that doesn''t mean..." she starts to say then looks around, hoping someone will intervene and save her from this conversation. "Fine, let me see..." she says when she realizes there''s no way out.
+				"Yeah, I play a lot on my phone, but that doesn't mean..." she starts to say then looks around, hoping someone will intervene and save her from this conversation. "Fine, let me see..." she says when she realizes there''s no way out.
 				<p>Although she's not happy about it, she helps you as much as she can. She's not even half done when you hear the bell and she gives your phone back. "You hear that? The teacher will be here any second, so next time maybe?"</p>
 			<</if>>
 		<<elseif $q.school.func('isGroupMember','jocks')>>
@@ -730,7 +735,7 @@
 			<<else>>
 				<p>"Hey $pc.name_nick," Zinaida greets you as you approach her.</p>
 				<p>"Hey, what's up? Is there any new sports games on your phone?" you ask as you sit next to her, although you know she rarely plays any such games since that's not her main interest.</p>
-				While you're not the best of friends and it's clear you're not her first choice to talk to, she doesn''t mind chatting with you now and then.
+				While you're not the best of friends and it's clear you're not her first choice to talk to, she doesn't mind chatting with you now and then.
 				You start talking about different topics, but she mostly goes on about the latest games and the characters in them, while you talk about everything related to sport.
 				<p>You also talk about how sport is evolving today. Analytics is becoming more and more important, so maths and physics also play a role in the development of sport and individual performance. "That's so interesting! Who knew sports and maths could be connected?" she says.</p>
 				<p>After spending a few more minutes talking, you hear the bell signaling that the break is over and the next lesson is about to start. "Thanks Zina, talk to you later!" you say as you find your seat.</p>
@@ -746,7 +751,7 @@
 				"No, but don't even worry about it. It's probably nothing." You then hear the bell ringing and she goes to take her seat before the teacher arrives.
 			<<elseif $npcs.get('A142','rel') <= 20>>
 				<p>As your lesson is over, you head over to Zinaida and greet her with a smile. "Hey Zina, what're you doing?"</p>
-				She's so busy looking at her phone that she doesn''t even notice you standing next to her. Furthermore, she has her earphones in, so she can't hear you either.
+				She's so busy looking at her phone that she doesn't even notice you standing next to her. Furthermore, she has her earphones in, so she can't hear you either.
 				When you realize she won''t notice you, you tap her shoulder and she looks up and takes her earphones out.
 				<p>"Hi $pc.name_nick, sorry I didn't notice you. Is there anything important?" she asks, clearly hoping that she can get back to playing on her phone.</p>
 				"No. I just wanted to say hi and ask if you're okay," you reply. She just nods, indicating that everything''s fine before plugging her earphones back in and continuing what she was doing.
@@ -768,7 +773,7 @@
 				<p>After a few minutes, you hear the bell. "Time to go back to living that mousy life of yours $pc.name_nick," she says with a huge smile.</p>
 			<<elseif $npcs.get('A142','rel') <= 20>>
 				<p>You see Zinaida talking to her fellow nerds and decide to strike up a conversation with her. "Hey, what's up?"</p>
-				She continues talking to them and doesn''t even look at you as you stand near her. You can't decide whether she's being arrogant or is just trying to avoid you.
+				She continues talking to them and doesn't even look at you as you stand near her. You can't decide whether she's being arrogant or is just trying to avoid you.
 				<p>You get closer and greet her again. "Hey Zinaida, what's up?" This time, she realizes that you actually spoke to her and turns to you while trying to avoid looking you in the eye.</p>
 				<p>"Hey $pc.name_nick. Sorry, I thought you were talking to someone else. I mean, why would you talk to me? We're not friends, not even in the same circle. Or, are you here to mock me, insult me and everything else?"</p>
 				<p>You raise your eyebrows, a little surprised. Your intention was only to talk to her. "What? No, I just wanted to talk."</p>
@@ -795,14 +800,14 @@
 				<p>She's writing something in her notebook and doesn't even notice you at first until you get closer. "Oh hi $pc.name_nick. I'm sorry, but as you can see I'm busy with something."</p>
 				<p>"I was wondering if we could talk? I heard some things about this new video game and wanted to ask for your opinion."</p>
 				"As I said before, I'm very busy right now, so sorry, but I don't have time to talk or anything. If you don't mind, please..." she replies as she turns away.
-				You don't say a word. You just leave and give her space. You sit on a chair and start thinking about how cruel life as an outcast is if even Zinaida doesn''t want to talk to you about video games. It's surprising how she''d miss a chance to brag about her achievements.
+				You don't say a word. You just leave and give her space. You sit on a chair and start thinking about how cruel life as an outcast is if even Zinaida doesn't want to talk to you about video games. It's surprising how she''d miss a chance to brag about her achievements.
 			<<else>>
 				As you get up and start looking around, you notice Zinaida sitting at her desk. "Hey Zinaida," you greet her as you approach.
 				<p>"Oh, hi $pc.name_nick. How's it going?" she replies.</p>
 				<p>"Mind if we talk?" you ask as you sit on the chair next to her.</p>
 				She looks around the room and when she realizes all her group mates are busy doing something or talking to each other, she sighs. "Okay, I don't really have anything to do, so I guess we can talk..."
 				You understand she's only available because she has nothing better to do, but you're glad you don't have to spend the break all alone at least.
-				She soon starts talking about video games. It seems she doesn''t mind who she's talking to as long as somebody listens. She tells you some interesting stories that happened to her, and complains about the prices of the games.
+				She soon starts talking about video games. It seems she doesn't mind who she's talking to as long as somebody listens. She tells you some interesting stories that happened to her, and complains about the prices of the games.
 				"On the other hand, there are always free games to play..." she continues, but points out why free to play games can be more expensive than some of the most popular video games in the long run.
 				After continuing to talk for a few more minutes, she takes her notes out of her backpack. "We'll continue this next time, maybe. But for now, I''d like to check my homework before the lesson starts. See you." With that, she turns to her desk and starts revising her homework.
 			<</if>>
@@ -885,7 +890,7 @@
 							"Sort of..." she replies. "It still explores love, heartbreak and disappointment but has some lovely stuff where the poems explore fluttery feelings and infatuation. They also look at the differences between infatuation and love."
 							<p>"Guess there's a big mixture of sad and happy stuff then?"</p>
 							<p>"Yes. If you like that sort of thing, then it might be worth getting a copy; you can skip one of them if you don't like it too much." After a brief pause, she continues. "Look $pc.name_nick, I know you must be tired of me always telling you to improve your reputation, but you seem nice, and I just want to see you happy and not being bullied all the time."</p>
-							"Actually, it makes a nice change that someone actually cares and doesn''t mock me. You're a good friend, Natalia."
+							"Actually, it makes a nice change that someone actually cares and doesn't mock me. You're a good friend, Natalia."
 							The bell then sounds, so you both head to the next class separately.
 						<</if>>
 					<<else>>
@@ -905,7 +910,7 @@
 							<p>"Hey Natalia. So what's this book about?"</p>
 							"It's another famous Russian love story, but this one has loads of magical stuff, like cats riding on trams and money falling from the sky."
 							<p>You giggle. "Money falling from the sky? Shame that doesn't happen in real life!"</p>
-							Natalia giggles along with you. "In this story, Margarita''s love for the master helps him as he's afraid of his own ideas, but she has to make a huge sacrifice so that his novel doesn''t vanish and they can be safe, together forever."
+							Natalia giggles along with you. "In this story, Margarita''s love for the master helps him as he's afraid of his own ideas, but she has to make a huge sacrifice so that his novel doesn't vanish and they can be safe, together forever."
 							<p>"So what's it called?" you ask.</p>
 							<p>"It's called 'The Master and Margarita' by Mikhail Bulgakov. It's quite a famous book. Have you read it?"</p>
 							"No, but it does sound interesting. I bet it won''t end well though."

+ 9 - 0
sugarcube/src/activities/school/quest_school.tw

@@ -97,6 +97,7 @@
 							<</switch>>
 						<</if>>
 					<</if>>
+					<<set $q.school.homeworkLeft += 1>>
 				<</if>>
 			<<case 'groupRelDeterioration'>>
 				<<for _deteriorationGroup range ['cool','jocks','nerds','gopniks']>>
@@ -805,6 +806,14 @@
 				<<for _gMRI_npcId range _gMRI_npcIds>>
 					<<run $npcs.inc(_gMRI_npcId,'rel',$location_var[$here][3])>>
 				<</for>>
+			<<case 'setRelationshipsByGroups'>>
+				<<for _sRBG = 1; _sRBG <= 6; _sRBG += 1>>
+					<<set _sRBG_filter = {grupTipe:_sRBG}>>
+					<<set _sRBG_npcIds = $npcs.ids(_sRBG_filter)>>
+					<<for _sRBG_npcId range _sRBG_npcIds>>
+						<<run $npcs.set(_sRBG_npcId,'rel',$location_var[$here][_sRBG+1])>>
+					<</for>>
+				<</for>>
 			<<case 'onPostIntro'>>
 				<<for _groupKey, _groupData range $q.school.groups>>
 					<<set $q.school.groups[_groupKey].prev = $q.school.groups[_groupKey].rel>>

+ 1 - 2
sugarcube/src/activities/school/schoolday/breaks/gschool_chats.tw

@@ -124,8 +124,7 @@
 		<<else>>
 			You are using the school uniform cheat and are not wearing a uniform, therefore there are no reactions to your uniform.
 		<</if>>*/
-
-		Artem, Petka, Julia, Natasha, Zinaida, Evgeny, Feofan and Gerasim are sitting around some tables they've moved together.
+		<<npcList `$npcs.ids({'grupTipe': 3})`>> are sitting around some tables they've moved together.
 		<<gs 'gschool_groups' 'nerds'>>
 
 		<p>The outcasts are hiding away from everyone else, hoping that no one will pick on them today.</p>

+ 15 - 5
sugarcube/src/activities/school/schoolday/lessons/pe.tw

@@ -16,7 +16,9 @@
 	<<run $wardrobe.lastWornSet('school_sports')>>
 	<<run $wardrobe.wearOutfit($wardrobe.outfitSports)>>
 	<<image "locations/pavlovsk/school/gym/fizra.jpg">>
-	You arrive in the gym and head straight to the girls locker room. Once inside, you quickly change into your athletic clothes before heading back out into the hall. Once everyone is ready, Coach Pavlovich conducts a roll call to ensure everyone is present.
+	You arrive in the gym and head straight to the girls locker room.
+	Once inside, you quickly change into your athletic clothes before heading back out into the hall.
+	Once everyone is ready, <<npc 'A131'>><</npc>> conducts a roll call to ensure everyone is present.
 	
 	/*<<if $time.weekday == 5 and getvar("$LocalRun") == 0>>
 		<<if getvar("$SchoolSorev") == 0>>
@@ -44,7 +46,7 @@
 			<<run $q.school.func('class_activity_skill','pe', $pc.skillLevel("run"))>>
 			<<gs 'exercise' 'tier2' 1 'vital' 'agil'>>
 			<<image "locations/pavlovsk/school/gym/fizra.jpg">>
-			After the roll call, Coach Pavlovich announces that you will be running today.
+			After the roll call, <<npc 'A131'>><</npc>> announces that you will be running today.
 			<<actCLA 'Run'>>
 				<<if getvar("$temper") >= 10 and getvar("$sunWeather") == 1>>
 					<<either>>
@@ -93,7 +95,7 @@
 						<</actCLA>>
 					<<or>>
 						<<image "locations/pavlovsk/school/gym/nopanstretch.jpg">>
-						<p>"Since the weather is so nice, we will be running outside today. Let's go!" He leads the class outside to the forest trail on the school grounds, near the old school building. He gives everyone time to do a little stretching before the run. As Lina does some stretching, it becomes apparent she forgot her panties. As she stretches, her shorts pull to one side, showing her pussy off to everyone. Before anyone can say anything, she stops and stands up, oblivious to the little show she just gave. Coach Pavlovich then pulls out his stop watch and says "Go!" Everyone then takes off, some faster than others.</p>
+						<p>"Since the weather is so nice, we will be running outside today. Let's go!" He leads the class outside to the forest trail on the school grounds, near the old school building. He gives everyone time to do a little stretching before the run. As Lina does some stretching, it becomes apparent she forgot her panties. As she stretches, her shorts pull to one side, showing her pussy off to everyone. Before anyone can say anything, she stops and stands up, oblivious to the little show she just gave. <<npc 'A131'>><</npc>> then pulls out his stop watch and says "Go!" Everyone then takes off, some faster than others.</p>
 						The rest of the run is very uneventful and peaceful. You enjoyed the quiet time to yourself a great deal.
 						<<actCLA 'Finish your run'>>
 							<<gt 'school_lesson_pe_end'>>
@@ -567,7 +569,7 @@
 				<<image "characters/shared/headshots_main/big18.jpg">>
 				<p>Turning around and making fists you yell "You fucking bitch! I'm going to make you eat your panties before I'm done with you!"</p>
 				<p>She curls her hands into fists, but before she can respond, there is a pounding on the locker doors. "What's going on in there?! Settle down right now or I'm coming in!"</p>
-				The girls hurry up into the locker room in case the Coach Pavlovich actually follows up on his threat. <<npc 'A18'>><</npc>> gives you a dark look before following the others.
+				The girls hurry up into the locker room in case the <<npc 'A131'>><</npc>> actually follows up on his threat. <<npc 'A18'>><</npc>> gives you a dark look before following the others.
 				<<actCLA 'Continue'>>
 					<<gt 'school_lesson_pe_postdress'>>
 				<</actCLA>>
@@ -593,7 +595,7 @@
 				<<image "characters/shared/headshots_main/big18.jpg">>
 				<p>You head straight at her and yell "You fucking bitch! How would you like it if I did that to you?!"</p>
 				<p>She curls her hands into fists, but before she can respond, there is a pounding on the locker doors. "What's going on in there?! Settle down right now or I'm coming in!"</p>
-				The girls hurry in case Coach Pavlovich actually follows up on his threat. <<npc 'A18'>><</npc>> gives you a dark look before following the others.
+				The girls hurry in case <<npc 'A131'>><</npc>> actually follows up on his threat. <<npc 'A18'>><</npc>> gives you a dark look before following the others.
 				<<actCLA 'Continue'>>
 					<<gt 'school_lesson_pe_postdress'>>
 				<</actCLA>>
@@ -611,6 +613,14 @@
 	<<run $wardrobe.wearLastWorn('school_sports',true)>>
 	<<image `'locations/pavlovsk/school/gym/locker/postphys'+rand(1,4)+'.jpg'`>>
 	You finish getting dressed and are ready to leave the gym.
+	<<set $location.passage = 'school_lesson_pe_lockerroom'>>
+	<<act "Mirror">><<gt "mirror" "start">><</act>>
 	<<act 'Leave'>>
 		<<gs 'school_schedule'>>
 	<</act>>
+
+:: school_lesson_pe_lockerroom[public indoors]
+<<image `'locations/pavlovsk/school/gym/locker/postphys'+rand(1,4)+'.jpg'`>>
+	<<act 'Leave'>>
+		<<gs 'school_schedule'>>
+	<</act>>

+ 2 - 1
sugarcube/src/activities/school/schoolday/school_schedule.tw

@@ -97,7 +97,8 @@
 			<<gs 'school_schedule'>>
 		<</act>>
 		<<act 'Leave school'>>
-			<<for _key, _classId range _schoolTimetable[_schoolDay]>>
+			<<set _schoolDay = $time.weekday - 1>>
+			<<for _key, _classId range $q.school.get('timetable')[_schoolDay]>>
 				<<if _classId != 'break' and _classId != 'breakLunch' and _key >= $q.school.period>>
 					<<run $q.school.inc('missedClasses',1)>>
 				<</if>>

+ 8 - 8
sugarcube/src/locations/generic/din_van.tw

@@ -741,7 +741,7 @@
 	<<set $pc.body_write = 0>>
 	<<set $face_write = 0>>
 	<<set $pc.pcs_hairbsh = 0>>
-	<<set $pc.pcs_makeup = 1>>
+	<<set $pc.makeupAmount = 0>>
 	<<if $pc.frost > 0>>
 		<<set $pc.frost = 0>>
 	<</if>>
@@ -1126,8 +1126,8 @@ You brush your teeth and now they are clean and minty fresh.
 					<<=$shave_txt1||''>>
 					<<=$shave_txt2||''>>
 					<<dryOff>>
-					<<gs 'selfplay' 'bathtub_dildo_check'>>
-					<<gs 'selfplay' 'shower_dildo_check'>>
+					/*<<gs 'selfplay' 'bathtub_dildo_check'>>
+					<<gs 'selfplay' 'shower_dildo_check'>>*/
 				<</actCLA>>
 			<</if>>
 		<</if>>
@@ -1650,12 +1650,12 @@ You wash off your makeup.
 	<</if>>
 <</widget>>
 
-:: shaveLegsAndPubic
-	<<set $menu_off = 1>>
+:: shaveLegsAndPubic[event]
+	/*<<set $menu_off = 1>>
 	<<if $locM == 'uni_dorm' and rand(0, 5) == 0>>
 		<<gt 'vann' 'brit1'>>
 
-	<</if>>
+	<</if>>*/
 	<<if $loc == 'gadbana'>>
 		<<video "shared/home/bathroom/shave.mp4">>
 	<<elseif $pc.pcs_pubes <= 10 and getvar("$shave_length") == 2>>
@@ -1713,5 +1713,5 @@ You wash off your makeup.
 	<<set $pc.horny += 5>>
 	<<run $inventory.dec('razor',2)>>
 	<<dryOff>>
-	<<gs 'selfplay' 'bathtub_dildo_check'>>
-	<<gs 'selfplay' 'shower_dildo_check'>>
+	/*<<gs 'selfplay' 'bathtub_dildo_check'>>
+	<<gs 'selfplay' 'shower_dildo_check'>>*/

+ 2 - 0
sugarcube/src/locations/pavlov/residential/pav_complex.tw

@@ -37,6 +37,8 @@
 			, but you are no longer welcome there.
 		<</if>>
 	</p>
+	<<ConnectedLocation 'Enter building' 'parents_stairwell_level1' '' "locations/pavlovsk/resident/apartment/complex.jpg" 3 `{priority:9999,allowedVehicles:['walk']}`>>
+
 	<p>
 	Opposite you is a meager courtyard, which has changed over the years to now include a kid's playground, a basketball court and a small grassy area that's mostly used to play football.
 	A few benches and tables surround it, and there's a handful of small utility sheds tucked away in the corner for tenants to use if they're willing to pay for the extra space.

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

@@ -187,7 +187,7 @@
 	<<set $InvitationToDimkaNYparty to null>>
 <</if>>
 
-<<ConnectedLocation 'Five Eight estate' 'pav_complex' 'start' 'locations/pavlovsk/resident/apartment/complex.jpg' 2 `{priority:10000,hotkeys:['H']}`>>
+<<ConnectedLocation 'Five Eight estate' 'pav_complex' 'start' 'locations/pavlovsk/resident/apartment/complex.jpg' 22 `{priority:10000,hotkeys:['H']}`>>
 <<ConnectedLocation 'Commercial Area' 'pav_commercial' '' 'locations/pavlovsk/gorodok.jpg' 5>>
 <<ConnectedLocation 'Industrial Area' 'pav_industrial' '' 'locations/pavlovsk/factory/pav_factory.jpg' 5>>
 <<ConnectedLocation 'Market' 'pav_market' '' 'locations/pavlovsk/pav_market_day.jpg' 15>>

+ 18 - 5
sugarcube/src/locations/pavlov/residential/pod_ezd.tw

@@ -37,7 +37,7 @@
 	<</if>>
 	There's a <<link "list">><<gt 'pod_ezd' 'occupants'>><</link>> of the people who live here on the wall.
 	Someone put up some <<link "advertisements">><<gt 'pod_ezd' 'pod_objava'>><</link>> on the wall, near the entrance.-->
-	<<ConnectedLocationCode 'Leave the building' 'locations/pavlovsk/resident/apartment/complex.jpg' 1>>
+	<<ConnectedLocationCode 'Leave the building' 'locations/pavlovsk/resident/apartment/complex.jpg' 3>>
 		<<if $time.hour <= 5 and getvar("$motherWorry") == 0 and $pc.age < 18 and func('homes_properties', 'has_access', 'parents_home')>>
 			<<cla>>
 				<font color=red>Are you sure? Your mother will worry if you go out at this time.</font>
@@ -54,10 +54,23 @@
 		<</if>>
 	<</ConnectedLocationCode>>
 	<<ConnectedLocation '2nd Floor' 'parents_stairwell_level2' '' "locations/pavlovsk/resident/apartment/stairs/etaj2.jpg" 1>>
-	<<if getvar("$ArtemBeInHome") > 0 and getvar("$artemQW['artemblok']") == 0>>
-		<<actCLA 'Apartment 2: Artem Chebotarev'>>
-			<<gt 'artemhome' 'home'>>
-		<</actCLA>>
+	<<if $npcs.get('A2','isInvitedHome')>>
+		<<ConnectedLocationCode 'Apartment 2: Artem Chebotarev' 'locations/pavlovsk/resident/apartment/aptdoor.jpg' 1>>
+			<<set _artemLocation = $npcs.location('A2')>>
+			<<switch _artemLocation.location>>
+				<<case 'home'>>
+					<<if _artemLocation.activity.includes('sleep')>>
+						<<msg `'Nobody opens. '+$npcs.get('A2','usedname')+' is most likely sleeping right now.'`>>
+					<<else>>
+						<<gt 'artemhome' 'home'>>
+					<</if>>
+				<<case 'outdoors'>>
+					<<msg `'Nobody opens. '+$npcs.get('A2','usedname')+" doesn't seem to be here right now."`>>
+				<<case 'school'>>
+					<<msg `'Nobody opens. '+$npcs.get('A2','usedname')+' is most likely at school right now.'`>>
+			<</switch>>
+			
+		<</ConnectedLocationCode>>
 
 	<</if>>
 	<<actCLA 'Take the elevator'>>

+ 4 - 1
sugarcube/src/npcs/_npcstatic/compiled/npcstatic1compiled.js

@@ -32,12 +32,13 @@ setup.npcs["A1"] = {
 	defaults:['defaults','group_coolkid'],
 }
 setup.npcs["A2"] = {
-	dna:'1993665716 1616738815 1589755494 1229942753 1120816404 1371564141 1910586302',
+	passage:'npc_artem',
 	firstname:'Artyom',
 	nickname:'Artem',
 	lastname:'Chebotarev',
 	usedname:'Artem',
 	dob:19990209,
+	image:'characters/shared/headshots_main/big2.jpg',
 	notes:'Artem Chebotarev is a typical geek but one could easily be deceived by his looks as he is actually not that bad looking. He does very well in school and is popular with the other geeks, not to mention that thanks to his looks he has befriended a lot of jocks as he is also their tutor outside of school.',
 	gender:0,
 	thdick:'thicker than average',
@@ -468,6 +469,7 @@ setup.npcs["A18"] = {
 	firstname:'Christina',
 	nickname:'Christina',
 	lastname:'Zvereva',
+	image:'characters/shared/headshots_main/big18.jpg',
 	notes:'<<=$npcs.get("A18","usedname")>> is one of your school`s best athletes, and is the strongest girl you know. She has leadership abilities that, together with her tenacity and intelligence, make her having a dominant presence wherever she goes. She is also more than a bit of a bully to most of the other girls in school.',
 	dob:19991226,
 	gender:1,
@@ -693,6 +695,7 @@ setup.npcs["A26"] = {
 	firstname:'Anatoly E.',
 	nickname:'Anatoly E.',
 	lastname:'Tsarev',
+	image:'characters/shared/headshots_main/big26.jpg',
 	notes:'<<=$npcs.get("A26","fullname")>> is the school`s math teacher. He`s a stern teacher, who always demands the best out of his students. His daughter Lera is in your class. He`s married to Vera, who works at the train station as a ticket saleswoman and as a cleaner in the garment factory. There are rumors that sense Lesco came to live with them, his marriage has been on the rocks.',
 	dob:19730307,
 	gender:0,

+ 6 - 2
sugarcube/src/npcs/_npcstatic/compiled/npcstatic3compiled.js

@@ -358,7 +358,7 @@ setup.npcs["A128"] = {
 	firstname:'Makar',
 	nickname:'Makar',
 	lastname:'Vasilyev',
-	usedname:'Mr. Vasilyev',
+	image:'characters/shared/headshots_main/big128.jpg',
 	notes:'Makar Vasilyev is the school`s music, art, and drama teacher. He is always warm and friendly to all of his students and even those not in his class. He always smiles and will always take the time to listen or help out the students. He is well liked by most of the students.',
 	gender:0,
 	dob:19700230,
@@ -404,6 +404,7 @@ setup.npcs["A130"] = {
 	nickname:'Ilya',
 	lastname:'Yenotin',
 	usedname:'Mr. Yenotin',
+	image:'characters/shared/headshots_main/big130.jpg',
 	notes:'Ilya Yenotin is the school`s literature, language and your homeroom teacher. Does his best at keeping everyone happy but is unliked by most of the class, simply because he`s comes off as fake. You can often see him running down the halls chasing down the Gopniks, trying getting them to attend class.',
 	gender:0,
 	dob:19801221,
@@ -422,7 +423,8 @@ setup.npcs["A131"] = {
 	firstname:'Viktor',
 	nickname:'Viktor',
 	lastname:'Pavlovich',
-	usedname:'Mr. Pavlovich',
+	usedname:'Coach Pavlovich',
+	image:'characters/shared/headshots_main/big131.jpg',
 	notes:'Viktor Pavlovich is the school`s P.E. teacher. He looks like a former weight lifter, having a power build with a massive upper body strength. He keeps a black painted paddle he calls the `Black Widow` hanging from his office.  He likes to use it on students, especially female students. He is single, and rumored to be a player. You`ve often seen him with different women around town.',
 	gender:0,
 	dob:19731120,
@@ -559,6 +561,7 @@ setup.npcs["A137"] = {
 	nickname:'Raven',
 	lastname:'Braakman',
 	usedname:'Miss Braakman',
+	image:'characters/shared/headshots_main/big137.jpg',
 	notes:'Raven Braakman is the school`s social sciences and English teacher. She is from South Africa, she married a Russian man and moved to Pavlovsk, a few years ago her husband died in a car accident. She has a strict teacher style, accepting only the best out of her students. It is rumored she is a bit of a party goer in her free time.',
 	gender:1,
 	dob:19730912,
@@ -577,6 +580,7 @@ setup.npcs["A138"] = {
 	nickname:'Arina',
 	lastname:'Orlov',
 	usedname:'Miss Orlov',
+	image:'characters/shared/headshots_main/big138.jpg',
 	notes:'Arina Orlov is the school`s biology and health teacher. She is the youngest teacher at school, having just finished college and this is her first job. She is a bit shy and mousey, which makes many of the students to ignore her during class, she has a bit of a problem controlling her classes. She`s not much older than her students and very cute as well, which causes the boys to pay extra special attention to her.',
 	gender:1,
 	dob:19930307,

+ 25 - 1
sugarcube/src/npcs/_system/NPCsDict.js

@@ -30,6 +30,13 @@ const pronounDict = Object.assign({},pronounDictLowerCase,pronounDictUpperFirst,
                 -1: does not expect a date and won't call asking for one
                     most commonly set to -1 because a date is already scheduled
                 n:  will start calling at day n and ask for a date
+
+
+		rel: Relationship Value / how much the NPC likes you
+		familiarity:
+			0 - stranger
+			1000 - knows everything about each other
+
 */
 
 class NPCsDict{
@@ -94,7 +101,24 @@ class NPCsDict{
 
                 }
             case 'fullname': return this.get(npcId,'firstname')+' '+this.get(npcId,'lastname');
-            case 'usedname': return this.get(npcId,'firstname');
+			case 'title':
+				switch (this.get(npcId,'gender')) {
+					case 0:
+						return 'Mr.'
+					case 1:
+						return 'Mrs.'
+					default:
+						return 'Mrx.'
+				}
+            case 'usedname': 
+                switch (this.get(npcId,'nameScheme','firstname')) {
+                    case 'title_lastname':
+						return `${this.get(npcId,'title')} ${this.get(npcId,'lastname')}`;
+                    case 'firstname':
+                    default:
+                        return this.get(npcId,'firstname');
+                }
+            
         }
 
         if(field.endsWith('_possessive')){

+ 63 - 0
sugarcube/src/npcs/_system/npc.tw

@@ -1,4 +1,65 @@
+:: NPCFunctions[include]
+<<switch $location_var[$here][0]>>
+	<<case 'relationshipDescription'>>
+		<<set $result = ''>>
+
+		<<set _npcFam = $npcs.get($location_var[$here][1],'fam')>>
+		/*<<if _npcFam < 5>>
+			<<set $result += "You don't know each other.">>
+		<<elseif _npcFam < 20>>
+			<<set $result += "You barely know each other.">>
+		<<elseif _npcFam < 100>>
+			<<set $result += "You know little about each other.">>
+		<<elseif _npcFam < 300>>
+			<<set $result += "You are acquainted with each other.">>
+		<<elseif _npcFam < 500>>
+			<<set $result += "You somewhat know each other.">>
+		<<elseif _npcFam < 700>>
+			<<set $result += "You are familiar with each other.">>
+		<<elseif _npcFam < 800>>
+			<<set $result += "You are very familiar with each other.">>
+		<<elseif _npcFam < 900>>
+			<<set $result += "You are extremely familiar with each other.">>
+		<<else>>
+			<<set $result += "You are extremely familiar with each other.">>
+		<</if>>*/
+
+		<<if _npcFam < 5>>
+			<<set $result += "You don't know each other.">>
+		<<elseif _npcFam < 20>>
+			<<set $result += "You barely know each other.">>
+		<<elseif _npcFam < 200>>
+			<<set $result += "You know each other as well as colleagues or class mates do.">>
+		<<elseif _npcFam < 400>>
+			<<set $result += "You know each other as well as friends do.">>
+		<<elseif _npcFam < 600>>
+			<<set $result += "You know each other as well as close friends do.">>
+		<<elseif _npcFam < 800>>
+			<<set $result += "You know each other as well as best friends do.">>
+		<<elseif _npcFam < 900>>
+			<<set $result += "You know each other as well as close family members do.">>
+		<<else>>
+			<<set $result += "You know each other as well as soul mates do.">>
+		<</if>>
+
+		<<set $result += ' '>>
+
+		<<set _npcRel = $npcs.get($location_var[$here][1],'rel')>>
+		<<if _npcRel < 20>>
+			<<set $result += 'Your relationship is awful.'>>
+		<<elseif _npcRel < 40>>
+			<<set $result += 'Your relationship is tense.'>>
+		<<elseif _npcRel < 60>>
+			<<set $result += 'You have a normal relationship.'>>
+		<<elseif _npcRel < 80>>
+			<<set $result += 'You have a good relationship.'>>
+		<<else>>
+			<<set $result += 'You have a great relationship.'>>
+		<</if>>
+<</switch>>
+
 :: NPC_Widgets[widget]
+
 <<widget 'npc' container>>
 	<<set _npcId = _args[0]>>
 	<!-- Present NPCs -->
@@ -19,6 +80,8 @@
 			<<set _note = "<<image '"+_image+"'>>" + _note>>
 		<</if>>
 
+		<<set _note += '<hr/>'+func('NPCFunctions','relationshipDescription',_npcId)>>
+
 		<<if _note>>
 			<<linkWithTooltip _displayedName _note>>_c<</linkWithTooltip>>
 		<<else>>

+ 19 - 9
sugarcube/src/npcs/npcstaticdefaults.tw

@@ -2,12 +2,14 @@
 setup.npcDefaults = {
 	gender:{
 		0:{
-			'spermpot':10000
+			'spermpot':10000,
+			'rel': 50
 		},
 		1:{
 			'thdick':'clitoris',
 			'dick':-1,
-			'spermpot':-1
+			'spermpot':-1,
+			'rel': 50
 		}
 	},
 	body_model:{
@@ -23,24 +25,32 @@ setup.npcDefaults = {
 		'grupTipe': 8
 	},
 	group_family:{
-		'grupTipe': 7
+		'grupTipe': 7,
+		'fam': 850
 	},
 	group_teacher:{
-		'grupTipe': 6
+		'grupTipe': 6,
+		nameScheme: 'title_lastname',
+		'fam': 50
 	},
 	group_outcast:{
-		'grupTipe': 5
+		'grupTipe': 5,
+		'fam': 150
 	},
 	group_gopnik:{
-		'grupTipe': 4
+		'grupTipe': 4,
+		'fam': 150
 	},
 	group_nerd:{
-		'grupTipe': 3
+		'grupTipe': 3,
+		'fam': 150
 	},
 	group_jock:{
-		'grupTipe': 2
+		'grupTipe': 2,
+		'fam': 150
 	},
 	group_coolkid:{
-		'grupTipe': 1
+		'grupTipe': 1,
+		'fam': 150
 	}
 }

+ 180 - 170
sugarcube/src/npcs/school/Artem/artemhome.tw

@@ -1,6 +1,4 @@
-:: artemhome
-<<set $here = 'artemhome'>>
-<<set $ARGS = $location_var[$here]>>
+:: artemhome[event]
 <!-- !!2022/03/17-->
 <!-- !! list of triggers-->
 <!-- !! artemQW['bj'] = number of blowjobs-->
@@ -33,7 +31,7 @@
 <!-- !ArtemLoc = 5 (Artem in the livingroom)-->
 <!-- !ArtemLoc = 6 (Artem in his parents'' room)-->
 <!-- !----------------------------------------------->
-<<if $location_var[$here][0] == 'home'>>
+/*<<if $location_var[$here][0] == 'home'>>
 	<<set $menu_off = 0>>
 	<<set $track_loop = ''>>
 	<<if getvar("$sound") == 0>>
@@ -73,9 +71,9 @@
 		<<set $DoorOpenedBy = 1>>
 	<<else>>
 		<<set $DoorOpenedBy = -1>>
-	<</if>>
+	<</if>>*/
 	<<image "locations/pavlovsk/resident/apartment/aptdoor.jpg">>
-	<<if $time.hour >= 22>>
+	/*<<if $time.hour >= 22>>
 		It would be rude to even ring the doorbell at this time. Artem is probably asleep, so you decide against it and lower your hand.
 		<<actCLA 'Move away from the door'>>
 			<<gt 'pod_ezd' 'etaj_1'>>
@@ -86,18 +84,17 @@
 			<<gt 'pod_ezd' 'etaj_1'>>
 		<</actCLA>>
 	<<else>>
-		<<set $menu_off = 1>>
-		You go to Artem''s apartment and ring the doorbell.
-		<<if getvar("$artemQW['artemlove']") == 1>>
+		<<set $menu_off = 1>>*/
+		You go to <<=$npcs.get('A2','usedname_possessive')>> apartment and ring the doorbell.
+		/*<<if getvar("$artemQW['artemlove']") == 1>>
 			You hope that it's Artem who will answer.
-		<</if>>
-		<<if getvar("$DoorOpenedBy") == 0>>
+		<</if>>*/
+	<<actCLA 'Wait'>>
+		<<either 1>>
 			<<image "characters/shared/headshots_main/big2.jpg">>
 			<<if getvar("$artemQW['artlie']") == 2 or getvar("$artemQW['artembrokenheart']") == 1 or getvar("$artemQW['artemblok']") == 1>>
 				<p>You stand outside the Chebotarev household, knocking on the door. The door is answered by Artem, who frowns as soon as he sees you. "I told you I never wanted to see you again! Please go away." He closes the door in your face without another word.</p>
-				<<actCLA 'Leave'>>
-					<<gt 'pod_ezd' 'etaj_1'>>
-				<</actCLA>>
+				<<ret 'Leave'>>
 			<<else>>
 				You stand outside the Chebotarev household, hoping that Artem will come to the door.
 				<p>Artem opens the door smiling. "Hi $pc.name_nick. Come in, I was just playing some games." Once you walk inside, he closes the door and heads for the living room, where some game is playing on the TV. He waits for you to take a seat first.</p>
@@ -105,10 +102,10 @@
 					<<set $ArtemLoc = 5>> <<gt 'artemhome' 'livingroom'>>
 				<</actCLA>>
 			<</if>>
-		<<elseif getvar("$DoorOpenedBy") == 1>>
+		<<or 1000000>>
 			<<image "locations/pavlovsk/resident/apartment/artemhome/glinina.jpg">>
-			<<if getvar("$artemQW['metArtemMom']") == 0>>
-				<<setinit $artemQW['metArtemMom'] = 1>>
+			<<if !$npcs.get('A238','metAtHome')>>
+				<<run $npcs.set('A238','metAtHome',true)>>
 				<p>You stand outside the Chebotarev household and knock on the door, which is quickly answered by Artem's mother, who has a friendly smile on her face. "Hello. Can I help you?"</p>
 				<p>You return her smile. "Yes. Is Artem home?"</p>
 				<<if $pc.fame('pav_slut') >= 200 or $q.school.func('isGroupMember','gopniks')>>
@@ -119,18 +116,14 @@
 					<<if getvar("$artemQW['artlie']") == 2 or getvar("$artemQW['artembrokenheart']") == 1 or getvar("$artemQW['artemblok']") == 1>>
 						When she hears your name, her demeanor changes swiftly. "Oh, it's you," she frowns. "I don't know what you did to my sweet Artem, but he says he never wants to see you again, so please leave."
 						She closes the door in your face without another word.
-						<<actCLA 'Leave'>>
-							<<gt 'pod_ezd' 'etaj_1'>>
-						<</actCLA>>
+						<<ret 'Leave'>>
 					<<else>>
 						<p>She keeps up her smile. "Is he going to tutor you, dear?"</p>
 						<p>You smile. "Something like that. Is he here?"</p>
 						<p>Her face tightens ever so slightly. "Yes, he's in his room." She turns to face down the hall. "Artem dear, $pc.name_nick from your school is here." She then turns back to you. "Go on in. He's in his room."</p>
-						<<actCLA 'Leave'>>
-							<<gt 'pod_ezd' 'etaj_1'>>
-						<</actCLA>>
+						<<ret 'Leave'>>
 						<<actCLA 'Enter'>>
-							<<set $ArtemLoc = 2>> <<gt 'artemhome' 'hallway'>>
+							<<set $ArtemLoc = 2>> <<gt 'artemhome_dynamic'>>
 						<</actCLA>>
 					<</if>>
 				<<else>>
@@ -139,18 +132,14 @@
 						<p>"I'm $pc.name_nick."</p>
 						When she hears your name, her demeanor changes swiftly. "Oh, it's you," she frowns. I don't know what you did to my sweet Artem, but he says he never wants to see you again, so please leave."
 						She closes the door in your face without another word.
-						<<actCLA 'Leave'>>
-							<<gt 'pod_ezd' 'etaj_1'>>
-						<</actCLA>>
+						<<ret 'Leave'>>
 					<<else>>
 						<p>She seems pleased. "You must be one of Artem's little friends. I'm Glinina, Artem's mother. What's your name, dear?"</p>
 						<p>"$pc.name_nick, we go to school together.</p>
 						"Come in, come in." She turns to face down the hall. "Artem dear, one of your little friends is here." She then turns back to you. "Go on in. He's in his room."
-						<<actCLA 'Leave'>>
-							<<gt 'pod_ezd' 'etaj_1'>>
-						<</actCLA>>
+						<<ret 'Leave'>>
 						<<actCLA 'Enter'>>
-							<<gt 'artemhome' 'hallway'>>
+							<<gt 'artemhome_dynamic'>>
 						<</actCLA>>
 					<</if>>
 				<</if>>
@@ -158,45 +147,106 @@
 				<<if getvar("$artemQW['artlie']") == 2 or getvar("$artemQW['artembrokenheart']") == 1 or getvar("$artemQW['artemblok']") == 1>>
 					You stand outside the Chebotarev household and knock on the door, which is quickly answered by Artem''s mother, who has a friendly smile on her face until she recognizes you and it turns into a frown. "Oh, it's you. I don't know what you did to my sweet Artem, but he says he never wants to see you again. I thought you were such a sweet girl, but he says you're not, so please leave."
 					She closes the door in your face without another word.
-					<<actCLA 'Leave'>>
-						<<gt 'pod_ezd' 'etaj_1'>>
-					<</actCLA>>
+					<<ret 'Leave'>>
 				<<elseif $pc.fame('pav_slut') >= 200 or $q.school.func('isGroupMember','gopniks')>>
 					<p>You stand outside the Chebotarev household and knock on the door, which is quickly answered by Artem's mother, who has a friendly smile on her face that falters when she sees you. "Oh. Hello again, $pc.name_first. Can I help you?"</p>
 					You return her smile. "Yes, I'm here to see Artem."
 					She doesn''t seem pleased. "Oh. Well come in then." She turns to face down the hall. "Artem dear, ''that girl'' is here to see you again." You can hear the judgment in her voice before she turns back to you. "Go on back. He's in his room."
-					<<actCLA 'Leave'>>
-						<<gt 'pod_ezd' 'etaj_1'>>
-					<</actCLA>>
+					<<ret 'Leave'>>
 					<<actCLA 'Enter'>>
-						<<gt 'artemhome' 'hallway'>>
+						<<gt 'artemhome_dynamic'>>
 					<</actCLA>>
 				<<else>>
 					<p>You stand outside the Chebotarev household and knock on the door, which is quickly answered by Artem's mother, who has a friendly smile on her face. "Hello again, $pc.name_nick. Are you here to see Artem?"</p>
 					You return her smile. "Yes."
-					<p>She seems pleased to see you. "Come in, come in." She turns to face down the hall. "Artem dear, one that nice girl $pc.name_nick is here to see you." She then turns back to you. "Go on back. He's in his room."</p>
-					<<actCLA 'Leave'>>
-						<<gt 'pod_ezd' 'etaj_1'>>
-					<</actCLA>>
+					<p>She seems pleased to see you. "Come in, come in." She turns to face down the hall. "Artem dear, that nice girl $pc.name_nick is here to see you." She then turns back to you. "Go on back. He's in his room."</p>
+					<<ret 'Leave'>>
 					<<actCLA 'Enter'>>
-						<<gt 'artemhome' 'hallway'>>
+						<<gt 'artemhome_dynamic'>>
 					<</actCLA>>
 				<</if>>
 			<</if>>
+		<</either>>
+	<</actCLA>>
+:: artemhome_dynamic[dynamicHousing public indoors]
+	<<set _housingData = {
+		passage: 'artemhome_dynamic',
+		entry: 'hallway',
+		rooms: {
+			hallway:{
+				title: 'Entrance hall',
+				image: 'locations/pavlovsk/resident/apartment/artemhome/hall.jpg',
+				description: 'The first thing you notice is how clean and organized everything is. Just inside the door is a coat rack with several attached shelves. All the coats and umbrellas are neatly hung up, several items are neatly placed on the shelves and several sets of shoes are neatly placed next to the rack. A small mirror is on the wall opposite the coat rack.',
+				connections:[
+					{
+						label: 'Leave',
+						destination: 'parents_stairwell_level1',
+						time: 1,
+						image: 'locations/pavlovsk/resident/apartment/podezd2.jpg'
+					},
+					'artemRoom','bath','kitchen'
+				]
+			},
+			artemRoom:{
+				title: $npcs.get('A2','usedname_possessive')+' room',
+				image:'locations/pavlovsk/resident/apartment/artemhome/artemroom.jpg',
+				description: 'The room is very clean and neat. Right next to the window is a bed, with a small night stand next to it. Against the opposite wall is a small computer desk and a chair, with a laptop on it. Next to the desk is a dresser. On the other side of the desk is a bookshelf with a fairly large collection of books.',
+				passage: 'artemhome_artemroom'
+			},
+			bath:{
+				title: 'Bathroom',
+				image: 'locations/pavlovsk/resident/apartment/artemhome/bathroom.jpg',
+				connections:[
+					'hallway'
+				],
+				tags: ['bathroom'],
+				description: "The first thing you notice are the god awful green tiles with matching sink in the bathroom. You don't know who picked it, but they obviously don't have good taste. Other than that, it's a fairly typical bathroom. You can do your hair and makeup in the mirror above the sink."
+			},
+			kitchen:{
+				title: 'Kitchen',
+				image: 'locations/pavlovsk/resident/apartment/artemhome/kitchen.jpg',
+				connections:[
+					'hallway'
+				],
+				tags: ['kitchen']
+			}
+		}
+	}>>
+
+	<<set _currentRoom = $location_var[$here][0]>>
+	<<gs 'dynamicHousing'>>
+
+:: dynamicHousing[include]
+	<<set _currentRoom ??= ($dynamicHousingRoom ?? _housingData.entry)>>
+	<<set $dynamicHousingRoom = _currentRoom>>
+	<<set _currentRoomData = _housingData.rooms[_currentRoom]>>
+
+	<h2>_currentRoomData.title</h2>
+	<<image _currentRoomData.image>>
+	<p>_currentRoomData.description</p>
+
+	<<for _connection range _currentRoomData.connections ?? []>>
+		<<if typeof _connection === 'string'>>
+			<<set _destination = _housingData.rooms[_connection]>>
+			<<ConnectedLocation _destination.title _housingData.passage `_connection+''` _destination.image 1>>
 		<<else>>
-			You stand in the hallway, but it appears that nobody is home.
-			<<actCLA 'Leave'>>
-				<<gt 'pod_ezd' 'etaj_1'>>
-			<</actCLA>>
+			<<ConnectedLocation _connection.label _connection.destination '' _connection.image _connection.time>>
 		<</if>>
+	<</for>>
+
+	<<for _tag range _currentRoomData.tags ?? []>>
+		<<run _tags.push(_tag)>>
+	<</for>>
+
+	<<if _currentRoomData.passage>>
+		<<gs _currentRoomData.passage>>
 	<</if>>
-<</if>>
+
+:: asdasdasdasd
+
+
 <<if $location_var[$here][0] == 'hallway'>>
-	<<set $menu_off = 0>>
-	<<set $locclass to null>>
-	<<if getvar("$sound") == 0>>
-	<</if>>
-	<<set $time.minutes += 1>>
+
 	<<gs 'shortgs' 'setloc' 'artemhome' $location_var[$here][0]>>
 	<h2>Entrance hall</h2>
 	<<image "locations/pavlovsk/resident/apartment/artemhome/hall.jpg">>
@@ -298,19 +348,32 @@
 	<</if>>
 <</if>>
 <<if $location_var[$here][0] == 'artemroom'>>
-	<<set $menu_off = 0>>
-	<<set $track_loop = ''>>
-	<<set $music_loop = 1>>
-	<<set $time.minutes += 1>>
-	<<gs 'shortgs' 'setloc' 'artemhome' $location_var[$here][0]>>
-	<<set $locclass = 'bedr'>>
-	<h2>Artem''s Room</h2>
-	<<image "locations/pavlovsk/resident/apartment/artemhome/artemroom.jpg">>
-	<<if $time.hour > 7 and $time.hour < 23>>
-		The room is very clean and neat. Right next to the window is a bed, with a small <<link "night stand">><<gt 'artemhome' 'night_stand'>><</link>> next to it. Against the opposite wall is a small computer desk and a chair, with a <<link "laptop">><<gt 'artemhome' 'computer'>><</link>> on it. Next to the desk is a <<link "dresser">><<gt 'artemhome' 'artemdresser'>><</link>>. On the other side of the desk is a <<link "bookshelf">><<gt 'artemhome' 'bookshelf'>><</link>> with a fairly large collection of books.
-	<<else>>
-		The room is very clean and neat. Right next to the window is a bed, with a small night stand next to it. Against the opposite wall is a small computer desk and a chair, with a laptop on it. Next to the desk is a dresser. On the other side of the desk is a bookshelf with a fairly large collection of books.
+
+:: artemhome_artemroom[include]
+	/*<<act "Night Stand">><<gt 'artemhome' 'night_stand'>><</act>>
+	<<act "Laptop">><<gt 'artemhome' 'computer'>><</act>>
+	<<act "Dresser">><<gt 'artemhome' 'artemdresser'>><</act>>
+	<<act "Bookshelf">><<gt 'artemhome' 'bookshelf'>><</act>>*/
+	<<npc 'A2'>><<gt 'artemhome_arteminteractions'>><</npc>> is sitting watching you with a friendly smile.
+	
+
+:: artemhome_arteminteractions[event]
+	<<image "characters/shared/headshots_main/big2.jpg">>
+	<<if _npcNote = $npcs.get('A2','notes')>><p>_npcNote</p><hr/><</if>>
+
+	/*<<actCLA 'Let`s go to the living room'>>
+		<<set $ArtemLoc = 5>> <<gt 'artemhome' 'livingroom'>>
+	<</actCLA>>*/
+	<<act 'Talk'>>
+		<<gt 'artemhome_chat'>>
+	<</act>>
+	<<if getvar("$q.school.homeworkLeft") > 0>>
+		<<actCLA 'Do homework with Artem'>>
+			<<gt 'artem_events' 'learn'>>
+		<</actCLA>>
 	<</if>>
+
+:: d3afasdasda
 	<<if $wardrobe.clothingworntype == 'nude'>>
 		<<actCLA 'Dress yourself'>>
 			<<gs 'shortgs' 'dress'>> <<gt 'artemhome' 'artemroom'>>
@@ -336,23 +399,12 @@
 				<p>You grin and point out his still wet hair to him. "Are you and your towel having a fight? It looks like she abandoned you," you giggle.</p>
 				He sheepishly runs a hand through his hair and inspects it. "You uhm... You might have a point. I just didn''t want you to get too bored waiting."
 				<<actCLA 'Talk with him'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
 		<</if>>
 		<<if getvar("$ArtemLoc") == 2>>
-			Artem is sitting watching you with a friendly smile.
-			<<actCLA 'Let`s go to the living room'>>
-				<<set $ArtemLoc = 5>> <<gt 'artemhome' 'livingroom'>>
-			<</actCLA>>
-			<<actCLA 'Talk to Artem'>>
-				<<set $ArtemLoc = 2>> <<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<if getvar("$q.school.homeworkLeft") > 0>>
-				<<actCLA 'Do homework with Artem'>>
-					<<gt 'artem_events' 'learn'>>
-				<</actCLA>>
-			<</if>>
+			
 			<!-- !! Nutluck needs to say at which point this should be enabled, set it to artemQW['artfall'] > 5 for now-->
 			<<if getvar("$artemQW['artfall']") > 5 and $artkissing != $time.daystart>>
 				<<actCLA 'Kiss him' undefined `{willpower:['misc','self','easy']}`>>
@@ -367,7 +419,7 @@
 						As you sit beside him, you look at him for maybe a bit too long because he turns to look at you. You lean over to give him a kiss and he returns it fully.
 						<<arouse 'foreplay' 3 >>
 						<<actCLA 'Stop kissing and talk'>>
-							<<gt 'artemhome' 'chat'>>
+							<<gt 'artemhome_chat'>>
 						<</actCLA>>
 						<<actCLA 'Make out'>>
 							<h2>Artem''s Room</h2>
@@ -381,7 +433,7 @@
 								<p>You pull away before things go too far and catch your breath. You see his slightly confused look and you feel a little bad. "Sorry, I got carried away. Can we just go back to talking?"</p>
 								He frowns. "Yes of course." He leans back and when he thinks you're not looking, tries to adjust his pants to make his erection more comfortable.
 								<<actCLA 'Talk about something else'>>
-									<<gt 'artemhome' 'chat'>>
+									<<gt 'artemhome_chat'>>
 								<</actCLA>>
 							<</actCLA>>
 							<<actCLA 'Enjoy his touch'>>
@@ -443,7 +495,7 @@
 											You pull your hand away and climb off him. "No, I can't... not yet. I want to wait still."
 											He looks visibly disappointed, but nods and smiles. "Sure, I understand. I don't want to pressure you, so whenever you're ready is fine."
 											<<actCLA 'Talk to him'>>
-												<<gt 'artemhome' 'chat'>>
+												<<gt 'artemhome_chat'>>
 											<</actCLA>>
 										<</actCLA>>
 									
@@ -457,7 +509,7 @@
 										<<else>>
 											As the two of you are making out, you're interrupted by his mothers voice out in the hallway. "Artem, I'll be doing the laundry in a few minutes, make sure your dirty clothes are in the hamper."
 											<p>Artem gently, but in some haste pushes you off his lap as he quickly stands up. "Um yes mom, I will." He looks at you with a panicked looked, his mother having almost caught him making out with a girl in his room. "I should really get my clothes sorted. See you tomorrow?"</p>
-											You smile at him. "Maybe. I'll have to see what''s going on." With that, you gather up your stuff and leave.
+											You smile at him. "Maybe. I'll have to see what's going on." With that, you gather up your stuff and leave.
 											<<arouse 'kiss' 20 >>
 											<<arousalEnd>>
 											<<actCLA 'Move away from the door'>>
@@ -796,7 +848,7 @@
 						<<actCLA 'No'>>
 							<<image "locations/pavlovsk/resident/apartment/artemhome/masharin.jpg">>
 							"No, just needed to get away for a while. You know school work is boring as hell and your son is super serious about that stuff, which is no fun," you reply.
-							Masharin looks away from the TV. "Well, school work is important. You're about to head to the university and you need to be ready for what''s waiting there."
+							Masharin looks away from the TV. "Well, school work is important. You're about to head to the university and you need to be ready for what's waiting there."
 							"I don't know if I'll end up there. I'm already tired of it and I don't want to spend more time in school when I could be making money," you explain.
 							<p>"Oh, and what would you be doing without a degree?" Masharin asks.</p>
 							"Well you know, some odd jobs here and there. I'm sure I'll get by fine. After all I'm still young and vigorous, so I'll manage," you confidently reply. "Well, time to head back. Don't want to keep Artem waiting..." You stretch, showing off your curves a little before turning and leaving the Chebotarevs looking at you in disbelief.
@@ -1188,8 +1240,7 @@
 		<</if>>
 	<</if>>
 <</if>>
-<<if $location_var[$here][0] == 'chat'>>
-	<<set $menu_off = 1>>
+:: artemhome_chat[event]
 	<<set $time.minutes += 2>>
 	<<if $artfalling != $time.daystart>>
 		<<setinit $artemQW['artfall'] += 1>>
@@ -1197,9 +1248,7 @@
 	<</if>>
 	<<image "characters/shared/headshots_main/big2.jpg">>
 	You sit and talk with Artem about various topics. Or rather: you're doing most of the talking, and Artem is mostly listening to you talk while occasionally commenting on something you said.
-	<<actCLA 'Stop talking'>>
-		<<gt 'artemhome' 'artemroom'>>
-	<</actCLA>>
+	<<ret 'Stop talking'>>
 	<<if getvar("$dimaFilm") > 0 and getvar("$artemQW['artlie']") == 0 and $artemQW['dimkahelp'] != $time.daystart>>
 		<<actCLA 'Ask Artem to steal the video Dimka filmed of you'>>
 			<<set $menu_off = 1>>
@@ -1219,11 +1268,9 @@
 				<p>You lie to him. "I got very drunk at the disco a few nights ago and he made a video of it and threatened to tell my mother. She would kill me if she saw it!"</p>
 				Artem nods. "Alright, I'll see what I can do."
 				<<actCLA 'Keep talking'>>
-					<<gt 'artemhome' 'chat'>>
-				<</actCLA>>
-				<<actCLA 'Stop talking'>>
-					<<gt 'artemhome' 'artemroom'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
+				<<ret 'Stop talking'>>
 			<</actCLA>>
 			<<actCLA 'Tell him the truth'>>
 				<<setinit $artemQW['artlie'] = -1>>
@@ -1233,11 +1280,9 @@
 				You stare at your feet, afraid to look him in the eye. "I thought I loved him. He made a video of me giving him a blowjob... He's blackmailing me with it now, forcing me to do all sorts of nasty things. Please, it would mean the world to me if you could make that video disappear."
 				<p>Artem nods. "That sounds horrible! Okay, I'll see what I can do."</p>
 				<<actCLA 'Keep talking'>>
-					<<gt 'artemhome' 'chat'>>
-				<</actCLA>>
-				<<actCLA 'Stop talking'>>
-					<<gt 'artemhome' 'artemroom'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
+				<<ret 'Stop talking'>>
 			<</actCLA>>
 		<</actCLA>>
 		<<actCLA 'Don`t ask Artem to steal the video'>>
@@ -1246,11 +1291,9 @@
 			<<image "characters/shared/headshots_main/big2.jpg">>
 			You're too embarassed to even broach the subject.
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<!-- !! This is triggered after Sveta has asked Artem to steal the video-->
 	<<elseif getvar("$artemQW['artlie']") == 1 and $artemQW['dimkahelp'] != $time.daystart>>
@@ -1274,11 +1317,9 @@
 			You jump up and hug him. His surprise is obvious, but eventually he loosens up and puts his arms around you too.
 			"Thank you..." you murmer. "I don't know what I would have done if he''d been able to keep tormenting me with it."
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<!-- !! If Sveta has fallen because of her slut reputation in Pavlovsk-->
 	<<elseif getvar("$artemQW['slutlove']") == 0 and getvar("$artemQW['sveslut']") == 0 and getvar("$artemQW['artemlove']") == 1 and $pc.fame('pav_slut') >= 250 and $q.school.func('isGroupMember','outcasts')>>
@@ -1336,11 +1377,9 @@
 			You shake your head. "No thanks, but thank you for asking."
 			He looks a little disappointed. "Oh, okay..."
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<<actCLA 'Agree to go for a walk'>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'love'>>
@@ -1360,11 +1399,9 @@
 			You shake your head. "No thanks, but thank you for asking."
 			He looks a little disappointed. "Oh, okay..."
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<<actCLA 'Agree to go on a date'>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'love'>>
@@ -1406,7 +1443,7 @@
 					<p>You push his hands away. "Wait... You're going too fast, please stop!"</p>
 					Artem does as you ask and pulls his hands back as he apologizes.
 					<<actCLA 'Just talk'>>
-						<<gt 'artemhome' 'chat'>>
+						<<gt 'artemhome_chat'>>
 					<</actCLA>>
 				<</actCLA>>
 			
@@ -1427,7 +1464,7 @@
 						You pull your hand away and climb off him. "No, I can't... Not yet. I still want to wait."
 						He looks visibly disappointed, but nods and smiles. "Sure, I understand. I don't want to pressure you, so whenever you're ready is fine."
 						<<actCLA 'Talk to him'>>
-							<<gt 'artemhome' 'chat'>>
+							<<gt 'artemhome_chat'>>
 						<</actCLA>>
 					<</actCLA>>
 				
@@ -1445,7 +1482,7 @@
 				<p>You quietly walk past him. "Come on, let's study?"</p>
 				You can tell he's unhappy as he mutters "Fine..."
 				<<actCLA 'Just talk'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
 		<</actCLA>>
@@ -1458,11 +1495,9 @@
 			You shake your head. "No thanks, but thank you for asking."
 			He looks a little disappointed. "Oh, okay..."
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<<actCLA 'Agree to go on a date'>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'love'>>
@@ -1538,11 +1573,9 @@
 			You shake your head. "No thanks, but thank you for asking."
 			He looks a little disappointed. "Oh, okay..."
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<<actCLA 'Agree to go on a date'>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'love'>>
@@ -1557,53 +1590,43 @@
 		<<actCLA 'Make small talk'>>
 			<<set $time.minutes += 5>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'like'>>
-			<h2>Artem''s Room</h2>
 			<<image "characters/pavlovsk/school/boy/artem/talk.jpg">>
-			The two of you chat about a variety of things, mostly school, movies, books, video games, his gaming night and what''s been going on in Pavlovsk lately.
+			The two of you chat about a variety of things, mostly school, movies, books, video games, his gaming night and what's been going on in Pavlovsk lately.
 			<<actCLA 'Keep talking'>>
-				<<gt 'artemhome' 'chat'>>
-			<</actCLA>>
-			<<actCLA 'Stop talking'>>
-				<<gt 'artemhome' 'artemroom'>>
+				<<gt 'artemhome_chat'>>
 			<</actCLA>>
+			<<ret 'Stop talking'>>
 		<</actCLA>>
 		<<actCLA 'Ask about the future'>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'like'>>
 			<<set $time.minutes += 5>>
-			<h2>Artem''s Room</h2>
 			<<image "characters/pavlovsk/school/boy/artem/talk.jpg">>
 			<p>"What do you plan to do after school?" you ask.</p>
 			He looks at you with a smile. "I'm going to the to the university in Saint Petersburg."
 			<p>"What about you? What are your plans for the future?" he asks back before you can say something.</p>
 			<<actCLA 'I don`t know'>>
 				<<set $time.minutes += 5>>
-				<h2>Artem''s Room</h2>
 				<<image "characters/pavlovsk/school/boy/artem/talk.jpg">>
 				"I'm not sure. I have a few options I guess," you tell him.
 				He nods. "Well, you still have some time to decide what you want to do."
 				Not sure what more to say about it, you decide to change the subject.
-				<<actCLA 'Stop talking'>>
-					<<gt 'artemhome' 'artemroom'>>
-				<</actCLA>>
+				<<ret 'Stop talking'>>
 				<<actCLA 'Keep talking'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
 			<<actCLA 'Go to the university'>>
 				<<gs 'npc_relationship' 'modify' 'A2' 'like'>>
 				<<set $time.minutes += 5>>
-				<h2>Artem''s Room</h2>
 				<<image "characters/pavlovsk/school/boy/artem/talk.jpg">>
 				You get a bit excited. "I'm planning to attend the university too. Now I will for sure know someone there."
 				<p>He grins. "That's great! Maybe we can hang out there as well."</p>
-				<<actCLA 'Stop talking'>>
-					<<gt 'artemhome' 'artemroom'>>
-				<</actCLA>>
+				<<ret 'Stop talking'>>
 				<<actCLA 'Keep talking'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
-			<!-- !! Checking who Sveta is dating-->
+			/*<!-- !! Checking who Sveta is dating-->
 			<<if getvar("$Rex_Love") == 1>>
 				<<set $boyfriend_temp = 'Rex'>>
 			<<elseif getvar("$kotovLoveQW") == 1>>
@@ -1634,18 +1657,15 @@
 						He frowns and shrugs. "Sure, you know I can keep a secret."
 					<</if>>
 					You're not sure what more to say on the topic.
-					<<actCLA 'Stop talking'>>
-						<<gt 'artemhome' 'artemroom'>>
-					<</actCLA>>
+					<<ret 'Stop talking'>>
 					<<actCLA 'Keep talking'>>
-						<<gt 'artemhome' 'chat'>>
+						<<gt 'artemhome_chat'>>
 					<</actCLA>>
 				<</actCLA>>
-			<</if>>
+			<</if>>*/
 		<</actCLA>>
 		<<actCLA 'What have you been up to'>>
 			<<gs 'npc_relationship' 'modify' 'A2' 'like'>>
-			<h2>Artem''s Room</h2>
 			<<image "characters/pavlovsk/school/boy/artem/talk.jpg">>
 			<p>"So, what have you been up to lately?" you ask</p>
 			<p>He gives you a slightly puzzled look. "Up to?"</p>
@@ -1659,11 +1679,9 @@
 				<p>Not really what you expected, but you decide to be nice and widen your eyes. "Oh, what's it about?"</p>
 				Artem shines up in the biggest smile. "Oh, it's about this hero that needs to fight for a kingdom and the bad guy has all sorts of weird creatures that he forces to attack him. He finds this hidden world in his own world, so the book takes a completly different path than the one you expect it to take."
 				Artem is so excited while explaining that you're having a hard time following him, but you immerse yourself in it just to make him happy.
-				<<actCLA 'Stop talking'>>
-					<<gt 'artemhome' 'artemroom'>>
-				<</actCLA>>
+				<<ret 'Stop talking'>>
 				<<actCLA 'Keep talking'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
 			<<actCLA 'A book?'>>
@@ -1673,11 +1691,9 @@
 				A bit dejected, he starts explaining. "It's about this hero that needs to fight for a kingdom and the bad guy has all sorts of weird creatures that he forces to attack him. He finds this hidden world..." Noticing your boredom, he stops.
 				You sigh. "It's okay, Artem. Fantasy isn''t really my cup of tea, but as long as it makes you happy..."
 				He nods, and you can see the disappointment in him as he puts the book back.
-				<<actCLA 'Stop talking'>>
-					<<gt 'artemhome' 'artemroom'>>
-				<</actCLA>>
+				<<ret 'Stop talking'>>
 				<<actCLA 'Keep talking'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
 		<</actCLA>>
@@ -1731,11 +1747,9 @@
 					You grin at him. "You can fuck her as hard as you want, and you can fuck her ass as hard as you want." He smiles back at you, and you laugh and talk about sex for a while.
 					<<arouse 'kiss' 1 >>
 					<<arousalEnd>>
-					<<actCLA 'Stop talking'>>
-						<<gt 'artemhome' 'artemroom'>>
-					<</actCLA>>
+					<<ret 'Stop talking'>>
 					<<actCLA 'Keep talking'>>
-						<<gt 'artemhome' 'chat'>>
+						<<gt 'artemhome_chat'>>
 					<</actCLA>>
 				<</actCLA>>
 			<</actCLA>>
@@ -1777,11 +1791,9 @@
 						<<actCLA 'Have sex'>>
 							<<gt 'artem_sex' 'sex'>>
 						<</actCLA>>
-						<<actCLA 'Stop talking'>>
-							<<gt 'artemhome' 'artemroom'>>
-						<</actCLA>>
+						<<ret 'Stop talking'>>
 						<<actCLA 'Keep talking'>>
-							<<gt 'artemhome' 'chat'>>
+							<<gt 'artemhome_chat'>>
 						<</actCLA>>
 					<<else>>
 						<p>You pull the strapon harness with its dickcm $dick_girth dildo attached out of your purse and hold it up, showing it to him. "I thought we could use this."</p>
@@ -1807,7 +1819,7 @@
 			<</actCLA>>
 		<</if>>
 	<</if>>
-<</if>>
+:: asr32asfgasdr
 <<if $location_var[$here][0] == 'askedstrip'>>
 	<<actCLA 'Agree to strip'>>
 		<<gt 'artemhome' 'stripagree' 0>>
@@ -1829,11 +1841,9 @@
 					<<image "characters/pavlovsk/school/boy/artem/talk.jpg">>
 					You shake your head. "I'm sorry Artem, but I'm just not comfortable doing that."
 					He frowns deeply, but nods his head. "Yeah, okay..."
-					<<actCLA 'Stop talking'>>
-						<<gt 'artemhome' 'artemroom'>>
-					<</actCLA>>
+					<<ret 'Stop talking'>>
 					<<actCLA 'Keep talking'>>
-						<<gt 'artemhome' 'chat'>>
+						<<gt 'artemhome_chat'>>
 					<</actCLA>>
 				<</actCLA>>
 			
@@ -1869,7 +1879,7 @@
 		You finish the bottle of wine with Artem, and thank him for a nice time before you gather your things and leave.
 		<<set $time.minutes += 5>>
 		<<actCLA 'Talk to him'>>
-			<<gt 'artemhome' 'chat'>>
+			<<gt 'artemhome_chat'>>
 		<</actCLA>>
 	<</actCLA>>
 	<<actCLA 'Enjoy his touch'>>
@@ -1893,7 +1903,7 @@
 				You pull your hand away and climb off him. "No, I can't... not yet. I still want to wait."
 				He looks visibly disappointed, but nods and smiles. "Sure, I understand. I don't want to pressure you, so whenever you're ready is fine."
 				<<actCLA 'Talk to him'>>
-					<<gt 'artemhome' 'chat'>>
+					<<gt 'artemhome_chat'>>
 				<</actCLA>>
 			<</actCLA>>
 		

+ 40 - 0
sugarcube/src/npcs/school/Artem/npc_artem.tw

@@ -0,0 +1,40 @@
+:: npc_artem[npc]
+<<switch $location_var[$here][0]>>
+    <<case 'location'>>
+        <<if $time.isSchoolDay>>
+            <<if $time.hour < 6 or ($time.hour == 6 and $time.minutes < 30)>>
+                <<set $result = {location: 'home',activity:['sleep'],end:$time.time(6,30)}>>
+            <<elseif $time.hour < 7>>
+                <<set $result = {location: 'home',activity:['bathroom'],end:$time.time(7,0)}>>
+            <<elseif $time.hour == 7>>
+				<<if $time.minutes < 15>>
+                	<<set $result = {location: 'home',activity:['breakfast'],end:$time.time(7,15)}>>
+				<<elseif $time.minutes < 30>>
+                	<<set $result = {location: 'home',activity:['leavingForSchool'],end:$time.time(7,30)}>>
+				<<else>>
+					<<set $result = {location: 'outdoors',activity:['walkingToSchool'],end:$time.time(8,0)}>>
+				<</if>>
+            <<elseif $time.hour < 14>>
+                <<set $result = {location: 'school',activity:['classes'],end:$time.time(14,0)}>>
+			<<elseif $time.hour == 14>>
+				<<if $time.minutes < 15>>
+					<<set $result = {location: 'school',activity:['socializing'],end:$time.time(14,15)}>>
+				<<elseif $time.minutes < 45>>
+					<<set $result = {location: 'outdoors',activity:['walkingHome'],end:$time.time(14,45)}>>
+				<<else>>
+					<<set $result = {location: 'home',activity:['studying'],end:$time.time(17,0)}>>
+				<</if>>
+			<<elseif $time.hour < 17>>
+				<<set $result = {location: 'home',activity:['studying'],end:$time.time(17,0)}>>
+			<<elseif $time.hour < 22>>
+				<<set $result = {location: 'home',activity:['relaxing'],end:$time.time(22,0)}>>
+			<<else>>
+				<<set $result = {location: 'home',activity:['sleep'],end:$time.time(23,59)}>>
+            <</if>>
+		<</if>>
+	<<case 'vars'>>
+		<<switch $location_var[$here][1]>>
+			<<case 'isInvitedHome'>>
+				<<set $result = $q.questIsActive('artemTutoring')>>
+		<</switch>>		
+<</switch>>

+ 1 - 0
sugarcube/src/npcs/school/Artem/quest_Artem.tw

@@ -0,0 +1 @@
+:: quest_artemTutoring[quest]

+ 3 - 3
sugarcube/src/sidebar/Sidebar.tw

@@ -177,15 +177,15 @@
         <<set $willpower_percent = (100 * $pc.pcs_willpwr) / $pc.willpowermax>>
         <<if $willpower_percent > 60>>
             <<imageWithTooltip `"system/icons/status/willpower_high.png"`>>
-                You feel confident and in control. You still have $pc.pcs_willpwr ($willpower_percent %) of your willpower left.
+                You feel confident and in control. You still have <<=$pc.pcs_willpwr.roundToDecimal(1)>> (<<=$willpower_percent.roundToDecimal(1)>> %) of your willpower left.
             <</imageWithTooltip>>
         <<elseif $willpower_percent > 30>>
             <<imageWithTooltip `"system/icons/status/willpower_med.png"`>>
-                You feel like you have less control over yourself than usual. You have $pc.pcs_willpwr ($willpower_percent %) of your willpower left.
+                You feel like you have less control over yourself than usual. You have <<=$pc.pcs_willpwr.roundToDecimal(1)>> (<<=$willpower_percent.roundToDecimal(1)>> %) of your willpower left.
             <</imageWithTooltip>>
         <<else>>
             <<imageWithTooltip `"system/icons/status/willpower_low.png"`>>
-                In your current state, you could easily be pressured into doing things against your will. You have $pc.pcs_willpwr ($willpower_percent %) of your willpower left.
+                In your current state, you could easily be pressured into doing things against your will. You have <<=$pc.pcs_willpwr.roundToDecimal(1)>> (<<=$willpower_percent.roundToDecimal(1)>> %) of your willpower left.
             <</imageWithTooltip>>
         <</if>>