Warning and Notes
This tutorial is NOT a real mod that you could place in the mods folder, this is just a tutorial on how to change your files and is only meant for singleplayer games, it should also work on servers but I didn't test that, so always make sure that you save your original files first before going on!
I have the Gog.com version of Starbound, there are mods out for the Steam-version, so you might want to search for those first instead of modding the game yourself. However, if the mods don't fit your needs or you are using the Gog-version, this tutorial works for both.
Let's do it
You need to unpack the whole game into a separate folder. In your Starbound-Folder you'll find a folder called assets (for example: GogGames\Starbound\assets), and within this folder you'll see a file named packed.pak, this is what you need to extract. Here's how...
Open the command console as administrator (for Win10 just type cmd in the taskbar-search and it shows up, right click on
it and chose "open as administrator").
Note: It should also work if you open cmd not as administrator, but I always do it this way just to be on the safe side.
Next you need 3 paths, the command console is working with dos-commands and you need to type in all the things you want to do here in old-school-style :D. So you should open up your notepad and type it in there until we are finished with this step.
First path is the folder which contains the asset unpacker, this file sits in your *Starbound\win32 folder and is called asset_unpacker.exe, look it up and write down (or copy) the path to this file and you should end up with something like this:
Don't forget to add those quotation marks like in my example!
The second path you need is the file which needs to be unpacked now, so in my example this would be the path
and the last path you need is where you want to store the unpacked files, in my example I create a folder named StarboundUnpacked on my E-harddiscdrive (E:\StarboundUnpacked).
Note that you need to extract the files into a folder which is not existent yet so just put a non-existent name afterwards and the path should look like this now:
Your notepad should now contain something like this:
"D:\Gog\Games\Starbound\win32\asset_unpacker.exe" "D:\Gog\Games\Starbound\assets\packed.pak" "E:\StarboundUnpacked\SBunpacked"
Copy everything and fill it into the open command window, Win10 with rightclick, other windows either with ctrl-v or right click and choose paste. Hit enter and wait a few minutes until the Dos-prompt shows again.
Now on to the modding part, don't worry... if you made it this far nothing can go wrong. :D
Step 1 - prepare the food for eternity (or at least let it last a bit longer).
Go to your unpacked folder and find the following file:
SBunpacked\items\rotting.config, open this file in notepad now. You'll see the first line saying
"baseTimeToRot" : 10800,"
change this number to 54000 if you want your food to stay fresh forever (well, forever is in this case 15 hours, instead of 10800 seconds = 3 hours).
Note: 54000 is the highest number you can use (measured in full hours) before you'll get an error that leads to show the food with a 999999 in front of it's description. If you want your food to hold for let's say 5 hours put in the number 18000 instead... remember -> 1 hour = 3600 (seconds).
Leave alone all the other numbers, they are fine and your food is now only rotting in the last hour/minutes.
Step 2 - slow down your hunger bar
Find the file SBunpacked\player.config, open it in notepad. Use the search (menu->edit->search) to find the line that says:
"foodDelta" : "baseValue" : -0.0583 // -70 food over 20 minutes
and change it to:
"foodDelta" : "baseValue" : -0.0097 // -70 food over 120 minutes
This is simple math, originally you'll lose 70 food over 20 minutes, the formula for this is 70:(20x60), simple as that.
For those math professionals that wonder what the hell I just wrote: 20 minutes x 60 is 1200 seconds, 70 food divided by 1200 seconds is that original result/number in the file (-0.0583).
Now I put in a much lower number, which means the food (or the hunger bar if you want so) lasts for 120 minutes in my example: 70:(20x60x6), 70 food divided by 2 hours... 1 hour has 3 times 20 minutes, right? :D
Alright, let's skip all the math and go back to play the damn game. ^^
Oh yes, and for all those people out there that are playing casual but want the hunger bar, just open the file SBunpacked\playermodes.config in your notepad and in the first line where it says:
"casual" : "hunger" : false"
put in a true instead of the false, that's it. You will now getting as hungry as any survivalist out there. :)
Pack game again
All you have to do now is pack everything back and for this you'll need again 3 paths, but a bit different ones this time.
You need the first path leading to the asset packer now, in my example it's
Next one is the path to your recently changed unpacked folder, which now needs to be packed again:
and the last path will be the one where we put the packed file... just make a new folder in E named packedagain or whatever you wish and use this path to pack the file into, in my example it's
NOTE: The file we will pack now must be a name that doesn't exist yet, in my case I will name it newpacked.pak.
Copy all three paths into the command console now, just like you did when unpacking, hit enter and wait until it finishes and the Dos-Prompt will show up again, this can take a few minutes.
When it's ready, just delete the original packed.pak file and put your newly packed file into the asset folder, rename it to packed.pak. Oh, and better save the original somewhere first if you haven't already done this yet. ;)
That's it, now all you have to do is start the game and have fun.