============================================
 卡拉迪亚圆桌会议 (Calradia Roundtable)  v1.2.0
============================================

一、这是什么
--------------------------------------------
一个在尽量不调整原版操作逻辑的前提下、改写原版按钮背后决策
逻辑的中型功能 MOD：为所有王国引入"战略评议会"制度，由三角指数
（本我 / 自我 / 超我）驱动 AI 的宣战、议和、用兵与动员，
让整个大陆的战略走向真正"有迹可循"。

二、核心玩法
--------------------------------------------
1. 战略评议会（由战况驱动）
   - 战况一变就开会：宣战或被宣战即触发评议会，裁决"战争要进行到什么
     烈度、战争的诉求及目标是什么"；长期无战事时按 MCM「和平期议会间隔（年）」进行国家治理。
   - 六档战争烈度决议：建设 / 防御 / 骚扰 / 袭击 / 远征 / 大远征。
   - 决议由王国统治者决断：玩家是君主 → 提案即定国策；
     玩家是封臣 → 可提出提案（押上家族影响力），但最终由 AI 君主裁定。
   - 提案／拍板消耗影响力 ＝「决断影响力代价」（默认 100）＋ 反对派影响力之和
     ×「提案影响力对冲比例」（默认 1:1）；有人反对时二次确认后扣费。

2. 决议真正落地（不只是文字）
   - 进攻性决议：AI 部队优先攻打决议指向的据点类型
     （骚扰→村镇 / 袭击→城堡 / 远征→城市 / 大远征→全国）。
   - 独特的大远征烈度：对目标国"死战"——决议期内绝不单方面议和，直到下一届
     评议会调整目标；通过消耗国家的战争潜力提升当下的战争强度。

3. 烈度与代价成正比
   - 动员烈度：骚扰 < 袭击 < 远征 < 大远征，影响开战意愿、部队规模、
     募兵等级、补员速率。
   - 动员代价：高动员档位每日消耗繁荣 / 忠诚 / 治安 / 军费与家族影响力，
     高档位"有得必有失"，不是无脑选最高档。

4. 分封圆桌 / 游说 / 政体 / 政治生活 / 呼叫援军 / 自绘界面
   - 分封圆桌：攻下的城先归王室，第 3 天君主定"分封 / 拍卖 / 留下"，
     竞标者可贷军功款，结果反作用于封臣不忠。
   - 游说拉票：定档后、落定前，花第纳尔把别家的票拉过来。
   - 国家政体与战略文化：八国各有行为规则（只加权、不强制），君主可改革政体。
   - 政治生活：私盟与派系看得见、做得了——可缔结 / 撕毁私盟，组建 / 入伙派系。
   - 呼叫援军：敌军军团压境时可以向王国内其他家族呼叫支援，在君主的调拨下支援据点。
   - 自绘界面：全套全新绘制的 UI 控制界面，并且尽量采用与原版游戏界面相符的 UI 逻辑；
     原生弹窗保留，可在 MCM 一键回退。

5. 全局动态
   - MOD 各类机制不但作用于玩家及玩家所在国家，同时也作用于 AI 及 AI 国家，
     双方共用相同 MOD 逻辑。
   - AI 王国在玩家评议会结束后一周内陆续召开自己的评议会。
   - 封臣不忠值、私人行为（烧村 / 伏击 / 私盟）、国家精神健康度
     每日更新，并向其他 MOD 广播事件（叛国预警等）。

6. 本版新增（v1.2.0 · 2026-09-21）
   - 新家族成立：家族会议可为家族内有功英雄提请"立族动议"，在君主同意后为其立族
     （新生 Tier 2 家族、可正常参与政治生活，类似于原版为流浪者同伴成立家族，
     但是可调整及自选项更多）；主家须二择一付代价——给与新家族一块自己的封地，
     或提供给新家族 5 万第纳尔。家族旗自动生成同文化家人补充即战力。
   - 立族装配细节：定制同文化家人装备复刻其本文化顶级兵、姓名与外貌随母家文化、
     性格随机不重样；模板共 10 套（7 主 ＋ 3 后备）。
   - 两级会议：御前会议及家族会议两级分割，彻底区分公私事务处理逻辑，
     简化决策便宜度及操作逻辑。
   - 一批实机硬伤订正：御前会议开屏崩溃、对话选项结束对话崩溃、野外开完御前会议
     掉进"战斗确认界面"、家族无名 / 空名英雄连锁崩溃、家族旗图标上下颠倒、
     家族详情页头像空白、王国页家族"成员"只算族长、百科英雄页"最后出现位置"空引用。
   - 老档自愈：定制 NPC 的"已知晓"标记与激活状态在读档首帧自动补上。

