From 0ceae541a5e368bf38ed563f8ada43b7c3cf71e2 Mon Sep 17 00:00:00 2001 From: Map Date: Tue, 1 Oct 2024 17:03:38 -0500 Subject: [PATCH 01/12] Add more safegaurds when entering the chapter select, rephrase some chapter select text --- game/src/chapter_select.rpy | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index b1558f6..e2f9422 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -134,12 +134,23 @@ label chapter_select: $ anon_points = 0 $ fang_points = 0 + camera: + yanchor 0.0 xanchor 0.0 rotate None zoom 1.0 + matrixcolor None + + stop ambient + stop ambient1 + stop ambient2 + stop ambient3 stop sound - stop music fadeout 2 - scene black with dissolve + stop music + stop music1 + stop music2 + scene black + with dissolve menu: - "Initialize scores:" + "What ending do you want to lock to?" "Ending 1": pass # Since points are already initialized at 0 From d9cb051d91785ddf7a509107241bf1ff7eabb19b Mon Sep 17 00:00:00 2001 From: Map Date: Tue, 1 Oct 2024 17:11:18 -0500 Subject: [PATCH 02/12] reorganize definitions into a seperate file. Rename definitions.rpy into image_definitions.rpy change some var defaults into actual default statements --- game/script.rpy | 263 +----------------- ...{definitions.rpy => image_definitions.rpy} | 0 game/src/misc_definitions.rpy | 198 +++++++++++++ 3 files changed, 202 insertions(+), 259 deletions(-) rename game/src/{definitions.rpy => image_definitions.rpy} (100%) create mode 100644 game/src/misc_definitions.rpy diff --git a/game/script.rpy b/game/script.rpy index 641af18..c7dee75 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -23,7 +23,6 @@ init -1 python: init python: import random - import webbrowser #function for insult layers def showCG(): files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"] @@ -31,6 +30,7 @@ init python: picked = random.randint(0,length - 1) fileName = files[picked] renpy.show(fileName, at_list=[randPosition]) + # extra music channel so we can do crossfade instead of fadeout followed by fadein # TODO: function for stopping both channels with optional fadeout so we don't have to keep track of which channel is playing renpy.music.register_channel("music1","music",True,tight=True) @@ -40,17 +40,12 @@ init python: renpy.music.register_channel("ambient1","sfx",True,tight=True) renpy.music.register_channel("ambient2","sfx",True,tight=True) renpy.music.register_channel("ambient3","sfx",True,tight=True) + if persistent.scroll == True: config.keymap['dismiss'].append('mousedown_4') elif persistent.scroll == None: persistent.scroll = False - if persistent.lewd == None: - persistent.lewd = False - - if persistent.autoup == None: - persistent.autoup = False - if persistent.bonus_chapters == None: if renpy.seen_image("big ending"): #for returning players persistent.bonus_chapters = 0b111111111 @@ -67,258 +62,8 @@ init python: pass -transform randPosition: - alpha 0.0 - xalign random.uniform(0.2,0.8) - yalign random.uniform(0.2,0.8) - linear 0.6 alpha 1.0 - linear 1.0 alpha 0.0 - - -#python: -# def Walking( name ): -# show name: -# xalign 0.2 yalign 0.25 -# ease 1.0 yalign 0.0 -# ease 1.0 yalign 0.25 -# repeat - - -#layeredimage aquariumexhibit: -#group animals: -# attribute babyTurtle: -# attribute octo: -# attribute -# attribute -# attribute -# attribute - -#layeredimage aquarium -#group kids: -# attribute wkids: -# "smolpatrol.webp" - -#layeredimage anon: -# group face: -# attribute neutralFace default: -# "anonb1f1.webp" -# attribute happyFace: -# "anonhappyface.webp" -# attribute flipNeutralFace: -# "flipanonb1f1.webp" -# attribute flipHappyFace: -# "flipanonhappyface.webp" -# group body: -# attribute neutralBody default: -# "anonspriteneutral.webp" -# attribute thumbsUp: -# "anonspritethumbsup.webp" -# attribute flipThumbsUp: -# "flipanonspritethumbsup.webp" -# attribute: -# "flipanonspriteneutral.webp" -# attribute monkey: -# "monkeyanon.webp" -# group holding: -# attribute guitar: -# "guitar.webp" - -# Click-to-continue icons / animations -# TODO: settle on a position/animation that people like - - -#Raw Image & kwargs for long textboxes -define long_textbox_img = Image("gui/textbox_long.png", xalign=0.5, yalign=1.0) -define long_textbox = { "window_background": long_textbox_img, 'namebox_style': "namebox_large" } - -#Characters -define base = Character (ctc="ctc_end_marker", ctc_pause="ctc_mid_marker", ctc_timedpause=Null(), ctc_position="nestled") # try to remember some of the basics of CTC -define narrator = Character(kind=base) -define A = Character (_('Anon'), base, color="#36E12D", who_outlines=[(gui.name_text_thickness, '#0C300A')]) # Light Green -define F = Character (_('Fang'), base, color="#B4D4CE", who_outlines=[(gui.name_text_thickness, '#0F3930')]) # Light Cyan -define Lucy = Character (_('Lucy'), base, color="#B4D4CE", who_outlines=[(gui.name_text_thickness, '#0F3930')]) # Light Cyan -define Ro = Character (_('Rosa'), base, color="#FE712B", who_outlines=[(gui.name_text_thickness, '#54230F')]) # Red-Orange -define St = Character (_('Stella'), base, color="#D5FFAE", who_outlines=[(gui.name_text_thickness, '#294211')]) # Light Green -define N = Character (_('Naomi'), base, color="#FDD2C1", who_outlines=[(gui.name_text_thickness, '#462628')]) # Peach -define Nas = Character (_('Naser'), base, color="#FFB561", who_outlines=[(gui.name_text_thickness, '#512322')]) # Orange -define T = Character (_('Trish'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#3A0C5D')]) # Purple -define Attendant = Character (_('Attendant'), base, color="#5BF0F8", who_outlines=[(gui.name_text_thickness, '#121C68')]) # Aqua -define Sp = Character (_('Spears'), base, color="#C7C7C7", who_outlines=[(gui.name_text_thickness, '#272727')]) # Light Grey -define Re = Character (_('Reed'), base, color="#ED4C5B", who_outlines=[(gui.name_text_thickness, '#421014')]) # Bright Red -define D = Character (_('Driver'), base, color="#FFECBC", who_outlines=[(gui.name_text_thickness, '#563010')]) # Yellow-Orange - -define FM = Character (_("Fang's Mom"), base, color="#FFD8F6", who_outlines=[(gui.name_text_thickness, '#521947')]) # Bright Pink -define FD = Character (_("Fang's Dad"), base, color="#D8A09A", who_outlines=[(gui.name_text_thickness, '#461B1F')]) # Desaturated Orange - -define LM = Character (_("Lucy's Mom"), base, color="#FFD8F6", who_outlines=[(gui.name_text_thickness, '#521947')]) # Bright Pink -define LD = Character (_("Lucy's Dad"), base, color="#D8A09A", who_outlines=[(gui.name_text_thickness, '#461B1F')]) # Desaturated Orange - -define Tsuki = Character (_('Mr. Tsuki'), base, color="#A7F2A2", who_outlines=[(gui.name_text_thickness, '#471054')]) # Pear Green -define unknown = Character (_('(???)'), base, color="#FFF", who_outlines=[(gui.name_text_thickness, '#000')]) # White -define jingo = Character (_('Mr. Jingo'), base, color="#CD8283", who_outlines=[(gui.name_text_thickness, '#0F0D49')]) # Desaturated Red -define MaitD = Character (_('Maitre D'), base, color="#AF9EFF", who_outlines=[(gui.name_text_thickness, '#241630')]) # Cobalt Blue -define Moe = Character(_('Moe'), base, color="#A5BEED", who_outlines=[(gui.name_text_thickness, '#1F253B')]) # Desaturated Blue -define Vince = Character (_('Vince'), base, color="#FFECBC", who_outlines=[(gui.name_text_thickness, '#563010')]) # Yellow-Orange -define Waitress = Character (_('Waitress'), base, color="#F691C8", who_outlines=[(gui.name_text_thickness, '#512040')]) # Pink -define Riley = Character (_('Riley'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#1F0632')]) # TODO -define Tana = Character (_('Tana'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#1F0632')]) # TODO -define Trevor = Character (_('Trevor'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#1F0632')]) # TODO -#long TB chars -define AnonAndFang = Character(_('Anon and Fang'), base, color="72DFA8", who_outlines=[(gui.name_text_thickness, '#113623')]) # Cyan -define SV = Character (_('Street Vendor'), base, color="#F8E120", who_outlines=[(gui.name_text_thickness, '#58260C')]) # Yellow -define carl = Character ('Mr. Carldewskii', base, color="#EECB99", who_outlines=[(gui.name_text_thickness, '#082337')]) #Puke Orange -define Drf = Character ('Dr. Fernsworth', base, color="#DCEEF5", who_outlines=[(gui.name_text_thickness, '#253354')]) #Yellow-Orange -define FRT = Character (_('Fang Reed & Trish'), base, color="#DCBBF7", who_outlines=[(gui.name_text_thickness, '#191C78')]) #Light Purple -define FangAndTrish = Character(_('Fang and Trish'), base, color="#42DFA8", who_outlines=[(gui.name_text_thickness, '#183623')]) -define NaserAndNaomi = Character(_('Naser and Naomi'), base, color="#22DFA8", who_outlines=[(gui.name_text_thickness, '#2036B3')]) -define TeamMember = Character(_('Team member'), base, color="#D32552", who_outlines=[(gui.name_text_thickness, '#445F42')]) -define Everyone = Character(_('Everyone'), base, color="#A45489", who_outline=[(gui.name_text_thickness, '#4F5F81')]) -define Chet = Character(_('Chet'), base, color="#B45411", who_outline=[(gui.name_text_thickness, '#BF5F81')]) - - -#Custom Vars for positions -transform scenter: - xalign 0.5 yalign 0.0 -transform sleft: - xalign 0.0 yalign 0.0 -transform sright: - xalign 1.0 yalign 0.0 - -#Stella -transform stcenter: - xalign 0.5 yalign 0.1 -transform stleft: - xalign 0.0 yalign 0.1 -transform stright: - xalign 1.0 yalign 0.1 - -#Anon -transform acenter: - xalign 0.5 yalign 0.1 -transform aleft: - xalign 0.0 yalign 0.1 -transform aright: - xalign 1.0 yalign 0.1 - -#Naser -transform ncenter: - xalign 0.6 yalign 0.1 -transform nleft: - xalign -0.2 yalign 0.1 -transform nright: - xalign 1.9 yalign 0.1 - -#Fangs mom -transform fmcenter: - xalign 0.5 yalign 0.1 -transform fmleft: - xalign 0.0 yalign 0.1 -transform fmright: - xalign 1.0 yalign 0.1 - -#Trish -transform tcenter: - xalign 0.5 yalign 0.1 -transform tleft: - xalign 0.0 yalign 0.1 -transform tright: - xalign 1.0 yalign 0.1 - -#Reed and other long tailed dinos -transform rcenter: - xalign 1.2 yalign 0.1 -transform rleft: - xalign -0.2 yalign 0.1 -transform rright: - xalign 1.7 yalign 0.1 - -#misc transforms -transform shudder: - subpixel True - around (.5, .5) alignaround (.5, .5) xalign .5 yalign .5 - rotate 0 - linear 0.0 rotate -0.75 - block: - linear 0.04 rotate 0.75 - linear 0.05 rotate -0.75 - linear 0.07 rotate 0 - -transform turnaround: - linear 0.1 xzoom -1.0 - -transform wiggle: - subpixel True - block: - xpos 0.5 ypos 1.0 xanchor 0.5 yanchor 1.0 zoom 1.02 - alignaround (.5, .5) - linear 10.0 yalign 1.0 clockwise circles 1 - repeat - - -transform raymbatransform: - xcenter 0.6 ycenter 0.385 zoom 0.5 - -# PHONE SCROLLING - - -transform cursortransform: - block: - yalign 0.2 xalign 0.60 - pause .25 - easein_cubic 1 yalign 0.75 xalign 0.54 - pause .5 - repeat - -screen prompt(): - fixed: - add "cursor" - -screen mousedetect(): - transform: # thanks based nutbuster - zoom 0.8 - rotate 12.5 - mousearea: - ypos -75 - area(432, 0, 795, 1100) - # xalign 0.5 yanchor 0 ypos 0 - hovered Hide("prompt" ) - unhovered Show("prompt") - -screen textscroll(): - timer 2.0 action(Show("mousedetect"), Show("prompt")) - - add Solid("FFF") - - transform: - zoom 0.8 - rotate 12.5 - viewport: - xalign 0.51 yanchor 0 ypos -75 xysize(795, 1150) - child_size(795, 7650) - draggable True - arrowkeys True - # edgescroll(400, 800) - - yinitial 1.0 - - imagebutton auto "fangbutton%s" xalign 0.53 yalign 0.5: - ypos 65+(int(107/2)) - xsize 284 - ysize 107 - action (Hide("mousedetect"), Hide("prompt"), Hide("textscroll", transition=Dissolve(1.0)), Return()) - add "texts" - - add "fang phone" - - -# Naser's position when helping Anon get up -transform nmidright: - xalign 1.5 yalign 0.08 - -# Naomi's position when handing the brochure to Anon -transform scloserleft: - xalign 0.1 yalign 0.0 - +default persistent.lewd = False +default persistent.autoup = False label start: diff --git a/game/src/definitions.rpy b/game/src/image_definitions.rpy similarity index 100% rename from game/src/definitions.rpy rename to game/src/image_definitions.rpy diff --git a/game/src/misc_definitions.rpy b/game/src/misc_definitions.rpy new file mode 100644 index 0000000..ae273d5 --- /dev/null +++ b/game/src/misc_definitions.rpy @@ -0,0 +1,198 @@ +transform randPosition: + alpha 0.0 + xalign random.uniform(0.2,0.8) + yalign random.uniform(0.2,0.8) + linear 0.6 alpha 1.0 + linear 1.0 alpha 0.0 + +#Raw Image & kwargs for long textboxes +define long_textbox_img = Image("gui/textbox_long.png", xalign=0.5, yalign=1.0) +define long_textbox = { "window_background": long_textbox_img, 'namebox_style': "namebox_large" } + +#Characters +define base = Character (ctc="ctc_end_marker", ctc_pause="ctc_mid_marker", ctc_timedpause=Null(), ctc_position="nestled") # try to remember some of the basics of CTC +define narrator = Character(kind=base) +define A = Character (_('Anon'), base, color="#36E12D", who_outlines=[(gui.name_text_thickness, '#0C300A')]) # Light Green +define F = Character (_('Fang'), base, color="#B4D4CE", who_outlines=[(gui.name_text_thickness, '#0F3930')]) # Light Cyan +define Lucy = Character (_('Lucy'), base, color="#B4D4CE", who_outlines=[(gui.name_text_thickness, '#0F3930')]) # Light Cyan +define Ro = Character (_('Rosa'), base, color="#FE712B", who_outlines=[(gui.name_text_thickness, '#54230F')]) # Red-Orange +define St = Character (_('Stella'), base, color="#D5FFAE", who_outlines=[(gui.name_text_thickness, '#294211')]) # Light Green +define N = Character (_('Naomi'), base, color="#FDD2C1", who_outlines=[(gui.name_text_thickness, '#462628')]) # Peach +define Nas = Character (_('Naser'), base, color="#FFB561", who_outlines=[(gui.name_text_thickness, '#512322')]) # Orange +define T = Character (_('Trish'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#3A0C5D')]) # Purple +define Attendant = Character (_('Attendant'), base, color="#5BF0F8", who_outlines=[(gui.name_text_thickness, '#121C68')]) # Aqua +define Sp = Character (_('Spears'), base, color="#C7C7C7", who_outlines=[(gui.name_text_thickness, '#272727')]) # Light Grey +define Re = Character (_('Reed'), base, color="#ED4C5B", who_outlines=[(gui.name_text_thickness, '#421014')]) # Bright Red +define D = Character (_('Driver'), base, color="#FFECBC", who_outlines=[(gui.name_text_thickness, '#563010')]) # Yellow-Orange + +define FM = Character (_("Fang's Mom"), base, color="#FFD8F6", who_outlines=[(gui.name_text_thickness, '#521947')]) # Bright Pink +define FD = Character (_("Fang's Dad"), base, color="#D8A09A", who_outlines=[(gui.name_text_thickness, '#461B1F')]) # Desaturated Orange + +define LM = Character (_("Lucy's Mom"), base, color="#FFD8F6", who_outlines=[(gui.name_text_thickness, '#521947')]) # Bright Pink +define LD = Character (_("Lucy's Dad"), base, color="#D8A09A", who_outlines=[(gui.name_text_thickness, '#461B1F')]) # Desaturated Orange + +define Tsuki = Character (_('Mr. Tsuki'), base, color="#A7F2A2", who_outlines=[(gui.name_text_thickness, '#471054')]) # Pear Green +define unknown = Character (_('(???)'), base, color="#FFF", who_outlines=[(gui.name_text_thickness, '#000')]) # White +define jingo = Character (_('Mr. Jingo'), base, color="#CD8283", who_outlines=[(gui.name_text_thickness, '#0F0D49')]) # Desaturated Red +define MaitD = Character (_('Maitre D'), base, color="#AF9EFF", who_outlines=[(gui.name_text_thickness, '#241630')]) # Cobalt Blue +define Moe = Character(_('Moe'), base, color="#A5BEED", who_outlines=[(gui.name_text_thickness, '#1F253B')]) # Desaturated Blue +define Vince = Character (_('Vince'), base, color="#FFECBC", who_outlines=[(gui.name_text_thickness, '#563010')]) # Yellow-Orange +define Waitress = Character (_('Waitress'), base, color="#F691C8", who_outlines=[(gui.name_text_thickness, '#512040')]) # Pink +define Riley = Character (_('Riley'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#1F0632')]) # TODO +define Tana = Character (_('Tana'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#1F0632')]) # TODO +define Trevor = Character (_('Trevor'), base, color="#B675E6", who_outlines=[(gui.name_text_thickness, '#1F0632')]) # TODO +#long TB chars +define AnonAndFang = Character(_('Anon and Fang'), base, color="72DFA8", who_outlines=[(gui.name_text_thickness, '#113623')]) # Cyan +define SV = Character (_('Street Vendor'), base, color="#F8E120", who_outlines=[(gui.name_text_thickness, '#58260C')]) # Yellow +define carl = Character ('Mr. Carldewskii', base, color="#EECB99", who_outlines=[(gui.name_text_thickness, '#082337')]) #Puke Orange +define Drf = Character ('Dr. Fernsworth', base, color="#DCEEF5", who_outlines=[(gui.name_text_thickness, '#253354')]) #Yellow-Orange +define FRT = Character (_('Fang Reed & Trish'), base, color="#DCBBF7", who_outlines=[(gui.name_text_thickness, '#191C78')]) #Light Purple +define FangAndTrish = Character(_('Fang and Trish'), base, color="#42DFA8", who_outlines=[(gui.name_text_thickness, '#183623')]) +define NaserAndNaomi = Character(_('Naser and Naomi'), base, color="#22DFA8", who_outlines=[(gui.name_text_thickness, '#2036B3')]) +define TeamMember = Character(_('Team member'), base, color="#D32552", who_outlines=[(gui.name_text_thickness, '#445F42')]) +define Everyone = Character(_('Everyone'), base, color="#A45489", who_outline=[(gui.name_text_thickness, '#4F5F81')]) +define Chet = Character(_('Chet'), base, color="#B45411", who_outline=[(gui.name_text_thickness, '#BF5F81')]) + + +#Custom Vars for positions +transform scenter: + xalign 0.5 yalign 0.0 +transform sleft: + xalign 0.0 yalign 0.0 +transform sright: + xalign 1.0 yalign 0.0 + +#Stella +transform stcenter: + xalign 0.5 yalign 0.1 +transform stleft: + xalign 0.0 yalign 0.1 +transform stright: + xalign 1.0 yalign 0.1 + +#Anon +transform acenter: + xalign 0.5 yalign 0.1 +transform aleft: + xalign 0.0 yalign 0.1 +transform aright: + xalign 1.0 yalign 0.1 + +#Naser +transform ncenter: + xalign 0.6 yalign 0.1 +transform nleft: + xalign -0.2 yalign 0.1 +transform nright: + xalign 1.9 yalign 0.1 + +#Fangs mom +transform fmcenter: + xalign 0.5 yalign 0.1 +transform fmleft: + xalign 0.0 yalign 0.1 +transform fmright: + xalign 1.0 yalign 0.1 + +#Trish +transform tcenter: + xalign 0.5 yalign 0.1 +transform tleft: + xalign 0.0 yalign 0.1 +transform tright: + xalign 1.0 yalign 0.1 + +#Reed and other long tailed dinos +transform rcenter: + xalign 1.2 yalign 0.1 +transform rleft: + xalign -0.2 yalign 0.1 +transform rright: + xalign 1.7 yalign 0.1 + +#misc transforms +transform shudder: + subpixel True + around (.5, .5) alignaround (.5, .5) xalign .5 yalign .5 + rotate 0 + linear 0.0 rotate -0.75 + block: + linear 0.04 rotate 0.75 + linear 0.05 rotate -0.75 + linear 0.07 rotate 0 + +transform turnaround: + linear 0.1 xzoom -1.0 + +transform wiggle: + subpixel True + block: + xpos 0.5 ypos 1.0 xanchor 0.5 yanchor 1.0 zoom 1.02 + alignaround (.5, .5) + linear 10.0 yalign 1.0 clockwise circles 1 + repeat + + +transform raymbatransform: + xcenter 0.6 ycenter 0.385 zoom 0.5 + +# PHONE SCROLLING + + +transform cursortransform: + block: + yalign 0.2 xalign 0.60 + pause .25 + easein_cubic 1 yalign 0.75 xalign 0.54 + pause .5 + repeat + +screen prompt(): + fixed: + add "cursor" + +screen mousedetect(): + transform: # thanks based nutbuster + zoom 0.8 + rotate 12.5 + mousearea: + ypos -75 + area(432, 0, 795, 1100) + # xalign 0.5 yanchor 0 ypos 0 + hovered Hide("prompt" ) + unhovered Show("prompt") + +screen textscroll(): + timer 2.0 action(Show("mousedetect"), Show("prompt")) + + add Solid("FFF") + + transform: + zoom 0.8 + rotate 12.5 + viewport: + xalign 0.51 yanchor 0 ypos -75 xysize(795, 1150) + child_size(795, 7650) + draggable True + arrowkeys True + # edgescroll(400, 800) + + yinitial 1.0 + + imagebutton auto "fangbutton%s" xalign 0.53 yalign 0.5: + ypos 65+(int(107/2)) + xsize 284 + ysize 107 + action (Hide("mousedetect"), Hide("prompt"), Hide("textscroll", transition=Dissolve(1.0)), Return()) + add "texts" + + add "fang phone" + + +# Naser's position when helping Anon get up +transform nmidright: + xalign 1.5 yalign 0.08 + +# Naomi's position when handing the brochure to Anon +transform scloserleft: + xalign 0.1 yalign 0.0 \ No newline at end of file From 00166f6d3d2e958150989703b4ba912f9dfae926 Mon Sep 17 00:00:00 2001 From: Map Date: Tue, 1 Oct 2024 17:16:18 -0500 Subject: [PATCH 03/12] move insult layers function into misc_definitions --- game/script.rpy | 10 ---------- game/src/misc_definitions.rpy | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/game/script.rpy b/game/script.rpy index c7dee75..138b3bf 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -21,16 +21,6 @@ init -1 python: mod_menu_access = [] init python: - - import random - #function for insult layers - def showCG(): - files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"] - length = len(files) - picked = random.randint(0,length - 1) - fileName = files[picked] - renpy.show(fileName, at_list=[randPosition]) - # extra music channel so we can do crossfade instead of fadeout followed by fadein # TODO: function for stopping both channels with optional fadeout so we don't have to keep track of which channel is playing renpy.music.register_channel("music1","music",True,tight=True) diff --git a/game/src/misc_definitions.rpy b/game/src/misc_definitions.rpy index ae273d5..5a8d843 100644 --- a/game/src/misc_definitions.rpy +++ b/game/src/misc_definitions.rpy @@ -1,3 +1,14 @@ +init python: + # function for insult layers + import random + def showCG(): + files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"] + length = len(files) + picked = random.randint(0,length - 1) + fileName = files[picked] + renpy.show(fileName, at_list=[randPosition]) + + transform randPosition: alpha 0.0 xalign random.uniform(0.2,0.8) From cebabce278840c2c71916258571f7cf8a4f6434c Mon Sep 17 00:00:00 2001 From: Map Date: Tue, 1 Oct 2024 17:16:36 -0500 Subject: [PATCH 04/12] document the few functions in script.rpy --- game/script.rpy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/game/script.rpy b/game/script.rpy index 138b3bf..e912a17 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -22,20 +22,22 @@ init -1 python: init python: # extra music channel so we can do crossfade instead of fadeout followed by fadein - # TODO: function for stopping both channels with optional fadeout so we don't have to keep track of which channel is playing renpy.music.register_channel("music1","music",True,tight=True) renpy.music.register_channel("music2","music",True,tight=True) + # allows playing looped ambience alongside music renpy.music.register_channel("ambient","sfx",True,tight=True) renpy.music.register_channel("ambient1","sfx",True,tight=True) renpy.music.register_channel("ambient2","sfx",True,tight=True) renpy.music.register_channel("ambient3","sfx",True,tight=True) + # No idea what this does if persistent.scroll == True: config.keymap['dismiss'].append('mousedown_4') elif persistent.scroll == None: persistent.scroll = False + # Set vars for bonus chapter completion if persistent.bonus_chapters == None: if renpy.seen_image("big ending"): #for returning players persistent.bonus_chapters = 0b111111111 @@ -44,6 +46,7 @@ init python: persistent.bonus_chapters = 0b0 persistent.old_bonus_chapters = 0b0 + # Randomizes the placement of choice boxes when a choice menu appears def randomize_choices(choices): # fine for size of 2 if (renpy.random.randint(0, 1)): From 99997a42042ad1a0387bc6b3c06167ec31c1f667 Mon Sep 17 00:00:00 2001 From: Map Date: Tue, 1 Oct 2024 17:17:59 -0500 Subject: [PATCH 05/12] move all non-default renpy scripts into src --- game/{ => src}/chapter_variables.rpy | 0 game/{ => src}/storyline.rpy | 0 game/{ => src}/utility.rpy | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename game/{ => src}/chapter_variables.rpy (100%) rename game/{ => src}/storyline.rpy (100%) rename game/{ => src}/utility.rpy (100%) diff --git a/game/chapter_variables.rpy b/game/src/chapter_variables.rpy similarity index 100% rename from game/chapter_variables.rpy rename to game/src/chapter_variables.rpy diff --git a/game/storyline.rpy b/game/src/storyline.rpy similarity index 100% rename from game/storyline.rpy rename to game/src/storyline.rpy diff --git a/game/utility.rpy b/game/src/utility.rpy similarity index 100% rename from game/utility.rpy rename to game/src/utility.rpy From 1373bed36b2f06df678375dce3aaca81d47e553f Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 06:34:14 -0500 Subject: [PATCH 06/12] document chapter_variables --- game/src/chapter_variables.rpy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/src/chapter_variables.rpy b/game/src/chapter_variables.rpy index cf19dcc..c2a831f 100644 --- a/game/src/chapter_variables.rpy +++ b/game/src/chapter_variables.rpy @@ -11,6 +11,8 @@ define ending_routes = { 1: ["chapter_11A", "chapter_12A", "chapter_12_5D", "chapter_13A", "chapter_14A"] } +# Default vars reset when a new game starts, so no biggie. + # Anon/Fang default anonscore = 0 default fangscore = 0 @@ -22,5 +24,5 @@ default chapter_list_index = 0 # Index number for the current position of the ch default current_chapter = chapter_list[chapter_list_index] # Store the name of the label as a string # Ending variables -default ending_route_number = None +default ending_route_number = None # A value of None signals to get_ending() to determine the value based off anon/fang scores when it is called default is_end_reached = False From 2a157e13626f3c6a81cec15734f58da9f3e45692 Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 06:34:35 -0500 Subject: [PATCH 07/12] add locking feature to get_ending (needed for chapter 11) --- game/src/utility.rpy | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/game/src/utility.rpy b/game/src/utility.rpy index 67ad7be..23560dd 100644 --- a/game/src/utility.rpy +++ b/game/src/utility.rpy @@ -2,14 +2,17 @@ init python: def get_ending(): - if anonscore >= 4 and fangscore >= 4 and wingStory: - return 4 # Golden - elif anonscore >= 3 and fangscore <= 4: - return 3 # Tradwife - elif anonscore <= 3 and fangscore >= 3: - return 2 # Doomer + if ending_route_number == None: + if anonscore >= 4 and fangscore >= 4 and wingStory: + return 4 # Golden + elif anonscore >= 3 and fangscore <= 4: + return 3 # Tradwife + elif anonscore <= 3 and fangscore >= 3: + return 2 # Doomer + else: + return 1 # Shooter else: - return 1 # Shooter + return ending_route_number def debug_story_variables(toggle=True): From 3059d469f27a3927105669f941e1b9c6b1967a0f Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 06:54:36 -0500 Subject: [PATCH 08/12] redo chapter select and chapter processing --- game/src/chapter_select.rpy | 225 ++++++++++++++------------------- game/src/chapter_variables.rpy | 5 +- game/src/storyline.rpy | 58 +++------ 3 files changed, 111 insertions(+), 177 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index e2f9422..1ac2af6 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -1,138 +1,51 @@ -define chapter_tuple_1 = [ - ("1. Anon meets Fang.", "chapter_1"), - ("2. Fourth day of school.", "chapter_2"), - ("3. Showing up at band practice.", "chapter_3"), - ("4. Anon needs help during music period.", "chapter_4"), - ("5. Fang and Anon cut class to talk on the roof.", "chapter_5"), - ("6. Anon helps Fang find a venue for the band.", "chapter_6") -] - -define chapter_tuple_2 = [ - ("7. Concert day.", "chapter_7"), - ("8. Anon and Fang study together.", "chapter_8"), - ("9. Trish ridicules Anon in front of the school.", "chapter_9"), - ("10. Fang goes to Anon's apartment.", "chapter_10"), - ("11. School assignment and route lock.", "chapter_11") +define chapter_tuple = [ + ("1. First Day of School", "chapter_1"), + ("2. Meeting the Band", "chapter_2"), + ("3. Band Practice", "chapter_3"), + ("4. Music Class", "chapter_4"), + ("5. Gardening Club / Heart to Heart", "chapter_5"), # This is supposed to be split in 2 chapters, but maybe making tons of save files stop working would be too much to ask + ("6. Not a Date", "chapter_6"), + ("7. Concert Day", "chapter_7"), + ("8. Study Session", "chapter_8"), + ("9. VVURM DRAMA", "chapter_9"), + ("10. Confession", "chapter_10"), + ("11. Naser drama", "chapter_11") ] define ending_1_tuple = [ - ("11A. ", "chapter_11A"), - ("12A. ", "chapter_12A"), - ("12_5D. ", "chapter_12_5D"), - ("13A. ", "chapter_13A"), - ("14A. ", "chapter_14A") + ("11.5. Announcing a Plan", "chapter_11A") # this is supposed to be ch 12 (13, accounting for ch 5), but it somehow got counted as part of 11 internally + ("12. Let's all go to the Museum", "chapter_12A"), + ("13. Prom is Complicated", "chapter_12_5D"), + ("14. Bowling for Volcano High", "chapter_14A") ] define ending_2_tuple = [ - ("11B. ", "chapter_11B"), - ("12B. ", "chapter_12B"), - ("13B. ", "chapter_13B"), - ("14B. ", "chapter_14B") + ("11.5. Announcing Nothing Important", "chapter_11B") + ("12. Let's all go to a Concert", "chapter_12B"), + ("13. Prom is For Suckers", "chapter_13B"), + ("14. Anon and the Infinite Sadness", "chapter_14B") ] define ending_3_tuple = [ - ("11C. ", "chapter_11C"), - ("12C. ", "chapter_12C"), - ("12_5C. ", "chapter_12_5C"), - ("13C. ", "chapter_13C"), - ("14C. ", "chapter_14C") + ("11.5. Announcing a Date", "chapter_11C") + ("12. Let's all go Camping", "chapter_12C"), + ("13. Prom is Suprising", "chapter_12_5C"), + ("14. Volcano Highschool Musical", "chapter_14C") ] define ending_4_tuple = [ - ("11D. ", "chapter_11D"), - ("12D. ", "chapter_12D"), - ("12_5D. ", "chapter_12_5D"), - ("13D. ", "chapter_13D"), - ("14D. ", "chapter_14D") + ("11.5. Announcing a Show.", "chapter_11D") + ("12. Let's all go to the Aquarium", "chapter_12D"), + ("13. Prom is Memorable", "chapter_12_5D"), + ("14. Fast Times at Volcano High", "chapter_14D") ] -default tuples_index = [ - ("Chapters 1 to 6", chapter_tuple_1), - ("Chapters 7 to 11", chapter_tuple_2) -] - - -init python: - - def select_chapter(): - global current_chapter, quick_menu - - selected_tuple = () - - while True: - selected_tuple = display_tuple_menu(tuples_index) - if selected_tuple == "go_back": - renpy.jump("chapter_select") - - current_chapter = display_tuple_menu(selected_tuple) - - if current_chapter == "go_back": - continue - else: - find_chapter_in_array(current_chapter) - break - - toggle_debug() - quick_menu = True # Restores the bottom quick menu UI - - renpy.call(current_chapter) - - - def add_ending_tuple(ending_number): - global tuples_index - - ending_tuples = { - 1: ending_1_tuple, - 2: ending_2_tuple, - 3: ending_3_tuple, - 4: ending_4_tuple - } - - if ending_number in ending_tuples: - description = f"Ending {ending_number} chapters" - tuples_index.append((description, ending_tuples[ending_number])) - - - def display_tuple_menu(options): - return renpy.display_menu(options + [("Go Back", "go_back")]) - - - def set_scores(anon_score, fang_score): - global anonscore, fangscore - - anonscore = anon_score - fangscore = fang_score - - - def find_chapter_in_array(chapter): - global chapter_list_index - - try: - chapter_list_index = chapter_list.index(chapter) - except ValueError: # This crashes the game otherwise since it wouldn't find the correct chapter - MainMenu(confirm=False) () # Exits to the main menu - - -label reset_chapter_list: - $ chapter_list = [ - "chapter_1", "chapter_2", "chapter_3", "chapter_4", "chapter_5", - "chapter_6", "chapter_7", "chapter_8", "chapter_9", "chapter_10", "chapter_11" - ] - - $ tuples_index = [ - ("Chapters 1 to 6", chapter_tuple_1), - ("Chapters 7 to 11", chapter_tuple_2) - ] - - return - label chapter_select: $ quick_menu = False # Hides bottom quick menu UI - call reset_chapter_list from _call_reset_chapter_list # Reset every time the tool is called - $ anon_points = 0 - $ fang_points = 0 + $ anonscore = 0 + $ fangscore = 0 camera: yanchor 0.0 xanchor 0.0 rotate None zoom 1.0 @@ -149,35 +62,81 @@ label chapter_select: scene black with dissolve + jump chapter_select_go_back # Technically we don't need to explicitly jump to the label just below here, but doing so anyway for clarity + +label chapter_select_go_back: + menu: "What ending do you want to lock to?" "Ending 1": - pass # Since points are already initialized at 0 + $ ending_route_number = 1 "Ending 2": - # anon 0 - $ fang_points = 4 + $ ending_route_number = 2 "Ending 3": - $ anon_points = 4 - # fang 0 + $ ending_route_number = 3 "Ending 4": - $ anon_points = 4 - $ fang_points = 4 - $ wingStory = True + $ ending_route_number = 4 "Exit to main menu": scene black with dissolve return - - $ set_scores(anon_points, fang_points) - $ ending_route_number = get_ending() - - $ add_ending_chapters(ending_route_number) - $ add_ending_tuple(ending_route_number) - - $ update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters window hide $ select_chapter() +init python: + def select_chapter(): + global current_chapter, quick_menu, ending_route_number, chapter_list_index + + ending_tuples = { + 1: ending_1_tuple, + 2: ending_2_tuple, + 3: ending_3_tuple, + 4: ending_4_tuple + } + + # Chapter list to select from + chapter_tuples = chapter_tuple + ending_tuples{ending_route_number} + + # Vars for displaying the choices + chapters_per_page = 6 + current_page = 0 + + start_index = 0 + end_index = chapters_per_page + + # The loop that displays the chapter choices + while True: + # Displays the choices + selected_tuple = renpy.display_menu(chapter_tupless[start_index:end_index] + [("Next Page", "next_page"), ("Go Back", "chapter_select_go_back")]) + + if selected_tuple == "chapter_select_next_page": + # If we're at the last page, wrap around to the first + current_page = 0 if end_index == len(chapter_tuples) else (current_page + 1) + + start_index = chapters_per_page * current_page + end_index = min(start_index + chapters_per_page, len(chapter_tuples)) + + elif selected_tuple == "chapter_select_go_back": + renpy.jump(chapter_select_go_back) + + else: + break # We've selected a chapter + + chapter_list += ending_routes{ending_route_number} # Actual chapter list for the game to run + current_chapter = selected_tuple + + # Find the index position of the selected chapter + try: + chapter_list_index = chapter_list.index(current_chapter) + except ValueError: # This crashes the game otherwise since it wouldn't find the correct chapter + MainMenu(confirm=False) () # Exits to the main menu + + + # Start playing the game + toggle_debug() + quick_menu = True # Restores the bottom quick menu UI + + renpy.call(current_chapter) \ No newline at end of file diff --git a/game/src/chapter_variables.rpy b/game/src/chapter_variables.rpy index c2a831f..4ad5ca8 100644 --- a/game/src/chapter_variables.rpy +++ b/game/src/chapter_variables.rpy @@ -23,6 +23,5 @@ default chapter_list_length = get_chapter_list_length() default chapter_list_index = 0 # Index number for the current position of the chapter_list array default current_chapter = chapter_list[chapter_list_index] # Store the name of the label as a string -# Ending variables -default ending_route_number = None # A value of None signals to get_ending() to determine the value based off anon/fang scores when it is called -default is_end_reached = False +# What ending we're on +default ending_route_number = None # A value of None signals to get_ending() to determine the value based off anon/fang scores when it is called \ No newline at end of file diff --git a/game/src/storyline.rpy b/game/src/storyline.rpy index a204465..7247c08 100644 --- a/game/src/storyline.rpy +++ b/game/src/storyline.rpy @@ -13,54 +13,30 @@ init -1 python: init python: def next_story_chapter(): - global chapter_list_index, current_chapter + global chapter_list_index, current_chapter, chapter_list, ending_route_number, is_end_reached, chapter_list_length # Add check "is_end_reached" to have this if statement be executed only once when finishing the general chapters if not is_end_reached and chapter_list_index >= chapter_list_length: - process_ending() + # Add ending chapters + ending_route_number = get_ending() + if route_number in ending_routes: + chapter_list.extend(ending_routes[ending_route_number]) + + # Updates variables for newly extended 'chapter_list' with ending chapters + chapter_list_length = len(chapter_list) - 1 # chapter_list_length is updated to reflect the addition to the chapter_list array + is_end_reached = True + if chapter_list_index < chapter_list_length: chapter_list_index += 1 current_chapter = chapter_list[chapter_list_index] renpy.call(current_chapter) + + # We're at an ending else: - end_story() - - - def process_ending(): - global ending_route_number - - ending_route_number = get_ending() - add_ending_chapters(ending_route_number) - update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters - - - def add_ending_chapters(route_number): - global chapter_list - - if route_number in ending_routes: - chapter_list.extend(ending_routes[route_number]) - - - def update_ending_variables(): - global chapter_list_length - global is_end_reached - - # chapter_list_length is updated to reflect the addition to the chapter_list array - chapter_list_length = get_chapter_list_length() - is_end_reached = True - - - def get_chapter_list_length(): - return len(chapter_list) - 1 - - - def end_story(): - ending_image() - - if ending_route_number == 1: - renpy.quit() - else: - renpy.call("lending") - + ending_image() + if ending_route_number == 1: + renpy.quit() + else: + renpy.call("lending") From c3e365d01c6ad1651f4acba4e6b54120ffe56b32 Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 07:27:34 -0500 Subject: [PATCH 09/12] Add setup_ending. Endings are now determined and setup the moment branching is required. --- .../11.school-assignment-and-route-lock.rpy | 15 +++++----- game/src/chapter_variables.rpy | 3 +- game/src/storyline.rpy | 29 ++++++++++--------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/game/script/11.school-assignment-and-route-lock.rpy b/game/script/11.school-assignment-and-route-lock.rpy index 2b47b73..332ca50 100644 --- a/game/script/11.school-assignment-and-route-lock.rpy +++ b/game/script/11.school-assignment-and-route-lock.rpy @@ -447,10 +447,11 @@ label chapter_11: #Naser Drama #THIS SECTION IS SCORE DEPENDENT + # Determine ending and set up ending chapters + $ setup_ending(get_ending()) + # Doomer ending skips this segment - $ ending_score = get_ending() - - if ending_score == 2: + if ending_route_number == 2: stop music fadeout 3 pause 2 jump lPromAnnouncement @@ -586,9 +587,9 @@ label chapter_11: Nas "Don’t take it the wrong way, but my mind just screamed at me ‘worst case scenario’." pause .5 - if ending_score == 4: # Golden + if ending_route_number == 4: # Golden jump lSortingThings - elif ending_score == 3: # tradwife + elif ending_route_number == 3: # tradwife jump lMendingThings else: jump lBreakingThings # All else fails, go to shooter. @@ -5212,7 +5213,7 @@ label chapter_11: pause .5 - if ending_score == 3: # tradwife + if ending_route_number == 3: # tradwife "Things are going pretty well. When we discount Trish’s weekly attempt to talk with Fang." @@ -5467,7 +5468,7 @@ label chapter_11: "{cps=*.1}...{/cps}" # skip this segment if we're doing ending 1 - if ending_score == 1: #shooter + if ending_route_number == 1: #shooter $ next_story_chapter() # the following segment makes sense in the context of 11B+11C+11D diff --git a/game/src/chapter_variables.rpy b/game/src/chapter_variables.rpy index 4ad5ca8..cc91231 100644 --- a/game/src/chapter_variables.rpy +++ b/game/src/chapter_variables.rpy @@ -24,4 +24,5 @@ default chapter_list_index = 0 # Index number for the current position of the ch default current_chapter = chapter_list[chapter_list_index] # Store the name of the label as a string # What ending we're on -default ending_route_number = None # A value of None signals to get_ending() to determine the value based off anon/fang scores when it is called \ No newline at end of file +default ending_route_number = None # A value of None signals to get_ending() to determine the value based off anon/fang scores when it is called +default ending_chapters_determined = False \ No newline at end of file diff --git a/game/src/storyline.rpy b/game/src/storyline.rpy index 7247c08..7df87c5 100644 --- a/game/src/storyline.rpy +++ b/game/src/storyline.rpy @@ -13,25 +13,17 @@ init -1 python: init python: def next_story_chapter(): - global chapter_list_index, current_chapter, chapter_list, ending_route_number, is_end_reached, chapter_list_length + global chapter_list_index, current_chapter, chapter_list, ending_route_number, chapter_list_length, ending_chapters_determined - # Add check "is_end_reached" to have this if statement be executed only once when finishing the general chapters - if not is_end_reached and chapter_list_index >= chapter_list_length: - # Add ending chapters - ending_route_number = get_ending() - if route_number in ending_routes: - chapter_list.extend(ending_routes[ending_route_number]) - - # Updates variables for newly extended 'chapter_list' with ending chapters - chapter_list_length = len(chapter_list) - 1 # chapter_list_length is updated to reflect the addition to the chapter_list array - is_end_reached = True - - if chapter_list_index < chapter_list_length: chapter_list_index += 1 current_chapter = chapter_list[chapter_list_index] renpy.call(current_chapter) + # Safeguard if setup_ending wasn't called somehow + elif not ending_chapters_determined: + setup_ending(get_ending()) + # We're at an ending else: ending_image() @@ -40,3 +32,14 @@ init python: renpy.quit() else: renpy.call("lending") + + def setup_ending(ending): + global ending_route_number, chapter_list, chapter_list_length, ending_chapters_determined + + ending_route_number = ending + + # Add ending chapters + chapter_list.extend(ending_routes[ending_route_number]) + chapter_list_length = len(chapter_list) - 1 # chapter_list_length is updated to reflect the addition to the chapter_list array + + ending_chapters_determined = True \ No newline at end of file From 5126f0e3ae63f07874443233a274731a973b84fb Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 10:52:26 -0500 Subject: [PATCH 10/12] fix oversight of me being retarded and removing an import without testing --- game/script.rpy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game/script.rpy b/game/script.rpy index e912a17..eba98e5 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -21,6 +21,9 @@ init -1 python: mod_menu_access = [] init python: + import webbrowser # This is for the ch2 "look the link up" choice + import random + # extra music channel so we can do crossfade instead of fadeout followed by fadein renpy.music.register_channel("music1","music",True,tight=True) renpy.music.register_channel("music2","music",True,tight=True) From 10e8010f9b7b28fc998366550a35c0a941a77bec Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 10:52:48 -0500 Subject: [PATCH 11/12] fix chapter select needing developer mode enabled --- game/screens.rpy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/screens.rpy b/game/screens.rpy index 2ebb355..3a056b2 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -359,7 +359,7 @@ screen navigation(): textbutton _("Load") activate_sound "audio/ui/uiClick.wav" action ShowMenu("load") textbutton _("Delete") activate_sound "audio/ui/uiClick.wav" action ShowMenu("delete") - if config.developer and persistent.enable_chapter_select: + if config.developer or persistent.enable_chapter_select: textbutton _("Chapter Select") activate_sound "audio/ui/uiClick.wav" action Start("chapter_select") textbutton _("Options") activate_sound "audio/ui/uiClick.wav" action ShowMenu("preferences") From 73328cb2e1eb394044a2739f276c37a87e933221 Mon Sep 17 00:00:00 2001 From: Map Date: Wed, 2 Oct 2024 11:16:26 -0500 Subject: [PATCH 12/12] final overhaul that should make everything work Redid chapter names, sourced from the source snoot script Tightened up transitions in chapter select made all get_ending() checks use ending_route_number instead. --- game/src/chapter_select.rpy | 44 +++++++++++++++++++++++++------------ game/src/credits.rpy | 9 ++++---- game/src/storyline.rpy | 15 ++++++++----- game/src/utility.rpy | 2 +- 4 files changed, 45 insertions(+), 25 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index 1ac2af6..831219c 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -13,28 +13,28 @@ define chapter_tuple = [ ] define ending_1_tuple = [ - ("11.5. Announcing a Plan", "chapter_11A") # this is supposed to be ch 12 (13, accounting for ch 5), but it somehow got counted as part of 11 internally + ("11.5. Announcing a Plan", "lPromAnnouncement"), # this is supposed to be ch 12 (13, accounting for ch 5), but it somehow got counted as part of 11 internally ("12. Let's all go to the Museum", "chapter_12A"), ("13. Prom is Complicated", "chapter_12_5D"), ("14. Bowling for Volcano High", "chapter_14A") ] define ending_2_tuple = [ - ("11.5. Announcing Nothing Important", "chapter_11B") + ("11.5. Announcing Nothing Important", "lPromAnnouncement"), ("12. Let's all go to a Concert", "chapter_12B"), ("13. Prom is For Suckers", "chapter_13B"), ("14. Anon and the Infinite Sadness", "chapter_14B") ] define ending_3_tuple = [ - ("11.5. Announcing a Date", "chapter_11C") + ("11.5. Announcing a Date", "lPromAnnouncement"), ("12. Let's all go Camping", "chapter_12C"), ("13. Prom is Suprising", "chapter_12_5C"), ("14. Volcano Highschool Musical", "chapter_14C") ] define ending_4_tuple = [ - ("11.5. Announcing a Show.", "chapter_11D") + ("11.5. Announcing a Show.", "lPromAnnouncement"), ("12. Let's all go to the Aquarium", "chapter_12D"), ("13. Prom is Memorable", "chapter_12_5D"), ("14. Fast Times at Volcano High", "chapter_14D") @@ -60,7 +60,7 @@ label chapter_select: stop music1 stop music2 scene black - with dissolve + with Dissolve(0.25) jump chapter_select_go_back # Technically we don't need to explicitly jump to the label just below here, but doing so anyway for clarity @@ -78,7 +78,7 @@ label chapter_select_go_back: "Ending 4": $ ending_route_number = 4 "Exit to main menu": - scene black with dissolve + scene black with Dissolve(0.25) return window hide @@ -88,7 +88,7 @@ label chapter_select_go_back: init python: def select_chapter(): - global current_chapter, quick_menu, ending_route_number, chapter_list_index + global current_chapter, quick_menu, ending_route_number, chapter_list_index, chapter_list, ending_chapters_determined, chapter_list_length ending_tuples = { 1: ending_1_tuple, @@ -98,7 +98,7 @@ init python: } # Chapter list to select from - chapter_tuples = chapter_tuple + ending_tuples{ending_route_number} + chapter_tuples = chapter_tuple + ending_tuples[ending_route_number] # Vars for displaying the choices chapters_per_page = 6 @@ -110,7 +110,7 @@ init python: # The loop that displays the chapter choices while True: # Displays the choices - selected_tuple = renpy.display_menu(chapter_tupless[start_index:end_index] + [("Next Page", "next_page"), ("Go Back", "chapter_select_go_back")]) + selected_tuple = renpy.display_menu(chapter_tuples[start_index:end_index] + [("Next Page", "chapter_select_next_page"), ("Go Back", "chapter_select_go_back")]) if selected_tuple == "chapter_select_next_page": # If we're at the last page, wrap around to the first @@ -120,20 +120,36 @@ init python: end_index = min(start_index + chapters_per_page, len(chapter_tuples)) elif selected_tuple == "chapter_select_go_back": - renpy.jump(chapter_select_go_back) + renpy.jump("chapter_select_go_back") else: break # We've selected a chapter - chapter_list += ending_routes{ending_route_number} # Actual chapter list for the game to run - current_chapter = selected_tuple + setup_ending(ending_route_number) + + store._window_auto = True # Find the index position of the selected chapter try: - chapter_list_index = chapter_list.index(current_chapter) + chapter_list_index = chapter_list.index(selected_tuple) except ValueError: # This crashes the game otherwise since it wouldn't find the correct chapter - MainMenu(confirm=False) () # Exits to the main menu + + # Make an exception for the 11A/B/C/D chapters, since we're technically supposed to start at the PromAnnouncement label + # Stank as fuck + if selected_tuple == "lPromAnnouncement": + chapter_list_index = 10 + current_chapter = "chapter_11" + toggle_debug() + quick_menu = True + renpy._window_auto = True + + renpy.jump("lPromAnnouncement") + else: + print("No such chapter exists!") + MainMenu(confirm=False) () # Exits to the main menu + + current_chapter = selected_tuple # Start playing the game toggle_debug() diff --git a/game/src/credits.rpy b/game/src/credits.rpy index 5b897e3..ebd18b9 100644 --- a/game/src/credits.rpy +++ b/game/src/credits.rpy @@ -241,8 +241,7 @@ image d_credits_text = Composite( label lending: - $ cached_ending = get_ending() - if cached_ending == 4: + if ending_route_number == 4: pause 0.5 show snootgame_big with dissolve: # Renpy not allowing you to grab images from the gui folder is serious bullshit subpixel True @@ -272,7 +271,7 @@ label lending: pause 50 queue music 'audio/OST/amberlight brillance live end.ogg' queue music "" loop - elif cached_ending == 3: + elif ending_route_number == 3: play music "audio/OST/Dino Destiny Reader.ogg" pause 0.5 show c_credits_text: @@ -304,12 +303,12 @@ label lending: stop music fadeout 5 scene black with Dissolve(3) pause 2 - if cached_ending == 3: + if ending_route_number == 3: scene c10 with Dissolve(1.5) pause 20 scene black with Dissolve(2) pause 1 - elif cached_ending == 4: + elif ending_route_number == 4: scene golden ending with Dissolve(1.5) pause 20 scene black with Dissolve(2) diff --git a/game/src/storyline.rpy b/game/src/storyline.rpy index 7df87c5..cce1556 100644 --- a/game/src/storyline.rpy +++ b/game/src/storyline.rpy @@ -36,10 +36,15 @@ init python: def setup_ending(ending): global ending_route_number, chapter_list, chapter_list_length, ending_chapters_determined - ending_route_number = ending + if not ending_chapters_determined: + ending_route_number = ending - # Add ending chapters - chapter_list.extend(ending_routes[ending_route_number]) - chapter_list_length = len(chapter_list) - 1 # chapter_list_length is updated to reflect the addition to the chapter_list array + # Add ending chapters + chapter_list.extend(ending_routes[ending_route_number]) + chapter_list_length = get_chapter_list_length() # chapter_list_length is updated to reflect the addition to the chapter_list array - ending_chapters_determined = True \ No newline at end of file + ending_chapters_determined = True + + def get_chapter_list_length(): + global chapter_list + return len(chapter_list) - 1 \ No newline at end of file diff --git a/game/src/utility.rpy b/game/src/utility.rpy index 23560dd..9618df7 100644 --- a/game/src/utility.rpy +++ b/game/src/utility.rpy @@ -23,7 +23,7 @@ init python: "chapter_list_length", "chapter_list_index", "ending_route_number", - "is_end_reached" + "ending_chapters_determined" ] for item in var_list: