Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Changing Framework #4503

Merged
merged 24 commits into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Binary file not shown.
Diff not rendered.
80 changes: 47 additions & 33 deletions Monika After Story/game/script-ch30.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ init -1 python in mas_globals:

show_s_light = False
# set to True to show s easter egg.
# NOTE: set to True during o31, and also during sayori easter egg
# TODO: need to this

text_speed_enabled = False
# set to True if text speed is enabled
Expand Down Expand Up @@ -207,10 +205,6 @@ init -10 python:
mas_idle_mailbox = MASIdleMailbox()


image blue_sky = "mod_assets/blue_sky.jpg"
image monika_room = "images/cg/monika/monika_room.png"
image monika_day_room = "mod_assets/monika_day_room.png"
image monika_gloomy_room = "mod_assets/monika_day_room_rain.png"
image monika_room_highlight:
"images/cg/monika/monika_room_highlight.png"
function monika_alpha
Expand Down Expand Up @@ -258,14 +252,6 @@ image monika_body_glitch2:

image room_glitch = "images/cg/monika/monika_bg_glitch.png"


# spaceroom window positions
transform spaceroom_window_left:
size (320, 180) pos (30, 200)

transform spaceroom_window_right:
size (320, 180) pos (935, 200)

init python:

import subprocess
Expand Down Expand Up @@ -406,21 +392,18 @@ init python:
mas_is_raining
mas_is_snowing
"""
# hide the existing masks
# hide the existing mask
renpy.hide("rm")
renpy.hide("rm2")

# get current weather masks
left_w, right_w = mas_current_weather.sp_window(morning_flag)
mask = mas_current_weather.sp_window(morning_flag)

# should we use fallbacks instead?
if persistent._mas_disable_animations:
left_w += "_fb"
right_w += "_fb"
mask += "_fb"

# now show the masks
renpy.show(left_w, at_list=[spaceroom_window_left], tag="rm")
renpy.show(right_w, at_list=[spaceroom_window_right], tag="rm2")
# now show the mask
renpy.show(mask, tag="rm")

if dissolve_masks:
renpy.with_statement(Dissolve(1.0))
Expand Down Expand Up @@ -741,10 +724,28 @@ init 1 python:
# NOTE: this must be a string
# NOTE: if passed in, this will override aff-based exps from dissolving.
# (Default: None)
label spaceroom(start_bg=None, hide_mask=False, hide_monika=False, dissolve_all=False, dissolve_masks=False, scene_change=False, force_exp=None):
# day_bg - the room we'll be showing during the day
# NOTE: must be string
# NOTE: if passed in, it will override the current background day_bg
# (Default: None)
# night_bg - the room we'll be showing during the night
# NOTE: must be string
# NOTE: if passed in, it will override the current background night_bg
# (Default: None)
label spaceroom(start_bg=None, hide_mask=None, hide_monika=False, dissolve_all=False, dissolve_masks=False, scene_change=False, force_exp=None, hide_calendar=None, day_bg=None, night_bg=None):

with None

#Get all of the params
if hide_mask is None:
$ hide_mask = store.mas_current_background.hide_masks
if hide_calendar is None:
$ hide_calendar = store.mas_current_background.hide_calendar
if day_bg is None:
$ day_bg = store.mas_current_background.getDayRoom()
if night_bg is None:
$ night_bg = store.mas_current_background.getNightRoom()

if scene_change:
scene black

Expand All @@ -756,12 +757,12 @@ label spaceroom(start_bg=None, hide_mask=False, hide_monika=False, dissolve_all=
if mas_isMorning():
if not morning_flag or scene_change:
morning_flag = True
monika_room = "monika_day_room"
monika_room = day_bg

else:
if morning_flag or scene_change:
morning_flag = False
monika_room = "monika_room"
monika_room = night_bg

## are we hiding monika
if not hide_monika:
Expand All @@ -779,12 +780,12 @@ label spaceroom(start_bg=None, hide_mask=False, hide_monika=False, dissolve_all=
if not dissolve_all:
renpy.with_statement(None)

# if we onyl want to dissolve masks, then we dissolve now
# if we only want to dissolve masks, then we dissolve now
if not dissolve_all and not hide_mask:
mas_drawSpaceroomMasks(dissolve_masks)

# actual room check
# are we using a custom bg or not
# are we using a custom start bg or not
if start_bg:
if not renpy.showing(start_bg):
renpy.show(start_bg, tag="sp_mas_room", zorder=MAS_BACKGROUND_Z)
Expand All @@ -796,7 +797,9 @@ label spaceroom(start_bg=None, hide_mask=False, hide_monika=False, dissolve_all=
tag="sp_mas_room",
zorder=MAS_BACKGROUND_Z
)
mas_calShowOverlay()
#Show calendar if it's supported
if not hide_calendar:
mas_calShowOverlay()


# vignette
Expand All @@ -821,6 +824,8 @@ label spaceroom(start_bg=None, hide_mask=False, hide_monika=False, dissolve_all=
# dissolving everything means dissolve last
if dissolve_all and not hide_mask:
$ mas_drawSpaceroomMasks(dissolve_all)
elif dissolve_all:
$ renpy.with_statement(Dissolve(1.0))

return

Expand Down Expand Up @@ -1365,13 +1370,22 @@ label ch30_loop:
$ quick_menu = True

python:
should_dissolve_all = mas_shouldChangeTime()
should_dissolve_masks = (
mas_weather.weatherProgress()
mas_weather.weatherProgress()
and mas_isMoniNormal(higher=True)
)

call spaceroom(dissolve_all=should_dissolve_all, dissolve_masks=should_dissolve_masks)
should_dissolve_all = (
mas_shouldChangeTime()
or mas_weather.should_scene_change
)

#NOTE: putting the scene change condition directly in here because
#It doesn't like being in the python block
call spaceroom(scene_change=mas_weather.should_scene_change, dissolve_all=should_dissolve_all, dissolve_masks=should_dissolve_masks)

#This should be set back to false so we're not constantly scene changing
$ mas_weather.should_scene_change = False

# if should_dissolve_masks:
# show monika idle at t11 zorder MAS_MONIKA_Z
Expand Down Expand Up @@ -1614,8 +1628,8 @@ label ch30_end:
label ch30_reset:

python:
# name eggs
if persistent.playername.lower() == "sayori":
# name/o31 eggs
if persistent.playername.lower() == "sayori" or store.mas_isO31():
store.mas_globals.show_s_light = True

python:
Expand Down
13 changes: 11 additions & 2 deletions Monika After Story/game/script-stories.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,29 @@ define mas_scary_story_setup_done = False
label mas_scary_story_setup:
if mas_scary_story_setup_done:
return

$ mas_scary_story_setup_done = True
show monika 1dsc
$ mas_temp_r_flag = mas_current_weather
$ is_scene_changing = mas_current_background.isChangingRoom(mas_current_weather, mas_weather_rain)
$ are_masks_changing = mas_current_weather != mas_weather_rain
$ mas_is_raining = True
#TODO persistent music spoop for o31

#TODO: persistent music spoop for o31
stop music fadeout 1.0
pause 1.0

$ mas_temp_m_flag = morning_flag
$ mas_temp_zoom_level = store.mas_sprites.zoom_level
call monika_zoom_transition_reset(1.0)

$ mas_changeBackground(mas_background_def)
$ mas_changeWeather(mas_weather_rain)

if not mas_isO31():
$ store.mas_globals.show_vignette = True
call spaceroom(start_bg="monika_gloomy_room", dissolve_all=True, force_exp='monika 1dsc_static')

call spaceroom(scene_change=is_scene_changing, dissolve_all=is_scene_changing, dissolve_masks=are_masks_changing, force_exp='monika 1dsc_static')
play music "mod_assets/bgm/happy_story_telling.ogg" loop

# $ songs.current_track = songs.FP_NO_SONG
Expand Down
Loading