init python: import os import re def modify_game_files(): game_dir = os.path.join(config.basedir, "game") # Get the game directory pattern = re.compile(r'perk == "([^"]+)"') # Regex to match 'perk == "something"' for root, _, files in os.walk(game_dir): for file in files: if file.endswith(".rpy"): # Only modify .rpy files file_path = os.path.join(root, file) with open(file_path, "r", encoding="utf-8") as f: content = f.read() # Replace 'perk == "something"' with 'True' (only the perk condition) new_content = pattern.sub('True', content) with open(file_path, "w", encoding="utf-8") as f: f.write(new_content) modify_game_files() # Run on game start