effect · give_military_access
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
gives military access to the specified country
give_military_accessCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALgives military access to the specified country
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
give_military_access 常用于外交事件、国策完成或同盟协议中,让目标国家自动获得对本国的军事通行权,省去手动外交谈判步骤。例如在一个"签署军事协定"的事件中,让对方立即获得通行权:
country_event = {
id = my_mod.10
option = {
name = my_mod.10.a
# 当前 scope 为 GER,让 ITA 获得对 GER 的军事通行权
give_military_access = ITA
}
}
[gives_military_access_to](/wiki/trigger/gives_military_access_to):在 trigger 块中检查某国是否已获得军事通行权,与 give_military_access 形成"判断-执行"闭环,避免重复授权。[diplomatic_relation](/wiki/effect/diplomatic_relation):通行权通常伴随更深层的外交关系变化(如建立不侵犯条约),两者组合可模拟完整的双边协议。[add_opinion_modifier](/wiki/effect/add_opinion_modifier):授予通行权后附加好感度修正,体现对方对此外交行为的态度反馈,使事件逻辑更完整。[country_event](/wiki/effect/country_event):授权后向目标国触发一个确认/通知事件,让玩家或 AI 知晓权限已生效,提升叙事连贯性。give_military_access = ITA 的含义是"当前 scope 国家(如 GER)将军事通行权给予 ITA",即 ITA 可以过境 GER,而非 GER 可以过境 ITA。新手常将授予方与受益方搞反,导致通行权开错方向。ITA)或 scope 关键字(如 FROM),但若误填小写标签或拼错,游戏不会报错却静默失效,需仔细核对日志。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.
give_military_access is commonly used in diplomatic events, national focus completions, or alliance agreements to automatically grant the target nation military access to your territory, bypassing manual diplomatic negotiation steps. For example, in a "Sign Military Agreement" event, you can immediately grant the other side access rights:
country_event = {
id = my_mod.10
option = {
name = my_mod.10.a
# Current scope is GER, granting ITA military access to GER
give_military_access = ITA
}
}
[gives_military_access_to](/wiki/trigger/gives_military_access_to): Check within a trigger block whether a nation has already been granted military access. This forms a "check-execute" loop with give_military_access, preventing duplicate grants.[diplomatic_relation](/wiki/effect/diplomatic_relation): Military access typically accompanies deeper diplomatic shifts (such as establishing non-aggression pacts). Combining these two effects simulates complete bilateral agreements.[add_opinion_modifier](/wiki/effect/add_opinion_modifier): Add opinion modifiers after granting access to reflect the target nation's attitude toward this diplomatic action, making event logic more comprehensive.[country_event](/wiki/effect/country_event): Trigger a confirmation or notification event in the target nation after granting access, ensuring the player or AI is aware that permissions are active and improving narrative continuity.give_military_access = ITA means "the current scope nation (e.g., GER) grants military access to ITA," meaning ITA can traverse through GER, not the other way around. Beginners often swap the granting party and the beneficiary, causing military access to be granted in the wrong direction.ITA) or scope keywords (e.g., FROM), but misspelling lowercase tags or making typos won't produce an error—the effect silently fails. Carefully check your logs for verification.