Jump to content

Recommended Posts

Posted

As the title says, I started attempting to create a small mod just to get the hang of things today. I got as far as the item being in the game and being functional but the only thing I'm struggling with is getting an image to populate on the item. If someone could point out my mistake and explain what I'm doing wrong so I can learn I would greatly appreciate! 

root stew.zip

  • Like 1
Posted

Hey there.

26 minutes ago, TMobile said:

If someone could point out my mistake and explain what I'm doing wrong so I can learn I would greatly appreciate!

When working on mods it is always a good idea to keep an eye on the logs for any potential errors or warnings popping up. It's mostly "client-main" and "server-main" you want to keep an eye on. You can find them in "%AppData%\VintagestoryData\Logs".

Your mod got two warnings.

[Warning] Did not find required shape rootstew:shapes/item/food/rootstew.json anywhere. (defined in Shape for item rootstew:rootstew)
[Warning] Texture asset 'rootstew:textures/item/food/rootstew.png' not found (defined in Item rootstew:rootstew).

The first warning is fairly self-explanatory. Your mod doesn't come with a shape. That means that even if your texture would be working, the game would have no way of displaying it.

The second warning tells you what is wrong with the texture. The game is expecting a .png file, while you are supplying a .jpg.

  • Like 1
  • Amazing! 1
Posted
7 hours ago, Brady_The said:

Hey there.

When working on mods it is always a good idea to keep an eye on the logs for any potential errors or warnings popping up. It's mostly "client-main" and "server-main" you want to keep an eye on. You can find them in "%AppData%\VintagestoryData\Logs".

Your mod got two warnings.

[Warning] Did not find required shape rootstew:shapes/item/food/rootstew.json anywhere. (defined in Shape for item rootstew:rootstew)
[Warning] Texture asset 'rootstew:textures/item/food/rootstew.png' not found (defined in Item rootstew:rootstew).

The first warning is fairly self-explanatory. Your mod doesn't come with a shape. That means that even if your texture would be working, the game would have no way of displaying it.

The second warning tells you what is wrong with the texture. The game is expecting a .png file, while you are supplying a .jpg.

This helped so much, I ended up going through and reworking everything/renaming to make it a little different but it does display in game correctly and has the shape i wanted! 

SuperRoot.zip

  • Like 2
Posted

Nice! A little tip so that the super root will show up in the Creative Inventory and the handbook.

Replace

"creativeinventory": {
    "category": [ "food" ]
  }

with

"creativeinventory": {
    "food": [ "*" ]
  }
  • Like 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.