Skip to content

About

DNF90 玩家登录器、更新网关与 GM 管理工具链

Resources

Stars

54 stars

Watchers

0 watching

Forks

Repository files navigation

PurpleMagic witch

PurpleMagic

React Flutter Go .NET 8 MariaDB License: GPL v3 Stars

A Windows player launcher, update gateway and GM management toolkit for DNF90.

One source repository with independently built components, from player login and updates to inventory, mail and benefit management.

简体中文 | Beginner guide (中文) | Deploy | Build a launcher | Benefit rules | Network and APIs | Feature ledger | Documentation

Tip

New here? Start with 大肥鱼也能看懂的使用指南 (Chinese). Solo, LAN and internet play use the same services and require a Docker environment for this deployment recipe. The guide covers addresses, certificates, startup, Token login, launcher builds, item delivery and automatic benefits.

GM queries show base rows before bounded parallel supplements, cancel reads when navigating, and support timeouts and retries. The dashboard includes a PVF item-library shortcut; the quest library supports selected characters. Settings can load the approved PVF into memory. See query behavior and PVF modes. Game activities have their own sidebar entry, with search, status filters and batch enable/disable after one confirmation. Saved configuration takes effect at the next game-service restart; the page shows configured and running states separately.

The launcher has account tabs for login, registration, password changes, and optional QQ binding. The GM Anti-cheat → Account and QQ page manages allowed groups, binding records, and three modes: disabled, optional, or required. In optional mode, players can bind a QQ account or log in without binding. Each QQ can bind one account using a one-time code. Three consecutive credential failures trigger a persistent one-minute cooldown. See setup and account API contracts.

Note

QQ binding is disabled by default in repository builds: profile.example.json sets both EnableQQBinding and RequireQQBinding to false. Ordinary account login and password changes work without a QQ bot. Server operators can opt in by building with EnableQQBinding=true; optional binding keeps RequireQQBinding=false and selects Optional in GM. Server profiles cannot turn on a binding feature disabled at build time.

What it does

GM diagnostics correlate requests across services and time account queries, benefit details and delivery transactions. See the logging contract and troubleshooting guide.

Workflow Current capabilities
Player login Windows registration and login, client-directory discovery, channel checks and game launch; launcher source version 1.0.0
Updates Configurable sources, signed manifests and file hashes, progress, pause, installation and rollback; launcher and game-content updates have separate contracts
Dashboard Account/character totals, online presence, registrations, activity, clears and recorded fatigue, registration heatmap and latest announcements; the public gateway includes cached aggregates and older deployments hide unavailable metrics. See dashboard setup
Accounts and characters Search, cursor pagination, online filtering, account expansion and deduplicated recipient selection
Inventory Eight views for bags, equipment, pet equipment, character/account storage, pets, avatars and emblems; inspect instances and edit supported attributes, replace compatible items or delete selected batches
Progression and assets Choose a base class and its profession/awakening stage, then adjust level, SP/TP, gold and premium currency through previewed transactions with durable receipts
Game quests Read character quests and definitions; accept, abandon, mark ready, complete without rewards and reset through management APIs; the console exposes completion and reset actions
Mail and benefits Item choices show IDs and expiration; selecting an account includes all its existing characters; confirm the final recipient list once, then track the durable queue; enabled benefit rules run automatically
Announcements and downloads Edit announcements, update sources and the signed game connection profile through the Hub from the console
GM workspace Orchid glass light/dark themes, floating navigation, page transitions, fixed-position loading indicators and a centered Token form with an optional 30-day session

The integration guide maps each page to the actual Go APIs. Pet growth editing, full avatar attribute changes, emblem sockets, equipment enchantments and token-coupon currency remain outside the current write contracts. The feature ledger tracks the broader roadmap, including moderation, telemetry and public snapshots.

Screenshots

PurpleMagic launcher

PurpleMagic Windows launcher with account login, announcements and updates

Inventory workspace

Inventory edits support an optional Force execution mode when the game provides the edit-lease API: disconnect the account, wait for its save, apply the confirmed change, then restore admission. See inventory editing.

