r/ultimaonline • u/Open_Mongoose_1764 • 7h ago
Private • Showcase [Release] Shardfolk v2.0 (formerly PlayerBots) – Autonomous Player Bots & Party Companions for ModernUO
Hi Sosarians,
I've been working on a ModernUO module called Shardfolk (it started life as "PlayerBots") and it's reached the point where I'm happy to start to share it. It fills your shard with simulated players: characters who live in the world, have jobs, walk between towns, trade, and occasionally chat with you when you pass by. Full disclosure, the coding is done with Claude because I suck at coding, I hope you don't hold that against me.
Repo (GPL-3.0): https://github.com/Kol-ri/modernuo-shardfolk
Current version: v2.2.0
## What is Shardfolk
Every bot is a real `PlayerMobile` character, not an NPC with a player skin. Each one has a name, a persona, a job, a home town and a small memory, and goes about its day on its own. The goal is a shard that feels lived in, even at 3 AM when you're the only human online.
On my own shard it currently runs about 1,500 bots spread over six facets (Felucca, Trammel, Malas, Ilshenar, Tokuno and Ter Mur). In dev load tests, 5,000 bots ran comfortably and 10,000 still worked.
## What it can do today
- **Seven jobs.** Socialites, crafters, miners, adventurers, mages, merchants and builders. Miners mine and smelt, crafters buy ingots and make goods, mages keep their reagents stocked, merchants trade, and builders save up for a house deed and place a house.
- **A real economy loop.** Bots sell to and buy from NPC shops and can buy from player vendors, with fair-price limits built in (a multiple of the NPC price, a flat cap for items no NPC sells, and an hourly spend limit per bot). There's one setting that scales all gold bots earn, so you can keep inflation in check.
- **No pop-in.** Bots don't teleport, appear or fast travel while a player can see them. If a bot needs to go somewhere far, it walks until it's out of sight first.
- **Proper walking.** A per-facet road graph means watched bots go round lakes and mountains and out of walled towns instead of walking into trees. They open unlocked doors (never locked ones, and only house doors in houses they own).
- **Idle life.** When you're watching, bots face you when you talk, fidget, shuffle, bow, and greet you once instead of standing like statues.
- **Chat.** Bots answer when spoken to, and only one bot replies per line, so you don't get a chorus. By default they use canned lines that fit what you said (greetings, thanks, trade, questions). Optionally you can hook up a local LLM through KoboldCpp (or any OpenAI-compatible server) for free-form replies, with filters that drop links, "as an AI" talk, emojis and any words you block.
- **Death and resurrection.** With a small patch, a bot that dies becomes a ghost like a player, leaves a lootable corpse, and after a configurable delay is resurrected at the healer nearest its home.
- **Parties add-on (optional).** Invite a bot with combat skill into your party and it joins as a companion: it follows you, fights, casts real spells with real reagents, bandages and cures, and takes orders in party chat (follow, stay, attack, heal, stances and more). Crafters and other non-fighters politely decline.
- **Admin tools.** GM commands to create, list, move, unstick and delete bots, check waypoints, build road graphs, and more. Bot profiles are kept in `Data/Shardfolk/bots.json` with safe writes, a backup copy, and snapshots taken with every world save.
- **Clean uninstall.** Bot bodies are plain `PlayerMobile`s carrying standard items, so your world save still loads without the module.
## Honest limitations
- **Two small core patches.** Bots don't carry the `Player` flag, so you need a one-file patch to ModernUO for bots to become ghosts when they die instead of being deleted, and a two-file patch if you want players to invite them into parties. Both are in the repo's `patches` folder, and both leave stock behaviour alone for everything that isn't a bot.
- **Setup per shard.** Bots need waypoints (banks, forges, mines, hangouts and so on) and spawn points for your shard. `[BotAutoWaypoints` builds a starting set from your NPCs and forges, and there are GM commands to add and check the rest, but expect to spend some time on this, especially on a custom map.
- **Valley of Eodon** needs hand-made spawns and waypoints; the automatic ones don't cover it yet.
- **LLM chat is short and local.** Replies are kept to a line or so, and you need to run your own LLM server (KoboldCpp works well). Without one, bots fall back to canned lines, which is the default.
- **Everyday bots don't fight yet.** Adventurers "hunt" in a simplified way rather than in real fights, and bots don't defend themselves. Only party companions actually fight.
- **No player trading yet.** Bots buy from vendors but you can't haggle or trade with them directly.
- **Tested on Linux in Docker** against recent ModernUO (0.15.6 and early-December `main`) on .NET 11. It's plain C#, so it should run anywhere ModernUO does, but reports from Windows and macOS users would be very welcome.
## What's next
There's plenty more planned: making bots feel more alive day to day, smarter conversations, ways for bots to handle danger for themselves, and down the line some way for players to do business with them. No promises on dates, it gets built when it gets built.
## Feedback
Bug reports, ideas and pull requests are all welcome on GitHub. If you find a security issue (anything touching gold or items, for example), please use GitHub's private vulnerability reporting rather than a public issue.
Thanks for reading, and I'd love to hear what you think!
