Chapter navigation improvements #244

Merged
MapAnon merged 107 commits from Iggy/SnootGame:master into master 2024-10-01 21:05:06 +00:00
44 changed files with 439 additions and 167 deletions

View File

@@ -1 +0,0 @@
{"expansion": false, "heap_size": "3", "icon_name": "Snoot Game", "include_pil": false, "include_sqlite": false, "layout": null, "name": "Snoot Game", "numeric_version": 1, "orientation": "sensorLandscape", "package": "cavemanon.snootgame", "permissions": ["VIBRATE", "INTERNET"], "source": false, "store": "none", "update_always": true, "update_icons": true, "update_keystores": true, "version": "INTERNAL-BUILD"}

View File

@@ -1,3 +1,9 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 1
steps:
changelog:
image: debian
@@ -11,7 +17,7 @@ steps:
image: debian
commands:
- sed -i -e "s/INTERNAL-BUILD/${CI_COMMIT_TAG}/g" game/options.rpy #Change the internal build name to the tagged version
- sed -i -e "s/INTERNAL-BUILD/${CI_COMMIT_TAG}/g" .android.json
- sed -i -e "s/INTERNAL-BUILD/${CI_COMMIT_TAG}/g" android.json
when:
- event: tag
@@ -19,20 +25,21 @@ steps:
image: debian
commands:
- sed -i -e "s/INTERNAL-BUILD/${CI_COMMIT_SHA}/g" game/options.rpy #if no tag, make it the commit num
- sed -i -e "s/INTERNAL-BUILD/${CI_COMMIT_TAG}/g" .android.json
- sed -i -e "s/INTERNAL-BUILD/${CI_COMMIT_SHA}/g" android.json
when:
- event: cron
build:
image: openjdk:8
image: openjdk:21-jdk-bookworm
commands:
- apt update
- apt install libgl1 -y
- apt install libgl1 patch -y
- sed -i -e "s/VERSION/${RenpyVersion}/g" game/options.rpy #Change the renpy version to the woodpecker reuqested one.
#Get Renkit
- wget -qO- "https://github.com/kobaltcore/renkit/releases/download/v${RenkitVersion}/renkit-linux-amd64.tar.gz" | tar xz --directory=/tmp/
- /tmp/renconstruct build -i "." -c "renconstruct.toml" -o dist/
- wget -qO- "https://github.com/kobaltcore/renkit/releases/download/v${RenkitVersion}/renkit-x86_64-unknown-linux-gnu.tar.xz" | tar -Jax --directory=/tmp/
- /tmp/renkit-x86_64-unknown-linux-gnu/renconstruct build "." dist/
- mkdir "dist/android"
- mv dist/*.apk "dist/android"
- cd /tmp/
archival-sha:
@@ -76,6 +83,6 @@ steps:
matrix:
RenpyVersion:
- "8.0.3"
- "8.3.0"
RenkitVersion:
- "3.3.1"
- "4.4.0"

24
android.json Normal file
View File

@@ -0,0 +1,24 @@
{
"expansion": false,
"google_play_key": null,
"google_play_salt": null,
"heap_size": "3",
"icon_name": "Snoot Game",
"include_pil": false,
"include_sqlite": false,
"layout": null,
"name": "Snoot Game",
"numeric_version": 1,
"orientation": "sensorLandscape",
"package": "cavemanon.snootgame",
"permissions": [
"VIBRATE",
"INTERNET"
],
"source": false,
"store": "none",
"update_always": true,
"update_icons": true,
"update_keystores": true,
"version": "INTERNAL-BUILD"
}

BIN
android.keystore Normal file

Binary file not shown.

BIN
bundle.keystore Normal file

Binary file not shown.

View File

@@ -0,0 +1,26 @@
# Store the general chapters inside an array for easy manipulation
default chapter_list = [
"chapter_1", "chapter_2", "chapter_3", "chapter_4", "chapter_5",
"chapter_6", "chapter_7", "chapter_8", "chapter_9", "chapter_10", "chapter_11"
]
define ending_routes = {
4: ["chapter_11D", "chapter_12D", "chapter_12_5D", "chapter_13D", "chapter_14D"],
3: ["chapter_11C", "chapter_12C", "chapter_12_5C", "chapter_13C", "chapter_14C"],
2: ["chapter_11B", "chapter_12B", "chapter_13B", "chapter_14B"],
1: ["chapter_11A", "chapter_12A", "chapter_12_5D", "chapter_13A", "chapter_14A"]
}
# Anon/Fang
default anonscore = 0
default fangscore = 0
default wingStory = False
# Chapter variables
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
default is_end_reached = False

Binary file not shown.

View File

@@ -24,7 +24,7 @@ define gui.show_name = True
## The version of the game.
define config.version = _("INTERNAL-BUILD")
define config.version = "INTERNAL-BUILD"
## Text that is placed on the game's about screen. Place the text between the
## triple-quotes, and leave a blank line between paragraphs.
@@ -133,6 +133,11 @@ default preferences.text_cps = 50
default preferences.afm_time = 15
define config.developer = "auto"

Is this a leftover from debugging? Remove if so.

Is this a leftover from debugging? Remove if so.
default persistent.enable_debug_scores = config.developer
default persistent.enable_chapter_select = config.developer
##Default Audio is not ear rape
define config.default_music_volume = 0.48
define config.default_sfx_volume = 0.80
@@ -196,6 +201,15 @@ init python:
build.classify('game/mods_example/**', None)
build.classify('game/mods_example/.**', None)
build.classify('README.md', None)
build.classify('renconstruct.toml', None)
build.classify('bundle.keystore', None)
build.classify('android.keystore', None)
build.classify('bundle.keystore.original', None)
build.classify('game/dev/.**', None)
build.classify('build_patch/*', None)
MapAnon marked this conversation as resolved
Review

We don't need these 3 classifiers since we don't use them.

We don't need these 3 classifiers since we don't use them.
Review

Done.

Done.
## To archive files, classify them as 'archive'.
@@ -220,6 +234,3 @@ init python:
## by a slash.
# define build.itch_project = "renpytom/test-project"
#RenPy updating from snootgame.xyz
define build.include_update = True

View File

@@ -319,6 +319,8 @@ init python:
config.overlay_screens.append("quick_menu")
default quick_menu = True
default persistent.old_endings = None
default persistent.endings = None
style quick_button is default
style quick_button_text is button_text
@@ -356,6 +358,10 @@ screen navigation():
textbutton _("Save") activate_sound "audio/ui/uiClick.wav" action ShowMenu("save")
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:
textbutton _("Chapter Select") activate_sound "audio/ui/uiClick.wav" action Start("chapter_select")
textbutton _("Options") activate_sound "audio/ui/uiClick.wav" action ShowMenu("preferences")
#textbutton _("Extras") action ShowMenu("extras")
textbutton _("Return") activate_sound "audio/ui/uiBack.wav" action Return()
@@ -992,6 +998,20 @@ screen preferences():
textbutton _("After Choices") action [Function(onclick_audio, preferences.skip_after_choices), ToggleVariable("preferences.skip_after_choices", True, False)]
textbutton _("Transitions") action [Function(onclick_audio, preferences.transitions, True), ToggleVariable("preferences.transitions", 0, 2)]
if config.developer:
vbox:
style_prefix "check"
label _("Developer Tools")
textbutton _("Enable Debug Scores") action ToggleVariable("persistent.enable_debug_scores", True, False)
textbutton _("Enable Chapter Select") action ToggleVariable("persistent.enable_chapter_select", True, False)
if not main_menu:
if config.developer and persistent.enable_debug_scores:
$ debug_story_variables(False)
$ debug_story_variables(True)
else:
$ debug_story_variables(False)
vbox:
xsize 676
style_prefix "check"
@@ -1265,12 +1285,13 @@ screen extrasnavigation():
vbox:
spacing 10
xpos 1885
ypos 1130
ypos (1269 if config.developer and persistent.enable_chapter_select else 1130)
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
[
[ _("Help"), ShowMenu("help") ],
[ _("About"), ShowMenu("about") ],
[ _("Gallery"), ShowMenu("cg_gallery") ],
*([(_("Chapter Select"), Start("chapter_select"))] if persistent.enable_chapter_select else []),
[ _("Mods"), ShowMenu("mod_menu") ],
[ _("Return"), ShowMenu("main_menu") ]
] )

View File

@@ -322,8 +322,9 @@ transform scloserleft:
label start:
$ fangscore = 0
$ anonscore = 0
$ wingStory = False
$ toggle_debug()
pause 1.0
call storyline from _call_storyline
$ renpy.call(chapter_list[chapter_list_index]) # Call first element of the chapter_list array

View File

@@ -3663,4 +3663,4 @@ label chapter_1:
window auto
pause 1.5
return
$ next_story_chapter()

View File

@@ -550,4 +550,4 @@ label chapter_10:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -448,8 +448,9 @@ label chapter_11:
#THIS SECTION IS SCORE DEPENDENT
# Doomer ending skips this segment
call get_ending from _call_get_ending
if _return == 2:
$ ending_score = get_ending()
if ending_score == 2:
stop music fadeout 3
pause 2
jump lPromAnnouncement
@@ -585,10 +586,9 @@ label chapter_11:
Nas "Dont take it the wrong way, but my mind just screamed at me worst case scenario."
pause .5
call get_ending from _call_get_ending_1
if _return == 4: # Golden
if ending_score == 4: # Golden
jump lSortingThings
elif _return == 3: # tradwife
elif ending_score == 3: # tradwife
jump lMendingThings
else:
jump lBreakingThings # All else fails, go to shooter.
@@ -5211,8 +5211,8 @@ label chapter_11:
"Fang and I have been together for a month now."
pause .5
call get_ending from _call_get_ending_2
if _return == 3: # tradwife
if ending_score == 3: # tradwife
"Things are going pretty well. When we discount Trishs weekly attempt to talk with Fang."
@@ -5467,9 +5467,8 @@ label chapter_11:
"{cps=*.1}...{/cps}"
# skip this segment if we're doing ending 1
call get_ending from _call_get_ending_3
if _return == 1: #shooter
return
if ending_score == 1: #shooter
$ next_story_chapter()
# the following segment makes sense in the context of 11B+11C+11D
window hide
@@ -5565,4 +5564,4 @@ label chapter_11:
A "Anyways, where were we?"
return
$ next_story_chapter()

View File

@@ -158,4 +158,4 @@ label chapter_11A:
window auto
pause .5
return
$ next_story_chapter()

View File

@@ -173,4 +173,4 @@ label chapter_11B:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -302,4 +302,4 @@ label chapter_11C:
"{cps=*.1}...{/cps}"
pause .5
return
$ next_story_chapter()

View File

@@ -392,4 +392,4 @@ label chapter_11D:
"{cps=*.1}...{/cps}"
pause .5
return
$ next_story_chapter()

View File

@@ -445,4 +445,4 @@ label chapter_12_5C:
window hide
window auto
return
$ next_story_chapter()

View File

@@ -443,4 +443,4 @@ label chapter_12_5D:
F "Oh, Anon, youre already here!"
return
$ next_story_chapter()

View File

@@ -1034,4 +1034,4 @@ label chapter_12A:
window hide
window auto
return
$ next_story_chapter()

View File

@@ -591,4 +591,4 @@ label chapter_12B:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -901,4 +901,4 @@ label chapter_12C:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -781,4 +781,4 @@ label chapter_12D:
"{cps=*0.1}...{/cps}"
return
$ next_story_chapter()

View File

@@ -1797,4 +1797,4 @@ label chapter_13A:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -1048,4 +1048,4 @@ label chapter_13B:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -4604,4 +4604,4 @@ label chapter_13C:
#end of new stuff
return
$ next_story_chapter()

View File

@@ -4053,4 +4053,4 @@ label chapter_13D:
"{cps=*.1}...{/cps}"
pause 0.5
return
$ next_story_chapter()

View File

@@ -1442,4 +1442,5 @@ label chapter_14A:
pause 5
$ renpy.music.set_volume(1, 0, 'ambient')
return
$ next_story_chapter()

View File

@@ -350,4 +350,4 @@ label chapter_14B:
scene black with Dissolve(3)
pause 2
return
$ next_story_chapter()

View File

@@ -1014,4 +1014,5 @@ label chapter_14C:
pause 1.0
stop music
$ renpy.music.set_volume(1, 0, 'music')
return
$ next_story_chapter()

View File

@@ -898,4 +898,5 @@ label chapter_14D:
pause 16
scene black with Dissolve(1.0)
pause 1
return
$ next_story_chapter()

View File

@@ -2604,4 +2604,4 @@ label chapter_2:
"{cps=*.05}...{/cps}"
pause .5
return
$ next_story_chapter()

View File

@@ -2291,4 +2291,4 @@ label chapter_3:
"{cps=*.1}...{/cps}"
return
$ next_story_chapter()

View File

@@ -1422,4 +1422,4 @@ label chapter_4:
window auto
pause .5
return
$ next_story_chapter()

View File

@@ -7,6 +7,8 @@ init python:
renpy.play('audio/effects/carKick2.ogg', channel='audio')
# renpy.play('audio/effects/carSuspension1.ogg', channel='audio')
image fang_tail_movie = Movie(channel="movie_dp", loop=True, play="images/animations/fang tail.webm") # New way of playing movies as of Renpy 8.1
label chapter_5:
# Gardening Club
@@ -551,7 +553,7 @@ label chapter_5:
show anon:
easein_back 0.5 xalign 0.2
label movie:
# label movie:
play sound 'audio/effects/slapstickPunch.ogg'
A "FANG!" with vpunch
@@ -559,7 +561,8 @@ label chapter_5:
play ambient 'audio/effects/clipLoop.ogg' fadein 1
play ambient1 'audio/effects/outdoorNatureLoop.ogg' fadein 1
scene fang tail with Dissolve(1)
# scene fang tail with Dissolve(1)
show fang_tail_movie with Dissolve(1) # change how the movie is played
"Through my blurred vision I can make out Fangs tail, slowly shifting side to side."
@@ -4665,9 +4668,9 @@ label chapter_5:
window auto
pause 1
return
$ next_story_chapter()
# I'm guessing this is for the gallery?
label fang_movie:
scene fang tail with fade
""
# label fang_movie:
# scene fang tail with fade
# ""

View File

@@ -4677,4 +4677,4 @@ label chapter_6:
window auto
pause 1
return
$ next_story_chapter()

View File

@@ -1736,4 +1736,4 @@ label chapter_7:
"{cps=*.1}...{/cps}"
pause 0.5
return
$ next_story_chapter()

View File

@@ -622,8 +622,10 @@ label chapter_8:
pause .5
python:
choices = [(_('Play The Guitar'), 'lLetFangPlayGuit'),
(_('Get to Studying'), 'lGetStartedOnStudy')]
choices = [
(_('Play The Guitar'), 'lLetFangPlayGuit'),
(_('Get to Studying'), 'lGetStartedOnStudy')]
renpy.jump(renpy.display_menu(randomize_choices(choices)))
@@ -1567,7 +1569,7 @@ label chapter_8:
window hide
window auto
return
$ next_story_chapter()
label lGetStartedOnStudy:
pause 0.5
@@ -2156,4 +2158,5 @@ label chapter_8:
"{cps=*.1}...{/cps}"
window hide
window auto
return
$ next_story_chapter()

View File

@@ -1297,7 +1297,7 @@ label chapter_9:
jump lGoHomeEarly
label lWaitForTrishToExit:
$ anonscore += 1
$ anonscore += 1
#play music 'audio/OST/fighter.ogg' fadein 1.0
A "You worried about her, too?"
@@ -2171,4 +2171,4 @@ label chapter_9:
window auto
pause .5
return
$ next_story_chapter()

172
game/src/chapter_select.rpy Normal file
View File

@@ -0,0 +1,172 @@
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 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)
]
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
stop sound
stop music fadeout 2
scene black with dissolve
menu:
"Initialize scores:"
"Ending 1":
pass # Since points are already initialized at 0
"Ending 2":
# anon 0
$ fang_points = 4
"Ending 3":
$ anon_points = 4
# fang 0
"Ending 4":
$ anon_points = 4
$ fang_points = 4
$ wingStory = True
"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()

View File

@@ -241,8 +241,7 @@ image d_credits_text = Composite(
label lending:
call get_ending from _call_get_ending_4
$ cached_ending = _return
$ cached_ending = get_ending()
if cached_ending == 4:
pause 0.5
show snootgame_big with dissolve: # Renpy not allowing you to grab images from the gui folder is serious bullshit
@@ -315,4 +314,5 @@ label lending:
pause 20
scene black with Dissolve(2)
pause 1
return
$ MainMenu(confirm=False) () # Exits to the main menu

View File

@@ -10,45 +10,57 @@ init -1 python:
persistent.old_endings = persistent.endings
persistent.endings = endings
label storyline:
call chapter_1 from _call_chapter_1
call chapter_2 from _call_chapter_2
call chapter_3 from _call_chapter_3
call chapter_4 from _call_chapter_4
call chapter_5 from _call_chapter_5
call chapter_6 from _call_chapter_6
call chapter_7 from _call_chapter_7
call chapter_8 from _call_chapter_8
call chapter_9 from _call_chapter_9
call chapter_10 from _call_chapter_10
call chapter_11 from _call_chapter_11
call get_ending from _call_get_ending_5
if _return == 4:
call chapter_11D from _call_chapter_11D
call chapter_12D from _call_chapter_12D
call chapter_12_5D from _call_chapter_12_5D
call chapter_13D from _call_chapter_13D
call chapter_14D from _call_chapter_14D
elif _return == 3:
call chapter_11C from _call_chapter_11C
call chapter_12C from _call_chapter_12C
call chapter_12_5C from _call_chapter_12_5C
call chapter_13C from _call_chapter_13C
call chapter_14C from _call_chapter_14C
elif _return == 2:
call chapter_11B from _call_chapter_11B
call chapter_12B from _call_chapter_12B
# no chapter_13 here since the scene is different enough to the other routes for everything to go into 13C
call chapter_13B from _call_chapter_13B
call chapter_14B from _call_chapter_14B
else: # if all else fails, we just assume that we got Endings.Shooter
call chapter_11A from _call_chapter_11A
call chapter_12A from _call_chapter_12A
call chapter_12_5D from _call_chapter_12_5D_1
call chapter_13A from _call_chapter_13A
call chapter_14A from _call_chapter_14A
$ ending_image()
$ renpy.quit()
$ ending_image()
call lending from _call_lending
return
init python:
def next_story_chapter():
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:
process_ending()
Review

This doesn't need to be a function since it's only called here, just move the function's code to here and if it needs further clarification add a comment

This doesn't need to be a function since it's only called here, just move the function's code to here and if it needs further clarification add a comment
Review

Done.

Done.
if chapter_list_index < chapter_list_length:
chapter_list_index += 1
current_chapter = chapter_list[chapter_list_index]
renpy.call(current_chapter)
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

You are abusing global variables to the point that most of the code is unreadable, this is only a specific example but in this case it would be 100x better if instead of doing

ending_route_number = get_ending()
add_ending_chapters()
update_ending_variables()

You did

ending_route_number = get_ending()
add_ending_chapters(ending_route_number)
update_ending_variables()

That way you communicate what a function does beyond of what it's called and where it's getting it's information without having to investigate and jump around different functions seeing which one updates a specific variable.

You are abusing global variables to the point that most of the code is unreadable, this is only a specific example but in this case it would be 100x better if instead of doing ```py ending_route_number = get_ending() add_ending_chapters() update_ending_variables() ``` You did ```py ending_route_number = get_ending() add_ending_chapters(ending_route_number) update_ending_variables() ``` That way you communicate what a function does beyond of what it's called and where it's getting it's information without having to investigate and jump around different functions seeing which one updates a specific variable.
Outdated
Review

Functions are now (I hope) easier to read. Thank you for your advice!

Functions are now (I hope) easier to read. Thank you for your advice!
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")

View File

@@ -1,22 +1,38 @@
## Utility functions for game setup, debugging etc.
label initstats(anon=0, fang=0):
# Sets various game-related global variables
# :param int anon: Anon's score
# :param int fang: Fang's score
# :param bool trad: Tradwife ending flag
$ anonscore = anon
$ fangscore = fang
return
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
else:
return 1 # Shooter
def debug_story_variables(toggle=True):
var_list = [
"anonscore",
"fangscore",
MapAnon marked this conversation as resolved Outdated

Ditto for these

Ditto for these
"current_chapter",
"chapter_list_length",
"chapter_list_index",
"ending_route_number",
"is_end_reached"
]
for item in var_list:
if toggle:
renpy.watch(item)
else:
renpy.unwatch(item)
def toggle_debug():
if persistent.enable_debug_scores:
debug_story_variables(False)
debug_story_variables(True)
label get_ending:
# To check what ending we're getting, call this label and then check the value of _return
# Sensible to have this logic defined in only one place for consistency
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

View File

@@ -1,51 +1,26 @@
[tasks.clean]
enabled = false
priorities = { post_build = 0 } # the priority that determines the orders tasks will run in, defaults to 0
on_builds = ["pc", "win", "linux", "mac", "web", "steam", "market", "android_apk", "android_aab"] # builds this task should run for, defaults to all available builds
[tasks.notarize] # required if matching task is enabled
enabled = false
priorities = { post_build = 10 } # the priority that determines the orders tasks will run in, defaults to 10
on_builds = ["mac"] # builds this task should run for, defaults to "mac"
bundle_identifier = "com.my-game" # the bundle ID of your came, typically in reverse domain notation
key_file = "certificates/private-key.pem" # the path to the private key file generated during the provisioning process
cert_file = "certificates/developerID_application.cer" # the path to the Apple-generated certificate file generated during the provisioning process
app_store_key_file = "certificates/app-store-key.json" # the path to the combined App Store key file generated during the provisioning process
json_bundle_file = "certificates/renotize.json" # the path to the combined certificate file. replaces the key, cert and app store files above
[tasks.keystore] # required if matching task is enabled

Why did you enable patching?

Why did you enable patching?
Outdated
Review

This was a leftover from when I was trying to fix the Woodpecker pipeline. It's now removed.

This was a leftover from when I was trying to fix the Woodpecker pipeline. It's now removed.
enabled = false
type="keystore"
enabled = true
priorities = { pre_build = 0 } # the priority that determines the orders tasks will run in, defaults to 0
on_builds = ["android_apk", "android_aab"] # builds this task should run for, defaults to all android builds
keystore_apk = "<base64-encoded keystore file>" # the base-64 encoded binary keystore file for the APK bundles
keystore_aab = "<base64-encoded keystore file>" # the base-64 encoded binary keystore file for the AAB bundles
keystore_apk = "/u3+7QAAAAIAAAABAAAAAQAHYW5kcm9pZAAAAYVxMNRaAAAFAjCCBP4wDgYKKwYBBAEqAhEBAQUABIIE6vvQ999V4QLI/pTg2FiIrk243bGZW5gMSHNlHqL1mEQ23tp1KsfYjb6gF4zv8U7BPQgpx6S2AfNJmd9uZYSavETqN59hvgBzeehgpV1zJBF4hyFvXRT1qF0tOh8roigl09bCwdSi2O8Xmirn3rj/ioEEEbpntTA0I7/HeUyD4ivfawN9DbSMjsTWfpkHwfjs0o+c8OdSMxJhN4EVmy7w4M+XQYsimT/9IVm0YSfLmujCHtxIzn2TUKSZ0L5YnDhhXiBssFQAY9gc6EvUbgqQKlfTiYD8ld2qPgXQ28wt+OZEvAewgN/v3uN8jIpdCdnOFeT8xSYd9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UwNjM1MTFaMBQxEjAQBgNVBAMTCUNhdmVtYW5vbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIGKdzQUeV4FyJXVyn12v3i+Riqtv7zrU5KIgIQX25YSgJY8xFy9sntJdPTskiuzIWgahgGI+JLb41M6HpZU3O6ds+4YAtMObVlaKmsdsNmv9bdlf1e3bCge+Wrz0wDKiG3pTBdAI8FjHG/4adqotSt5BCWd0WOvp/4jN576wYqbzYcOnjdnejVP8D3kwqI/6gyXoOaM32aQ9eKFNVo+8Z2i4pR8azm1BnaQ7ZeafDc+Hkk/TWPOKrO1Yghp5+Hl6ms2OYpcovf0xi3JVj88tCo/psSE0TWfSWt70/r5tccAdjPIddtM2DVvY077mfxd4vQV5Wry2/itdH+07yvOT08CAwEAAaMhMB8wHQYDVR0OBBYEFId3J5qiw96CCKelQJXVbVAjEHBwMA0GCSqGSIb3DQEBCwUAA4IBAQBcRhgbXsfz43NUIPug+jwt+eBql9xqcgkbdpEkdEHE9qiwL+gpEd4uUTCeqzj5SW4YxzKO3KjfgsQJeZhZPET3r0s3fBHwvS5SlGNhTaiCEeAEUdHPwwmeZHya8Zl2cCyKYThbaoeNDy8fxOcOkogHd/4KMYOZje6mL1yTPXQeKSKu3//X76bzY07D3mY2mA4qfEkpWiUGbc/X3Xt+5fdjiEajSbsNt6yp3+9PtU2ZSPGUi82yrUVmTI1Ezj93K5vQVAibP7SfJJGjOKqDu8+lO7Fadygg+Ad5POzvz9E6RN0am0gORsmD5n0i7WvtfAStPZBZCAcaCOonrt5bKxAKIkCf5xuB2uyQUrS79TNcDmysY+g=" # the base-64 encoded binary keystore file for the AAB bundles
[tasks.convert_images]
enabled = false
format = "webp" # webp or avif
priorities = { pre_build = 10 } # the priority that determines the orders tasks will run in, defaults to 10
on_builds = ["pc", "win", "linux", "mac", "web", "steam", "market", "android_apk", "android_aab"] # builds this task should run for, defaults to all available builds
# extensions: a list of file extensions to convert
# recursive: scans directories recursively if enabled, otherwise only scans the immediate directory
# lossless: converts to lossless WebP if enabled, otherwise converts to lossy WebP
"game/images/cg" = { extensions = ["png", "jpg"], recursive = true, lossless = true } # default values
"game/images/bg" = { lossless = false }
"game/images" = { } # all parameters are optional
[build] # required, at least one item must be 'true'
#pc = true # windows + linux
# pc = true # windows + linux
win = true # windows
linux = true # linux
mac = true # macos
#web = false # web
#steam = true # steam
#market = true # multiple markets (i.e. itch.io)
# web = false # web
# steam = false # steam
# market = false # multiple markets (i.e. itch.io)
android_apk = true # Android Universal APK
#android_aab = false # Android Play Store Bundle
# android_aab = false # Android Play Store Bundle
[options]
clear_output_dir = false # whether to clear the output directory on startup
[renutil]
version = "8.0.3" # the Ren'Py version to use (required)
registry = "tmp/cache" # the directory to store installation files in
version = "8.3.0" # the Ren'Py version to use (required)
registry = "/tmp/cache" # the directory to store installation files in