Page 11 of 11

Re: Instant CG and BG gallery

Posted: Wed Mar 07, 2018 8:26 pm
by Imperf3kt
tohtamish wrote: Wed Mar 07, 2018 11:15 am Is it possible to use this gallery code as the chapter selection at the beginning of the game? (something like "walking dead" game)
You could modify it to, but as it stands: no

But modifying it is pointless, just make a simple screen with imagebuttons in a grid.

Re: Instant CG and BG gallery

Posted: Sun Mar 17, 2019 7:26 pm
by Gouka

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/gallery_setup.rpy", line 26, in script
    init +1 python:
  File "game/gallery_setup.rpy", line 29, in <module>
    renpy.image (gal_item + " butt", im.Scale("bg CG000", " bg CG001", "bg CG003", "bg CG006"(gal_item), thumbnail_x, thumbnail_y))
TypeError: 'unicode' object is not callable

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/gallery_setup.rpy", line 26, in script
    init +1 python:
  File "C:\Users\ateli\Documents\Messiah No.1\renpy-7.2.1-sdk\renpy\ast.py", line 896, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\ateli\Documents\Messiah No.1\renpy-7.2.1-sdk\renpy\python.py", line 1929, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/gallery_setup.rpy", line 29, in <module>
    renpy.image (gal_item + " butt", im.Scale("bg CG000", " bg CG001", "bg CG003", "bg CG006"(gal_item), thumbnail_x, thumbnail_y))
TypeError: 'unicode' object is not callable

Windows-8-6.2.9200
Ren'Py 7.2.1.457
DWraith_final 1.0
Sun Mar 17 17:22:35 2019
I keep getting this error over and over again, and I have deleted most of what the error states and only left bg CG000

Re: Instant CG and BG gallery

Posted: Mon Apr 08, 2024 4:49 pm
by Ajeb
Hi ! I know this is an old cg framework but my game has been in development since 2015 (it's been a while I know) and I'd like to keep on using this one so that my players don't lose their progress.
My question is: has anyone managed to use conditionswitch /dynamic displayables / livecomposite images with this cg framework? I'd like to add more variations/customization that gets shown on cgs without having to save 100 different variations of a cg everytime...

I keep having the following error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/screens.rpy", line 1081, in script
    init +1 python:
  File "game/screens.rpy", line 1084, in <module>
    renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
Exception: Expected an image, but got a general displayable.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/screens.rpy", line 1081, in script
    init +1 python:
  File "C:\Users\PC\Documents\Softwares\renpy-8.1.1-sdk\renpy\ast.py", line 823, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\PC\Documents\Softwares\renpy-8.1.1-sdk\renpy\python.py", line 1178, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/screens.rpy", line 1084, in <module>
    renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
  File "C:\Users\PC\Documents\Softwares\renpy-8.1.1-sdk\renpy\display\im.py", line 922, in __init__
    im = image(im)
  File "C:\Users\PC\Documents\Softwares\renpy-8.1.1-sdk\renpy\display\im.py", line 1978, in image
    return image(arg.target, loose=loose, **properties)
  File "C:\Users\PC\Documents\Softwares\renpy-8.1.1-sdk\renpy\display\im.py", line 1993, in image
    raise Exception("Expected an image, but got a general displayable.")
Exception: Expected an image, but got a general displayable.
And obviously I know I have to edit the framework for it to support dynamic displayables but I have no idea where to start... Does anybody have any idea what I could do/look for/try to change? I've tried a few not-so-smart things but nothings works

If it's not possible, would you happen to know of a similar cg framework that supports displayables/condition switches/layered images etc?

Thanks!

Re: Instant CG and BG gallery

Posted: Tue Apr 09, 2024 5:29 am
by henne
Replace

Code: Select all

    renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
with

Code: Select all

    renpy.image (gal_item + " butt", Transform(gal_item, size=(426, 240)))
It's mostly about replaceing "im.Scale" with "Transform".

https://www.renpy.org/doc/html/trans_tr ... #Transform

Re: Instant CG and BG gallery

Posted: Wed Apr 10, 2024 6:49 am
by Ajeb
henne wrote: Tue Apr 09, 2024 5:29 am Replace

Code: Select all

    renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
with

Code: Select all

    renpy.image (gal_item + " butt", Transform(gal_item, size=(426, 240)))
It's mostly about replaceing "im.Scale" with "Transform".

https://www.renpy.org/doc/html/trans_tr ... #Transform
Thank you very much, I knew it would be something as simple as that but didn't know quite where to look. This is lifesaving thanks!!! (Aegis Alver supremacy)