No more dithering at 800 m, vendors that actually sell, bags finally bought
A log review by another session uncovered four flaws that sent autonomous players on the road for nothing — hence towards monsters: thousands of back-and-forths around the hearthstone binding limit, visits to a tailor to buy drinks, over-budget purchases repeated every 4 minutes, and no bag ever bought. Fixed. At 300 players, measured mortality is about 3 deaths per minute.
- Commit
- d02d886
- Build
- Build success (2 min) · Target worldserver
The flaws
- Dithering at 800 m: binding the hearthstone triggered beyond 800 m from home, with no hysteresis. When the chosen innkeeper and the quest NPC were on either side of the limit, the character alternated both objectives every second (Elena: over 2,100 times each).
- Wrong vendor: for food and drink, the nearest vendor, even one selling neither (a tailor, visited every 4 minutes).
- Over budget: the best item of one's level, regardless of price: a level 5 aimed at a 125 c haunch with an 88 c budget, and came back. 45 % of vendor visits since the morning bought and sold nothing.
- No bags: 20 % of characters level 5 and above had a full backpack and no other bag.
Fixes
- Once the innkeeper is chosen, go all the way (3 min max) without re-evaluating the distance; triggers at 900 m.
- Food and bags: a vendor whose stock really holds a useful, affordable item; otherwise the need is paused for 30 min.
- The best item *one can afford*; a visit with no food bought suspends that need for 30 min.
- From level 5, with 5 silver and a free slot: buy the largest affordable bag (6 slots or more), installed right away.
Measurement at 300 players
Over 10 minutes: 30 deaths (about 3 per minute), 13 to 19 level-ups and 20 to 36 quests turned in per minute; server at 145 % of one core (4 map threads), world update at 151 ms.