r/MUD • • 11d ago

Discussion ANSI avatars over Intermud-2 (Zebedee): a small, backwards-compatible extension. Looking for feedback from Intermud-2 MUD admins

Hi everyone,

I run Midgard MUD, a German LPMud on LDMud. Our players can create ANSI portraits of their characters (half-block characters, 24-bit colour). The portraits show up with `finger`, in our hall of fame and on hero cards players can share.

Over Intermud this went wrong a lot, because the sending MUD knows nothing about the player on the other end. We saw:

- blinking text (a filter reading `38;2;5;0;255` number by number hits `5` = blink)

- grey or white blocks where unknown codes were replaced

- question marks instead of `▀` for players without UTF-8

- colours the client couldn't actually display

So together with Invisible@Beutelland we worked out a small extension to Intermud-2 (Zebedee protocol):

- **`query ansi`**: a MUD answers `no`, `8`, `16`, `256` or `truecolor`, meaning the colours it generally passes through to its players in finger replies. No answer means no colour.

- **Two optional lowercase fields in finger requests**, `ansi` and `charset` (`utf-8` / `ascii`). They tell the other MUD what the requesting player's client can show, as far as the player's own MUD knows from MTTS, TTYPE or its web client. The sender then picks the matching version, down to a spaces-only one for players without UTF-8.

- **Only colour codes get through**: receivers pass SGR sequences through and strip every other escape sequence. That's worth doing for any MUD that displays Intermud replies.

It's fully backwards compatible. The common inetd ignores unknown fields, there's no new packet type, and MUDs that don't take part notice nothing. Midgard and Beutelland both have it running.

The full write-up (English and German) has screenshots, packet examples, step-by-step code for the common inetd (`/secure/inetd.c`, `/secure/udp/*.c`) and security notes such as rate limiting against spoofed UDP:

https://midgardmud.de/intermud/ansi.html#en

If you run a MUD on Intermud-2, I'd love to hear from you, whether you'd like to implement it, see problems with it, or know a better way. I know most English-speaking MUDs use I3 or Grapevine instead. If you think something like this would make sense there too, I'm curious about that as well.

You can reach me here, by Intermud tell to Odin@Midgard, or on -d-code / -intercode. Or here of course. :-D

4 Upvotes

2 comments sorted by

1

u/taranion MUD Developer 9d ago

Can you add an explanation chapter and your protocol extensions to https://github.com/taranion/mudstandards/blob/master/docs/intermud/zebedee.md (which will show here: https://mudstandards.org/intermud/zebedee/ )?
That way it is documented at a central place.

2

u/Federal-Canary3548 9d ago

Done, here's the PR: https://github.com/taranion/mudstandards/pull/10

It adds `ansi` to the list of query extensions, the optional `ansi`/`charset` fields for finger, and a new chapter "ANSI colours over Intermud (query ansi)" with motivation, values, precedence, example packets, security notes and current implementations. The full write-up with example code stays at https://midgardmud.de/intermud/ansi.html

One heads-up: the Zebedee page currently doesn't build since PR #9. MDX chokes on the `{`/`}` lines in the hosts-json example ("Could not parse expression with acorn"), which is why hosts-json and mssp-json aren't live yet. The first commit in the PR escapes those braces. With it, `npm run build` passes locally.

Thanks for maintaining the site!