Modding:Implicit Data Types

From Starbounder - Starbound Wiki
Jump to: navigation, search
Article Stub

This article is a stub. You can help Starbound's official Wiki by expanding it!

While not formally codified as objects, certain parameter inputs expect a specific structure or consistently interpret given values in a specific way. This is a non-exhaustive list of such input conventions observed in JSON assets.


[ R, G, B(, A) ]

An 8-bit color definition given as three integers from 0 to 255 for red, green and blue in that order. Occasionally accepts a fourth input for the alpha channel (transparency), if not specified this will default to full opacity (=255). Used in monocolor "ember" particles and light sources.


[ x(.x), y(.y) ]

A 2D point, the coordinate system may vary but locally +x points to the right and +y upwards. In image processing the units are image pixels, in world coordinates the default unit is "blocks" of 8 pixels. Most observed uses allow floating-point input for sub-pixel accuracy. Indistinguishable from a Range without context.


[ min(.), max(.) ]

A 2-component array representing the lower and upper bounds of a random range. Presumed to be drawn from a uniform distribution, boundary conditions unknown. If the parameter supports float input random values will be drawn as floats even if min and max are given as integers. The assets give no indication when a parameter normally defined by a single value supports range input. Indistinguishable from a Point without context.