# Incest patch for AMNESIA v0.8 # v0.8.91 -- uodenim@F95Zone init 9999 python: import re # Uitgangspunten: # * Alexandra = Mom # * Als derden over haar praten moet dit via een regel voorkomen of teruggezet worden. # * Mother gebruiken als naar haar verwezen wordt (your, our, their). # # Volgorde waarin tekst verwerkt wordt: # 1. say_menu_text_filter # 2. Variabelen worden gevuld ([mcname], [mother], [sister], etc). # 3. replace_text # # Dus bij regels voor say_menu moet je altijd uitgaan van de letterlijke tekst zoals # die in de scripts staat en voor replace_text van de teksten nadat het filter van # say_menu én de variabelen zijn verwerkt. # # Voorbeeld 1: # "Hello [mcname], I am Alexandra." # 1. [mcname] -> waarde van speler, door Ren'Py. # 2. Alexandra -> Mom, volgens text_replace. # Dus deze voeg je toe aan do_not_replace. # # Voorbeeld 2: # "Have you seen our [mother] today?" # 1. [mother] -> Mom, door Ren'Py (of via Landlady -> global_text_replace -> Mom). # 2. Mom -> mother, door global_regex_replace. # Dus deze heeft geen uitzondering nodig. # # Uiteindelijk is de belangrijkste zoekopdracht "[a-z]\s'.*Alexandra" omdat Alexandra's # naam vervangen wordt met "Mom" en er daardoor vreemde zinnen op kunnen treden. Verder # zijn friend/housemate/roommate geschikte kandidaten en wellicht "my family" en # "my sister" als Kate/Elena het zegt, want MC is er eigenlijk geen onderdeel van. # Achternaam = Orlov do_not_replace = ( # Act 1d1 'I’m your [mother], Alexandra…', '(Alexandra has a worried look on her face)', # MC moet nog gecorrigeerd worden. 'It’s OK with me, Alexandra, I don’t mind-', 'Alexandra, [mcname]', '(Alexandra… my [mother]...)', # Act 2d1 'Alexandra never told us she had such a handsome boy!', 'And how couldn`t I notice you? Alexandra, he`s got his [mother]`s beauty!', 'Hello Doctor, Alexandra. Sorry for the delay... ', # Act 2d4 'Alexandra you`re splendid, as usual!', 'And by the way, Alexandra', 'Oh, please, Alexandra, don`t even mention it! It`s nothing, really', 'Am I right, Alexandra?', 'You are his [mother], Alexandra, it`s natural that you would worry so much...', 'And I would never impose over your decision, Alexandra...', 'But anyways, Alexandra, along the way you also learn many... truths', 'No, Alexandra, you`re not doing this to protect him, you`re doing this only for yourself! ', 'Let`s forget about this nonsense: Alexandra, you`re right', 'Please, forgive me Alexandra, I didn`t mean to get so excited! ', 'Naturally, Alexandra...', # Act 2d5 'Alexandra, dear! I just wanted to talk to you about a problem I have...', 'Come on, Alexandra, the new girl', 'She`s wasted no time, Alexandra, and that`s not good for us' ) # Dialogen waarin enkel 'Housemate' / 'Housmate' / 'Friend' wordt vervangen met 'brother'. brother = ( 'Our Housmate has only been here for a few hours after being in coma for a year', 'Your Housemate is very tired… and also, he`s lost h-', 'Kate, don`t annoy your Housemate. Come on.', 'Kate! Your Housemate just got home from the hospital.', '(After all, I`m her Housemate who`s been in coma all this long)', 'Just once I`m asking for you to help me, and you instead leave the burden on your housemate?', 'I didn`t knew I had such a kind friend. I mean it.', 'I recognize the friend that stood by my side', 'I have my friend back…', ) # Als stukken dialoog 1:1 moeten worden vervangen kunnen die hier als sleutel + waarde. dialogue_replace = { # Act 1d1 'Now, I will call your landlady and tell her you’ve woken up, and if everything is alright, you can go back to your home today': 'Now, I will call your mother and tell her you’ve woken up, and if everything is alright, you can go back to your home today.', '(Father?! Why isn’t he here?...) ': '(My father?! Why isn’t he here?...)', 'Nonsense, boy. ': 'Nonsense, dear.', 'Where`s that girl… Kate!': 'Where`s your sister… Kate!', 'Welcome back… we missed you. Idiot dude!': 'Welcome back… we missed you, idiot brother!', '(She mentioned my father again… “until he returns”?)': '(She mentioned dad again… “until he returns”?)', '[mother], [sister]!': 'Mom, Kate!', '[sister]… it`s m-me!' : 'Sis… it`s m-me!', 'I don`t care about that bullshit of being “brothers”; I don`t care about mom!': 'I don`t care about that bullshit of being “siblings”; I don`t care about mom!', 'Hey! Enough drama! I`m just happy you`re back, my dumbass roommate!': 'Hey! Enough drama! I`m just happy you`re back, my dumbass brother!', '(I don`t recognize them as my friend`s family… although I do feel so natural when I`m around them…)': '(I don`t recognize them as my family… although I do feel so natural when I`m around them…)', # Act 2d1 'But with Alexandra, his own [mother]?' : 'But with his own mother?', 'I`ve done nothing but try to help your family...' : 'I`ve done nothing but try to help our family...', 'And it was your mom`s money, not yours, so shut up': 'And it was mom`s money, not yours, so shut up.', 'Yes ma-am?': 'Yes, mom?', 'I`d like you to take care of this young boy`s hair ': 'I`d like you to take care of my son`s hair.', 'Good morning, doctor. My name is Alexandra, this is my friend`s son, [mcname], we were called for an appointment this morning...': 'Good morning, doctor. My name is Alexandra, this is my son, [mcname], we were called for an appointment this morning...', # Act 2d3 'You mean you don`t know? Alexandra didn`t tell you?': 'You mean you don`t know? Your mother didn`t tell you?', # Act 2d4 'I really appreciate it, Mrs Tanya': 'I really appreciate it, aunt Tanya.', '(Just a moment ago, Tanya said that Alexandra would know about my talent...) ': '(Just a moment ago, aunt Tanya said that mom would know about my talent...)', '(And no doubt Elena has what it takes to be a model... We don`t even need Tanya!)': '(And no doubt Elena has what it takes to be a model... We don`t even need aunt Tanya!)', 'What was that back there, with Ale- I mean, with [mother]?': 'What was that back there, with mom?', 'And not just your looks... you`re smart, you`re funny, you`re a great friend, I mean...': 'And not just your looks... you`re smart, you`re funny, you`re a great sister, I mean...', '(It`s not my fault that I look at her for what she is! If I hadn`t lost my memory, maybe I`d still see her only as [sister])': '(It`s not my fault that I look at her for what she is! If I hadn`t lost my memory, maybe I`d still see her only as my sister)', # Kate Story 'I know my sister very well... I know when she`s being manipulative, and when she`s being honest': 'I know our sister very well... I know when she`s being manipulative, and when she`s being honest', 'Hey, dude! What are you doing here?': 'Hey, bro! What are you doing here?', '[mcname], cut it already, she`s my sister': '[mcname], cut it already, she`s our sister.', 'Alright... alright... she`s your sister and my [sister], part of our "family"': 'Alright... alright... she`s our sister, our family.', # Elena FreeRoam 'GET OUT YOU DISGUSTING FREAK!!\nI’m calling mom! AAAAAAAAAAAAA-': 'GET OUT YOU DISGUSTING FREAK!!\nI’m calling mom! MOOOOOO-', } # Alle eenvoudige vervangingen zonder gebruik te maken van RegExp. text_replace = [ ('IRIS', 'Iris'), ('KATE', 'Kate'), ('ALEXANDRA', 'Alexandra'), ('Alexandra', 'Mom'), # Het komt vaker voor dat je 'mom' wilt dan 'Alexandra'. ('Mrs. Mom', 'Mrs. Alexandra'), # Maar daardoor moet het in ongewenste gevallen gecorrigeerd worden. ('Mrs Mom', 'Mrs. Alexandra'), ('mrs. Mom', 'Mrs. Alexandra'), # Drie verschillende vormen ..... *facepalm* ('Call me [mother]', 'Call me mom'), ('friend`s son', 'son'), ('my father', 'dad') ] # Alle reguliere expressies die worden toegepast op de teksten. regex_replace = { (r'\s(\w+[^\.\!\?\)…:;,\*\-]+)$', r' \1.'), # Zin eindigen in punt. } # Globale berichten die worden vervangen; dit gaat over _alle_ tekst. global_replace = { 'New task: Younger Housemate': 'New task: Younger sister', 'Task complited: Younger Housemate': 'Task completed: Younger sister', 'You peeked all the housemate girls while they took a shower or bath.': 'You peeked all the girls while they took a shower or bath.', # Diary, zoek op `['"].*Alexandra` in Global/Diary 'I GROPED Alexandra while she was sleeping': 'I GROPED mom while she was sleeping', 'I TOOK ALEXANDRA\'s HAND on the way to the hairdresser': 'I TOOK MOM\'s HAND on the way to the hairdresser', 'I DIDN\'T TAKE ALEXANDRA\'s HAND on the way to the hairdresser': 'I DIDN\'T TAKE MOM\'s HAND on the way to the hairdresser', 'Alexandra woke up when I was playing with her': 'Mom woke up when I was playing with her', 'Alexandra was asleep and I did not bother her': 'Mom was asleep and I did not bother her', 'I watched Alexandra while she was \'playing\' in a bathroom': 'I watched mom while she was \'playing\' in a bathroom', 'Looks like she knows Alexandra well': 'Looks like she knows mom well', 'Alexandra\'s sister': 'My aunt', 'Tanya\'s daughter': 'My cousin' } global_text_replace = [ ('Landlady', 'Mom'), # Input: [mother]. New game -> default waarde vervangen. ('Housemate', 'Sis'), # Input: [sister]. New game -> default waarde vervangen. ('Younger Sis', 'Younger sister'), # Diary, zoek op `['"].*Alexandra` in Global/Diary ('Alexandra wants me to act like', 'Mom wants me to act like'), ('must be clean before Alexandra wakes up', 'must be clean before mom wakes up'), ('and make sure Alexandra cleans her room', 'and make sure Elena cleans her room'), ('Alexandra could wake up any time soon', 'Mom could wake up any time soon'), ('I can\'t let Alexandra find out about this', 'I can\'t let mom find out about this'), ('Now I can start helping Alexandra with the money', 'Now I can start helping mom with the money'), ('Alexandra\'s eyes lit up when I offered to help her with the laundry', 'Mom\'s eyes lit up when I offered to help her with the laundry'), ('Alexandra came home early in the morning, and later', 'Mom came home early in the morning, and later'), ('Alexandra\'s bedroom', 'mom\'s bedroom'), ('Alexandra\'s & Elena\'s bedrooms', 'mom\'s & Elena\'s bedrooms'), ] global_regex_replace = [ (r'(Your|your|His|his|\bA\b|\ba\b|My|my)(| own)? \b[M|m]om\b', r'\1\2 mother'), (r'(My|my|Your|your|Our|our|His|his|\ba\b|\bA\b)(| [^\s]+)? \b[S|s]is\b', r'\1\2 sister'), (r'\b([S|s])iss\b', r'\1isters'), # Hoofdletters niet midden in een zin (r'([^\.\?\!]\s“?)\bMom\b', r'\1mom'), (r'([^\.\?\!])\s\bMother\b', r'\1 mother'), (r'([^\.\?\!])\s\bSister(|s)?\b', r'\1 sister\2'), (r'([^\.\?\!])\s\bSis\b', r'\1 sis'), ] def filter_text(t): """Teksten die in SAY of MENU worden getoond. Hierin zijn variabelen nog niet vervangen.""" if t in do_not_replace: return t if t in brother: return re.sub('([H|h]ouse?mate)|([F|f]riend)', 'brother', t) if t in dialogue_replace: return dialogue_replace[t] for e in text_replace: t = t.replace(e[0], e[1]) for e in regex_replace: t = re.sub(e[0], e[1], t) return t def filter_all(t): """Teksten die overal worden vervangen. Dit vindt plaats NA filter_text.""" if t in global_replace: return global_replace[t] for e in global_text_replace: t = t.replace(e[0], e[1]) for e in global_regex_replace: t = re.sub(e[0], e[1], t) return t after_load = config.label_overrides['after_load'] if 'after_load' in config.label_overrides else None config.say_menu_text_filter = filter_text config.replace_text = filter_all config.label_overrides['after_load'] = 'set_relationships' label set_relationships: $ mother = 'Mom' $ sister = 'Sis' python: if after_load is None: config.label_overrides.pop('after_load') else: config.label_overrides['after_load'] = after_load if renpy.has_label('after_load'): call after_load