Skip to content

dungeongen: aggro-count estimator and pull_size lint (camp-pull spec part A) - #398

Closed
pjerra wants to merge 14 commits into
devfrom
feat/aggroest-pull-size
Closed

pjerra wants to merge 14 commits into
devfrom
feat/aggroest-pull-size

Conversation

@pjerra

@pjerra pjerra commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Part A of the camp-pull spec, turtle-agent side. The TortoiseBots side is feat/aggro-walk-ring.

What it adds

  • internal/aggroest: a port of TortoiseBots' own pull estimate. It counts:

    • the pulled unit's aggro-together pack;
    • every live mob within aggro reach of the party's walk and its stand;
    • call-for-help through a 20 yd ring from every engaged mob, up to 2 hops, pack-mates included, with a 12 yd height band.

    The walk is sampled along its whole length, with the endpoint kept.

  • Plan field max_bodies: per pull group; a plan-wide pull_ceiling is the fallback. It is exported in the pull row's item column.

  • pull_size lint in dungeongen -check:

    • The target is resolved from the row's own entries inside its ownership radius, kill_first first. A row with no valid target gets a no target finding.
    • Each pull row has a stable route index.
    • World or estimate load errors fail the check, with or without -strict.

Current zul_gurub result: 95 pull_size findings. These are pulls that would wake more bodies than their ceiling, and they are the input for picking camp-pull and staged-pull points.

Reviews: three Codex rounds; all findings are fixed. Tests: go test ./..., vet and gofmt are clean.

pjerra added 14 commits November 2, 2026 20:05
PullSizes returned early when the export had no eligible mobs (empty or
friendly-only), so no pull row got its "no target" finding and the check
could pass clean. The early return is gone: every pull row goes through
pullTarget, and a row that finds no target gets its finding.

Tests: one pull row with zero creatures gives one "no target" finding;
checkFile with a header-only creatures.tsv warns without -strict and
exits 1 with -strict.
A mob no row owns reads 0 from the owned map, which is also the
route's first row index: the first row could pick a stranger.
TestPullSizeTargetIgnoresUnownedMobAtRouteStart pins both sides.
Matches worldspawn.AggroRadius (0 for detection under a yard, like
NO_AGGRO). pull_size keeps its own explicit mapping: its 0 means the
export predates the column, read as 20 yd. TestNoDetectionRangeNeverWakes
mirrors the worldspawn row.
pullMobs uses the route lint's filter (hostileMob, shared with
RouteIntoLaterPacks, not a copy): no NPC flags, no ignored or
friendly faction (35 is friendly to all, as in Check), no critters.
Rows gated to the other team are not pulled by this run: routePoint
carries the plan's team gate off the export flags and PullSizes skips
those rows (no pull number consumed). No pinned count moves: the
fixtures' counted rows are all hostile and ungated.
TestPullSizeIgnoresFriendlySpawnsAndOtherTeamRows pins the friendly
neighbour and the gate; TestPullSizeTargetIgnoresUnownedMobAtRouteStart
pins the owned presence check.
Over-ceiling rows are warnings for a person; only -pull-size-strict opts
into the ceiling. No-target rows and load errors still fail -strict.
checkFile takes the ignore factions and the pull-size-strict flag, and
the N warning(s) summary line is back. Tests: the committed uldaman plan
passes -strict on its 58 over-ceiling warnings (its no-target row still
fails it), and a synthetic over-ceiling row pins the strict matrix.
Pull 14 (the row over the G13/G16 terrace, export step 29) estimates 27
bodies; the neighbours 13, 16, 17 estimate the same set, 15 and 18 break
away at 31. RingYd 10 drops pull 14 to 22 (red, then restored).
The pull lint dropped every npc_flags spawn and every faction-35 spawn,
so the -awakened and -scripted entries (Uldaman's Stone Keepers, scripted
gossip NPCs) never joined a pull. A pull row that owned only such a spawn
reported "no target" instead of its body count.

PullFilter now carries the check's awakened and scripted sets. A spawn of
those entries bypasses the npc_flags, faction 35, friendly and ignore
exclusions; the critter rule still applies. hostileMob is unchanged for
the route lint.

Test: four awakened Stone Keepers at one stand with ceiling 3 count 4
bodies, and the same for a scripted spawn with npc_flags.
@pjerra

pjerra commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Combined into #401

@pjerra pjerra closed this Nov 2, 2026
pjerra added a commit that referenced this pull request Nov 2, 2026
Combined 3: hire floors + spot check (#385), Zul'Farrak boss steps (#391), walk-super without eval, boss rows own their boss, pull_size lint (#398)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant