asingingbird Posted June 22, 2021 Share Posted June 22, 2021 (edited) I am tring to make alter guardian hat craftable, right now , its recipe was written in recipes.lua like this: Recipe("alterguardianhat", {Ingredient("alterguardianhatshard", 5)}, nil, TECH.LOST, nil, nil, true) What I want to do is to change its recipe, add it to the tech tree so it could show up in the craft tab, I am tring to write these two lines of code in my modmain.lua: AddRecipe("alterguardianhatshard", {Ingredient("moonglass", 6)}, RECIPETABS.CELESTIAL, TECH.CELESTIAL_THREE) AddRecipe("alterguardianhat", {Ingredient("alterguardianhatshard", 5)}, RECIPETABS.CELESTIAL, TECH.CELESTIAL_THREE) But it didn't work, sometimes the game crashes and the log mentioned some "netvar dirty" errors, some other times I can connect to the server, but my character was somehow dead, I mean not really dead, the character can still move, it did not become a ghost, but there is a ghost icon on the day clock (that is a test server, and I am the only player), and the craft tab was wired, the recipes I didn't unlock earlier were all disappeared from the craft tab. If I disable this mod, reopen the game, everything isback to normal, my character isalive again and the craft tab is back too. That is really confusing. Was it because this recipe was locked, so cannot be altered ? Is that even possible to change an existing recipe ? Hope someone could tell me what's really going on. Any help is appreciated, thanks a lot ! ================================================================================================================================================================================================== Update: I figured it out myself . I should set all_clients_require_mod to true in modinfo.lua, because this mod should be running on server all_clients_require_mod = true Edited June 26, 2021 by asingingbird Link to comment https://forums.kleientertainment.com/forums/topic/131070-solved-how-to-change-an-existing-recipe/ 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