Code: Select all
renpy.image (filter(str.isalnum, atlas_item) + "_text", Text("[atlas_item]",xalign=0.4,yalign=0.85,size=30,color="#bfbfbf"))
TypeError: unsupported operand type(s) for +: 'filter' and 'str'
Are you trying to remove non alphanumeric characters from atlas_item before concatenating the string?
If so, maybe try something like
Code: Select all
init +1 python:
# Here is where the idle and hover text overlays are created. This will show whatever string is used in the atlas_gallery_items.
for atlas_item in atlas_gallery_items:
safe_str = ''.join(c for c in atlas_item if c.isalnum())
renpy.image (safe_str + "_text", Text("[atlas_item]",xalign=0.4,yalign=0.85,size=30,color="#bfbfbf"))
renpy.image (safe_str + "_text_hover", Text("[atlas_item]",xalign=0.4,yalign=0.85,size=30,color="#ffffff"))