Solarus-Games English Forum

Solarus => Development => Topic started by: Starlock on January 03, 2016, 05:38:43 AM

Title: Different crystals for every dungeon
Post by: Starlock on January 03, 2016, 05:38:43 AM
Hey, I was working on making crystal/crystal block sprites for dungeons. Is there a way for every dungeon to have a different sprite for crystals rather than all of them using the same ones?
Title: Re: Different crystals for every dungeon
Post by: Christopho on January 03, 2016, 11:57:41 AM
Not directly (yet), but I see two possible workarounds:
- Use custom entities to reimplement your own crystal block system. If someone does that, it will be useful because one day, we will probably want to remove built-in crystals and crystal blocks (they are too Zelda specific).
Or
- This is more a hack, but it should be easier than reimplementing it with custom entities. You can replace dynamically the sprite files "entities/crystal.dat" and "entities/crystal_block.dat" by using the file API (http://www.solarus-games.org/doc/latest/lua_api_file.html). (The changes will be done in the savegames directory, not in the data directory.)
Title: Re: Different crystals for every dungeon
Post by: MetalZelda on January 03, 2016, 02:09:54 PM
The other way is to use tileset.entities.png and then make every crystals sprite in these files, it should work (since he wants to use a different sprite for each dungeon, so I'm considering that each dungeon have a different tileset).
Change image source to "tileset"
Title: Re: Different crystals for every dungeon
Post by: Christopho on January 03, 2016, 07:42:02 PM
This is true. The idea of MetalZelda is better :)