Records the uncommitted battle-session work exactly as it was left (local service matchmaking, settlement, chat, native LocalMP hooks, battle gui/exe patches) so the following review and rework commits show every correction as a diff against this state. This commit is not reviewed and is known to be incomplete: in-game testing reported wrong settlement rewards, single-country teams, missing random/fixed supplement slots, misattributed hit messages and other regressions. Do not merge this branch before the rework lands.
31 lines
3.7 KiB
JSON
31 lines
3.7 KiB
JSON
{
|
||
"id": "battle/lineup-br-for-submodes",
|
||
"title": "多槽位预设模式下按整套可用出击阵容最高权重判定夜间战斗等附加子模式可用性",
|
||
"file": "scripts/events/secondgamemodesutils.nut",
|
||
|
||
"program_behaviour": {
|
||
"stock": "secondgamemodesutils.nut 的 getCurRank(event) 在单人未组队状态下只读取机库当前鼠标高亮的单辆载具 getPlayerCurUnit(),导致在陆战历史性能等多槽位(multiSlot)模式中,即使预设编队内拥有 10.0+ 载具(面板标题已显示 12.0 权重),只要当前高亮槽位载具低于 10.0(如 9.7 的 BMD-4M),夜间战斗就会被误判为「不可用(仅限 10.0 及以上权重)」。",
|
||
"patched": "当处于单人且当前赛事启用了多槽位出击(events.isEventMultiSlotEnabled(event))时,遍历玩家当前国家的可用预设乘员组载具(getOwnCraftNames() 中允许参加该赛事的载具),取最高有效匹配分房等级(mrank)用于判定子模式可用性;单槽位模式(如空战历史性能的小规模战斗)仍保持只检查当前选中载具。"
|
||
},
|
||
|
||
"derivation": {
|
||
"requirement": "Evaluate Night Battles and other multi-slot sub-mode BR requirements against the highest-BR eligible vehicle in the player's active preset lineup rather than only the currently highlighted crew slot.",
|
||
"cause": "getCurRank(event) 在组队时调用 getRecentSquadMrank()(来自 wtmm_static.calc_ranks 的整套预设最高分房),但单人分支直接退化为读取 getPlayerCurUnit(),忽略了多槽位赛事中同预设其它槽位的高权重载具。",
|
||
"lighter_options_ruled_out": [
|
||
"仅靠本地服务:本地服务 wtmm_static.calc_ranks 已正确返回 12.0 权重(recentBR 已显示 12.0),但客户端 isNightModeAvalible(event) 不读取 recentBR,而是直接调用本地脚本函数 getCurRank(event) 禁用开关控件。"
|
||
],
|
||
"conclusion": "在 secondgamemodesutils.nut 的 getCurRank(event) 中对多槽位模式汇总预设内赛事允许载具的最大有效 mrank。",
|
||
"if_not_applied": "多槽位编队同时携带低权重与 10.0+ 高权重载具时,一旦机库高亮停留在低于 10.0 的槽位上,夜间战斗开关即被锁死并提示不可用,与顶栏显示的整套编队权重自相矛盾。"
|
||
},
|
||
|
||
"features": ["J-对局模式目录与队列"],
|
||
"evidence": [
|
||
"2.61.0.37 gui.vromfs.bin:scripts/events/secondgamemodesutils.nut 第 123-157、426-460 行,scripts/mainmenu/secondgamemodespanel.nut 第 70-103 行,scripts/events/eventsmanager.nut 第 902、1043、1248 行。"
|
||
],
|
||
|
||
"edit": {
|
||
"find": "function getCurRank(event) {\r\n if (isInSquad())\r\n return getRecentSquadMrank()\r\n\r\n let unit = getPlayerCurUnit()\r\n return unit == null ? null : getEffectiveMrank(unit, events.getEDiffByEvent(event))\r\n}",
|
||
"replace": "function getCurRank(event) {\r\n if (isInSquad())\r\n return getRecentSquadMrank()\r\n\r\n let ediff = events.getEDiffByEvent(event)\r\n if (events.isEventMultiSlotEnabled(event)) {\r\n let ownCraftNames = getOwnCraftNames()\r\n let mrankDeltaByUnit = getMrankDeltaByUnit(ownCraftNames)\r\n local maxMrank = null\r\n foreach (unitName in ownCraftNames) {\r\n let unit = getAircraftByName(unitName)\r\n if (unit != null && events.isUnitAllowedForEvent(event, unit)) {\r\n let mrank = getEffectiveMrank(unit, ediff, mrankDeltaByUnit?[unitName] ?? 0)\r\n maxMrank = maxMrank == null ? mrank : max(maxMrank, mrank)\r\n }\r\n }\r\n if (maxMrank != null)\r\n return maxMrank\r\n }\r\n\r\n let unit = getPlayerCurUnit()\r\n return unit == null ? null : getEffectiveMrank(unit, ediff)\r\n}"
|
||
}
|
||
}
|