Author Topic: [SOLVED] Item image won't show  (Read 68 times)

Hawkinzon

  • Newbie
  • *
  • Posts: 10
    • View Profile
[SOLVED] Item image won't show
« on: September 26, 2017, 09:56:07 pm »
Hi Everyone,

I am currently working on a item which is working in game, it can be found and will be registred in my inventory and will open e.g doors that require that item.
The problem is that when I get the item from e.g a Chest it will display the dialog but not the image of the item.
I have double checked that the .png image is in the MyQuest\data\sprites\items folder with the correct Dialog ID

Got any ideas about what is going wrong? Can't find any directly tutorial on how to create a new item.
Please let me know if you need any files attached

BR
Hawkinzon
« Last Edit: September 26, 2017, 11:30:30 pm by Hawkinzon »

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1041
    • View Profile
Re: Item image won't show
« Reply #1 on: September 26, 2017, 10:09:49 pm »
The tutorial about creating treasures is here: https://www.youtube.com/watch?v=iG0YRerYphg&index=8&list=PLzJ4jb-Y0ufxwkj7IlfURcvCxaDCSecJY

You need to create a sprite from your PNG image. It might be a sprite with just one frame corresponding to the PNG image, but it still has to be a sprite :)
The sprite needs to be named exactly "entities/items", and have an animation with your item's name and a direction for each variant. The tutorial explains all this with examples.

Hawkinzon

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Item image won't show
« Reply #2 on: September 26, 2017, 10:21:17 pm »
Hi Again,

I think I have done everything right (atleast as far as I can see)

The followed have been done
  • Sprite created and png is saved inside MyQuest\data\sprites\items
  • Dialog created for the item when found (See attached file dialogs.dat line #86)
  • Item added to the Quest Editor and the frame is set (only one frame, Size 16x16)
  • Sprite ID is "items/glasses"

Can't see that I have missed anything.

BR
Hawkinzon

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1041
    • View Profile
Re: Item image won't show
« Reply #3 on: September 26, 2017, 10:34:21 pm »
The sprite id must be "entities/items". It is an animation of this sprite that should be called "glasses".

Hawkinzon

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Item image won't show
« Reply #4 on: September 26, 2017, 11:29:47 pm »
Yes!! That worked :)
The thing is that this item worked before until i downloaded and did put my quest in the .Solarus folder. And now it didn't work..
Wonder were it went wrong along the way..


Well well, it does works now and I'm grateful! :)

BR
Hawkinzon