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.
This commit is contained in:
Map 2024-10-02 11:16:26 -05:00
parent 10e8010f9b
commit 73328cb2e1
4 changed files with 45 additions and 25 deletions

View file

@ -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
# 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()

View file

@ -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 "<silence 1.0>" 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)

View file

@ -36,10 +36,15 @@ init python:
def setup_ending(ending):
global ending_route_number, chapter_list, chapter_list_length, ending_chapters_determined
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
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
def get_chapter_list_length():
global chapter_list
return len(chapter_list) - 1

View file

@ -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: