Skip to content

Client - Initial Commit - Clan Cape - #832

Open
reignsprime wants to merge 7 commits into
Open-KO:masterfrom
reignsprime:Clan-cloak-started
Open

Client - Initial Commit - Clan Cape#832
reignsprime wants to merge 7 commits into
Open-KO:masterfrom
reignsprime:Clan-cloak-started

Conversation

@reignsprime

@reignsprime reignsprime commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

What is the current behaviour?

The clan cape/ cloak is not implemented in the client.
CUser::SendServerIndex is not implement in Ebenezer.

What is the new behaviour?

The clan cloak is attached to the character. It displays the correct colour and patterns for the clan. It also displays the clan symbols. King cloak is also working.

Why and how did I change this?

This is my first iteration of the clan and king cloak. The cape is plugged into the shoulders. Most of the code already existed but it was commented out or not connected. The mesh is specific to each character model/ race. sCape is pulled from the knight table in the DB. This contains a code for the colour and the pattern.

I have commented out the grid for debugging the clan cape mesh/ movement for the moment.

Setup CUser::SendServerIndex for the WIZ_SERVER_INDEX packet in Ebenezer
Setup the ServerIndex packet handling on the client side.
Setup GetSymbolFilename for the client side to get the image in the middle of the clan cloak.

Things still to do/ test:

Screenshot

image

Was AI used at some point for any part of this change? If so, what?

No

Checklist

  • I have performed a self-review of my own code.
  • Where applicable, I have checked to make sure that this doesn't introduce incompatible behaviour with the official 1.298 server (e.g. unofficial opcodes or behavioural differences).
  • I have checked to make sure that this change does not already exist in the codebase in some fashion (e.g. UI already implemented under a different name).

Comment thread src/N3Base/N3Chr.cpp Outdated
// CN3CPlugBase fields manually so we can redirect the mesh load to
// s_MngMesh (CN3Mesh) instead of PMeshSet (CN3PMesh). Cloak assets are
// .n3mesh files; loading them as .n3pmesh produces garbage vertex counts.
CN3BaseFileAccess::Load(file);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing the ASM from the decompiled 1298 client, it does use CN3CPlugBase::Load; the ctidy comment is valid

@twostars twostars Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they're doing this because CN3CPlugBase::Load()'s only loading progressive meshes here.
But officially it loads both, which would avoid the need for this, and fix any other loaded plugs using the other meshes.

There's no guarantee that capes = old meshes. Though it's pretty common, it's not actually a hard and fast rule, so CN3CPlugBase::Load() should probably just be fixed instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a bit of a crack at the Load() this morning. I think it is right.

Comment thread src/Client/WarFare/GameProcMain.cpp
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
Comment thread src/Client/WarFare/PlayerBase.cpp
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
Comment thread src/N3Base/N3Chr.h
}

CN3CPlug_Cloak* CloakPlugSet(const std::string& szFN);
CN3CPlug_Cloak* CloakPlug()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good reason we can't just use m_pCloakPlug directly?

Comment thread src/N3Base/N3Chr.cpp Outdated
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
Comment thread src/N3Base/N3Chr.cpp Outdated
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
Comment thread src/Client/WarFare/PlayerBase.cpp Outdated
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.

3 participants