[SOLVED] Error: Cannot create pickable treasure

Started by ffomega, January 31, 2017, 05:58:50 AM

Previous topic - Next topic
January 31, 2017, 05:58:50 AM Last Edit: January 31, 2017, 11:53:44 PM by ffomega
I ran into a small problem with items.  I have moved the items sprite sheet into the items subfolder within the /sprites/entities/ directory, and whenever I load a game, all the pickables are gone, giving me the error message:

"Error: Cannot create pickable treasure 'item': Sprite 'entities/items' has no animation 'item' ".

Should I have left the items.png file in the root directory of 'entities'?  Are pickables hardcoded into always looking for 'items.png' within the 'entities' folder and nowhere else?
My tilesets page can be found here:
http://absolute-hyrule-tutorials.solarus-games.org/

As far as I know, you can move your png files to any folder/ subfolder of the sprites folder. But then you will have to modify your dat file of the sprite, so that the engine knows where to find the png. There is no need to modify the dat file directly, as you can open the sprite from the editor and change the source file location for each animation.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

You can move the png, but you need to modify the .dat where the source pointer is located

January 31, 2017, 05:33:29 PM #3 Last Edit: January 31, 2017, 05:36:19 PM by Shimon
From what I understand any Item image must originate from the entities/items sprite. So say I wanted to add a baked potato - I would make the baked_potato.lua and then create a folder inside the entities/items sprite called baked_potato, then after creating a direction I can load the image of my baked potato to use from where ever I want.
Hope this helps.

it might also be noted that, when I started thr quest, I got the error:

Error: Cannot find quest file 'sprites/entities/items.dat'

Does this file HAVE to be located in "sprites/entities"? The image itself I know can be anywhere as long as you have all your images point to the items.dat file.  This was what I was asking earlier when I wondered if the location of the items was hardcoded into the engine.
My tilesets page can be found here:
http://absolute-hyrule-tutorials.solarus-games.org/

January 31, 2017, 09:14:29 PM #5 Last Edit: January 31, 2017, 11:27:33 PM by Christopho
The PNG images can be anywhere (under sprites/) but the items sprite must be exactly sprites/entities/items.dat.

That's what I wanted to know.  Thanks Chris :)  I will need to make a small adjustment to the package then, to avoid anyone else running into this problem
My tilesets page can be found here:
http://absolute-hyrule-tutorials.solarus-games.org/