Skip to content

JSON Format

CleverNucleus edited this page Jun 21, 2021 · 7 revisions

JSON Format

Description

This page is formatted by first showing three examples of some attribute jsons, followed by an in-depth explanation of what each tag means and what everything does.

Examples

The following show examples of different attributes and how they're implemented using json.

Constitution

{
    "type": "GAME",
    "uuid": "396c3a15-6329-45c0-ba55-11beb5c2210e",
    "defaultValue": 0.0,
    "minValue": 0.0,
    "maxValue": 2147483647.0,
    "translationKey": "attribute.name.playerex.constitution",
    "properties": {
        "weight": 0.8,
        "minroll": 1.0,
        "maxroll": 10.0
    },
    "functions": [
        {
            "attribute": "minecraft:generic.max_health",
            "type": "FLAT",
            "multiplier": 1.0
        },
        {
            "attribute": "minecraft:generic.knockback_resistance",
            "type": "DIMINISHING",
            "multiplier": 0.01
        },
        {
            "attribute": "playerex:magic_resistance",
            "type": "DIMINISHING",
            "multiplier": 0.01
        }
    ]
}

Evasion

{
    "type": "GAME",
    "uuid": "a17e6fc4-4128-46f7-854b-22ea2f16da0d",
    "defaultValue": 0.0,
    "minValue": 0.0,
    "maxValue": 1.0,
    "translationKey": "attribute.name.playerex.evasion",
    "properties": {
        "percent": 100.0,
        "weight": 0.3,
        "minroll": 0.01,
        "maxroll": 0.25
    },
    "functions": []
}

Skill Points

{
    "type": "DATA",
    "uuid": "7f7d3cd2-d91a-40bd-b19c-053edc27424e",
    "defaultValue": 0.0,
    "minValue": 0.0,
    "maxValue": 2147483647.0,
    "translationKey": "attribute.name.playerex.skillpoints",
    "properties": {},
    "functions": []
}

Explanation

TODO