futuromodder Posted September 25, 2023 Share Posted September 25, 2023 I'm new in lua modding world. I would like to make a custom recepies mod, where i can find the default in game recepies to find out the logic behind food crafting in the game? Link to comment Share on other sites More sharing options...
excon Posted September 25, 2023 Share Posted September 25, 2023 (edited) Hi Patrick gives a great overview of how mods work in general use this as your entry into the rabbit hole (not affiliated just how i got started ) start with that and read below https://pzwiki.net/wiki/Modding Edited September 25, 2023 by excon Link to comment Share on other sites More sharing options...
Betcher Posted October 9, 2023 Share Posted October 9, 2023 Everything is in Project Zomboid\media\scripts\recipes.txt For more complex things there are interactions in Project Zomboid\media\lua\server\recipecode.lua but maybe keep it simple at first, PotOfSoupRecipe is what you can look up if you want more complex dishes to brute force the code to be similar. I recommend getting visual code studios and just using the search function for anything you need. You can mod things directly in there. If you want to publish a mod look at that above video all my own mods are for myself so personally I only know how to publish to githib for other people to download off there and merge to their own sets of things. Link to comment Share on other sites More sharing options...
JamesWalker Posted October 16, 2023 Share Posted October 16, 2023 Yeah i also want this information because i also want to know the logic behind this Link to comment Share on other sites More sharing options...
Betcher Posted October 16, 2023 Share Posted October 16, 2023 Alright since I gave slightly worse info than I intended before Ill just spell it out I guess. First you find what kind of container you want to use to start the recipe, Im going to go with a cooking pot this time, and find a similar recipe that goes with it item PotOfStew { DisplayName = Pot of Stew, DisplayCategory = Food, Type = Food, Weight = 3, Icon = PotFull, BadCold = true, BadInMicrowave = true, CookingSound = BoilingFood, EatType = Pot, IsCookable = TRUE, ReplaceOnUse = Pot, MinutesToCook = 70, MinutesToBurn = 140, DaysFresh = 3, DaysTotallyRotten = 5, HungerChange = -40, ThirstChange = -40, UnhappyChange = -20, Calories = 310, Carbohydrates = 26.3, Lipids = 14.5, Proteins = 3.8, StaticModel = CookingPot, WorldStaticModel = CookingPotSoup_Ground, Tags = HasMetal, } The stew uses a cooking pot so you can just rename it and use all the stuff inside and change it how you like. Most of the nutrition only matters for what you put inside so I wouldnt change it. Youll notice ingredients have EvolvedRecipe = Soup:10;Stew:10;Burrito:10|Cooked, in them showing what they can be added to. This comes from evolvedrecipe Stew { BaseItem:WaterPot, MaxItems:6, ResultItem:PotOfStew, Cookable:true, Name:Prepare Stew, } in Project Zomboid\media\scripts\evolvedrecipes.txt. So youre going to need to make one of those for your new recipe. On the other hand you can keep it simple and just add a unique recipe at Project Zomboid\media\scripts\uniquerecipes.txt and skip al the custom stuff uniquerecipe Tomato Soup { BaseRecipeItem:PotOfSoup, Item:farming.Tomato, Item:farming.Tomato, Item:farming.Tomato, Item:farming.Tomato, Hapiness:15, Boredom:15, } As you can see all you need is to pick a base recipe, throw in the ingredients, and youll get a custom thing looking just like it with custom stats. You could add the endurance/stress/sickness mods form different food items into it the same way you can to boredom. It would probably be easier to do since youre going to be basically doing the exact same thing unless youre adding sprites into the mix. Just make a bunch of custom stuff like tuna sandwich or something instead of making a new base recipe that involves the same steps and items and sprite of a sandwich. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now