Advertisement
Guest User

options.rpy

a guest
Sep 14th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.47 KB | None | 0 0
  1. init -3 python hide:
  2.     renpy.demo_mode = True
  3.  
  4. init -1 python hide:
  5.     config.developer = True
  6.  
  7.  
  8.  
  9.  
  10.     config.screen_width = 1024
  11.     if persistent.resolution == None:
  12.         persistent.resolution = 2
  13.     if persistent.old_resolution == None:
  14.         persistent.old_resolution = persistent.resolution
  15.  
  16.     if not persistent.resolution:
  17.         config.screen_height = 600
  18.     else:
  19.         config.screen_height = 640
  20.  
  21.     if renpy.demo_mode:
  22.         config.window_title = u"Analogue trial"
  23.     else:
  24.         config.window_title = u"Analogue: A Hate Story"
  25.  
  26.     config.name = "Analogue"
  27.     config.version = "0.0"
  28.  
  29.     # config.mouse = { "default":[ ("arrow32.png",4,0) ] }
  30.  
  31.     config.autosave_frequency = 20
  32.     config.image_cache_size *= 3
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.     def auto_save_extra_info():
  40.         return save_name
  41.     config.auto_save_extra_info = auto_save_extra_info
  42.  
  43.     config.keymap["game_menu"] = [ ]
  44.     config.keymap["hide_windows"] = [ ]
  45.     config.keymap["quit"].append('K_ESCAPE')
  46.     config.keymap["toggle_fullscreen"] = [ ]
  47.     config.keymap["screenshot"] = [ "alt_s", "meta_s" ]
  48.     config.keymap["rollback"] = [ ]
  49.     config.keymap["rollforward"] = [ ]
  50.  
  51.  
  52.  
  53.  
  54.     theme.bordered(
  55.         widget = "#D9D9D9",
  56.         widget_hover = "#F0F2F2",
  57.         widget_text = "#ffffff",
  58.         widget_selected = "#737373",
  59.         disabled = "#F0F2F2",
  60.         disabled_text = "#FBFBFB",
  61.         label = "#D9D9D9",
  62.         frame = "#ffffff",
  63.         mm_root = "#E6E6E6",
  64.         gm_root = "#E6E6E6",
  65.         rounded_window = False,        
  66.         )
  67.  
  68.     style.window.background = Frame("window.png", 20, 20)
  69.  
  70.     style.window.left_padding = 50
  71.     style.window.right_padding = 50
  72.     style.window.top_padding = 50
  73.     style.window.bottom_padding = 50
  74.  
  75.     style.window.yminimum = 0
  76.     style.window.xfill = False
  77.     style.window.xmaximum = 550
  78.  
  79.     style.window.xalign = 0.8
  80.     style.window.yalign = 0.2
  81.  
  82.     style.button["load"].background = style.button["load"].selected_background = style.button["normal-noselected"].background = style.button["normal-noselected"].selected_background = style.button["normal"].background = Frame("mainmenubutton.png", 30, 30)
  83.     style.button["load"].hover_background = style.button["normal-noselected"].hover_background = style.button["normal"].hover_background = Frame("mainmenubutton-hover.png", 30, 30)
  84.     style.button["load"].xpadding = style.button["normal-noselected"].xpadding = style.button["normal"].xpadding = 40
  85.     style.button["load"].bottom_padding = style.button["normal-noselected"].bottom_padding = style.button["normal"].bottom_padding = 30
  86.     style.button["load"].top_padding = style.button["normal-noselected"].top_padding = style.button["normal"].top_padding = 20
  87.     style.button["load"].insensitive_background = style.button["normal-noselected"].insensitive_background = style.button["normal"].insensitive_background = style.button["normal"].selected_background = Frame("mainmenubutton-idle.png", 30, 30)
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.     style.default.size = 24
  99.     style.default.color = (61, 61, 61, 196)
  100.     style.default.bold = True
  101.     style.default.font = "fonts/Delicious-Roman.otf"
  102.     style.default.language = "korean-with-spaces"
  103.  
  104.  
  105.     config.font_replacement_map["fonts/Delicious-Roman.otf", True, False] = ("fonts/Delicious-Bold.otf", False, False)
  106.     config.font_replacement_map["fonts/Delicious-Roman.otf", False, True] = ("fonts/Delicious-Italic.otf", False, False)
  107.     config.font_replacement_map["fonts/Delicious-Roman.otf", True, True] = ("fonts/Delicious-BoldItalic.otf", False, False)
  108.  
  109.     style.center = Style(style.default)
  110.     style.center.text_align = 0.5
  111.  
  112.     style.nvl_window.background = None
  113.     style.nvl_window.yoffset = (640-config.screen_height)/-2
  114.  
  115.     style.title = Style(style.text)
  116.     style.title.font = "fonts/Delicious-Heavy.otf"
  117.     style.title.bold = False
  118.     style.title.color = (255,255,255,220)
  119.     style.title.size = 28
  120.  
  121.     style.choice = Style(style.text)
  122.     style.choice.minwidth = 150
  123.     style.choice.yalign = 1.0
  124.     style.choice.outlines = [ (2, (255, 255, 255, 255), 0, 0) ]
  125.     style.choice.size = 20
  126.  
  127.     style.message_button = Style(style.text)
  128.     style.message_button.size = 24
  129.  
  130.     style.message_button_small = Style(style.message_button)
  131.     style.message_button_small.bold = False
  132.     style.message_button_small.size = 20
  133.  
  134.     style.menu_button = Style(style.text)
  135.     style.menu_button.size = 46
  136.  
  137.     style.terminal = Style(style.text)
  138.     style.terminal.font = "fonts/WHITRABT.TTF"
  139.     style.terminal.size = 16
  140.     style.terminal.bold = False
  141.  
  142.     style.preferences = Style(style.text)
  143.     style.preferences.size = 28
  144.  
  145.     style.preferences_button = Style(style.text)
  146.     style.preferences_button.size = 20
  147.  
  148.     style.objective = Style(style.text)
  149.     style.objective.font = "fonts/Planer-Regular.otf"
  150.     style.objective.bold = False
  151.     style.objective.line_spacing = -4
  152.     style.objective.size = 19
  153.  
  154.     style.pages = Style(style.text)
  155.     style.pages.bold = False
  156.     style.pages.selected_bold = True
  157.  
  158.     style.load = Style(style.text)
  159.  
  160.     style.say_label.font = "fonts/Delicious-Heavy.otf"
  161.  
  162.     style.skip = Style(style.text)
  163.     style.skip.size = 22
  164.  
  165.     style.main_screen = Style(style.text)
  166.  
  167.     style.plain = Style(style.text)
  168.  
  169.     style.block = Style(style.text)
  170.     style.block.size = 24
  171.  
  172.     style.log_pages = Style(style.text)
  173.     style.log_pages.size = 18
  174.  
  175.  
  176.  
  177.  
  178.     config.has_sound = True
  179.     config.has_music = True
  180.     config.has_voice = False
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.     config.sample_sound = "sfx/fxbeep5.mp3"
  195.  
  196.  
  197.  
  198.     config.help = None
  199.  
  200.  
  201. init 1 python hide:
  202.     config.main_menu_music = PROLOGUE
  203.  
  204.  
  205.  
  206.  
  207.  
  208.     config.enter_transition = None
  209.  
  210.  
  211.     config.exit_transition = None
  212.  
  213.  
  214.     config.intra_transition = None
  215.  
  216.  
  217.     config.main_game_transition = None
  218.  
  219.  
  220.     config.game_main_transition = None
  221.  
  222.  
  223.     config.end_splash_transition = Dissolve(1.0)
  224.  
  225.  
  226.     config.end_game_transition = None
  227.  
  228.  
  229.     config.after_load_transition = None
  230.  
  231.  
  232.     config.window_show_transition = None
  233.  
  234.  
  235.     config.window_hide_transition = None
  236.  
  237.     config.nvl_adv_transition = Dissolve(0.5)
  238.  
  239.     config.window_icon = "icon256x256.png"
  240.     config.windows_icon = "icon32x32.png"
  241.  
  242. python early:
  243.     config.save_directory = "Analogue"
  244.  
  245.     def new_lookup(self, label):
  246.         """
  247.        Looks up the given label in the game. If the label is not found,
  248.        raises a ScriptError.
  249.  
  250.        Or rather, that's what the old one does. This just dumps you to
  251.        the restart label rather than raising an exception.
  252.        """
  253.        
  254.         label = renpy.config.label_overrides.get(label, label)
  255.        
  256.         if label not in self.namemap:
  257.             return self.namemap["restart"]
  258.        
  259.         return self.namemap[label]
  260.  
  261.     renpy.script.Script.lookup = new_lookup
  262.  
  263. init -1 python hide:
  264.     import os
  265.     os.environ["SDL_VIDEO_CENTERED"] = "1"
  266.  
  267.     config.default_fullscreen = True
  268.  
  269.     config.default_text_cps = 40
  270.  
  271.     config.quit_action = Show("quit")
  272.  
  273.     store.radiation = 0
  274.     store.reactor_enabled = True
  275.     def interact_cb():
  276.         if store.radiation and store.reactor_enabled:
  277.             store.radiation_levels += 0.01
  278.            
  279.             if (any_read("7-*") or (store.current_character == "mute" and get_m("6-9").enabled)) and store.radiation_levels < 0.65:
  280.                 store.radiation_levels = 0.65
  281.            
  282.             store.radiation_levels = min (store.radiation_levels, 0.8)
  283.  
  284.     config.interact_callbacks.append(interact_cb)
  285.  
  286.     def set_resolution(new_resolution):      
  287.         if new_resolution == 1:
  288.             if persistent.resolution != new_resolution:
  289.                 config.screen_width = 1024
  290.                 config.screen_height = 640
  291.                 Preference("display", "window")()
  292.         else:
  293.             if config.screen_height != 600 + new_resolution*20:
  294.                 Preference("display", "window")()
  295.                 config.screen_height = 600 + new_resolution*20
  296.             if persistent.resolution != new_resolution:
  297.                 Preference("display", "fullscreen")()
  298.            
  299.             persistent.old_resolution = new_resolution
  300.         persistent.resolution = new_resolution
  301.  
  302.     renpy.set_resolution = set_resolution
  303.  
  304.     def nop(*args, **kwargs):
  305.         pass
  306.  
  307. init -1 python:
  308.  
  309.  
  310.     class NewLanguage(Language):
  311.         pass
  312. # Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement