Point a gathering bot, and state the gather and bank rules once #139
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/bot-targets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three commits: a feature that had been sitting unpushed, the bug it uncovered,
and the test that needed headroom once the world got bigger.
Point a chopper or a miner at one species or ore
::botgen [count] [kind] [target] [--here] [--xp <rate>], tokens stillorder-independent. A gathering kind takes a
:key—chopper yew,miner coal— andBot.Kinds.spec/4raises the seed level to what thattarget demands, picking the tool from the raised level and never falling below
the default, so
chopper oakchanges nothing.That level is the whole point. Every chopper seeded at Woodcutting 41 and
Bot.Sites.tree_sites/2filters nodes by level, so maple (45) and yew (60)were invisible to every chopper ever spawned — 20 maple sites and 34 yew ones
that the site table held and no bot could reach. The table was a superset and
the capability was a subset.
Targets are read off the skills' own cache-scanned tables through
Bot.Seed.targets/1, at the lowest level a target's rows demand, so a speciesthe scan starts finding is a target an operator can name the same day. A target
is recognised against every targeted kind before the kind is known — tokens
are order-independent — and accepted only if the kind settled on takes it, so
::botgen 1 miner yewanswers with the miner's list instead of swallowing atypo.
Bot.Goals.GatherAndBankneeded no change; it already readMap.get(config, :key, :any).State the gather verbs and the bank test once, not twice
Bot.Siteswrote its own version of two rules the engine already owned, andboth restatements were narrower than the original.
The chop verb. The tick accepts five spellings; the site table scanned for
an option starting with
chop. The arctic pine's option isCut downandboth redwoods' is
Cut, so 61 placements a player could fell that day weredropped at the rows stage — before placements were folded, and long before a
bank was looked for. The symptom was two species with no site anywhere, which
reads exactly like content the cache does not carry, and that is what had been
written down about them.
The bank test. Only the exact verb
Bankcounted, so a bank chest wasnot a bank. The chest is the only bank on Neitiznot and the only bank in the
Woodcutting Guild — which is where "the arctic pine's nearest bank is 216 tiles
away" came from. It is 3.
So
Contract.Gatherholds the verbs andContract.Bank.booth_slot/2holds thebank test, and
World.Player.Advance,World.Content.BankandBot.Sitesallask them. A chest needs its name as well as its verb, since
Useis also acrevice, a viewing orb and every poll booth; that is not the rule against
recovering an id by name, because nothing here looks an id up, and two locs
sharing the name is the rule working rather than failing.
10083, aBank boothwhose only action isUse, stays out — nothing in the game banksthere.
What it is worth
Derived against a real cache, whole world, on this base:
267 tree sites and 38 rock sites now bank at a chest. Mining gained 60% more
sites and fishing 65% from a change made for Woodcutting — every skill reads
the same bank table. Arctic pine went from no site in the world to 13, each
banking at the chest three tiles away.
A player is affected too, not only a bot: clicking a bank chest did nothing at
all before this, with no message, which is indistinguishable from a click that
missed.
Still nowhere to work
Teak (#135) and redwood (#136) still derive no site, and
::botgenstill saysso rather than refusing. Teak is the genuine bank-pairing drop at 108 tiles and
wants a bankless drop loop; redwood stands on planes 1 and 2 with its chest on
plane 0, and
Bot.Travelcannot change plane. The obvious cheaper explanationfor redwood — that the bridge-tile indexing fix in
17156e5had put it astorey high — was tested on top of that fix and is wrong: the placements are
unchanged. Bank deposit boxes are #137.
Checks
mix revenant.ci --gatespasses bar the two Dialyzerguard_fails alreadyfiled as #131, unchanged in count and location with this branch and without it.
Full suite green.
Also reformats
test/support/login_packet.ex, which was failing--check-formattedon a clean tree — the other half of #131.One test needed headroom, and it lies about why
Bot.GatherWorldTestwaited 90 seconds for a chopper to chop one log and bankit. Adding 182 sites moved the closest-banked site it stands its bot on, and
standing a bot on a site does not oblige it to work that one —
choose/2rollsbetween the nearest few — so the trip is whichever came up plus its own bank
leg. Alone the file runs in 48 seconds; inside the full suite, sharing a 600ms
tick with every other world test, it has been measured past ninety.
Measured rather than assumed: passes alone, passes across the whole bot
directory, passes a full suite on seed 7, fails on seed 602971. At 150 seconds
it passes on 602971 too. The failure mode is worth knowing because it reads as
a broken deposit — the assertion that fires is no logs ever reached the bank.
The only other failures on that seed are the fourteen that come from running a
second suite against the same test database, which is a known fixture issue and
not this branch's.
e7032f99efc254f199a4c254f199a46122410591