data format
Guide for data format
Data Format Reference
mantras.json Structure
Complete schema for the magic system data file.
Top-Level Structure
{
"combat_spells": [ /* array of CombatSpell */ ],
"utility_spells": [ /* array of UtilitySpell */ ],
"teleport_recipes": [ /* array of TeleportRecipe */ ]
}CombatSpell Schema
{
"spell_id": "air_pulse", // Unique identifier
"name": "Air Pulse", // Display name
"level_req": 1, // Magic level requirement
"bijas": [ // Required components
{
"bija_id": "air_bija", // Item ID from items.json
"quantity": 2 // Amount consumed per cast
},
{
"bija_id": "chandra_bija",
"quantity": 1
}
],
"max_hit": 3, // Maximum damage
"xp": 5.5, // Magic XP granted
"spell_tier": "pulse" // Tier name (pulse/volley/cascade/cataclysm)
}UtilitySpell Schema
{
"spell_id": "life_restoration",
"name": "Life Restoration",
"level_req": 20,
"bijas": [
{"bija_id": "water_bija", "quantity": 2},
{"bija_id": "hanuman_bija", "quantity": 1},
{"bija_id": "kali_bija", "quantity": 1}
],
"effect": "heal", // Effect type
"heal_amount": 10, // Effect-specific parameter
"xp": 12.0
}Effect Types:
"heal": Restore HP (requiresheal_amount)"cure_poison": Remove poison status"buff_attack": Increase attack (requiresbuff_percentage,duration_seconds)"buff_magic_accuracy": Increase magic accuracy (requiresbuff_percentage,duration_seconds)
TeleportRecipe Schema
{
"teleport_id": "hastinapur_teleport",
"name": "Hastinapur Teleport",
"level_req": 25,
"coconut_bijas": [ // 3-eye configuration
{
"eye": 1, // Eye number (1, 2, or 3)
"bija_id": "vishnu_bija" // Required bija for this eye
},
{
"eye": 2,
"bija_id": "air_bija"
},
{
"eye": 3,
"bija_id": "earth_bija"
}
],
"charged_coconut_id": "hastinapur_teleport_coconut", // Item ID of result
"destination": "hastinapur_palace", // Destination identifier
"xp": 15.0
}items.json Additions
Bija Item Format
{
"item_id": "chandra_bija",
"name": "Chandra Bija",
"description": "A catalytic bija of the Moon God, embodying consciousness",
"stackable": true,
"weight": 0.001,
"note_id": null,
"value": 25
}All Bija IDs:
- Elemental:
air_bija,water_bija,earth_bija,fire_bija - Catalytic:
chandra_bija,rahu_bija,yama_bija,rudra_bija,kali_bija,vishnu_bija,hanuman_bija,indra_bija
Coconut Items
Empty Coconut:
{
"item_id": "coconut",
"name": "Coconut",
"description": "A coconut with three eyes, used for teleportation rituals",
"stackable": false,
"weight": 0.8,
"note_id": null,
"value": 50
}Charged Teleport:
{
"item_id": "hastinapur_teleport_coconut",
"name": "Hastinapur Teleport",
"description": "A charged coconut. Break to teleport to Hastinapur Palace",
"stackable": true,
"weight": 0.1,
"note_id": null,
"value": 200
}Complete Spell List
Tier 1: Pulse (Chandra)
Tier 2: Volley (Rahu)
Tier 3: Cascade (Yama)
Tier 4: Cataclysm (Rudra)
Utility Spells
Teleport Recipes
Validation Rules
Combat Spells
spell_idmust be uniquelevel_reqmust be 1-99bijasarray must have at least 1 entrymax_hitmust be positivexpmust be positivespell_tiershould be one of: pulse, volley, cascade, cataclysm
Teleport Recipes
coconut_bijasmust have exactly 3 entries- Each
eyevalue must be 1, 2, or 3 (no duplicates) charged_coconut_idmust exist in items.json- All
bija_idvalues must exist in items.json
Modding Support
The data-driven design allows players to:
- Add new spells by editing mantras.json
- Rebalance existing spells (change costs, damage, XP)
- Create new teleport destinations
- Adjust level requirements
No code changes required for basic spell modifications.