Couple of questions.
0

4 posts in this topic

Recommended Posts

Probably fairly simple issues, but i cant figure out how to get around them.

First, id like to modify few existing items. If i just copy items.txt file into mod folder and do changes there, it works. But as i understand it is possible to make changes to only specific items, excluding those i do not need.

So i created new file(id like to create separate files for each category, to make it easier to pinpoint problems and make changes), items_books_changed.txt, copied in there only book data, with all the usual stuff added. But apparently im missing something somewhere as upon loading i get errors(that i have no idea how to view) and i cant access crafting menu.

module items_books_changed
{
	imports
	{
		Base
	}
	item BookTrapping1
    {
        NumberOfPages	=	220,
        Weight	=	0.8,
        Type	=	Literature,
        DisplayName	=	(Skill)Trapping 1,
        Icon	=	Book4,
        SkillTrained = Trapping,
        LvlSkillTrained = 1,
        NumLevelsTrained = 2,
    }

...........

    item BookForaging5
	{
		NumberOfPages	=	380,
		Weight	=	0.8,
		Type	=	Literature,
		DisplayName	=	(Skill)Foraging 5,
		Icon	=	Book10,
        SkillTrained = Foraging,
        LvlSkillTrained = 9,
        NumLevelsTrained = 2,
	}
}

Second problem is that im trying to add items to foraging activity. I found SGScavengeDefinition.lua, but this file do not state probabilities of items being found. Plus id like to add new category "junk" to the list, but im not sure how to do it. As when i just add new items to this file, nothing seem to happen as i never find items i added.

edit: ok, wrong subforum, cant figure out how to delete topic.

 

Edited by Dirmagnos

Share this post


Link to post
Share on other sites

Do you have this Points after the first Book in your Script? Maybe this can cause an Error.

 

Foraging:
 

Spoiler

 

Create a Lua File in your Media/Lua/Server Folder of your Mod

 

require "Farming/ScavengeDefinition";

 

getTexture("Item_YourTexture.png");

 

local YourItem = {};
YourItem.type = "ModName.YourItem";
YourItem.minCount = 1;
YourItem.maxCount = 6;
YourItem.skill = 8;

 

table.insert(scavenges.forestGoods,YourItem);

 

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

 

For Example

 

getTexture("Item_PWSBone.png");

 

local PWSBone = {};
PWSBone.type = "PWS.PWSBone";
PWSBone.minCount = 1; <---- The minimal amount you can find
PWSBone.maxCount = 1; <----- Maximal amount you can find
PWSBone.skill = 1; <----- Skill you need

 

table.insert(scavenges.forestGoods, PWSBone); <----- Category for you Item

 

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

 

At the Moment you have 5 Categorys you can Add for foraging berries, mushrooms, insects (all Animal related Stuff Like Frogs or Eggs), forestGoods (Material like Logs or Stones), medicinalPlants.

 

 

Can you post the Error you get (can be found in the console.txt in Local HD/User/user.User-PC/Zomboid

 

Share this post


Link to post
Share on other sites

Remade whole thing from a scratch, turned out to be pointless, as game reads from everything presented in this folder, even tho i had all those reference files renamed and without extensions. Removed those and all started to work.

Now i need to figure out how to make foraging custom items work and make cookable recipes(i presume it has something to do with evolvedrecipes.txt, but right now need to figure out how it works step-by-step). 

Share this post


Link to post
Share on other sites

If you find a way to make evolved Recipes pls post a step by step. I have try some methods but cant find a solution.

I decide to make cooking Recipes "the old way" without evolving Recipes.

 

Maybe you find more informations about foraging/scavenge in /Media/lua/client/Timed Actions/ISScavengeAction

Same under Media/lua/client/ISUI/ISScavengeUI

 

I think you can find here some informations about scavenge.

I hope you find what you search.

Share this post


Link to post
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
0