Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gear-optimizer-authoring

Localhost-only UI for editing the build preset YAML files in discretize-gear-optimizer.

Setup

Prerequisites: the optimizer repo must be checked out locally alongside this one.

  1. Copy .env.example to .env and set PRESET_DIR to the absolute or relative path of src/assets/presetdata inside your optimizer checkout. The default value assumes both repos sit in the same parent directory.

  2. Install dependencies:

    pnpm install
  3. Start the dev server:

    pnpm dev

    Opens on http://localhost:3100. Edits are written straight to the real YAML files — run from a clean git tree in the optimizer repo so you can review/revert with git diff.

What it does

  • Searchable grid of every build in templates.yaml (filter by class, boon, outdated, or "missing links"; a ⚠ marks builds whose links don't resolve).
  • Build editor for the template fields (name, id, class, specialization, boon type, weapon type, outdated) plus a toggle for shared vs. separate fractal/raid extras.
  • Linked presets for each of priority → preset-affixes, distribution → preset-distribution, traits → preset-traits, extras → preset-extras. For each you can pick an existing entry (with "used by N builds"), Clone it, or author a New one, and edit all of its fields:
    • affixes: affix priority, optimize-for, constraints, infusions link, hidden
    • distribution: 7 damage coefficients, profession, credit rows, noCreditOkay
    • extras: runes/relics/sigils/enhancement/nourishment rows with amounts
    • traits: profession + a schema-validated JSON editor for the deeply-nested traits/skills payload (seed it fast with Clone)

How saves work (comment-preserving)

plugins/presetApiPlugin.ts is a dev-only Vite middleware that owns all disk I/O:

  • GET /api/data parses every preset file to JSON for the UI.
  • POST /api/entry / POST /api/rename edit a file by splicing only the changed entry's source range — every other entry, comment, commented-out build, and blank line stays byte-identical. A re-serialized entry is rendered to match the house style (JSON-style flow payloads, lineWidth: 100). Renaming an entry cascades the new name to every referencing build automatically.

Validate after editing

Run these in the optimizer repo after making changes:

pnpm testData          # semantic checks (credit authors, duplicates, …)
pnpm validateDataTypes # typia type-check against metadata.ts

Dependency

This repo depends on discretize-gear-optimizer as a file: dependency for the TypeScript types and enums used in the UI (gw2-data, presetdata/metadata). When installed with pnpm, these are resolved directly from your local checkout — no publishing required.

About

tool for authoring and updating builds maintained on the discretize-gear-optimizer repo

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages