## Functions and Variables ## init -50: python: ## config.mouse = { 'default' : (('spider_1.png', 0, 0), ('spider_1.png', 0, 0)) } config.mouse = { 'default' : (('spider_4.png', 0, 0), ('spider_4.png', 0, 0)), 'mainmenu' : (('spider_4.png', 0, 0), ('spider_4.png', 0, 0)), 'gamemenu' : (('spider_4.png', 0, 0), ('spider_4.png', 0, 0)), } ## positions & transitions just_left = Position(xpos=0.01, xanchor='left') just_right = Position(xpos=0.99, xanchor='right') flashbulb = Fade(0.2, 0.0, 0.8, color='#fff') sweep = im.Tile("hblindsco600.png") eye_open = ImageDissolve(sweep, 3, ramplen=256, ramptype='cube') eye_close = ImageDissolve(sweep, 3, ramplen=256, ramptype='cube', reverse=True) ## Variables!!! ## easter eggs/debug console debug_on = False # are debugging messages shown? ## character names flia = "Girl" mlia = "Guy" prot = "" cambill = "Glowing Light" ## navigation variables dir_dic = {} navigation_overlay_shown = False ## gender variables ## as in life, the default is female gen = 'xx' li_gender = 'guy' # 'I could fall in love with a guy like that...' # gender variables when referring to the LI heshe = 'he' himher = 'him' hishers = 'his' # gender variables when referring to the protagonist hesheme = 'she' himherme = 'her' hishers = 'hers' ## event navigation variables leave_cafe = False park_behind_waterfall_open = False park_waterfall_open = False date_part_two_seen = False heard_crying_again = False rescued_li = False li_called_away = False alt_path_possible = False on_alt_path = False ## ending variables ending_d = 0 # defiant ending; incremented by major quests ending_f = 0 # fatalistic ending; incremented by major quests pc_loves_li = 0 # does the PC love the LI? Incremented by sub-quests. 1:5 total_menus = 0 # total number of li_loves_pc menus; use before menus that increment 'li_loves_pc' li_loves_pc = 0 # does the LI love the PC? Incremented by menus. 1:total_menus total_points = 0 # total_menus x 2 percentage = 0.0 # li_loves_pc/total_points ## temporary variables; these are reset immediately after being used tmp_count = 0 tmp_truefalse = False tmp_string = '' ## minor variables saw_ghost = False # did the PC see the ghost in the cafe? saw_ghost_again = False # did the PC see the ghost in the park? got_trinket = False # did the PC get the jewelry from the grotto? gave_trinket = False # did the PC give the LI the jewelry from the grotto? ## Functions ## set up the debug console toggle config.keymap['debug_console'] = [ '~' ] config.underlay.append(renpy.Keymap(debug_console=renpy.curried_call_in_new_context('debug_console'))) ## only need a rudimentary navigation system, since the rooms will be so small. ## the navigation overlay is 'off' by default, and only on when you're free to explore. ## better yet, use the menu. ## okay, this is officially overkill. Oh, well! def go_west(): renpy.checkpoint(dir_dic['west']) renpy.jump(dir_dic['west']) def go_east(): renpy.checkpoint(dir_dic['east']) renpy.jump(dir_dic['east']) def go_north(): renpy.checkpoint(dir_dic['north']) renpy.jump(dir_dic['north']) def go_south(): renpy.checkpoint(dir_dic['south']) renpy.jump(dir_dic['south']) def go_out(): renpy.checkpoint(dir_dic['out']) renpy.jump(dir_dic['out']) def go_in(): renpy.checkpoint(dir_dic['in']) renpy.jump(dir_dic['in']) def enter_cafe(): renpy.checkpoint(dir_dic['enter_cafe']) renpy.jump(dir_dic['enter_cafe']) def exit_cafe(): renpy.checkpoint(dir_dic['exit_cafe']) renpy.jump(dir_dic['exit_cafe']) def do_wait(): renpy.checkpoint(dir_dic['wait']) renpy.jump(dir_dic['wait']) def show_navigation_overlay(): if navigation_overlay_shown == True: ui.window(style='menu_window') ui.vbox() if 'north' in dir_dic: ui.textbutton('North', style='menu_choice_button', clicked=go_north) if 'south' in dir_dic: ui.textbutton('South', style='menu_choice_button', clicked=go_south) if 'east' in dir_dic: ui.textbutton('East', style='menu_choice_button', clicked=go_east) if 'west' in dir_dic: ui.textbutton('West', style='menu_choice_button', clicked=go_west) if 'out' in dir_dic: ui.textbutton('Out', style='menu_choice_button', clicked=go_out) if 'in' in dir_dic: ui.textbutton('In', style='menu_choice_button', clicked=go_in) if 'enter_cafe' in dir_dic: ui.textbutton('Enter Cafe', style='menu_choice_button', clicked=enter_cafe) if 'exit_cafe' in dir_dic: ui.textbutton('Exit Cafe', style='menu_choice_button', clicked=exit_cafe) if 'wait' in dir_dic: ui.textbutton('Wait', style='menu_choice_button', clicked=do_wait) ## just in case there aren't enough directions available to fill up the menu if len(dir_dic) == 2: ui.textbutton('', style='menu_choice_button', clicked='') if len(dir_dic) == 1: ui.textbutton('', style='menu_choice_button', clicked='') ui.textbutton('', style='menu_choice_button', clicked='') ui.close() return [ ] config.overlay_functions.append(show_navigation_overlay) ## some minor functions to handle gender-based toggles so I don't have to ## set up all the appropriate gender variables here label parse_gender_variables: if gen == 'xy': # protagonist's gender is male $ li_gender = 'girl' # 'I could fall in love with a girl like that...' # gender variables when referring to the LI $ heshe = 'she' $ himher = 'her' $ hishers = 'hers' # gender variables when referring to the protagonist $ hesheme = 'he' $ himherme = 'him' $ hishers = 'his' else: # protagonist's gender is female $ li_gender = 'guy' # 'I could fall in love with a guy like that...' $ heshe = 'he' $ himher = 'him' $ hishers = 'his' $ hesheme = 'she' $ himherme = 'her' $ hishersme = 'hers' return ## a quick and dirty console for debugging/gender swap/aura colors label debug_console: ## this console is only available if you've completed the game once as each gender. # if persistent.completed_xy == None or persistent.completed_xx == None: # return menu: "debug on" if not debug_on: $ debug_on = True "(Debug mode is now ON. Debugging messages are highlighted in red from this point on.)" "debug off" if debug_on: $ debug_on = False "(Debug mode is now OFF. You won't see any new debugging messages.)" "set female" if gen == "xy": $ gen = 'xx' "(The protagonist is now considered female. This won't have any effect until you reach a shared node. When you start seeing the male love interest, you know it's worked!)" call parse_gender_variables from _call_parse_gender_variables_1 "set male" if gen == "xx": $ gen = 'xy' "(The protagonist is now considered male. This won't have any effect until you reach a shared node. When you start seeing the female love interest, you know it's worked!)" call parse_gender_variables from _call_parse_gender_variables_2 "auras basics": scene black with dissolve show fli default at center d '"Auras and what they mean in {i}Eidolon{/i}."' show fli embarrassed at center with dissolve d '"Soft pink means embarrassed."' show fli attracted at center with dissolve d '"Purple means attracted."' hide fli show mli amused at center with dissolve d '"Soft yellow means amused."' show mli happy with dissolve d '"Bright yellow means happy."' hide mli show fli worried at center with dissolve d '"Light blue means worried."' show fli sad at center with dissolve d '"Dark blue means sad."' hide fli show mli annoyed at center with dissolve d '"Light red means annoyed."' show mli angry at center with dissolve d '"Dark red means angry."' hide mli "[...returning to game...]" return