Loading an error-image instead of missing image in Ren’Py

This is a little snippet that can be used if you want to load an error-image if an image that should be loaded wasn’t found.

def missing_image_callback(s):
    return im.Image("error.png")

config.missing_image_callback = missing_image_callback

This automatically loads the error.png if an image isn’t found. You can extend the function by logging or whatever you want, to do more in that case.

Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: