Как открыть галерею в renpy играх
This page is out of date
Some places to look are:
Please do not create new links to this page.
Галерея Изображений и Музыкальная Комната
Данная статья является переводом документации Image Gallery and Music Room Actions.
Галерея изображений (ГИ)
ГИ управляются экземплярами класса Gallery. Каждый экземпляр класса может быть использован для нескольких экранов ГИ.
ГИ имеет одну или более кнопок, связанных с ней, кнопка имеет одно или более связанных с ней изображений, и каждое изображение имеет одну или более картинок (displayable), связанных с ним. Для кнопок и изображений могут быть назначены условия. Кнопка считается разблокированной, когда все назначенные для нее условия выполнены, и разблокировано хотя бы одно изображение, связанное с ней. Изображение считается разблокированным, когда все назначенные для него условия выполнены.
Создание ГИ происходит в четыре этапа.
1. Создание экземпляра класса Gallery.
2. Добавление кнопок и изображений в галерею, равно как и условий, определяющих будут ли кнопки и связанные с ними изображения считаться разблокированными. Этот процесс также состоит из нескольких этапов.
1. Объявление новой кнопки, путем вызова Gallery.button(). 2. По желанию, назначение кнопке одного или более условий для разблокирования, путем вызова Gallery.unlock(), Gallery.condition(), или Gallery.allprior(). 3. Объявление картинки, путем вызова Gallery.image() с одной или несколькими картинками в качестве аргумента. Или вызова более удобного метода Gallery.unlock_image(). 4. По желанию, вызов Gallery.transform() для установки трансформаций, применяемых к каждой картинке. 5. По желанию, добавление одного или более условий, при выполнении которых изображение будет считаться разблокированным, путем вызова Gallery.unlock(),Gallery.condition(), или Gallery.allprior(). Дополнительные изображения могут быть добавлены к кнопке путем повторения этапов 3-5, а дополнительные кнопки – путем повторения всех пяти этапов.
3. Создание экрана галереи. Экран должен иметь фоновую картинку и какие-нибудь кнопки навигации, которые позволят пользователю посмотреть другие галереи или вернуться в главное либо дополнительное меню. 4. Добавление в главное либо дополнительное меню кода для показа экрана галереи на дисплее.
Далее пример первых трех этапов:
Этап 4 варьируется в зависимости от того, как структурирована ваша игра, один из вариантов – добавить следующую строку:
в код экрана главного меню.
class Gallery(self)
Этот класс предоставляет возможность создавать ГИ, обслуживая блокировку изображений, предоставляя действие, которое может показать одно или более изображений, и предоставляя метод, который создает кнопки, использующие это действие. transition Перемещение (transition), которое используется при смене изображений. locked_button Картинка, используемая make_button по умолчанию для заблокированных кнопок. hover_border Активная рамка, которую по умолчанию использует make_button. idle_border Неактивная рамка, которую по умолчанию использует make_button. Action(name) Действие, которое показывает изображения, связанные с указанной кнопкой. allprior(self) Условие, которое считается выполненным, если были разблокированы все предыдущие изображения, связанные с данной кнопкой. button(name) Создает новую кнопку с названием name. name Название создаваемой кнопки. condition(expression) Условие, которое считается выполненным, если выражение (expression) имеет значение Истина (True). expression Строка – выражение на языке python. display(*displayables) Добавляет в текущую кнопку новое изображение, содержащее одну или более картинку (displayables). image(*displayables) Добавляет в текущую кнопку новое изображение, содержащее одну или более картинку (displayables). make_button(name, unlocked, locked=None, hover_border=None, idle_border=None, **properties) Создает кнопку, которая показывает изображения, связанные с данным названием кнопки. name Название создаваемой кнопки. unlocked Картинка, которая отображается, когда кнопка разблокирована. locked Картинка, которая отображается, когда кнопка заблокирована. Если не задано, то вместо нее используется поле locked_button объекта галереи. hover_border Картинка, которая отображается поверх разблокированной кнопки, когда на нее наведен курсор. Если не задано, то используется поле hover_border объекта галереи. idle_border Картинка, которая отображается поверх разблокированной кнопки, когда на нее не наведен курсор. Если не задано, то используется поле idle_border объекта галереи. Дополнительные ключевые аргументы становятся параметрами стиля создаваемого объекта кнопки. transform(*transforms) Применяет трансформации (transforms) к последнему зарегистрированному изображению. Должен вызываться с тем же количеством трансформаций, сколько картинок связано с изображением. Трансформации применяются к соответствующим картинкам. Если трансформация не задана, то используется трансформация по умолчанию. unlock(*images) Условие, которое содержит одно или более названия изображений и считается выполненным, если игрок видел все названные изображения. Названия изображений должны быть заданы в строковом формате (as strings). unlock_image(*images) Удобный метод, который является эквивалентом вызова image и unlock с одинаковыми параметрами. Он позволяет показать изображение, если оно уже было увидено ранее. (images) должно быть определено в строковом формате, задавая названия изображений.
Музыкальная Комната (МК)
МК – это экран, который позволяет пользователю выбрать и воспроизвести музыкальные треки из игры. Изначально, эти треки могут быть заблокированы, когда игрок впервые начинает прохождение игры, и будут разблокированы по мере того, как пользователь прослушивает музыку в процессе игры.
МК управляется экземпляром класса MusicRoom. В игре может быть больше одного экземпляра MusicRoom, что позволяет сделать несколько МК. Создание МК состоит из следующих шагов:
1. Создание экземпляра MusicRoom. В конструкторе MusicRoom задаются параметры, определяющие канал, в котором будет проигрываться музыка, и длительность усиления / затухания музыки. 2. Добавление музыкальных файлов в этот экземпляр. 3. Создание экрана, который использует этот экземпляр MusicRoom для создания действий (action) для кнопок (button), графических кнопок (imagebutton) и активных зон (hotspot). Этими действиями могут быть выбор трека, следующий / предыдущий трек, или остановка и воспроизведение музыки. Заметим, что используемые действия являются элементами экземпляра MusicRoom, так что если экземпляр MusicRoom был назван mr, то использование действия «воспроизвести» будет выглядеть так – mr.Play(“track1.ogg”). 4. Добавим экран МК в главное или дополнительное меню.
Вот пример первых трех шагов:
Шаг 4 будет варьироваться в зависимости от того как структурирована ваша игра, один из вариантов – это добавление следующей строки кода
в экран главного меню.
Используя функцию Preferences(), а именно Preferences(«music volume»), можно добавить на экран МК ползунок громкости.
class MusicRoom(channel=’music’, fadeout=0.0, fadein=0.0)
Музыкальная комната, содержащая наборы песен, которые могут быть разблокированы пользователем, и действия для их последовательного воспроизведения. channel Канал, который будет использовать МК. fadeout Время (в секундах), в течение которого будет происходить затухание текущей мелодии при смене трека. fadein Время (в секундах), в течение которого будет происходить усиление звука новой мелодии при смене трека. Next(self) Действие МК, которое приводит к воспроизведению следующего разблокированного трека в списке воспроизведения. Play(filename=None) Воспроизведение музыки. Если задано название файла (filename), то начинается его воспроизведение. В противном случае, воспроизведение текущего музыкального файла начинается заново (если он разблокирован), или начинается воспроизведение первого файла. Если задано название файла (filename), то кнопки, содержащие данное действие, будут неактивны, если данный файл заблокирован, и будут отображаться как выбранные во время воспроизведения файла. Previous(self) Действие, которое воспроизводит предыдущий разблокированный файл в списке воспроизведения. Stop(self) Останавливает музыку. add(filename, always_unlocked=False) Добавляет названия файлов музыки в МК. Данные файлы будут воспроизводиться в том порядке, в каком они добавлены (при условии, что они разблокированы). always_unlocked Если значение Истина (True), то файл будет постоянно разблокирован. Это позволяет показать музыкальный файл в МК до того как он был воспроизведен в игре. is_unlocked(filename) Возвращает значение Истина (True), если файл был разблокирован (или разблокирован всегда) и Ложь (False), если файл все еще заблокирован.
Как открыть галерею в renpy играх
Создание комнат Галереи (Gallery)
Как бонус, в визуальных новеллах бывает комната, где расположены примечательный спрайты/фоны/cg-арты. Именуют её «Галерея». Она может состоять как из одной комнаты, так и из бесконечного множества. Комнаты могут быть все совершенно разные. Изначально, изображения в галереи делают закрытой, а открывать их нужно по ходу прохождения сюжета, при выполнении определённых условий.
Для создания галереи нам необходимо:
1. Спрайты/Фоны/CG которые вы и хотите поместить в галерею.
2. Фон для галереи.
3. Уменьшенная версия Спрайтов/Фонов/CG, то бишь превью. Желательно с соотношением вашей вн, но гораздо меньше по разрешению. В примерах новелла разрешением 800х600, превью я сделал 200х150.
4. Изображение, которое будет находится на месте ещё закрытых спрайтов/фонов/cg. Разрешение должно быть то же, что и у превью.
Для начала создадим объект класса «Gallery «
. #Так же делаем и остальные кнопки
g.button(«sp2»)
if persistent.sp2==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp2.png»)
g.button(«sp3»)
if persistent.sp3==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp3.png»)
g.button(«sp4»)
if persistent.sp4==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp4.png»)
g.button(«sp5»)
if persistent.sp5==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp5.png»)
g.button(«sp6»)
if persistent.sp6==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp6.png»)
#P.S. кнопок можно создавать сколь угодно, и называть их кой угодно.
#P.S.S. Фон для спрайта должен быть того же разрешения, что и вн.
#После того, как мы зарегистрировали кнопки, необходимо оформить сам screen.
tag main_menu #. Если не вписать данную строку, то тогда будет невозможным выход из галереи в главное меню.
#Если tag main_menu работать не будет, переименуйте в tag menu
add g.make_button(«sp2», «galer/sp/prev/sp2o.png», locked=»galer/lock.png», xalign=0.5, yalign=0.25)
add g.make_button(«sp3», «galer/sp/prev/sp3o.png», locked=»galer/lock.png», xalign=0.9, yalign=0.25)
add g.make_button(«sp4», «galer/sp/prev/sp4o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.65)
add g.make_button(«sp4», «galer/sp/prev/sp4o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.65)
add g.make_button(«sp4», «galer/sp/prev/sp4o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.65)
Если у вас меню с ImageMap, тогда пишем следующее.


