Images aren't being found in Images folder

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
SovereignClock
Newbie
Posts: 4
Joined: Thu Aug 27, 2015 12:07 pm
Contact:

Images aren't being found in Images folder

#1 Post by SovereignClock »

Alright, so I'm trying to put some images into my game. I put the images in and define them with 'image', and the game starts up fine. I proceed to press start, but then the game for some reason stops playing and pops up a screen that says something is wrong. Normally it would pop up sooner and would be because of a mistake on my part where I put an equal sign where a colon should go, or a direction for an image shouldn't be capital. This pop up says "IOError: Couldn't find file 'CharacterBlink1.png'." Thinking this was a mistake on my part, which it probably is, I looked at the code, which I wrote as: (image MC1 = "CharacterBlink1.png"). Without the parenthesis, of course. So I thought that the problem is that I didn't put the picture "CharacterBlink1.png" into the file that was named images. So I click on the link in the open directory column to open the file with the images. The file opens, and the picture is there with my other pictures for the story. I haven't moved the file from where it was by default, and that isn't the only problem that I've had with images. I had also tried to set a background with a picture of an overgrown field, which I named as GrassyField.png. I put into the same folder that I had everything else, so I thought it would work. I defined it like so: image Field = "GrassyField.png" I then set the it as the background in the beginning with: scene Field. I tried to play the game, but it didn't even let me get to the main menu. I sincerely hope that someone will help me with this problem, but I'm not expecting much.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Posted in the wrong place.

#2 Post by Donmai »

Hi, SovereignClock.
Lately we're having a lot of questions regarding Ren'Py being unable to show defined images. The point is: images inside the 'images' directory don't need to be defined. If you have 'CharacterBlink1.png' inside the 'images' folder, then you can show it using

Code: Select all

show CharacterBlink1
You can also declare that image in your script using the 'image' statement. Only problem is your script.rpy file is telling you to do it this way:

Code: Select all

# Declare images below this line, using the image statement.
image eileen happy = "eileen_happy.png"
but, in this case, that should be

Code: Select all

# Declare images below this line, using the image statement.
image eileen happy = "images/eileen_happy.png"
That's because the default script.rpy file was created on a time when Ren'Py didn't have the 'images' directory. This problem has been reported already and Tom has taken care of it on the last prerelease version (6.99.6.692).
PyTom wrote:I've made a second prerelease of 6.99.6, 6.99.6.692. Compared to the previous prerelease, this:

1) Adds images/ to the search path, so "image foo = 'foo.png'" will find images/foo.png.
[...]
So, before you update your Ren'Py to the next version, you can either show the images on the 'images' directory directly, or declare them using the full path.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

SovereignClock
Newbie
Posts: 4
Joined: Thu Aug 27, 2015 12:07 pm
Contact:

Re: Images aren't being found in Images folder

#3 Post by SovereignClock »

Thank you, Good One. The last time I used Ren'Py was about a year and a half ago, and I haven't been up-to-date with what is being released. If you could, can you put a link as to where I can find information about 6.99.6? You have already helped enough that I don't think that I will have major problems with it anymore, but thank you again.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Images aren't being found in Images folder

#4 Post by Donmai »

You're very welcome. Announcements are made on this thread: http://lemmasoft.renai.us/forums/viewto ... =8&t=31311
and there's a discussion about Ren'Py development here: http://lemmasoft.renai.us/forums/viewforum.php?f=32
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: No registered users