feat(chat): custom chat bubbles

Players choose how their chat bubble looks, and everyone sees it.

- style: a gradient of 2 to 5 colour stops (linear at any 45° step,
  radial, or solid), its strength, text and border colours, outline
  thickness 0-4, opacity 25-100%, and an animation (still, pulse, shimmer,
  flow, rainbow) at 40-300% speed. lib/chatstyles.js keeps the one
  canonical form: forgiving for saved accounts, strict for requests.
- in the game: Settings > Chat Bubble > Customize opens an editor with
  presets (Ocean, Sunset, Forest, Midnight, Candy, Rainbow), a palette,
  Swap, Random, Reset and Save, and a live preview. "Custom bubbles: Off"
  draws everyone's bubbles normally on this computer only.
- on the web: the account page has a Chat bubble section with the same
  choices.
- wire: xcs with no fields asks for the saved style, with twelve (or an
  older client's 7, 10 or 11) saves it; the reply is the canonical twelve.
  A typed line ("uc") carries its sender's style after the stock extra
  field, only when it is not the default, so message and type stay where
  the game reads them and unpatched clients are unaffected.

ajclient.swf is built with this and the six client commits before it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
SnipzilandClaude Opus 5.5 committed 2026-10-21 22:42:11 -04:00
1 parent c1a85f9b5d
commit 83c2fc3b0b
14 files changed
+1697 -12

No files matched your search

+15 -4
View File
@@ -229,6 +229,11 @@ package avatar
private var _chatBalloon:ChatBalloon;
// Set while the normal uc packet is handled, immediately before its
// message is drawn. Keeping setMessage's original arguments preserves
// the game's pending-message and chat-history behaviour.
private var _nextChatStyle:String = "";
// "..." where the chat bubble goes, while the player is typing
// (AJClient.onTyping). gone when a line arrives, when they stop, or
// TYPING_SHOWN ms after they last said they were, if a "stopped" is lost.
@@ -1176,6 +1181,11 @@ package avatar
}
}
public function setChatStyle(param1:String) : void
{
_nextChatStyle = param1;
}
public function setMessage(param1:String, param2:int) : void
{
var _loc3_:Boolean = false;
@@ -1191,8 +1201,9 @@ package avatar
}
_loc3_ = true;
}
_chatBalloon.setText(param1,_loc3_);
updateOffScreenChat(param1,_loc3_);
_chatBalloon.setText(param1,_loc3_,true,_nextChatStyle);
updateOffScreenChat(param1,_loc3_,_nextChatStyle);
_nextChatStyle = "";
}
public function setCustomAdventureMessage(param1:String, param2:String, param3:int, param4:int, param5:Boolean = false) : void
@@ -2593,11 +2604,11 @@ package avatar
_secondaryEmot.y = -235 * _loc1_;
}
private function updateOffScreenChat(param1:String, param2:Boolean) : void
private function updateOffScreenChat(param1:String, param2:Boolean, param3:String = "") : void
{
if(shouldShowOffscreen() && gMainFrame.userInfo.myUserName != _avatar.userName && _hudViewHolder)
{
_hudViewHolder.questChatBalloon.setText(param1,param2,false);
_hudViewHolder.questChatBalloon.setText(param1,param2,false,param3);
}
}