Skip to content

Ejemplos JSON

Toto (C.A) edited this page Aug 1, 2025 · 1 revision

Ejemplos Completos de Archivos de Datos (JSON)

Este documento proporciona ejemplos exhaustivos para cada tipo de archivo de datos utilizado por Systemall. Estos ejemplos están diseñados para mostrar todas las propiedades y eventos disponibles, sirviendo como una referencia completa para la creación del contenido de tu juego.

Stats (Estadísticas)

Ubicación: data/components/stats.json

Propósito: Define las propiedades base de todas las estadísticas del juego.

{
    "type": "Stats",
    "EN": {
        "comment": "Estadística de Energía/Vida. Se restaura al equipar objetos.",
        "num_type": "real",
        "max_value": 9999,
        "min_value": 0,
        "base_value": 100,
        "base_level": 1,
        "restore_on_equip": true,
        "is_standalone_level": false,
        "iterator": { "duration": 1, "repeats": -1 },
        "event_on_start": "EVT_Stat_OnStart",
        "event_on_end": "EVT_Stat_OnEnd",
        "event_on_update": "EVT_Stat_OnUpdate_UI",
        "event_on_level_up": "EVT_Stat_HP_LevelUp_Formula",
        "event_on_level_check": "",
        "event_on_equip": "EVT_Stat_OnEquip_RecalcUI",
        "event_on_desequip": "EVT_Stat_OnDesequip_RecalcUI",
        "event_on_turn_update": "",
        "event_on_turn_start": "",
        "event_on_turn_end": "EVT_Stat_Regen_Check"
    }
}

Slots (Espacios de Equipo)

Ubicación: data/components/slots.json

Propósito: Define los espacios donde las entidades pueden equipar objetos.

{
    "type": "Slots",
    "SLOT_ARMA": {
        "comment": "Slot para el arma principal.",
        "max_items": 1,
        "is_disabled": false,
        "is_damaged": false,
        "depends_on_slot": "",
        "permited": ["WEAPON", "SWORD"],
        "event_on_start": "EVT_Slot_OnStart",
        "event_on_end": "EVT_Slot_OnEnd",
        "event_on_update": "EVT_Slot_OnUpdate",
        "event_on_turn_update": "EVT_Slot_OnTurnUpdate",
        "event_on_turn_start": "EVT_Slot_OnTurnStart",
        "event_on_turn_end": "EVT_Slot_OnTurnEnd",
        "event_on_equip": "EVT_Slot_Weapon_OnEquip",
        "event_on_desequip": "EVT_Slot_Weapon_OnDesequip",
        "event_can_equip": "EVT_Slot_CanEquip_CheckClass",
        "event_can_desequip": "EVT_Slot_CanDesequip_CheckCursed",
        "event_on_attack": "EVT_Slot_Weapon_OnAttack",
        "event_on_defend": "EVT_Slot_Weapon_OnDefend"
    }
}

States (Estados)

Ubicación: data/components/states.json

Propósito: Define los estados alterados (buffs, debuffs, etc.).

{
    "type": "States",
    "STATE_ACELERADO": {
        "comment": "Aumenta la velocidad y previene la ralentización.",
        "state_type": "BUFF",
        "priority": 20,
        "boolean_value": false,
        "reset_value": false,
        "allow_multiple": false,
        "max_effects": 1,
        "clears_states": ["STATE_RALENTIZADO"],
        "prevents_states": ["STATE_RALENTIZADO"],
        "restricts_action": false,
        "stats": {
            "VELOCIDAD%": 50
        },
        "iterator": { "duration": 5 },
        "event_on_start": "EVT_State_Haste_VFX_On",
        "event_on_end": "EVT_State_Haste_VFX_Off",
        "event_on_update": "EVT_State_OnUpdate",
        "event_on_turn_update": "EVT_State_OnTurnUpdate",
        "event_on_turn_start": "EVT_State_OnTurnStart",
        "event_on_turn_end": "EVT_State_OnTurnEnd",
        "event_on_add_effect": "EVT_State_OnAddEffect",
        "event_on_remove_effect": "EVT_State_OnRemoveEffect",
        "event_can_add_effect": "EVT_State_CanAddEffect",
        "event_can_remove_effect": "EVT_State_CanRemoveEffect"
    }
}

Items (Objetos)

Ubicación: data/pocket/items.json

Propósito: Define todos los objetos del juego.

{
    "type": "Items",
    "ITEM_ESPADA_MAESTRA": {
        "comment": "Un arma legendaria que solo pueden usar los héroes.",
        "item_type": "WEAPON",
        "is_stackable": false,
        "stack_limit": 1,
        "buy_value": 99999,
        "sell_value": 1,
        "can_sell": false,
        "can_buy": false,
        "target_types": [],
        "vars": {
            "is_legendary": true
        },
        "stats": {
            "FUERZA+": 50,
            "EN+": 100
        },
        "event_on_update": "EVT_Item_OnUpdate",
        "event_can_equip": "EVT_ITEM_CanEquip_OnlyHeroes",
        "event_can_desequip": "EVT_ITEM_CanDesequip_Generic",
        "event_on_equip": "EVT_ITEM_OnEquip_Glow",
        "event_on_desequip": "EVT_ITEM_OnDesequip_Fade",
        "event_on_buy": "EVT_ITEM_OnBuy",
        "event_on_sell": "EVT_ITEM_OnSell",
        "event_on_attack": "EVT_ITEM_MasterSword_OnAttack",
        "event_on_defense": "EVT_ITEM_MasterSword_OnDefense",
        "event_on_turn_update": "EVT_ITEM_OnTurnUpdate",
        "event_on_turn_start": "EVT_ITEM_OnTurnStart",
        "event_on_turn_end": "EVT_ITEM_OnTurnEnd"
    }
}

