Commit graph

18 commits

Author SHA1 Message Date
Erik
9b5371c2e4 Wire the host's new readings into the frames
vitals.vitae is the penalty percent computed exactly as the original's client
library did from the vitae multiplier; character_stats carries the titles (by
name, server order), the current title id and the allegiance (monarch,
patron, rank, followers); telemetry.vt_state reads the bot's published meta
state; dungeon_map reads the landblock's indoor cells; the main window's
Tools buttons reopen the Mossy Tracker and Metas windows even after the
player closed them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 13:00:03 +02:00
Erik
50a173ef25 Build against plugin API 0.1.19-mm.1; item header words from the host
The contract now reports each object's description header, so the item
record carries the words the original's framework filed from it: the weenie
and second header flags, the physics description flags, the setup id, the
scale key (0.0 whenever a scale was sent, as recorded), the hook type, the
parent and parent location, and the framework's own summary word (key
218103831: stackable, has a position, lockable, inscribable, usable,
container), derived from the header by a rule that matches all 2,220 recorded
items carrying both words. With the header flags known, key presence follows
the header exactly instead of guessing from non-zero values: a recorded
Pyreal Mote now rebuilds key for key.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:58:43 +02:00
Erik
0af4efb6b6 Chat: read the host's own wording of each line
DECAL handed the original each line as the chat window shows it, tell links
included; the host now reports the same wording (DisplayText). Kill, rare,
combat and !report parsing and the chat frame read that, with tags stripped
for the frame exactly as before; the plugin's own formatter remains only for
a line the host did not word.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:45:49 +02:00
Erik
5a94e1cf0b Wire: write doubles and floats with .NET Framework's round-trip digits
The original ran Newtonsoft.Json on .NET Framework, whose "R" format writes
15 significant digits when they read back exactly and 17 otherwise (floats: 7,
else 9). Modern .NET writes the shortest round trip instead, so a value like
-0.066666670143604279 came out as -0.06666667014360428: equal when parsed,
different bytes. Every frame now goes through a converter that repeats the
Framework rule, with Newtonsoft's '.0' suffix and non-finite handling kept.
Goldens that encoded the modern digits are corrected.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:44:34 +02:00
Erik
82a518dcfb Merge slice/inventory: full_inventory, inventory_delta, equipment_cantrip_state
Resolved FeatureCatalog; telemetry now reads the taper count from the
inventory feature. The logoff inventory is sent from the feature's own
OnLogoff instead of a second host-logoff subscription whose correctness
depended on subscription order: the root logs features off in reverse, the
socket last, so the frame still leaves.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:42:41 +02:00
Erik
c1e8a2cf18 Inventory: stamp an appraisal when it arrives
The original's appraisal time was the wall clock at the moment the
appraisal came in. The reader stamped it when it first built the record,
which for a coalesced update can be minutes later; the appraisal event now
stamps it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:41:00 +02:00
Erik
7a6b0a7f9d Inventory: full_inventory, inventory_delta, equipment_cantrip_state
The backend's inventory views and mana panel are fed by three streams the
original sent: the whole inventory after login, at logoff and on
/mm sendinventory; an add, update or remove per item as it enters,
changes in or leaves the packs; and the per-item cantrip state of worn and
wielded gear. This ports all three onto the host's object events, with the
frames built exactly as the original built them.

