Hi everybody, as title says I was trying to read and optionally manipulate the data of Lilycove Paintings, hoping to make a plugin or making a pull request to PkHex. I manged to read correctly the Pokémon data and I can also enable the flags of the various paintings and edit their subjects.
Here is a custom painting of my Swampert that I injected:
The problem is, since I started experimenting, that whenever I try to undo my changes and remove a Painting, even zeroing the painting data and desabling the corresponding flag, the painting remains as a Cool stat master with the Unknown sprite:
It would possibly be a bug in my code or there are other flags I don't know about. Anyhow I leave here the link to the commit and to my github fork:
https://github.com/kwsch/PKHeX/commit/4669b68d58c7def311425d56fa2d90faf5af598d
https://github.com/pasqualenardiello/PKHeX
Feel free to make and submit every change you whish, I just wish to know why this strange thing happens.