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'sfpsmatch/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
10per player. - Players receive
3default 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-addoncandidates. 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 level2; 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. UseCtrl + right-clickto open the creation screen, choose a mode, and enter a map name.codpattern:spawn_point_tool: UseCtrl + right-clickto 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'sattachmentPreset.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 of47. 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_zombiesaddon. Main-mod metadata accepts0.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-addonappear 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.
All Versions
+ Add Version- 重构模式注册与房间系统,统一模式扩展、地图编辑与数据同步接口
- 将僵尸模式拆分为独立附属模组,主模组保留团队竞技与战术团队竞技,可单独构建与运行
- 增加地图管理工具,支持查看地图信息、重命名、删除与强制结束对局
- 统一地图创建、复活点与区域编辑的工具操作,移除对应的旧编辑命令
- 增加图形化结束传送点设置,支持单张地图编辑与新建地图默认结束点配置
- 统一地图与规则的存档目录,重构旧地图存储检查与手动迁移命令
- 完善强制结束、玩家状态恢复与实体清理流程,支持离线玩家重新登录后继续恢复
- 优化地图删除流程,先结束对局并恢复、移出成员,再归档地图,增加删除进度查看、重试与取消
- 重写项目说明、操作指南与常见问题,同步至当前版本
- Refactored mode registration and room systems, unifying interfaces for mode extensions, map editing, and data synchronization.
- Split Zombies mode into a standalone addon, leaving Team Deathmatch and Tactical Team Deathmatch in the main mod, which can be built and run independently.
- Added map management tools for viewing map information, renaming and deleting maps, and forcibly ending matches.
- Unified tool interactions for map creation, spawn point editing, and region editing, removing the corresponding legacy commands.
- Added a graphical interface for configuring end-of-match teleport destinations, supporting both per-map settings and defaults for newly created maps.
- Unified save directories for maps and rules, refactor legacy map storage checks and a manual migration command.
- Improved forced match termination, player state restoration, and entity cleanup, allowing restoration to resume when offline players log back in.
- Improved map deletion to end active matches, restore player states, and remove players before archiving the map, with support for tracking deletion progress, retrying, and cancellation.
- Rewrote the project overview, user guide, and FAQ to reflect the current version.
- 优化团队竞技流程,增加准备阶段锁定、死亡黑屏与回合提示
- 增加模式选择界面与模式背景图,优化房间界面
- 优化TaCZAddon兼容与背包改枪流程
- 优化局内HUD、倒计时音效与原版HUD屏蔽
- 修复部分已知问题
### v0.6.13b
- Optimized the team deathmatch workflow, added preparation phase locking, death blackout screen, and round notifications
- Added a mode selection interface and mode background images, improved the room interface
- Improved compatibility with TaCZAddon and the weapon modification workflow in the inventory
- Optimized in-game HUD, countdown sound effects, and suppression of the vanilla HUD
- Fixed some known issues
### v0.6.12b
- 优化血条显示,敌我识别等显示内容
- 为投掷物加入快捷键(默认未指定),现在lr的投掷物会被发放于特殊物品栏,长按可进行投掷动作。在局内物品栏切换物品会自动跳过空物品栏。
- 复活点工具和命令为动态复活点新加入“合并复活点功能”,即为当前地图双方的动态复活点设置目前设置的所有复活点的并集
- 修复部分已知问题
## (EN)
### v0.6.12b
- Optimized health bar display and improved enemy–ally identification visuals.
- Added a keybinding for throwable items (unassigned by default). LR throwable items are now placed in a dedicated inventory slot, can be thrown by holding the key, and empty inventory slots are now skipped automatically when switching items in match.
- Added a “merge respawn points” feature for dynamic respawn points in the respawn point tool and commands, allowing both teams on the current map to use the union of all currently configured respawn points.
- Fixed several known issues.
### v0.6.10b
- 增加动态复活点合并能力。
- 开始投票前会强制检查地图是否已配置
endtp,缺失时会直接阻止开局并提示管理员先补配置。 - 重绘敌方血条表现
- 优化出生点与结束传送点。
/cdp map endtp set改为直接使用命令执行位置与朝向,批量写入全部地图,不再要求输入地图名。
## (en)
### v0.6.10b
- Added support for merging dynamic respawn points.
- Before starting a vote, the system now enforces a check to ensure the map has
endtpconfigured; if missing, the match start will be blocked and the administrator will be prompted to complete the configuration. - Redesigned enemy health bar visuals.
- Optimized spawn points and end teleport points.
/cdp map endtp setnow uses the command execution position and orientation directly, applies to all maps in batch, and no longer requires specifying a map name.
- 优化gui表现,优化网络同步
- 修复已知问题,几个小bug,懒得写了
### v0.6.7b
- Optimized GUI performance and network synchronization
- Fixed known issues and several minor bugs (details omitted)
### v0.6.5b
- 迁入并整合 FPSM 核心、地图工具与复活点工具,地图与对局流程现可由模组内部统一维护
- 增加
frontline与teamdeathmatch双模式支持,战术团队竞技加入动态复活点候选与出生安全校验 - 增加
/cdp map地图管理命令链,支持地图创建删除、出生点管理、结束传送点设置与持久化保存 - 优化房间加入、离开、选边、观战回战斗、房间列表与玩家名单同步逻辑,并重构房间界面交互
- 调整局内 HUD 与对局表现,优化击杀播报、结算显示、敌我高光与敌方血条规则
- 增加武器黑名单与配件黑名单配置,并在背包改枪流程中对黑名单配件做安装过滤与保存拦截
- 增加房间内饱食度锁定机制,并全局禁用 TaCZ 原生改枪界面,统一改为使用 COD Pattern 背包改枪流程
## (en)
### v0.6.5b
- Migrated and integrated the FPSM core, map tools, and respawn-point tools, allowing maps and match flow to be maintained entirely within the mod
- Added support for both
frontlineandteamdeathmatch; tactical team deathmatch now includes dynamic respawn point candidates and spawn safety checks - Added the
/cdp mapmap management command chain, supporting map creation and deletion, spawn point management, end teleport point setup, and persistent saving - Optimized room join, leave, team selection, spectator return-to-battle, room list, and player list synchronization logic, and reworked the room UI interactions
- Adjusted the in-match HUD and gameplay presentation, improving killfeed, results display, friendly/enemy highlighting, and enemy health bar rules
- Added weapon blacklist and attachment blacklist configuration, with blacklisted attachments blocked during installation and prevented from being saved in the backpack gunsmith flow
- Added an in-room hunger lock mechanism, and globally disabled the native TaCZ gunsmith interface, fully replacing it with the COD Pattern backpack gunsmith flow
- ###### _**注意:0.5.5b与其旧版本配置文件不再适用于新版本,需要手动移除,否则有可能导致崩溃,自0.6.5b与其以后版本,不再需要安装fpsmatch模组作为前置依赖**_
fpsmatch mod as a required dependency is no longer necessary.**_**- 优化统一房间系统界面布局交互
###### _**注意:0.5.5b与其旧版本配置文件不再适用于新版本,需要手动移除,否则有可能导致崩溃**_
- 重构服务端存档下的配置目录结构,简化,统一整理背包规则与 TDM 规则的保存位置
- 将背包配件预设直接并入背包配置,不再单独生成预设文件
- 增加局内呼吸回血机制,默认受伤后 6 秒开始回血,回血期间再次受伤会重新计时,新增团队竞技回血延迟与回血速度配置项
- 调整击杀播报布局
- Refactored the configuration directory structure for server-side saves, simplifying and unifying the storage locations for inventory rules and TDM rules
- Merged inventory attachment presets directly into the inventory configuration, no longer generating separate preset files
- Added an in-match health regeneration system: by default, regeneration starts 6 seconds after taking damage, and the timer resets if the player is hit again during regeneration; added configuration options for TDM regeneration delay and regeneration speed
- Adjusted the kill feed layout
- 优化了房间加入、选边、切换、准备与状态同步等逻辑,提升房间系统的整体稳定性与操作反馈。
- 优化了团队竞技房间界面、房间列表、信息面板与玩家列表的布局逻辑,改善小屏幕与低分辨率下的显示效果。
- 增加了统一提示弹窗,完善房间内状态提示与操作反馈。
- 增加了局内敌我标识、敌方血条显示与 TDM 击杀播报,提升战斗信息反馈的直观性。
- 优化了击杀播报表现,支持显示击杀者、被击杀者与武器/物品图标,并补充误杀、自灭等场景的专用文案与回退逻辑。
- 过滤了房间或对局上下文中的原版死亡消息,减少聊天栏刷屏,统一战斗信息到 HUD。
- 优化了 TaCZ 爆头倍率兼容逻辑,调整了复活无敌时间,并修复了部分情况下的友伤判定异常。
- 大幅优化了背包、武器配置与 TDM 房间相关 GUI 的布局、文字缩放与省略策略,提升不同 GUI Scale 下的可读性与一致性。
- 优化了长文本、小屏幕环境下的界面显示效果,以及按钮动效、武器预览与文本渲染表现,减少文本溢出与错位。
- 修复了进入背包重命名界面后需要先点击输入框才能输入的 bug。
- 补齐了界面、提示、错误信息与系统消息的本地化资源,减少硬编码文本。
- 新增
ja_jp与zh_tw语言文件,并完善了zh_cn与en_us的缺失文本。 - 默认背包名、背包复制后缀、装备提示等内容现支持随语言自动本地化。
## (EN)0.5.5b
- Optimized room joining, team selection, switching, ready-state handling, and state synchronization logic, improving the overall stability and interaction feedback of the room system.
- Improved the layout logic of the TDM room interface, room list, info panel, and player list, with better display performance on small screens and low resolutions.
- Added unified prompt popups to improve in-room status messages and operation feedback.
- Added in-match ally/enemy indicators, enemy health bar display, and TDM killfeed to make combat information more intuitive.
- Improved the killfeed presentation, with support for killer, victim, and weapon/item icons, while adding dedicated fallback text for teamkill and suicide scenarios.
- Filtered vanilla death messages in room or match contexts to reduce chat spam and unify combat information in the HUD.
- Optimized compatibility logic for TaCZ headshot multipliers, adjusted respawn invulnerability time, and fixed abnormal friendly-fire detection in some cases.
- Significantly improved the layout, fixed text scaling, and truncation strategy of backpack, weapon configuration, and TDM room GUIs, improving readability and consistency under different GUI Scale settings.
- Improved long-text rendering, small-screen GUI presentation, button animations, weapon preview areas, and text rendering behavior, reducing overflow and misalignment issues.
- Fixed a bug where the backpack rename screen required manually clicking the input box before typing.
- Completed localization resources for interfaces, prompts, error messages, and system messages, reducing hardcoded text.
- Added
ja_jpandzh_twlanguage files, and filled in missing texts inzh_cnanden_us. - Default backpack names, backpack copy suffixes, equipment hints, and similar content now support automatic localization based on the selected language.
- 增加了更多结算画面,包括mvp与总览
- 修复了玩家死亡模型异常上跳的问题
- 增加了在服务端通过枪包命名空间筛选枪械的功能
- 提升服务端-客户端数据同步的稳定性
- 解决/cdp部分命令失效的问题
- 修复部分情况下计分板失效的问题
- 修复独立服务器环境下的客户端类加载崩溃问题,优化网络包的客户端隔离逻辑
- 项目代码大规模重构
- 兼容fpsmatch,基本实现死斗流程,增加房间系统
- 适配物理模组mob系统
- 优化枪械分发方式,优化配件储存方式
- 实现本地化
- 基本兼容LR Tactical模组物品,新增刀具与投掷物
- 优化了部分gui
- 优化部分gui外观,提升性能
- 增加了对背包枪械编辑并保存配件的功能
- 增加了对背包的删除,复制,重命名的功能
- 彻底修复首次打开背包配置界面并点击添加背包按钮时没有反应的bug
- 修复修改指定背包武器并退出到背包配置界面时未及时正确显示修改对应武器的bug(实际已修改)
- 修复客户端非首次连接独立服务器时并试图打开背包配置界面时出现崩溃的情况
- 为打开背包添加了gui按钮
添加了即时分发背包的命令,优化代码结构