Wait! i did that on the new project.. but suddenly.. when i copied the script.rpy file, (Of course i replaced my options and etc.. in the new one.)
It changes back.. you can take a look in my code.
Code: Select all
################################################################################
## Initialization
################################################################################
init offset = -1
################################################################################
## Styles
################################################################################
style default:
properties gui.text_properties()
language gui.language
style input:
properties gui.text_properties("input", accent=True)
adjust_spacing False
style hyperlink_text:
properties gui.text_properties("hyperlink", accent=True)
hover_underline True
style gui_text:
properties gui.text_properties("interface")
style button:
properties gui.button_properties("button")
style button_text is gui_text:
properties gui.text_properties("button")
yalign 0.5
style label_text is gui_text:
properties gui.text_properties("label", accent=True)
style prompt_text is gui_text:
properties gui.text_properties("prompt")
style bar:
ysize gui.bar_size
left_bar Frame("gui/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
right_bar Frame("gui/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
style vbar:
xsize gui.bar_size
top_bar Frame("gui/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
bottom_bar Frame("gui/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
style scrollbar:
ysize gui.scrollbar_size
base_bar Frame("gui/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
thumb Frame("gui/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
style vscrollbar:
xsize gui.scrollbar_size
base_bar Frame("gui/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
thumb Frame("gui/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
style slider:
ysize gui.slider_size
base_bar Frame("gui/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
thumb "gui/slider/horizontal_[prefix_]thumb.png"
style vslider:
xsize gui.slider_size
base_bar Frame("gui/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
thumb "gui/slider/vertical_[prefix_]thumb.png"
style frame:
padding gui.frame_borders.padding
background Frame("gui/frame.png", gui.frame_borders, tile=gui.frame_tile)
################################################################################
## In-game screens
################################################################################
## Say screen ##################################################################
##
## The say screen is used to display dialogue to the player. It takes two
## parameters, who and what, which are the name of the speaking character and
## the text to be displayed, respectively. (The who parameter can be None if no
## name is given.)
##
## This screen must create a text displayable with id "what", as Ren'Py uses
## this to manage text display. It can also create displayables with id "who"
## and id "window" to apply style properties.
##
## https://www.renpy.org/doc/html/screen_special.html#say
screen say(who, what):
style_prefix "say"
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0
## Make the namebox available for styling through the Character object.
init python:
config.character_id_prefixes.append('namebox')
style window is default
style say_label is default
style say_dialogue is default
style say_thought is say_dialogue
style namebox is default
style namebox_label is say_label
style window:
xalign 0.5
xfill True
yalign gui.textbox_yalign
ysize gui.textbox_height
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
style namebox:
xpos gui.name_xpos
xanchor gui.name_xalign
xsize gui.namebox_width
ypos gui.name_ypos
ysize gui.namebox_height
background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
padding gui.namebox_borders.padding
style say_label:
properties gui.text_properties("name", accent=True)
xalign gui.name_xalign
yalign 0.5
style say_dialogue:
properties gui.text_properties("dialogue")
xpos gui.dialogue_xpos
xsize gui.dialogue_width
ypos gui.dialogue_ypos
## Input screen ################################################################
##
## This screen is used to display renpy.input. The prompt parameter is used to
## pass a text prompt in.
##
## This screen must create an input displayable with id "input" to accept the
## various input parameters.
##
## https://www.renpy.org/doc/html/screen_special.html#input
screen input(prompt):
style_prefix "input"
window:
vbox:
xalign gui.dialogue_text_xalign
xpos gui.dialogue_xpos
xsize gui.dialogue_width
ypos gui.dialogue_ypos
text prompt style "input_prompt"
input id "input"
style input_prompt is default
style input_prompt:
xalign gui.dialogue_text_xalign
properties gui.text_properties("input_prompt")
style input:
xalign gui.dialogue_text_xalign
xmaximum gui.dialogue_width
## Choice screen ###############################################################
##
## This screen is used to display the in-game choices presented by the menu
## statement. The one parameter, items, is a list of objects, each with caption
## and action fields.
##
## https://www.renpy.org/doc/html/screen_special.html#choice
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption action i.action
## When this is true, menu captions will be spoken by the narrator. When false,
## menu captions will be displayed as empty buttons.
define config.narrator_menu = True
style choice_vbox is vbox
style choice_button is button
style choice_button_text is button_text
style choice_vbox:
xalign 0.5
ypos 405
yanchor 0.5
spacing gui.choice_spacing
style choice_button is default:
properties gui.button_properties("choice_button")
style choice_button_text is default:
properties gui.button_text_properties("choice_button")
## Quick Menu screen ###########################################################
##
## The quick menu is displayed in-game to provide easy access to the out-of-game
## menus.
screen quick_menu():
## Ensure this appears on top of other screens.
zorder 100
if quick_menu:
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
textbutton _("Back") action Rollback()
textbutton _("History") action ShowMenu('history')
textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Save") action ShowMenu('save')
textbutton _("Q.Save") action QuickSave()
textbutton _("Q.Load") action QuickLoad()
textbutton _("Prefs") action ShowMenu('preferences')
## This code ensures that the quick_menu screen is displayed in-game, whenever
## the player has not explicitly hidden the interface.
init python:
config.overlay_screens.append("quick_menu")
default quick_menu = True
style quick_button is default
style quick_button_text is button_text
style quick_button:
properties gui.button_properties("quick_button")
style quick_button_text:
properties gui.button_text_properties("quick_button")
################################################################################
## Main and Game Menu Screens
################################################################################
## Navigation screen ###########################################################
##
## This screen is included in the main and game menus, and provides navigation
## to other menus, and to start the game.
screen navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos
yalign 0.5
spacing gui.navigation_spacing
if main_menu:
textbutton _("Start") action Start()
else:
textbutton _("History") action ShowMenu("history")
textbutton _("Save") action ShowMenu("save")
textbutton _("Load") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
if _in_replay:
textbutton _("End Replay") action EndReplay(confirm=True)
elif not main_menu:
textbutton _("Main Menu") action MainMenu()
textbutton _("About") action ShowMenu("about")
if renpy.variant("pc"):
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
## The quit button is banned on iOS and unnecessary on Android.
textbutton _("Quit") action Quit(confirm=not main_menu)
style navigation_button is gui_button
style navigation_button_text is gui_button_text
style navigation_button:
size_group "navigation"
properties gui.button_properties("navigation_button")
style navigation_button_text:
properties gui.button_text_properties("navigation_button")
## Main Menu screen ############################################################
##
## Used to display the main menu when Ren'Py starts.
##
## https://www.renpy.org/doc/html/screen_special.html#main-menu
screen main_menu():
## This ensures that any other menu screen is replaced.
tag menu
style_prefix "main_menu"
add gui.main_menu_background
## This empty frame darkens the main menu.
frame:
pass
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
use navigation
if gui.show_name:
vbox:
text "[config.name!t]":
style "main_menu_title"
text "[config.version]":
style "main_menu_version"
style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text
style main_menu_frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
style main_menu_vbox:
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
style main_menu_text:
properties gui.text_properties("main_menu", accent=True)
style main_menu_title:
properties gui.text_properties("title")
style main_menu_version:
properties gui.text_properties("version")
## Game Menu screen ############################################################
##
## This lays out the basic common structure of a game menu screen. It's called
## with the screen title, and displays the background, title, and navigation.
##
## The scroll parameter can be None, or one of "viewport" or "vpgrid". When
## this screen is intended to be used with one or more children, which are
## transcluded (placed) inside it.
screen game_menu(title, scroll=None, yinitial=0.0):
style_prefix "game_menu"
if main_menu:
add gui.main_menu_background
else:
add gui.game_menu_background
frame:
style "game_menu_outer_frame"
hbox:
## Reserve space for the navigation section.
frame:
style "game_menu_navigation_frame"
frame:
style "game_menu_content_frame"
if scroll == "viewport":
viewport:
yinitial yinitial
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
side_yfill True
vbox:
transclude
elif scroll == "vpgrid":
vpgrid:
cols 1
yinitial yinitial
scrollbars "vertical"
mousewheel True
draggable True
pagekeys True
side_yfill True
transclude
else:
transclude
use navigation
textbutton _("Return"):
style "return_button"
action Return()
label title
if main_menu:
key "game_menu" action ShowMenu("main_menu")
style game_menu_outer_frame is empty
style game_menu_navigation_frame is empty
style game_menu_content_frame is empty
style game_menu_viewport is gui_viewport
style game_menu_side is gui_side
style game_menu_scrollbar is gui_vscrollbar
style game_menu_label is gui_label
style game_menu_label_text is gui_label_text
style return_button is navigation_button
style return_button_text is navigation_button_text
style game_menu_outer_frame:
bottom_padding 45
top_padding 180
background "gui/overlay/game_menu.png"
style game_menu_navigation_frame:
xsize 420
yfill True
style game_menu_content_frame:
left_margin 60
right_margin 30
top_margin 15
style game_menu_viewport:
xsize 1380
style game_menu_vscrollbar:
unscrollable gui.unscrollable
style game_menu_side:
spacing 15
style game_menu_label:
xpos 75
ysize 180
style game_menu_label_text:
size gui.title_text_size
color gui.accent_color
yalign 0.5
style return_button:
xpos gui.navigation_xpos
yalign 1.0
yoffset -45
## About screen ################################################################
##
## This screen gives credit and copyright information about the game and Ren'Py.
##
## There's nothing special about this screen, and hence it also serves as an
## example of how to make a custom screen.
screen about():
tag menu
## This use statement includes the game_menu screen inside this one. The
## vbox child is then included inside the viewport inside the game_menu
## screen.
use game_menu(_("About"), scroll="viewport"):
style_prefix "about"
vbox:
label "[config.name!t]"
text _("Version [config.version!t]\n")
## gui.about is usually set in options.rpy.
if gui.about:
text "[gui.about!t]\n"
text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]")
## This is redefined in options.rpy to add text to the about screen.
define gui.about = ""
style about_label is gui_label
style about_label_text is gui_label_text
style about_text is gui_text
style about_label_text:
size gui.label_text_size
## Load and Save screens #######################################################
##
## These screens are responsible for letting the player save the game and load
## it again. Since they share nearly everything in common, both are implemented
## in terms of a third screen, file_slots.
##
## https://www.renpy.org/doc/html/screen_special.html#save https://
## www.renpy.org/doc/html/screen_special.html#load
screen save():
tag menu
use file_slots(_("Save"))
screen load():
tag menu
use file_slots(_("Load"))
screen file_slots(title):
default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Automatic saves"), quick=_("Quick saves"))
use game_menu(title):
fixed:
## This ensures the input will get the enter event before any of the
## buttons do.
order_reverse True
## The page name, which can be edited by clicking on a button.
button:
style "page_label"
key_events True
xalign 0.5
action page_name_value.Toggle()
input:
style "page_label_text"
value page_name_value
## The grid of file slots.
grid gui.file_slot_cols gui.file_slot_rows:
style_prefix "slot"
xalign 0.5
yalign 0.5
spacing gui.slot_spacing
for i in range(gui.file_slot_cols * gui.file_slot_rows):
$ slot = i + 1
button:
action FileAction(slot)
has vbox
add FileScreenshot(slot) xalign 0.5
text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")):
style "slot_time_text"
text FileSaveName(slot):
style "slot_name_text"
key "save_delete" action FileDelete(slot)
## Buttons to access other pages.
hbox:
style_prefix "page"
xalign 0.5
yalign 1.0
spacing gui.page_spacing
textbutton _("<") action FilePagePrevious()
if config.has_autosave:
textbutton _("{#auto_page}A") action FilePage("auto")
if config.has_quicksave:
textbutton _("{#quick_page}Q") action FilePage("quick")
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
textbutton _(">") action FilePageNext()
style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text
style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text
style page_label:
xpadding 75
ypadding 5
style page_label_text:
text_align 0.5
layout "subtitle"
hover_color gui.hover_color
style page_button:
properties gui.button_properties("page_button")
style page_button_text:
properties gui.button_text_properties("page_button")
style slot_button:
properties gui.button_properties("slot_button")
style slot_button_text:
properties gui.button_text_properties("slot_button")
## Preferences screen ##########################################################
##
## The preferences screen allows the player to configure the game to better suit
## themselves.
##
## https://www.renpy.org/doc/html/screen_special.html#preferences
screen preferences():
tag menu
use game_menu(_("Preferences"), scroll="viewport"):
vbox:
hbox:
box_wrap True
if renpy.variant("pc"):
vbox:
style_prefix "radio"
label _("Display")
textbutton _("Window") action Preference("display", "window")
textbutton _("Fullscreen") action Preference("display", "fullscreen")
vbox:
style_prefix "radio"
label _("Rollback Side")
textbutton _("Disable") action Preference("rollback side", "disable")
textbutton _("Left") action Preference("rollback side", "left")
textbutton _("Right") action Preference("rollback side", "right")
vbox:
style_prefix "check"
label _("Skip")
textbutton _("Unseen Text") action Preference("skip", "toggle")
textbutton _("After Choices") action Preference("after choices", "toggle")
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))
## Additional vboxes of type "radio_pref" or "check_pref" can be
## added here, to add additional creator-defined preferences.
null height (4 * gui.pref_spacing)
hbox:
style_prefix "slider"
box_wrap True
vbox:
label _("Text Speed")
bar value Preference("text speed")
label _("Auto-Forward Time")
bar value Preference("auto-forward time")
vbox:
if config.has_music:
label _("Music Volume")
hbox:
bar value Preference("music volume")
if config.has_sound:
label _("Sound Volume")
hbox:
bar value Preference("sound volume")
if config.sample_sound:
textbutton _("Test") action Play("sound", config.sample_sound)
if config.has_voice:
label _("Voice Volume")
hbox:
bar value Preference("voice volume")
if config.sample_voice:
textbutton _("Test") action Play("voice", config.sample_voice)
if config.has_music or config.has_sound or config.has_voice:
null height gui.pref_spacing
textbutton _("Mute All"):
action Preference("all mute", "toggle")
style "mute_all_button"
style pref_label is gui_label
style pref_label_text is gui_label_text
style pref_vbox is vbox
style radio_label is pref_label
style radio_label_text is pref_label_text
style radio_button is gui_button
style radio_button_text is gui_button_text
style radio_vbox is pref_vbox
style check_label is pref_label
style check_label_text is pref_label_text
style check_button is gui_button
style check_button_text is gui_button_text
style check_vbox is pref_vbox
style slider_label is pref_label
style slider_label_text is pref_label_text
style slider_slider is gui_slider
style slider_button is gui_button
style slider_button_text is gui_button_text
style slider_pref_vbox is pref_vbox
style mute_all_button is check_button
style mute_all_button_text is check_button_text
style pref_label:
top_margin gui.pref_spacing
bottom_margin 3
style pref_label_text:
yalign 1.0
style pref_vbox:
xsize 338
style radio_vbox:
spacing gui.pref_button_spacing
style radio_button:
properties gui.button_properties("radio_button")
foreground "gui/button/check_[prefix_]foreground.png"
style radio_button_text:
properties gui.button_text_properties("radio_button")
style check_vbox:
spacing gui.pref_button_spacing
style check_button:
properties gui.button_properties("check_button")
foreground "gui/button/check_[prefix_]foreground.png"
style check_button_text:
properties gui.button_text_properties("check_button")
style slider_slider:
xsize 525
style slider_button:
properties gui.button_properties("slider_button")
yalign 0.5
left_margin 15
style slider_button_text:
properties gui.button_text_properties("slider_button")
style slider_vbox:
xsize 675
## History screen ##############################################################
##
## This is a screen that displays the dialogue history to the player. While
## there isn't anything special about this screen, it does have to access the
## dialogue history stored in _history_list.
##
## https://www.renpy.org/doc/html/history.html
screen history():
tag menu
## Avoid predicting this screen, as it can be very large.
predict False
use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
style_prefix "history"
for h in _history_list:
window:
## This lays things out properly if history_height is None.
has fixed:
yfit True
if h.who:
label h.who:
style "history_name"
substitute False
## Take the color of the who text from the Character, if
## set.
if "color" in h.who_args:
text_color h.who_args["color"]
$ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
text what:
substitute False
if not _history_list:
label _("The dialogue history is empty.")
## This determines what tags are allowed to be displayed on the history screen.
define gui.history_allow_tags = set()
style history_window is empty
style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text
style history_text is gui_text
style history_label is gui_label
style history_label_text is gui_label_text
style history_window:
xfill True
ysize gui.history_height
style history_name:
xpos gui.history_name_xpos
xanchor gui.history_name_xalign
ypos gui.history_name_ypos
xsize gui.history_name_width
style history_name_text:
min_width gui.history_name_width
text_align gui.history_name_xalign
style history_text:
xpos gui.history_text_xpos
ypos gui.history_text_ypos
xanchor gui.history_text_xalign
xsize gui.history_text_width
min_width gui.history_text_width
text_align gui.history_text_xalign
layout ("subtitle" if gui.history_text_xalign else "tex")
style history_label:
xfill True
style history_label_text:
xalign 0.5
## Help screen #################################################################
##
## A screen that gives information about key and mouse bindings. It uses other
## screens (keyboard_help, mouse_help, and gamepad_help) to display the actual
## help.
screen help():
tag menu
default device = "keyboard"
use game_menu(_("Help"), scroll="viewport"):
style_prefix "help"
vbox:
spacing 23
hbox:
textbutton _("Keyboard") action SetScreenVariable("device", "keyboard")
textbutton _("Mouse") action SetScreenVariable("device", "mouse")
if GamepadExists():
textbutton _("Gamepad") action SetScreenVariable("device", "gamepad")
if device == "keyboard":
use keyboard_help
elif device == "mouse":
use mouse_help
elif device == "gamepad":
use gamepad_help
screen keyboard_help():
hbox:
label _("Enter")
text _("Advances dialogue and activates the interface.")
hbox:
label _("Space")
text _("Advances dialogue without selecting choices.")
hbox:
label _("Arrow Keys")
text _("Navigate the interface.")
hbox:
label _("Escape")
text _("Accesses the game menu.")
hbox:
label _("Ctrl")
text _("Skips dialogue while held down.")
hbox:
label _("Tab")
text _("Toggles dialogue skipping.")
hbox:
label _("Page Up")
text _("Rolls back to earlier dialogue.")
hbox:
label _("Page Down")
text _("Rolls forward to later dialogue.")
hbox:
label "H"
text _("Hides the user interface.")
hbox:
label "S"
text _("Takes a screenshot.")
hbox:
label "V"
text _("Toggles assistive {a=https://www.renpy.org/l/voicing}self-voicing{/a}.")
screen mouse_help():
hbox:
label _("Left Click")
text _("Advances dialogue and activates the interface.")
hbox:
label _("Middle Click")
text _("Hides the user interface.")
hbox:
label _("Right Click")
text _("Accesses the game menu.")
hbox:
label _("Mouse Wheel Up\nClick Rollback Side")
text _("Rolls back to earlier dialogue.")
hbox:
label _("Mouse Wheel Down")
text _("Rolls forward to later dialogue.")
screen gamepad_help():
hbox:
label _("Right Trigger\nA/Bottom Button")
text _("Advances dialogue and activates the interface.")
hbox:
label _("Left Trigger\nLeft Shoulder")
text _("Rolls back to earlier dialogue.")
hbox:
label _("Right Shoulder")
text _("Rolls forward to later dialogue.")
hbox:
label _("D-Pad, Sticks")
text _("Navigate the interface.")
hbox:
label _("Start, Guide")
text _("Accesses the game menu.")
hbox:
label _("Y/Top Button")
text _("Hides the user interface.")
textbutton _("Calibrate") action GamepadCalibrate()
style help_button is gui_button
style help_button_text is gui_button_text
style help_label is gui_label
style help_label_text is gui_label_text
style help_text is gui_text
style help_button:
properties gui.button_properties("help_button")
xmargin 12
style help_button_text:
properties gui.button_text_properties("help_button")
style help_label:
xsize 375
right_padding 30
style help_label_text:
size gui.text_size
xalign 1.0
text_align 1.0
################################################################################
## Additional screens
################################################################################
## Confirm screen ##############################################################
##
## The confirm screen is called when Ren'Py wants to ask the player a yes or no
## question.
##
## https://www.renpy.org/doc/html/screen_special.html#confirm
screen confirm(message, yes_action, no_action):
## Ensure other screens do not get input while this screen is displayed.
modal True
zorder 200
style_prefix "confirm"
add "gui/overlay/confirm.png"
frame:
vbox:
xalign .5
yalign .5
spacing 45
label _(message):
style "confirm_prompt"
xalign 0.5
hbox:
xalign 0.5
spacing 150
textbutton _("Yes") action yes_action
textbutton _("No") action no_action
## Right-click and escape answer "no".
key "game_menu" action no_action
style confirm_frame is gui_frame
style confirm_prompt is gui_prompt
style confirm_prompt_text is gui_prompt_text
style confirm_button is gui_medium_button
style confirm_button_text is gui_medium_button_text
style confirm_frame:
background Frame([ "gui/confirm_frame.png", "gui/frame.png"], gui.confirm_frame_borders, tile=gui.frame_tile)
padding gui.confirm_frame_borders.padding
xalign .5
yalign .5
style confirm_prompt_text:
text_align 0.5
layout "subtitle"
style confirm_button:
properties gui.button_properties("confirm_button")
style confirm_button_text:
properties gui.button_text_properties("confirm_button")
## Skip indicator screen #######################################################
##
## The skip_indicator screen is displayed to indicate that skipping is in
## progress.
##
## https://www.renpy.org/doc/html/screen_special.html#skip-indicator
screen skip_indicator():
zorder 100
style_prefix "skip"
frame:
hbox:
spacing 9
text _("Skipping")
text "▸" at delayed_blink(0.0, 1.0) style "skip_triangle"
text "▸" at delayed_blink(0.2, 1.0) style "skip_triangle"
text "▸" at delayed_blink(0.4, 1.0) style "skip_triangle"
## This transform is used to blink the arrows one after another.
transform delayed_blink(delay, cycle):
alpha .5
pause delay
block:
linear .2 alpha 1.0
pause .2
linear .2 alpha 0.5
pause (cycle - .4)
repeat
style skip_frame is empty
style skip_text is gui_text
style skip_triangle is skip_text
style skip_frame:
ypos gui.skip_ypos
background Frame("gui/skip.png", gui.skip_frame_borders, tile=gui.frame_tile)
padding gui.skip_frame_borders.padding
style skip_text:
size gui.notify_text_size
style skip_triangle:
## We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE
## glyph in it.
font "DejaVuSans.ttf"
## Notify screen ###############################################################
##
## The notify screen is used to show the player a message. (For example, when
## the game is quicksaved or a screenshot has been taken.)
##
## https://www.renpy.org/doc/html/screen_special.html#notify-screen
screen notify(message):
zorder 100
style_prefix "notify"
frame at notify_appear:
text "[message!tq]"
timer 3.25 action Hide('notify')
transform notify_appear:
on show:
alpha 0
linear .25 alpha 1.0
on hide:
linear .5 alpha 0.0
style notify_frame is empty
style notify_text is gui_text
style notify_frame:
ypos gui.notify_ypos
background Frame("gui/notify.png", gui.notify_frame_borders, tile=gui.frame_tile)
padding gui.notify_frame_borders.padding
style notify_text:
properties gui.text_properties("notify")
## NVL screen ##################################################################
##
## This screen is used for NVL-mode dialogue and menus.
##
## https://www.renpy.org/doc/html/screen_special.html#nvl
screen nvl(dialogue, items=None):
window:
style "nvl_window"
has vbox:
spacing gui.nvl_spacing
## Displays dialogue in either a vpgrid or the vbox.
if gui.nvl_height:
vpgrid:
cols 1
yinitial 1.0
use nvl_dialogue(dialogue)
else:
use nvl_dialogue(dialogue)
## Displays the menu, if given. The menu may be displayed incorrectly if
## config.narrator_menu is set to True, as it is above.
for i in items:
textbutton i.caption:
action i.action
style "nvl_button"
add SideImage() xalign 0.0 yalign 1.0
screen nvl_dialogue(dialogue):
for d in dialogue:
window:
id d.window_id
fixed:
yfit gui.nvl_height is None
if d.who is not None:
text d.who:
id d.who_id
text d.what:
id d.what_id
## This controls the maximum number of NVL-mode entries that can be displayed at
## once.
define config.nvl_list_length = gui.nvl_list_length
style nvl_window is default
style nvl_entry is default
style nvl_label is say_label
style nvl_dialogue is say_dialogue
style nvl_button is button
style nvl_button_text is button_text
style nvl_window:
xfill True
yfill True
background "gui/nvl.png"
padding gui.nvl_borders.padding
style nvl_entry:
xfill True
ysize gui.nvl_height
style nvl_label:
xpos gui.nvl_name_xpos
xanchor gui.nvl_name_xalign
ypos gui.nvl_name_ypos
yanchor 0.0
xsize gui.nvl_name_width
min_width gui.nvl_name_width
text_align gui.nvl_name_xalign
style nvl_dialogue:
xpos gui.nvl_text_xpos
xanchor gui.nvl_text_xalign
ypos gui.nvl_text_ypos
xsize gui.nvl_text_width
min_width gui.nvl_text_width
text_align gui.nvl_text_xalign
layout ("subtitle" if gui.nvl_text_xalign else "tex")
style nvl_thought:
xpos gui.nvl_thought_xpos
xanchor gui.nvl_thought_xalign
ypos gui.nvl_thought_ypos
xsize gui.nvl_thought_width
min_width gui.nvl_thought_width
text_align gui.nvl_thought_xalign
layout ("subtitle" if gui.nvl_text_xalign else "tex")
style nvl_button:
properties gui.button_properties("nvl_button")
xpos gui.nvl_button_xpos
xanchor gui.nvl_button_xalign
style nvl_button_text:
properties gui.button_text_properties("nvl_button")
################################################################################
## Mobile Variants
################################################################################
style pref_vbox:
variant "medium"
xsize 675
## Since a mouse may not be present, we replace the quick menu with a version
## that uses fewer and bigger buttons that are easier to touch.
screen quick_menu():
variant "touch"
zorder 100
if quick_menu:
hbox:
style_prefix "quick"
xalign 0.5
yalign 1.0
textbutton _("Back") action Rollback()
textbutton _("Skip") action Skip() alternate Skip(fast=True, confirm=True)
textbutton _("Auto") action Preference("auto-forward", "toggle")
textbutton _("Menu") action ShowMenu()
style window:
variant "small"
background "gui/phone/textbox.png"
style radio_button:
variant "small"
foreground "gui/phone/button/check_[prefix_]foreground.png"
style check_button:
variant "small"
foreground "gui/phone/button/check_[prefix_]foreground.png"
style nvl_window:
variant "small"
background "gui/phone/nvl.png"
style main_menu_frame:
variant "small"
background "gui/phone/overlay/main_menu.png"
style game_menu_outer_frame:
variant "small"
background "gui/phone/overlay/game_menu.png"
style game_menu_navigation_frame:
variant "small"
xsize 510
style game_menu_content_frame:
variant "small"
top_margin 0
style pref_vbox:
variant "small"
xsize 600
style bar:
variant "small"
ysize gui.bar_size
left_bar Frame("gui/phone/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
right_bar Frame("gui/phone/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
style vbar:
variant "small"
xsize gui.bar_size
top_bar Frame("gui/phone/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
bottom_bar Frame("gui/phone/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
style scrollbar:
variant "small"
ysize gui.scrollbar_size
base_bar Frame("gui/phone/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
thumb Frame("gui/phone/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
style vscrollbar:
variant "small"
xsize gui.scrollbar_size
base_bar Frame("gui/phone/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
thumb Frame("gui/phone/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
style slider:
variant "small"
ysize gui.slider_size
base_bar Frame("gui/phone/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
thumb "gui/phone/slider/horizontal_[prefix_]thumb.png"
style vslider:
variant "small"
xsize gui.slider_size
base_bar Frame("gui/phone/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
thumb "gui/phone/slider/vertical_[prefix_]thumb.png"
style slider_pref_vbox:
variant "small"
xsize None
style slider_pref_slider:
variant "small"
xsize 900
Code: Select all
# The script of the game goes in this file.
# Declare characters used by this game. The color argument colorizes the
# name of the character.
define f = Character("Fina", who_color="#ffc0cb", what_color="#000000")
define c = Character("China", who_color="#ffff00", what_color="#000000")
define t = Character("Tiffany", who_color="#ffff00", what_color="#000000")
define m = Character("Maddox", who_color="#ffa500", what_color="#000000")
define i = Character("Ivy", who_color="#008000", what_color="#000000")
define d = Character("Daisy", who_color="#ffff00", what_color="#000000")
define j = Character("Jasper", who_color="#0000ff", what_color="#000000")
define z = Character("Topaz", who_color="#ffff00", what_color="#000000")
define a = Character("Aya", who_color="#0000ff", what_color="#000000")
define s = Character("Mr.Snake", who_color="#00ffff", what_color="#000000")
define g = Character("[name]", who_color="#000000", what_color="#000000")
define pov = Character("[povname]", who_color="#000000", what_color="#000000")
define u = Character("????", who_color="#000000", what_color="#000000")
define narrator = Character(None, italics=True)
define paper = Character("A Note", kind=nvl)
init:
image white = "#fff"
image black = "#000"
image loading_1 = "images/misc/loading1.png"
image loading_2 = "images/misc/loading2.png"
image loading_3 = "images/misc/loading3.png"
label splashscreen:
scene loading_1
with dissolve
$ renpy.pause (1.0, hard=True)
scene loading_2
$ renpy.pause (1.0, hard=True)
scene loading_3
$ renpy.pause (1.0, hard=True)
scene white
with dissolve
$ renpy.pause (1.0, hard=True)
show text "This game was made by SOPhia." with dissolve
$ renpy.pause (1.0, hard=True)
hide text with dissolve
$ renpy.pause (1.0, hard=True)
return
init python:
mp = MultiPersistent("Elementary School")
$ persistent.completed = False
init:
python:
import math
class Shaker(object):
anchors = {
'top' : 0.0,
'center' : 0.5,
'bottom' : 1.0,
'left' : 0.0,
'right' : 1.0,
}
def __init__(self, start, child, dist):
if start is None:
start = child.get_placement()
#
self.start = [ self.anchors.get(i, i) for i in start ] # central position
self.dist = dist # maximum distance, in pixels, from the starting point
self.child = child
def __call__(self, t, sizes):
# Float to integer... turns floating point numbers to
# integers.
def fti(x, r):
if x is None:
x = 0
if isinstance(x, float):
return int(x * r)
else:
return x
xpos, ypos, xanchor, yanchor = [ fti(a, b) for a, b in zip(self.start, sizes) ]
xpos = xpos - xanchor
ypos = ypos - yanchor
nx = xpos + (1.0-t) * self.dist * (renpy.random.random()*2-1)
ny = ypos + (1.0-t) * self.dist * (renpy.random.random()*2-1)
return (int(nx), int(ny), 0, 0)
def _Shake(start, time, child=None, dist=100.0, **properties):
move = Shaker(start, child, dist=dist)
return renpy.display.layout.Motion(move,
time,
child,
add_sizes=True,
**properties)
Shake = renpy.curry(_Shake)
#
#
init:
$ sshake = Shake((0, 0, 0, 0), 1.0, dist=15)
transform alpha_dissolve:
alpha 0.0
linear 0.5 alpha 1.0
on hide:
linear 0.5 alpha 0
# This is to fade the bar in and out, and is only required once in your script
screen timer_test:
timer time repeat False action [Hide("timer_test"),Jump("far_away")]
bar value AnimatedValue(0, time, time, time) xmaximum 200 xalign 0.5 yalign 0.05
screen unknown1():
vbox:
xmaximum 400
bar value AnimatedValue(value=u1, range=max_u1, delay=2.0)
text "Unknown: [u1]/[max_u1]"
screen finabar1():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=love1, range=max_love1, delay=2.0)
text "Fina love bar: [love1]/[max_love1]"
screen finabar2():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=love2, range=max_love2, delay=2.0)
text "Fina love bar: [love2]/[max_love2]"
screen finabar3():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=love3, range=max_love3, delay=2.0)
text "Fina love bar: [love3]/[max_love3]"
screen unknown2():
vbox:
xmaximum 400
bar value AnimatedValue(value=u2, range=max_u2, delay=2.0)
text "Unknown: [u2]/[max_u2]"
screen chinabar1():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=love4, range=max_love4, delay=2.0)
text "China love bar: [love4]/[max_love4]"
screen chinabar2():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=love5, range=max_love5, delay=2.0)
text "China love bar: [love5]/[max_love5]"
screen chinabar3():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=love6, range=max_love6, delay=2.0)
text "China love bar: [love6]/[max_love6]"
screen unknown3():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=u3, range=max_u3, delay=2.0)
text "Unknown: [u3]/[max_u3]"
screen tiffanybar1():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=love7, range=max_love7, delay=2.0)
text "Tiffany love bar: [love7]/[max_love7]"
screen tiffanybar2():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=love8, range=max_love8, delay=2.0)
text "Tiffany love bar: [love8]/[max_love8]"
screen tiffanybar3():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=love9, range=max_love9, delay=2.0)
text "Tiffany love bar: [love9]/[max_love9]"
screen unknown4():
vbox:
xmaximum 400
bar value AnimatedValue(value=u4, range=max_u4, delay=2.0)
text "Unknown: [u4]/[max_u4]"
screen ivybar1():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like1, range=max_like1, delay=2.0)
text "Ivy like bar: [like1]/[max_like1]"
screen ivybar2():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=like2, range=max_like2, delay=2.0)
text "Ivy like bar: [like2]/[max_like2]"
screen ivybar3():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like3, range=max_like3, delay=2.0)
text "Ivy like bar: [like3]/[max_like3]"
screen unknown5():
vbox:
xmaximum 400
bar value AnimatedValue(value=u5, range=max_u5, delay=2.0)
text "Unknown: [u5]/[max_u5]"
screen maddoxbar1():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=like4, range=max_like4, delay=2.0)
text "Maddox like bar: [like4]/[max_like4]"
screen maddoxbar2():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like5, range=max_like5, delay=2.0)
text "Maddox like bar: [like5]/[max_like5]"
screen maddoxbar3():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like6, range=max_like6, delay=2.0)
text "Maddox like bar: [like6]/[max_like6]"
screen unknown6():
vbox:
xmaximum 400
bar value AnimatedValue(value=u6, range=max_u6, delay=2.0)
text "Unknown: [u6]/[max_u6]"
screen daisybar1():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like7, range=max_like7, delay=2.0)
text "Daisy like bar: [like7]/[max_like7]"
screen daisybar2():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like8, range=max_like8, delay=2.0)
text "Daisy like bar: [like8]/[max_like8]"
screen daisybar3():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=like9, range=max_like9, delay=2.0)
text "Daisy like bar: [like9]/[max_like9]"
screen unknown7():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=u7, range=max_u7, delay=2.0)
text "Unknown: [u7]/[max_u7]"
screen mrsnakebar1():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like10, range=max_like10, delay=2.0)
text "Mr.Snake like bar: [like10]/[max_like10]"
screen mrsnakebar2():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like11, range=max_like11, delay=2.0)
text "Mr.Snake like bar: [like11]/[max_like11]"
screen mrsnakebar3():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=like12, range=max_like12, delay=2.0)
text "Mr.Snake like bar: [like12]/[max_like12]"
screen unknown8():
vbox:
xmaximum 400
bar value AnimatedValue(value=u8, range=max_u8, delay=2.0)
text "Unknown: [u8]/[max_u8]"
screen jasperbar1():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like13, range=max_like13, delay=2.0)
text "Jasper like bar: [like13]/[max_like13]"
screen jasperbar2():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like14, range=max_like14, delay=2.0)
text "Jasper like bar: [like14]/[max_like14]"
screen jasperbar3():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=like15, range=max_like15, delay=2.0)
text "Jasper like bar: [like15]/[max_like15]"
screen unknown9():
vbox:
xmaximum 400
bar value AnimatedValue(value=u9, range=max_u9, delay=2.0)
text "Unknown: [u9]/[max_u9]"
screen topazbar1():
vbox:
xalign 0.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like16, range=max_like16, delay=2.0)
text "Topaz like bar: [like16]/[max_like16]"
screen topazbar2():
vbox:
xalign 0.5
ypos 1
xmaximum 400
bar value AnimatedValue(value=like17, range=max_like17, delay=2.0)
text "Topaz like bar: [like17]/[max_like17]"
screen topazbar3():
vbox:
xalign 1.0
ypos 1
xmaximum 400
bar value AnimatedValue(value=like18, range=max_like18, delay=2.0)
text "Topaz like bar: [like18]/[max_like18]"
default max_u1 = 100
default u1 = 0
default max_u2 = 100
default u2 = 0
default max_u3 = 100
default u3 = 0
default max_u4 = 100
default u4 = 0
default max_u5 = 100
default u5 = 0
default max_u6 = 100
default u6 = 0
default max_u7 = 100
default u7 = 0
default max_u8 = 100
default u8 = 0
default max_u9 = 100
default u9 = 0
default max_love1 = 100
default love1 = 0
default max_love2 = 100
default love2 = 0
default max_love3 = 100
default love3 = 0
default max_love4 = 100
default love4 = 0
default max_love5 = 100
default love5 = 0
default max_love6 = 100
default love6 = 0
default max_love7 = 100
default love7 = 0
default max_love8 = 100
default love8 = 0
default max_love9 = 100
default love9 = 0
default max_like1 = 100
default like1 = 0
default max_like2 = 100
default like2 = 0
default max_like3 = 100
default like3 = 0
default max_like4 = 100
default like4 = 0
default max_like5 = 100
default like5 = 0
default max_like6 = 100
default like6 = 0
default max_like7 = 100
default like7 = 0
default max_like8 = 100
default like8 = 0
default max_like9 = 100
default like9 = 0
default max_like10 = 100
default like10 = 0
default max_like11 = 100
default like11 = 0
default max_like12 = 100
default like12 = 0
default max_like13 = 100
default like13 = 0
default max_like14 = 100
default like14 = 0
default max_like15 = 100
default like15 = 0
default max_like16 = 100
default like16 = 0
default max_like17 = 100
default like17 = 0
default max_like18 = 100
default like18 = 0
init -50 python:
def LongNVLText(talker, text):
text = text.strip()
splittedText = []
maxPageLength = 34 # Max. number of chars per page
while (len(text) > maxPageLength):
foundBlankPosition = text.rfind(' ', 0, maxPageLength + 1)
if (foundBlankPosition < 0):
foundBlankPosition = maxPageLength + 1 # If no blank present then print all you get
subText = text[0:foundBlankPosition + 1]
splittedText.append(subText)
text = text[foundBlankPosition:].strip()
if (len(text) > 0):
splittedText.append(text) # Print all remaining text
totalTextPages = len(splittedText)
currentPage = 0
for printText in splittedText:
currentPage = currentPage + 1
if (len(printText) > 0): # Only print something if there is something to print
talker(printText)
if (currentPage < totalTextPages): # New page!
nvl_clear()
init:
$ door_pass = "42306"
init -1 python:
display_desc = ""
glossary_dict = \
{'Fina': 'My new friend since i was transferred yesterday, she seems good and friendly to me!',
'Tiffany': 'A friend of Fina, most likely they are little sisters. A clumsy and energetic.',
'Maddox': 'A science student teacher. He is extremely sensitive, cold, and aggresive. Possible a sibling from Fina and Tiffany',
'Mr.Snake': 'A talking dragon-snake-like. A librarian and a happy animal who loves reading books!'
}
define persistent.unlocked = []
# The game starts here.
label start:
#Defining the mail functions
$ mail = []
$ mail_queue = []
$ contacts = []
#Did the game beat the first part?
$ mp.beat_part_1 = False
#Defining the choices. Let the choice True?
$ go = False
$ dontgo = False
$ share = False
$ dontshare = False
#Defining the contacts (characters)
$ fina = Contact("Fina", "fina_draft")
define flashbulb = Fade(0.2, 0.0, 0.8, color='#fff')
scene bg classroomnoon 1
with flashbulb
$ persistent.unlock_1 = True
$ persistent.unlock_1 = False
show screen mailbox_overlay
"Wohoo! Finally class is over."
"Oh yeah, since the reporting is tomorrow, i gotta work out with Fina."
play sound "sfx/open door.ogg"
show f happy2 3
with moveinright
show screen unknown1
u "Hi!"
"This is Fina, we are classmates. I only met her since i was transferred in here since yesterday."
"Even i don't want to make friends, she is just too friendly."
"I hope someone won't talk harsh things to me."
$ persistent.unlocked.append('Fina')
$ renpy.notify("You unlocked a new glossary.")
hide screen unknown1
show screen finabar1
f "How are you?"
show f concerned 3 with dissolve
f "Oh! i forgot your name, what was it again?"
screen input(prompt):
window at truecenter: # --> you can change your input screen's window's position here
xmaximum 500
background Image("gui/nameinput.png") # --> You can change the solid color background with your own image
vbox:
xalign 0.5
yalign 0.5
text prompt style "input_prompt"
input id "input"
python:
name = renpy.input("What is your name?")
name = name.strip() or "Human"
show f happy 1 with dissolve
f "Oh yeah! it's [name], right?"
g "Yes, i thought you never forget such a thing!"
show f neko 1 with dissolve
f "Of course i don't!"
show f concerned 1 with dissolve
f "But hey, the reporting is tomorrow! we should finish it today!"
g "Oh yeah.."
f "Did you bring it?"
g "It's in my bag."
show f happy 1 with dissolve
f "I'll be laying in the floor, while you are finding the project."
hide f happy 1
with dissolve
g "Let me see.."
$ renpy.pause(3.0, hard=True)
g "Aha!"
scene black
with dissolve
g "There you go, at least it doesn't get wet or something."
f "Oho! thanks [name]!"
f "I hope we will get passed in the project!"
g "Yeah."
$ renpy.pause(3.0, hard=True)
g "Oh, Fina? do you need a pencil?"
f "Hmm?"
g "If you use a ballpen, and you will get a mistake.. You know."
f "Well okay!"
g "There, it's sharp. Be careful."
f "Nah! don't worry about me! i've been always using sharp pencil you know?"
g "I guess you do.."
$ renpy.pause(3.0, hard=True)
#Showing fina background helping with the player
scene finabg
with fade
$ persistent.unlock_26 = True
$ persistent.unlock_26 = False
f "Hmmmmmm..."
g "..."
f "Wait..!"
g "Hm?"
f "I guess you have been working this a whole day!"
g "Well.. yeah. Since i am bored, so yeah."
f "Ohoho! i really love energetic people!"
f "...."
$ renpy.pause(3.0, hard=True)
g "Ummmm.. Fina?"
scene finabg2
with dissolve
$ persistent.unlock_1 = True
$ persistent.unlock_1 = False
f "Hmhm?"
g "You misspelled Philippines.. Phillippines. It must be Philippines, remove the l, and stay both two p's."
f "Oooooohh! i made a mistake!"
scene finabg
with dissolve
f "Okay! i'll respelling it again!"
$ renpy.pause(3.0, hard=True)
scene bg classroomnoon 1
with dissolve
show f happy 1
with dissolve
g "i guess there is no time to do it right now?"
show f concerned 4 with dissolve
f "I should better do this in my dorm."
g "Oh, there are dorms in this school?"
show f happy2 2 with dissolve
f "Yeah! 4 of them, we used to live in here!"
g "As a school? cool!"
f "Exactly! if you want to live here, just tell us!"
g "Isn't supposed to be the owner of this school?"
show f happy2 3 with dissolve
f "WE are the ownerof this school!"
show f sidelook 2 with dissolve
f "Well, each of us. As owners."
show f happy2 1 with dissolve
f "If you want to live in here, there will be someone send you a message!"
f "It's just in top right corner of the screen!"
f "Here! take this!"
g "Whoa! it's.. heavy!"
show f happy 1 with dissolve
f "It's just a tablet! you can read or reply some people you've been texting to!"
g "Oh i see.."
f "Cool right? you can even talk some bots in there!"
show f sidelook 2 with dissolve
f "Since.. there is nothing to do.."
u "Fina!!" with sshake
show f concerned 4 with dissolve
f "Hm?"
t "Oww.."
transform slightright:
xalign 0.75
yalign 1.0
show t wow 3 at slightright
with moveinright
show screen unknown3
u "Fina! China wants to talk to you in her dorm! She had something to say!"
show f happy 2 with dissolve
f "Okay! See you later [name]!"
hide f happy 2
with moveoutright
hide screen finabar1
show t wow 2 at center
with move
show t happy 2 with dissolve
t "Oh! so you are [name], am i right?"
g "Yes.."
show t happy2 2 with dissolve
t "My name is Tiffany! friend of Fina, or.. Sister."
hide screen unknown3
show screen tiffanybar2
show t happy2 1 with dissolve
t "I am glad i met you!"
$ persistent.unlocked.append('Tiffany')
$ renpy.notify("You unlocked a new glossary.")
t "Sorry for distracting your time with Fina, she's been too busy when class id finished."
g "It's okay! im in free time too!"
show t closed 2 with dissolve
t "Well that's good!"
show t happy 3 with dissolve
t "Well if that's so, i gotta go and talk to my friends!"
g "Okay, see you later."
show t happy2 3 with dissolve
t "Byebye!"
hide t happy2 3 with dissolve
$ renpy.pause(2.0, hard=True)
hide screen tiffanybar2
t "Owwie!" with sshake
g "Are you okay?"
t "Yup! i am always like this!"
g "Oookay. Be careful next time!"
t "Of course!"
$ renpy.pause(2.0, hard=True)
t "Awawa!" with sshake
g "Sigh.."
t "D-Don't worry! Hehe!"
play sound "sfx/close door.ogg"
$ renpy.pause (1.0, hard=True)
g "I should head outside and sit on that bench."
scene bg hallwaynoon 1
with wipeleft
$ persistent.unlock_25 = True
$ persistent.unlock_25 = False
g "..."
$ renpy.pause (1.0, hard=True)
$ renpy.notify("You got a new message in the top right corner!")
$ add_message("New Message!!", "Notebook Bot", "Hello! i am the notebook. You are just decided to stay in Dorm #3! You are matched with 1 guy, and 2 girls with doubledecked bed. And most of all, have fun in the Friendly elementary school!")
g "Haaaa.. so tired!"
if check("New Message!!"):
g "Oh? am i decided in the Dorm #3? so Fina really telling me this!"
g "I should ask the OWNERS or some sort like that."
g "I should take a nap before asking them."
jump normalgame1
else:
g "Hmmm.. guess i should take a nap for a while."
jump normalgame1
label normalgame1:
$ renpy.pause (1.0, hard=True)
g "Hmm.. im not really sleepy right now."
show m normal 1 with dissolve
show screen unknown5
u "Hey."
g "?"
u "Im talking to you."
g "Oh.. hi?"
show m normal2 1 with dissolve
u "Almost forgot, my name is Maddox Summer. A science teacher."
$ persistent.unlocked.append('Maddox')
$ renpy.notify("You unlocked a new glossary.")
hide screen unknown5
show screen maddoxbar2
g "Hi Maddox!"
m "What about you?"
g "Im [name], i am just transferred in here since yesterday!"
show m normal 2 with dissolve
m "Hi, [name]. I am glad to meet you."
g "Sure! i just want to meet new people in here."
show m happy 2 with dissolve
m "Heh. Im sure there are more people in this school."
show m normal 3 with dissolve
m "So, what are you doing in here anyway?"
g "Just sitting in this bench, got nothin to do.."
show m normal2 3 with dissolve
m "Oh, by the way. Sorry for wasting your time."
scene black
m "Since you are bored, wanna come with me in the library?"
menu:
t "..."
"Go":
jump go
"Don't go":
jump dontgo
label go:
$ go = True
g "Well.. sure! i want to hang out with you!"
show m happy 1 with dissolve
m "Thanks, i'll treat with you later on."
show m normal 1 with dissolve
m "..."
m "Seriously, let's go."
hide m normal 1
with moveoutright
hide screen maddoxbar2
scene bg staircaseupnoon 1
with wipeleft
$ persistent.unlock_28 = True
$ persistent.unlock_28 = False
show m happy 3 at center
with moveinleft
show screen maddoxbar2
m "Just upstairs."
m "Don't worry, as i said. Not that far."
hide m happy 3 at center
with dissolve
hide screen maddoxbar2
scene bg hallwaynoon 3
with wipeleft
$ persistent.unlock_27 = True
$ persistent.unlock_27 = False
scene bg librarynoon 1
with wipeleft
$ persistent.unlock_29 = True
$ persistent.unlock_29 = False
show m normal 1 at center
with moveinleft
show screen maddoxbar2
m "Here we are. Library."
"When i looked around in this room, there are no more people sitting or reading some books."
"The shelves are full of books, not even a single hole into it."
g "So.. uhh.. what should we do?"
show m normal2 1 with dissolve
m "Hmm. Just take a seat, i'll get some books for you."
g "Okay."
hide m normal2 1
with dissolve
hide screen maddoxbar2
$ renpy.pause (2.0, hard=True)
"When two minutes later.."
$ renpy.notify("You got a new message in the top right corner!")
$ add_message("You gotta read this!", "Notebook Bot", "Hello again [name]! looks like you've been meeting a science teacher am i right? Don't tell me i know! i am just a bot! Later, i'll start asking for my name! TTYL!")
if check("You gotta read this!"):
g "Another text from a bot.. i should give it a name later.."
g "I am glad that i have a another friend bot! I dunno.."
jump normalgame2
else:
g "I should probably continue on waiting for Maddox.."
jump normalgame2
label normalgame2:
m "Hey, how many books do you want to read?"
g "Just.. two. That's enough to read."
m "Well okay."
$ renpy.pause (2.0, hard=True)
show m normal 1
with dissolve
show screen maddoxbar2
m "Here."
g "Thank you!"
show m normal 3 with dissolve
m "By the way, i haven't introduced my librarian yet."
show m normal2 3 with dissolve
m "Mr.Snake!!"
show s happy 1 at right
with moveinright
show screen mrsnakebar2
s "Hooohoo!"
show m ins 1 with dissolve
m "Hey, could you give us some MORE books please?"
s "Yeah sure!!"
show s happy2 1 with dissolve
s "Oh! i never seen this student before! Are you new here?"
g "Yes! i transferred here since yesterday."
s "Oooh! Im Mr.Snake! a librarian in this school!"
$ persistent.unlocked.append('Mr.Snake')
$ renpy.notify("You unlocked a new glossary.")
g "Nice to meet you!"
s "I'll be right back for the books!"
hide s happy2 1
with moveoutright
hide screen mrsnakebar2
show m normal2 2 with dissolve
m "Hey [name]."
g "Hmm?"
m "Are you even interested in books?"
g "Yeah, sometimes, I do love science and arts also!"
show m happy 2 with dissolve
m "That's cool."
m "You will be more talented if you work harder."
m "Just like me, i will take classes sometimes."
m "Of course, i am a scientist either. I do love making thing i wanted."
show m normal 2 with dissolve
m "But the only one thing i angry about is, people making favor from me."
g "Oh.. i see."
m "That is why i am always being alone making some things in the science lab."
show s happy2 1 at right
with moveinright
show screen mrsnakebar2
s "Im back!"
s "There you go! The books you wanted!"
show m normal 3 with dissolve
m "Thanks."
show s happy 1 with dissolve
s "Oh! Right! I gotta continue to work, have fun you two!"
s "Later [name]!"
hide screen mrsnakebar2
show m normal2 3 with dissolve
m "So uh, wanna share a book with me?"
menu:
m "if you don't, you can get one from me."
"Share with him":
jump share
"Don't share":
jump dontshare
label share:
$ share = True
g "i would love to!"
show m happy 1 with dissolve
m "Well, okay. I'll go seat down first."
hide m happy 1
with dissolve
#Pretending showing the event cg of maddox holding a book for the player.
m "Here, there is some extra lessons on it."
g "Oh thanks."
#Still a pic of maddox putting his hand down to read
m "Have fun, i'll be reading now."
#A still pic of maddox his eyes down on book.
g "..."
$ renpy.pause (2.0, hard-True)
g "Umm.. Maddox?"
m "Hmm? What is it?"
g "Why this writings is too very familiar? You wrote this right?"
m "Well of course. I made all of this if i ever blowed your mind."
g "Of course i do! I just took a guess."
m "Hm. Just have fun reading."
$ renpy.pause (2.0, hard-True)
scene black
with dissolve
"As soon i continued on reading, i was interested on Maddox's lessons and his writings."
"When the time is already 4:23 pm, i was thinking if i will go home or instead, i'll just stay here."
"I wonder how did they eat for 3 times a day. Maybe there is some sort kind of a kitchen who ever cooks it."
scene bg librarynoon 1
with dissolve
g "Maddox?"
show m happy 1 at center
with dissolve
$ persistent.completed = True
$ renpy.quit()
Code: Select all
################################################################################
## Initialization
################################################################################
## The init offset statement causes the initialization statements in this file
## to run before init statements in any other file.
init offset = -2
## Calling gui.init resets the styles to sensible default values, and sets the
## width and height of the game.
init python:
gui.init(1920, 1080)
################################################################################
## GUI Configuration Variables
################################################################################
## Colors ######################################################################
##
## The colors of text in the interface.
## An accent color used throughout the interface to label and highlight text.
define gui.accent_color = '#000000'
## The color used for a text button when it is neither selected nor hovered.
define gui.idle_color = '#aaaaaa'
## The small color is used for small text, which needs to be brighter/darker to
## achieve the same effect.
define gui.idle_small_color = '#888888'
## The color that is used for buttons and bars that are hovered.
define gui.hover_color = '#000000'
## The color used for a text button when it is selected but not focused. A
## button is selected if it is the current screen or preference value.
define gui.selected_color = '#555555'
## The color used for a text button when it cannot be selected.
define gui.insensitive_color = '#aaaaaa7f'
## Colors used for the portions of bars that are not filled in. These are not
## used directly, but are used when re-generating bar image files.
define gui.muted_color = '#666666'
define gui.hover_muted_color = '#999999'
## The colors used for dialogue and menu choice text.
define gui.text_color = '#404040'
define gui.interface_text_color = '#404040'
## Fonts and Font Sizes ########################################################
## The font used for in-game text.
define gui.text_font = "DejaVuSans.ttf"
## The font used for character names.
define gui.name_text_font = "DejaVuSans.ttf"
## The font used for out-of-game text.
define gui.interface_text_font = "DejaVuSans.ttf"
## The size of normal dialogue text.
define gui.text_size = 33
## The size of character names.
define gui.name_text_size = 45
## The size of text in the game's user interface.
define gui.interface_text_size = 33
## The size of labels in the game's user interface.
define gui.label_text_size = 36
## The size of text on the notify screen.
define gui.notify_text_size = 24
## The size of the game's title.
define gui.title_text_size = 75
## Main and Game Menus #########################################################
## The images used for the main and game menus.
define gui.main_menu_background = "gui/main_menu.png"
define gui.game_menu_background = "gui/game_menu.png"
## Dialogue ####################################################################
##
## These variables control how dialogue is displayed on the screen one line at a
## time.
## The height of the textbox containing dialogue.
define gui.textbox_height = 278
## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is
## center, and 1.0 is the bottom.
define gui.textbox_yalign = 1.0
## The placement of the speaking character's name, relative to the textbox.
## These can be a whole number of pixels from the left or top, or 0.5 to center.
define gui.name_xpos = 360
define gui.name_ypos = 0
## The horizontal alignment of the character's name. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.name_xalign = 0.0
## The width, height, and borders of the box containing the character's name, or
## None to automatically size it.
define gui.namebox_width = None
define gui.namebox_height = None
## The borders of the box containing the character's name, in left, top, right,
## bottom order.
define gui.namebox_borders = Borders(5, 5, 5, 5)
## If True, the background of the namebox will be tiled, if False, the
## background of the namebox will be scaled.
define gui.namebox_tile = False
## The placement of dialogue relative to the textbox. These can be a whole
## number of pixels relative to the left or top side of the textbox, or 0.5 to
## center.
define gui.dialogue_xpos = 402
define gui.dialogue_ypos = 75
## The maximum width of dialogue text, in pixels.
define gui.dialogue_width = 1116
## The horizontal alignment of the dialogue text. This can be 0.0 for left-
## aligned, 0.5 for centered, and 1.0 for right-aligned.
define gui.dialogue_text_xalign = 0.0
## Buttons #####################################################################
##
## These variables, along with the image files in gui/button, control aspects of
## how buttons are displayed.
## The width and height of a button, in pixels. If None, Ren'Py computes a size.
define gui.button_width = None
define gui.button_height = None
## The borders on each side of the button, in left, top, right, bottom order.
define gui.button_borders = Borders(6, 6, 6, 6)
## If True, the background image will be tiled. If False, the background image
## will be linearly scaled.
define gui.button_tile = False
## The font used by the button.
define gui.button_text_font = gui.interface_text_font
## The size of the text used by the button.
define gui.button_text_size = gui.interface_text_size
## The color of button text in various states.
define gui.button_text_idle_color = gui.idle_color
define gui.button_text_hover_color = gui.hover_color
define gui.button_text_selected_color = gui.selected_color
define gui.button_text_insensitive_color = gui.insensitive_color
## The horizontal alignment of the button text. (0.0 is left, 0.5 is center, 1.0
## is right).
define gui.button_text_xalign = 0.0
## These variables override settings for different kinds of buttons. Please see
## the gui documentation for the kinds of buttons available, and what each is
## used for.
##
## These customizations are used by the default interface:
define gui.radio_button_borders = Borders(27, 6, 6, 6)
define gui.check_button_borders = Borders(27, 6, 6, 6)
define gui.confirm_button_text_xalign = 0.5
define gui.page_button_borders = Borders(15, 6, 15, 6)
define gui.quick_button_borders = Borders(15, 6, 15, 0)
define gui.quick_button_text_size = 21
define gui.quick_button_text_idle_color = gui.idle_small_color
define gui.quick_button_text_selected_color = gui.accent_color
## You can also add your own customizations, by adding properly-named variables.
## For example, you can uncomment the following line to set the width of a
## navigation button.
# define gui.navigation_button_width = 250
## Choice Buttons ##############################################################
##
## Choice buttons are used in the in-game menus.
define gui.choice_button_width = 1185
define gui.choice_button_height = None
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(150, 8, 150, 8)
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.5
define gui.choice_button_text_idle_color = "#cccccc"
define gui.choice_button_text_hover_color = "#ffffff"
define gui.choice_button_text_insensitive_color = "#444444"
## File Slot Buttons ###########################################################
##
## A file slot button is a special kind of button. It contains a thumbnail
## image, and text describing the contents of the save slot. A save slot uses
## image files in gui/button, like the other kinds of buttons.
## The save slot button.
define gui.slot_button_width = 414
define gui.slot_button_height = 309
define gui.slot_button_borders = Borders(15, 15, 15, 15)
define gui.slot_button_text_size = 21
define gui.slot_button_text_xalign = 0.5
define gui.slot_button_text_idle_color = gui.idle_small_color
define gui.slot_button_text_selected_idle_color = gui.selected_color
define gui.slot_button_text_selected_hover_color = gui.hover_color
## The width and height of thumbnails used by the save slots.
define config.thumbnail_width = 384
define config.thumbnail_height = 216
## The number of columns and rows in the grid of save slots.
define gui.file_slot_cols = 3
define gui.file_slot_rows = 2
## Positioning and Spacing #####################################################
##
## These variables control the positioning and spacing of various user interface
## elements.
## The position of the left side of the navigation buttons, relative to the left
## side of the screen.
define gui.navigation_xpos = 60
## The vertical position of the skip indicator.
define gui.skip_ypos = 15
## The vertical position of the notify screen.
define gui.notify_ypos = 68
## The spacing between menu choices.
define gui.choice_spacing = 33
## Buttons in the navigation section of the main and game menus.
define gui.navigation_spacing = 6
## Controls the amount of spacing between preferences.
define gui.pref_spacing = 15
## Controls the amount of spacing between preference buttons.
define gui.pref_button_spacing = 0
## The spacing between file page buttons.
define gui.page_spacing = 0
## The spacing between file slots.
define gui.slot_spacing = 15
## The position of the main menu text.
define gui.main_menu_text_xalign = 1.0
## Frames ######################################################################
##
## These variables control the look of frames that can contain user interface
## components when an overlay or window is not present.
## Generic frames.
define gui.frame_borders = Borders(6, 6, 6, 6)
## The frame that is used as part of the confirm screen.
define gui.confirm_frame_borders = Borders(60, 60, 60, 60)
## The frame that is used as part of the skip screen.
define gui.skip_frame_borders = Borders(24, 8, 75, 8)
## The frame that is used as part of the notify screen.
define gui.notify_frame_borders = Borders(24, 8, 60, 8)
## Should frame backgrounds be tiled?
define gui.frame_tile = False
## Bars, Scrollbars, and Sliders ###############################################
##
## These control the look and size of bars, scrollbars, and sliders.
##
## The default GUI only uses sliders and vertical scrollbars. All of the other
## bars are only used in creator-written screens.
## The height of horizontal bars, scrollbars, and sliders. The width of vertical
## bars, scrollbars, and sliders.
define gui.bar_size = 38
define gui.scrollbar_size = 18
define gui.slider_size = 38
## True if bar images should be tiled. False if they should be linearly scaled.
define gui.bar_tile = False
define gui.scrollbar_tile = False
define gui.slider_tile = False
## Horizontal borders.
define gui.bar_borders = Borders(6, 6, 6, 6)
define gui.scrollbar_borders = Borders(6, 6, 6, 6)
define gui.slider_borders = Borders(6, 6, 6, 6)
## Vertical borders.
define gui.vbar_borders = Borders(6, 6, 6, 6)
define gui.vscrollbar_borders = Borders(6, 6, 6, 6)
define gui.vslider_borders = Borders(6, 6, 6, 6)
## What to do with unscrollable scrollbars in the gui. "hide" hides them, while
## None shows them.
define gui.unscrollable = "hide"
## History #####################################################################
##
## The history screen displays dialogue that the player has already dismissed.
## The number of blocks of dialogue history Ren'Py will keep.
define config.history_length = 250
## The height of a history screen entry, or None to make the height variable at
## the cost of performance.
define gui.history_height = 210
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.history_name_xpos = 233
define gui.history_name_ypos = 0
define gui.history_name_width = 233
define gui.history_name_xalign = 1.0
## The position, width, and alignment of the dialogue text.
define gui.history_text_xpos = 255
define gui.history_text_ypos = 3
define gui.history_text_width = 1110
define gui.history_text_xalign = 0.0
## NVL-Mode ####################################################################
##
## The NVL-mode screen displays the dialogue spoken by NVL-mode characters.
## The borders of the background of the NVL-mode background window.
define gui.nvl_borders = Borders(0, 15, 0, 30)
## The maximum number of NVL-mode entries Ren'Py will display. When more entries
## than this are to be show, the oldest entry will be removed.
define gui.nvl_list_length = 6
## The height of an NVL-mode entry. Set this to None to have the entries
## dynamically adjust height.
define gui.nvl_height = 173
## The spacing between NVL-mode entries when gui.nvl_height is None, and between
## NVL-mode entries and an NVL-mode menu.
define gui.nvl_spacing = 15
## The position, width, and alignment of the label giving the name of the
## speaking character.
define gui.nvl_name_xpos = 645
define gui.nvl_name_ypos = 0
define gui.nvl_name_width = 225
define gui.nvl_name_xalign = 1.0
## The position, width, and alignment of the dialogue text.
define gui.nvl_text_xpos = 675
define gui.nvl_text_ypos = 12
define gui.nvl_text_width = 885
define gui.nvl_text_xalign = 0.0
## The position, width, and alignment of nvl_thought text (the text said by the
## nvl_narrator character.)
define gui.nvl_thought_xpos = 360
define gui.nvl_thought_ypos = 0
define gui.nvl_thought_width = 1170
define gui.nvl_thought_xalign = 0.0
## The position of nvl menu_buttons.
define gui.nvl_button_xpos = 675
define gui.nvl_button_xalign = 0.0
## Localization ################################################################
## This controls where a line break is permitted. The default is suitable
## for most languages. A list of available values can be found at https://
## www.renpy.org/doc/html/style_properties.html#style-property-language
define gui.language = "unicode"
################################################################################
## Mobile devices
################################################################################
init python:
## This increases the size of the quick buttons to make them easier to touch
## on tablets and phones.
if renpy.variant("touch"):
gui.quick_button_borders = Borders(60, 21, 60, 0)
## This changes the size and spacing of various GUI elements to ensure they
## are easily visible on phones.
if renpy.variant("small"):
## Font sizes.
gui.text_size = 45
gui.name_text_size = 54
gui.notify_text_size = 38
gui.interface_text_size = 45
gui.button_text_size = 45
gui.label_text_size = 51
## Adjust the location of the textbox.
gui.textbox_height = 360
gui.name_xpos = 120
gui.text_xpos = 135
gui.text_width = 1650
## Change the size and spacing of various things.
gui.slider_size = 54
gui.choice_button_width = 1860
gui.navigation_spacing = 30
gui.pref_button_spacing = 15
gui.history_height = 285
gui.history_text_width = 1035
gui.quick_button_text_size = 30
## File button layout.
gui.file_slot_cols = 2
gui.file_slot_rows = 2
## NVL-mode.
gui.nvl_height = 255
gui.nvl_name_width = 458
gui.nvl_name_xpos = 488
gui.nvl_text_width = 1373
gui.nvl_text_xpos = 518
gui.nvl_text_ypos = 8
gui.nvl_thought_width = 1860
gui.nvl_thought_xpos = 30
gui.nvl_button_width = 1860
gui.nvl_button_xpos = 30
Or maybe it will work if i use the older code like screens, options and gui?