Easy fixes and workarounds for “No leaders after release” bug and broken wakeleader

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

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
First of all I want to apology for my poor English. :(

Now to the problems:

When a county is annexed and then released without save-reload* workaround, the released county will be leaderless with the exception of the dormant leaders specified in that country's INC file. The cause of this bug probably lies in the way the program determines which leaders to recreate for the “new” country and instead of creating all leaders from leaders file except dormant ones (from INC file), it creates only the dormant leaders (obviously broken logic in game code). As a side note it will be really nice if there is a log of all dormant, KIA and slept leaders in the current game, which is saved in save-game file, so they don’t reappear again after recreation of the country.

There is another bug when a country is annexed, save-reload*, and then released. In this case it will have all leaders, including the dormant ones (from INC file).
Ironically we can use these 2 bugs to solve the problem.

Another weapon in our arsenal will be the add_corps command, which can be used to transfer leaders from one country to another. This command also can be used as workaround for the broken wakeleader command (especially for the Anschluss events as Germany; look at the end of my post).
As far as I know, these problems are persistent in all patches and versions of HoI2.

*save-reload - save the game, then reload that save

The solution(s):

Event 3815 (..\db\events\japan.txt) is called from event 3814 (..\db\events\nationalist_china.txt) and have 3 options:
a) Create Nat. China as puppet state
b) Create CYN, CGX, CSX and CXB as puppet states
c) Take them all

If we select a), CHI will have only 2 leaders (the dormant ones). To solve this we can use add_corps commands to move temporary all existing (not KIA, slept or dormant) CHI leaders to Japan or any other existing country. I prefer to send them to Japan. To do that we have to edit event 3815 action_a
(..\db\events\japan.txt) from this:

Code:
	action_a = {
		name = "EVT_3815_ACTA" #
		ai_chance = 80

		command = { type = inherit which = CHI } 
		command = { type = inherit which = CSX } 
		command = { type = inherit which = CGX } 
		command = { type = inherit which = CXB } 
		command = { type = inherit which = CYN } 

		command = { type = domestic which = free_market value = -1 }
		command = { type = domestic which = freedom value = -1 }
		command = { type = domestic which = defense_lobby value = 1 }
		command = { type = domestic which = interventionism value = 1 }
		command = { type = belligerence which = JAP value = -50 }

		command = { type = trigger which = 3820 } 
	}

To this:


Code:
action_a = {
	name = "EVT_3815_ACTA" #
	ai_chance = 80

	command = { type = add_corps which = "Bai Chongxi" value = land when = 50000 where = 1184 }
	command = { type = add_corps which = "Zhang Zhen" value = land when = 50001 where = 1184 }
	command = { type = add_corps which = "Zhang Zhenn" value = land when = 50002 where = 1184 }
	command = { type = add_corps which = "Zhang Chi" value = land when = 50003 where = 1184 }
	command = { type = add_corps which = "Zhang Zhizhong" value = land when = 50004 where = 1184 }
#.... Here we have to include all CHI leaders exept Chiang Kai-Shek 
(killed in event 3814) and von Falkenhausen, Chennault 
and Khryukin - mercenaries/foreighn agents/advisors 
	command = { type = add_corps which = "Yue Yiqin" value = air when = 50388 where = 1184 }
	command = { type = add_corps which = "Li Shijia" value = naval when = 50389 where = 1184 }			

	command = { type = inherit which = CHI } 
	command = { type = inherit which = CSX } 
	command = { type = inherit which = CGX } 
	command = { type = inherit which = CXB } 
	command = { type = inherit which = CYN } 

	command = { type = domestic which = free_market value = -1 }
	command = { type = domestic which = freedom value = -1 }
	command = { type = domestic which = defense_lobby value = 1 }
	command = { type = domestic which = interventionism value = 1 }
	command = { type = belligerence which = JAP value = -50 }

	command = { type = trigger which = 3820 } 
	}
The add_corps commands have to be prior inherit CHI one!!!
Now all active CHI leaders with their new traits, experience and battle history are moved to Japan (Tokyo). :)
All we have to do now is to give them back to CHI when it is released. This is in event 3819 (..\db\events\nationalist_china.txt)

Change this:

Code:
event = {
	id = 3819
	random = no
	country = CHI

	name = "EVT_3819_NAME"
	desc = "EVT_3819_DESC"
	style = 0
        picture = "Nanking"

	action_a = {
		ai_chance = 100
		name = "OK" #

		command = { type = set_domestic which = democratic value = 2 }
	
		................................

		#command = { type = inherit which = CXB } 
		#command = { type = inherit which = SIK } 
	}
}

To this:

Code:
event = {
	id = 3819
	random = no
	country = CHI

	name = "EVT_3819_NAME"
	desc = "EVT_3819_DESC"
	style = 0
        picture = "Nanking"

	action_a = {
		ai_chance = 100
		name = "OK" #

		command = { type = set_domestic which = democratic value = 2 }
		command = { type = set_domestic which = political_left value = 3 }

		..................

		#command = { type = inherit which = CXB } 
		#command = { type = inherit which = SIK } 

		command = { type = add_corps which = "Bai Chongxi" value = land when = 50000 where = 1238 }
		command = { type = add_corps which = "Zhang Zhen" value = land when = 50001 where = 1238 }
		command = { type = add_corps which = "Zhang Zhenn" value = land when = 50002 where = 1238 }
		#.... Here we have to include all CHI leaders exept Chiang Kai-Shek (killed in event 3814)
                          #and von Falkenhausen, Chennault and Khryukin -  
mercenaries/foreighn agents/advisors 
		command = { type = add_corps which = "Yue Yiqin" value = air when = 50388 where = 1238 }
		command = { type = add_corps which = "Li Shijia" value = naval when = 50389 where = 1238 }

		command = { type = sleepleader which = 50304 } # von Falkenhausen
		command = { type = sleepleader which = 50370 } # Chennault
		command = { type = sleepleader which = 50377 } # Khryukin
	}
}

The 3 sleepleader commands at the end are included because of the 1st bug (reviving of dormant leaders from INC file). Now all active Chinese leaders are back to CHI and have all their new traits, experience and battle history preserved.

If Japan is played by human, he will receive numerous "Disaster" messages because the game automatically will disband all empty divisions. Workaround for this is to pause the game prior or between the events and to combine all empty corps (nearly 400) in one.


To resolve the bug in Event 3815 -> option_b (no leaders for CYN, CGX, CSX and CXB) , I'll choose another approach - I'll use the dormant leader bug, which needs a little more editing. Most of their leaders are foreigners and probably is wise to sleep some of them (mostly the Russian ones), but for simplicity I'll skip that part.

1. First we have to add new leaders, copy of the existing ones but with other ID (I use the same + 100), in leader files for all 4 countries
(..db\leaders\guangxiclique.csv, shanxi.csv, xibeisanma.csv and yunnan.csv). Example for guangxiclique.csv:

Code:
Belov;502000;CGX;1930;1990;1990;1990;3;2;256;0;0;5;0;L502000;1930;1960;x
Chen Jitang;502001;CGX;1930;1930;1930;1938;0;2;513;1;0;1;0;L50031;1930;1944;x
Kravelkin;502002;CGX;1930;1990;1990;1990;3;2;4;0;0;5;0;L502002;1930;1960;x
Li Jishen;502003;CGX;1930;1930;1930;1990;1;3;16;1;0;5;0;L502003;1930;1960;x
Li Zongren;502004;CGX;1930;1939;1941;1944;1;4;4;3;0;4;0;L50186;1930;1960;x
.....
Belov;502100;CGX;1930;1990;1990;1990;3;2;256;0;0;5;0;L502000;1930;1960;x
Chen Jitang;502101;CGX;1930;1930;1930;1938;0;2;513;1;0;1;0;L50031;1930;1944;x
Kravelkin;502102;CGX;1930;1990;1990;1990;3;2;4;0;0;5;0;L502002;1930;1960;x
Li Jishen;502103;CGX;1930;1930;1930;1990;1;3;16;1;0;5;0;L502003;1930;1960;x
Li Zongren;502104;CGX;1930;1939;1941;1944;1;4;4;3;0;4;0;L50186;1930;1960;x
.....

NOTE! These files must end with empty line otherwise the last leader will not be visible to the game!

2. Now we have to add all these "new" leaders to the dormant leader list in INC files (...\scenarios\...) for that country in every scenario.
Example - scenarios\1936\cgx_36.inc.

Change this:


Code:
##############################
# Country definition for CGX #
##############################

province = { id = 1248 supplypool = 500 oilpool = 50 } # Shantou
....
  chiefofstaff           = { type = 9 id = 502007 }
  chiefofarmy            = { type = 9 id = 502008 }
  chiefofnavy            = { type = 9 id = 502009 }
  chiefofair             = { type = 9 id = 502010 }
  # ######
  # GUANGXI OOB
  # ######
....
    }
  }
}
To this:
Code:
##############################
# Country definition for CGX #
##############################

province = { id = 1248 supplypool = 500 oilpool = 50 } # Shantou
....
  chiefofstaff           = { type = 9 id = 502007 }
  chiefofarmy            = { type = 9 id = 502008 }
  chiefofnavy            = { type = 9 id = 502009 }
  chiefofair             = { type = 9 id = 502010 }
  dormant_leaders        = { 502100 502101 502102 502103 502104 502105 
502106 502107 502108 502109 502110 502111 502112 502113 502114 
502115 502116 502117 502118 502119 502120 502121 }
  # ######
  # GUANGXI OOB
  # ######
....
    }
  }
}

Now if we or the AI select action_b in event 3815, CYN,CGX, CSX and CXB will have leaders, copy of the original ones (no exp., new traits or battle history preserved in this case). Also if any other country releases them, they still will have leaders!!! No more leaderless countries! ;)
But now if anyone releases them after save-reload, they will have all original leaders + dormant ones, so we have to resolve this new bug:

3. Create new events, which will check if there are active cloned and original leaders at the same time for every one of the 4 countries.
Example for CGX:

