Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Thank you again for this awesome plugin!

Unfortunately, I can't seem to get it working with LayeredImageProxy. It always gives me one of two errors:

When using outline_transform() directly:

File "game/outline_shader.rpy", line 244, in <module>
    u_width float(width)
            ~~~~~^^^^^^^
TypeError: float() argument must be a string or a real number, not 'MultiBox'

When using a transform that makes use of  outline_transform():

File "game/outline_shader.rpy", line 247, in <module>
    u_line_color Color(color).rgba
                 ~~~~~^^^^^^^     
TypeError: 'MultiBox' object is not iterable

I got these in a sample project simply by doing:

layeredimage eileen base:
    always "eileen.png"
image eileen = LayeredImageProxy("eileen base", [outline_transform()])

I'm happy to provide more detail in case there's a specific part of the error message that would help!

Looks like this is a quirk of how LayeredImageProxy handles transforms with arguments - you get a similar error if you try to use a transform like

transform test(a=0.5):
    alpha a

and use the test transform for LayeredImageProxy. It's expecting to receive the child as the first argument, which you can get around via

transform outline_test(child=None, width=1, color="#fff", smoothing=1.0, end_color=None,
        num_passes=1, gradient_smoothing=None, is_mesh=True, mesh_pad=False,
        drawable_res=False, offset=(0, 0), smoothstep=True, power=None):
    outline_transform(width, color, smoothing, end_color, num_passes,
        gradient_smoothing, is_mesh, mesh_pad, drawable_res, offset, smoothstep, power)(child)

and then use outline_test instead of outline_transform for your proxy. Hope that helps! Might be worth reporting to Ren'Py honestly since it seems unintuitive that it causes this issue.

(1 edit) (+1)

Thank you so much for the quick reply, it works now!