Ashiel Posted March 7, 2020 Share Posted March 7, 2020 (edited) SOLVED: Had to add "all_clients_require_mod = true" in the modinfo.lua because the change was only affecting the host server. I think. So I recently created this mod: Harvest Life. Works fine when I run a server through the client. However when using it with a dedicated server and connecting to it via the client it doesn't work. I'm guessing that something in the code is aiming the effects wrong, but I don't know enough about DST modding (nor can I find a list of commands and what they are for). I probably wouldn't have even noticed this but discovered this problem on accident. Here's the code for the modinfo.lua and modmain.lua. Can someone help me figure out what's wrong? name = "Harvest Life" description = "An agricultural mod." author = "Ashiel" version = "0.0.0.1" --icon_atlast = "modicon.xml" --icon = "modicon.tex" client_only_mod = false dst_compatible = true dont_starve_compatible = true reing_of_giants_compatible = true api_version = 10 configuration_options = { -- // FARMING CONFIGS { name = "compost_farm", label = "Compost Farms", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Farms use rot, twigs, or stone. Farms don't require science machine." }, { name = "simple_bucket", label = "Realistic Bucket", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Fertilizer bucket requires poop and logs." }, { name = "renewable_bees", label = "Renewable Bees", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Bee Boxes require wood, petals, and bees." }, -- // TRAP CONFIGS { name = "sturdy_trap", label = "Sturdy Trap", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Basic traps (rabbit, frog, spider) are sturdy." }, -- // FISHING ROD CONFIGS { name = "rod_rope", label = "Rope Fishing Rod", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Fishing rod uses Rope instead of Silk." }, { name = "sturdy_rod", label = "Sturdy Fishing Rod", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Fishing rod is sturdy." }, -- // BUG NET CONFIGS { name = "bug_rope", label = "Rope Bug Net", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Bug Net uses Rope instead of Silk." }, { name = "sturdy_net", label = "Sturdy Bug Net", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Bug net is sturdy." }, -- // BIRD TRAP CONFIGS { name = "bird_rope", label = "Rope Bird Trap", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Bird Trap uses Rope instead of Silk." }, { name = "sturdy_birdtrap", label = "Sturdy Bird Trap", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Bird Trap is sturdy." }, -- // ITEM STACKING CONFIGS { name = "stack_fish", label = "Stackable Pond Fish", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Pond fish stack (default 40)." }, { name = "stack_eel", label = "Stackable Pond Eels", options = { {description = "Yes", data = true}, {description = "No", data = false}, }, default = true, hover = "Pond eels stack (default 40)." }, } STRINGS = GLOBAL.STRINGS RECIPETABS = GLOBAL.RECIPETABS Recipe = GLOBAL.Recipe Ingredient = GLOBAL.Ingredient TECH = GLOBAL.TECH -- CONFIG SETTINGS COMPOSTFARM = GetModConfigData("compost_farm") SIMPLEBUCKET = GetModConfigData("simple_bucket") STURDYROD = GetModConfigData("sturdy_rod") RODROPE = GetModConfigData("rod_rope") STURDYNET = GetModConfigData("sturdy_net") BUGROPE = GetModConfigData("bug_rope") STURDYBIRDTRAP = GetModConfigData("sturdy_birdtrap") BIRDROPE = GetModConfigData("bird_rope") STURDYTRAP = GetModConfigData("sturdy_trap") STACKFISH = GetModConfigData("stack_fish") STACKEEL = GetModConfigData("stack_eel") RENEWBEES = GetModConfigData("renewable_bees") -- // Makes farms easier to craft and without science if COMPOSTFARM then AddRecipe("slow_farmplot", {Ingredient("spoiled_food", 4),Ingredient("twigs", 4)}, RECIPETABS.FARM, TECH.NONE, "slow_farmplot_placer") AddRecipe("fast_farmplot", {Ingredient("spoiled_food", 6),Ingredient("rocks", 4)}, RECIPETABS.FARM, TECH.NONE, "fast_farmplot_placer") end -- // Makes buckets of poop easier to craft and without science. if SIMPLEBUCKET then AddRecipe("fertilizer", {Ingredient("poop",3), Ingredient("log", 4)}, RECIPETABS.FARM, TECH.NONE) end -- // Makes bees renewable. if RENEWBEES then AddRecipe("beebox", {Ingredient("boards", 4),Ingredient("petals", 4),Ingredient("bee", 4)}, RECIPETABS.FARM, TECH.SCIENCE_ONE, "beebox_placer") end -- // Makes Pondfish stackable if STACKFISH then AddPrefabPostInit("pondfish", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:AddComponent("stackable") inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM end) AddPrefabPostInit("fishmeat_small", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM end) AddPrefabPostInit("fishmeat_small_cooked", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM end) end -- // Makes Pondeels stackable if STACKEEL then AddPrefabPostInit("pondeel", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:AddComponent("stackable") inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM end) end -- // Removes durability from Fishing rod if STURDYROD then AddPrefabPostInit("fishingrod", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:RemoveComponent("finiteuses") end) end -- // Fishing Rod uses Rope instead of Silk. if RODROPE then AddRecipe("fishingrod", {Ingredient("twigs", 2),Ingredient("rope", 2)}, RECIPETABS.SURVIVAL, TECH.SCIENCE_ONE) end -- // Removes durability from Bug Net if STURDYNET then AddPrefabPostInit("bugnet", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:RemoveComponent("finiteuses") end) end -- // Bug Net only uses Rope. if BUGROPE then AddRecipe("bugnet", {Ingredient("twigs", 4), Ingredient("rope", 4)}, RECIPETABS.SURVIVAL, TECH.SCIENCE_ONE) end -- // Removes durability from Bird Trap. if STURDYBIRDTRAP then AddPrefabPostInit("birdtrap", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:RemoveComponent("finiteuses") end) end -- // Birdtrap uses Rope. if BIRDROPE then AddRecipe("birdtrap", {Ingredient("twigs", 3),Ingredient("rope", 4)}, RECIPETABS.SURVIVAL, TECH.SCIENCE_ONE) end -- // Removes durability from basic Trap. if STURDYTRAP then AddPrefabPostInit("trap", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:RemoveComponent("finiteuses") end) end Edited March 8, 2020 by Ashiel Link to comment https://forums.kleientertainment.com/forums/topic/116263-mod-works-through-client-not-on-dedicated-server/ Share on other sites More sharing options...
Ashiel Posted March 8, 2020 Author Share Posted March 8, 2020 Actually, nevermind. I fixed it. I think I needed to set it so all clients require the mod. Sorry about that. Link to comment https://forums.kleientertainment.com/forums/topic/116263-mod-works-through-client-not-on-dedicated-server/#findComment-1313798 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