Skip to content

JSON property types

Roman Chistokhodov edited this page Sep 23, 2024 · 2 revisions

Various .json files that can be used by a mod based on Featureful SDK share a handful of property type definitions.

alpha

The brightness or opacity.

The value of this type must be an integer number between 0 and 255. Example: "alpha": 200

color

The RGB color.

The value of this type accepts several forms:

  1. A string of three integer numbers separated by spaces. Each number must be in 0-255 range corresponding to Red, Green and Blue components. Example: "color": "0 200 100".
  2. A string representing the hexadecimal value starting with # (web notation). Example: "color": "#00C864".
  3. A string representing the hexadecimal value starting with 0x (C++ notation). Example: "color": "0x00C864" .
  4. An array of three integer numbers representing Red, Green and Blue components. Each number must be in 0-255 range. Example: "color": [0, 200, 100]

range

The pair of numbers. The value used in the game will be randomized between these two numbers.

The value of this type accepts several forms:

  1. A string that consists of two numbers separated by , symbol where the first number is a minumum value and the second number is a maximum value. Example: "life": "0.5,1.6".
  2. An array of two numbers where the first element is a minimum value and the second element is a maximum value. Example: "life": [0.5, 1.6]
  3. Just a singular number. In this case the minimum and the maximum are equal. Example: "life": 1.0

range_int

Same as range above, but the numbers must be integers. Examples: "pitch": "95,100", "pitch": [95, 100], "pitch": 95

Clone this wiki locally