Bezgelor

A WildStar server emulator, written in Elixir.

WildStar's servers went dark in 2018. Bezgelor is an attempt to bring them back: authentication, realm selection and the game world, rebuilt on Elixir and OTP and ported from the C# of the NexusForever project, with a web portal for players and the people running the server.

Early days · much isn’t playable yet

Select a server

One Elixir umbrella starts everything the WildStar client expects to talk to, plus the portal.

What comes online

Server Port Does
Auth (STS) 6600 SRP6 authentication and packet encryption
Realm 23115 Character selection
World 24000 The game world itself
Portal 4000 Player dashboard and admin console

Quest log

The systems Bezgelor is working through, grouped the way you'd meet them in game.

Work has been done on everything below, but much of it isn't functional yet because the implementation is incomplete or buggy. Treat this as a map, not a promise.

Supervised by OTP

Each concern is its own app in an Elixir umbrella. Zones run as GenServers, creature AI fans out in parallel tasks, and supervision trees restart whatever falls over.

bezgelor
  • Servers
    • bezgelor_authauthentication, :6600
    • bezgelor_realmrealm list, :23115
    • bezgelor_worldthe world, :24000
  • Game
    • bezgelor_coreentities, spells, combat, AI, XP
    • bezgelor_protocolthe binary protocol and handlers
    • bezgelor_cryptoSRP6 and packet encryption
  • Data
    • bezgelor_dbEcto schemas on PostgreSQL
    • bezgelor_datastatic game data in ETS
  • Web
    • bezgelor_portalPhoenix LiveView portal
    • bezgelor_apiREST API
  • Tools
    • bezgelor_devpacket capture for reverse engineering

And because it's the BEAM, most gameplay changes go live with a recompile() in IEx, without restarting the server or logging anyone out.

Reading the unknown

Plenty of WildStar's protocol was never documented. In development, bezgelor_dev catches every packet the server doesn't understand, asks you what you just did in game, and writes a report to work from. When it's off, compile-time macros remove it entirely.

# config/dev.exs
config :bezgelor_dev,
  mode: :interactive,  # :disabled | :logging | :interactive
  capture_directory: "priv/dev_captures"

The portal

A Phoenix LiveView site for everything outside the client, with Player, GM, Admin and SuperAdmin roles and an audit trail of every admin action.

For players

  • Characters with a 3D viewer, stats and gear
  • Inventory across bags, bank and equipment
  • Achievements by category
  • Guilds: roster, ranks and applications
  • Mail, with attachments

For the people running it

  • Live monitoring of players, zones and health
  • Accounts: search, suspend, ban, reset
  • Characters: grant items, teleport, reset lockouts
  • Economy and instance tools
  • Events: start them, spawn world bosses

Host a realm

You'll need Elixir 1.15+, Docker for PostgreSQL, and data files from your own WildStar client. Game assets aren't redistributable, so the repo includes tools to extract them locally.

$ git clone https://github.com/Bezgelor/bezgelor.git && cd bezgelor
$ ./scripts/setup.sh   # database, deps, migrations
$ ./scripts/start.sh   # every server, portal on :4000

Register an account in the portal, then launch the client with the batch file in tools/ and log in.

A game server includes many interesting, interacting systems: networking, concurrency, state management, data modeling, all in a dynamically scaling context.

And hey, I really miss WildStar.

None of this would exist without the reverse engineering and support of the NexusForever community.