Advertisement
Guest User

Untitled

a guest
Mar 15th, 2023
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 15.40 KB | None | 0 0
  1. option.rpy
  2.  
  3. init -1 python hide:
  4.     config.developer=True
  5.     config.rollback_enabled=False
  6.     config.hard_rollback_limit=0
  7.     config.rollback_length=0
  8.     config.screen_width=1280
  9.     config.screen_height=720
  10.     config.window_title=u"Lights 0.2"
  11.     config.name="Lights"
  12.     config.version="0.2"
  13.     theme.bordered(widget="#99997796",widget_hover="#79999790",widget_text="#b8b8b8",widget_selected="#3f8da3",disabled="#77777790",disabled_text="#8C8C70",label="#1A0001",frame="#00000000",mm_root="#1A0001",gm_root="#1A0001",rounded_window=False)
  14.     style.default.size=20
  15.     style.window.background=None
  16.    
  17.     config.has_sound=True
  18.     config.has_music=True
  19.     config.has_voice=False
  20.     config.has_autosave=False
  21.     config.autosave_on_quit=False
  22.     config.allow_skipping=False
  23.     config.default_fullscreen=False
  24.     config.quicksave_slots=0
  25.     config.autosave_slots=0
  26.     config.has_autosave=False
  27.     config.thumbnail_width=300
  28.     config.thumbnail_height=180
  29. python early:
  30.     config.save_directory="lig-1471825764"
  31. init python:
  32.     build.directory_name="Lights-0.2"
  33.     build.executable_name="test"
  34.     build.include_update=False
  35.     build.classify('**~',None)
  36.     build.classify('**.bak',None)
  37.     build.classify('**/.**',None)
  38.     build.classify('**/#**',None)
  39.     build.classify('**/thumbs.db',None)
  40.     build.classify('**.rpy',None)
  41.     build.classify('**/cache/**',None)
  42.     build.classify('**/saves/**',None)
  43.     build.classify('**','archive')
  44. init:
  45.     $config.keymap=dict(
  46.     rollback=[],
  47.     screenshot=[],
  48.     toggle_afm=[],
  49.     toggle_fullscreen=[],
  50.     game_menu=['K_ESCAPE','mouseup_3'],
  51.     hide_windows=[],
  52.     launch_editor=[],
  53.     dump_styles=[],
  54.     reload_game=['R'],
  55.     inspector=[],
  56.     full_inspector=[],
  57.     developer=[],
  58.     quit=[],
  59.     iconify=[],
  60.     help=[],
  61.     choose_renderer=[],
  62.     progress_screen=[],
  63.     self_voicing=[],
  64.     clipboard_voicing=[],
  65.     debug_voicing=[],
  66.     rollforward=[],
  67.     dismiss=['mousedown_1'],
  68.     dismiss_unfocused=[],
  69.     dismiss_hard_pause=[],
  70.     focus_left=[],
  71.     focus_right=[],
  72.     focus_up=[],
  73.     focus_down=[],
  74.     button_ignore=['mousedown_1'],
  75.     button_select=['mouseup_1'],
  76.     button_alternate=['mouseup_3'],
  77.     button_alternate_ignore=['mousedown_3'],
  78.     viewport_leftarrow=[],
  79.     viewport_rightarrow=[],
  80.     viewport_uparrow=[],
  81.     viewport_downarrow=[],
  82.     viewport_wheelup=['mousedown_4'],
  83.     viewport_wheeldown=['mousedown_5'],
  84.     viewport_drag_start=['mousedown_1'],
  85.     viewport_drag_end=['mouseup_1'],
  86.     skip=[],
  87.     stop_skipping=[],
  88.     toggle_skip=[],
  89.     fast_skip=[],
  90.     bar_activate=['mousedown_1'],
  91.     bar_deactivate=['mouseup_1'],
  92.     bar_left=[],
  93.     bar_right=[],
  94.     bar_up=[],
  95.     bar_down=[],
  96.     save_delete=[],
  97.     drag_activate=[],
  98.     drag_deactivate=[],
  99.     console=[],
  100.     console_older=[],
  101.     console_newer=[],
  102.     toggle_music=[],
  103.     viewport_up=[],
  104.     viewport_down=[],
  105.     profile_once=[],
  106.     memory_profile=[],
  107.     )
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. script.rpy
  117. # You can place your game script in this file.
  118.  
  119. # Declare images here using the image statement.
  120. # For example, image eileen happy = "eileen_happy.png"
  121.  
  122. # Define the characters of the game.
  123. image b sky="sky.webp"
  124. image b uw="uw.webp"
  125. image b vit="vit.webp"
  126. image b nl="nl.webp"
  127. image b gir="gir.webp"
  128. image b uc="uc.webp"
  129. image b per="per.webp"
  130. image b day="day.webp"
  131. image b kuz="kuz.webp"
  132. image b sset=im.Scale("sset.webp",1280,720)
  133. image sprt1=ConditionSwitch("sprt1==0","ech.webp","sprt1==1","r_pri1le.webp","sprt1==2","u_23.webp","sprt1==3","n_3.webp","sprt1==4","b_7.webp","sprt1==5","z_1.webp")
  134. init:
  135.     $r=Character(_('Rin'),color="#ffc000",what_color="#ffc000",what_slow_cps=60,what_outlines=[(3,"#0008",1,1),(2,"#0008"),(1,"#ffc000")],who_outlines=[(2,"#0008",1,1),(1,"#2c2c2c")],what_size=30,who_size=48,window_left_padding=10,afm=False)
  136. # The game starts here.
  137. label start:
  138.     $sprt1=3
  139.     show screen lights2
  140.    
  141.     $lights2("l/rne.webp",0.03,0.78,0.44,1.0,alpi2)
  142.     scene b nl with dissolve
  143.     show screen lights1(_layer="master")
  144.     $lights1("l/ire.webp",0.77,0.31,0.76,0.74,alpi2)
  145.     show sprt1
  146.     r "Glare"
  147.     $sprt1=0
  148. label ag:
  149.     show screen lights3
  150.     scene b gir with dissolve
  151.     show screen lights1(_layer="master")
  152.     show sprt1 at left
  153.     r "Fairy lights"
  154.     show b uw with dissolve
  155.     r "Undersea world"
  156.     show b sset with dissolve
  157.     r "Sunset"
  158.     show b vit with dissolve
  159.     r "stained glass windows"
  160.     show b uc with dissolve
  161.     r "A cave"
  162.     show b per with dissolve
  163.     r "lane"
  164.     show b day with dissolve
  165.     r "Field"
  166.     show b kuz with dissolve
  167.     r "Forge"
  168.     show b sky with dissolve
  169.     r "Sky"
  170.     jump ag
  171.     return
  172.  
  173.  
  174.  
  175. lights.rpy
  176.  
  177.  
  178. transform alpi08:
  179.     alpha.8
  180. transform alpi05:
  181.     alpha.5
  182. transform alpi03:
  183.     alpha.3
  184. transform alpi1:
  185.     choice:
  186.         linear 1 alpha.3
  187.         ease 2 alpha.4
  188.     choice:
  189.         linear 2 alpha.4
  190.         ease 1 alpha.3
  191.     choice:
  192.         linear 1 alpha.5
  193.         ease 2 alpha.7
  194.     choice:
  195.         linear 2 alpha.5
  196.         ease 1 alpha.3
  197.     choice:
  198.         linear 2 alpha.8
  199.         ease 2 alpha.4
  200.     choice:
  201.         linear 3 alpha.4
  202.         ease 1 alpha.6
  203.     pause (renpy.random.randint(3,6))
  204.     choice:
  205.         linear 1.5 alpha.6
  206.         linear 3 alpha.3
  207.     choice:
  208.         linear 1.5 alpha.7
  209.         linear 3 alpha.5
  210.     choice:
  211.         ease  1 alpha.3
  212.         ease  2 alpha.7
  213.     pause (renpy.random.randint(3,6))
  214.     choice:
  215.         linear 1 alpha.2
  216.         linear 2 alpha.6
  217.     choice:
  218.         linear 1 alpha.6
  219.         linear 2 alpha.4
  220.     choice:
  221.         ease  1 alpha.6
  222.         ease  2 alpha.2
  223.     pause (renpy.random.randint(3,6))
  224.     repeat
  225. transform alpi2:
  226.     choice:
  227.         linear 3 alpha.3
  228.         ease 2 alpha.4
  229.     choice:
  230.         linear 2 alpha.1
  231.         ease 2 alpha.3
  232.     choice:
  233.         linear 3 alpha.4
  234.         ease 2 alpha.2
  235.     choice:
  236.         linear 2 alpha.0
  237.         ease 2 alpha.3
  238.     choice:
  239.         linear 2 alpha.1
  240.         ease 3 alpha.3
  241.     choice:
  242.         linear 2 alpha.2
  243.         ease 2 alpha.0
  244.     choice:
  245.         linear 3 alpha.2
  246.         ease 2 alpha.1
  247.     choice:
  248.         linear 3 alpha.4
  249.         ease 1 alpha.3
  250.     pause (renpy.random.randint(3,6))
  251.     choice:
  252.         linear 2 alpha.2
  253.         linear 3 alpha.3
  254.     choice:
  255.         linear 1.5 alpha.3
  256.         linear 3 alpha.2
  257.     choice:
  258.         ease  3 alpha.1
  259.         ease  2 alpha.3
  260.     choice:
  261.         linear 4 alpha.3
  262.         linear 3 alpha.0
  263.     pause (renpy.random.randint(3,6))
  264.     choice:
  265.         linear 1 alpha.2
  266.         linear 2 alpha.4
  267.     choice:
  268.         linear 3 alpha.3
  269.         linear 2 alpha.1
  270.     choice:
  271.         ease  1 alpha.4
  272.         ease  2 alpha.2
  273.     choice:
  274.         ease  3 alpha.0
  275.         ease  2 alpha.2
  276.     pause (renpy.random.randint(3,6))
  277.     repeat
  278. transform alpi2z:
  279.     choice:
  280.         linear 3 alpha.3 zoom 1.08
  281.         ease 2 alpha.4 zoom 1
  282.     choice:
  283.         linear 2 alpha.1 zoom 1.0
  284.         ease 2 alpha.3 zoom 1
  285.     choice:
  286.         linear 3 alpha.4 zoom 1.04
  287.         ease 2 alpha.2 zoom 1
  288.     choice:
  289.         linear 2 alpha.0 zoom 1.06
  290.         ease 2 alpha.3 zoom 1.03
  291.     choice:
  292.         linear 2 alpha.1 zoom 1.0
  293.         ease 3 alpha.3 zoom 1.1
  294.     choice:
  295.         linear 2 alpha.2 zoom 1
  296.         ease 2 alpha.0 zoom 1.06
  297.     choice:
  298.         linear 3 alpha.2 zoom 1.0
  299.         ease 2 alpha.1 zoom 1.12
  300.     choice:
  301.         linear 3 alpha.4 zoom 1.14
  302.         ease 1 alpha.3 zoom 1
  303.     pause (renpy.random.randint(3,6))
  304.     choice:
  305.         linear 2 alpha.2 zoom 1.0
  306.         linear 3 alpha.3 zoom 1.04
  307.     choice:
  308.         linear 1.5 alpha.3 zoom 1.06
  309.         linear 3 alpha.2 zoom 1.0
  310.     choice:
  311.         ease  3 alpha.1 zoom 1.06
  312.         ease  2 alpha.3 zoom 1
  313.     choice:
  314.         linear 4 alpha.3 zoom 1.0
  315.         linear 3 alpha.0 zoom 1.14
  316.     pause (renpy.random.randint(3,6))
  317.     choice:
  318.         linear 1 alpha.2 zoom 1
  319.         linear 2 alpha.4 zoom 1.02
  320.     choice:
  321.         linear 3 alpha.3 zoom 1.07
  322.         linear 2 alpha.1 zoom 1.0
  323.     choice:
  324.         ease  1 alpha.4 zoom 1
  325.         ease  2 alpha.2 zoom 1.02
  326.     choice:
  327.         ease  3 alpha.0 zoom 1.1
  328.         ease  2 alpha.2 zoom 1
  329.     pause (renpy.random.randint(3,6))
  330.     repeat
  331. init python:
  332.     alpiss=[alpi08,alpi05,alpi03,alpi1,alpi2,alpi2z]
  333.     alpisn=["alpi08","alpi05","alpi03","alpi1","alpi2","alpi2z"]
  334.     sprt1=0
  335.     lig_imgs=[]
  336.     alpi_numb=0
  337.     lig_numb=0
  338.     lig_null=0
  339.     alpi_numb1=0
  340.     lig_numb1=0
  341.     lig_show=1
  342.     for fn in renpy.list_files():
  343.         if fn.startswith("l/") and fn.endswith((".webp")):
  344.             lig_imgs.append(fn)
  345.     lig_img,lig_blur,lig_2r,lig_2g,lig_2b,alpi=lig_imgs[lig_numb],0.9,0.9,0.9,0.9,alpiss[alpi_numb]
  346.     lig_img1,lig_blur1,lig_1r,lig_1g,lig_1b,alpi1=lig_imgs[lig_numb1],0.9,0.9,0.9,0.9,alpiss[alpi_numb1]
  347.     def lights2(img,blur,red,green,blue,alp):
  348.         global lig_img,lig_blur,lig_2r,lig_2g,lig_2b,alpi
  349.         lig_img=img
  350.         lig_blur=blur
  351.         lig_2r=red
  352.         lig_2g=green
  353.         lig_2b=blue
  354.         alpi=alp
  355.     def lights1(img,blur,red,green,blue,alp):
  356.         global lig_img1,lig_blur1,lig_1r,lig_1g,lig_1b,alpi1
  357.         lig_img1=img
  358.         lig_blur1=blur
  359.         lig_1r=red
  360.         lig_1g=green
  361.         lig_1b=blue
  362.         alpi1=alp
  363. screen lights1:
  364.     image im.MatrixColor(im.Scale(im.FactorScale(lig_img1,lig_blur1),1400,800),im.matrix.tint(lig_1r,lig_1g,lig_1b)) at alpi1
  365. screen lights2:
  366.     image im.MatrixColor(im.Scale(im.FactorScale(lig_img,lig_blur),1400,800),im.matrix.tint(lig_2r,lig_2g,lig_2b)) at alpi
  367. screen lights3:
  368.     if lig_show==1:
  369.         use lights3a
  370.     else:
  371.         textbutton"Show"xalign 1.0 action SetVariable('lig_show',1)
  372. screen lights3a:
  373.     imagebutton idle"l/em.webp" action SetVariable('lig_null',0)
  374.     vbox:
  375.         hbox:
  376.             text"Rays                  "
  377.             textbutton" <<<<< "action[SensitiveIf(lig_numb>0),SetVariable('lig_numb',lig_numb-1),ui.callsinnewcontext("lig_img")]
  378.             textbutton" >>>>> "action[SensitiveIf(lig_numb<len(lig_imgs)-1),SetVariable('lig_numb',lig_numb+1),ui.callsinnewcontext("lig_img")]
  379.             textbutton"0"action SetVariable('sprt1',0)
  380.             textbutton"1"action SetVariable('sprt1',1)
  381.             textbutton"2"action SetVariable('sprt1',2)
  382.             textbutton"3"action SetVariable('sprt1',3)
  383.             textbutton"4"action SetVariable('sprt1',4)
  384.             textbutton"5"action SetVariable('sprt1',5)
  385.         hbox:
  386.             text"Blur"
  387.             bar value VariableValue("lig_blur",1.0)yalign.75 xmaximum 428
  388.         hbox:
  389.             text"Red  "
  390.             bar value VariableValue("lig_2r",1.0)yalign.75 xmaximum 428
  391.         hbox:
  392.             text"Green  "
  393.             bar value VariableValue("lig_2g",1.0)yalign.75 xmaximum 428
  394.         hbox:
  395.             text"Blue      "
  396.             bar value VariableValue("lig_2b",1.0)yalign.75 xmaximum 428
  397.         hbox:
  398.             text"Transform      "
  399.             textbutton" <<<<< "action[SensitiveIf(alpi_numb>0),SetVariable('alpi_numb',alpi_numb-1),ui.callsinnewcontext("lig_transforma")]
  400.             textbutton" >>>>> "action[SensitiveIf(alpi_numb<len(alpiss)-1),SetVariable('alpi_numb',alpi_numb+1),ui.callsinnewcontext("lig_transforma")]
  401.         text" "
  402.         text"$lights2([lig_img],"+str(round(lig_blur,2))+","+str(round(lig_2r,2))+","+str(round(lig_2g,2))+","+str(round(lig_2b,2))+","+str(alpisn[alpi_numb])+")"
  403.     vbox xalign 1.0:
  404.         hbox:
  405.             text"Rays                  "
  406.             textbutton" <<<<< "action[SensitiveIf(lig_numb1>0),SetVariable('lig_numb1',lig_numb1-1),ui.callsinnewcontext("lig_img1")]
  407.             textbutton" >>>>> "action[SensitiveIf(lig_numb1<len(lig_imgs)-1),SetVariable('lig_numb1',lig_numb1+1),ui.callsinnewcontext("lig_img1")]
  408.         hbox:
  409.             text"Blur"
  410.             bar value VariableValue("lig_blur1",1.0)yalign.75 xmaximum 428
  411.         hbox:
  412.             text"Red  "
  413.             bar value VariableValue("lig_1r",1.0)yalign.75 xmaximum 428
  414.         hbox:
  415.             text"Green  "
  416.             bar value VariableValue("lig_1g",1.0)yalign.75 xmaximum 428
  417.         hbox:
  418.             text"Blue      "
  419.             bar value VariableValue("lig_1b",1.0)yalign.75 xmaximum 428
  420.         hbox:
  421.             text"Transform      "
  422.             textbutton" <<<<< "action[SensitiveIf(alpi_numb1>0),SetVariable('alpi_numb1',alpi_numb1-1),ui.callsinnewcontext("lig_transforma1")]
  423.             textbutton" >>>>> "action[SensitiveIf(alpi_numb1<len(alpiss)-1),SetVariable('alpi_numb1',alpi_numb1+1),ui.callsinnewcontext("lig_transforma1")]
  424.         text" "
  425.         text"$lights1([lig_img1],"+str(round(lig_blur1,2))+","+str(round(lig_1r,2))+","+str(round(lig_1g,2))+","+str(round(lig_1b,2))+","+str(alpisn[alpi_numb1])+")"
  426.     textbutton"Hide"xalign 1.0 action SetVariable('lig_show',0)
  427. label lig_transforma:
  428.     $alpi=alpiss[alpi_numb]
  429.     return
  430. label lig_img:
  431.     $lig_img=lig_imgs[lig_numb]
  432.     return
  433. label lig_transforma1:
  434.     $alpi1=alpiss[alpi_numb1]
  435.     return
  436. label lig_img1:
  437.     $lig_img1=lig_imgs[lig_numb1]
  438.     return
  439.  
  440.  
  441.  
  442. screen.rpy
  443.  
  444. screen say:
  445.     window:
  446.         id"window"
  447.         has vbox:
  448.             style"say_vbox"
  449.         text who id"who"
  450.         text what id"what"
  451. screen choice:
  452.     window:
  453.         style"menu_window"xalign.5 yalign.5
  454.         vbox:
  455.             style"menu"
  456.             spacing 1
  457.             for caption,action,chosen in items:
  458.                 if action:
  459.                     button:
  460.                         action action
  461.                         style"menu_choice_button"
  462.                         text caption style"menu_choice"
  463.                 else:
  464.                     text caption style"menu_caption"
  465. screen input:
  466.     window style"input_window":
  467.         has vbox
  468.         text prompt style"input_prompt"
  469.         input id"input"style"input_text"
  470. screen main_menu:
  471.     image im.Scale(im.FactorScale("l/rnf.webp",0.06),1400,800)
  472.     textbutton"{size=60}Lights 0.2"xalign.5 yalign.5 action Start()
  473. screen navigation:
  474.     pass
  475. screen file_picker:
  476.     frame:
  477.         style"file_picker_frame"
  478.         has vbox
  479.         $columns=4
  480.         grid columns 1:
  481.             transpose True
  482.             xfill True
  483.             style_group"file_picker"
  484.             for i in range(1,columns+1):
  485.                 button:
  486.                     action FileAction(i)
  487.                     xfill True
  488.                     has vbox
  489.                     add FileScreenshot(i)
  490.                     $file_name=FileSlotName(i,columns)
  491.                     $file_time=FileTime(i,empty=_(""))
  492.                     $save_name=FileSaveName(i)
  493.                     text"{size=24}       [file_time!t] [save_name!t]"
  494.                     key"save_delete"action FileDelete(i)
  495.         hbox:
  496.             textbutton _("Save")action ShowMenu("save")
  497.             for i in range(1,7):
  498.                 textbutton str(" "):
  499.                     action FilePage(i)
  500.             textbutton _("Load")action ShowMenu("load")
  501.     hbox yalign 1.0:
  502.         textbutton _(" ")action Preference("display","window")
  503.         textbutton _(" ")action Preference("display","fullscreen")
  504. screen save:
  505.     tag menu
  506.     add"#12060290"
  507.     use navigation
  508.     use file_picker
  509. screen load:
  510.     tag menu
  511.     add"#12060290"
  512.     use navigation
  513.     use file_picker
  514. screen preferences:
  515.     pass
  516. screen yesno_prompt:
  517.     modal True
  518.     timer.1 action(yes_action)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement