Project Zomboid

Project Zomboid

Not enough ratings
RecipeTweaks
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
857.534 KB
14 Jan @ 10:11am
1 Change Note ( view )

Subscribe to download
RecipeTweaks

Description
Recipe tweaks
Hi everybody,

This mod add api for adding alternatives to source item in recipes. Api is primarily for mod creators.
The main reason I created this api is because I found an item from one mod, but I couldn't use it in a recipe from another mod.
It is similar to https://steamproxy.net/sharedfiles/filedetails/?id=566115016&searchtext=item+tweaker but for recipes.
Mod was written in Typescript and compiled into Lua using PipeWrench and TypescriptToLua projects.

Api for other modders !!!

How to Use RecipeTweaks:
- make sure that recipeapi is near start of mod order.
- code
if getActivatedMods():contains("recipetweaks") then -- Import RecipeTweaks API local ____RecipeAPi = require("recipetweaks/api/RecipeAPi") -- Use the API functions to add tweaks to recipes -- (Example tweaks are provided in the code in example mod) local AddTweakAllRecipe = ____RecipeAPi.AddTweakAllRecipe local CreateRecipeSourceChanges = ____RecipeAPi.CreateRecipeSourceChanges -- Add your custom changes here -- Example: Add alternative item to all recipes with Base.Needle AddTweakAllRecipe(CreateRecipeSourceChanges("Base.Needle", { "Hydrocraft.HCBoneneedle" })) -- Example: Add Hydrocraft.HCTincan as an alternative to Base.TinCanEmpty AddTweakAllRecipe(CreateRecipeSourceChanges("Base.TinCanEmpty", { "Hydrocraft.HCTincan" })) -- Example: Reverse the alternative, adding Base.TinCanEmpty as an alternative to Hydrocraft.HCTincan AddTweakAllRecipe(CreateRecipeSourceChanges("Hydrocraft.HCTincan", { "Base.TinCanEmpty" })) end

More you can find if example mod and in repo.

Multiplayer
I have no idea if it works in Multiplayer. In singleplayer is working fine.

Repo
GitHub recipetweaks [github.com]



Workshop ID: 3139510653
Mod ID: recipeteaksexample
Mod ID: recipetweaks