• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

adonys

Sergeant
88 Badges
Apr 5, 2008
85
2
  • BATTLETECH: Season pass
  • Shadowrun: Dragonfall
  • Empire of Sin
  • Mount & Blade: With Fire and Sword
  • Knights of Pen and Paper 2
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Surviving Mars: First Colony Edition
  • Steel Division: Normandy 44
  • Steel Division: Normandy 44 Deluxe Edition
  • Knights of Honor
  • Crusader Kings Complete
  • BATTLETECH
  • Prison Architect
  • Crusader Kings III
  • Stellaris: Necroids
  • Tyranny - Bastards Wound
  • Stellaris: Humanoids Species Pack
  • Surviving Mars: Digital Deluxe Edition
  • Imperator: Rome Sign Up
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • BATTLETECH: Heavy Metal
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall Sign Up
  • BATTLETECH: Flashpoint
  • Shadowrun: Hong Kong
  • Europa Universalis III Complete
  • Steel Division: Normandy 44 -  Back to Hell
  • Shadowrun Returns
  • Europa Universalis III Complete
  • BATTLETECH - Digital Deluxe Edition
  • Surviving Mars: First Colony Edition
  • Imperator: Rome Deluxe Edition
  • Stellaris: Megacorp
  • Teleglitch: Die More Edition
  • Rome: Vae Victis
  • War of the Roses
  • Stellaris: Distant Stars
  • 500k Club
  • Pride of Nations
  • Mount & Blade: Warband
  • Tyranny: Archon Edition
  • Stellaris: Galaxy Edition
from any scope switcher not working with province_events

Code:
################################################
#	Province occupied - owner
################################################
province_event = {
	id = 401001

	trigger = {
		NOT = { controlled_by = owner }
		NOT = { has_province_modifier = adem_TEST1 }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	title = "Siege Lost"
	desc = "The fate of $PROVINCENAME$ is no longer in our hands..."
	
	option = {
		name = "There is nothing we can do now"
		set_province_flag = foreign_controlled
		add_province_modifier = { name = "adem_TEST1" duration = 73000}
		controller = {
			country_event = 401002
		}
	}
}

################################################
#	Province occupied - invader
################################################
country_event = {
	id = 401002

	is_triggered_only = yes
	
	title = "Siege Won!"
	desc = "We have taken the city! What should we do now?"
	
	option = {
		name = "From returning province scope "
		from = {
			add_province_flag = foreign_spared
			add_province_modifier = { name = "adem_TEST2" duration = 73000}
		}
	}
	
	option = {
		name = "From returning country scope"
		from = {
			any_province = {
				limit = {
					has_province_flag = foreign_controlled
					has_province_modifier = adem_TEST1
				}
				add_province_flag = foreign_spared
				add_province_modifier = { name = "adem_TEST3" duration = 73000}
			}
		}
	}
}

The first option should have worked ok, but actually you only get a PROV0 instead a province name when you get the event triggered, and it won't have any effect on the triggering province (the province won't have the foreign_spared flag and the adem_TEST2 modifier added).

The second option is a guess try assuming the from returns a country instead the province scope it should, but again, the same result.

Please advise regarding the proper usage, or fix the bug.

thanks
 
Last edited:
Upvote 0
"any_province" does not work as an effect, only as a trigger. You want to use "any_owned" instead (finding any province owned by any country is a little harder, though).

I'm also not sure if "controlled_by = owner" works, try a THIS argument instead.