Modding:Items

From Starbounder - Starbound Wiki
Jump to: navigation, search

Directory

/active JSON, PNG, LUA files for wide variety of activated items.
/armors JSON, PNG files for armor and clothing.
/buildscripts LUA files for weapons and shields.
/coins JSON, PNG files for pixels.
/fishing JSON, PNG files for fishing rod.
/generic JSON, PNG files for crafting items, consumables, food/drink, misc.
/guns JSON, PNG files for simple guns and other ranged weapons. LUA file for testing.
/instruments JSON, PNG files for musical instruments.
/liquids JSON, PNG files for liquids.
/materials JSON, PNG files for placeable materials.
/ship JSON, PNG files for unused(?) ship assets.
/skyrail JSON, PNG files for skyrail materials.
/staves JSON, PNG files for staff weapons and visual effects.
/swords JSON, PNG files for simple axes, daggers, and short swords.
/throwables JSON, PNG files for thrown items and weapons.
/tools JSON, PNG files for tools.

The /active directory is the most complex within this section as it contains files for weapons featuring alt-abilities (example: broadswords, assault rifles, fists), shields, vehicle controllers, and the grappling hook. In contrast, the /coins and /fishing directories only contain a single JSON and PNG file each.

Object files (such as furniture items) are located within the /objects directory, not within /items.

Files

  1. defaultparameters.config
    • This file does not work with .patch files, and will require a file replacement for changes to apply.[1]
    • Parameters:
      • blockRadius : Sets block placement size; does not affect mining or distance. Default: 2 (ex: 2x2)
      • altBlockRadius : Sets block placement size when Shift is held; does not affect mining or distance. Default: 1 (ex: 1x1)
      • defaultMaxStack : Sets default maximum stack size for all items & objects that do not have maxStack set. Default: 1000
      • defaultPrice : Sets default value for all items & objects that do not have price set. Default: 0
        • Note: Nearly all items & objects have price set, including dirt.
      • blueprintPriceFactor : Sets value of all blueprints by multiplying value of crafted object. Default: 1.25
    • Contains various other parameters, such as pickupSounds and defaultTimeToLive.
  2. JSON, PNG files for Ship unlocking. Possibly unused.

Common File Parameters

These are parameters that will show up frequently when viewing JSON files throughout the /items directory.

  • itemName : Sets an item name used by the game engine. Does not normally appear within the game.
  • price : Sets the value, which is used for selling or purchasing an item with pixels.
  • maxStack : Sets the maximum stack size for an item.
  • rarity : Sets item rarity, which is used for item icon borders.
    Values: common, uncommon, rare, legendary
  • description : Sets an item description that displays in tooltips.
  • shortdescription : Sets an item name that players will see within the game.
  • inventoryIcon : Sets an item icon used for inventory and tooltips. Some items just use image for icons.
  • image : Sets a main item image used by player characters and tooltips. Sometimes used for icons.
  • tooltipKind : Sets the type of tooltip format used for an item. If omitted, default tooltip format is used.
  • colorOptions : Sets the current color for an item, typically only used for the dying system in this directory.

colorOptions

Typical layout for this parameter (example from Cool Jacket, which has a default color of "blue"):

"colorOptions" : [
  /* BLUE */
  { "ffca8a" : "96cbe7", "e0975c" : "5588d4", "a85636" : "344495", "6f2919" : "1a1c51" },
  /* BLACK */
  { "ffca8a" : "838383", "e0975c" : "555555", "a85636" : "383838", "6f2919" : "151515" },
  /* GREY */
  { "ffca8a" : "b5b5b5", "e0975c" : "808080", "a85636" : "555555", "6f2919" : "303030" },
  /* WHITE */
  { "ffca8a" : "e6e6e6", "e0975c" : "b6b6b6", "a85636" : "7b7b7b", "6f2919" : "373737" },
  /* RED */
  { "ffca8a" : "f4988c", "e0975c" : "d93a3a", "a85636" : "932625", "6f2919" : "601119" },
  /* ORANGE */
  { "ffca8a" : "ffd495", "e0975c" : "ea9931", "a85636" : "af4e00", "6f2919" : "6e2900" },
  /* YELLOW */
  { "ffca8a" : "ffffa7", "e0975c" : "e2c344", "a85636" : "a46e06", "6f2919" : "642f00" },
  /* GREEN */
  { "ffca8a" : "b2e89d", "e0975c" : "51bd3b", "a85636" : "247824", "6f2919" : "144216" },
  /* BLUE */
  { "ffca8a" : "96cbe7", "e0975c" : "5588d4", "a85636" : "344495", "6f2919" : "1a1c51" },
  /* PURPLE */
  { "ffca8a" : "d29ce7", "e0975c" : "a451c4", "a85636" : "6a2284", "6f2919" : "320c40" },
  /* PINK */
  { "ffca8a" : "eab3db", "e0975c" : "d35eae", "a85636" : "97276d", "6f2919" : "59163f" },
  /* BROWN */
  { "ffca8a" : "ccae7c", "e0975c" : "a47844", "a85636" : "754c23", "6f2919" : "472b13" }
]

Each object within this array consists of four name/value pairs, all of which are 6-digit hexadecimal codes that correspond with an RGB color (RRGGBB). The game finds colors by going through this array in order, in which the 1st object is always the default color set (item spawns with this color, and can also be reacquired with Dye Remover), 2nd is always the black color set, 3rd is always the grey color set, and so on.

ffca8a, e0975c, a85636, 6f2919
The four names in these name/value pairs are used in PNG files for dying purposes, and should be used in all images where you would want a color to be affected by dyes; all other colors in a PNG file will not change when dying. It can be helpful to create the PNG file with the colors you want first, write down the hex code for those colors, and then replace them with the dye colors used here.

96cbe7, 5588d4, 344495, 1a1c51
The four values in these name/value pairs are what will appear in the game, and can be changed without causing any problems. It is recommended that the color values after the 1st object follow the dying color scheme (2nd: Black, 3rd: Grey, 4th: White, 5th: Red, etc.).

References

  1. Chucklefish Forum: http://community.playstarbound.com/threads/increasing-default-max-stack-size.107113/ February 2016, Version: Glad Giraffe