Transitions and Bug fixes

* Moved transition definitions into their own file.
* Removed narrator name and side image
* Added automatic narrator speaker fade
* Added automatic inner thought gradient fade
* Fixed night.ogg playback
This commit is contained in:
LoafyLemon 2023-03-12 21:40:16 +00:00
parent e482eb8eea
commit 01a2df27e7
8 changed files with 65 additions and 58 deletions

View File

@ -399,36 +399,3 @@ image menu_ani:
contains:
alpha 0.8
"#000"
# Transitions
init offset = -1
define d1 = Dissolve(0.1)
define d2 = Dissolve(0.2)
define d3 = Dissolve(0.3)
define d4 = Dissolve(0.4)
define d5 = Dissolve(0.5)
define d6 = Dissolve(0.6)
define d7 = Dissolve(0.7)
define d8 = Dissolve(0.8)
define d9 = Dissolve(0.9)
define f1 = Fade(0.1, 0.0, 0.1)
define f2 = Fade(0.2, 0.0, 0.2)
define f3 = Fade(0.3, 0.0, 0.3)
define flash = Fade(0.1, 0.0, 0.5, color="#fff")
define flashbulb = Fade(0.2, 0.0, 0.8, color='#fff')
define flashbb = Fade(0.2, 0.0, 0.8, color='#000')
define flashblood = Fade(0.2, 0.0, 0.8, color='#f02424')
define kissiris = Fade(0.2, 0.0, 0.8, color='#fb8dc8')
define black_magic = Fade(0.2, 0.0, 0.5, color='#7f3590')
define blackfade = Fade(0.9, 0.5, 1, color='#000000')
define morph = ComposeTransition(Dissolve(0.9), before=Fade(0.1, 0.5, 0.5, color="#fff"), after=Dissolve(0.5))
define teleport = ImageDissolve("id_teleport.webp", 1.0, 0)
define vpunch_repeat = Move((0, 10), (0, -10), .5, bounce=True, repeat=True, delay=4.5)
define faderight = ImageDissolve("interface/transitions/faderight.webp", 1.0)
define fadeleft = ImageDissolve("interface/transitions/faderight.webp", 1.0, reverse=True)

View File

@ -8,6 +8,13 @@ init -1401 python:
# Default icon
adv.show_args["icon"] = "narrator"
def narrator_fade(ev, interact=True, **kwargs):
if ev == "begin":
chars = [f"{i}_main" for i in CHARACTERS] + ["snape_main", "genie_main"]
renpy.show("fade", zorder=15, behind=chars)
elif ev == "end":
renpy.hide("fade")
# Characters
define m = Character(None, show_side_image=Image("characters/genie/mage.webp", xpos=20), show_icon="genie")
define g2 = Character(None, show_side_image=Image("characters/genie/mage2.webp", xpos=20), show_icon="genie")
@ -42,8 +49,8 @@ define cra = Character("Crabbe")
define goy = Character("Goyle")
define maf = Character("Madam Mafkin", show_side_image=Image("characters/misc/mafkin.webp", xalign=1.0))
define myr = Character("Moaning Myrtle")
define faw = Character('Fawkes', show_icon="fawkes")
define abe = Character('Aberforth')
define faw = Character("Fawkes", show_icon="fawkes")
define abe = Character("Aberforth")
# Non-important characters
define fem = Character("Female Student")
@ -55,7 +62,7 @@ define sly2 = Character("Another Slytherin student")
define qcr = Character("Quidditch Crowd")
# Special
define nar = Character("Narrator", show_side_image=Image("characters/misc/narrator.webp"), what_prefix=">", screen="say_narrator")
define nar = Character("", what_prefix=">", show_icon="narrator", callback=narrator_fade)
define anon = Character("???")
# Dumbledore

View File

@ -1,17 +1,19 @@
label hermione_map_BJ:
stop weather
stop weather fadeout 1
$ renpy.call('forest_BJ_'+str(forest_BJ_progress))
$ hermione_busy = True
call set_her_map_location("gryffindor_room")
stop background fadeout 1
jump return_office
label forest_BJ_1: #BJ in the forest interrupted by moaning myrtle
show screen blkfade
with d3
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
play sound "sounds/steps_grass.ogg"
nar "Sure enough, the map seems to {b}magically{/b} guide you to the girl, alone in the midnight air..."
@ -141,7 +143,7 @@ label forest_BJ_2:
show screen blkfade
with d3
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
play sound "sounds/steps_grass.ogg"
$ hermione.wear("all")
@ -301,7 +303,7 @@ label forest_BJ_3: #Complete BJ with Myrtle appearing after the cumshot
show screen blkfade
with d3
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
play sound "sounds/steps_grass.ogg"
$ hermione.wear("all")
@ -556,7 +558,7 @@ label forest_BJ_4: #Moaning myrtle dirty talk (Repeatable) (Threaten to expose)
show screen blkfade
with d3
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
play sound "sounds/steps_grass.ogg"
$ hermione.wear("top")

View File

