tModLoader Starvation - No 'Well Fed' buff = harm

Discussion in 'Released' started by hamstar, Feb 2, 2019.

  1. hamstar

    hamstar Steampunker

    [​IMG]
    Starvation

    v2.1.1.6



    Requires Mod Helpers


    See title. Also, you begin with 3 bowls of soup, and your Well Fed buff depletes 2x as quickly. Configurable.

    NEW! (as of v1.3): Food spoilage is now an option in the config settings. Set "FoodSpoilageEnabled": true to enable. IMPORTANT: Due to a limitation with tModLoader, ALL food items will be set to maximum stack size of 1, once this setting is enabled. All existing food stacks will be permanently unstackable (but retain their quantity). Tupperware items exist to let you store spoilable foods in stacks, though. You have been warned.

    NEW! (as of v1.4): Added Unlife Crystals. Reduces max hp by 20. Returns a Life Crystal on use.

    NEW! (as of v2.0): Added setting to enable ingredient spoilage, tupperware items to store stacks of spoilable food or ingredients (drops from skeletons by default), and food expiration inside containers. Also tweaked some vanilla food values and the Pumpkin Pie recipe now requires Hay, Blinkroot Seeds, and Mashed Pumpkin (crafted from regular pumpkin). Also, items that fully spoil permanently turn to rot, now.



    Source available. API available. Config settings here.



    [​IMG]


     
    Last edited: Jun 15, 2019
    Yuyutsu, FiveSix78, Fury and 3 others like this.
  2. Sir AFK

    Sir AFK Terrarian

    Looks really nice. Good work.
     
  3. Goblin Turncoat

    Goblin Turncoat Terrarian

    Probably the easiest possible way to implement a hunger system, nice.
     
  4. hamstar

    hamstar Steampunker

     

    Attached Files:

    Last edited: Jun 15, 2019
  5. Zilophos

    Zilophos Golem

    Love it. Having a good time running it with Overhaul and Stamina.
    Do you have any plans to expand on it? Like a Starbound style hunger system, with added foods/farming?
     
  6. hamstar

    hamstar Steampunker

    That's something I could do as a separate mod, but not right now. Too much on my plate, without reimbursement.
     
  7. Sadness

    Sadness Terrarian

    Nice mod!

    I've got an idea! What about adding smoked food, so it didn't spoil for much longer time (using the chimney as crafting table)
     
  8. hamstar

    hamstar Steampunker

    Interesting, but there's already tupperware for food stacking and preservation.

    Do you want this in addition?
     
    Last edited: May 18, 2019
  9. Madaonario

    Madaonario Terrarian

    how i fix the tupperware freshness problem? tried to do manualy, but i'm kinda new with mods. my config file have only alterations in the duration of the buf after respawn and spoilage for food(true) and ingredients(false). (srry for the engrish)
     
  10. hamstar

    hamstar Steampunker

    Post your config file. Can you describe the problem a bit more?
     
  11. Madaonario

    Madaonario Terrarian

    i don't know some itens names, i'm playing the game in portuguese language. but, for example: i have a food with 20 minutes duration in my inventory, and spoilage start to increase each second, and it works well for me, but when i put the food into tupperware, looks like its increasing the spoilage value. i dont know the number exactly, it's somthing like 10sec spoilage become 2 min(instant) when i bring the item back to inventory. (ps:again, sry for the eng. thanks)
     

    Attached Files:

    hamstar likes this.
  12. hamstar

    hamstar Steampunker

    Try setting TupperwareSpoilageRateScale to 1.0 and see if anything weird is still happening. Note that 1.0 makes it the same as normal spoilage, so Tupperware only works to store foods in stacks; no preservation.

    I'll see if I can't figure what could be causing this, meanwhile.
     
    Madaonario likes this.
  13. Madaonario

    Madaonario Terrarian

    well, I tested it and the effect seems to have been increased. I put on tupperware with 20 secs and remove with 11min approximately. by the way, **** is 0.5 by default I think.
    well, I tested it and the effect seems to have been increased. I put on tupperware with 20 secs and remove with 11min approximately.

    btw, FoodSpoilageRateScale is 0.5 by default I think. would that be a problem?
     
  14. hamstar

    hamstar Steampunker

    It shouldn't be.
    Was your tupperware container empty? It averages the freshness of stored items, so if the freshness is low on items inside the container, it will reduce the freshness of anything you add.
     
  15. Madaonario

    Madaonario Terrarian

    is empty. I used the cheat sheet to do the tests, with just one item or more it still loses its freshness immediately, and it seems that gradually. just taking out and putting the same item about three times makes him rot.
     
  16. hamstar

    hamstar Steampunker

    Have you been using Tupperware to store different types of items (empty one type, start using for another)?
     
  17. Madaonario

    Madaonario Terrarian

    When I do the tests I usually use the same food, I try to stock one and then take two or more. at first I thought it might be some kind of mechanics, but I varied only in quantity, not in items. Is that what you meant?
     
  18. hamstar

    hamstar Steampunker

    Yeah, that's what I meant. I just found a bug involving switching item types in the tupperware, but according to your information, that wouldn't be the issue.
     
  19. Madaonario

    Madaonario Terrarian

    Yes, it happened the first time soon with the first item, and I just had that one. then it should not be. If there something o can help...
     
  20. hamstar

    hamstar Steampunker

    Well, I'll be making a new version to see if some restructuring doesn't give any leads. Do you mind giving it a try?
     
    Madaonario likes this.