g.button(«sp2»)
if persistent.sp2==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp2.png»)
g.button(«sp3»)
if persistent.sp3==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp3.png»)
g.button(«sp4»)
if persistent.sp4==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp4.png»)
g.button(«sp5»)
if persistent.sp5==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp5.png»)
g.button(«sp6»)
if persistent.sp6==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp6.png»)
tag main_menu #. Или tag menu
add «galer/background_g.png»
textbutton «Главное меню» action ShowMenu(«main_menu») xalign 0.1 yalign 0.99 #Создаем кнопку возвращения в главное меню.
textbutton «Дальше» action ShowMenu(«gallery2» xalign 0.9 yalign 0.99
#Кнопка навигации, для перехода к следующей комнате со спрайтами.
textbutton «Арты» action ShowMenu(«art1») xalign 0.5 yalign 0.99
#Кнопка навигации, для перехода к комнате с артами.
add g.make_button(«sp1», «galer/sp/prev/sp1o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.25)
add g.make_button(«sp2», «galer/sp/prev/sp2o.png», locked=»galer/lock.png», xalign=0.5, yalign=0.25)
add g.make_button(«sp3», «galer/sp/prev/sp3o.png», locked=»galer/lock.png», xalign=0.9, yalign=0.25)
add g.make_button(«sp4», «galer/sp/prev/sp4o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.65)
add g.make_button(«sp5», «galer/sp/prev/sp5o.png», locked=»galer/lock.png», xalign=0.5, yalign=0.65)
add g.make_button(«sp6», «galer/sp/prev/sp6o.png», locked=»galer/lock.png», xalign=0.9, yalign=0.65)
screen gallery2: #создание второй комнаты с 4 спрайтами.
python:
g.button(«sp7»)
if persistent.sp7==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp7.png»)
g.button(«sp8»)
if persistent.sp8==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp8.png»)
g.button(«sp9»)
if persistent.sp9==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp9.png»)
g.button(«sp10»);
if persistent.sp10==»yes»:
g.image(«galer/sp/fong.png», «galer/sp/sp10.png»)
tag main_menu
add «galer/background_g.png»
add g.make_button(«sp7», «galer/sp/prev/sp7o.png», locked=»galer/lock.png», xalign=0.3, yalign=0.25)
add g.make_button(«sp8», «galer/sp/prev/sp8o.png», locked=»galer/lock.png», xalign=0.7, yalign=0.25)
add g.make_button(«sp9», «galer/sp/prev/sp9o.png», locked=»galer/lock.png», xalign=0.3, yalign=0.65)
add g.make_button(«sp10», «galer/sp/prev/sp10o.png», locked=»galer/lock.png», xalign=0.7, yalign=0.65)
textbutton «Главное меню» action ShowMenu(«main_menu») xalign 0.1 yalign 0.99
textbutton «Назад» action ShowMenu(«gallery») xalign 0.9 yalign 0.99
textbutton «Арты» action ShowMenu(«art1») xalign 0.5 yalign 0.99
screen art1: #Создание комнаты с 6 артами.
python:
g.button(«ar1»)
if persistent.ar1==»yes»:
g.image(«galer/cg/izo1.png») #. Указано одно изображение, ибо фон для артов не нужен
g.button(«ar2»)
if persistent.ar2==»yes»:
g.image(«galer/cg/izo2.png»)
g.button(«ar3»)
if persistent.ar3==»yes»:
g.image(«galer/cg/izo3.png»)
g.button(«ar4»)
if persistent.ar4==»yes»:
g.image(«galer/cg/izo4.png»)
g.button(«ar5»)
if persistent.ar5==»yes»:
g.image(«galer/cg/izo5.png»)
g.button(«ar6»)
if persistent.ar6==»yes»:
g.image(«galer/cg/izo6.png»)
add «galer/background_g.png» #Фон для данной комнаты
add g.make_button(«ar1», «galer/cg/prev/izo1o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.25)
add g.make_button(«ar2», «galer/cg/prev/izo2o.png», locked=»galer/lock.png», xalign=0.5, yalign=0.25)
add g.make_button(«ar3», «galer/cg/prev/izo3o.png», locked=»galer/lock.png», xalign=0.9, yalign=0.25)
add g.make_button(«ar4», «galer/cg/prev/izo4o.png», locked=»galer/lock.png», xalign=0.1, yalign=0.65)
add g.make_button(«ar5», «galer/cg/prev/izo5o.png», locked=»galer/lock.png», xalign=0.5, yalign=0.65)
add g.make_button(«ar6», «galer/cg/prev/izo6o.png», locked=»galer/lock.png», xalign=0.9, yalign=0.65)
#Кнопки для навигации
textbutton «Главное меню» action ShowMenu(«main_menu») xalign 0.1 yalign 0.99
textbutton «Дальше» action ShowMenu(«art2») xalign 0.9 yalign 0.99
textbutton «Спрайты» action ShowMenu(«gallery») xalign 0.5 yalign 0.99
screen art2: #Создание комнаты с 4-мя артами.
python:
g.button(«ar7»)
if persistent.ar7==»yes»:
g.image(«galer/cg/izo7.png»)
g.button(«ar8»)
if persistent.ar8==»yes»:
g.image(«galer/cg/izo8.png»)
g.button(«ar9»)
if persistent.ar9==»yes»:
g.image(«galer/cg/izo9.png»)
g.button(«ar10»)
if persistent.ar10==»yes»:
g.image(«galer/cg/izo10.png»)
add g.make_button(«ar7», «galer/cg/prev/izo7o.png», locked=»galer/lock.png», xalign=0.3, yalign=0.25)
add g.make_button(«ar8», «galer/cg/prev/izo8o.png», locked=»galer/lock.png», xalign=0.7, yalign=0.25)
add g.make_button(«ar9», «galer/cg/prev/izo9o.png», locked=»galer/lock.png», xalign=0.3, yalign=0.65)
add g.make_button(«ar10», «galer/cg/prev/izo10o.png», locked=»galer/lock.png», xalign=0.7, yalign=0.65)
textbutton «Главное меню» action ShowMenu(«main_menu») xalign 0.1 yalign 0.99
textbutton «Назад» action ShowMenu(«art1») xalign 0.9 yalign 0.99
textbutton «Спрайты» action ShowMenu(«gallery») xalign 0.5 yalign 0.99





