Jump to content

[Question] Item has no icon in game, has "Blooo" as name.


bandus

Recommended Posts

Greetings! I am attempting to make my first mod for PZ and I feel like it is pretty simplistic. The intent is to simply add a new type of container to the game.

 

Obviously, I believe I have the mod built properly, however after activating it in the game and then starting a game up, when I access the crafting window I am presented with this:

 

https://www.dropbox.com/s/6zhecv8l4sjl2j9/2015-10-29%2016_03_58-Project%20Zomboid.png?dl=0

 

Clearly, it cannot find the texture for the icon and also "Blooo" seems to indicate that it can't find the name of the item either.

 

I'm just not sure why as it seems to be reading the ingredients for the recipe properly, at the least.

 

Any advice would be appreciated!

Link to comment
Share on other sites

I appreciate the information! As I said, I am a bit new to modding. Is there any particular part of the code I should provide or should I zip up the mod in its entirety and post it to Dropbox? 

 

Edit: After reading the first post in the forum here, I realized I had posted my mod improperly. Here it is in the post as opposed to on Dropbox. My mistake!

 

First file - SeedContainer.lua

TestItemIcon = {} function TestItemIcon.loadTextures()    getTexture("SeedContainer.png");end  Events.OnGameBoot.Add(TestItemIcon.loadTextures);

 
Second file - SeedContainer_items.txt

module Base{    item SeedContainer    {WeightReduction     = 0.25,        Weight              = 2.00,        Type                = Container,Capacity      = 50,        DisplayName         = Seed Container,        Icon                = SeedContainer,     }}

 
Third file - SeedContainer_recipies.txt

module Base{recipe Craft Seed Container{Sheet/Pillow,WoodenStick=3, Result:SeedContainer=1,Time:200.0,} }

Link to comment
Share on other sites

 

I appreciate the information! As I said, I am a bit new to modding. Is there any particular part of the code I should provide or should I zip up the mod in its entirety and post it to Dropbox? 

 

Edit: After reading the first post in the forum here, I realized I had posted my mod improperly. Here it is in the post as opposed to on Dropbox. My mistake!

 

 

I got it to work for you.

 

Some values can only be whole numbers, this happens to me a lot with weapons..

Weight reduction is one of those.

and

Your image file must start with "Item_"

Item_SeedContainer.png

 

First file - SeedContainer.lua

Change your code to the the pink.

TestItemIcon = {}

 

function TestItemIcon.loadTextures()

    getTexture("Item_SeedContainer.png");

end

 

Events.OnGameBoot.Add(TestItemIcon.loadTextures);

 
 
Second file - SeedContainer_items.txt
The way you did the item icon here is correct. Just change the weight reduction to 1, which is the lowest.

module Base

{

    item SeedContainer

    {

WeightReduction     = 1,

        Weight              = 2.00,

        Type                = Container,

Capacity     = 50,

        DisplayName         = Seed Container,

        Icon                = SeedContainer,

    }

}

 
Third file - SeedContainer_recipies.txt

module Base

{

recipe Craft Seed Container

{

Sheet/Pillow,

WoodenStick=3,

Result:SeedContainer=1,

Time:200.0,

}

}

Edited by kinyoshi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...