Dora Explora Posted March 19, 2025 Share Posted March 19, 2025 So I want to make a recipe for the "rocks" item for my mod character (just regular rocks that you mine from a boulder), and instead of ingredients I want my character to lose 5 health whenever he crafts one. I'm guessing this has a similar code as the Telltale Heart item, but I'm really bad at coding and I'm not sure how to make this to work properly so if anyone could help I would be grateful. Link to comment https://forums.kleientertainment.com/forums/topic/164950-how-to-make-a-recipe-for-an-already-existing-item/ Share on other sites More sharing options...
Merkyrrie Posted April 6, 2025 Share Posted April 6, 2025 You can use the AddCharacterRecipe function in modmain to add a custom recipe, including to pre-existing prefabs. Tutorial for using said function here: For using health as an ingredient, you can use GLOBAL.CHARACTER_INGREDIENT.HEALTH, like follows as an example: AddCharacterRecipe("rocks", { Ingredient(GLOBAL.CHARACTER_INGREDIENT.HEALTH, 5) }, --...Rest of Recipe here Link to comment https://forums.kleientertainment.com/forums/topic/164950-how-to-make-a-recipe-for-an-already-existing-item/#findComment-1811067 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