mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 00:32:40 +00:00
Adds `gen tuned` to cmd/open5e-import: a deterministic formula that scales every raw SRD stat block down to an engine-ready DnDMonsterTemplate. HP/AC/ AttackBonus are verbatim SRD (AC clamped to the engine min 10); the Attack stat is interpolated from attackByCRPoints, a CR→Attack anchor table lifted from the hand-tuned dndBestiary (CR is the calibration axis the 2026-05-10 rebalance used — raw SRD per-hit damage is ignored). Speed/BlockRate are coarse baselines from SpeedWalk/AC. bestiary_tuned.go merges the 322 generated templates into dndBestiary, but hand-authored roster entries win — the merge only fills IDs the roster does not already define, so playtested numbers and wired abilities are untouched. Abilities are deliberately not wired: every generated entry has a nil Ability, with the SRD multiattack/trait text parked in Notes as raw material for the follow-up ability-wiring pass.
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package plugin
|
|
|
|
// Tuned SRD bestiary — the engine-ready layer derived from the raw staging
|
|
// table.
|
|
//
|
|
// srdStagingBestiary holds verbatim SRD stat blocks, which one-shot gogobee's
|
|
// solo player and are not a drop-in roster (see bestiary_srd_staging.go).
|
|
// tunedBestiarySRD is what the codified tuning pass produces from it: a
|
|
// DnDMonsterTemplate per SRD monster, scaled to the engine's gameplay shape.
|
|
// The formula lives in cmd/open5e-import/tuned.go; regenerate the data with
|
|
// `go run ./cmd/open5e-import gen tuned`.
|
|
//
|
|
// Caveat — abilities are NOT wired. Every generated entry has a nil Ability;
|
|
// its Notes field carries the SRD multiattack/trait text as raw material for
|
|
// the follow-up ability-wiring pass. Until that pass lands, a tuned-only
|
|
// creature fights with stats but no special mechanic.
|
|
//
|
|
// File is intentionally NOT dnd_-prefixed (see memory: no new dnd_* identifiers).
|
|
|
|
var tunedBestiarySRD = buildTunedBestiarySRD()
|
|
|
|
// Merge the tuned templates into the canonical dndBestiary lookup. Hand-authored
|
|
// roster entries WIN: a tuned entry is only added for an ID the roster doesn't
|
|
// already define, so playtested numbers and wired abilities are never clobbered.
|
|
var _ = func() bool {
|
|
for id, m := range tunedBestiarySRD {
|
|
if _, ok := dndBestiary[id]; !ok {
|
|
dndBestiary[id] = m
|
|
}
|
|
}
|
|
return true
|
|
}()
|