三、前置要求（必装"四前置"）
--------------------------------------------
以下 4 个 MOD 必须已在创意工坊订阅并启用，否则本 MOD 会灰选：
  - Bannerlord.ButterLib
  - Bannerlord.Harmony
  - Bannerlord.UIExtenderEx
  - Bannerlord.MBOptionScreen（即 MCM v5）

四、安装方法
--------------------------------------------
1. 解压本压缩包到游戏 Modules 目录：
   ...\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules\
   解压后应为：Modules\CalradiaRoundtable\SubModule.xml
   （模块目录名与 Id 均为 CalradiaRoundtable；更名前旧称 StrategicCouncil 已废弃）
2. 启动骑砍2启动器，在 MOD 列表中勾选启用 CalradiaRoundtable。
3. 进入游戏即可（无需开新档）。

五、游戏内配置（MCM）
--------------------------------------------
进入游戏后按 ESC → Mod 选项 → "卡拉迪亚圆桌会议"，可调整：
  - 通用：启用模组 / 语言 / 详细日志 / 和平期议会间隔（年）
  - 战略落实：AI 优先攻打决议目标 / 进攻专注度 / 动员代价强度 /
             影响力损耗强度 / 提案影响力对冲比例 / 决断影响力代价 /
             评议会过场演出
  - 阈值：叛国预警阈值 / 私人行为冲动阈值
  - 注意：「影响力损耗强度」是开战后每日侵蚀家族影响力；
        「决断影响力代价」是评议会上拍板推翻主流意见时一次性付出的
         影响力——两者互不相干，别调错。
  - 语言说明（重要，2026-09-13 定案）：
    · 通用 → 「语言 / Language」下拉：这是本 MOD 全部输出（含 MCM 面板自身）的
      唯一语言开关，与游戏语言完全脱钩——游戏语言不动它，它也不动游戏语言；
    · 生效范围：MCM 面板（标题 / 分组名 / 设置名 / 提示）+ 自绘界面（御前会议议事单 /
      分封 / 政治生态 / 过场字幕）+ 提示 + 对话项「召开御前会议」——四位一体，同看一个旋钮；
    · 面板文案怎么做到的：MCM 的设置名只能写成 `{=键}`（编译期常量），本由游戏语言解析；
      MOD 启动时把这些 `crt_*` 键按本下拉选中的语言覆盖进游戏本地化表
      （只覆盖 `crt_*` 前缀，游戏原生文案与其它 MOD 一个都不碰）；
    · 生效时机：自绘界面 / 对话 / 播报改完立即生效；MCM 面板条目在打开面板那一刻
      解析，故改完旋钮后重开一次面板即为新语言；若仍不对，重启游戏必定正确
      （启动时会按已保存的旋钮值先覆盖好）；
    · 唯一例外：「语言 / Language」这条自身的显示名与选项值固定中英并列
      （`简体中文` / `English`）——这是留给选错语言的玩家的退路，有意不随旋钮变；
    · 兜底：万一本地化覆盖因游戏版本变动失效，面板会自动退回"跟随游戏语言"，
      其余功能一概不受影响。

六、兼容性与说明
--------------------------------------------
  - 目标游戏版本：Mount & Blade II: Bannerlord v1.5.2
  - 本 MOD 采用选择性持久化：国民度四项、当前决议、开会计时、军功贷款、家族不忠、国家精神、
    政体 / 私盟 / 派系会随存档保存（读档不清零，否则长期战争的代价可被反复读档洗掉）；
    进行中的竞标、战线偏好等运行期状态不保存。
    代价：MOD 停用后存档里这部分数据无法再反序列化，需彻底拔模时请趁仍启用另存一份干净存档。
  - 本版为正式 v1.2.0。存档兼容：目前 mod 各版本存档不兼容，
    如果需要使用 MOD 建议提前预留纯净存档。
  - 日志文件（如需排查）：
    Modules\CalradiaRoundtable\bin\Win64_Shipping_Client\council_debug.log
    （需在 MCM 中开启"详细日志"；council_observe.log 始终输出）

============================================
 English  |  Calradia Roundtable  v1.2.0
============================================