Code:
event = {
	id = 950000
	random = no 
	country = CGX
	
	trigger = {
		OR = {
			AND = {
				leader = 502000
				leader = 502100
			}
			AND = {
				leader = 502001
				leader = 502101
			}
			AND = {
				leader = 502003
				leader = 502103
			}
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 10
	deathdate = { day = 29 month = december year = 1999 }

	action_a = { 
		command = { type = sleepleader which = 502100 }
		command = { type = sleepleader which = 502101 }
		command = { type = sleepleader which = 502102 }
		command = { type = sleepleader which = 502103 }
		command = { type = sleepleader which = 502104 }
		command = { type = sleepleader which = 502105 }
		command = { type = sleepleader which = 502106 }
		command = { type = sleepleader which = 502107 }
		command = { type = sleepleader which = 502108 }
		command = { type = sleepleader which = 502109 }
		command = { type = sleepleader which = 502110 }
		command = { type = sleepleader which = 502111 }
		command = { type = sleepleader which = 502112 }
		command = { type = sleepleader which = 502113 }
		command = { type = sleepleader which = 502114 }
		command = { type = sleepleader which = 502115 }
		command = { type = sleepleader which = 502116 }
		command = { type = sleepleader which = 502117 }
		command = { type = sleepleader which = 502118 }
		command = { type = sleepleader which = 502119 }
		command = { type = sleepleader which = 502120 }
		command = { type = sleepleader which = 502121 }
	}
}

This event will check for duplicated leaders (any of the 3 couples) every 10 days and if there is one it will sleep all new ones.

NOTE! Check your game/mod to find free event IDs for the new events! 950000 is free in Arm. 1.1 + CDCP 0.46.

These events can be added to japan.txt, nationalist_china.txt or any other existing event file, or we can create new one (leaders.txt) and add it to the
..db\events.txt

Code:
event = "db\events\leaders.txt"

We can use this approach to every country in the game, but for big countries with many leaders it will be quite time expensive.


Fix to the broken wakeleader command in the Anschluss events as Germany.

We can use add_corps command to move all German/Austrian leaders to Austria (or other country) at the start of the 1936 scenario, and them return them to Germany before the Anschluss, or sleep them if there's no Anschluss. I was posted these ideas few weeks ago in other thread (my posts -here and here) , but will repost part of them:

1. Edit ...\Doomsday\scenarios\1936\germany.inc in dormant_leader section and remove all austrian leaders:
From:
Code:
  dormant_leaders        = { 544 545 546 547 548 549 550 551 552 553 
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571
 572 573 574 575 576 577 578 579 }
To:
Code:
  dormant_leaders        = { 579 }

2. Add new event in ...\Doomsday\db\events\germany.txt that gives all leaders above to another country (in my case - Austria):

Code:
event = {
	id = 611120
	random = no
	country = AUS
	name = "Pro-German Austrian Leaders"
	desc = "Pro-German Austrian Leaders"
	style = 0
	picture = "events_empty"
	date = { day = 1 month = january year = 1936 }
        action_a = {
		name = "OK"
		command = { type = add_corps which = "Barger" value = land when = 544 where = 463 }
		command = { type = add_corps which = "Beyer E." value = land when = 545 where = 463 }
		command = { type = add_corps which = "Bornemann" value = land when = 546 where = 463 }	
		command = { type = add_corps which = "Britzelmayr" value = land when = 547 where = 463 }
		command = { type = add_corps which = "Eglseer" value = land when = 548 where = 463 }
		command = { type = add_corps which = "Eppich" value = land when = 549 where = 463 }
		command = { type = add_corps which = "Ernst" value = land when = 550 where = 463 }
		command = { type = add_corps which = "Feketehalmy-Czeydner" value = land when = 551 where = 463 }
		command = { type = add_corps which = "Feurstein" value = land when = 552 where = 463 }
		command = { type = add_corps which = "Glaise-Horstenau" value = land when = 553 where = 463 }
		command = { type = add_corps which = "Grassy" value = land when = 554 where = 463 }
		command = { type = add_corps which = "Grдser C." value = land when = 555 where = 463 }
		command = { type = add_corps which = "Hammer" value = land when = 556 where = 463 }
		command = { type = add_corps which = "Haselmayr" value = land when = 557 where = 463 }
		command = { type = add_corps which = "Hickmann" value = naval when = 558 where = 463 }
		command = { type = add_corps which = "Kienbauer" value = land when = 559 where = 463 }
		command = { type = add_corps which = "Kotik" value = land when = 560 where = 463 }
		command = { type = add_corps which = "Kubena" value = land when = 561 where = 463 }
		command = { type = add_corps which = "Longin" value = air when = 562 where = 463 }
		command = { type = add_corps which = "Lцhr" value = air when = 563 where = 463 }
		command = { type = add_corps which = "Materna" value = land when = 564 where = 463 }
		command = { type = add_corps which = "Martinek" value = land when = 565 where = 463 }
		command = { type = add_corps which = "Mickl" value = land when = 566 where = 463 }
		command = { type = add_corps which = "Phleps" value = land when = 567 where = 463 }
		command = { type = add_corps which = "Rendulic" value = land when = 568 where = 463 }
		command = { type = add_corps which = "Schaffarz" value = land when = 569 where = 463 }
		command = { type = add_corps which = "Schцbel" value = air when = 570 where = 463 }
		command = { type = add_corps which = "Schubert" value = land when = 571 where = 463 }
		command = { type = add_corps which = "Stьmpfl" value = land when = 572 where = 463 }
		command = { type = add_corps which = "Vesely" value = land when = 573 where = 463 }
		command = { type = add_corps which = "Vodepp" value = air when = 574 where = 463 }
		command = { type = add_corps which = "von Eimannsberger" value = land when = 575 where = 463 }
		command = { type = add_corps which = "von Hubicki" value = land when = 576 where = 463 }
		command = { type = add_corps which = "Zaiser" value = land when = 577 where = 463 }
		command = { type = add_corps which = "Zborzil" value = land when = 578 where = 463 }
	}
}
This event will fire at 2nd of January 1936 and will move all "Austrian" leaders from Germany to Austria. At 3rd of January all empty land and air divisions will disappear, but the leaders will stay in Austria.

3. Edit event 2001 in ...\Doomsday\db\events\germany.txt to:
Code:
event = {
	id = 2001
	random = no
	country = GER
	# Triggered by AUS 2100
	name = "EVT_2001_NAME"
	desc = "EVT_2001_DESC"
	style = 0
	picture = "anchsluss"

	action_a = {
		name = "OK"
		command = { type = inherit which = AUS }
		command = { type = manpowerpool value = 300 }
		command = { type = dissent value = -10 }
		command = { type = domestic which = defense_lobby value = 1 }
		command = { type = add_corps which = "Barger" value = land when = 544 where = 300 }
		command = { type = add_corps which = "Beyer E." value = land when = 545 where = 300 }
		command = { type = add_corps which = "Bornemann" value = land when = 546 where = 300 }	
		command = { type = add_corps which = "Britzelmayr" value = land when = 547 where = 300 }
		command = { type = add_corps which = "Eglseer" value = land when = 548 where = 300 }
		command = { type = add_corps which = "Eppich" value = land when = 549 where = 300 }
		command = { type = add_corps which = "Ernst" value = land when = 550 where = 300 }
		command = { type = add_corps which = "Feketehalmy-Czeydner" value = land when = 551 where = 300 }
		command = { type = add_corps which = "Feurstein" value = land when = 552 where = 300 }
		command = { type = add_corps which = "Glaise-Horstenau" value = land when = 553 where = 300 }
		command = { type = add_corps which = "Grassy" value = land when = 554 where = 300 }
		command = { type = add_corps which = "Gräser C." value = land when = 555 where = 300 }
		command = { type = add_corps which = "Hammer" value = land when = 556 where = 300 }
		command = { type = add_corps which = "Haselmayr" value = land when = 557 where = 300 }
		command = { type = add_corps which = "Hickmann" value = naval when = 558 where = 296 }
		command = { type = add_corps which = "Kienbauer" value = land when = 559 where = 300 }
		command = { type = add_corps which = "Kotik" value = land when = 560 where = 300 }
		command = { type = add_corps which = "Kubena" value = land when = 561 where = 300 }
		command = { type = add_corps which = "Longin" value = air when = 562 where = 300 }
		command = { type = add_corps which = "Löhr" value = air when = 563 where = 300 }
		command = { type = add_corps which = "Materna" value = land when = 564 where = 300 }
		command = { type = add_corps which = "Martinek" value = land when = 565 where = 300 }
		command = { type = add_corps which = "Mickl" value = land when = 566 where = 300 }
		command = { type = add_corps which = "Phleps" value = land when = 567 where = 300 }
		command = { type = add_corps which = "Rendulic" value = land when = 568 where = 300 }
		command = { type = add_corps which = "Schaffarz" value = land when = 569 where = 300 }
		command = { type = add_corps which = "Schöbel" value = air when = 570 where = 300 }
		command = { type = add_corps which = "Schubert" value = land when = 571 where = 300 }
		command = { type = add_corps which = "Stümpfl" value = land when = 572 where = 300 }
		command = { type = add_corps which = "Vesely" value = land when = 573 where = 300 }
		command = { type = add_corps which = "Vodepp" value = air when = 574 where = 300 }
		command = { type = add_corps which = "von Eimannsberger" value = land when = 575 where = 300 }
		command = { type = add_corps which = "von Hubicki" value = land when = 576 where = 300 }
		command = { type = add_corps which = "Zaiser" value = land when = 577 where = 300 }
		command = { type = add_corps which = "Zborzil" value = land when = 578 where = 300 }
	}
}
This event will bring them all back to Germany (checked it in save-game file). Again all empty corps will disappear in a few hours/days.

4. Add sleepleader commands in events 2020 (...\Doomsday\db\events\germany.txt) and 2100 (...\Doomsday\db\events\austria.txt) for action_b and action_c like:
Code:
		command = { type = sleepleader which = 544 } # Barger
		command = { type = sleepleader which = 545 } # Beyer E.
		command = { type = sleepleader which = 546 } # Bornemann
		command = { type = sleepleader which = 547 } # Britzelmayr
		command = { type = sleepleader which = 548 } # Eglseer
		command = { type = sleepleader which = 549 } # Eppich
		command = { type = sleepleader which = 550 } # Ernst
		command = { type = sleepleader which = 551 } # Feketehalmy-Czeydner
		command = { type = sleepleader which = 552 } # Feurstein
		command = { type = sleepleader which = 553 } # Glaise-Horstenau
		command = { type = sleepleader which = 554 } # Grassy
		command = { type = sleepleader which = 555 } # Gräser C.
		command = { type = sleepleader which = 556 } # Hammer
		command = { type = sleepleader which = 557 } # Haselmayr
		command = { type = sleepleader which = 558 } # Hickmann
		command = { type = sleepleader which = 559 } # Kienbauer
		command = { type = sleepleader which = 560 } # Kotik
		command = { type = sleepleader which = 561 } # Kubena
		command = { type = sleepleader which = 562 } # Longin
		command = { type = sleepleader which = 563 } # Löhr
		command = { type = sleepleader which = 564 } # Materna
		command = { type = sleepleader which = 565 } # Martinek
		command = { type = sleepleader which = 566 } # Mickl
		command = { type = sleepleader which = 567 } # Phleps
		command = { type = sleepleader which = 568 } # Rendulic
		command = { type = sleepleader which = 569 } # Schaffarz
		command = { type = sleepleader which = 570 } # Schöbel
		command = { type = sleepleader which = 571 } # Schubert
		command = { type = sleepleader which = 572 } # Stümpfl
		command = { type = sleepleader which = 573 } # Vesely
		command = { type = sleepleader which = 574 } # Vodepp
		command = { type = sleepleader which = 575 } # von Eimannsberger
		command = { type = sleepleader which = 576 } # von Hubicki
		command = { type = sleepleader which = 577 } # Zaiser
		command = { type = sleepleader which = 578 } # Zborzil

In my personal mod I also tweak a little the triggers in event 2020 (..db\events\germany.txt), so this event fires also if Austria is at war and loses any core provinces or is allied to Germany:

Code:
event = {
	id = 2020
	random = no
	country = GER
	trigger = {
		exists = AUS
		OR = {
			AND = {
				atwar = no # Germany is at Peace
				NOT = {
					atwar = AUS # Austria is not at war
					alliance = { country = AUS country = SOV }
					alliance = { country = AUS country = ENG }
				}
				OR = {
					#control = { province = 71 data = GER } # Luxemburg 
					alliance = { country = AUS country = GER }
					AND = {
						year = 1938
						month = march
						day = 12
					}
				}				
			}
			AND = {
				atwar = AUS # Austria is at war and losing teritory
				NOT = {
					war = { country = GER  country = AUS }
				}
				OR = {
					NOT = { control = { province = 373 data = AUS } } #Lech
					NOT = { control = { province = 377 data = AUS } } #Innsbruck
					NOT = { control = { province = 460 data = AUS } } #Graz
					NOT = { control = { province = 461 data = AUS } } #Klagenfurt
					NOT = { control = { province = 462 data = AUS } } #Salzburg
					NOT = { control = { province = 463 data = AUS } } #Vienna
					NOT = { control = { province = 464 data = AUS } } #Hollabrunn
					NOT = { control = { province = 465 data = AUS } } #Linz
				}
			}	
		}
	}
	name = "EVT_2020_NAME"
	desc = "EVT_2020_DESC"
	style = 0
	picture = "anchsluss"

	date = { day = 1 month = january year = 1936 }
	offset = 3
	deathdate = { day = 12 month = march year = 1940 }


Here is a copy of my fixed files for Armagedon 1.1 + CDCP 0.46. AFIK these changes can be made to all versions of HoI2, so you can use the files to copy-paste the new and fixed events.
 
Last edited:

unmerged(76495)

Resident Iranien Fanatic
May 18, 2007
2.337
4
Wow!

Very nice and well planned idea! Looks great!! :)

Well done and kudos to you!
 

Gormadoc

Darkest Hour Developer (Semi-Retired)
19 Badges
Sep 1, 2004
3.765
4
  • Hearts of Iron II: Beta
  • Battle for Bosporus
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Hearts of Iron II: Armageddon
  • 500k Club
  • Semper Fi
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis III Complete
  • Deus Vult
hi Martinbg

After i saw your solution to no leaders. I got inspired at uses something similar, to set up Free French and Vichy leaders so they keep any xp and traits they gain before Vichy triggers. Works very well.

I setup free french as a new country so the leaders have to be carried over by the add corps event command.
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
Thanks for yours replies guys! I’m glad that you find my small contribution to this forum community useful :)

Gormadoc, after I saw your post here I’ve got inspired too and changed event 2103 (vichy_france.txt) and add a new event (2104) to move French leaders to Vichy. Didn’t tested them in real game yet but will post them here to save time to any one who likes the idea and wants to use them.
Did you (or any one else) think we can use this approach for other countries/events? I think about an event to move USSR leader Vlassov to Germany if he is not killed in the Officer purges.

Here are the events which move some French leaders to Vichy and sleep duplicated ones (form ..\db\events\vichy_france.txt):

(May be these two events can be combined in one for country=VIC, but I’m not sure if sleepminister command will work for other country ministers (in this case for French ones).)

Code:
#############################################################
###FRENCH LEADERS DEFECTING TO VICHY - SLEPT IN FRENCH.CSV###
#############################################################

event = {
 	id = 2103
 	random = no
 	country = FRA

 	trigger = {
  		exists = VIC
  		exists = FRA
    		}

 	name = "VICHY_DEFECT_NAME"
 	desc = "VICHY_DEFECT_DESC"
 	style = 0 
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1999 }

	action_a = {
  		name = "OK" #French leaders to the Vichy Government

		command = { type = sleepminister which = 2001 } #Lebrun HOG
		command = { type = sleepminister which = 2103 } #Lebrun MOS
		command = { type = sleepminister which = 2207 } #Lebrun HOS
		command = { type = sleepminister which = 2007 } #Gamelin COS
		command = { type = sleepminister which = 2008 } #Gamelin COA
		command = { type = sleepminister which = 2009 } #Darlan CON
		command = { type = sleepminister which = 2033 } #Blum HOG
		command = { type = sleepminister which = 2051 } #Blum FM
		command = { type = sleepminister which = 2038 } #Reynaud HOG
		command = { type = sleepminister which = 2055 } #Reynaud FM
		command = { type = sleepminister which = 2040 } #Laval HOG
		command = { type = sleepminister which = 2057 } #Laval FM
		command = { type = sleepminister which = 2041 } #Marie HOG
		command = { type = sleepminister which = 2084 } #Marie FM
		command = { type = sleepminister which = 2113 } #Marie MOS
		command = { type = sleepminister which = 2133 } #Marie HOMI
		command = { type = sleepminister which = 2045 } #Cachin HOG
		command = { type = sleepminister which = 2062 } #Cachin FM
		command = { type = sleepminister which = 2154 } #Cachin COS
		command = { type = sleepminister which = 2069 } #Barthou MOA
		command = { type = sleepminister which = 2073 } #Dautry MOA
		command = { type = sleepminister which = 2074 } #Loucheur
		command = { type = sleepminister which = 2002 } #Sarraut HOG
		command = { type = sleepminister which = 2075 } #Sarraut MOA
		command = { type = sleepminister which = 2076 } #Hoden MOA
		command = { type = sleepminister which = 2079 } #Fabry MOA
		command = { type = sleepminister which = 2080 } #Avenol MOA
		command = { type = sleepminister which = 2081 } #Fayolle MOA
		command = { type = sleepminister which = 2098 } #Chardigny MOS
		command = { type = sleepminister which = 2160 } #Chardigny COA
		command = { type = sleepminister which = 2099 } #Luchaire MOS
		command = { type = sleepminister which = 2100 } #Tixier MOS
		command = { type = sleepminister which = 2101 } #H. Bonnet MOS
		command = { type = sleepminister which = 2105 } #Pene MOS
		command = { type = sleepminister which = 2106 } #Fontaine MOS
		command = { type = sleepminister which = 2107 } #Roy MOS
		command = { type = sleepminister which = 2006 } #Paganon HOMI
		command = { type = sleepminister which = 2110 } #Paganon MOS
		command = { type = sleepminister which = 2111 } #Clauzel MOS
		command = { type = sleepminister which = 2123 } #Salengro HOMI
		command = { type = sleepminister which = 2034 } #Gouin HOG
		command = { type = sleepminister which = 2124 } #Gouin HOMI
		command = { type = sleepminister which = 2003 } #Flandin FM
		command = { type = sleepminister which = 2128 } #Flandin HOMI
		command = { type = sleepminister which = 2112 } #Nicolau MOS
		command = { type = sleepminister which = 2131 } #Nicolau HOMI
		command = { type = sleepminister which = 2132 } #Brunschwig HOMI
		command = { type = sleepminister which = 2146 } #Weygand COS
		command = { type = sleepminister which = 2168 } #Weygand COA
		command = { type = sleepminister which = 2148 } #Gentillehomme COS
		command = { type = sleepminister which = 2206 } #A. Georges COA
		command = { type = trigger which = 2104}
   }
 }



