Jump to content

Mod edditing goes wrong


Recommended Posts

So, I started to use the mod " Hamlet Stuff - Decorative Structures! " by Kynoox, pretty cool mod. But, I felt like I didn't need some of the stuff and started to mess with the files trying to remove a bunch of recipes from the crafting tab, trying to reduce the cluttering. So what I did was to comment the lines into the recipes.lua (inside the scripts folder) this way:

from:

local tuberrecipe = AddRecipe("tubertree_short", {Ingredient("log", 2), Ingredient("poop", 2)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO,
        "tubertree_placer",
        2,
        nil,
        nil,
        nil,
        "images/inventoryimages/inventoryimages2.xml",
        "tuber_crop.tex")

to:

--local tuberrecipe = AddRecipe("tubertree_short", {Ingredient("log", 2), Ingredient("poop", 2)}, RECIPETABS.REFINE, TECH.SCIENCE_TWO,
        "tubertree_placer",
        2,
        nil,
        nil,
        nil,
        "images/inventoryimages/inventoryimages2.xml",
        "tuber_crop.tex")

I checked in game and so far so good, but when my friends came to my server their stats where all messed up (wrong values, high humidity, spikes in hunger, sanity, etc). I though that just by commenting each line was enough to achieve what I wanted, but it seems I'm totally wrong. What can I do to correctly hide the recipes from the crafting tab without messing the whole thing?

Link to comment
Share on other sites

When you see weird oddities like that it's due to a conflict in the networked messages- each recipe has a number tied to it denoting the index of it and if the length of this table differs from server to client then the client will start using recipes for other networked variables or lack all of the required bits needed to make them work.

 

Also if the AddRecipe function is across multiple lines, then you'll want to multi-line comment it out via:

--[[bob

blab]]

The brackets make it all one comment.

 

For your friends to not get it messed up, you'll want to send them the edited version of the mod to them so the two stay in sync.

There's an alternative to this by doing some hooking with the recipes on the server to stop them from working, though they'll still show on the client side and effectively waste space.

Link to comment
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
 Share

×
  • Create New...