@ -301,7 +301,7 @@ label ball_ending_E1:
# Outskirts of Hogwarts
centered "{size=+7}{color=#cbcbcb}Outskirts of Hogwarts{/color}{/size}"
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
$ dynamic_cg("ball", "173")
@ -358,8 +358,6 @@ label ball_ending_E1:
hide screen blkfade
with d9
play music "sounds/night.ogg" fadein 1 fadeout 1 #NIGHT SOUNDS.
gen "....................." ("base", xpos="far_left", ypos="head")
$ dynamic_cg("ball", "171", "172")
gen "No, I can't just leave like this!" ("base", xpos="far_left", ypos="head")
@ -373,7 +371,7 @@ label ball_ending_E1:
hide screen dynamic_cg
call blkfade
stop music fadeout 1.0
stop background fadeout 1.0
if not persistent.game_complete:
# First play-through
@ -2662,7 +2660,7 @@ label ball_ending_E2:
pause.3
call hide_blkfade
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
call ctc
play sound "sounds/steps_grass.ogg"
@ -2707,7 +2705,7 @@ label ball_ending_E2:
with d7
$ achievements.unlock("ending")
stop music fadeout 1.0
stop background fadeout 1.0
if public_whore_ending:
centered "{size=+7}{color=#cbcbcb}Congratulations on completing the game!{/color}{/size}\n\n{color=#cbcbcb}This is one of two possible endings (public whore){/color}"
@ -2732,7 +2730,6 @@ label ball_ending_E2:
hide screen dynamic_cg
hide screen blktone
stop background
stop weather
hide screen notes
hide screen bld1

View File

@ -81,7 +81,7 @@ label ending_after:
# Genie stands in the forest before he's about to leave
$ dynamic_cg("ball", "171", "172", "173")
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
pause.5
call hide_blkfade
@ -91,7 +91,7 @@ label ending_after:
# Record scratch, music stops
$ dynamic_cg("ball", "171", "172")
stop music fadeout 1.5
stop background fadeout 1.5
play sound "sounds/scratch.ogg"
with hpunch
@ -99,7 +99,7 @@ label ending_after:
gen "Why leave now when I'm the king of a castle filled with women ready to serve!?" ("angry", xpos="far_left", ypos="head")
# Heading back to the castle
play music "music/night.ogg" fadein 1
play background "sounds/night.ogg" fadein 1
call blkfade
hide screen dynamic_cg
@ -109,7 +109,7 @@ label ending_after:
pause .5
nar "You hastily make your way back to the castle, wondering what kind of impulse made you want to leave in the first place..."
stop music fadeout 3
stop background fadeout 3
if public_whore_ending:
play music "music/court-of-the-queen-by-kevin-macleod.ogg" fadein 1 fadeout 1

View File

@ -20,11 +20,6 @@ screen nvl(dialogue, items=None):
#
# https://www.renpy.org/doc/html/screen_special.html#say
screen say_narrator(**kwargs):
add "#00000080"
use say(**kwargs)
screen say(who, what, side_image=None, icon=None):
zorder 31
@ -39,6 +34,10 @@ screen say(who, what, side_image=None, icon=None):
else:
add SideImage()
# TODO: While this works, there might be a better way to add effects based on contents of the dialogue.
if what.startswith("(") and what.endswith(")") and not renpy.showing("cg"):
add "fade_gradient"
window id "window":
style gui.theme("say_window")

View File

@ -181,7 +181,7 @@ label suck_and_run:
hide screen bld1
call gen_chibi("sit_behind_desk")
play music "music/night.ogg" fadein 1
play music "sounds/night.ogg" fadein 1 # Intentional, because background channel is already preoccupied
show screen add_overlay
hide screen blkfade

View File

@ -0,0 +1,35 @@
image fade = "#00000080"
image fade_gradient = "interface/bld.webp"
# Transitions
init offset = -1
define d1 = Dissolve(0.1)
define d2 = Dissolve(0.2)
define d3 = Dissolve(0.3)
define d4 = Dissolve(0.4)
define d5 = Dissolve(0.5)
define d6 = Dissolve(0.6)
define d7 = Dissolve(0.7)
define d8 = Dissolve(0.8)
define d9 = Dissolve(0.9)
define f1 = Fade(0.1, 0.0, 0.1)
define f2 = Fade(0.2, 0.0, 0.2)
define f3 = Fade(0.3, 0.0, 0.3)
define flash = Fade(0.1, 0.0, 0.5, color="#fff")
define flashbulb = Fade(0.2, 0.0, 0.8, color='#fff')
define flashbb = Fade(0.2, 0.0, 0.8, color='#000')
define flashblood = Fade(0.2, 0.0, 0.8, color='#f02424')
define kissiris = Fade(0.2, 0.0, 0.8, color='#fb8dc8')
define black_magic = Fade(0.2, 0.0, 0.5, color='#7f3590')
define blackfade = Fade(0.9, 0.5, 1, color='#000000')
define morph = ComposeTransition(Dissolve(0.9), before=Fade(0.1, 0.5, 0.5, color="#fff"), after=Dissolve(0.5))
define teleport = ImageDissolve("id_teleport.webp", 1.0, 0)
define vpunch_repeat = Move((0, 10), (0, -10), .5, bounce=True, repeat=True, delay=4.5)
define faderight = ImageDissolve("interface/transitions/faderight.webp", 1.0)
define fadeleft = ImageDissolve("interface/transitions/faderight.webp", 1.0, reverse=True)