# Elmwood University Twins Patch init offset = 1 init python: from functools import lru_cache context = renpy.game.context namemap = renpy.game.script.namemap def EWUTP_make_current_node(): local_context = context local_namemap = namemap def get_current_node(): return local_namemap.get(local_context().current, None) return get_current_node EWUTP_current_node = EWUTP_make_current_node() EWUTP_Say = renpy.ast.Say # General replacements - say dialogue and menu text EWUTP_GENERAL_REPLACEMENTS = { # Episode 2 "What's it like having a doppelganger?": "What's it like being twins?", "Lookalikes": "Twins", } # Player's thoughts / letters / narration EWUTP_NARRATION_REPLACEMENTS = { # Episode 2 "Doppelgangers huh? Imagine the possibilities...": "Twins, huh? Imagine the possibilities...", } # Speaker-specific say replacements EWUTP_SPEAKER_REPLACEMENTS = { "p": { # Player # Episode 2 "Uhh... doppelgangers...": "Uhh... twins...", # Episode 3 "Well I have three others, there's Tasha and Ashley who share a twin room and then Molly is next door to me.": "Well, I have three others. There's Tasha and Ashley, who are twins, and then Molly is next door to me.", }, "uk": { # Unknown # Episode 2 "No, we're just doppelgangers!": "Well, this is a twin room, isn't it?", }, "tay": { # Taylor # Episode 3 "Do you get on with the doppelgangers?": "Do you get on with the twins?", }, "kt": { # Katie # Episode 3 "It would be so fun to have a doppelganger!": "It would be so fun to have a twin!", }, "t": { # Tasha # Episode 2 "We call it Truth or Dare: mirror edition.": "We call it Truth or Dare: Twin Edition.", "But... in mirror edition, if it's a truth then the person asking the question also has to answer!": "But... in twin edition, if it's a truth, then the person asking the question also has to answer!", "Wait! Cause it's mirror edition Ashley has to answer her own question too.": "Wait! Cause it's twin edition, Ashley has to answer her own question too.", }, "a": { # Ashley # Episode 2 "You'll always be remembered as Ashley's doppelganger.": "You'll always be remembered as Ashley Berry's sister.", }, "lew": { # Lewis # Episode 4 "duplicate freaks": "twin freaks", }, } def EWUTP_apply_replacements(t, replacements): for old, new in replacements.items(): t = t.replace(old, new) return t @lru_cache(maxsize=256) def EWUTP_replace_general_text(t): return EWUTP_apply_replacements(t, EWUTP_GENERAL_REPLACEMENTS) def EWUTP_replace_text(t): node = EWUTP_current_node() if isinstance(node, EWUTP_Say): who = node.who if who == "extend": who = _last_say_who if who is None: t = EWUTP_apply_replacements(t, EWUTP_NARRATION_REPLACEMENTS) else: replacements = EWUTP_SPEAKER_REPLACEMENTS.get(who, {}) t = EWUTP_apply_replacements(t, replacements) return EWUTP_replace_general_text(t) config.say_menu_text_filter = EWUTP_replace_text # Biography changes define tinfo = "Tasha and Ashley are twins who share a popular dance and fitness social media channel." define ainfo = tinfo # label override where lines have been removed init 1 python: config.label_overrides = getattr(config, "label_overrides", {}) or {} config.label_overrides["twinsmeet3"] = "twinsmeet3_ewutp" label twinsmeet3_ewutp: p "What's it like having a twin?" scene e2twinmeet9 with dissolve t "Amazing" (multiple = 2) a "Horrible" (multiple = 2) scene e2twinmeet10 with dissolve t "Wow, Ashley. Thank you." scene ie2twinmeet6 with dissolve a "No, it's honestly great. I mean, obviously neither of us know what it's like not to have a twin, but having one has a lot of perks." scene ie2twinmeet5 with dissolve t "Ashley is particularly grateful for the numerous exams I have sat in her place." scene ie2twinmeet6 with dissolve a "And Tasha is equally grateful for every time I've pretended to be her, like that one speech." scene ie2twinmeet5 with dissolve t "That's true." scene ie2twinmeet6 with dissolve a "Do you have any siblings, [name()]?" # info: this question has been removed since Episode 3 Update scene ie2twinmeet4 with dissolve p "No, I'm an only child." jump e2twinqmenu