eveofdarkness.org

Wings in OpenDAoC: what the retail client already has

Published

Nine characters side by side, each with a different cosmetic effect on its back: pale blue wings, flaming
wings, black smoky wings, bat wings, three pairs of dragon wings, glowing angel wings and a red demon cloak.Video · 0:55, opens the clip

Last month, someone on Reddit asked about the custom wings mentioned in the 1.127c patch notes. I had never heard of such a thing!

Evidently, the retail Dark Age of Camelot has sold these cosmetic wings for years, through the Mithril shop and seasonal events (the Wings of Haunting were a Halloween reward as early as 2020).

I know enough to guess that the digital assets are in the client and the server would probably see these as a spell effect or something. So, something would have to trigger it (an item, a spell icon, etc) that is a consumable? or gives a spell or ability? and once triggered we'd have some wings!

So, the retail 1.130 client already contains all of them: the models, the animations and the table entries that tie them together. A server only has to tell the client to show them, and repeat itself every 30s.

We tried all nine on our test server.

What they are in the client

The client-side picture here comes from an EU-based project that posts client analysis, which reads the 1.130 client's code and data. The 1.127 client has the models, but not the "connecting" parts. They were announced in 1.127c, so I assume that patch, or a later one, added the missing pieces.

In the client's data, wings aren't armor and don't use the cloak slot. They are spells: entries in a block of "vanity" spells (ids 15430 to 15460) whose only job is to hang an effect on the character. Next to the wings in that block are crows, butterflies, orbiting gems, flaming skulls, auras and a demon cloak.

Each wing spell points to one effect, and each effect to one model attached to the character's upper spine. The model brings its own animation, which is why the dragon and bat wings flap. Each effect lasts 30 seconds; the angel wings last about 13. After that the client removes it. Spell effects in this client never loop.

Name Spell id Model
Wings of Ether 15432 VFX_wings01
Wings of Flame 15433 vfx_wings02-fire
Wings of Darkness 15452 vfx_wings03-darkfire
Wings of Haunting 15434 wings_bat01
Stone Dragon Cosmetic Wings 15436 wings_dragon_STONE
Glimmer Dragon Cosmetic Wings 15437 wings_dragon_GLIMMER
Wolf Dragon Cosmetic Wings 15438 wings_dragon_Wolf
Angel wings 15458 VFX_wings-Angel01-combined
Demon cloak 15460 VFX_demon-cloak

The player-facing names are the ones the daoc.gg wardrobe uses; the client's own data calls them "Vanity Wings01", "Bat Wings" and so on. Lists of wing model numbers circulate too, but a server can't send a model number. It sends the spell id.

Showing them

I'm working on a server administration tool (as a server script), so I took a break to add a test/debug "send a crafted packet to a connected player/character" so I can test these out.

The packet is the ordinary spell-effect animation, server opcode 0x1B, see opcodes table, which every server already sends when someone casts. Its 12 bytes (big-endian) are: caster object id, spell id, target object id, a bolt time, a flag byte, a result byte, and two trailing bytes. For wings the caster and target are the same player, the bolt time and flag are 0, and the result is 1. In OpenDAoC that is one call per player in view:

foreach (GamePlayer viewer in player.GetPlayersInRadius(WorldMgr.VISIBILITY_DISTANCE))
    viewer.Out.SendSpellEffectAnimation(player, player, 15433, 0, false, 1);

Everyone who receives it sees the wings, including the player. To take them off at once, the server sends the interrupt packet 0x73 for that player. Note that this also clears the visuals of any buffs on the character.

Two limits come from the client and the server, not from the wings:

  • Players who set /effects to self or none won't see other people's wings. OpenDAoC drops the packet for them itself.
  • Only clients whose data has these spells can show them. The 1.130 client has all nine. Our copy of the 1.127 client data lists the wing models but has no spell or effect entries for them (its spell table stops at id 14999), so a server can't show wings to that client.

Pulse to keep them on

Because each effect disappears after 30 seconds, wings that stay on must be sent again before then, to everyone in view, including players who walk up later.

OpenDAoC already does exactly this for its own pulsing spells. A spell row with Pulse set and a Frequency in milliseconds becomes a pulse effect; the server's effect service fires it again every Frequency ms, and each pulse sends the spell's ClientEffect to every player in range. Chants work this way, and casting one again switches it off.

Retail works the same way. The item text of the 2019 Gem of Swift Travels, a reward from the Manx event, reads: "Grants users a pulsing illusion and movement bonus", with "Duration: 6 sec, Frequency: 5.5 sec", and "the movement and illusion bonuses are only fully removed on logout, death, or zoning". That's a short effect the server keeps re-pulsing.

Giving players a button

What's left is a way for the player to switch the wings on and off. The simplest route, and the closest to the Gem, is an item:

  • a non-tradable magic item, say "Wings of Flame", whose spell is a pulsing wings spell: ClientEffect 15433, Pulse 1, Frequency about 25,000 ms, target self;
  • the player uses it (right-click, /use, or click on the quickbar) to start the wings, and again to stop them.

OpenDAoC needs one small addition for this: a spell type that only shows its effect and nothing else!

Currently, OpenDAoC has existing spell effects that do something to the character. This new spell should also skip the item reuse delays, so the wings can be switched freely. But, how players get the item, whether the wings drop in combat, and whether they're allowed in RvR are a server's own choices. Eden's players have asked for "must-show" wings to be removed because they make you easy to spot.

How the retail players switch theirs on, we don't know for sure. The official pages call the Wings of Haunting a "cosmetic spell effect" and say a character that has them "will not get another pair"; most likely the purchase unlocks a spell or ability for that character. The 1.130 client has no wardrobe window and no /wings command.

The same trick - for kicked players!

That administrative tool that I'm working on can move players, add money, and other operational actions: like mute and kick. So, I think it'd be funny to visually indicate when a player is kicked.

Now, when a player is kicked on my test server, the character stays in the world, link-dead, for 60 seconds before it disappears. It'd be nice to have anyone nearby see that this player is gone. So, lessons-learned from the wings analysis will now be applied!

In a test, we turned the kicked character into a ghost by sending the model-change packet 0xDB with the ghost model to the players in view, at the moment of the kick. Players nearby also see "name has been kicked from the server." on screen. Our admin tools will do this for every kick, repeating the packet so that players who arrive later see the ghost too:

A soldier with a shield stands in front of a stone wall; in the second picture he has become a hunched ghost, his name and guild still above him, with "Spellcheck has been kicked from the server." on screen.Video · 0:07, opens the clip

We tried the vanity spells for this too: the crows and flaming skulls work, but two promising candidates (a dark aura and a miasma cloud) never appear. Their spell entries exist, but the retail 1.130 install doesn't contain their models, so the client has nothing to draw.

So now OpenDAoC-based shards have a recipe for wings and other cosmetic effects on a player! And the client analysis behind it helps any server that wants to talk to the DAoC client, whatever it runs.