update-knowledge-base

Update the Knowledge Base with new game data

Update Knowledge Base Workflow

1. Overview

The Knowledge Base (loh-website/lib/knowledge-base) is the single source of truth for game data (Items, NPCs) on the website. It is generated from raw game data.

2. Source Data

Data originates from: loh-website/lib/game-data/index.json.
  • This file is an aggregation of raw game definitions.
  • If you need to add an item/NPC, add it here first.

3. Update Process

Run the population script to regenerate the strict TypeScript definitions:
cd loh-website
npx ts-node scripts/populate-kb.ts

4. verification

  1. Check lib/knowledge-base/items/index.ts to see your new item.
  2. Check lib/knowledge-base/npcs/index.ts to see your new NPC.
  3. Ensure npm run build passes (types are valid).