Jump to content

Recommended Posts

Im trying to make a mod to add recipes for uncraftable things in another mod. It works fine and allows you to craft everything but all players besides the host see their stats as 100/100. The stats still change presumably tho since you can die to fire.

any help is appreciated, mod files are attached

local Ingredient = GLOBAL.Ingredient
local RecipeTabs = GLOBAL.RECIPETABS
local Tech = GLOBAL.TECH
local _G = GLOBAL
--local Recipe = GLOBAL.Recipe

--make sure Heap of Foods is enabled
if not (_G.KnownModIndex:IsModEnabled("workshop-2334209327") or _G.KnownModIndex:IsModForceEnabled("workshop-2334209327")) then return end

AddRecipe2("turf_pinkpark", { Ingredient("cutgrass", 1), Ingredient("kyno_spotspice_leaf", 1) }, Tech.SCIENCE_TWO, {numtogive = 4}, {"DECOR", "EVERYTHING"})

AddRecipe2("turf_tidalmarsh", { Ingredient("cutreeds", 1), Ingredient("spoiled_food", 2) }, Tech.SCIENCE_TWO, {numtogive = 4}, {"DECOR", "EVERYTHING"})

AddRecipe2("turf_fields", { Ingredient("cutgrass", 1), Ingredient("kyno_twiggynuts", 1) }, Tech.SCIENCE_TWO, {numtogive = 4}, {"DECOR", "EVERYTHING"})

AddRecipe2("turf_stonecity", { Ingredient("cutstone", 1), Ingredient("flint", 2) }, Tech.SCIENCE_TWO, {numtogive = 4}, {"DECOR", "EVERYTHING"})

AddRecipe2("kyno_oaktree_pod", { Ingredient("pinecone", 1), Ingredient("kyno_twiggynuts", 1) }, Tech.SCIENCE_TWO, {numtogive = 2}, {"DECOR", "EVERYTHING"})
name ="HoF Craftable Decor"
description = "Creates crafting recipies for HoF decor items"
author = "Sustenance"
version = "1.0.3"
api_version_dst = 10
priority = 0

icon_atlas = "modicon.xml"
icon = "modicon.tex"

dst_compatible = true
all_clients_require_mod = false
client_only_mod = false

local no_yes_options = {
	{ description =  "No", data = false },
	{ description = "Yes", data =  true }
}

local function LinearOptions(min, max, step, desc)
	desc = desc or ""
    local options = {}
	local index = 1
    for dat = min, max, step do
		options[index] = { description = dat .. desc, data = dat }
		index = index + 1
    end
    return options
end

configuration_options = 
{
    
}

modinfo.lua modmain.lua

Edited by Sustenance
added code blocks

Stats being weird is a very common result of a desync. Information on the client isn't matching the server's. This is likely caused by the fact that you're adding recipes to the game, but only server-side. To fix it, change all_clients_require_mod in modinfo.lua to true.

1 hour ago, ClumsyPenny said:

Stats being weird is a very common result of a desync. Information on the client isn't matching the server's. This is likely caused by the fact that you're adding recipes to the game, but only server-side. To fix it, change all_clients_require_mod in modinfo.lua to true.

unfortunately that didnt work

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