Writing a VN Section¶
Example files to look at: tutorial_6_meeting.rpy, tutorial_3b_VN.rpy
A brief overview of the steps required (more detail below):
Create a label using the name of the chatroom + the suffix
_vn(e.g.label my_chatroom_vn)
(Optional) Indicate a character the VN is associated with by including their file_id as another suffix (e.g.
label my_chatroom_vn_s)(Optional) Indicate that this chatroom is the party by including the suffix
_party(e.g.label my_chatroom_party)In the VN label, write
call vn_beginAdd music with
play music your_music_varSet up the background with
scene bg your_bg
(Optional) Use transitions like
with fadee.g.scene bg your_bg with fade)(Optional) Write
pauseafter yourscenestatement to give the player a moment to look at the background.Fill out the dialogue and character expressions
Finish the label with
jump vn_end
First, much like creating a chatroom, you must create a label for the VN. For a Story Mode icon not associated with any character, you can just use the name of the chatroom + the suffix _vn and the program will know to set it up after that chatroom e.g.
label my_chatroom:
has the VN label
label my_chatroom_vn:
If you would instead like the VN to have a certain character’s image associated with it, you must add another suffix: _ + the file_id of that character e.g.
label my_chatroom_vn_ju:
will show up in the program as a VN section associated with Jumin.
Alternatively, you can also use the suffix _party to indicate a VN contains the party. This will look like
label my_chatroom_party:
Underneath your label, begin with
call vn_begin
This sets some important variables before the VN. Next, set the background for your VN. It begins as black.
scene bg rika_apartment with fade
where bg rika_apartment is a pre-defined variable you can find in vn_mode.rpy or one you defined yourself. Backgrounds should be 750x1334 pixels. with fade indicates the background should fade in from black.
If you want the player to have a moment to look at the background before you move on, you can write pause after showing the image, e.g.
scene bg rika_apartment with fade
pause
Awarding heart points in a VN¶
You award heart points to a player the same way as you would anywhere else:
call heart_icon(ja)
where ja is the variable of the character you’re awarding a heart point to.