• 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.

Allan Nonymous

Second Lieutenant
33 Badges
May 7, 2016
195
863
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
I'm trying to create a diplomatic play (in this case an annexation war) procedurally started by a diplomatic action. Right now, I can get it to start, but the game throws a context error, and wargoals aren't added properly. Can anyone help me?

create_diplomatic_play = {

name = Test
war = yes
target_country = scope:target_country

add_war_goal = {
type = annex_country
target_country = scope:target_country
}

scope:target_country = {
add_war_goal = {
type = annex_country
target_country = scope:target_country
}
}

texture = "gfx/interface/icons/war_goals/annex_country.dds"
}