Behaviour kept: adds and removes go out at once, changes are coalesced into
one update per item on a two-to-five-minute timer re-rolled per flush; the
first login appraises everything worth appraising and waits before
sending; later logins merge in the saved appraisal data (kept in the
character's storage, as the original kept a file per character); the
mana panel debounces a quarter second and projects mana down between
reports.

Adapted to the host: appraisals go through a tick-driven queue, one at a
time, retrying while the host's single slot is busy; the login upload waits
for the inventory to stop arriving and for the socket, so it is not
written into a closed socket; the logoff upload subscribes ahead of the
root so the socket is still open; enchantment changes are polled once a
second (the host has no event); an item-cast enchantment is the one that
never runs out. A request the server never answers no longer holds the
upload back for good.

The Prismatic Taper count telemetry reads is InventoryFeature.PrismaticTaperCount.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:39:55 +02:00
Erik
5b3179dd75 character_stats: the full character frame, five seconds after login and every ten minutes
Fields, order and types as the original sent them. Values follow the
original's client library where it matters: race and gender are the player's
string properties, birth the creation time as a US date (explicit pattern, so
no newer-culture space quirk), burden the units over 150 times effective
strength truncated to a percent, capacity with the carrying augmentation, and
properties the player's integer properties minus the original's blacklist.
Attributes, vitals and skills carry unbuffed values, creation being the value
before experience was spent. Titles, the allegiance tree and luminance total
come through seams that the plugin API additions fill; until then they are
null, as the original sent them before the matching server message arrived.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:33:15 +02:00
Erik
2e5d768ca9 Merge slice/flagtracker-metas: quests, Mossy Tracker, meta sync
Resolved FeatureCatalog (both blocks kept; the main window's Tools buttons now
open the Mossy Tracker and Metas panels). Tests from both sides adjusted to
the combined plugin: quest tests look at quest frames only (chat is streamed
too), and the stream tests ignore the /myquests request sent at login.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:29:10 +02:00
Erik
ec22348ebc Radar: nearby_objects every second and dungeon_map per dungeon landblock
start_radar/stop_radar from the backend drive it, as before. nearby_objects
keeps the original's shape: map coordinates on the surface, landblock-local
raw positions with zero map coordinates in a dungeon, ids as signed ints, the
same eight object classes, no wielded items or self. dungeon_map is built the
original's way from the landblock's cells (x a multiple of 10, whole metres,
6-metre floors, rotation = the orientation's stored W) and sent once per
landblock per session; the cells come through a small reader that the
plugin API's dungeon-cell data will fill (until then the map is not sent).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:28:07 +02:00
Erik
162d242c06 Meta sync: pull the club's metas and navs into the shared profiles
The original kept VTank's profile folder in step with the club's metas
repository; the port does the same against host.VtankProfiles, dropping
.met files under mosstank/metas and .nav files under mosstank/navs where
MossTank reads dropped profiles, flattened to their bare names as the
original flattened them. The Gitea tree and raw endpoints are the
original's; the repository address is the metas_repository_url setting,
defaulting to the original repository. An overwritten file keeps its old
copy as .bak (MossTank's pickers skip .bak side files).

Storage is text-only, so the SHA-256 compare hashes the text a stored read
gives back (UTF-8, BOM dropped); for the plain-text files in the repo that
equals the original's byte compare. Network work runs on the thread pool,
one operation after another; chat lines and window updates are applied on
the tick. The four /mm verbs keep their chat lines, and the Metas tab is
its own markup window with IsVisible for the main window to open.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:26:14 +02:00
Erik
0efef6170c Shared-vitals overlay on a canvas
The original's DxHud overlay: the player's row, then one per character heard
from, each a health bar over split stamina and mana bars with percentages,
and for the others an arrow toward them relative to where the player faces
plus the distance, fading from white to red as they get further. Ctrl shows
a frame and a close box; Ctrl+drag moves it and the spot is saved per
character. /mm vitalsharing overlay toggles it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:25:33 +02:00
Erik
78813cf861 Vital sharing across computers through the backend
Outgoing, the original's share_* frames byte for byte: subscribe with the
player id on start and without it after every reconnect, vitals on change or
every 3 s, position on change or every 10 s, the item heartbeat every 5 s,
unsubscribe on stop. Debuff casts come from the host's peer network: the
attempts and landings the bot announces, plus the player's own completed
casts, so a hand-cast debuff is shared once it lands (a plugin cannot see
outgoing packets, so hand-cast attempts are not). Ids stay signed ints, skill
a double, duration_ms the spell's duration.

Incoming, another computer's characters and casts go into the host's peer
network (the new relay imports), where the bot reads them exactly as it reads
characters on this computer: vitals and position for heals, landed debuffs
for target choice. Peers not heard from for 15 s drop out; the original kept
them forever. Logoff now runs features in reverse so the unsubscribe leaves
before the socket closes, and stopping the socket flushes what was queued.

Builds against a preview of the plugin API with the peer relay
(0.1.19-mmpreview.1, packed from the relay commit); switch to the released
package when it exists.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:24:00 +02:00
Erik
714fbfa2e8 Flag tracker: the Mossy Tracker window as a markup panel
The owner calls the flag tracker important, so the original's pages come
across with their tables unchanged: augmentations and luminance auras from
the player's own int properties (the object table carries them), recalls
from the spellbook with composited spell icons, cantrips matched from the
active enchantments to trained skills, attributes and wards, the tracked
weapons the original kept data for but never showed, and the quest timers.
Read on the tick thread at login and on each page's Refresh; the quest
page redraws every five seconds instead of from a thread-pool timer.

The root panel's visibility is the settable IsVisible so the main window
can open it; the three sections the original left as stubs stay out, and a
headless host registers nothing. The fake spell catalog learns IsKnown.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:20:52 +02:00
Erik
5799ea956e Main window: Main, Settings, Statistics and Tools tabs as a markup panel
The original's notebook without the parts OpenAC or another plugin now owns
(updater, VTank path, route visualisation, chest looter). Labels read live
from the trackers each frame. Settings gains the backend URL and shared-secret
fields, since the secret is no longer compiled in. Tools opens the Mossy
Tracker and Metas windows through openers their features set. The WebSocket
label now shows the real connection state rather than the setting.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:19:01 +02:00
Erik
0b5da797e0 Quests: /myquests parsing and the 30-second quest stream
The backend's quest panel shows the stipend, blank aug gem and insatiable
jaw timers from the `quest` frame, so the port reads /myquests the way the
original did (a three-second window of chat lines matched by its regex)
and streams the three priority stamps every 30 s with the same five-field
frame and the same countdown strings. The name table is copied as it was,
so the duplicate insatiableeaterjaw entry still resolves to the later name.
Timers run on the tick scheduler instead of thread-pool timers.

The session tests clear the login-time /myquests before counting the
commands the backend ran.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:14:25 +02:00
Erik
1ff0a40aeb Slice 2: telemetry, vitals, chat, spawn/portal, rare, kills and combat stats
The frames the backend reads most, each pinned by a golden test written from
the original's source (field order, JSON types, string-formatted numbers,
mem_mb in bytes, the PascalCase aggregates Newtonsoft emits for combat_stats).
Coordinates repeat the original's float arithmetic from the landblock-local
float, so ew/ns carry the same float-widened values as before. Telemetry goes
out on connect and every 5 s, vitals every 5 s, combat stats every 10 s when
dirty. The rare meta-state switch is not carried over (owner decision); the
allegiance rare announcement and the !report reply are. Kill patterns and
combat patterns are the original's, unchanged.

Also fixes the tick scheduler re-arming repeating jobs from now instead of
from their due time, which made every cadence drift a frame late per period.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:12:22 +02:00
Erik
5dbb294a96 Skeleton: plugin root, backend socket, /mm router, settings, test harness
The socket connects with the shared-secret header, registers first, reassembles
incoming frames of any size (the original dropped anything over 4 KiB) and
reconnects two seconds after a failure. Incoming share_* frames go to the
vital-sharing handlers; any other frame is a chat-box command for this
character, run one per tick through the chat bar as if typed. Frames are
written with Newtonsoft.Json defaults, the original's serializer, so the
backend sees the same bytes. The secret lives in the character's settings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:03:00 +02:00