added the sunflower interludes, exam, inventory system etc

Word count: 6,415 words
This commit is contained in:
Jacoder23 2024-04-10 05:45:20 +08:00
parent c49fe79002
commit 218e052b39
9 changed files with 357 additions and 75 deletions

BIN
game/audio/classroom.mp3 Normal file

Binary file not shown.

Binary file not shown.

BIN
game/audio/presentation.mp3 Normal file

Binary file not shown.

BIN
game/audio/wind1.mp3 Normal file

Binary file not shown.

BIN
game/audio/wind2.mp3 Normal file

Binary file not shown.

BIN
game/audio/wind3.mp3 Normal file

Binary file not shown.

BIN
game/audio/wind_atmo.mp3 Normal file

Binary file not shown.

View File

@ -109,7 +109,7 @@ style skip_frame:
padding (24, 8, 75, 8)
style skip_text:
size 24
size 100
style skip_triangle:
is skip_text
@ -151,7 +151,7 @@ style notify_frame:
padding (24, 8, 60, 8)
style notify_text:
size 24
size 100

View File

@ -4,14 +4,18 @@
# icebreakers Y Y Y
# hands-on lecture Y N Y
# consultation Y N Y
# exam N N N
# exam Y N Y
# side convos N N N
# sunflower talk N N N
# secret ending N N N
# sunflower talk Y N Y
# present. endings N N N
default persistent.pixelfont = True
default persistent.laozi = False
default persistent.playeranswer = "" # just a random string, not just empty otherwise people could submit empty ones but not have that saved for next time
default persistent.playeranswer1 = ""
default persistent.playeranswer2 = ""
default persistent.playeranswer3 = ""
default persistent.playeranswer4 = ""
default persistent.playeranswer5 = ""
define yuuka = Character("Yuuka", callback = name_callback, cb_name = "yuuka")
define reimu = Character("Reimu", callback = name_callback, cb_name = "reimu")
@ -31,6 +35,75 @@ init python:
multiplier = 10 ** decimals
return int(n * multiplier) / multiplier
# inventory system taken from a deranged reddit post
# https://www.reddit.com/r/RenPy/comments/wanes3/how_to_do_an_inventory_system/ii2vp6i/
screen inventory_display_toggle:
zorder 200
frame:
background "#0000008c"
xalign 0.0
yalign 0.0
textbutton "INV":
action ToggleScreen("inventory_item_description")
on "hide" action Hide("inventory_item_description")
# inventory item descriptions
default item_descriptions = {"Chococlate" : "Yum!"}
default inventory_items = []
default item_description = ""
init python:
def GetItemDescription(item):
if item in item_descriptions:
return item_descriptions.get(item)
else:
return item_description
# style inv_button is frame:
# xsize 200
# ysize 100
style inv_button_text:
xalign 0.5
yalign 0.5
screen inventory_item_description:
# use this based on your preference
modal True
window:
background "#0000008c"
xsize 600
ysize 150
xalign 0.5
yalign 0.1
text item_description:
xfill True
yfill True
window:
background "#0000008c"
xsize 1290
ysize 600
xalign 0.5
yalign 0.7
hbox:
box_wrap True
box_wrap_spacing 10
spacing 10
xoffset 20
yoffset 20
style_prefix "inv"
for item in inventory_items:
textbutton item:
action SetVariable("item_description", GetItemDescription(item))
selected False
on "hide" action SetVariable("item_description", "")
label splashscreen:
scene movie1
scene black
@ -391,8 +464,8 @@ screen devModeButtons1():
$ i += 1
hbox:
spacing 20
xpos 50
ypos 1000
xpos 0
ypos 950
textbutton "(1*)":
action Jump("DevModePage1")
textbutton "(2)":
@ -401,6 +474,10 @@ screen devModeButtons1():
action Jump("DevModePage3")
textbutton "(H)":
action Jump("DevModeHide")
textbutton "+D":
action Jump("IncreaseDay")
textbutton "-D":
action Jump("DecreaseDay")
screen devModeButtons2():
grid 3 12:
@ -410,8 +487,8 @@ screen devModeButtons2():
$ i += 1
hbox:
spacing 20
xpos 50
ypos 1000
xpos 0
ypos 950
textbutton "(1)":
action Jump("DevModePage1")
textbutton "(2*)":
@ -420,6 +497,10 @@ screen devModeButtons2():
action Jump("DevModePage3")
textbutton "(H)":
action Jump("DevModeHide")
textbutton "+D":
action Jump("IncreaseDay")
textbutton "-D":
action Jump("DecreaseDay")
screen devModeButtons3():
grid 3 12:
@ -429,8 +510,8 @@ screen devModeButtons3():
$ i += 1
hbox:
spacing 20
xpos 50
ypos 1000
xpos 0
ypos 950
textbutton "(1)":
action Jump("DevModePage1")
textbutton "(2)":
@ -439,12 +520,16 @@ screen devModeButtons3():
action Jump("DevModePage3")
textbutton "(H)":
action Jump("DevModeHide")
textbutton "+D":
action Jump("IncreaseDay")
textbutton "-D":
action Jump("DecreaseDay")
screen devModeButtons4():
hbox:
spacing 20
xpos 50
ypos 1000
xpos 0
ypos 950
textbutton "(1)":
action Jump("DevModePage1")
textbutton "(2)":
@ -453,10 +538,12 @@ screen devModeButtons4():
action Jump("DevModePage3")
textbutton "(H*)":
action Jump("DevModeHide")
textbutton "+D":
action Jump("IncreaseDay")
textbutton "-D":
action Jump("DecreaseDay")
label start:
python:
init python:
# 0 means intro
# 1 means icebreaker onwards
# 2 means hands-on lecture onwards
@ -477,6 +564,8 @@ label start:
marisa_progress = 0
yumemi_progress = 0
label start:
label laozi:
scene bg black
stop music
@ -511,6 +600,17 @@ label start:
label devMode:
$ numOfLabels = len(renpy.get_all_labels())
$ renpy.say(narrator, "There are currently " + str(numOfLabels) + " unique labels in this project.")
label IncreaseDay:
$ day += 1
$ renpy.notify(day)
jump DevModePage1
label DecreaseDay:
$ day -= 1
$ renpy.notify(day)
jump DevModePage1
label DevModePage1:
hide screen devModeButtons2
hide screen devModeButtons3
@ -578,6 +678,9 @@ label start:
yuuka "You all may know me as the substitute this past week for Professor Okazaki."
# show screen inventory_display_toggle
# $ inventory_items.append("Chocolate")
hide yuuka_look
show yuuka irritated
@ -651,6 +754,10 @@ label start:
yuuka "In the meantime, I think that woman's {sc}bones{/sc} would make for good fertilizer."
# TODO: Check if we can remove this because its only here for devmode to fix a softlock
if config.developer:
$ day = 0
label entrance:
scene bg entrance with fade
if day == 0:
@ -976,6 +1083,8 @@ label start:
label icebreakers:
stop music fadeout 2.0
show yuuka amused:
xalign 0.0
yalign 0.5
@ -997,6 +1106,8 @@ label start:
scene bg classroom with fade
play sound "classroom.mp3" loop
show yuuka amused:
xalign -0.2
yalign 0.5
@ -1092,6 +1203,8 @@ label start:
xalign 1.2
yalign -0.5
stop sound fadeout 2.0
yuuka "You there, in the red and white! Introduce yourself and tell us an interesting fact about yourself."
yuuka "{i}I could be patient as long as it meant seeing these three flounder.{/i}" (cb_name="")
@ -1806,7 +1919,6 @@ label hallway:
""
$ did_not_visit_faculty = False
"Faculty Member" "Ah, looking for something?"
# explains the exam thing
@ -1814,6 +1926,10 @@ label hallway:
"Go to the audiotorium" if did_not_visit_audiotorium:
""
show screen inventory_display_toggle
$ inventory_items.append("Chocolate THIS IS A TEST")
$ did_not_visit_audiotorium = False
jump hallway_navigation
@ -2040,6 +2156,7 @@ label faculty:
narrator "A few hands went up, too many to get to all of them in the time left, though notably one of the hands belonged to Reimu."
menu:
# TODO: FILL OUT THE EXTRA CLASS
"Who does Yuuka answer a question from?"
"One of the normal students":
@ -2446,6 +2563,14 @@ label faculty:
$ very_loud_quitting.grant()
jump ending
else:
yuuka "{i}The students were estatic but the faculty were deeply worried.{/i}" (cb_name="")
yuuka "{i}Worry no longer, for you now know the truth.{/i}" (cb_name="")
yuuka "{i}Though it can never free you, at least you know.{/i}" (cb_name="")
yuuka "{i}I ask not for sympathy. Just an understanding.{/i}" (cb_name="")
$ next_label = "exam"
$ day += 1
@ -2462,6 +2587,10 @@ label faculty:
yuuka "{i}The day fast approached and I had my own preparations to do...{/i}" (cb_name="")
yuuka "{i}Seeing them work hard (with the addition of an extreme pressure) meant I felt a bit generous.{/i}" (cb_name="")
yuuka "{i}It took a little bit of convincing but let me allow the results to speak for themselves in a moment.{/i}" (cb_name="")
$ next_label = "exam"
$ day += 1
@ -2490,35 +2619,23 @@ label faculty:
label exam:
if day == 3:
# TODO
# TEXT N
# TEXT Y
# STAGE N
# VAR N
# VAR Y
# This leads to the They Got Your Back
# This leads to the 7th ending
if exam_cancelled:
$ day += 1
jump penultimate_presentation
label garden_of_the_sun_intro:
scene bg garden with fade
$ renpy.pause(2.0)
yuuka "I'm sorry I haven't attended to you as much this past week."
$ renpy.pause(1.0)
yuuka "There's just one more thing I have to do. I hope you'll understand."
$ renpy.pause(1.0)
yuuka "...I really do hope you'll understand."
jump finale
label exam_proper:
scene bg classroom with fade
# exam minigame thingy not really but based on the koakuma kiss comic making
# keep it simple, draw a form
# ----------------------------------- #
# Student's perspective
# slowly realizing that yuuka changed some questions to the exam
"Student" "Hey, Reimu!"
@ -2538,21 +2655,110 @@ label exam:
yuuka "Take your seats and put away anything that isn't a pen."
# F = m × a or m = F/a
"Student" "Oh, uh, you measure it with a ballistic p-"
$ msg = renpy.input("Answer?")
# something in between
$ persistent.playeranswer = msg
# F = m × a becomes m = F/a
# reimu takes the exams
"What is the formula for the mass of a magical attack?"
show text "A. m = F / a\nB. m = a x m\nC. m = a / F\nD. m = F x m" at truecenter
if(persistent.playeranswer1 == ""):
$ msg = renpy.input("What is the formula for the mass of a magical attack?")
$ persistent.playeranswer1 = msg
$ renpy.save_persistent()
$ examQuestionResponse(msg)
elif day == 4:
# TODO
# TEXT N
# STAGE N
# VAR N
window show # placeholder
return
hide text
reimu "{i}I hope I got that right...{/i}"
else:
reimu "{i}It's [persistent.playeranswer1] right?{/i}"
#
"With what device do you measure the force of a magical attack?"
show text "A. Ballistic Perforator\nB. Ballistic Pendulum\nC. Ballast\nD. Ballistic Shell" at truecenter
if(persistent.playeranswer2 == ""):
$ msg = renpy.input("With what device do you measure the force of a magical attack?")
$ persistent.playeranswer2 = msg
$ renpy.save_persistent()
hide text
reimu "{i}I hope I got that right...{/i}"
else:
reimu "{i}It should be... [persistent.playeranswer2]. I think?{/i}"
#
"What flower is well-known for turning to face the sun?"
show text "A. Lotus Flower\nB. Hydrangea\nC. Rose\nD. Sunflower" at truecenter
if(persistent.playeranswer3 == ""):
$ msg = renpy.input("What flower is well-known for turning to face the sun?")
$ persistent.playeranswer3 = msg
$ renpy.save_persistent()
hide text
reimu "{i}That's a weird one but it seems pretty easy, no?{/i}"
else:
reimu "{i}That's a weird one but [persistent.playeranswer3], right? It seems easy compared to the others?{/i}"
#
"What is the language of flowers?"
show text "A. Written language on flower petals\nB. Poetic metaphors using flowers\nC. How flowers attract bees\nD. The voice the flowers speak in" at truecenter
if(persistent.playeranswer4 == ""):
$ msg = renpy.input("What is the language of flowers?")
$ persistent.playeranswer4 = msg
$ renpy.save_persistent()
hide text
reimu "{i}Hey wait a minute...{/i}"
else:
reimu "{i}[persistent.playeranswer4]. Hey wait a minute...{/i}"
#
"Who's gonna pass this exam?"
show text "A. You.\nB. Yes, you.\nC. Don't deny it.\nD. Isn't it obvious?" at truecenter
if(persistent.playeranswer5 == ""):
$ msg = renpy.input("Who's gonna pass this exam?")
$ persistent.playeranswer5 = msg
$ renpy.save_persistent()
hide text
reimu "{i}Did Yuuka change the exam questions?{/i}"
reimu "{i}Huh, that's... really nice of her. If she keeps this up I'll have to ask Akyuu to change her profile in the Gensokyo Chronicle.{/i}"
reimu "{i}Assuming this isn't just a plot of hers.{/i}"
reimu "{i}...I hope it isn't. Besides, she's more of the brute force type anyway.{/i}"
$ day += 1
jump penultimate_presentation
else:
"Day is currently set to [day]. This should be impossible. You've likely encountered a bug."
return
@ -2590,31 +2796,107 @@ label day_transition:
else:
renpy.say("", "Proceeding without saving game.")
narrator "{i}The next day...{/i}"
scene bg garden with fade
# sunflower talk
if day == 1:
# TODO
# TEXT N
# STAGE N
# VAR N
""
play music "wind_atmo.mp3"
play sound "wind1.mp3"
$ renpy.pause(3.0, hard=True)
show yuuka looking with dissolve
yuuka "Good morning, my dears."
play sound "wind2.mp3"
$ renpy.pause(3.0)
yuuka "Indeed, quite a terrible act was inflicted on your brethren."
play sound "wind3.mp3"
$ renpy.pause(3.0)
yuuka "I have my plans. I do hope you eagerly await the fruits of my labor."
stop music
elif day == 2:
# TODO
# TEXT N
# STAGE N
# VAR N
""
play music "wind_atmo.mp3"
play sound "wind1.mp3"
$ renpy.pause(3.0, hard=True)
show yuuka looking with dissolve
yuuka "Good tidings, I believe I am planting seeds germinating in those miscreants."
play sound "wind2.mp3"
$ renpy.pause(3.0)
yuuka "In time, I will turn even Yumemi's own students against her."
play sound "wind3.mp3"
$ renpy.pause(3.0)
yuuka "I will take great pleasure in seeing her downfall, as well."
stop music
elif day == 3:
# TODO
# TEXT N
# STAGE N
# VAR N
""
play music "wind_atmo.mp3"
play sound "wind1.mp3"
$ renpy.pause(3.0, hard=True)
show yuuka looking with dissolve
yuuka "I'm sorry I haven't attended to you as much this past week. I've had other seedling taking up my time."
play sound "wind2.mp3"
$ renpy.pause(3.0)
yuuka "I'm sorry. There's just one more thing I have to do after this. I hope you'll understand."
play sound "wind3.mp3"
$ renpy.pause(3.0)
yuuka "...I really hope you'll understand."
stop music
elif day == 4:
# TODO
# TEXT N
# STAGE N
# VAR N
""
# $ investigation_progress
play music "wind_atmo.mp3"
play sound "wind1.mp3"
$ renpy.pause(3.0, hard=True)
"..."
play sound "wind2.mp3"
$ renpy.pause(3.0)
"..."
play sound "wind3.mp3"
$ renpy.pause(3.0)
"..."
stop music
return
else:
"Day is currently set to [day]. This should be impossible. You've likely encountered a bug."
return