Starbound

Starbound

60 ratings
Universal Food Preservation
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
17.987 KB
1 Feb, 2023 @ 1:16pm
12 Feb, 2023 @ 4:55am
7 Change Notes ( view )

Subscribe to download
Universal Food Preservation

In 1 collection by Amega
Startbound QoL
6 items
Description
This mod allows to preserve food, preventing it from spoiling and also making it stackable.

First, you need to craft Food Preservation Machine in the Inventors Table. Then you need to have Food Cans made in the Furnace.

After that the Machine will preserve virtually any food in the game, putting it into cans, which will also make food stackable.

Left-clicking a can of food in your handt will unpack it and give the player original food along with a Used Food Can. The latter can then be partially restored at Foraging (Agriculture) Table.

Food cans can also be baught at Infinity Express in the Outpost in case you're not willing to mine resources yourself.
24 Comments
hyena.tar.gz 11 Nov, 2024 @ 12:30am 
You got me up at 4 in the morning to can mashed potatoes just to say all this.
Silver Sokolova 11 Nov, 2024 @ 12:23am 
Oh, also! I think this is a very cool mod. In your util file, I recommend changing the `parameters = itemConfig.config` line to `parameters = {description = itemConfig.config.description, price = itemConfig.config.price, rarity = itemConfig.config.rarity}`, since the current method will store the entire item file in the item and can cause issues such as items that have scripts being unopenable when canned (the script under parameters will take priority over the default script`. You'll need to set the canned food item's tooltipKind to `food` for the 'left-click to uncan' text to show up, too. These are technical changes that will help keep player's save data file sizes down, which could be important for Steam Deck users and for servers

you may want to remove the `item.parameters.maxStack = 999` line. if you don't set a max stack in the item file, it uses a default value (1000 by default). if you don't do the first recommendation, this wont work
Silver Sokolova 11 Nov, 2024 @ 12:08am 
Hi! The issue is on line 37 of `/scripts/am_foodpreservation/util.lua`. If you change it to `sb.logInfo(sb.printJson(baseFood.name))` it will work.

The error occurs because Betabound uses a new buildscript for its foods- one that checks if Improved Food Descriptions is installed, and if so, run the vanilla buildscript in order to get a list of status effects. Some status effects include a percentage symbol in their name, which is used in sb.logInfo to specify that it's a value meant to be replaced (ie, `name = "Silver"; sb.logInfo("My name is %s!", name)` will print "My name is Silver!", the %s gets replaced). Since no value is given as a replacement, it errors. The status effect list is then stored as a parameter on the item instead of under config, so it's printed to the log. The next Betabound update changes the buildscript to store the status effects in the config instead of parameters.
Davoker 10 Nov, 2024 @ 6:55am 
@HyenaTown You should tell that to Silver Sokolova, the developer of Betabound, since the alien burger is a ‘refurbished’ product by Betabound, she will probably have to add compatibility with this mod, I guess, if she wants to do so.
hyena.tar.gz 10 Nov, 2024 @ 6:35am 
Seems that the Alien Burger from Betabound produces a Lua error that breaks the machine until you break it with your MM and place it again. I'm not sure why, because the log suggests there's something wrong with Lua logging the error.
Amega  [author] 14 Jan, 2024 @ 8:30am 
@Davoker, thanks! Will have a look
Davoker 13 Jan, 2024 @ 3:57am 
The position of the X is wrong, it is just that, in the "am_foodpreservationmachine.config" file, the correct position for the "close" section is:

[117, 170]

With that the X is positioned in its place.
Davoker 13 Jan, 2024 @ 3:41am 
I love this mod, something similar I wanted to do, a food preserving machine.

Just a detail, in the window of the machine, in its interface, the "X" to close the window is missing.
Stratateles 9 Apr, 2023 @ 2:43am 
Hey, just wanted to say that the mod is working perfect

Got some food mods (nothing crazy, just new foodstuffs) like the one that adds the McDonald's space station and it's food. Even works with that! Didn't expect that by "universal" you truly did mean "universal"!
ZippoMoon 29 Mar, 2023 @ 1:34pm 
Does this mod have support for Improved Food Descriptions?