Writing a VN Section - shawna-p/mysterious-messenger GitHub Wiki
Notice
These pages are out of date! The most recent version of the documentation can be found here: https://mysterious-messenger.readthedocs.io/en/stable/
This page is retained so that it can still be linked to.
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_begin
- Add music with
play music your_music_var
- Set up the background with
scene bg your_bg
- (Optional) Use transitions like
with fade
e.g.scene bg your_bg with fade
)- (Optional) Write
pause
after yourscene
statement 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_variables.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
Writing a VN Menu
Writing a menu in a VN is the same as it is in phone calls; that is, you need to write extend ''
right after menu:
and before the choices.
menu:
extend ''
"Choice 1":
m "Choice 1"
"Choice 2":
m "Choice 2"
This tells the program to display the last line of dialogue underneath the choice menu.
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.