My game uses a lot of the same assets over and over again, I used the colorize effect instead of adding extra images (so, for instance, I have a blue duck, red duck, yellow duck, orange duck etc. all made with the same image). I will use image composites for one section of the game, where I will take four separate items and then combine them with the background and use this composite to be used in an imagemap... it is part of a quiz that uses images for answers (this game is for kids). I spent a few hours on it yesterday, but I am experiencing a lot of problems.
Here is a simple example:
# From the header
image quiz = "quiz.png"
image purple duck = im.MatrixColor(
"wduck.png",
im.matrix.colorize("#000", "#af24d1"))
image quizp1 = im.Composite(
(720, 1280),
(0,0), "quiz.png",
(100, 700), "purple duck"
)
# more images will be combined in the final example, the image position is kinda random right now and just for testing.
# the game runs in portrait mode, thus 720x1280
# From the game - lines 122 and 123
show quizp1
"test"
Error message:
I'm sorry, but an uncaught exception occurred.
While loading <'Composite' (720, 1280) (0, 0) u'quiz.png' (100, 700) u'purple duck'>:
File "game/script.rpy", line 123, in script
"test"
File "renpy/common/000window.rpy", line 98, in _window_auto_callback
_window_show()
File "renpy/common/000window.rpy", line 60, in _window_show
renpy.with_statement(trans)
IOError: Couldn't find file 'purple duck'.
Suggestions?
Also, is im.composite different from LiveComposite or is livecomposite just older code?
I have already used im.composite with just .png files earlier in this project, but this section would make the game much bigger if I have to create new png files instead of using code.
I'm using Renpy 6.99.13
Thank you for your time and for reading this far I really appreciate it.
[solved] couldn't find file in image composite using images with effects applied
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.
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.
- ComputerArt.Club
- Veteran
- Posts: 427
- Joined: Mon May 22, 2017 8:12 am
- Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
- Location: Taiwan
- Contact:
[solved] couldn't find file in image composite using images with effects applied
Last edited by ComputerArt.Club on Sun Nov 12, 2017 10:54 am, edited 1 time in total.
Facebook:
Renpy Creators and Enthusiasts Facebook Group
My latest game:
Famous Fables: Read, Learn and Play - Android App for teaching children to read
Creative Commons stuff:
Shape transitions,
100+ 360° photos of Japan,
- Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
- Contact:
Re: couldn't find file in image composite using images with effects applied
"im.Composite" is an old code, and if my memory serves me right it only takes image file. Use LiveComposite instead.
Code: Select all
image quizp1 = LiveComposite(
(720, 1280),
(0,0), "quiz.png",
(100, 700), "purple duck"
)
- ComputerArt.Club
- Veteran
- Posts: 427
- Joined: Mon May 22, 2017 8:12 am
- Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
- Location: Taiwan
- Contact:
Re: [solved] couldn't find file in image composite using images with effects applied
Thank you so much!
That worked like a charm! Eventually I was even able to animate in it (code below for anyone trying out something similar).
transform shinemove:
linear 1.0 xoffset 10
linear 1.0 xoffset -10
repeat
image shine = At("shine.png", shinemove)
image quizp1 = LiveComposite(
(720, 1280),
(0,0), "quiz.png",
(160,760), "shine",
(30, 900), "red duck",
(360, 900), "yellow duck",
(30, 570), "green duck",
(360, 570), "blue duck",
)
Just one big problem to solve and then this game will be 99% finished! Or at least the first complete version will be finished.
That worked like a charm! Eventually I was even able to animate in it (code below for anyone trying out something similar).
transform shinemove:
linear 1.0 xoffset 10
linear 1.0 xoffset -10
repeat
image shine = At("shine.png", shinemove)
image quizp1 = LiveComposite(
(720, 1280),
(0,0), "quiz.png",
(160,760), "shine",
(30, 900), "red duck",
(360, 900), "yellow duck",
(30, 570), "green duck",
(360, 570), "blue duck",
)
Just one big problem to solve and then this game will be 99% finished! Or at least the first complete version will be finished.
Facebook:
Renpy Creators and Enthusiasts Facebook Group
My latest game:
Famous Fables: Read, Learn and Play - Android App for teaching children to read
Creative Commons stuff:
Shape transitions,
100+ 360° photos of Japan,
Who is online
Users browsing this forum: No registered users