Commit graph

2 commits

Author SHA1 Message Date
Kelsi
7d7e1d73dc feat(editor): add WSCS JSON round-trip (--export/--import-wscs-json)
Closes the editing loop on the skill-cost catalog: dump a .wscs
to JSON, hand-edit costKind / skill ranges / requiredLevel /
copperCost (e.g. retune Apprentice profession from 1s to 5s for
a faster server, raise Cold Weather Flying from lvl 77 to 75,
add a custom WeaponSkill tier above Master), re-import to a
byte-identical binary.

The exporter emits both costKind (int 0..4) and the human-
readable costKindName ("profession" / "weapon" / "riding" /
"class-skill" / "misc"); the importer accepts either form.

Verified byte-identical round-trip on all three presets
(prof / weapon / riding). CLI flag count 1015 -> 1017.
2026-05-09 23:05:23 -07:00
Kelsi
b10bc2be5d feat(editor): add WSCS (Skill Cost) open catalog format
Open replacement for Blizzard's SkillCostsData.dbc plus the
per-rank training cost tables. Defines the tiered progression of
trainable skills: each rank unlocks a skill range, requires a
minimum character level, and costs a fixed amount of gold to
learn.

The canonical 6-tier profession progression captured by the
default preset:
  Apprentice    skill 0-75     lvl 5    1s
  Journeyman    skill 50-150   lvl 10   5s
  Expert        skill 125-225  lvl 20   1g
  Artisan       skill 200-300  lvl 35   5g
  Master        skill 275-375  lvl 50   10g
  Grand Master  skill 350-450  lvl 65   25g

Same shape applies to weapon skills (free, level-gated, capped at
5x char level) and riding skills (canonical Vanilla / TBC / WotLK
gold costs from 90g Apprentice through 5000g Artisan flying down
to 1000g Cold Weather Flying).

Five costKind values cover the full training-skill space
(Profession / WeaponSkill / RidingSkill / ClassSkill / Misc).
Each entry's copperCost stores the cost in copper (1g = 10000c)
which the info renderer pretty-prints as "25g 0s 0c".

Cross-references back to WSKL — skill entries reference costId
here for the tiered training schedule. nextTrainable(currentSkill,
characterLevel) is the engine helper that returns the lowest-rank
tier a character qualifies for and hasn't capped yet — used by
trainer NPCs to populate their offered-skill list.

Three preset emitters: --gen-scs (6 profession tiers), --gen-scs-
weapon (5 weapon skill tiers), --gen-scs-riding (5 riding tiers
with canonical gold costs).

Validation enforces id+name presence, costKind 0..4, no duplicate
ids, min<max range; warns on:
  - requiredLevel > 80 (unreachable at WotLK cap)
  - RidingSkill with requiredLevel < 20 (Apprentice canonically
    unlocks at 20)
  - Profession kind with copperCost=0 (every standard tier costs
    at least a copper — usually a config bug)

Wired through the cross-format table; WSCS appears automatically
in all 15 cross-format utilities. Format count 84 -> 85; CLI
flag count 1010 -> 1015.
2026-05-09 23:04:02 -07:00