SenL Posted March 1, 2015 Share Posted March 1, 2015 I still am experiencing this bug "client can't craft some custom items". He would do the crafting animation and nothing happens, or he would straight not do anything.I already added "priority = 0.00###" (where ### is the mod number in steam workshop).Note that host can craft all fine. Link to comment Share on other sites More sharing options...
Kzisor Posted March 1, 2015 Share Posted March 1, 2015 @SenL, you have to set the sort key of the recipe in order for it to work properly for clients. Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 @Kzisor, But setting priority like that should ensure that it loads in the same order on the client and the host, right? It should load after all other mods that don't specify priority, so those sortkeys might be mangled, but this one should be right, I think. @SenL, And the recipes are in the modmain? The other reason why sortkeys could get messed up would be if it's loading the recipe under specific conditions (e.g. when a character prefab is first created). Link to comment Share on other sites More sharing options...
SenL Posted March 1, 2015 Author Share Posted March 1, 2015 Yes the recipes are in modmain and priority is in modinfo. No recipe in character prefab. Here's one:local recipes = { Recipe("speartrap" ,{Ingredient("spear",1) ,Ingredient("log",1) ,Ingredient("rope",1) } ,RECIPETABS.WAR --fight ,{SCIENCE=0} )} for k,v in pairs(recipes) do v.tagneeded = false v.atlas = "images/inventoryimages/" .. v.name .. ".xml"end Not sure if tagneeded is needed or not. Link to comment Share on other sites More sharing options...
Kzisor Posted March 1, 2015 Share Posted March 1, 2015 (edited) @rezecib, there is one thing I've learned about programming through the years; what should happen and what does happen is two very different things. While yes it should happen like that, that doesn't mean it does happen like that. Setting the sort key ensures it to always work. Edited March 1, 2015 by Kzisor Link to comment Share on other sites More sharing options...
rezecib Posted March 1, 2015 Share Posted March 1, 2015 @SenL, No, tagneeded is obsolete now that recipes have builder_tag as one of their constructor arguments. Link to comment 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