effect · add_offsite_building
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Add an offsite building to a country
add_offsite_buildingCOUNTRYnoneAdd an offsite building to a country
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
add_offsite_building 常用于 mod 中模拟某国在海外或飞地拥有特殊设施的场景,例如为某国秘密添加核反应堆、雷达站或其他不直接绑定本土州的建筑。典型应用是在国家事件或决策触发时,给玩家或 AI 国家授予一个"幕后"存在的建筑加成,而无需占有具体州省。
country_event = {
id = my_mod.42
title = my_mod.42.t
desc = my_mod.42.d
option = {
name = my_mod.42.a
add_offsite_building = {
type = arms_factory
level = 2
}
}
}
[has_built](/wiki/trigger/has_built) — 可用于检测某国是否已拥有特定建筑(包括 offsite 类型),从而决定是否再次触发 add_offsite_building,避免重复叠加。[add_ideas](/wiki/effect/add_ideas) — 常与之搭配,一并给予理念来表现该建筑带来的国家层面属性加成,形成完整的"设施开通"奖励包。[add_political_power](/wiki/effect/add_political_power) — 在决策或事件选项中同时给予政治点数,作为建造 offsite 建筑所付出的"外交/政治代价"的对价,让选择更具博弈感。[add_timed_idea](/wiki/effect/add_timed_idea) — 若 offsite 建筑的效果应是临时性的,可配合限时理念共同模拟"临时租借设施"等场景,使效果有自然的到期机制。add_offsite_building 写在 STATE scope 块(如 every_owned_state 内部)里,导致脚本报错或无效——该命令必须直接处于国家 scope 下执行。add_building_construction 混淆:add_offsite_building 不会在任何州的地图上生成实体建筑,也不经过建造队列,直接生效;若 mod 逻辑需要的是真实州级建筑,应改用 damage_building / 建造类指令,否则两者效果完全不同。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.
add_offsite_building is commonly used in mods to simulate scenarios where a nation possesses special facilities overseas or in enclaves, such as secretly granting a country nuclear reactors, radar stations, or other structures not directly bound to mainland states. A typical application is triggering the effect during national events or decisions to grant the player or AI nation a "behind-the-scenes" building bonus without needing to occupy specific provinces.
country_event = {
id = my_mod.42
title = my_mod.42.t
desc = my_mod.42.d
option = {
name = my_mod.42.a
add_offsite_building = {
type = arms_factory
level = 2
}
}
}
[has_built](/wiki/trigger/has_built) — Can be used to detect whether a nation already possesses a specific building (including offsite types), allowing you to decide whether to trigger add_offsite_building again and avoid duplicate stacking.[add_ideas](/wiki/effect/add_ideas) — Often paired together to grant national ideas alongside the effect, representing nation-level attribute bonuses from the building and forming a complete "facility activation" reward package.[add_political_power](/wiki/effect/add_political_power) — Used simultaneously in decisions or event options to grant political power, serving as the counterbalance to the "diplomatic/political cost" of constructing the offsite building, making choices more strategically engaging.[add_timed_idea](/wiki/effect/add_timed_idea) — If the offsite building's effect should be temporary, it can be paired with timed ideas to simulate scenarios like "temporary facility lease," giving the effect a natural expiration mechanism.add_offsite_building within STATE scope blocks (such as inside every_owned_state), causing script errors or the effect to fail. This command must be executed directly under country scope.add_building_construction — add_offsite_building does not create physical building entities on any province's map nor does it go through the construction queue; it takes effect immediately. If your mod logic requires actual province-level buildings, use damage_building or construction commands instead, otherwise the effects are completely different.