Modding Help Can't find food/hunger files to mod

Discussion in 'Starbound Modding' started by soopytwist, Jul 23, 2016.

  1. soopytwist

    soopytwist Pangalactic Porcupine

    I'm trying to mod the food stats, speed of hunger etc. The files I've tried modifying so far have had no effect in the game. I want to decrease the speed of hunger, slow health loss when starving and reduce time that food rots.

    I'd like to play the game in survival mode but I just know the current hunger/food mechanics will annoy me.

    I'm pretty sure I set-up my mod correctly (made a "modname.pak" file and stuck it on the mods folder - although the description I entered in my .modinfo file doesn't work) so perhaps I'm just not editing the right files.
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    We no longer use modinfo we use .metadata
    I hopefully will have an updated tutorial by next week for 1.0
  3. soopytwist

    soopytwist Pangalactic Porcupine

    What the heck is wrong with these forums? I just tried to post again but it duplicated my previous post so I deleted the copy and it deleted both instead.

    Can someone please explain to me why a rotting multiplier value of 0 rots a carrot instantly but a vale of 90 rots it incredibly slowly? This makes no sense but that's exactly what's happening when I modify the rotting multipliers for various foods from their default values of 1.0.
  4. Image Not Available

    Image Not Available Pangalactic Porcupine

    Well its a multiplier, presumably there is some base total rot time defined somewhere and by setting the multiplier to 0 you're setting final time to rot to 0 as well.
  5. soopytwist

    soopytwist Pangalactic Porcupine

    Right, so changing the baseTimeToRot in rotting.config from 10800 to...something higher? Will slow down rotting? You can't set it to 0 as I discovered because then it rots ever thing instantaneously.

    Another modification that doesn't work is increasing stack sizes. I changed stack size for carrots from 1 to 25, doesn't work. I still can't stack carrots.

    "itemName" : "carrot",
    "rarity" : "Common",
    "price" : 60,
    "category" : "food",
    "eventCategory" : "eventCrop",
    "inventoryIcon" : "carroticon.png",
    "description" : "Mmm crunchy.",
    "shortdescription" : "Carrot",
    "foodValue" : 5,
    "tooltipKind" : "food",
    "builder" : "/items/buildscripts/buildfood.lua",
    "maxStack" : 25,
    "itemAgingScripts" : ["/scripts/items/rotting.lua"],
    "rottingMultiplier" : 1.0,
    "blockingEffects" : [
    "learnBlueprintsOnPickup" : [ "carrotbread", "carrotjuice" ]
  6. Image Not Available

    Image Not Available Pangalactic Porcupine

    That should change rotting times for all foods globally to be higher, yeah. Although if all you want is survival mode without hunger you might look into just turning it off entirely in playermodes.config, otherwise I would look at the itemAgingScripts line and rotting.lua if you want to remove and/or fundamentally change how rotting works.

    Someone else already made a food stacking mod, might want to look at that one for a template on how to do it.
  7. soopytwist

    soopytwist Pangalactic Porcupine

    He made it as a patch so it was difficult but I managed to unpack it to take a look. He just has it change the MaxStack value to 1000 for each food item, exactly the same as me changing MaxStack manually to 25 though.

    I think it's down to the rotting.

    I used /admin and spawned three carrots. The third carrot I spawned shortly after the first two. When I picked them up I could stack the first two carrots but not the third. This must mean the rot time of the first two carrots was the same so it allowed me to stack them. The third carrot had a different rot time so it won't stack with the other two. The author of that food stack mod does say you can't stack food items of different rot times so included a new item, a food stacker, that can stack them. This would be a pain to use though so I'd rather just remove rotting as a game mechanic entirely.

    This is what I've done:

    In rotten.config I set baseTimeToRot from 10800 to 999999.

    In all of the food item files I set their rottingMultiplier to 9999 (the higher the multiplier the slower the rot).

    I also set all maxStack from 1 to 25.

    This appears to work although I had to start a brand new game. The only problem is the rot scale text for each food item has glitched. Instead of it saying: Extremely well preserved
    it says [999999,"Extremely well preserved"].

    It's like setting a really high multiplier has somehow screwed up the text strings.
    --- Post updated ---
    And stacks still don't work. I had 4 tins of food stacked but when I purchased some more from the shop at the outpost they don't stack. I give up. Going to wait for patches and updates and play something else instead.
    --- Post updated ---
    And stacks still don't work. I had 4 tins of food stacked but when I purchased some more from the shop at the outpost they don't stack. I give up. Going to wait for
    --- Post updated ---
    I don't get this forum. It's messed up, it posts and duplicates things I've posted hours or days ago.

    My stacks are completely random now. I disabled rotting in all the food item files by removing "rottingMultiplier" and yet food still stacks in random amounts. I also disabled the text for how fresh an item is. This only works for new items in the inventory though so any current food items have a weird text string issue.
    I don't get it. Rotting is not a thing any more but food that used to rot is still not stacking properly.

Share This Page