Adding pictures to my visual novel

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Luckycharms

Adding pictures to my visual novel

#1 Post by Luckycharms »

>.<!! I tried to add a picture to the visual novel. I put the image into the game directory and labeled it Clannad.jpeg and this is what my scrip looks like..

init:
image clannad = "Clannad2.jpeg"
$ m = Character('Misuzu', color="#c8ffc8")
$ i = Character('Me', color="#c8c8ff")

label start:
scene clannad

"I'll ask her..."

I tried to launch the novel as I'm only playing around with it at the moment... As it played, this came up:
I'm sorry, but an exception occured while executing your Ren'Py
script.

Exception: Couldn't find file 'Clannad.jpeg'.

While running game code:
- script at line 9 of C:\Documents and Settings\Aylin\My Documents\Visual Novels\renpy-6.4.0\Silent Dream/game/script.rpy

I figured that it meant that it couldn't find my picture, but I can't understand how because it's exactly where it's supposed to be!! Have I labeled my picture wrong or something?? I'm sorry if it's something silly but Please help!
Thank you very much in advance!

yummy
Miko-Class Veteran
Posts: 733
Joined: Fri Jul 07, 2006 9:58 pm
Projects: Suna to Majo
Location: France
Contact:

Re: Adding pictures to my visual novel

#2 Post by yummy »

Luckycharms wrote:>.<!! I tried to add a picture to the visual novel. I put the image into the game directory and labeled it Clannad.jpeg and this is what my scrip looks like..

init:
image clannad = "Clannad2.jpeg"
$ m = Character('Misuzu', color="#c8ffc8")
$ i = Character('Me', color="#c8c8ff")
Seems like the file name you placed into your game directory does not match the one you've written in the init section of your script.
It is case sensible (meaning that if you spell it wrong there might be errors or weird things happening) so please be careful.

If the file name is "Clannad.jpeg" you should write instead into your init section:

Code: Select all

    image clannad = "Clannad.jpeg"

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Adding pictures to my visual novel

#3 Post by Jake »

Also:
yummy wrote: It is case sensible (meaning that if you spell it wrong there might be errors or weird things happening) so please be careful.
Case Sensitive, meaning that not only do you have to spell it right, but it knows (is sensitive to) the difference between upper-case (capital) and lower-case letters. If you call the file "Clannad.jpeg" then you have to write "Clannad.jpeg" in your script, not "clannad.jpeg" or "Clannad.JPEG" or "ClAnNaD.jPeG" or anything. ;-)
Server error: user 'Jake' not found

Luckycharms

Re: Adding pictures to my visual novel

#4 Post by Luckycharms »

Seems like the file name you placed into your game directory does not match the one you've written in the init section of your script.
It is case sensible (meaning that if you spell it wrong there might be errors or weird things happening) so please be careful.

Thank you very much for your answer. You were right, so I changed it, but it's still not working. >.<!!!! Is there something else I'm doing wrong? To stop any problems with case or spelling I directly copied the name of the image from the image so that is no longer the problem.
Am I using the wrong type of image? Your comments are very halpful so thank you!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Adding pictures to my visual novel

#5 Post by PyTom »

I'll point out that the error message (which references "Clannad.jpeg") does not match the script example (which references "Clannad2.jpeg"). That's weird.

Also, generally jpeg files end with .jpg, rather than .jpeg.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Adding pictures to my visual novel

#6 Post by Jake »

Luckycharms wrote:Is there something else I'm doing wrong?
Just to be sure - which directory are you placing the image file in? It should be the same directory as the script (from the error message, "C:\Documents and Settings\Aylin\My Documents\Visual Novels\renpy-6.4.0\Silent Dream/game/"), otherwise Ren'Py won't find it without extra path information...

It might seem like an obvious thing to ask, but some people will say "game directory" and mean "the directory called 'game'", others will mean "the directory with the same name as my game", others still will mean "the directory with the executable in it". ;-)
Server error: user 'Jake' not found

