76Natsu76

S3ven RPG — 76Natsu76.github.io

A fully data‑driven, Twitch‑integrated RPG engine built on JSON definitions and modular JavaScript systems.

The project is designed so that almost everything — enemies, loot, professions, races, subraces, abilities, regions, merchants — is defined in data files, with resolvers and engines reading from those definitions.


High-level architecture

Core concepts


Race taxonomy

Races are defined in race-definitions.json and indexed in race-tier-index.json.

The canonical race list (67 total):

Subraces are mapped in subrace-race-index.json and their stat/ability profiles live in:


How to add a new enemy

  1. Define the enemy base entry
    • Add a new entry in enemies.json with:
      • key
      • name
      • race
      • subrace
      • profession (if applicable)
      • base stats (hp, atk, def, etc.)
  2. Assign variants (optional)
    • Add variant entries in enemy-variants.json if this enemy has multiple difficulty tiers or flavors.
  3. Assign subrace & tags
    • Ensure the subrace exists in subrace-race-index.json and subrace-stat-profiles.json.
    • Add any thematic tags in enemy-tags.json (e.g. ["undead", "elite", "fire"]).
  4. Hook into regions
    • Add the enemy key to appropriate region pools in enemy-regions.json and/or region-encounter-tables.json.
  5. Assign abilities
    • Add ability keys in enemy-abilities.json and enemy-ultimates.json (if it has an ultimate).
    • Make sure those ability keys exist in ability-definitions.json or enemy-abilities.json.
  6. Verify in runtime
    • enemy-database.js / enemy-registry.js / resolveEnemy.js will pull the data together.
    • Test via encounter.html / fight-interactive.html.

How to add loot

  1. Add the item
    • Create a new item entry in items.json with:
      • id
      • name
      • type (weapon, armor, consumable, etc.)
      • rarity
      • any stat modifiers or special effects
  2. Register the item
    • Ensure item-registry.js can resolve it by id.
  3. Add to loot tables
    • Global drops: loot-tables.json
    • Region-specific: region-loot-tables.json
    • Boss-specific: boss-loot-tables.json
    • Merchant stock: merchant-inventory.json, merchant-tables.json
  4. Balance rarity
    • Adjust rarity-weights.json if you introduce a new rarity or want to rebalance drop chances.

How to add a profession

  1. Define the profession
    • Add a new entry in profession-definitions.json:
      • base stats
      • resource type (mana, rage, etc.)
      • flavor text
  2. Starter kit
    • Add a starter kit entry in profession-starter-kits.json:
      • starting equipment IDs (must exist in items.json)
      • starting consumables, if any
  3. Abilities
    • Add abilities for this profession in ability-definitions.json under the profession key.
    • Each ability should define:
      • key, name
      • basePower, scalingPerLevel
      • manaCost, cooldown
      • combatTags
      • statusEffects (if any)
      • description
  4. Talent tree
    • Add a talent tree entry in profession-talent-trees.json:
      • nodes, prerequisites, bonuses
    • Hook into talent-modifiers.js if you want talents to affect damage or other combat behavior.
  5. Synergies
    • Add profession-specific synergies in:
      • profession-synergies.json
      • profession-biome-bonuses.json
      • profession-weather-synergies.json

How to add a race

  1. Add race definition
    • Add a new race entry in race-definitions.json:
      • key
      • name
      • base flavor and any global modifiers
  2. Tier index
    • Add the race to race-tier-index.json with its tier (e.g. common, rare, mythic, cosmic).
  3. Subraces
    • Add subraces for this race in subrace-race-index.json.
    • Define their stat profiles in subrace-stat-profiles.json.
    • Define their abilities in subrace-ability-definitions.json.
  4. Region pools
    • Add the race to appropriate region pools in region-race-pools.json.

How to add a subrace

  1. Map the subrace to a race
    • In subrace-race-index.json, add:
      "wolfkin": "beastkin"
      
  2. Define stat profile
    • In subrace-stat-profiles.json, add:
      "wolfkin": {
        "hpMult": 1.1,
        "atkMult": 1.1,
        "defMult": 1.0,
        "speedMult": 1.1
      }
      
  3. Define subrace abilities
    • In subrace-ability-definitions.json, add:
      "beastkin": {
        "wolfkin": {
          "howl_of_the_pack": { ... ability object ... }
        }
      }
      
  4. Use in enemies
    • In enemies.json, set subrace: "wolfkin" for any enemy that uses it.

How to add an ability

  1. Decide the owner
    • Profession ability → ability-definitions.json
    • Subrace ability → subrace-ability-definitions.json
    • Enemy-only ability → enemy-abilities.json
  2. Define the ability object
    Example (profession ability):

    ```json “acolyte”: { “minor_heal”: { “key”: “minor_heal”, “name”: “Minor Heal”, “basePower”: 0.0, “scalingPerLevel”: 0.05, “manaCost”: 10, “cooldown”: 1, “combatTags”: [“holy”, “heal”, “support”], “statusEffects”: [ { “type”: “heal_flat”, “power”: 12, “duration”: 0, “stack”: “add” } ], “description”: “A simple prayer restores a small amount of health.” } }

  3. Status Effects
    • Use statusEffects to attach DOTs, HOTs, shields, buffs, debuffs, cleanses, etc.
    • status-engine.js, dot-hot-engine.js, shield-engine.js, and cleanse-engine.js interpret these.
  4. Ultimates
    • Add isUltimate, chargeRequired, usesPerCombat if it’s an ultimate.
    • Wire ultimate charge logic in your combat flow (e.g. in combat-engine.js / combat-flow.js).

How to update talent trees

  1. Edit profession-talent-trees.json
    • Add or modify nodes, prerequisites, and bonuses.
  2. Hook into talent-modifiers.js
    • Read the attacker’s talent state (however you store it) and adjust:
      • damage
      • crit chance
      • resource costs
      • status durations

World tick & seasons

These hooks are intended to be wired through:

Philosophy

Developer Quickguide

This project is fully data‑driven. Almost everything is defined in JSON and resolved by modular JS engines.

Add a new enemy

  1. Add base entry → enemies.json
  2. Add subrace → enemy-subrace.json
  3. Add abilities → enemy-abilities.json
  4. Add region placement → enemy-regions.json
  5. Add loot → region-loot-tables.json or boss-loot-tables.json

Add a new item

  1. Add item → items.json
  2. Add to loot tables → loot-tables.json, region-loot-tables.json, etc.
  3. Add to merchant pools → merchant-inventory.json

Add a new profession

  1. Add definition → profession-definitions.json
  2. Add abilities → ability-definitions.json
  3. Add talent tree → profession-talent-trees.json
  4. Add starter kit → profession-starter-kits.json

Add a new race

  1. Add race → race-definitions.json
  2. Add subraces → subrace-race-index.json
  3. Add subrace stats → subrace-stat-profiles.json
  4. Add subrace abilities → subrace-ability-definitions.json

Add a new ability

  1. Add ability object → appropriate JSON file
  2. Ensure status effects follow the schema
  3. Ability auto‑resolves via ability-resolver.js

Combat Flow

World Integration

Welcome to the multiversal canon.