Modding Help Personal Inventory, refrigerated

Discussion in 'Starbound Modding' started by Endorphinz, Aug 19, 2018.

  1. Endorphinz

    Endorphinz Void-Bound Voyager

    I'm fairly new to modding Starbound. Which is not to say I know nothing about it, but consider me a complete beginner in most regards. I was told that the people here were very willing to lend help.

    I was looking to make a simple mod that would cause the player's food inventory tab to behave like refrigerated storage, that is, food does not spoil as long as it's held in there. I'm not sure where the relevant scripts or objects are located though, the only thing I could find was the \scripts\items\rotting.lua script

    So, if anyone could point me in the right direction for figuring this out, I would appreciate it!
  2. Quenn1599

    Quenn1599 Scruffy Nerf-Herder

    In player.config inside the unpacked assets there's an "age items every: ..." field on line 12. Still looking for an item age multiplier for the player inventory like there is in the fridge containers, though.
    The Avelon likes this.
  3. The Avelon

    The Avelon Phantasmal Quasar

    So you do want food to rot, but only when not refrigerated or held? Because patching rotting.lua is how mods like Fresh Fruit work.

    You could patch player.config to remove the food aging line, and food in normal storage would rot. That might be what you are shooting for.
  4. Endorphinz

    Endorphinz Void-Bound Voyager

    Hey thanks for the quick responses.

    Yes, that is correct, I want food to expire and behave normally outside of your inventory, I'm not looking to change the spoiling mechanic. If that's what the food aging line actually does, then it's exactly what I'm looking for.

    I know that the unpacked files do their best to be self-explanatory, but a lot of the parameters are completely mysterious to me.
  5. Endorphinz

    Endorphinz Void-Bound Voyager

    So I just tried it, and completely removing "ageitemsevery" is not allowed, just crashes the game, so obviously that is needed for something.
  6. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    what they mean is set the value to an extreme, for example 99999999999999999999999999999999999 (if i'm right its an interval. also this number may be too big, so don't use this 1)
    The Avelon likes this.
  7. Endorphinz

    Endorphinz Void-Bound Voyager

    Oh, well oops, I guess that should have been my next test. I Actually set the value to "0" instead, and that seems to have actually stopped the rotting timer in my inventory.

    Of course, testing this stuff out is just a lot of waiting around, so will do a bit more testing.
  8. The Avelon

    The Avelon Phantasmal Quasar

    Sweet. Here, I kludged together a mod version based on your experiment. I never thought to make this kind of alteration myself.

    If you are testing something like this, sometimes you can help things along by exaggerating existing code. Here I set the base time to rot from 10800 to 1, and made your alteration.

    You can see that things you pick up start out nearly rotten but never actually turn to rot in your inventory, while when thrown on the ground they rot in a few seconds! So it looks like you were right. :)

    If you wanna use this for real, just delete the items folder from inside the Fresh Hands folder and you're good to go. It patches instead of overwriting your player.config file so it won't conflict with stuff.

    Attached Files:

  9. Endorphinz

    Endorphinz Void-Bound Voyager

  10. The Avelon

    The Avelon Phantasmal Quasar

    Oh my bad; I assumed you were directly editing. I guess you aren't *that* new! :D Good stuff.

    Yeah, there is really only the one right way to write that particular thing as far as I know.
  11. greenRAM

    greenRAM Giant Laser Beams

    This is a really neat idea! If we have the technology to store stuff with the matter manipulator, then why not make it refrigerated storage as well? Sounds totally lore friendly and immersive!, just a fun way to remove food rot from play without completely gutting the system.

    Do you plan on publishing this awesome edit on here?
    Last edited: Sep 2, 2018

Share This Page