mod-free-will: Crashtroller becomes an autonomous player run by the server
New module written from scratch on the official core: the server itself logs Crashtroller into a client-less session and plays him like a human — quests, combat, loot, resting, death, vendor, class trainer, talents, gear — with no cheating.
- Commit
- 2bf59b3
- Build
- Build success (7 min) · Target worldserver
Principle
No third-party module: mod-free-will is written for this realm, on official AzerothCore.
- Client-less session: when no human plays Crashtroller, the server opens a socket-less
WorldSessionand loads the character through the same path as a real client (LoginQueryHolder→HandlePlayerLoginFromDB). - Handover: as soon as the owner selects the character (
CMSG_PLAYER_LOGIN, handled on the world thread), the AI saves and releases it synchronously; the core reloads it for the human. - No cheating: every action goes through the core's packet handlers (accept/turn in a quest, loot a corpse, sell, repair, train, learn a talent, equip, release spirit, reclaim corpse) or non-triggered spells — costs, ranges, cooldowns and rules apply exactly as for a client.
- Natural movement: paths computed on the navigation mesh (mmaps) then followed as splines; never a teleport nor a straight line through a wall.
The brain
Decision loop run on the world thread (maps idle), with random reaction times:
- death → wait, release spirit, run back to the corpse, wait for the area to be safe, resurrect (spirit healer as a last resort);
- combat → per-class rotation (10 classes), ranged shooting for the hunter, melee on contact;
- loot, resting seated / food / drink;
- vendor (sell grey and useless items, repair, ammo, food), class trainer at each level;
- quests: turn in, pick up (camp first), complete objectives (kill, gather, explore); drop a quest with no progress in 25 min;
- hunting at his level, then idling (and waving at passing players).
World knowledge
Built at startup in ~120 ms: 17,462 creature entries, 2,545 quest items located (who drops them, which chest holds them), service NPCs, exploration areas.
Monitoring
JSON status file rewritten every 5 s (control, level, XP, position, quests, activity, goal, stats) and an event log.
First test
Logged in by the server, Crashtroller walked to Kaltunk, accepted “Your Place In The World” and turned it in on his own.