Onedumbazz Posted July 30, 2024 Share Posted July 30, 2024 I'm trying to make a custom recipe for nightmare fuel where it costs 15 HP+Sanity and i keep bumping into two errors. undefined or not declared, and if the game doesn't crash sometimes whenever i mess with the code it partially acknowledges the code, via by two blank squares with 15 in both of them in the recipe for nightmare fuel. If anyone could help with this that be awesome The code is in the modmain lua and wonder is the character's name Spoiler local require = GLOBAL.require local STRINGS = GLOBAL.STRINGS GetPlayer = GLOBAL.GetPlayer local Ingredient = GLOBAL.Ingredient local RECIPETABS = GLOBAL.RECIPETABS local TECH = GLOBAL.TECH local STRINGS = GLOBAL.STRINGS local CHARACTER_INGREDIENT = GLOBAL.CHARACTER_INGREDIENT Recipe = GLOBAL.Recipe Ingredient = GLOBAL.Ingredient TECH = GLOBAL.TECH GLOBAL.Recipe("nightmarefuel", {Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 15), Ingredient(GLOBAL.CHARACTER_INGREDIENT.SANITY, 15)}, RECIPETABS.REFINE, TECH.MAGIC_ONE, nil, nil, "wonder") Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/ Share on other sites More sharing options...
_zwb Posted July 31, 2024 Share Posted July 31, 2024 Could you upload the error logs? Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738391 Share on other sites More sharing options...
Onedumbazz Posted July 31, 2024 Author Share Posted July 31, 2024 yea sure 7 hours ago, _zwb said: Could you upload the error logs? .[sorry still learning how to post stuff on the forums] Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738419 Share on other sites More sharing options...
_zwb Posted August 1, 2024 Share Posted August 1, 2024 CHARACTER_INGREDIENT is declared in hamlet DLC only Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738454 Share on other sites More sharing options...
Onedumbazz Posted August 1, 2024 Author Share Posted August 1, 2024 8 hours ago, _zwb said: CHARACTER_INGREDIENT is declared in hamlet DLC only oh alright, what would be the way to have it be able to have it work for the base and other dlcs? Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738475 Share on other sites More sharing options...
_zwb Posted August 1, 2024 Share Posted August 1, 2024 (edited) 6 hours ago, Onedumbazz said: oh alright, what would be the way to have it be able to have it work for the base and other dlcs? Use Health:RecalculatePenalty and Sanity:RecalculatePenalty for maximum health and sanity costs, you can have a look at prefabs/waxwelljournal.lua as an example Edited August 1, 2024 by _zwb Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738512 Share on other sites More sharing options...
Onedumbazz Posted August 1, 2024 Author Share Posted August 1, 2024 1 hour ago, _zwb said: Use Health:RecalculatePenalty and Sanity:RecalculatePenalty for maximum health and sanity costs, you can have a look at prefabs/waxwelljournal.lua as an example alright, thank you ^^, i'll update when i test it out hope that you're having a wonderful day/night Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738532 Share on other sites More sharing options...
Onedumbazz Posted August 1, 2024 Author Share Posted August 1, 2024 7 hours ago, _zwb said: Use Health:RecalculatePenalty and Sanity:RecalculatePenalty for maximum health and sanity costs, you can have a look at prefabs/waxwelljournal.lua as an example hey, but i genuinely can't see how the waxwelljournal.lua can be used for as an example for recipe making, it only has the summoning shadow-maxwell code in it and it's a lil confusing to see how it could be used for recipes Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738646 Share on other sites More sharing options...
_zwb Posted August 2, 2024 Share Posted August 2, 2024 1 hour ago, Onedumbazz said: hey, but i genuinely can't see how the waxwelljournal.lua can be used for as an example for recipe making, it only has the summoning shadow-maxwell code in it and it's a lil confusing to see how it could be used for recipes Oh wait, are you trying to add an item that cost health&sanity rather than maximum health/sanity? I don't think you can do that easily in non-Hamlet worlds Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738655 Share on other sites More sharing options...
Onedumbazz Posted August 2, 2024 Author Share Posted August 2, 2024 6 minutes ago, _zwb said: Oh wait, are you trying to add an item that cost health&sanity rather than maximum health/sanity? I don't think you can do that easily in non-Hamlet worlds yea, the only instance of it being the empty balloons for wes but haven't have much luck finding the code for the recipe of it but eh, i can settle down with making the nightmarefuel cheaper and try to begin the other goal for the character thanks again for the help ^^ Link to comment https://forums.kleientertainment.com/forums/topic/158763-help-with-editing-nightmare-fuel-recipe-for-hpsanity-dont-starve-solo/#findComment-1738657 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