I ask a lot of questions lol, only because I can't find the answers myself. Anyways, I am wanting to add hunger depletion to a consumable food item, yes its the type of food that makes you hungry! weird I know. How to code it though? I've tried this, putting in a negative balance, does nothing though! Code: "effects" : [ [ { "kind" : "health", "amount" : 80 }, { "kind" : "food", "amount" : -25 } ] ] }
Removing energy wouldn't make a food make you hungrier anyway. That said, I don't believe negative values are supported by most functions.
If you want to reduce hunger, you would want to use "kind" : "food" and then give it a negative value. As Dr. Toros said, negatives aren't always supported so you would have to do some testing.
Hmm, energyincrease didn't work either...yeah its not reversing the effects by putting negatives in either. I've also tried "energyUse" which doesn't do anything, but it accepts the code with no crash's / errors Edit: Also tried "kind" : food - i can see it trying to deduct the hunger bar but it just reverts back. Edit : Ok I'm super stuck on this one, will take any suggestions lol
I looked through all of the status effects and didn't see anything that would help. If subtracting food didn't work, it might be impossible for now.
Maybe a custom effect which temporary increases the food depletion RATE, not the food value. like in player.config "foodDepletionRate" : xxx i couldn't find fast some effect or effect source for an example though sorry 'bout that
Well its just one of life's mysteries then isn't it lol. I've looked through the effects files, literally no coding in them, so not sure how to proceed with that idea.