effect · ai_message
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
ai message... ?
ai_messageCOUNTRYnoneai message... ?
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
ai_message 主要用于在 mod 中向 AI 国家传递某种内部消息或提示信号,常见于需要触发 AI 特定行为响应的场景,例如当玩家完成某项国策后通知 AI 盟友调整策略。由于官方文档对其参数描述极为有限,实际使用中多作为调试或实验性功能出现。
country_event = {
id = my_mod.1
hidden = yes
immediate = {
ai_message = {
# 具体参数视实际游戏版本测试为准
}
}
}
[add_ai_strategy](/wiki/effect/add_ai_strategy) — 两者常组合使用,在发送 ai_message 的同时通过 add_ai_strategy 给 AI 国家补充具体的策略权重,使 AI 行为调整更加完整。[has_country_flag](/wiki/trigger/has_country_flag) — 用于在执行 ai_message 前检查特定标志位是否已设置,防止重复触发或在错误时机发送消息。[country_event](/wiki/effect/country_event) — 常与 ai_message 搭配,在消息发送的同一执行块中同时触发一个隐藏事件,借助事件链实现更复杂的 AI 响应逻辑。[clr_country_flag](/wiki/effect/clr_country_flag) — 发送消息后及时清除标志位,配合标志控制确保消息仅在预期条件下发送一次。Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
ai_message is primarily used to send internal messages or signal hints to AI nations within mods, commonly appearing in scenarios that require triggering specific AI behavioral responses—such as notifying AI allies to adjust their strategy after the player completes a certain focus. Due to severely limited official documentation on its parameters, actual usage often appears as a debugging or experimental feature.
country_event = {
id = my_mod.1
hidden = yes
immediate = {
ai_message = {
# Specific parameters should be verified through testing with the actual game version
}
}
}
[add_ai_strategy](/wiki/effect/add_ai_strategy) — Often combined with ai_message; while sending the message, use add_ai_strategy to supplement concrete strategy weights for the AI nation, making AI behavioral adjustments more comprehensive.[has_country_flag](/wiki/trigger/has_country_flag) — Used to check whether a specific flag has been set before executing ai_message, preventing duplicate triggers or messages sent at the wrong time.[country_event](/wiki/effect/country_event) — Commonly paired with ai_message; trigger a hidden event in the same execution block where the message is sent, leveraging event chains to implement more complex AI response logic.[clr_country_flag](/wiki/effect/clr_country_flag) — Clear the flag promptly after sending the message, working in tandem with flag control to ensure the message is only sent once under intended conditions.