BTM Posted January 15, 2025 Share Posted January 15, 2025 (edited) Hi everyone. I've been looking into this for a while and I'm now hitting my head against the wall basically. What I want is for my mod character to be able to craft logs and twigs at the cost of 3 and 1 health points, kinda similar to Wormwood's living log crafting. I found about the CHARACTER_INGREDIENT.HEALTH ingredient, which I believe is the same that Wormwood and other recipes use, but it seems it's limited to multiples of 5, which is already more than what I want. I found a few ways to bypass this, but none is ultimately perfect, and so I decided to look for help since I'm the kind of person who pretty much refuses to think there's something you can't mod in a game (at least not something significantly simple like this). - One option is to use the CHARACTER_INGREDIENT.HEALTH ingredient with a value of 5, and then have a listener in the character's prefab to add 2HP back, for a total cost of 3, which is what I want, but of course, this still displays the number 5 in the crafting menu and that's misleading. If there's a way to change that number without changing the rest, that would suffice, but I feel like that's not really possible. - Another option is to have no ingredients in the recipe and then, have a separate listener in the character's prefab manage the logic for decreasing the HP or even removing the item if there was not enough health, but the obvious problem with this, besides the probably unnecessary adding and removing of an item (which is more of a bad practice than a real problem), is that it displays no ingredients in the crafting menu, and of course I want it to show the according health cost. - Last option I could find is making a custom ingredient to display the icons and numbers on the menu, and combine it with the previous one, but I can't find a way to make the game treat the health or any other custom component as the resource required, and using a normal custom ingredient makes said ingredient necessary, which is already wrong. That's where the "optional ingredient" comes in, so I can display the ingredient in the menu but have the listener logic take care of the health on its own. I've been trying to look into the definition of the CHARACTER_INGREDIENT.HEALTH in the builder.lua file to see if I can replicate the functioning of it into a new custom ingredient that doesn't have the obstacle of requiring multiples of 5 amounts, but I can't figure this out. If somebody can give me a hand, or some guidance, I'll be very very grateful. And if someone knows of some mod that uses something similar, it would likely be enough help too. In any case, many thanks in advance! Edited January 15, 2025 by BTM Link to comment https://forums.kleientertainment.com/forums/topic/163160-custom-health-ingredient-optional-ingredients-in-custom-recipe/ Share on other sites More sharing options...
yanecc Posted January 16, 2025 Share Posted January 16, 2025 Any attempt to change the implementation of CHARACTER_INGREDIENT_SEG is somewhat difficult, and as you mentioned, it could lead to discrepancies between the in-game display and the actual effects. As a feasible alternative, I recommend increasing the amount of resources gained from crafting, while keeping the health consumption a multiple of 5. Link to comment https://forums.kleientertainment.com/forums/topic/163160-custom-health-ingredient-optional-ingredients-in-custom-recipe/#findComment-1786062 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