event = {
 	id = 2104
 	random = no
 	country = VIC


 	name = "VICHY_DEFECT_NAME"
 	desc = "VICHY_DEFECT_DESC"
 	style = 0 
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1999 }

	action_a = {
  		name = "OK" #French leaders to the Vichy Government
        	command = { type = sleepleader which = 380000 } #Arnaud
          	command = { type = sleepleader which = 380001 } #Audet
            	command = { type = sleepleader which = 380004 } #Bridoux
            	command = { type = sleepleader which = 380005 } #Brocard
            	command = { type = sleepleader which = 380006 } #Carles
            	#command = { type = sleepleader which = 24029 } #Castroux
            	command = { type = sleepleader which = 380008 } #Colson
            	command = { type = sleepleader which = 380009 } #de Boissieu de Lugne
            	command = { type = sleepleader which = 380010 } #de Cyvoct
            	command = { type = sleepleader which = 380015 } #de Verdillac
            	command = { type = sleepleader which = 380012 } #Debeney
            	command = { type = sleepleader which = 380013 } #Dentz
            	command = { type = sleepleader which = 380014 } #Desmazes
            	command = { type = sleepleader which = 380016 } #Doumenc
            	command = { type = sleepleader which = 380017 } #Dubuisson
            	#command = { type = sleepleader which = 24070 } #Fagalde
            	command = { type = sleepleader which = 380019 } #Falvy
            	command = { type = sleepleader which = 380021 } #Francois
            	command = { type = sleepleader which = 380022 } #Huntziger
            	command = { type = sleepleader which = 380024 } #Keime
            	command = { type = sleepleader which = 380025 } #Laure
            	command = { type = sleepleader which = 380026 } #Lemonnier
            	command = { type = sleepleader which = 380027 } #Mer
            	command = { type = sleepleader which = 380028 } #Nogues
            	command = { type = sleepleader which = 380032 } #Weygand
            	command = { type = sleepleader which = 380033 } #Abrial
            	command = { type = sleepleader which = 380034 } #Darlan
            	command = { type = sleepleader which = 380036 } #de Geffrier
            	command = { type = sleepleader which = 380037 } #de Laborde
            	command = { type = sleepleader which = 380035 } #Decoux
            	command = { type = sleepleader which = 380038 } #Escudier
            	command = { type = sleepleader which = 380039 } #Esteva
            	command = { type = sleepleader which = 380040 } #Gensoul
            	command = { type = sleepleader which = 380041 } #Godfroy
            	command = { type = sleepleader which = 380043 } #Luc
            	command = { type = sleepleader which = 380044 } #Baltus
            	command = { type = sleepleader which = 380045 } #Bergeret
            	command = { type = sleepleader which = 380046 } #Bouscat
            	command = { type = sleepleader which = 380047 } #Clostermann
            	command = { type = sleepleader which = 380048 } #d'Arnaud de Vitrolles
            	command = { type = sleepleader which = 380049 } #Goys de Meyzerac
            	command = { type = sleepleader which = 380051 } #Jannekeyn
            	command = { type = sleepleader which = 380052 } #Jauneaud
            	command = { type = sleepleader which = 380053 } #Paskewicz
            	command = { type = sleepleader which = 380054 } #Pinsard
            	command = { type = sleepleader which = 380055 } #Rousselot de Saint-Ceran
            	command = { type = sleepleader which = 380056 } #Royer de Marancour
            	#command = { type = sleepleader which = 24082 } #Georges

		command = { type = add_corps which = "Arnaud" value = land when = 24004 where = 364 }
		command = { type = add_corps which = "Audet" value = land when = 24005 where = 364 }
		command = { type = add_corps which = "Bridoux" value = land when = 24020 where = 364 }
		command = { type = add_corps which = "Brocard" value = land when = 24022 where = 364 }
		command = { type = add_corps which = "Carles" value = land when = 24027 where = 364 }
		command = { type = add_corps which = "Catroux" value = land when = 24029 where = 364 }
		command = { type = add_corps which = "Colson" value = land when = 24034 where = 364 }
		command = { type = add_corps which = "de Boissieu de Lugne" value = land when = 24043 where = 364 }
		command = { type = add_corps which = "de Cyvoct" value = land when = 24046 where = 364 }
		command = { type = add_corps which = "de Verdillac" value = land when = 24054 where = 364 }
		command = { type = add_corps which = "Debeney" value = land when = 24056 where = 364 }
		command = { type = add_corps which = "Dentz" value = land when = 24059 where = 364 }
		command = { type = add_corps which = "Desmazes" value = land when = 24060 where = 364 }
		command = { type = add_corps which = "Doumenc" value = land when = 24062 where = 364 }
		command = { type = add_corps which = "Dubuisson" value = land when = 24065 where = 364 }
		command = { type = add_corps which = "Fagalde" value = land when = 24070 where = 364 }
		command = { type = add_corps which = "Falvy" value = land when = 24071 where = 364 }
		command = { type = add_corps which = "Francois H.N." value = land when = 24074 where = 364 }
		command = { type = add_corps which = "Huntziger" value = land when = 24095 where = 364 }
		command = { type = add_corps which = "Keime" value = land when = 24103 where = 364 }
		command = { type = add_corps which = "Laure" value = land when = 24115 where = 364 }
		command = { type = add_corps which = "Lemonnier" value = land when = 24117 where = 364 }
		command = { type = add_corps which = "Mer" value = land when = 24120 where = 364 }
		command = { type = add_corps which = "Nogues" value = land when = 24124 where = 364 }
		command = { type = add_corps which = "Weygand" value = land when = 24145 where = 364 }
		command = { type = add_corps which = "Abrial" value = naval when = 24146 where = 364 }
		command = { type = add_corps which = "Darlan" value = naval when = 24151 where = 364 }
		command = { type = add_corps which = "de Geffrier" value = naval when = 24153 where = 364 }
		command = { type = add_corps which = "de Laborde" value = naval when = 24154 where = 364 }
		command = { type = add_corps which = "Decoux" value = naval when = 24157 where = 364 }
		command = { type = add_corps which = "Escudier" value = naval when = 24158 where = 364 }
		command = { type = add_corps which = "Esteva" value = naval when = 24159 where = 364 }
		command = { type = add_corps which = "Gensoul" value = naval when = 24160 where = 364 }
		command = { type = add_corps which = "Godfroy" value = naval when = 24161 where = 364 }
		command = { type = add_corps which = "Luc" value = naval when = 24167 where = 364 }
		command = { type = add_corps which = "Baltus" value = air when = 24176 where = 364 }
		command = { type = add_corps which = "Bergeret" value = air when = 24178 where = 364 }
		command = { type = add_corps which = "Bouscat" value = air when = 24182 where = 364 }
		command = { type = add_corps which = "Clostermann" value = air when = 24183 where = 364 }
		command = { type = add_corps which = "d'Arnaud de Vitrolles" value = air when = 24186  where = 364 }
		command = { type = add_corps which = "Goys de Meyzerac" value = air when = 24188 where = 364 }
		command = { type = add_corps which = "Jannekeyn" value = air when = 24199 where = 364 }
		command = { type = add_corps which = "Jauneaud" value = air when = 24200 where = 364 }
		command = { type = add_corps which = "Paskewicz" value = air when = 24208 where = 364 }
		command = { type = add_corps which = "Pinsard" value = air when = 24209 where = 364 }
		command = { type = add_corps which = "Rousselot de Saint-Ceran" value = air when = 24213 where = 364 }
		command = { type = add_corps which = "Royer de Marancour" value = air when = 24215 where = 364 }
		command = { type = add_corps which = "Georges" value = land when = 24082 where = 364 }
   }
 }
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
I posted all new things I found/know about these two bugs here and here.
Let's hope that at least "No leaders" bug will be fixed at some point in the future.

