Jump to content

Can't make the mod run


Rodjah

Recommended Posts

Greetings all!

 

I'm trying to upload a mod which involves adding new items and recipes to the game system, but I'm having troubles making it run. 

 

Here is a description of all the mod.

 

The mod folder is located in: UserName>Zomboid>mods>DriedFruits

DriedFruits folder contains:

    -media (folder)

    -Driedfruitspic.png

    -mod.lua

           name=Dried fruit Food

           poster=Driedfruitpic.png

           id=none

           description=test

---------------------------------------------------------------------------------------------------------------------------------------------

media (folder) contains:

    -lua (folder):

            >server (folder):

                  Loading.lua      

require "Items/SuburbsDistributions"
require "Items/ItemPicker"

DFSprites = {}

--Ensures exisance of graphics.
DFSprites.getSprites = function()

-- Food 
	getTexture("Item_DF_BakingTrayFruit.png");
	getTexture("Item_DF_DriedFruit.png");				
end

-- Add items for kitchen
SuburbsDistributions["kitchen"] = {
    {
        locker ={
            rolls = 1,
            items = {					
                "Base.Base.BakingTray", 25,
                "Base.Base.BakingTray", 25,				
                "Base.DriedFruit", 25,
                "Base.DriedFruit", 25,				

            },
		},	
		
        smallbox ={
            rolls = 1,
            items = {				
                "Base.DriedFruit", 25,
                "Base.DriedFruit", 25,
                "Base.DriedFruit", 25,							
            }
        },
    },
},

Events.OnPreMapLoad.Add(DFSprites.getSprites);

print("DriedFood: SuburbsDistributions added. ");

---------------------------------------------------------------------------------------------------------------------------------------------

 

    -scripts (folder)

            items.txt

module Base
{
    item BakingTrayFruit
    {
        HungerChange    =    -5,
        Weight    =    0.6,
        Type    =    Food,
        DisplayName    =    Baking Tray With Fruit,
        Icon    =    CF_BakingTrayFruit,
        UnhappyChange    =    -5,
        ReplaceOnUse    =    BakingTray,
        ReplaceOnCooked   =   Base.BakingTray;Base.DriedFruit,
        IsCookable    =    TRUE,
        MinutesToCook    =    20,
        MinutesToBurn    =    40,
        BoredomChange    =    -5,
        DaysTotallyRotten    =    8,
        DaysFresh = 5,
        Carbohydrates = 40,
        Proteins = 2,
        Lipids = 0,
        Calories = 168,
    }    
    item DriedFruit
    {
        HungerChange    =    -5,
        Weight    =    0.3,
        Type    =    Food,
        UnhappyChange    =    -10,
        DisplayName    =    Dried Fruit,
        Icon    =    CF_DriedFruit,
        FoodType    =   NoExplicit,
        Carbohydrates = 40,
        Proteins = 2,
        Lipids = 0,
        Calories = 168,
        Packaged = TRUE,
    }
}
           -recipes.txt 
module Base
{

    recipe Make Baking Tray With Chopped Fruit  
	{
	    keep KitchenKnife/ButterKnife/HuntingKnife,
	    Cherry/Orange/Apple/Peach/Pineapple/Strewberrie/Banana,
	    destroy BakingTray,
 
	    Result:BakingTrayFruit,
	    Time:50.0,
	    Category:Cooking,
    }

    recipe Empty Baking Tray With Chopped Fruit  
	{
	    destroy BakingTrayFruit,
 
	    Result:BakingTray,
	    OnGiveXP:NoXP_OnGiveXP,
	    Time:10.0,
	    Category:Cooking,
    }	

-textures (folder) 

           -Item_CF_BakingTrayFruit.png

           -Item_CF_DriedFruit.png

 

This is all what my mod have, but when I activate it at the menu, the game crashes then I have to erase the original folder to make the game run again.

2016-12-19.png

 

If someone could please tell me what I'm doing wrong... 

 

My apologises if I commit any mistake posting, this is the first time I do a post. Also I think I made a mistake posting this on mods>items>help so I'm posting this again.

 

 

Edited by Rodjah
Correcting some mistakes at writing
Link to comment
Share on other sites

1 hour ago, Sky_Orc_Mm said:

Can you upload your MOD, or console.txt file?

Would you please tell me what do you mean by "upload your MOD, or console.txt file"? I think I already showed all the content what the MOD have. :-( 
 

If you mean this upload, here it is.

Dried Fruits.rar

Edited by Rodjah
Link to comment
Share on other sites

If you added new items they won't have the suffix of base.xxxxxx the "base" needs to be replaces with your mod's identifier which if I read correctly is DriedFruits

 

Also, the base.base. is not going to work either... one base will suffice.

 

Try that

Edited by ORMtnMan
Link to comment
Share on other sites

2 minutes ago, ORMtnMan said:

If you added new items they won't have the suffix of base.xxxxxx the "base" needs to be replaces with your mod's identifier which if I read correctly is DriedFruits

So it should be like "DriedFruits.BakingTrayFruit" & "DriedFruits.DriedFruit" ?

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...