Modding Help Hunger Depletion

Discussion in 'Starbound Modding' started by michealv, Dec 22, 2013.

  1. michealv

    michealv Industrial Terraformer

    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
          }
        ] ]
    }
     
    Last edited: Dec 22, 2013
  2. Terraziel

    Terraziel Astral Cartographer

    change it to "energyincrease" and a negative amount.
     
  3. Dr. Toros

    Dr. Toros Existential Complex

    Removing energy wouldn't make a food make you hungrier anyway.

    That said, I don't believe negative values are supported by most functions.
     
  4. Eathed

    Eathed Pangalactic Porcupine

    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.
     
  5. michealv

    michealv Industrial Terraformer

    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
     
    Last edited: Dec 22, 2013
  6. Eathed

    Eathed Pangalactic Porcupine

    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.
     
  7. Dr. Toros

    Dr. Toros Existential Complex

    I'll play around with this in a couple hours when I have a chance.
     
  8. zortbg

    zortbg Cosmic Narwhal

    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
     
  9. michealv

    michealv Industrial Terraformer

    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.
     

Share This Page