Lately I didn't play HoI very much (waiting for a hot-fix :D) and have enough time to improve my workarounds for "No leaders" and wakeleader bugs. The files in my previous posts are no more up to date, so I'll upload new version of my fix. I decide to keep it CDCP compatible and even more - I'll call my fix Small Improvement Pack (SIP) for CDCP :D

The big change from CDCP is that I'll use add_corps commands to move leaders from one country to another and this way to preserve all new traits, experience and battle history they gained so far in game. To make this process as transparent as possible for the player I decided to add an off-map country where to store temporary leaders I want to save and activate later. This country has no name and flags and is well hidden in Africa, so it presence in-game will be nearly unnoticed by the player.

Current version of SIP (0.01) is compatible with Armageddon 1.2 and CDCP 0.52.

Features:

- Fixed Anschluss leaders for Germany
- Vlassov is now available for Germany after Molotov-Ribbentrop Pact
- Fixed missing leaders for CHI, CYN, CGX, CSX and CXB after puppeting from Japan. They preserve their new trait and experience.
- Move deflected French leaders to Vichy after the fall of France to preserve their experience and traits gained during the battles with Germany. Their duplicates from Vichy leaders file are deleted.

Download SIP_0.01_for_CDCP_0.52.rar (151 KB)


SIP 0.01a - quick fix - non critical
- sleepleader commands for all Anschluss leaders (to remove them from the game memory in case there is no Anschluss) in event 2020 option_b and in event 2100 option_b and option_c

