Hands-On Usage
When a country leaves a tech-sharing alliance (for example, the player uses a national focus or event to sever a research cooperation relationship), use this effect to remove that country from the specified sharing group. Common scenarios include diplomatic breakdown between nations, breakaway factions from civil wars establishing independence, or cleaning up memberships when an entire faction collapses.
# A country withdraws from the commonwealth research sharing group due to ideological conflict
country_event = {
id = my_mod.42
option = {
name = my_mod.42.a
remove_from_tech_sharing_group = commonwealth_research
add_opinion_modifier = {
target = ENG
modifier = left_research_pact
}
}
}
Synergy
[add_to_tech_sharing_group](/wiki/effect/add_to_tech_sharing_group): Inverse operation to this command; often appears together in paired "join/leave" logic branches to ensure a country's sharing group affiliation remains under control at all times.
[has_country_flag](/wiki/trigger/has_country_flag): Use flag validation before executing removal to verify that the country actually has joined the sharing group, avoiding meaningless or error-prone operations on countries that never joined.
[country_event](/wiki/effect/country_event): Trigger an event immediately after removal to notify relevant countries, simulating diplomatic notification or ally reactions and making the narrative more cohesive.
[has_completed_focus](/wiki/trigger/has_completed_focus): Often serves as a prerequisite trigger to determine whether a national focus has been completed before deciding whether to execute removal, ensuring the integrity of the script logic chain.
Common Pitfalls
- The group name spelling must exactly match the definition in
add_to_tech_sharing_group (case-sensitive); even a single character difference will fail silently—the game won't error, but the country will remain in the original sharing group, making it hard to debug.
- Executing this command on a country that hasn't joined the sharing group won't cause an error, but it also won't have any effect, making newcomers mistakenly believe the command worked. It's recommended to perform prerequisite validation using
has_country_flag or related triggers to ensure logical soundness.