Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(5 edits)

Hi, I keep having a python error that bricks the entire plugin until I delete the game project's cache. It happens if I click the "multiple" button and my filenames have underscore in them (eileen_m_smile.png)

RecursionError: maximum recursion depth exceeded while calling a Python object

It would be good to explain the different folder/file structures you are supporting and the different filenames you expect to work with your scripts. The absolute ideal scenario would be to have an example sprite + layeredimage provided, which I believe would be a fair request for a paid plugin. You could for example use the Agustina sprite.

You could also mention that the sprite's layeredimage and every attribute need to be manually declared in advance ("group outfit auto" doesn't seem to work). I wouldn't have known from the itch description, only by reading this thread and getting errors I learned of this.

Hello! I'll need you to be more specific about the errors you're encountering; the layered image tool is set up to work with basically any layered image declaration as it only checks the LayeredImage object after Ren'Py has already handled all the groups and such. I tested it with the following code:

layeredimage august:
    always "august_base"
    group outfit auto
    group eyes auto:
        attribute open default
    group eyebrows auto:
        attribute normal default
    group mouth auto:
        attribute smile default
    group glasses auto
    group emotion auto

and had no issues using it in the tool. These filenames have underscores in them also (august_eyebrows_frown.png and so on), so the file naming is not inherently a problem. The intention is that the tool supports as many layered image declarations as possible, which is why there are not limits listed on the itch page.


I managed to solve the recursion error. It was a layer that was incorrectly called in code ("august base" instead of the correct "august_base" when the filename was "august_base.png"). The same error also appeared in-game when the sprite was called. Solving this error also made layer groups declared with "auto" appear.

That said, if the error appears once it still bricks your layeredimage tool until the game's persistent data is removed. It would be great if there was some kind of error message but the tool doesn't get bricked, as this kind of slipups is probably a common occurence during the dev process.