Request: allow to add/remove sprites to all entities
Allow to add/remove sprites to the hero (or even for any entity if you agree). We could keep the syntax used for custom entities, that is:
hero:create_sprite(animation_set_id, [sprite_name]) hero:remove_sprite([sprite])
Curiosity: In some games (like the original megaman of the NES) the hero consisted of several sprites (because there was a limitation of max number of colors per sprite, which is not our case).
Important remarks: In our case, we could use these functions to split the tunic in different pieces, one for each clothing (shirt, trousers, cloak, hat, etc), which allow to make a lot of combinations with just a few sprites without need to combine each clothing with the rest of clothes (which would be less of drawing work for the artists sine each clothing would be in a different sprite). We could also add extra sprites to the hero for other uses: poison/electrifity effects (for poisoned/paralyzed states), etc.
However, it will be convenient to have functions to interchange the drawing order of the sprites (something like this https://github.com/christopho/solarus/issues/809), and also functions to set the drawing order of the sprite immediately before/after a given sprite of the same context (the context would be the entity containing the sprites, or the map otherwise).
What do you think?