Orchid GM console with eight container views, item attributes and batch selection

Account/character identifiers and local paths in these screenshots have been redacted.

Benefit rules: configure once, keep delivering

Persistent benefit rules are a central part of PurpleMagic. Define a reward and enable the rule: the background service delivers it to eligible characters. Include future characters to extend the same policy to new arrivals without assembling another mailing list.

Automatic benefits with future-character enrollment, permanent receipts and pause/resume

For example, a welcome rule can grant 2,000,000 gold once per character, covering existing characters when activated and new characters afterward. Permanent receipts prevent duplicate grants. Closing the browser, restarting the service or pausing/resuming the rule preserves the same identity and delivery history.

  • Explicit eligibility: the first automatic activation fixes the existing-character cutoff; future characters are an independent option.
  • Durable deduplication: mail, attachments and receipts commit together, including across retries and lost responses.
  • Background delivery: the external scheduler calls the game gateway in bounded batches.
  • Traceable recovery: pause/resume keeps rule IDs, cutoffs and receipts; deleting mail does not reset eligibility.

The quick gold form is once per character; the domain API also supports once per account. A rule supports gold, account points (点券), or one item type. Use 补发未收到 on the independent Benefits page to start a durable background redelivery pass; permanent receipts skip previously delivered recipients. New accounts receive eligible rewards after their first character is created, and future characters follow the rule’s account/character scope. A durable sweep checks for missed recipients every three hours; enabling a rule schedules an immediate sweep. Delivery details automatically follow all pages, show outstanding recipients first, and collapse successful deliveries. After a PVF update, rules with identical item definitions and reward projections adopt the approved version while retaining their original receipts. Daily resets and recurring rewards are not implemented. See benefit rule mechanics and delivery details and reconciliation.

Service layout

The external GMService owns administrator sessions, PVF definitions, queries, persistent mail queues and benefit scheduling. The game-side PlayerGateway owns database transactions, game admission checks and receipts. Public player traffic and private management traffic use separate listeners and credentials.

Component Directory Output
Player launcher launcher/ Flutter Windows UI, C# engine, portable installer and self-update components
Game-side gateway and Hub gateway/ PlayerGateway: player APIs, signing/publication and private management transactions
External GM and PVF gateway/ GMService and offline GMIndex; full PVF indexes stay outside the game service
GM Console gm-console/ React/TypeScript static application served under /console/
Offline tools and migration sources gm/ Original GM tools, PVF tooling and compatibility contracts

The network and API brief separates game TCP, account HTTPS, management tunnels and download sources. It also distinguishes existing APIs from the proposed scheduler, publisher and launcher build workers. Download the repository and open the offline overview, network diagram or module diagram in a browser.

Reads, edits and recovery

Accounts, inventory, mailboxes and quests load by page, container and cursor. A PVF generation is identified by its complete SHA256; changing the file requires rebuilding and verifying its indexes. The game gateway requests bounded definitions from the external service.

Management writes use revision checks, idempotency keys and durable receipts. Character-specific edits check the selected character's offline state; shared account assets retain account-level protection. Confirmed mail keeps running after the browser closes and resumes after service restarts. Benefit rules preserve their delivery records across retries and index generations.

Deployment and gateway integration

The repository ships a Linux Docker Compose recipe, multi-stage image and private configuration generator. Supply an existing game server/MariaDB, approved PVF, player profile and certificates, then prepare the service files, build six index categories, initialize additive management tables and start PlayerGateway, GMService and the HTTPS edge.

python3 deploy/selfhost/prepare.py --settings runtime/selfhost-settings.json --output runtime/selfhost
docker compose --env-file runtime/selfhost/compose.env -f deploy/selfhost/compose.yaml build

The deployment guide covers inputs, indexing, schema initialization, startup, ports and persistent data. The gateway integration contract describes account APIs, proxy credentials, runtime admission, storage mapping and two-way SSH tunnels.

Important

The current adapter targets the DNF90/ServerS5A3 login protocol and MySQL save schema. Other game servers need corresponding APIs and repository mappings. Public configuration uses example values; real endpoints, DSNs, tokens and private keys stay in ignored runtime/ files or outside the checkout.

