COD Pattern
发布状态:Beta。本文档涵盖 0.8.8b 版本。在升级现有世界之前,请备份世界存档和游戏目录中的 fpsmatch/ 文件夹。请参阅 GUIDE.md 获取迁移步骤。
警告:
自版本 0.8.8b 起,新版主模组将地图与规则统一存放于
<世界>/serverconfig/codpattern/maps/
旧数据需手动迁移。升级前请停服备份完整世界存档及游戏目录下的 fpsmatch/;启动后确保相关模式内所有地图均无玩家和进行中的对局,以权限等级 4 执行 /cdp map migrate check,处理报告中的问题后执行 /cdp map migrate confirm,完成后重启服务端或重新进入单人世界。成功迁移的旧文件会被移除,请保留备份和迁移记录,勿随意更改存档路径;迁移仅调整存储位置,不保证旧配置完全兼容。
warning:
Since version 0.8.8b,The main mod now stores maps and rules under
<world>/serverconfig/codpattern/maps/
Legacy data requires manual migration. Before upgrading, stop the server and back up the entire world and the game directory’s fpsmatch/ folder. After starting, ensure all maps in the affected modes are empty and no matches are running. With permission level 4, run /cdp map migrate check, resolve any reported issues, then run /cdp map migrate confirm. Restart the server or reopen the single-player world afterward. Successfully migrated source files are removed, so retain backups and migration records and avoid changing the world’s location. Migration relocates data but does not guarantee compatibility with older configurations.
Overview
COD Pattern is a Forge mod built around TaCZ + an embedded FPSM-compatible core, providing COD-style loadout presets, weapon refit, room management, and team combat.
The main mod independently provides frontline (FTL) and teamdeathmatch (TDM). Zombies is a separate addon: its gameplay implementation is not bundled with the main mod, and the main mod can start without it. When installed, the addon registers its mode with the shared entry points.
Loadouts, weapon filters, room state, map edits, and match phases are validated on the server and synchronized to clients. The mod includes Simplified Chinese, Traditional Chinese, English, and Japanese language resources.
Main Features
Loadout Management and Equipment Distribution
- Create, clone, rename, delete, and select loadouts, with up to
10 per player.
- Players receive
3 default loadouts when their loadout data is first initialized.
- Each loadout stores four equipment categories:
primary / secondary / tactical / lethal.
- Room equipment distribution and respawn supplies use the selected loadout; individual modes can provide their own distribution rules.
- Administrators can force distribution with
/cdp distribute [target]. Omitting the target applies it to all online players.
- Without LR Tactical, related melee options, throwable candidates, dedicated throwable slots, and default throwable distribution are disabled automatically. With LR installed, throwables remain subject to the server's filter setting.
Weapon Selection, Filtering, and Refit
- The server validates equipment slots, item IDs, NBT, weapon categories, and blacklists.
- Primary and secondary weapons support attachment refit. Presets are saved with the loadout in
attachmentPreset.
- Attachment blacklists apply to candidate lists, installed attachment cleanup, and save validation.
- TaCZ's native refit screen is disabled; use COD Pattern's loadout refit screen instead.
- Attachment candidates combine attachments held by the player with compatible
tacz-addon candidates. The server makes the final installation decision.
Rooms and Match Flow
- The pause menu provides a room entry for browsing maps, joining rooms, choosing a team, and readying up.
- FTL/TDM rooms accept joins only during
WAITING, with start votes, end votes, and synchronized match phases.
- FTL and TDM use their respective respawn rules. TDM supports dynamic candidate spawn points and candidate merging.
- Features include warmup, a pre-game countdown, scores and kill feed, death cam, respawn invincibility, combat regeneration, ally/enemy highlights, world-space enemy health bars, and a results screen.
- Before a start vote, the room checks that an end point is configured. An unusable destination produces a failure message when the teleport is attempted.
- Force End restores players and cleans up mode resources. Rooms with unfinished recovery show the corresponding status.
Map Creation and Management
- The Map Creator Tool selects a region and creates FTL/TDM maps.
- The Spawn Point Tool shows the point and area layers supported by each mode, with previews, adding, deleting, clearing, and dynamic candidate merging.
- The Map Management Tool provides filtered lists, dimensions and bounds, status, renaming, end-point settings, Force End, and deletion.
- Renaming requires an idle map with its recovery completed. It validates names and conflicts, then updates the map identity and storage directory.
- Deletion first ends the match, restores and removes members and spectators, then archives the map directory and unregisters the map after cleanup. Pending recovery retains the map; its progress, retry, and cancellation are available in Map Management.
- A map's end point, the global default for future maps, and the command that updates existing maps have separate scopes. Changing the global default does not overwrite existing maps.
Commands and Entry Points
Permission levels below are server command permission levels. In-game map tools require level 2; end-point settings in Map Management also require level 2.
/cdp
| 指令 |
权限 |
用途 |
/cdp test |
无额外限制 |
向执行玩家显示测试消息 |
/cdp screen |
无额外限制 |
打开执行玩家的装备配置界面 |
/cdp update |
2 |
重新加载武器过滤器,并将过滤器和装备数据同步给在线玩家 |
/cdp distribute [target] |
2 |
强制分发装备;省略目标则应用于所有在线玩家 |
/cdp mode debug room |
2 |
显示执行玩家当前所在的房间 |
/cdp mode debug entities <room> |
2 |
检查由某房间拥有的实体 |
/cdp mode debug clear_entities <room> |
2 |
清除由某房间拥有的实体 |
/cdp mode debug state <room> |
2 |
检查模式运行时状态;仅限玩家执行 |
/cdp mode debug areas <type> <map> |
2 |
检查地图的区域图层 |
<room> 使用 mode|map 格式,作为带引数的参数传入,例如 "frontline|arena"。同样对地图名称使用双引号,如 "训练场" 或 "Training Arena",以避免非 ASCII 字符、空格或特殊字符导致的参数解析错误。装备分发会清空并重建接收者的物品栏;旁观者会被跳过。
/cdp map
| 指令 |
权限 |
用途 |
/cdp map list [type] |
2 |
列出已注册的模式或在指定模式下的地图 |
/cdp map delete <type> <map> |
2 |
提交地图删除;恢复和清理进度将在地图管理中显示 |
/cdp map endtp show <map> |
3 |
显示地图的终点;跨模式的相同名称会产生歧义提示 |
/cdp map endtp set |
3 |
将执行者的位置、维度水平和朝向覆盖到所有受支持的现有地图的终点 |
/cdp map migrate check |
4 |
检查旧版存储,并列出迁移计划和冲突 |
/cdp map migrate confirm |
4 |
再次检查并迁移符合条件的单元;之后重启服务器 |
endtp set 不会设置全局默认值。请使用“地图管理”为未来的地图配置默认值。
强制结束与地图工具
/roomforceend <mode> <map>:需要权限等级 2;结束比赛并恢复玩家,同时保留房间成员身份。地图管理也提供此操作。
codpattern:map_management_tool:右键点击以打开地图管理。
codpattern:map_creator_tool:左键和右键点击以选择两个角点。使用 Ctrl + 右键点击 打开创建界面,选择模式并输入地图名称。
codpattern:spawn_point_tool:使用 Ctrl + 右键点击 打开其设置,然后选择地图、队伍以及可用的点位或区域图层。
- 地图创建、出生点编辑和区域编辑均使用工具;之前的指令已被移除。僵尸地图部署使用插件提供的工具。
配置与目录
以下所有路径均为相对于当前世界目录的路径,而非游戏目录。
serverconfig/codpattern/backpack_rules/
backpack_config.json:玩家装备配置、所选装备以及槽位物品数据。附件预设存储在各自槽位的 attachmentPreset 中。
weapon_filter.json:武器类别、物品和附件黑名单、投掷物启用状态以及弹药倍率。
主要过滤器字段包括 primaryWeaponTabs、secondaryWeaponTabs、blockedItemNamespaces、blockedWeaponIds、blockedAttachmentNamespaces、blockedAttachmentIds、throwablesEnabled 和 ammunitionPerMagazineMultiple。编辑后使用 /cdp update 重新加载并同步过滤器。它不是通用的配置重载命令,而是同步缓存的装备数据,而不是从磁盘重新加载 backpack_config.json。
serverconfig/codpattern/maps/
| 路径 |
内容 |
defaults.json |
未来地图的全局终点默认值 |
builtin/rules/config.json |
FTL/TDM 比赛共享配置 |
builtin/frontline/m-<encoded>/map.json |
FTL 地图定义 |
builtin/teamdeathmatch/m-<encoded>/map.json |
TDM 地图定义 |
builtin/frontline/records/ |
FTL 比赛导出记录 |
builtin/teamdeathmatch/records/ |
TDM 比赛导出记录 |
.storage/ |
迁移记录、管理操作记录和归档文件 |
编码后的目录后缀是地图名称 UTF-8 字节的十六进制表示。请使用地图管理重命名地图。插件的地图和规则目录由其各自的模式注册;并非所有模式都使用 builtin/。
旧的 fpsmatch/ 地图和 serverconfig/codpattern/tdm_rules/config.json 将通过迁移流程进行转移。请先备份,然后运行 check 以检查源、目标和冲突。在受影响的房间为空且比赛结束后,运行 confirm。受影响的模式将被锁定,直到服务器重启或单人世界重新打开。有关恢复详情,请参阅 GUIDE.md。
FTL/TDM 比赛配置
下表列出了 builtin/rules/config.json 中活跃设置的代码默认值。以 Ticks 结尾的字段使用游戏刻(ticks)。保留的 warmupTimeTicks、preGameCountdownTicks 和 blackoutStartTicks 字段目前不控制相应的 PvP 阶段计时;详见 GUIDE.md。
| 字段 |
默认值 |
描述 |
timeLimitSeconds |
420 |
游戏阶段时长(秒) |
scoreLimit |
75 |
击杀得分上限 |
invincibilityTicks |
30 |
重生无敌持续时间 |
respawnDelayTicks |
40 |
重生延迟 |
deathCamTicks |
30 |
死亡镜头持续时间 |
minPlayersToStart |
1 |
开始投票所需的最小玩家数;当前默认值仅用于测试 |
votePercentageToStart |
60 |
开始投票的百分比阈值 |
votePercentageToEnd |
75 |
结束投票的百分比阈值 |
combatRegenDelayTicks |
120 |
受伤后恢复前的延迟时间 |
combatRegenHalfHeartsPerSecond |
5.0 |
每秒恢复的半颗心数量 |
maxTeamDiff |
1 |
允许自动分配、显式加入和队伍切换的最大队伍人数差值 |
markerFocusHalfAngleDegrees |
30.0 |
敌人血条检测锥体的半角角度 |
markerFocusRequiredTicks |
20 |
显示敌人血条所需的检测持续时间 |
markerBarMaxDistance |
96.0 |
敌人血条检测的最大距离 |
markerVisibleGraceTicks |
3 |
敌人血条防闪烁的宽限时间 |
文档
- 安装、地图设置、比赛、地图管理、迁移和构建:GUIDE.md
- 常见问题与故障排除:QANDA.md
- 版本历史:CHANGES.md
- 中文文档:README.md
兼容性与依赖项
- Minecraft:开发与构建目标版本为
1.20.1。
- Forge:项目基于
47.4.0 进行构建;模组元数据声明最低要求为 47。其他组合需要验证;声明的范围并非完全经过测试的范围。
- Java:
17。
- 必需依赖项:客户端和服务端均需安装 TaCZ
1.1.6+。
- 内置组件:FPSM 兼容核心不需要单独的
fpsmatch.jar。
- 可选集成:LR Tactical
0.3.0+。FTM/TDM 模式在无需 LR 的情况下依然可用。
- 可选模式:
codpattern_zombies 附加组件。主模组元数据接受 0.2.0b+;附加组件自身的依赖要求也必须满足。主模组和附加组件需分别构建和安装。
- Physics Mod 和
tacz-addon 出现在客户端开发运行时配置中。它们均未声明为主模组的必需依赖项。
客户端和服务端应使用匹配的主模组和必需附加组件组合。有关带有可选 LR 支持的源码构建和开发启动,请参阅 GUIDE.md。
许可证
本软件依据 GPL-3.0-only 许可证授权。详见仓库根目录下的 LICENSE.txt 和 CREDITS.txt。
COD Pattern
Release status: Beta. This document covers 0.8.8b. Before upgrading an existing world, back up the world save and the game directory's fpsmatch/ folder. See GUIDE.md for migration steps.
警告:
自版本 0.8.8b 起,新版主模组将地图与规则统一存放于
<世界>/serverconfig/codpattern/maps/
旧数据需手动迁移。升级前请停服备份完整世界存档及游戏目录下的 fpsmatch/;启动后确保相关模式内所有地图均无玩家和进行中的对局,以权限等级 4 执行 /cdp map migrate check,处理报告中的问题后执行 /cdp map migrate confirm,完成后重启服务端或重新进入单人世界。成功迁移的旧文件会被移除,请保留备份和迁移记录,勿随意更改存档路径;迁移仅调整存储位置,不保证旧配置完全兼容。
warning:
Since version 0.8.8b,The main mod now stores maps and rules under
<world>/serverconfig/codpattern/maps/
Legacy data requires manual migration. Before upgrading, stop the server and back up the entire world and the game directory’s fpsmatch/ folder. After starting, ensure all maps in the affected modes are empty and no matches are running. With permission level 4, run /cdp map migrate check, resolve any reported issues, then run /cdp map migrate confirm. Restart the server or reopen the single-player world afterward. Successfully migrated source files are removed, so retain backups and migration records and avoid changing the world’s location. Migration relocates data but does not guarantee compatibility with older configurations.
Overview
COD Pattern is a Forge mod built around TaCZ + an embedded FPSM-compatible core, providing COD-style loadout presets, weapon refit, room management, and team combat.
The main mod independently provides frontline (FTL) and teamdeathmatch (TDM). Zombies is a separate addon: its gameplay implementation is not bundled with the main mod, and the main mod can start without it. When installed, the addon registers its mode with the shared entry points.
Loadouts, weapon filters, room state, map edits, and match phases are validated on the server and synchronized to clients. The mod includes Simplified Chinese, Traditional Chinese, English, and Japanese language resources.
Main Features
Loadout Management and Equipment Distribution
- Create, clone, rename, delete, and select loadouts, with up to
10 per player.
- Players receive
3 default loadouts when their loadout data is first initialized.
- Each loadout stores four equipment categories:
primary / secondary / tactical / lethal.
- Room equipment distribution and respawn supplies use the selected loadout; individual modes can provide their own distribution rules.
- Administrators can force distribution with
/cdp distribute [target]. Omitting the target applies it to all online players.
- Without LR Tactical, related melee options, throwable candidates, dedicated throwable slots, and default throwable distribution are disabled automatically. With LR installed, throwables remain subject to the server's filter setting.
Weapon Selection, Filtering, and Refit
- The server validates equipment slots, item IDs, NBT, weapon categories, and blacklists.
- Primary and secondary weapons support attachment refit. Presets are saved with the loadout in
attachmentPreset.
- Attachment blacklists apply to candidate lists, installed attachment cleanup, and save validation.
- TaCZ's native refit screen is disabled; use COD Pattern's loadout refit screen instead.
- Attachment candidates combine attachments held by the player with compatible
tacz-addon candidates. The server makes the final installation decision.
Rooms and Match Flow
- The pause menu provides a room entry for browsing maps, joining rooms, choosing a team, and readying up.
- FTL/TDM rooms accept joins only during
WAITING, with start votes, end votes, and synchronized match phases.
- FTL and TDM use their respective respawn rules. TDM supports dynamic candidate spawn points and candidate merging.
- Features include warmup, a pre-game countdown, scores and kill feed, death cam, respawn invincibility, combat regeneration, ally/enemy highlights, world-space enemy health bars, and a results screen.
- Before a start vote, the room checks that an end point is configured. An unusable destination produces a failure message when the teleport is attempted.
- Force End restores players and cleans up mode resources. Rooms with unfinished recovery show the corresponding status.
Map Creation and Management
- The Map Creator Tool selects a region and creates FTL/TDM maps.
- The Spawn Point Tool shows the point and area layers supported by each mode, with previews, adding, deleting, clearing, and dynamic candidate merging.
- The Map Management Tool provides filtered lists, dimensions and bounds, status, renaming, end-point settings, Force End, and deletion.
- Renaming requires an idle map with its recovery completed. It validates names and conflicts, then updates the map identity and storage directory.
- Deletion first ends the match, restores and removes members and spectators, then archives the map directory and unregisters the map after cleanup. Pending recovery retains the map; its progress, retry, and cancellation are available in Map Management.
- A map's end point, the global default for future maps, and the command that updates existing maps have separate scopes. Changing the global default does not overwrite existing maps.
Commands and Entry Points
Permission levels below are server command permission levels. In-game map tools require level 2; end-point settings in Map Management also require level 2.
/cdp
| Command |
Permission |
Purpose |
/cdp test |
No additional restriction |
Shows a test message to the executing player |
/cdp screen |
No additional restriction |
Opens the executing player's loadout screen |
/cdp update |
2 |
Reloads weapon filters and synchronizes filters and loadout data to online players |
/cdp distribute [target] |
2 |
Forces loadout distribution; omitting the target applies it to all online players |
/cdp mode debug room |
2 |
Shows the executing player's current room |
/cdp mode debug entities <room> |
2 |
Inspects entities owned by a room |
/cdp mode debug clear_entities <room> |
2 |
Clears entities owned by a room |
/cdp mode debug state <room> |
2 |
Inspects mode runtime state; player execution only |
/cdp mode debug areas <type> <map> |
2 |
Inspects a map's area layers |
<room> uses mode|map, passed as a quoted argument, for example "frontline|arena". Use double quotes around map names as well, such as "训练场" or "Training Arena", to avoid argument parsing errors with non-ASCII characters, spaces, or special characters. Equipment distribution clears and rebuilds the recipient's inventory; spectators are skipped.
/cdp map
| Command |
Permission |
Purpose |
/cdp map list [type] |
2 |
Lists registered modes or maps in a specified mode |
/cdp map delete <type> <map> |
2 |
Submits map deletion; recovery and cleanup progress are shown in Map Management |
/cdp map endtp show <map> |
3 |
Shows a map's end point; identical names across modes produce an ambiguity message |
/cdp map endtp set |
3 |
Overwrites all supported existing maps' end points with the executor's position, dimension, and horizontal facing |
/cdp map migrate check |
4 |
Inspects legacy storage and lists the migration plan and conflicts |
/cdp map migrate confirm |
4 |
Inspects again and migrates eligible units; restart afterward |
endtp set does not set the global default. Use Map Management to configure a default for future maps.
Force End and Map Tools
/roomforceend <mode> <map>: Requires permission level 2; ends a match and restores players while retaining room membership. Map Management also provides this action.
codpattern:map_management_tool: Right-click to open Map Management.
codpattern:map_creator_tool: Left-click and right-click to select the two corners. Use Ctrl + right-click to open the creation screen, choose a mode, and enter a map name.
codpattern:spawn_point_tool: Use Ctrl + right-click to open its settings, then select the map, team, and available point or area layer.
- Map creation, spawn editing, and area editing use tools; the former commands have been removed. Zombies map deployment uses tools supplied by the addon.
Configuration and Directories
All paths below are relative to the current world directory, not the game directory.
serverconfig/codpattern/backpack_rules/
backpack_config.json: Player loadouts, the selected loadout, and slot item data. Attachment presets are stored in each slot's attachmentPreset.
weapon_filter.json: Weapon categories, item and attachment blacklists, throwable enablement, and the ammo multiplier.
The main filter fields are primaryWeaponTabs, secondaryWeaponTabs, blockedItemNamespaces, blockedWeaponIds, blockedAttachmentNamespaces, blockedAttachmentIds, throwablesEnabled, and ammunitionPerMagazineMultiple. Use /cdp update to reload and synchronize filters after editing. It is not a general configuration reload command, and synchronizes cached loadout data rather than reloading backpack_config.json from disk.
serverconfig/codpattern/maps/
| Path |
Contents |
defaults.json |
Global end-point default for future maps |
builtin/rules/config.json |
Shared FTL/TDM match configuration |
builtin/frontline/m-<encoded>/map.json |
FTL map definition |
builtin/teamdeathmatch/m-<encoded>/map.json |
TDM map definition |
builtin/frontline/records/ |
FTL match exports |
builtin/teamdeathmatch/records/ |
TDM match exports |
.storage/ |
Migration records, management operation records, and archives |
The encoded directory suffix is the hexadecimal representation of the map name's UTF-8 bytes. Use Map Management to rename maps. Addon map and rule directories are registered by their respective modes; not every mode uses builtin/.
Legacy fpsmatch/ maps and serverconfig/codpattern/tdm_rules/config.json are transferred through the migration flow. Back up first, then run check to inspect sources, destinations, and conflicts. Run confirm once affected rooms are empty and their matches have ended. Affected modes remain locked until the server restarts or the single-player world is reopened. See GUIDE.md for recovery details.
FTL/TDM Match Configuration
The table lists code defaults for active settings in builtin/rules/config.json. Fields ending in Ticks use game ticks. The retained warmupTimeTicks, preGameCountdownTicks, and blackoutStartTicks fields do not currently control the corresponding PvP phase timings; see GUIDE.md.
| Field |
Default |
Description |
timeLimitSeconds |
420 |
Playing-phase duration in seconds |
scoreLimit |
75 |
Kill score cap |
invincibilityTicks |
30 |
Respawn invincibility duration |
respawnDelayTicks |
40 |
Respawn delay |
deathCamTicks |
30 |
Death-cam duration |
minPlayersToStart |
1 |
Minimum players for a start vote; the current default is intended for testing |
votePercentageToStart |
60 |
Start-vote percentage threshold |
votePercentageToEnd |
75 |
End-vote percentage threshold |
combatRegenDelayTicks |
120 |
Delay before regeneration after damage |
combatRegenHalfHeartsPerSecond |
5.0 |
Half-hearts restored per second |
maxTeamDiff |
1 |
Maximum team-size difference allowed for automatic assignment, explicit joining, and team switching |
markerFocusHalfAngleDegrees |
30.0 |
Enemy health-bar detection cone half-angle |
markerFocusRequiredTicks |
20 |
Detection duration required to show an enemy health bar |
markerBarMaxDistance |
96.0 |
Maximum enemy health-bar detection distance |
markerVisibleGraceTicks |
3 |
Enemy health-bar anti-flicker grace period |
Documentation
- Installation, map setup, matches, map management, migration, and builds: GUIDE.md
- Common questions and troubleshooting: QANDA.md
- Version history: CHANGES.md
- Chinese documentation: README.md
Compatibility and Dependencies
- Minecraft: The development and build target is
1.20.1.
- Forge: The project builds against
47.4.0; mod metadata declares a minimum of 47. Other combinations need verification; the declared range is not a fully tested range.
- Java:
17.
- Required dependency: TaCZ
1.1.6+ on both client and server.
- Embedded component: The FPSM-compatible core requires no separate
fpsmatch.jar.
- Optional integration: LR Tactical
0.3.0+. FTL/TDM remain available without LR.
- Optional mode: The
codpattern_zombies addon. Main-mod metadata accepts 0.2.0b+; the addon's own dependency requirements must also be satisfied. The main mod and addon are built and installed separately.
- Physics Mod and
tacz-addon appear in the client development runtime configuration. Neither is declared as a required dependency of the main mod.
Clients and servers should use matching main-mod and required addon combinations. See GUIDE.md for source builds and development launches with optional LR support.
License
Licensed under GPL-3.0-only. See LICENSE.txt and CREDITS.txt in the repository root.
评论 0
登录后参与评分
还没有评论,来抢沙发吧