comonavi Posted March 12, 2023 Share Posted March 12, 2023 (edited) I've been using an old thread as reference to change some crafting recipes, and I'm having issues with the "numtogive" value not working in-game. I was hoping someone might look over my amateur coding work and see why I'm having this problem. With this in effect both recipes give 1 item, but changing boards to logs worked as intended. I'm trying to change the feather pencil to give 4, and I don't need to change the mini sign. Thanks in advance for the help! modmain.lua Edited March 12, 2023 by Comonavi Link to comment https://forums.kleientertainment.com/forums/topic/146459-changing-amount-to-give-in-crafting-recipes/ Share on other sites More sharing options...
Haruhi Kawaii Posted March 13, 2023 Share Posted March 13, 2023 16 hours ago, Comonavi said: I've been using an old thread as reference to change some crafting recipes, and I'm having issues with the "numtogive" value not working in-game. I was hoping someone might look over my amateur coding work and see why I'm having this problem. With this in effect both recipes give 1 item, but changing boards to logs worked as intended. I'm trying to change the feather pencil to give 4, and I don't need to change the mini sign. Thanks in advance for the help! modmain.lua 362 B · 2 downloads smhily seems to have solved it Link to comment https://forums.kleientertainment.com/forums/topic/146459-changing-amount-to-give-in-crafting-recipes/#findComment-1624999 Share on other sites More sharing options...
ClumsyPenny Posted March 13, 2023 Share Posted March 13, 2023 Note for the future, don't use "Recipe". Not only it's deprecated, Klei uses "Recipe2" now, but modders should use "AddRecipe2" instead to add their own recipes. Also, let me offer an easier way to accomplish the effect you desire: GLOBAL.AllRecipes.featherpencil.numtogive = 4 Instead of rewriting the entire recipe, you can call the recipe itself to access the specific element you want to change. Link to comment https://forums.kleientertainment.com/forums/topic/146459-changing-amount-to-give-in-crafting-recipes/#findComment-1625012 Share on other sites More sharing options...
comonavi Posted March 14, 2023 Author Share Posted March 14, 2023 (edited) 17 hours ago, ariadnesGambit said: Instead of rewriting the entire recipe, you can call the recipe itself to access the specific element you want to change. Yes, this is exactly what I needed! I used that bit of code for the remainder of the mod and it's working just as intended now, thanks so much for the help. Here is the end result. I'm sure there are some imperfections, but I can't be assed. Thanks again! Edited March 14, 2023 by Comonavi 1 Link to comment https://forums.kleientertainment.com/forums/topic/146459-changing-amount-to-give-in-crafting-recipes/#findComment-1625094 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