You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.
Some places to look are:
Please do not create new links to this page.
To play background music (which loops until you stop it), you use the :
play music "ominous.ogg"
To use fade-in or fade-out (in seconds):
play music "ominous.ogg" fadein 2 fadeout 2
To stop the background music, you use :
stop music
To play a sound effect, use the :
play sound "bang.ogg"
There's a Ren'Py function to stop sound, but there's usually no reason to use it.
If you want to add voice acting to your visual novel, you'll need to put each screen of dialog into a separate file, and name them in a way that you can figure out which line of dialog they go with. Then, before each line of dialog, put a :
voice "bob203.ogg"
bob "I love ice cream."
voice "nancy218.ogg"
nancy "I love ice cream too."
voice "bob204.ogg"
bob "I also like cookies."