Author Topic: [SOLVED] Error: Cannot create pickable treasure  (Read 1026 times)

ffomega

  • Full Member
  • ***
  • Posts: 223
    • View Profile
    • Solarus Resource & Tutorial Site
[SOLVED] Error: Cannot create pickable treasure
« on: January 31, 2017, 05:58:50 am »
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?
« Last Edit: January 31, 2017, 11:53:44 pm by ffomega »
My tilesets page can be found here:
http://absolute-hyrule-tutorials.solarus-games.org/

Diarandor

  • Hero Member
  • *****
  • Posts: 1046
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Error: Cannot create pickable treasure
« Reply #1 on: January 31, 2017, 08:10:41 am »
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.”

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Error: Cannot create pickable treasure
« Reply #2 on: January 31, 2017, 12:28:46 pm »
You can move the png, but you need to modify the .dat where the source pointer is located

Shimon

  • Guest
Re: Error: Cannot create pickable treasure
« Reply #3 on: January 31, 2017, 05:33:29 pm »
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.
« Last Edit: January 31, 2017, 05:36:19 pm by Shimon »

ffomega

  • Full Member
  • ***
  • Posts: 223
    • View Profile
    • Solarus Resource & Tutorial Site
Re: Error: Cannot create pickable treasure
« Reply #4 on: January 31, 2017, 08:53:53 pm »
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/

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1173
    • View Profile
Re: Error: Cannot create pickable treasure
« Reply #5 on: January 31, 2017, 09:14:29 pm »
The PNG images can be anywhere (under sprites/) but the items sprite must be exactly sprites/entities/items.dat.
« Last Edit: January 31, 2017, 11:27:33 pm by Christopho »

ffomega

  • Full Member
  • ***
  • Posts: 223
    • View Profile
    • Solarus Resource & Tutorial Site
Re: Error: Cannot create pickable treasure
« Reply #6 on: January 31, 2017, 11:07:45 pm »
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/