Download SIP_0.01a_for_CDCP_0.52.rar (152 KB)


New version of SIP for CDCP is available for download!​


Version 0.02 of SIP is fully compatible with CDCP 0.53.
Changes in this version:

- NEW friendly towards Japan AI for CHI after release!!! Now Japan will recieve for free CHI's Blue Prints and can make good trade deals with its puppet. Also CHI will not garrison its borders with Japan, but with potential Japan enemies and will not send spies to Japan.
- Alexander von Falkenhausen and Claire Chennault tech teams are slept after release of CHI
- Chiang Kai-Shek (minister and tech team) is slept in event 3819.
- changed start years for CHI ministers 52088 and 52030 to 1936 so CHI to have CoS and HoG if was early puppeted by Japan
- added Khryukin and Chennault for CHI (they used broken wakeleader command)
- added Batov and Lukacz for Rep. Spain (they used broken wakeleader command)







Full change list inside the archive:

Download SIP_0.02_for_CDCP_0.53.rar (211 KB)
 
Last edited:

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
Last bump of this thread from me. :)

I found a way to resolve no leaders after release bug for all countries in all possible situations and will include it in SIP or in EIP mods, but before I do that I want to collect more opinions from the people who intend to use it. The solution is simple, but there are couple of ways to implement it, so please go to this thread , read about them and write your comments.

Thank you! :)