На этом всё не ограничивается. Делайте свои необычные и занимательные галереи.
Image Gallery, Music Room, and Replay Actions link
Image Gallery link
A image gallery is a screen that allows the player to unlock images, and then view those images. The screen has one or more buttons associated with it, and each button has one or more associated images. Buttons and images also have conditions that determine if they have unlocked.
Image galleries are managed by instances of the Gallery class. A single instance of the gallery class may be shared between multiple image gallery screens.
A gallery has one or more buttons associated with it, a button has one or more images associated with it, and each image has one or more displayables associated with it. Conditions can be assigned to buttons and images. A button is unlocked when all of the conditions associated with it are satisfied and at least one image associated with that button is unlocked. An image is unlocked when all associated conditions are satisfied.
Creating an image gallery consists of the following four steps.
Create an instance of Gallery.
Add buttons and images to that gallery, along with conditions that determine if the buttons and images they belong to are unlocked. This is also a multi-step process.
Additional images can be added to a button by repeating steps 3-5, while additional buttons can be added to the gallery by repeating all five steps.
Create an image gallery screen. The screen should display a background, and should contain navigation that allows the user to show other image galleries, or to return to the main or extras menu.
Add a way to display the image gallery screen to the main or extras menu.
Step 4 will vary based on how your game is structured, but one way of accomplishing it is to add the following line:
to the main menu screen.
This class supports the creation of an image gallery by handling the locking of images, providing an action that can show one or more images, and a providing method that creates buttons that use that action.
The transition that is used when changing images.
The default displayable used by make_button for a locked button.
The default hover border used by make_button.
The default idle border used by make_button.
If true, the gallery will only advance through unlocked images.
If true, the gallery will display navigation and slideshow buttons on top of the images.
To customize the look of the navigation, you may override the gallery_navigation screen. The default screen is defined in common/00gallery.rpy
If true, the gallery will advance between buttons.
The time it will take for the gallery to advance between images in slideshow mode.
An action that displays the images associated with the given button name.
Advances to the next image in the gallery.
unlocked If true, only considers unlocked images. Previous ( unlocked=False ) link
Goes to the previous image in the gallery.
unlocked If true, only considers unlocked images. Return ( self ) link
Stops displaying gallery images.
Toggles slideshow mode.
A condition that is true if all prior images associated with the current button have been unlocked.
name The name of the button being created. condition ( expression ) link
A condition that is satisfied when an expression evaluates to true.
expression A string giving a Python expression. display ( *displayables ) link
Adds a new image to the current button, where an image consists of one or more displayables.
A Python format string that’s used to format the numbers. This has three values that can be substituted in:
Adds a new image to the current button, where an image consists of one or more displayables.
make_button ( name, unlocked, locked=None, hover_border=None, idle_border=None, style=None, **properties ) link
This creates a button that displays the images associated with the given button name.
name The name of the button that will be created. unlocked A displayable that is displayed for this button when it is unlocked. locked A displayable that is displayed for this button when it is locked. If None, the locked_button field of the gallery object is used instead. hover_border A displayable that is used to overlay this button when it is unlocked and has focus. If None, the hover_border field of the gallery object is used. idle_border A displayable that is used to overlay this button when it is unlocked but unfocused. If None, the idle_border field of the gallery object is used. style The style the button inherits from. When None, defaults to the «empty» style, so as not to inherit borders and so on.
Additional keyword arguments become style properties of the created button object.
Applies transforms to the last image registered. This should be called with the same number of transforms as the image has displayables. The transforms are applied to the corresponding displayables.
If a transform is None, the default transform is used.
A condition that takes one or more image names as argument, and is satisfied when all the named images have been seen by the player. The image names should be given as strings.
A convenience method that is equivalent to calling image and unlock with the same parameters. This will cause an image to be displayed if it has been seen before.
The images should be specified as strings giving image names.
Music Room link
A music room is a screen that allows the user to select and play music tracks from the game. These tracks may start off locked when the user first begins playing a particular game, and will be unlocked as the user listens to the music while playing the game.
A music room is managed by an instance of the MusicRoom class. There can be more than one MusicRoom instance in a game, allowing a game to have multiple music rooms. Creating a music room consists of the following four steps:
Create an instance of MusicRoom. The MusicRoom constructor takes parameters to control the channel on which music is played back, and how long it takes to fade music out and back in.
Add music files to the instance.
Create a screen that uses the MusicRoom instance to create actions for buttons, imagebuttons, or hotspots. These actions can pick a track, the next or previous track, or stop and start the music.
Add the music room screen to the main menu, or an extras menu.
Step 4 will vary based on how your game is structured, but one way of accomplishing it is to add the following line:
to the main menu screen.
class MusicRoom ( channel=u’music’, fadeout=0.0, fadein=0.0, loop=True, single_track=False, shuffle=False, stop_action=None ) link
A music room that contains a series of songs that can be unlocked by the user, and actions that can play entries from the list in order.
channel The channel that this music room will operate on. fadeout The number of seconds it takes to fade out the old music when changing tracks. fadein The number of seconds it takes to fade in the new music when changing tracks. loop Determines if playback will loop or stop when it reaches the end of the playlist. single_track If true, only a single track will play. If loop is true, that track will loop. Otherwise, playback will stop when the track finishes. shuffle If true, the tracks are shuffled, and played in the shuffled order. If false, the tracks are played in the order they’re added to the MusicRoom. stop_action An action to run when the music has stopped.
Single_track and shuffle conflict with each other. Only one should be true at a time. (Actions that set single_track and shuffle enforce this.)
An action that causes the music room to play the next unlocked file in the playlist.
This action causes the music room to start playing. If filename is given, that file begins playing. Otherwise, the currently playing file starts over (if it’s unlocked), or the first file starts playing.
If filename is given, buttons with this action will be insensitive while filename is locked, and will be selected when filename is playing.
An action that causes the music room to play the previous unlocked file in the playlist.
This action causes the music room to start playing a randomly selected unlocked music track.
This action sets the value of the loop property.
This action sets the value of the shuffle property.
This action sets the value of the single_track property.
This action stops the music.
This action toggles the value of the loop property.
If music is playing, pauses or unpauses the music as appropriate.
This button is selected when the music is paused.
If no music is currently playing, this action starts playing the first unlocked track. Otherwise, stops the currently playing music.
This button is selected when any music is playing.
This action toggles the value of the shuffle property.
This action toggles the value of the single_track property.
add ( filename, always_unlocked=False, action=None ) link
Adds the music file filename to this music room. The music room will play unlocked files in the order that they are added to the room.
always_unlocked If true, the music file will be always unlocked. This allows the file to show up in the music room before it has been played in the game. action
This is a action or the list of actions. these are called when this file is played.
For example, These actions is used to change a screen or background, description by the playing file.
Returns true if the filename has been unlocked (or is always unlocked), and false if it is still locked.
Replay link
Ren’Py also includes the ability to replay a scene from inside a the main or game menu. This can be used to create a «scene gallery», or memory gallery that allows the player to repeat important scenes. After the scene finishes, Ren’Py returns to the menu screen that launched the replay.
Scene replay is also possible using the Start() action. The difference between the two modes are:
With the scene define like that, the replay can be invoked with the Replay action:
There is one store variable used by replay mode:
When in replay mode, this is sent to the label at which replay mode was started. Outside of replay mode, this is None.
In addition, config.enter_replay_transition and config.exit_replay_transition are used when entering and exiting replay mode, respectively. config.replay_scope adds variables to the cleaned store when entering a replay, and by default sets _game_menu_screen to cause right-clicking in a replay to default to showing the preferences screen.
The following variables and actions are used in replay mode:
Ends the current replay.
confirm If true, prompts the user for confirmation before ending the replay. Replay ( label, scope=<>, locked=None ) link
An action that starts label as a replay.
scope A dictionary mapping variable name to value. These variables are set when entering the replay. locked If true, this replay is locked. If false, it is unlocked. If None, the replay is locked if the label has not been seen in any playthrough. renpy. call_replay ( label, scope=<> ) link
Calls a label as a memory.
Keyword arguments are used to set the initial values of variables in the memory context.
If we’re in a replay, ends the replay immediately. Otherwise, does nothing.
© Copyright 2012-2021, Tom Rothamel.
Created using Sphinx 1.6.6.