Generate a launcher for your game server

The existing command-line pipeline prepares a profile from a connection configuration, approved client, TLS certificate and RSA public key, then builds the Windows launcher:

python scripts/prepare_launcher_profile.py --connection runtime/launcher-input/server.json --client D:/GameClient --certificate runtime/launcher-input/player-fullchain.pem --public-key runtime/launcher-input/update-public.pem --output runtime/launcher-input/profile.json
BUILD_FLUTTER.bat --flutter D:/SDKs/flutter --dotnet dotnet --profile-dir runtime/launcher-input --output dist/PurpleMagic-1.0.0
BUILD_PORTABLE.bat --bundle dist/PurpleMagic-1.0.0.zip --output dist/PurpleMagic-1.0.0.exe --dotnet dotnet

The profile tool hashes the EXE/PVF and certificate and preserves explicit channel compatibility settings. Configure the account ApiUrl, direct game GameHost:BootstrapPort and update sources separately. The Windows application is named PurpleMagic and uses the native folder picker.

The build and publishing guide explains fields, first-time signing keys, SDK/artwork inputs, channel probes and Hub publication. A web generator and Windows build queue are planned.

Quick preview

Use Node.js 24 and npm:

cd gm-console
npm ci
npm run dev

Open http://127.0.0.1:8778/?demo=1 for the standalone sample-data preview. The production build uses the real API adapter. For local integration with a disposable database, follow the GM Console guide; for service deployment configuration, see external GM services.

Note

gm-console/ is the current frontend and design baseline. The first gm-web/ is archived as FROZEN_DO_NOT_REFERENCE; production packaging uses gm-console/dist/.

Build and check

Toolchain: Node.js 24, Go 1.26.5, Python 3, .NET 8 and Flutter Windows. Launcher release builds also use Visual Studio C++ and NativeAOT.

Run from the repository root after installing the frontend dependencies:

npm --prefix gm-console test
npm --prefix gm-console run build
python scripts/package_gm_web.py
python scripts/check_boundaries.py
python scripts/build_gateway.py linux amd64

The static package is dist/gm-console/PurpleMagic-GM-Console.zip. PlayerGateway, GMService and GMIndex are written to dist/gateway/linux-amd64/; replace linux with windows for Windows. Build the original GM tools with python gm/scripts/build.py linux amd64.

python scripts/verify_component.py gateway
python scripts/verify_component.py gm
python scripts/verify_component.py launcher --dotnet <dotnet8>
python scripts/verify_component.py flutter --flutter <flutter>
python gateway/scripts/test_mysql.py
python gm/scripts/test_mysql.py

Database checks create disposable MariaDB containers and require Docker. Build the launcher with BUILD_FLUTTER.bat --flutter <flutter> --dotnet <dotnet8> --profile-dir <profile-directory> --output <new-output-directory>. Supply the signing profile and artwork, then use BUILD_PORTABLE.bat to wrap the complete ZIP.

Important

Runtime configuration, signing material, game assets and player data are supplied by the deployment environment. Match the player, game-service and GM EXE/PVF/profile combination, then verify the published files in the documented release order.

Documentation

Topic References
Network, interfaces and future modules Topology and contracts · Architecture
Console and visual baseline Real API integration · Orchid design archive
Features and transactions Feature ledger · API foundations
Management services External GM/PVF · Current routes · Mail and benefits
Items and character data PVF item details · Character resources
Announcements and public queries Launcher announcements · Public snapshot design
Changes and source versions Changelog · Provenance · Launcher 0.2.16 import

Sources and licenses

PurpleMagic's own project code is licensed under GNU GPL v3 (GPL-3.0-only); see LICENSE. Distribution of covered binaries or modified versions must retain the required notices and provide corresponding source under GPLv3.

Imported code, dependencies and assets retain their original notices and licensing scope. See licensing details, source provenance, the GM notice, current frontend notices and archived frontend notices.

About

DNF90 玩家登录器、更新网关与 GM 管理工具链

Resources

Stars

54 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages