1. Welcome to the official Starbound Mod repository, Guest! Not sure how to install your mods? Check out the installation guide or check out the modding help thread for more guides.
    Outdated Mods have been moved to their own category! If you update your mod please let a moderator know so we can move it back to the active section.
    Dismiss Notice

Food Rot Dots 1.3

Quickly find your oldest food; rot times are shown on the inventory icons for consumable items.

  1. Alocer
    Features
    • See how spoiled all your items are at a glance, without looking at each tooltip individually
    • Unobtrusive, designed to be as vanilla to the game as possible
    • Customizable, six colors to choose from and a color-blind friendly addon
    • (Mostly) Compatible with all other mods
    • Easy to extend to other mods

    frd.jpg


    Overview
    The inventory icons for all 211 default food and drink items have been updated to display a colored dot in the bottom right corner that reflects the current rot time of the item.

    The default color and rot times are:
    <= 5 min: Red
    <= 30 min: Orange
    <= 1 hour: Yellow
    > 1 hour: Green

    The icons are only updated when the game calls its scripts to age items, meaning that newly bought or created items will initially show the default inventory icon. Once the item ages, its inventory icon will update. This has the added benefit that items in the store will show their normal icon.

    This mod was created with compatibility in mind, so no default game files are overwritten. Rot colors and times are read from the '/items/rotting.config' file, so any custom values used will be picked up. The only requirement for altering rotting times and colors is to follow the same syntax as the 'rotting.config' file, where each description string starts with something like '^red;'. The 4 default colors (green, yellow, orange, and red) along with blue, cyan, and grey are included, but to use custom colors (such as purple) a new icon for each item and for each color must be created. This can be achieved by doing something similar to the steps found in the Tutorial section below.

    For an example of mod compatibility, the first image is vanilla Starbound with only Food Rot Dots. The second image adds another mod that alters consumables, Improved Food Descriptions.

    frd-tooltip.jpg frd+ifd-tooltip.jpg


    Installation Instructions
    Unzip the downloaded 'Food_Rot_Dots.zip' file and place the 'Food_Rot_Dots.pak' file in Starbound's 'mods' folder.
    Code:
    Example:
    
    C:\Program Files (x86)\Steam\SteamApps\common\Starbound\mods

    Uninstallation
    Uninstalling the mod is as easy as deleting the 'Food_Rot_Dots.pak' file from Starbound's 'mods' folder.

    Note: Any existing items that were altered by this mod will still work perfectly fine, but they will no longer have an inventory icon. Any new items will be unaffected.


    Color-blind Addon
    Inside the 'Food_Rot_Dots.zip' file is an optional *.pak file which will change the colors used for different stages of food spoilage. Instead of the default colors used in the Overview section, the '/items/rotting.config' file is overwritten to use more color-blind friendly colors. To use the altered colors, place the 'Food_Rot_Dots_Color-blind_Addon.pak' file in Starbound's 'mods' directory.

    Alternatively, the color-blind addon works independently of Food Rot Dots and can be used without it.

    The color-blind color and rot times are:
    <= 5 min: Red
    <= 30 min: Yellow
    <= 1 hour: Blue
    > 1 hour: Grey

    Note: This optional addon overwrites the '/items/rotting.config' file, so if you use another mod that changes the default food spoil length (10800 seconds, or 3 hours) then this addon may interfere.


    Steam
    The Steam version of this mod (which does not include the color-blind addon) can be found at:

    http://steamcommunity.com/sharedfiles/filedetails/?id=738481509


    Tutorial
    Have a mod that adds new consumable items and want to make it compatible? Creating an optional addon for your users is easy and only requires two things for each new item, a patch file and 4 (or 6 if you want to support the color-blind addon) icons. Alternatively, you can send me a request to have them added directly to my mod.

    Note: The following steps use the kiwi for all examples.

    1.) Create a *.patch file
    A patch file will alter an existing item without replacing the original assets, allowing multiple mods to make changes to the same item. This patch file will add my custom aging script 'rotting_frd.lua' to the list of scripts used by the game to age items that can spoil.

    a.) Starting with a clean working directory, create the same folder structure that mimics where your item is placed.
    Code:
    Example:
    
    /items/generic/produce
    b.) In the new folder, create a new file with the name: <your_item_file>.patch
    Code:
    Example:
    
    /items/generic/produce/kiwi.consumable.patch
    c.) Open the new *.patch file and copy/paste the following:
    Code:
    [
      {
        "op" : "test",
        "path" : "/itemAgingScripts/0",
        "value" : "/scripts/items/rotting.lua"
      },
      {
        "op" : "add",
        "path" : "/itemAgingScripts/-",
        "value" : "/scripts/items/rotting_frd.lua"
      }
    ]

    2.) Create inventory icons
    The stages of rot use different colors to indicate how soon an item will spoil. Those times and colors are determined by the '/items/rotting.config' file. Each color requires its own icon, the default being green, yellow, orange, and red. If you'd like to support the color-blind addon, blue and grey icons are also required.

    a.) Copy the item's inventory icon to the same folder as the *.patch file that you created in part 1.
    Code:
    Example:
    
    /items/generic/produce/kiwiicon.png

    b.)
    Find the item's object name used within the game by opening the item's object file and looking at the 'itemName' property.
    Code:
    Example, in the 'kiwi.consumable' file:
    
    "itemName" : "kiwi",

    c.)
    Rename the copied inventory icon from step (a.) so that it follows the syntax '<itemName>_<color>.png':
    Code:
    Example:
    
    kiwi_green.png

    d.)
    Copy the icon for each remaining color.
    Code:
    Example:
    
    kiwi_green.png
    kiwi_yellow.png
    kiwi_orange.png
    kiwi_red.png
    kiwi_blue.png
    kiwi_grey.png

    e.)
    Open the icons in an image editor. A 3x3 pixel colored dot should be drawn in the bottom right corner of each image. Even though the placement of the dot is slightly inconvenient on some images, this rule was applied consistently throughout for design reasons; the player will know to see the rot color in the same position regardless of the item. It's important to note that the new dot isn't just drawn in the bottom right corner of the entire 16x16 canvas size. Most pictures are smaller than 16 pixels in width and/or height, so the new colored dot goes in the corner of the image's dimension's and not the file's dimensions. The game seems to scale pictures based on the drawn size and ignores all transparent space around them.

    icon_example.gif

    If you'd like to try to repeat the style as all of my icons, I used the Rectangle Tool in Photoshop that tries to blend the stroke and fill colors (even for something as small as 3x3). The free program GIMP most likely has something similar but I'm unfamiliar with that software. The rectangle uses a stroke width of 0.4 pt, and the colors used are:
    Code:
    Green
    Fill: Pure Yellow Green #39b54a
    Stroke: Dark Yellow Green #197b30
    Code:
    Yellow
    Fill: Pure Yellow #fff200
    Stroke: Dark Yellow #aba000
    Code:
    Orange
    Fill: Pure Yellow Orange #f7941d
    Stroke: Dark Yellow Orange #a3620a
    Code:
    Red
    Fill: Pure Red #ed1c24
    Stroke: Dark Red #9e0b0f
    Code:
    Blue
    Fill: Pure Cyan Blue #0072bc
    Stroke: Dark Cyan Blue #004a80
    Code:
    Grey
    Fill: 25% Gray #cccccc
    Stroke: 50% Gray #959595


    Mod Pack Permissions:
    Anyone can use this mod in their mod compilation without the author's consent.
    Mod Assets Permissions:
    Anyone can alter/redistribute the mod's assets without the author's consent.
    qs820, Tamorr, andhar and 1 other person like this.