1. WHAT IS THIS
--------------------------------------------
A mid-sized feature mod for Mount & Blade II: Bannerlord that, while keeping
the vanilla control logic as untouched as possible, rewrites the decision logic
behind the vanilla buttons. It introduces a "Strategic Council" into every
kingdom, where the Triad Index (Id / Ego / Superego) drives the AI's
declarations of war, peacemaking, offensives and mobilisation, so that the
strategic course of the whole continent becomes traceable.

2. CORE GAMEPLAY
--------------------------------------------
1. The Strategic Council (driven by the war situation)
   - A council meets as soon as the war situation changes: declaring war or
     being declared upon triggers it, and it decides "to what intensity the war
     is to be fought, and what the war's demands and objectives are". During
     long peace, national governance runs on the MCM option "Peacetime Council
     Interval (years)".
   - Six war-intensity tiers: Build / Defend / Harass / Raid / Expedition /
     Grand Expedition.
   - The resolution is decided by the kingdom's ruler. If the player is the
     ruler, proposing it makes it state policy. If the player is a vassal,
     they may put forward a proposal (staking family influence), but the AI
     ruler has the final word.
   - Proposing / deciding costs influence = "Decisive Influence Cost"
     (default 100) + the sum of opponents' influence x "Proposal Influence
     Hedge Ratio" (default 1:1). If anyone objects, the cost is deducted
     after a confirmation prompt.

2. Resolutions actually take effect (they are not just text)
   - Offensive resolutions: AI parties prioritise the settlement type the
     resolution points at (Harass -> villages / Raid -> castles /
     Expedition -> towns / Grand Expedition -> the whole realm).
   - The unique Grand Expedition intensity: no unilateral peace is made for
     the duration of the resolution; it raises the current war intensity by
     consuming the realm's war potential.

3. Intensity and cost are proportional
   - Mobilisation intensity: Harass < Raid < Expedition < Grand Expedition,
     affecting willingness to fight, party size, recruitment tier and
     reinforcement rate.
   - Mobilisation cost: the higher tiers consume prosperity / loyalty /
     security / military wages and family influence every day. Higher tiers
     give and take - picking the top tier is not a no-brainer.

4. Fief roundtable / Lobbying / Government types / Political life / Calling
   for reinforcements / Custom UI
   - Fief roundtable: a captured town or castle reverts to the crown first;
     on day 3 the ruler decides to grant / auction / keep it; bidders may
     take war loans, and the outcome feeds back into vassal disloyalty.
   - Lobbying for votes: after the tier is set and before it is finalised,
     spend denars to pull other clans' votes your way.
   - Government types and strategic cultures: the eight kingdoms each have
     their own behaviour rules (weighting only, never forcing); a ruler may
     reform the government.
   - Political life: pacts and factions you can see and act on - make or
     break a pact, found or join a faction.
   - Calling for reinforcements: when an enemy army bears down, you may call
     on other clans of the kingdom for support, and under the ruler's
     allocation they reinforce the settlement.
   - Custom UI: a full set of newly drawn UI screens, also keeping the UI
     logic as close to the vanilla interface as possible; native dialogs are
     kept, with a one-click MCM fallback.

5. Global dynamics
   - Every mechanic of the mod applies not only to the player and the
     player's kingdom, but to the AI and AI kingdoms as well - both sides
     use the same mod logic.
   - AI kingdoms convene their own councils within a week of the player's
     council ending.
   - Vassal disloyalty, private acts (village burning / ambushes / private
     pacts) and national mental health update daily, and are broadcast as
     events to other mods (e.g. treason warnings).

6. NEW IN THIS VERSION (v1.2.0 - 2026-09-21)
   - Founding new clans (P1-P3b): the royal council may pass a "founding motion"
     for a meritorious hero, creating a clan through the NATIVE path (native
     Tier 2, full political participation - not a bolted-on clan). The host clan
     must pay one of two costs: give up one of its own fiefs (the "land track")
     or pay 50,000 denars (the "coin track").
   - Founding loadout: the new clan comes with 3 custom NPCs whose equipment
     mirrors their OWN culture's top-tier troops, whose names and looks follow
     the mother clan's culture, with an auto-generated banner and randomised
     personalities; 10 template sets in total (7 primary + 3 fallback).
   - Two-tier councils: the kingdom council and the clan council are held in
     tiers, and the clan council closes itself automatically.
   - A batch of live-play fixes: council screen crash on open, crash when a
     dialogue option ends the conversation, falling into the "battle
     confirmation" screen after a field council, nameless clan / nameless-hero
     cascade crashes, upside-down banner icon, blank portraits on the clan
     detail page, the kingdom clan page counting only the leader as a member,
     and a null-reference when reading a hero's "last seen" in the encyclopaedia.
   - Old-save healing: the "known to player" flag and spawn state of custom NPCs
     are repaired on the first frame after loading. No new campaign needed.

3. REQUIREMENTS (the "four prerequisites")
--------------------------------------------
The following 4 mods must be subscribed on the Steam Workshop and enabled,
otherwise this mod is greyed out:
  - Bannerlord.ButterLib
  - Bannerlord.Harmony
  - Bannerlord.UIExtenderEx
  - Bannerlord.MBOptionScreen (i.e. MCM v5)

4. INSTALLATION
--------------------------------------------
1. Extract this archive into the game's Modules directory:
   ...\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules\
   After extraction you should see:
   Modules\CalradiaRoundtable\SubModule.xml
   (Both the folder name and the Id are CalradiaRoundtable; the former name
   StrategicCouncil is deprecated.)
2. Start the Bannerlord launcher and tick CalradiaRoundtable in the mod list.
3. Start the game. No new campaign is required.

5. IN-GAME CONFIGURATION (MCM)
--------------------------------------------
In game, press ESC -> Mod Options -> "Calradia Roundtable" to adjust:
  - General: Enable Mod / Language / Verbose Logging / Peacetime Council
    Interval (years)
  - Strategy Execution: AI Prioritises Resolution Target / Offensive Focus /
    Mobilisation Cost Strength / Influence Drain Strength / Proposal
    Influence Hedge Ratio / Decisive Influence Cost / Council Cutscene
  - Thresholds: Treason Warning Threshold / Private Act Impulse Threshold
  - Note: "Influence Drain Strength" erodes family influence EVERY DAY once
    war starts; "Decisive Influence Cost" is a ONE-OFF influence payment when
    the council overrules the majority. The two are unrelated - do not mix
    them up.
  - About the language switch (important, finalised 2026-09-13):
    * General -> the "Language" dropdown is the ONLY language switch for all
      output of this mod, INCLUDING the MCM panel itself. It is completely
      decoupled from the game language: the game language does not move it,
      and it does not move the game language.
    * Scope: MCM panel (title / group names / setting names / tooltips) +
      custom-drawn UI (council agenda / fief grants / political ecology /
      cutscene subtitles) + notifications + the dialogue option "Convene the
      Royal Council" - four in one, all reading the same switch.
    * How the panel text works: MCM setting names can only be written as
      "{=key}" (compile-time constants), normally resolved by the game
      language. On startup this mod overwrites those crt_* keys in the game
      localisation table according to the language picked in the dropdown
      (only keys prefixed crt_*; native game text and other mods are never
      touched).
    * When it takes effect: custom-drawn UI / dialogue / notifications update
      immediately; MCM panel entries are resolved the moment the panel is
      opened, so reopen the panel once after changing the switch. If it is
      still wrong, restarting the game is guaranteed to be correct (the
      startup overwrite uses the saved switch value).
    * The only exception: the "Language" entry itself always shows both
      languages side by side (Simplified Chinese / English). This is an
      escape hatch for players who picked the wrong language, and it
      intentionally does not follow the switch.
    * Fallback: should the localisation overwrite ever break due to a game
      version change, the panel silently falls back to "follow the game
      language"; nothing else is affected.

6. COMPATIBILITY AND NOTES
--------------------------------------------
  - Target game version: Mount & Blade II: Bannerlord v1.5.2
  - This mod uses selective persistence: the four national condition values,
    the current resolution, council timers, war loans, family disloyalty,
    national spirit and government / pacts / factions are saved with the
    campaign (they do not reset on load, otherwise
    the cost of a long war could be washed away by reloading). In-progress
    bidding, front preferences and other runtime state are not saved.
    Trade-off: once the mod is disabled, that part of the save can no longer
    be deserialised - if you intend to remove the mod for good, save a clean
    copy while it is still enabled.
  - This is the official v1.2.0 release. Save compatibility: currently the
    mod's versions are NOT save-compatible with one another; if you intend to
    use the mod, keep a clean save ready in advance.
  - Log files (for troubleshooting):
    Modules\CalradiaRoundtable\bin\Win64_Shipping_Client\council_debug.log
    (requires "Verbose Logging" in MCM; council_observe.log is always
    written)

============================================
