Sprites still shown after deleting Image Statements [SOLVED]

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
User avatar
Bug
Newbie
Posts: 7
Joined: Mon Aug 15, 2016 12:12 pm
Contact:

Sprites still shown after deleting Image Statements [SOLVED]

#1 Post by Bug » Mon Oct 03, 2016 6:06 pm

I'm curious why my sprites remain displayed in game (with the Show Statement) after their associated Image Statements have been deleted.
In other words, after deleting:

Code: Select all

image wolf 1 = "wolf.png"
And leaving:

Code: Select all

show wolf 1
The sprite still shows without error. Funky.

After deleting ALL image statements/definitions, almost all the sprites appeared, as normal.
Only one, that was recently added, was replaced with the placeholder-silhouette/image-name
A couple others caused this:

Code: Select all

File "renpy/common/00placeholder.rpy", line 194, in _duplicate
rv.name = list(args.name) + list(args.args)
AttributeError: 'NoneType' object has no attribute 'name'
After ignoring the error, the placeholder is shown, but without the image name.
Last edited by Bug on Tue Oct 04, 2016 3:26 pm, edited 1 time in total.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Sprites still shown after deleting Image Statements

#2 Post by Ocelot » Tue Oct 04, 2016 2:40 am

IIRC RenPy scans game folder and automatically defines images from file names. So wolf.png will define image wolf. And due to how image tags work, trying to show image wolf 1 when it does not exist will show image wolf instead.
< < insert Rick Cook quote here > >

User avatar
Bug
Newbie
Posts: 7
Joined: Mon Aug 15, 2016 12:12 pm
Contact:

Re: Sprites still shown after deleting Image Statements

#3 Post by Bug » Tue Oct 04, 2016 11:42 am

Ocelot wrote:IIRC RenPy scans game folder and automatically defines images from file names. So wolf.png will define image wolf. And due to how image tags work, trying to show image wolf 1 when it does not exist will show image wolf instead.
Many of the filenames and image tags do not match, and still appear nonetheless.
Sorry for the poor example.

User avatar
papiersam
Veteran
Posts: 231
Joined: Fri Aug 12, 2016 2:24 pm
Completed: Gem Hunt Beta, 1/Probably, Animunch
Projects: The Panda Who Dreamed
Contact:

Re: Sprites still shown after deleting Image Statements

#4 Post by papiersam » Tue Oct 04, 2016 11:56 am

Try deleting persistent data and recompiling rpyc files (form the main interface). It could just be a caching thing.

User avatar
Bug
Newbie
Posts: 7
Joined: Mon Aug 15, 2016 12:12 pm
Contact:

Re: Sprites still shown after deleting Image Statements

#5 Post by Bug » Tue Oct 04, 2016 2:35 pm

r_sami wrote:Try deleting persistent data and recompiling rpyc files (form the main interface). It could just be a caching thing.
Gave it a shot, but to no avail. Thanks for the suggestion.

User avatar
papiersam
Veteran
Posts: 231
Joined: Fri Aug 12, 2016 2:24 pm
Completed: Gem Hunt Beta, 1/Probably, Animunch
Projects: The Panda Who Dreamed
Contact:

Re: Sprites still shown after deleting Image Statements

#6 Post by papiersam » Tue Oct 04, 2016 2:38 pm

Then your best bet is to start a fresh new project and move your code there. If the error persists, it's the code. If not, it's something else, probably specific to the project configuration.

User avatar
Bug
Newbie
Posts: 7
Joined: Mon Aug 15, 2016 12:12 pm
Contact:

Re: Sprites still shown after deleting Image Statements

#7 Post by Bug » Tue Oct 04, 2016 3:24 pm

Okay, turns out there was an old duplicate of the file containing image definitions.
Which explains why only new (missing) image definitions wouldn't appear.
This is exactly what I initially thought was causing this, but the file was tucked away—that is to say, I didn't look hard enough.
Guess I can't procrastinate reorganizing the game folder any longer.

Thanks again.
Attachments
screenshot0018.png
Never thought I'd bee happy to see THIS.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]