Bug report : gencache for web EasyRPG Player

Hi everyone, hope you’re doing well :slight_smile:

I was trying to make use of your awesome tool “EasyRPG Player for the web” for my project but while playing, I encountered some missing pictures from time to time, not all the time

I was curious about the cause so I digged and found that the issue seems to stem from the gencache tool.

As I understand it, this tool builds an index of all files and folders within a given directory recursively. Problem is: if a file shares the same name as a folder at the same level, only one will be listed in the generated index.json file.

For instance, for this file structure:

/Picture/Fire.png
/Picture/Fire/fire_1.png
/Picture/Fire/fire_2.png
/Picture/Fire/fire_3.png

Using gencache on /, the resulting json for the Picture folder is:

"picture": {
    "_dirname": "Picture",
    "fire": {
        "_dirname": "Fire",
        "fire_1": "fire_1.png",
        "fire_2": "fire_2.gif",
        "fire_3": "fire_3.png"
    }
},

The file /Picture/Fire.png is ignored, therefore through the web browser, it leads to this issue :

Changing the /Picture/Fire.png filename and its reference in the editor solves the issue after gencache is run again.

I’m using the linux version of gencache, didn’t try with the other versions.

If you want to reproduce the issue, here is a minimalistic project with the problematic file structure (not including gencache):
https://web.darxnake.fr/easyrpg/test_project_for_gencache.zip

Hope this helps, thanks again for all the time and effort you put in the project. You’re the best!

Thanks for the report. Yeah unfortunately the stripping of the extension causes some problems. Yours isn’t the only one.

There is a new cache file planned which doesn’t strip the extension which should get rid of these problems.