# Summoner (experimental, unofficial and unsupported mod done by pepplez and freddygonzo @ F95zone) # Mod Version 0.7.1 Current Game Version 0.8c-beta11 default persistent.pepplez_sum = True # Enable Summoner default persistent.summon_critical_chars = False # Summon critical/unsafe characters default pep_menu_open = False default pep_critical_chars = [] default pep_onhold_chars = [] define pep_alpha = 0.5 init 9 python: # remove old overlay screen and add a new one (changed the layer to "interface") if "pep_summon_screen" in config.overlay_screens: config.overlay_screens.remove("pep_summon_screen") config.overlay_screens.append("pep_summon_screen") # log message print ("Summoner-Notice: Mod v0.7.1 by pepplez and freddygonzo @ F95zone is up and running.") # strip surnames def pep_forename(name): match = re.match(r'^([A-Z][a-z]+)([A-Z].*)?$', name) return match.group(1) if match else name # summon character def pepple_magic(pep_char): global pep_critical_chars, pep_onhold_chars # Char summonable? try: _ = pep_char.location except Exception as err: err_msg = ( f"{{color=#feba00}}Summoner-Error:{{/color}}\n" f"{{color=#fd7c8d}}Can't summon {pep_char} :-({{/color}}") if config.developer: err_msg += f"\nError: {str(err)}" update_messages.append(err_msg) print("Summoner-Error:",pep_char, err, sep=" ") else: pep_critical_found = False for n in pep_critical_chars: z = eval(n) if z is pep_char or pep_char.location == "hold": pep_critical_found = True if pep_char.tag not in pep_onhold_chars: pep_onhold_chars.append(pep_char.tag) sum_msg = "{color=#feba00}Summoner-Warning:{/color}\nIf you're not a modder or developer:\nDo NOT SAVE your game anymore!" update_messages.append(sum_msg) # put char where? if pep_char.location is Player.location: if pep_char.tag in pep_onhold_chars: pep_onhold_chars.remove(pep_char.tag) pep_critical_found = True if pep_critical_found: pep_char.location = "hold" sum_notice = ( f"{{color=#feba00}}Summoner-Notice:{{/color}}\n" f"{{color=#fd7c8d}}Critical Char {pep_char.tag}{{/color}}" f"\nHas put {{color=#feba00}}on 'hold'{{/color}}") print ("Summoner-Notice: Critical Char", pep_char.tag, "has put on 'hold'") if config.developer: update_messages.append(sum_notice) if not pep_critical_found: pep_char.location = pep_char.home pep_char = None else: if not pep_critical_found: pep_char.location = Player.location elif persistent.summon_critical_chars and pep_critical_found: pep_char.location = Player.location sum_notice = ( f"{{color=#feba00}}Summoner-Notice:{{/color}}\n" f"{{color=#fd7c8d}}Critical Char {pep_char.tag}{{/color}}" f"\nSummoned to: {{color=#feba00}}{Player.location}{{/color}}") print ("Summoner-Notice: Critical Char", pep_char.tag, "summoned to:", Player.location) if config.developer: update_messages.append(sum_notice) else: pep_char = None set_the_scene(location = Player.location, greetings = False, fade = False, selected_Character = pep_char) return screen pep_summon_screen(): # set critical chars list here (for future game updates) timer .1 repeat False action SetVariable("pep_critical_chars", ["AmahlFarouk","OroroMunroe"]) layer "interface" if persistent.pepplez_sum and sandbox and not ( black_screen[0] or belt_collapsed or ongoing_Event or ongoing_Scene or renpy.get_screen("phone_screen") or renpy.get_screen("interactions_screen") or renpy.get_screen("sex_screen") or renpy.get_screen("master_screen") is None ): vbox: spacing 1 if Party: anchor (1.0, 0.0) pos (0.727, 0.012) else: anchor (1.0, 0.0) pos (0.759, 0.012) if pep_menu_open: hbox: spacing 1 align (1.0, 1.0) for z in sorted(ch1_Companions): $ y = eval(z) if z in sorted(pep_critical_chars) or y.location == "hold" or z in pep_onhold_chars: $ z_text ="{color=#fd7c8d}"+pep_forename(str(z))+"{/color}" else: $ z_text = pep_forename(z) if z in sorted(pep_critical_chars) or y.location =="hold" and not persistent.summon_critical_chars: continue use base_button( Function (pepple_magic, pep_char = y), button_alpha = pep_alpha, padding = (8, 4, 8, 6), text = z_text, text_size = 24) use base_button( ToggleVariable("pep_menu_open"), button_alpha = pep_alpha, padding = (15, 2, 15, 8), text = "x", text_size = 24) hbox: align (1.0, 1.0) for z in sorted(all_Sprites): if z not in sorted(ch1_Companions): $ y = eval(z) if z in sorted(pep_critical_chars) or z in pep_onhold_chars: $ z_text ="{color=#fd7c8d}"+pep_forename(str(z))+"{/color}" else: $ z_text = pep_forename(z) if z in sorted(pep_critical_chars) and not persistent.summon_critical_chars: continue use base_button( Function (pepple_magic, pep_char = y), button_alpha = pep_alpha, padding = (8, 4, 8, 6), button_shadow = True, text = z_text, text_size = 24) else: use base_button( ToggleVariable("pep_menu_open"), button_alpha = pep_alpha, padding = (8, 4, 8, 6), button_shadow = True, text = "Summon", text_size = 24) # else: # timer .5 repeat False action SetVariable("pep_menu_open" , False)