Skip to content

Add party system - #419

Open
RahulDNair wants to merge 3 commits into
vE5li:mainfrom
RahulDNair:party-system
Open

Add party system#419
RahulDNair wants to merge 3 commits into
vE5li:mainfrom
RahulDNair:party-system

Conversation

@RahulDNair

Copy link
Copy Markdown

What this adds

The core party feature, live-tested end to end against the development rAthena server with two clients:

  • Create / invite / accept / reject / expel / leave, with the full packet set for packet version 20220406 (modern variants: invite by name 0x02C4/0x02C6/0x02C7/0x02C5, member add 0x0AE4, member list 0x0AE5)
  • Party window (Alt+P or the Character Overview button): conditionally shows a create prompt when partyless, or the party name, invite box, member list, and leave button when in a party
  • Per-member display: health bar, level, health, map, and position, updated live from party packets; the local player's health is read from the player entity since the server does not echo it through party packets
  • Leader-only expel: the expel button only renders for the party leader, and never on their own entry (tracks leader changes via 0x07FC)
  • In-world overlays: party members have their health bar and name rendered below their sprite, matching the existing status bar theme
  • Invite modal with accept/reject, mirroring the friend request window
  • Party restoration on login, member upsert by character id, and full state cleanup when leaving or being expelled
  • Localized strings (en-US, de-DE)

Robustness fixes found along the way

While testing, some packets the development server emits were unregistered, which silently truncated the incoming packet buffer (everything after an unknown packet in the same read is dropped):

  • Registered ZC_USESKILL_ACK3 (0x0B1A) and ZC_NPCSPRITE_CHANGE (0x01B0), which ambiently killed unrelated packet bursts
  • Registered the remaining party family: options 0x07D8, position 0x0107, HP 0x080E, death 0x0AB2, job/level 0x0ABD, leader change 0x07FC, incoming party chat 0x0109 (rendered in the chat window), item pickup 0x0B67
  • Skill-requirement failures (ZC_ACK_TOUSESKILL, e.g. creating a party without Basic Skill 7) now surface as a chat message instead of being dropped — this failure was previously invisible

Tests

Round-trip serialization tests for the new packets (wire sizes and layouts verified against rAthena's packets.hpp for PACKETVER 20220406), plus the existing duplicate-header registration tests pass.

Known follow-ups (intentionally out of scope)

  • Sending party chat (needs a chat routing decision, e.g. /p)
  • Right-click context menu to invite a targeted player (needs a context menu component and open-window-at-position support — happy to discuss a design in an issue)
  • Party options UI (exp/item share), CZ_PARTY_CONFIG toggle
  • Using member positions on a future minimap

This is my first contribution to Korangar — feedback on conventions very welcome.

🤖 Generated with Claude Code

RahulDNair and others added 3 commits August 2, 2026 18:49
Implements the core party feature: creating a party, inviting players
by name, accepting or rejecting invites, listing members, expelling
members, and leaving. The party window (Alt+P) conditionally shows
either the create prompt or the member view based on party membership.

Also registers previously unhandled server packets that could silently
truncate the incoming packet buffer (ZC_USESKILL_ACK3,
ZC_NPCSPRITE_CHANGE, and the remaining party family), surfaces skill
requirement failures (e.g. missing Basic Skill for party creation) as
chat messages instead of dropping them, and adds round trip
serialization tests for the new packets.

Tested against the development rAthena server with two clients:
create, invite, accept, expel, leave, and party restoration on login.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Party members now have their health bar and name rendered below their
sprite in the world, using the health updates from the party packets.
The party window shows a health bar and level, health, and position
info per member, and the expel button is only shown to the party
leader. The member list state was moved to a dedicated client side
struct so health, position, and job updates can be applied as they
arrive. Party chat messages, leader changes, and party item pickup
packets are now also handled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The server reports skill failures like insufficient SP, missing
items, or cooldowns through ZC_ACK_TOUSESKILL. Previously only the
missing Basic Skill case was surfaced; now all common failure causes
are displayed as an error chat message, matching the official client
behavior. The cause values follow rAthena's useskill_fail_cause enum.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant