From f38c53776c21d9b5b033e7300355c18fd637bab4 Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 14:35:02 -0300 Subject: [PATCH 1/7] Remove tasks.patch --- renconstruct.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/renconstruct.toml b/renconstruct.toml index 68d84d6..96106cc 100644 --- a/renconstruct.toml +++ b/renconstruct.toml @@ -1,8 +1,3 @@ -[tasks.patch] - type = "custom" - enabled = true - ver = "8.3.0" - [tasks.keystore] # required if matching task is enabled type="keystore" enabled = true From 803e878c3fad6ef7cbb39d1de3bb4644118e1a1f Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 14:40:28 -0300 Subject: [PATCH 2/7] Remove is_end_of_chapters function --- game/storyline.rpy | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/game/storyline.rpy b/game/storyline.rpy index 991e14b..c213c99 100644 --- a/game/storyline.rpy +++ b/game/storyline.rpy @@ -16,7 +16,7 @@ init python: global chapter_list_index, current_chapter, ending_route_number # 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 is_end_of_chapters(): + if not is_end_reached and chapter_list_index >= chapter_list_length: process_ending() if chapter_list_index < chapter_list_length: @@ -25,10 +25,6 @@ init python: renpy.call(current_chapter) else: end_story() - - - def is_end_of_chapters(): - return chapter_list_index >= chapter_list_length def process_ending(): From a31fa50d8ae3906292710728e9866b607b5d76b6 Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 15:02:24 -0300 Subject: [PATCH 3/7] Functions refactoring --- game/src/chapter_select.rpy | 4 ++-- game/storyline.rpy | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index d9e2398..e442338 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -58,9 +58,9 @@ init python: find_chapter_in_array() if not is_end_reached: - add_ending_chapters() # From storyline + add_ending_chapters(ending_route_number) - update_ending_variables() # From storyline + update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters def set_scores(anon_score, fang_score): diff --git a/game/storyline.rpy b/game/storyline.rpy index c213c99..2452a39 100644 --- a/game/storyline.rpy +++ b/game/storyline.rpy @@ -13,7 +13,7 @@ init -1 python: init python: def next_story_chapter(): - global chapter_list_index, current_chapter, ending_route_number + global chapter_list_index, current_chapter # 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: @@ -31,15 +31,15 @@ init python: global ending_route_number ending_route_number = get_ending() - add_ending_chapters() - update_ending_variables() + add_ending_chapters(ending_route_number) + update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters - def add_ending_chapters(): + def add_ending_chapters(route_number): global chapter_list - if ending_route_number in ending_routes: - chapter_list.extend(ending_routes[ending_route_number]) + if route_number in ending_routes: + chapter_list.extend(ending_routes[route_number]) def update_ending_variables(): @@ -55,7 +55,6 @@ init python: return len(chapter_list) - 1 - def end_story(): ending_image() renpy.call("lending") From 719f08ba2433663df04234ba9f7fafe710e61ac7 Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 15:18:00 -0300 Subject: [PATCH 4/7] Make set_scores function more readable --- game/src/chapter_select.rpy | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index e442338..1a2ace2 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -91,6 +91,9 @@ label reset_chapter_list: label chapter_select: $ quick_menu = False + $ anon_points = 0 + $ fang_points = 0 + stop sound stop music fadeout 2 scene black with dissolve @@ -99,17 +102,21 @@ label chapter_select: "Initialize scores:" "Ending 1": - $ set_scores(0, 0) + pass # Since points are already initialized at 0 "Ending 2": - $ set_scores(0, 4) + # anon 0 + $ fang_points = 4 "Ending 3": - $ set_scores(4, 0) + $ anon_points = 4 + # fang 0 "Ending 4": - $ set_scores(4, 4) + $ anon_points = 4 + $ fang_points = 4 "Exit to main menu": scene black with dissolve return - + + $ set_scores(anon_points, fang_points) $ is_end_reached = False # Reset this for when the tool is used more than once window hide From a787d1ceaf84a6531299b8991fb0ed486dc532d7 Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 17:33:26 -0300 Subject: [PATCH 5/7] Remove unused globals --- game/src/chapter_select.rpy | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index 1a2ace2..ad7c639 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -24,7 +24,7 @@ define tuples_index = [ init python: def select_chapter(): - global current_chapter, is_end_reached, quick_menu + global current_chapter, quick_menu selected_tuple = () @@ -41,7 +41,7 @@ init python: set_stats() toggle_debug() - quick_menu = True + quick_menu = True # Restores the bottom quick menu UI renpy.call(current_chapter) @@ -51,7 +51,7 @@ init python: def set_stats(): - global chapter_list_length, ending_route_number, is_end_reached + global ending_route_number, is_end_reached ending_route_number = get_ending() @@ -89,7 +89,7 @@ label reset_chapter_list: label chapter_select: - $ quick_menu = False + $ quick_menu = False # Hides bottom quick menu UI $ anon_points = 0 $ fang_points = 0 @@ -126,5 +126,4 @@ label chapter_select: $ select_chapter() - From e0027f3c5d010a6939b4da27718b91d4b60d1c4c Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 19:45:30 -0300 Subject: [PATCH 6/7] Add ending chapters to chapter-select tool --- game/src/chapter_select.rpy | 75 +++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index ad7c639..ca9f6ab 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -15,7 +15,38 @@ define chapter_tuple_2 = [ ("11. School assignment and route lock.", "chapter_11") ] -define tuples_index = [ +define ending_1_tuple = [ + ("11A. ", "chapter_11A"), + ("12A. ", "chapter_12A"), + ("12_5D. ", "chapter_12_5D"), + ("13A. ", "chapter_13A"), + ("14A. ", "chapter_14A") +] + +define ending_2_tuple = [ + ("11B. ", "chapter_11B"), + ("12B. ", "chapter_12B"), + ("13B. ", "chapter_13B"), + ("14B. ", "chapter_14B") +] + +define ending_3_tuple = [ + ("11C. ", "chapter_11C"), + ("12C. ", "chapter_12C"), + ("12_5C. ", "chapter_12_5C"), + ("13C. ", "chapter_13C"), + ("14C. ", "chapter_14C") +] + +define ending_4_tuple = [ + ("11D. ", "chapter_11D"), + ("12D. ", "chapter_12D"), + ("12_5D. ", "chapter_12_5D"), + ("13D. ", "chapter_13D"), + ("14D. ", "chapter_14D") +] + +default tuples_index = [ ("Chapters 1 to 6", chapter_tuple_1), ("Chapters 7 to 11", chapter_tuple_2) ] @@ -34,6 +65,7 @@ init python: renpy.jump("chapter_select") current_chapter = display_tuple_menu(selected_tuple) + find_chapter_in_array() if current_chapter == "go_back": continue else: @@ -46,20 +78,26 @@ init python: 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_stats(): - global ending_route_number, is_end_reached - - ending_route_number = get_ending() - - find_chapter_in_array() - - if not is_end_reached: - add_ending_chapters(ending_route_number) - update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters @@ -77,7 +115,7 @@ init python: chapter_list_index = chapter_list.index(current_chapter) except ValueError: chapter_list_index = -1 - current_chapter = "" + current_chapter = "hola" label reset_chapter_list: @@ -85,11 +123,18 @@ label reset_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 $ anon_points = 0 $ fang_points = 0 @@ -117,13 +162,13 @@ label chapter_select: return $ set_scores(anon_points, fang_points) - $ is_end_reached = False # Reset this for when the tool is used more than once + $ ending_route_number = get_ending() + + $ add_ending_chapters(ending_route_number) + $ add_ending_tuple(ending_route_number) window hide - if not is_end_reached: - call reset_chapter_list from _call_reset_chapter_list - $ select_chapter() From b1cc24fb2ef9760046eafd8d64b75168d44865bd Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 20:03:19 -0300 Subject: [PATCH 7/7] chapter_select improvements --- game/src/chapter_select.rpy | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index ca9f6ab..30040c7 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -65,13 +65,13 @@ init python: renpy.jump("chapter_select") current_chapter = display_tuple_menu(selected_tuple) - find_chapter_in_array() + if current_chapter == "go_back": continue else: + find_chapter_in_array(current_chapter) break - set_stats() toggle_debug() quick_menu = True # Restores the bottom quick menu UI @@ -97,10 +97,6 @@ init python: return renpy.display_menu(options + [("Go Back", "go_back")]) - def set_stats(): - update_ending_variables() # Updates variables for newly extended 'chapter_list' with ending chapters - - def set_scores(anon_score, fang_score): global anonscore, fangscore @@ -108,14 +104,14 @@ init python: fangscore = fang_score - def find_chapter_in_array(): - global chapter_list_index, current_chapter + def find_chapter_in_array(chapter): + global chapter_list_index try: - chapter_list_index = chapter_list.index(current_chapter) + chapter_list_index = chapter_list.index(chapter) except ValueError: chapter_list_index = -1 - current_chapter = "hola" + chapter = "" label reset_chapter_list: @@ -134,7 +130,7 @@ label reset_chapter_list: label chapter_select: $ quick_menu = False # Hides bottom quick menu UI - call reset_chapter_list from _call_reset_chapter_list + call reset_chapter_list from _call_reset_chapter_list # Reset every time the tool is called $ anon_points = 0 $ fang_points = 0 @@ -157,6 +153,7 @@ label chapter_select: "Ending 4": $ anon_points = 4 $ fang_points = 4 + $ wingStory = True "Exit to main menu": scene black with dissolve return @@ -166,6 +163,8 @@ label chapter_select: $ 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