Resource

Power Type.

Defines a resource/cooldown/timer for the player. Basically holds a persistent integer value which can be modified by the Change Resource action and checked with the Resource (Condition) player condition.

Type ID: origins:resource

Fields

Field Type Default Description
min Integer The minimum value of the resource.
max Integer The maximum value of the resource.
hud_render Hud Render Specifies how and if the resource is displayed with a bar on the HUD.
start_value Integer optional The value of the resource when the player first chooses an origin with this power. If not set, this will be the same as min.
min_action Entity Action optional If set, this action will be executed on the player whenever the minimum value is reached.
max_action Entity Action optional If set, this action will be executed on the player whenever the maximum value is reached.

Example

{
    "type": "origins:resource",
    "min": 0,
    "max": 1,
    "hud_render": {
        "should_render": false
    }
}

This power is a resource which stores a value of either 0 or 1, effectively being able to act as a toggle or boolean which can be changed from entity actions.