Effects (Efectos)

Ubicación: data/dark/effects.json

Propósito: Define los efectos que se aplican a través de los estados.

{
    "type": "Effects",
    "EFFECT_CORRUPTION": {
        "comment": "Un efecto híbrido: reduce la defensa pasivamente y daña al final del turno.",
        "state_key": "STATE_CORRUPTED",
        "state_set_value": true,
        "value": -20,
        "num_type": "real",
        "turn_type": "end",
        "iterator_end_config": { "duration": 1, "repeats": 2 },
        "stats": {
            "DEFENSA%": [-25, true],
            "EN": -20
        },
        "params": { "damage_type": "DARK" },
        "event_on_start": "EVT_EFFECT_OnStart_VFX",
        "event_on_end": "EVT_EFFECT_OnEnd_VFX",
        "event_on_turn_start": "EVT_EFFECT_OnTurnStart",
        "event_on_turn_end": "EVT_EFFECT_OnTurnEnd",
        "event_on_calculate": "EVT_EFFECT_Calculate_Corruption_Damage"
    }
}

Commands (Comandos)

Ubicación: data/dark/commands.json

Propósito: Define las habilidades y magias que las entidades pueden usar.

{
    "type": "Commands",
    "CMD_LLUVIA_METEOROS": {
        "command_type": "MAGIC",
        "targets": 4,
        "target_types": ["enemy"],
        "can_target_same": false,
        "event_check": "EVT_CORE_CheckMagicHit",
        "event_execute": "EVT_CORE_MagicDamage",
        "event_fail": "EVT_CORE_ActionMissed",
        "event_cinematic": "EVT_CINEMATIC_MeteorShower",
        "event_get_target": "EVT_TARGETING_FindWeakestEnemies",
        "params": {
            "base_power": 120,
            "element": "FIRE"
        }
    }
}

AI (Inteligencia Artificial)

Ubicación: data/ai/packages.json

Propósito: Define las reglas y paquetes de IA reutilizables.

{
    "type": "AI",
    "rules": {
        "RULE_HEAL_ALLY_LOW_HP": {
            "priority": 100,
            "condition": "AI_COND_Ally_HP_Below_30_Percent",
            "action": "AI_ACTION_Use_Heal_Spell",
            "target": "AI_TARGET_Ally_With_Lowest_HP"
        }
    },
    "packages": {
        "AI_PACKAGE_SUPPORT_HEALER": {
            "comment": "Prioriza curar a los aliados antes de atacar.",
            "rules": ["RULE_HEAL_ALLY_LOW_HP", "RULE_ATTACK_DEFAULT"]
        }
    }
}

Party (Entidades)

Ubicación: data/party/heroes.json

Propósito: Define las plantillas para los personajes y enemigos.

{
    "type": "Party",
    "HERO_JON": {
        "vars": { "display_name_key": "UI.NAMES.JON" },
        "faction": "PLAYER",
        "ai_package": "AI_PLAYER_CONTROLLED",
        "exp_value": 0,
        "loot_table_key": "",
        "flags": { "IS_MAIN_CHARACTER": true },
        "stats": { "FUERZA": 18, "DEFENSA": 12 },
        "slots": {
            "SLOT_ARMA": {
                "equip": "ITEM_ESPADA_HIERRO",
                "permited": ["-AXE"] 
            }
        },
        "learnset": [
            { "level": 5, "command": "CMD_CURAR", "category": "MAGIC" }
        ],
        "event_on_level_up": "EVT_ENTITY_OnLevelUp_ShowFanfare",
        "event_on_level_check": "EVT_ENTITY_CanLevelUp",
        "event_on_action_select": "",
        "event_on_equip": "EVT_ENTITY_OnEquip_UpdateUI",
        "event_on_desequip": "EVT_ENTITY_OnDesequip_UpdateUI"
    }
}

Groups (Grupos de Entidades)

Ubicación: data/party/groups.json

Propósito: Define las plantillas para los grupos de entidades.

{
    "type": "Groups",
    "HEROES": {
        "limit": 4,
        "is_persistent": true
    }
}

Bags (Mochilas)

Ubicación: data/pocket/bags.json

Propósito: Define las plantillas para los inventarios.

{
    "type": "Bags",
    "BAG_PLAYER_INVENTORY": {
        "bag_type": "simple",
        "slot_limit": 50,
        "is_persistent": true,
        "event_on_add_item": "EVT_BAG_OnItemAdded_UI_Update",
        "event_on_remove_item": "EVT_BAG_OnItemRemoved_UI_Update"
    }
}

Wate (Encuentros)

Ubicación: data/wate/encounters.json

Propósito: Define las batallas del juego.

{
    "type": "Wate",
    "groups": {
        "GROUP_GOBLIN_SQUAD": {
            "positions": [
                { "template_key": "ENEMY_GOBLIN", "level": [8, 10] },
                { "template_key": "ENEMY_GOBLIN_LEADER", "level": 12 }
            ]
        }
    },
    "encounters": {
        "ENCOUNTER_FOREST_RANDOM": {
            "background": "spr_bg_forest",
            "music": "mus_battle_normal",
            "can_escape": true,
            "event_on_start": "EVT_BATTLE_Forest_Start",
            "event_on_end": "EVT_BATTLE_Forest_End",
            "groups": [
                { "chance": 100, "group_key": "GROUP_GOBLIN_SQUAD" }
            ]
        }
    }
}