Recent Updates

  1. Version 1.3
  2. Version 1.2.1
  3. Version 1.2

Recent Reviews

  1. Lornzo
    Lornzo
    5/5,
    Version: 1.2.1
    Amazing mod, thank you for adding colorblind addon
  2. qs820
    qs820
    5/5,
    Version: 1.2.1
    nice
  3. sksig
    sksig
    5/5,
    Version: 1.2.1
    should be in vanilla
  4. xaliber
    xaliber
    5/5,
    Version: 1.2.1
    Simple yet effective. The author is even nice enough to give instruction for custom foods!
  5. copperstain
    copperstain
    5/5,
    Version: 1.2.1
    Thanks. Another mod that should be in the core functionality. Immensely useful.
  6. Natural Aura
    Natural Aura
    5/5,
    Version: 1.2.1
    Extremely handy, I found it quite annoying when your looking through your entire inventory full of food hoping that none of it will spoil by the time you find the oldest ones! xD
  7. Kagea
    Kagea
    5/5,
    Version: 1.2
    An excellent mod that helps keeping track of your food spoilage in an easy and uncomplicated way. A perfect solution for those of us who have a big farm and way too much food ;) Thank you
  8. Shadox2.0
    Shadox2.0
    5/5,
    Version: 1.2
    Usefull and compatible ^^