Modding:JSON/Variables/Objects
From Starbounder - Starbound Wiki
< Modding:JSON | Variables

Work In Progress!

This article or section is currently in the process of an expansion or major restructuring.
You are welcome to assist in its construction by editing it as well.
Last edited by Vuurrobin on 2018-09-28 14:04:40.
These variables are defined in an object's .object file, found in the assets/object folder. Default parameters are defined in defaultcategories.config and defaultparameters.config.
This table is a list of all parameters found in in-game object files. Modders can add parameters to a .object file, but be aware that overwriting one of these parameters may cause problems.
Parameter Name | Variable Type | Description |
---|---|---|
objectName | string | Name of the object. Used when called by 'spawnItem' as well as other commands, also used to reference the object in other json files, such as recipes |
objectType | string | includes: container, loungeable, wire, farmable, teleporter, physics Defaults to 'object' |
category | string | object category. Default categories are: decorative, trap, storage, other, door, light, furniture, wire, crafting, spawner, pot, tools, farmable, --todo--, teleporter, sapling Defaults to '--todo--' |
description | string | Long description of the object. Used in the tooltip. |
orientations | list | Parameters for displaying the object. These include: direction, anchors, image, imagePosition, spaces, flipImages, spaceScan, frames, animationCycle, projectileDirection, animationPosition, projectilePosition, animationParts, imageLayers, bgAnchors, lightPosition, collisionSpaces, detectArea, collision, dualImage, fgAnchors, fullbright, touchDamage, sitPosition, sitCoverImage, beamAngle, leftImage, rightImage, particleEmitter, requireTilledAnchors, directions, platformMoveTime, platformEnd, platformStart, requireSoilAnchors, mouthPosition, baseOffset |
printable | bool | If true, the object can be scanned and printed at the 3d printer |
price | int | price of the object when sold, printed, bought, etc |
rarity | string | includes: Common, Uncommon, Rare, Legendary |
inventoryIcon | string | image shown when the object is in the player's invetory |
shortdescription | string | Name shown for the object in pop up windows and dialog |
hylotlDescription | string | description shown when inspected by a hylotl character |
glitchDescription | string | description shown when inspected by a glitch character |
avianDescription | string | description shown when inspected by an avian character |
apexDescription | string | description shown when inspected by an apex character |
humanDescription | string | description shown when inspected by a human character |
floranDescription | string | description shown when inspected by a floran character |
novakidDescription | string | description shown when inspected by a novakid character |
race | string | Specifies which races are able to see the recipes for this object i.e. 'hylotl', Defaults to 'none'. 'generic' recipes are potentially available to any character. |
fireTimeVariance | float | How much time to +/- to the fireTime |
animation | string | Path to the JSON .animation file. |
scriptDelta | int | Frequency of calls to update(dt) function in the appropriate lua, 60 is one second |
soundEffect | string | Plays a sound continuously. Use with caution, as every object of that type will play it! |
projectile | string | The projectile name. |
fireTime | float | The firing rate, lower is faster. |
autoCloseCooldown | int | How long to wait before closing a gui if the player is out of bounds. |
tooltipKind | string | The kind of tooltip that pops up when the object is hovered over in inventory. |
frameCooldown | int | description |
slotCount | int | used in containers to define the number of item slots. This variable is required if "objectType" is set to "container" |
smashOnBreak | bool | The object creates particles when smashed. Uses smashParticles |
interactAction | string | Available interaction responses include: "OpenTeleportDialog", "OpenCockpitInterface", "SitDown", "OpenCraftingInterface", "OpenCookingInterface", "OpenTechInterface", "Teleport", "OpenStreamingVideoInterface", "PlayCinematic", "OpenSongbookInterface", "OpenNpcInterface", "OpenNpcCraftingInterface", "OpenTech3DPrinterDialog", "ShowPopup", "ScriptConsole", "ScriptPane", "OpenMerchantInterface", "OpenNpcBountyInterface", "OpenAiInterface"
custom ScriptCanvases use "ScriptConsole" | custom Widget Panes use "ScriptPane" |
interactData | string/dict | All the data necessary for an object to function properly when someone interacts with it. This is really only necessary for those who use ScriptCanvases, or are modifying an internal Pane (ex: merchant pane). Use a string to provide a filepath to a scriptcanvas .config directory, use a table to provide overrides to internal panes. For custom widget panes, use "uiConfig". |
uiConfig | string | Path to the JSON .config file describing the UI of a widget pane. This is only used if the object is a container, or has the "interactAction" variable set to "ScriptPane" without adding script to the object itself ("scripts" is undefined). |
interactive | bool | No longer used as a general object parameter. To make an object interactive, either set 'interactAction' or call 'object.setInteractive(true)' in the lua code. Some specific scripts like 'door.lua' and 'light.lua' still uses this. |
flickerPeriod | float | The base time required for flickering to go through an entire cycle. |
flickerPeriodVariance | float | The amount by which the flicker period can deviate from the base value in either direction. |
flickerMinIntensity | float | Minimum flicker intensity |
flickerIntensityVariance | float | How much intensity to +/- to the flicker. |
flickerMaxIntensity | int | Maximum flicker intensity |
maximumLiquidLevel | float | The highest water level allowed (measured in tiles) before the object automatically breaks. |
vanishTime | int | The time (in seconds) that must elapse before this object despawns. |
health | int | The amount of damage that the object can take before it is killed/destroyed. |
returnDoor | bool | Used only by challenge room return doors. |
sitFlipDirection | bool | If true, sitting characters can have their orientation flipped depending on the orientation of the object. (?) |
fullbright | bool | Whether the object ignores darkness, always appearing as if it were illuminated by full daylight. |
sitAngle | int | The angle to rotate the use of an object while interacting with it. |
sitOrientation | string | Currently only accepts "lay", used for beds. |
sitEmote | string | The emote which a user of an object automatically uses while interacting with it. |
pointLight | bool | Whether the object acts as a point source of light. |
beamAmbience | float | 0 - 1. Amount of light emmited outside the beam of light on a pointLight object. With 0, the beam is the only source of light, with 1 the light emited to the ambience is the same as the light of the beam. |
pointBeam | float | Aperture of the light beam. The bigger the number, the narrower beam is. |
recipeGroup | string | Determines what items will appear when opening a crafting window |
openFrameIndex | int | The frame number for the open from. |
sitCoverImage | string | name of the image file to use when a character sits on this object |
spawnCooldownTime | float | The cooldown time between spawns. |
closeTime | float | Time in frames to close the object. |
spawnTime | float | Time in frames for the object to spawn. |
rotationPauseTime | float | The time between consecutive rotations. |
maxLaserLength | int | Length in tiles of the laser. Used by Apex turrets and security cameras. |
rotationTime | float | The time taken for rotation to complete |
targetHoldTime | int | description |
fireCooldown | float | The time that the object must wait before it can fire again. |
smashDropPool | string | Treasure pool file to draw from when smashed |
smashable | bool | If true this item can be broken with weapon attacks |
breakDropPool | string | Treasure pool for when the object breaks rather than being smashed. |
genericDescription | string | The object's description when inspected by a character of a race for which the object does not already have a racial description. |
detectDuration | float | Determines the duration of the signal of a pressure plate, proximity sensor, etc. |
soundEffectRadius | int | Radius in which a sound effect can be heard. |
minimumLiquidLevel | float | The lowest allowable water level (in tiles) before the object automatically breaks |
detectThresholdHigh | int | The upper threshold of detection |
detectThresholdLow | int | The lower threshold of detection |
largeImage | string | The large image which shows up in the tooltip when the object is hovered over in inventory. (?) |
subtitle | string | Use in gui panes for crafting stations. This is the subtitle. |
maxImmersion | float | The maximum depth of water the object allows. |
hasObjectItem | bool | Whether the object has an item associated with it. |
minImmersion | float | The minimum depth of water the object allows. |
consumeSoilMoisture | bool | Whether the object can convert wet tilled soil to dry tilled soil |
explosionProjectile | string | The type of projectile created when the object explodes (explosions are a special type of projectile). |
explodeOnSmash | bool | Whether the object creates an explosion on being smashed. |
unbreakable | bool | Whether the object is impossible to break. |
frameCount | int | The number of frames that the object's animation uses. |
activationTime | int | How long before it reactivates. |
retainObjectParametersInItem | bool | Whether the object properties are kept when the object is broken and picked up as an item. (side-note: this parameter cannot be overwritten by spawnItem commands (not sure about placeObject)) |
monsterType | string | The type of monster. Only monster file names are valid arguments. |
alarmSoundDuration | int | The length of time during which the alarm sounds |
maxSpawnedRobots | int | only used by the disabled Robot Factory |
defaultSwitchState | bool | The switch's default state. |
interval | int | The time between consecutive events |
flickerDistance | float | description |
flickerTiming | int | description |
flickerStrength | float | description |
projectilePower | int | The base damage that a projectile deals to targets. |
projectileType | string | The type of projectile being spawned. Only projectile file names are valid arguments. |
signBacking | string | description |
isWired | bool | Whether the object has input and/or output ports to which wires can be attached in Wire Mode. (?) |
isContainer | bool | Whether the object is a container and can store objects. |
chipRepairFactor | float | The proportion of max health which can be restored when an Auto Chip is consumed at Rob Repairo |
containerCallback | string | Default: "containerCallback". See Modding:Lua/Hooks/Object for more information. |
hasWindowIcon | bool | description |
shipPetType | string | The type of ship pet associated with the object. |
detectRadius | int | description |
timer | int | description |
firstProjectile | string | description |
secondProjectile | string | description |
gates | int | description |
duration | int | description |
delay | float | description |
alwaysLit | bool | description |
minTargetRange | float | The minimum distance that the object must be from its target in order to successfully acquire the target. |
targetCooldown | float | The time that this object must wait before they can acquire a new target or adjust their aim on an existing target. |
targetAngleRange | int | The maximum angle above or below the horizontal within which this object can acquire or re-acquire a target |
targetRange | int | The maximum distance in tiles within which this object can acquire or re-acquire a target. |
maxTrackingYVel | float | The maximum vertical velocity which the target can have before this object can no longer track its target normally. |
objectWidth | int | description |
letGoCooldown | float | description |
colonyTags | list | list of tags used for colonization ex: ["avian","commerce","temple"]. See Tag |
inactiveLightColor | list | description |
projectileConfig | dict | The parameters of a projectile being spawned in by the object. |
inputNodes | list | list of the positions of inbound nodes (i.e. nodes that activate the object when triggered). ex: [[0,0],[2,3],[1,1]] |
scripts | list | a list of lua scripts associated with this json. |
animationCustom | dict | description |
activeLightColor | list | description |
closeSounds | list | The sound(s) played when this container is closed (that is, when a player exits the container UI). |
openSounds | list | The sound(s) played when this container is opened. |
smashParticles | list | The particles emitted when an object is smashed. |
smashSounds | list | The sounds played when an object is smashed. |
lightColor | list | description |
animationParts | dict | description |
animationPosition | list | description |
outputNodes | list | list of the positions of outbound nodes (i.e. nodes that are triggered when the object is activated). ex: {[0,0],[2,3],[1,1]} |
closedLight | list | description |
statusEffects | list | The status effects inflicted on targets by a projectile, weapon, etc. |
particleEmitter | dict | description |
sitEffectEmitters | list | description |
sitStatusEffects | list | The status effects inflicted on users of certain objects (examples include beds and chairs). |
npcToy | dict | parameters for npcs to interact with the object |
sounds | list | list of sound files for this object |
spawnOffset | list | The coordinates of an object's spawn location relative to the center of the parent object |
tipOffset | list | description |
rotationRange | list | description |
baseOffset | list | description |
fireOffsets | list | description |
detectEntityTypes | list | description |
lightPosition | list | description |
sitPosition | list | description |
breakDropOptions | list | This determines what items will drop when destroyed.
Format: [[[ <itemName>, <chance>, <unknown> ], [ <itemName>, <chance>, <unknown> ]]] ex. this will drop one coalore 100% of the time and two coalore 50% of the time { "breakDropOptions": [[ [ "coalore", 1.0, { } ], [ "coalore", 0.5, { } ] ]] } |
smashDropOptions | list | description |
learnBlueprintsOnPickup | list | a list of item blueprints to learn when this object is first acquired |
itemTags | list | The tags associated with a particular item |
deed | dict | Required for those who want to use the colony deed script onto other objects as it provides initial parameters. |
stages | list | description |
pickupQuestTemplates | list | The templates for quests which can be started at this object. |
state | dict | description |
detectArea | list | description |
explosionOffset | list | description |
projectileOptions | list | description |
winningItem | list | description |
particleEmitters | list | description |
lightColors | dict | description |
physicsCollisions | dict | description |
repairbotSpawnOffset | list | only used by the disabled Robot Factory |
serpentdroidSpawnOffset | list | only used by the disabled Robot Factory |
cleaningbotSpawnOffset | list | only used by the disabled Robot Factory |
turnInQuests | list | The quests which are turned in to this object for completion. |
damageTeam | dict | The "allegiance" of an object for the purposes of determining whether it takes damage from a certain damage source. |
projectileOffset | list | description |
touchDamage | dict | The base damage dealt to targets touched by the object. |
teleporterFootPosition | list | The position of a teleporting object's feet when it arrives relative to the center of the teleporter. |
autofillContents | list | description |
frameColors | list | description |
storeInventory | dict | The list of items sold at a particular merchant as well as their prices |
mouthPosition | list | The position relative to the center of the object of an object's "mouth". If this point enters a region with no air and does not benefit from breath protection, the object will begin to suffocate/drown after a time. |
questIndicatorPosition | list | The position of the quest indicator icon relative to the center of the quest-giving object. |
chatOptions | list | description |
offeredQuests | list | The quests which can be started at this object. |
engineOnOrientations | list | description |
spawner | dict | Required if you want to use the retired spawner script on other objects as it provides the script with spawn parameters. |
physicsForces | dict | description |
truthtable | list | description |
energy | dict | Data relating to the energy possessed by this object. Energy is consumed by some weapons, certain techs, and the Deadly Chill status effect. |
targetOffset | list | description |