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

Lexar_kg

Major
41 Badges
Feb 7, 2010
616
76
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sword of the Stars
  • Victoria: Revolutions
  • King Arthur II
  • Heir to the Throne
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III Complete
  • Deus Vult
  • Darkest Hour
  • Cities in Motion
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Shadowrun Returns
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Victoria 3 Sign Up
  • Surviving Mars
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Cities: Skylines
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
In SF there was a surrender event which gives all remaining forces of loser to winner.
In FtM there is not.
I want to add this effect. So I made this change in common\cb_types.txt:
# Civil war
civil_war = {
sprite_index = 4
is_triggered_only = yes

is_valid = {
THIS = {
OR = {
tag = SPA
tag = SPR
}
}
OR = {
tag = SPA
tag = SPR
}
}

is_civil_war = yes #this is a civil war

#po_annex = yes

war_name = CIVIL_WAR_NAME
on competition = {
country_event = 513
}
}
and in event\SpanishCivilWar.txt:
country_event = {

id = 513

is_triggered_only = yes

trigger = {
TAG = SPA
FROM = { TAG = SPR }
}

title = "EVTNAME513"
desc = "EVTDESC513"
picture = "SPA_Victory"

option = {
name = "EVTOPTA513"
SPR = {
split_troops = 1.0
capital = 4540
organisation = 15
inherit = SPA
}
}
}
But when I finally destroy SPA, they didn't give me nor units, nor land at all! Where is mistake?
 

Darkrenown

Star marshal
142 Badges
Jan 8, 2002
24.761
16.975
no
  • Leviathan: Warships
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Impire
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis IV: Wealth of Nations
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sunset Invasion
  • Ancient Space
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • A Game of Dwarves
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • East India Company
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
Probably their units are cleared when they surrender, try adding handles_peace = yes to the wargoal, like the Vichy war goal has, then use the event to set peace too (which it will if you;re using the SF surrender event I suppose)
 

Lexar_kg

Major
41 Badges
Feb 7, 2010
616
76
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Sword of the Stars
  • Victoria: Revolutions
  • King Arthur II
  • Heir to the Throne
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III Complete
  • Deus Vult
  • Darkest Hour
  • Cities in Motion
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Shadowrun Returns
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: La Resistance
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Victoria 3 Sign Up
  • Surviving Mars
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Cities: Skylines
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
OMG! I receive an answer from Darkrenown himself!
It's great event in my forum life! Achievement earned! :)

Didn't I annex SPA after winning (I think "inherit" makes this) because of it too?
 
Last edited:

SuiciSpai

Random People
96 Badges
Aug 10, 2009
2.856
217
  • Cities: Skylines
  • 500k Club
  • Hearts of Iron II: Armageddon
  • Hearts of Iron III
  • Semper Fi
  • For the Motherland
  • Hearts of Iron III: Their Finest Hour
  • Iron Cross
  • Darkest Hour
  • Victoria 2: A House Divided
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • BATTLETECH - Digital Deluxe Edition
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • War of the Roses
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Deluxe Edition
  • Age of Wonders III
  • Crusader Kings II: Holy Fury
  • Surviving Mars
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Shadowrun Returns
  • Europa Universalis IV: Dharma
  • Europa Universalis IV
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Distant Stars
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Teleglitch: Die More Edition
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • 200k Club
OMG! I receive an answer from Darkrenown himself!
It's great event in my forum life! Achievement earned! :)

Didn't I annex SPA after winning (I think "inherit" makes this) because of it too?

I made changes to civil war cb for my random hoi mod.

When you win the war, first you gain all the troops and then inherit.

Code:
civil_war = {
	sprite_index = 4
	
	is_triggered_only = yes
	always = yes
	
	[...] Made a lot of changes in valid, use the default one
		

	is_civil_war = yes #this is a civil war

	
	on_completion = {
		country_event = 26076
	}
	
	war_name = CIVIL_WAR_NAME
}

Code:
country_event = {
	
	id = 26076
	
	is_triggered_only = yes
	

	trigger = {
		tag = THIS
	}
	title = "They claim their cores"
	desc = "We lost this civil war, and they claim their cores"
	
		option = {
			name = "ok"
			FROM = { split_troops = 1.0 }
			FROM = { 
				country_event = 26077
			}
				
			
		}
		
}

country_event = {
	
	id = 26077
	
	is_triggered_only = yes
	
	title = "We claim our cores"
	desc = "We won this civil war, and we claim our cores"
	
		option = {
			name = "Perfect!"
				any_country{
					limit ={
							TAG = FROM 
						}	
					any_owned = {	
						limit ={
							NOT = {is_core = THIS }
						}				
						add_core =THIS		
					}
					THIS = { inherit = FROM }
				}
			
		}
		
}

This will work with any civil war if you want to add more countries with this cb.