init -1000 python: original_say = renpy.say def capitalize_first(text): if not text: return "" return text[0].upper() + text[1:] def custom_replace(text): text = text.replace("Housemate", "Brother") text = text.replace("housemate", "brother") text = text.replace("Housmate", "Brother") text = text.replace("housmate", "brother") text = text.replace("Roommate", "Brother") text = text.replace("roommate", "brother") text = text.replace("My friend's son", "My son") text = text.replace("my friend's son", "my son") mother_replacements = [ ('. [mother]', '. ' + capitalize_first(store.mother)), ('! [mother]', '! ' + capitalize_first(store.mother)), ('? [mother]', '? ' + capitalize_first(store.mother)), ('[mother]', store.mother) ] sister_replacements = [ ('. [sister]', '. ' + capitalize_first(store.sister)), ('! [sister]', '! ' + capitalize_first(store.sister)), ('? [sister]', '? ' + capitalize_first(store.sister)), ('[sister]', store.sister) ] for old, new in mother_replacements: text = text.replace(old, new) for old, new in sister_replacements: text = text.replace(old, new) # Capitalizing at the start of a string if text.startswith(store.mother): text = capitalize_first(text) if text.startswith(store.sister): text = capitalize_first(text) return text def new_say(who, what, *args, **kwargs): what = custom_replace(what) original_say(who, what, *args, **kwargs) renpy.say = new_say