Hands-On Usage
modify_building_resources is commonly used in national focuses, decisions, or events to grant additional resource output bonuses to specific building types for a particular nation. For example, unlocking a tech path can make radar stations produce extra oil, or a special focus can increase rare resource output from refineries. This effect only applies to the triggering nation and does not affect other nations' buildings of the same type, making it ideal for creating nation-specific economic bonuses.
# Example: After completing a focus, all synthetic refineries in your nation produce an additional 1 unit of steel
focus = {
id = MY_FOCUS_RESOURCE_BOOST
...
completion_reward = {
modify_building_resources = {
building = synthetic_refinery
resource = steel
amount = 1
}
}
}
Synergy
[add_resource](/wiki/effect/add_resource): The former permanently modifies building output multipliers, while the latter directly adds or removes state resources. Combined, they achieve both "long-term building production increase + immediate inventory replenishment" effects.
[has_built](/wiki/trigger/has_built): Use this in if / limit blocks to first verify that a nation has constructed the target building before triggering modify_building_resources, avoiding meaningless modifications to nations lacking the relevant building.
[add_dynamic_modifier](/wiki/effect/add_dynamic_modifier): Dynamic modifiers attach revocable attribute bonuses that complement the permanent nature of modify_building_resources, ideal for time-limited events or wartime policies.
[add_ideas](/wiki/effect/add_ideas): If a national idea already contains building resource multipliers, it can stack with modify_building_resources. Call both in rewards simultaneously to construct a comprehensive economic bonus package.
Common Pitfalls
- The
building field must use the internal ID, not the localized name: For example, write synthetic_refinery rather than "合成精炼厂". Using the wrong identifier causes silent failure with no guaranteed error in logs, making it extremely difficult to debug.
- This effect cannot be reverted:
modify_building_resources has no corresponding removal command—once executed, it takes permanent effect. If you need a revocable version, use add_dynamic_modifier with a dynamic modifier containing building resource adjustments instead of calling this command directly.