Algrim Chat
Algrim Chat 是一款面向客户端的 Fabric 模组,用于自定义聊天样式。
简介
该模组通过“模式(patterns)”对服务器消息应用自定义样式。这些模式告诉模组哪些消息需要被样式化,以及如何对其进行样式化。
依赖项
每个版本的依赖项均列在发布说明中。
配置
默认情况下,可通过按下 R,C 打开配置图形用户界面(GUI)。
模式
模式由以下三个部分组成:
-
字面量(Literal)
字面量模式部分是最简单的。它们精确匹配字符(少数例外情况除外)。
示例模式:
模式 消息 匹配 You leveled up!"You leveled up!" ✅ <Player6> Hello"<Player6> Hello" ✅ <Player6> Hello"<Player6> Bye" ❌ <Player6> Hello"<Player2> Hello" ❌ 它们非常适合匹配不会变化的静态消息,但在玩家名称和消息内容不断变化的服务器聊天环境中,单独使用效果有限。
某些特殊字符可能会被误识别为其他模式部分,请通过在前面添加\来转义它们。 -
正则表达式(Regex)
正则表达式模式部分以开头和结尾的
/标识。
示例模式:
| 模式 | 消息 | 匹配 | 说明 |
|---|---|---|---|
/You leveled up!/ |
"You leveled up!" | ✅ | 虽然正则表达式可以匹配静态消息,但使用 Literal(字面量)通常更简单。 |
/.*/ |
"<Player6> Hello" | ✅ | 从技术上讲,这将匹配所有消息。 |
</\\w+/> /.*/ |
"<Player6> Bye" | ✅ | 这里我们结合了字面量 "<" 和 "> " 以及正则表达式部分。 |
-
样式
样式模式部分用于对消息应用样式(终于!!!),并分为两个 部分:
[样式, 覆盖]和(内容)- 样式覆盖 是一个以逗号分隔的样式列表。
- 内容 由字面量或正则表达式组件组成。
示例模式:
模式 消息 匹配 说明 [green](You leveled up!)"You leveled up!" ✅ 将消息设置为绿色。 <[#00FFFF](/\\w+/)> [white,i](/.*/)"<Player6> Hello" ✅ 将玩家名称设置为水蓝色,其消息设置为白色。
样式覆盖
有效的样式覆盖包括:
| 覆盖名称 | |
|---|---|
| 粗体 | bold, b |
| 斜体 | italic, it, i |
| 下划线 | underline, u |
strikethrough, s |
| ͅO͆b̼f̧u̺s̓c͠a̿t̝e̿d̮͒ | obfuscate, o |
| 颜色 | #<hex>, <mc name> |
可以通过在覆盖名称前添加 ! 来移除样式。单独使用 ! 将清除所有样式。
示例:[!bold](/.*/) 移除粗体。
或:[!](/.*/) 移除所有样式。
Algrim Chat
Algrim Chat is a chat styling fabric mod for clients.
About
The mod applies custom styling to server messages through use of "patterns". These patterns tell the mod which messages should be styled, and how to style them.
Dependencies
Dependencies are listed with each release.
Configuration
Config GUI can be opened with R,C, by default.
Patterns
Patterns consist of three components:
-
Literal
Literal pattern parts are the simplest. They match characters exactly (with a few exceptions).
Example Patterns:
Pattern Message Matches You leveled up!"You leveled up!" ✅ <Player6> Hello"<Player6> Hello" ✅ <Player6> Hello"<Player6> Bye" ❌ <Player6> Hello"<Player2> Hello" ❌ They're great for matching static messages that don't change, but not too useful on their own in terms of chat on a server where player names and message content change.
Some special characters may also be mistaken as other pattern parts, avoid this by escaping them with\ -
Regex
Regex pattern parts are denoted by a
/at the beginning and end.Example Patterns:
Pattern Message Matches Note /You leveled up!/"You leveled up!" ✅ While regex can match static messages, it's often simpler to use a Literal. /.*/"<Player6> Hello" ✅ Will technically match all messages. </\\w+/> /.*/"<Player6> Bye" ✅ Here we are using a combination of Literal "<" and "> ", and Regex parts. -
Style
Style pattern parts apply style to messages (Finally!!!) and are split into two sections:
[Style, Overrides]and(Content)- Style Overrides are a comma separated list of styles.
- Content consists of Literal or Regex components.
Example Patterns:
Pattern Message Matches Note [green](You leveled up!)"You leveled up!" ✅ Styles the message green. <[#00FFFF](/\\w+/)> [white,i](/.*/)"<Player6> Hello" ✅ Styles the player's name in aqua and their message white.
Style Overrides
The valid Style Overrides are:
| Override Name(s) | |
|---|---|
| Bold | bold, b |
| Italics | italic, it, i |
| Underlined | underline, u |
strikethrough, s |
|
| ͅO͆b̼f̧u̺s̓c͠a̿t̝e̿d̮͒ | obfuscate, o |
| Colour | #<hex>, <mc name> |
Styles can be removed by prefixing ! to the Override Name. ! on its own will strip all styles.
ex: [!bold](/.*/) remove bold.
or: [!](/.*/) remove all styling.
下载 Algrim Chat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Algrim Chat
下载 Algrim Chat
下载 Algrim Chat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Algrim Chat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Algrim Chat
下载 Algrim Chat
下载 Algrim Chat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Algrim Chat
下载 Algrim Chat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
重大变更:
- 嵌套样式模式不再需要转义,这使得它们更具可读性,并避免了转义地狱。(这可能会破坏现有模式)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
Minecraft 中的表情符号
模组
? 主菜单上的闪屏文本将在可配置的延迟后持续变化。
模组
恢复所有账户的游戏聊天访问权限
模组
使聊天消息以平滑的动画效果显示。
模组
Music Maker 为游戏添加了乐谱、乐器以及其他设备,用于创作和演奏音乐。
模组
一个完整经济模组:玩家余额、动态定价商店、玩家市场、买入订单、货币物品以及网页仪表盘。
评论 0
登录后参与评分
还没有评论,来抢沙发吧