jekart021 Posted June 6, 2021 Share Posted June 6, 2021 (edited) I have a problem adding a crafting item. When I try to add the character's health to the ingredient, the game closes automatically when the world starts. Spoiler local craft_1 = AddRecipe("craft_1", {Ingredient(CHARACTER_INGREDIENT.HEALTH, 40), Ingredient("spidergland", 1), Ingredient("nightmarefuel", 5)}, RECIPETABS.MAGIC, TECH.MAGIC_THREE) craft_1.product = "shadowheart" craft_1.image = "shadowheart.tex" craft_1.numtogive = 1 Edited June 6, 2021 by jekart021 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/ Share on other sites More sharing options...
Monti18 Posted June 6, 2021 Share Posted June 6, 2021 Have a look at the server log, there you can see where the error lies. But judging from your code, you probably need to add GLOBAL. CHARACTER_INGREDIENT.HEALTH instead of CHARACTER_INGREDIENT.HEALTH. 1 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466883 Share on other sites More sharing options...
jekart021 Posted June 7, 2021 Author Share Posted June 7, 2021 (edited) this is the problem that there is no server log, and GLOBAL.CHARACTER_INGREDIENT.HEALTH did not help Edited June 7, 2021 by jekart021 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466954 Share on other sites More sharing options...
Monti18 Posted June 7, 2021 Share Posted June 7, 2021 Post the mod and I will see what I can do 1 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466965 Share on other sites More sharing options...
jekart021 Posted June 7, 2021 Author Share Posted June 7, 2021 cavemod.zip Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466973 Share on other sites More sharing options...
Monti18 Posted June 7, 2021 Share Posted June 7, 2021 You get a server log, remember that it's not the same as client log. From this log I could see that the error was CHARACTER_INGREDIENT.HEALTH is nil. I added GLOBAL before this and now the server started. 1 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466975 Share on other sites More sharing options...
jekart021 Posted June 7, 2021 Author Share Posted June 7, 2021 Wait, maybe I added GLOBAL to the wrong place, do not tell me where exactly you added it. And yes, I realized that I confused the client and server logs And could you tell me where to find the server log? Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466976 Share on other sites More sharing options...
Monti18 Posted June 7, 2021 Share Posted June 7, 2021 Server logs can be found at Documents\Klei\DoNotStarveTogether\[yourid]\Cluster_[yournumber]\Master\server_log.txt 1 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466980 Share on other sites More sharing options...
jekart021 Posted June 7, 2021 Author Share Posted June 7, 2021 What about GLOBAL? Do not tell me where you put it Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466981 Share on other sites More sharing options...
Monti18 Posted June 7, 2021 Share Posted June 7, 2021 I'm sorry, you wrote I should not tell you where to put it I put it in line 67, it looks like this: local craft_1 = AddRecipe("craft_1", {Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 40), Ingredient("spidergland", 1), Ingredient("nightmarefuel", 5)}, RECIPETABS.MAGIC, TECH.MAGIC_THREE) craft_1.product = "shadowheart" craft_1.image = "shadowheart.tex" craft_1.numtogive = 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/130603-hp-in-craft/#findComment-1466983 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