Images set by All-In-One GUI Template showing up as missing when running project.

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
Mokus
Newbie
Posts: 11
Joined: Wed Sep 26, 2018 8:43 pm
Completed: 0
Projects: Charlesdof
Organization: Mokus
IRC Nick: Mokus
Tumblr: Charlesdof
Deviantart: Charlesdof
Github: Charlesdof
Skype: Mokus
Soundcloud: Mokus
itch: amehynda
Location: Paraguay
Discord: Mokus
Contact:

Images set by All-In-One GUI Template showing up as missing when running project.

#1 Post by Mokus »

I'm trying out the All-In-One GUI Template made by tofurocks and have run into a problem with using new sprites in the definitions.rpy that comes with the GUI.

According to the documentation on definitions.rpy:

Code: Select all

## This is a resource name loader that will import the names of files from certain folders
## Intended as a way to quickly grab file names to use in accessibility.rpy, screens.rpy, and captiontool.rpy
## Remember to add commas to the end of each listed item
## As of RenPy7, basic images do not have to be defined (LayeredImages still need to be set up)
Eileen's sprites are in the root of the images folder, and their definitions look like this:

Code: Select all

image eileen_base = "images/sprites/eileen_base.png"
Meanwhile, the new sprites are organized into subfolders and look like this:

Code: Select all

image hoshiko school surprised = "images/sprites/hoshiko/school/surprised.png"
The default project appears to take the assets for the default character, Eileen, and properly display them in-game. However, when I try to use my own sprites, the images set by them aren't displaying, only showing up as the default "image missing" sprite.

I've included examples of what I'm seeing.
eileentest.PNG
hoshikotest.PNG
I find that if I uncomment the image definition lines that are generated by the .rpy script, then my images show up correctly. However, I'd like to avoid that, as this script should be able to get all the definitions without user intervention.

Should I be doing something differently to get these images to display?

User avatar
BáiYù
Regular
Posts: 131
Joined: Fri Apr 01, 2016 10:02 am
Completed: This Life Escapes Me, Up All Night, Lotus: The Self-Made Witch
Projects: Various
Organization: tofurocks, Fiendish Fiction, Spider Lily Studios
Github: baiyu-dev
itch: tofurocks
Contact:

Re: Images set by All-In-One GUI Template showing up as missing when running project.

#2 Post by BáiYù »

Just in case this message didn't send properly in Discord (and for archival purposes):

Code: Select all

    scene room

    show surprised

    with fade

    e "You've created a new Ren'Py game."
screenshot0014.png
What Ren'Py is doing is ignoring the folder names and going straight for the filename itself, which is surprised. Without re-defining the way the image is referred to, this is how you would have images/sprites/hoshiko/school/surprised.png appear in your game. Unfortunately, this is not useful for us since your characters would have multiple versions of surprised per outfit.
Image
Games and supplementary Ren'Py codes

User avatar
Mokus
Newbie
Posts: 11
Joined: Wed Sep 26, 2018 8:43 pm
Completed: 0
Projects: Charlesdof
Organization: Mokus
IRC Nick: Mokus
Tumblr: Charlesdof
Deviantart: Charlesdof
Github: Charlesdof
Skype: Mokus
Soundcloud: Mokus
itch: amehynda
Location: Paraguay
Discord: Mokus
Contact:

Re: Images set by All-In-One GUI Template showing up as missing when running project.

#3 Post by Mokus »

Thanks, BáiYù! That clarifies things. For other users:

Use the definitions.rpy file to generate the image definitions. You can then copy over the lines generated at the top of the file into a new .rpy file and use them in your project.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]