Luckycharms

Re: Adding pictures to my visual novel

#7 Post by Luckycharms »

Thank you so much for your help. I tried renaming the image once again, and then I made sure it was in the place you specified and it was. no luck. =[
I then Tried another totally new picture without renaming it or anything.
The game went into the start menu then this error came up. I think it's the same error.
I'm sorry, but an exception occured while executing your Ren'Py
script.

Exception: Couldn't find file 'MT_1516'.

While running game code:
- script at line 9 of C:\Documents and Settings\Aylin\My Documents\Visual Novels\renpy-6.4.0\Silent Dream/game/script.rpy

If it would help, I can post the whole of the traceback on here.
And if you need it, here's my script:
init:
image mt = "MT_1516"
$ m = Character('Misuzu', color="#c8ffc8")
$ i = Character('Me', color="#c8c8ff")

label start:
scene mt

"I'll ask her..."

>.<!! Is there a problem with my typing? I'm so sorry to be a bother but I just can't see what I'm doing wrong!! =[
I really am greatful for any help, THANK YOU!!

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Adding pictures to my visual novel

#8 Post by monele »

I think I might have an idea o_o... This new picture actually appears as "'MT_1516" and not something like "'MT_1516.jpg" in your file explorer? If so, it's just that Windows is hiding its extension. So maybe... maybe "Clannad.jpeg" is actually "Clannad.jpeg.jpg" or something.

Guest

Re: Adding pictures to my visual novel

#9 Post by Guest »

monele wrote:I think I might have an idea o_o... This new picture actually appears as "'MT_1516" and not something like "'MT_1516.jpg" in your file explorer? If so, it's just that Windows is hiding its extension. So maybe... maybe "Clannad.jpeg" is actually "Clannad.jpeg.jpg" or something.
BINGO!! Yay!! Thank you so much! That was a very good idea and It worked! =] I'm very happy so thank you! >.<!!
But thank you everyone who helped! =]

Jaela
Newbie
Posts: 1
Joined: Sun Dec 16, 2007 8:22 am
Contact:

Re: Adding pictures to my visual novel

#10 Post by Jaela »

Since this is on the same topic, I'm going to ask a VERY noobish question... how do you go about adding a picture to the game directory? Where do you put the pictures exactly?


-Jaela

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Adding pictures to my visual novel

#11 Post by Jake »

Jaela wrote:Since this is on the same topic, I'm going to ask a VERY noobish question... how do you go about adding a picture to the game directory? Where do you put the pictures exactly?
Once you start a new project, inside the folder you installed Ren'Py into there will be a folder with the name of your game. Inside that folder there will be a folder called 'game', and that is where you need to put your images.
Server error: user 'Jake' not found

Guest

Re: Adding pictures to my visual novel

#12 Post by Guest »

Jake wrote:
Jaela wrote:Since this is on the same topic, I'm going to ask a VERY noobish question... how do you go about adding a picture to the game directory? Where do you put the pictures exactly?
Once you start a new project, inside the folder you installed Ren'Py into there will be a folder with the name of your game. Inside that folder there will be a folder called 'game', and that is where you need to put your images.
yeah, see...i've tried that. it's a .jpeg, and it gives me an error that the file can't be found. the picture is in that folder and everything. what's wrong with it?!

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: Adding pictures to my visual novel

#13 Post by Jake »

Guest wrote:yeah, see...i've tried that. it's a .jpeg, and it gives me an error that the file can't be found. the picture is in that folder and everything. what's wrong with it?!
Well, have you checked for the same problem as the earlier one in this thread? If you look in the root Ren'Py folder, do you see a "renpy.exe" or just a "renpy" with the Eileen icon? In your game folder, is there a file called "script.rpy" or just "script"?

If you just see "renpy" or "script", then your OS is probably hiding file extensions, meaning you're not seeing the true filename of the image to look for. What OS are you using - Windows, Linux or Mac?
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Google [Bot]