• 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.
Status
Not open for further replies.

unmerged(55803)

Second Lieutenant
Apr 13, 2006
134
0
I just DLed 1.2 for ARM a few days ago, and noticed that upgrading units do not have their upgrade percentages displayed in the the Statistics folder. This is a very important feature IMO, and needs a fix ASAP.

Also for 1.1, SSNs were not displayed under "nuclear subs" in the Stats folder, idk if this has been fixed in 1.2.

Anyone have thoughts on this?
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
After some quite hard testing on "No leaders after release" bug I will try to describe it as good as possible with my poor English (this would be funny if wasn’t sadly...for me :wacko: ) and to make some suggestions of its cause and possible fixes.

Known facts:
1. After annexation, save-reload, release the country gets all leaders even dormant for that scenario.
2. After annexation-release in same game session the country gets only the leaders which were inactive (KIA, dormant, slept by events in previous or in current game session, manually deleted from save-game file) at the moment of annexation.
3. After annexation the leaders are still left in used by the game memory. Easy to check:
- create an event with some sleepleader commands, which to sleep leaders of country to be annexed
- annex the country
- run that event – in the list of actions you can see which leaders would be slept (their names). If they are not in memory, this event wouldn’t start at all.
4.The game reads all leaders for that country from \Leaders folder (they can be in different .CSV files) and compares them with the list of currently active in-game to find-out which one to activate. This is probably left from non-working feature proposed to not revive already inactive leaders (very good idea, ruined by this bug). Sadly the game logic here is broken and only currently inactive leaders are revived.

Let’s put these facts together and think about used by the game logic:

Theory 1:
This active_leaders list is created for every active country at scenario start from files in \Leaders folder (all of them are parsed and leaders are found by their country ID - CHI, GER, USA...). Dormant leaders and leaders of non-existent (yet) countries are skipped/deleted by this process. Rest leaders are used in current game and are stored in save-game file. On game re-load ONLY the leaders stored in save-game file are used. When a new country is released the game compares ALL leaders for that new country (read from \Leaders folder at every HoI start or just game load - not sure yet) with currently active list (if any) and decides which one to be used. Then the game reads all default values (name. skill, traits etc) for every to be activated leader from the files in \Leaders folder and put him back in game.

The problem is somewhere in the comparison code.

It should look like this for releasing a country after annexation in current game session:
Code:
For All_leaders DO
  	IF leader_xx IS in (active_leaders list)
        Then use_leader_xx
But in this case if we release a NEW country (not recently annexed), active_leaders list will be empty (this list is populated ONLY from leaders stored in save-game file or at scenario start!) and there will be no leaders for that country. May be because of that proto-bug they put a NOT operand and changed the code to this:
Code:
For All_leaders DO
  	IF leader_xx IS NOT in (active_leaders list)
        Then use_leader_xx
This solves the problem if we release a new (for current game session) country, but brings us the well known bug - "No leaders after release".

There are at least 4 solutions to this:

1. Destroy (delete from memory) all leaders of just annexed country - in this case on release we will receive all leaders for that country from files in \Leaders folder. This is OK for game play and may be not so hard to do.

2. Skip comparasion part of the code and just activate all leaders:
Code:
For All_leaders DO use_leader_xx
3. Fix the code - remove that non-sense "NOT" operand and add a condition check is the active_leaders list for country to be released empty. Something like this:
Code:
For All_leaders DO
	IF (active_leaders list) NOT EMPTY
		THEN 
			IF leader_xx IS in (active_leaders list)
			THEN use_leader_xx
			END_IF
		ELSE
			use_leader_xx	
	END_IF

As a bonus another check for dormant leaders can be added in case of no active_leaders list:
Code:
For All_leaders DO
	IF (active_leaders list) NOT EMPTY
		THEN 
			IF leader_xx IS in (active_leaders list)
			THEN use_leader_xx
			END_IF	
		ELSE
			IF leader_xx IS NOT in (dormant_leaders list)
			THEN use_leader_xx
			END_IF
	END_IF

4. Ultimate solution (just a dream). :p At scenario start create a list of all dormant leaders (even for not yet exist countries) and store it in save-game. Expand this list with all KIA and slept leaders during game play. On country release/creation use game logic like this:
Code:
For All_leaders DO
	IF leader_xx IS NOT in ([B]inactive_leaders[/B] list)
		THEN use_leader_xx
	END_IF

***********************​

This may be look quite simple in my supposed solutions (if I am right about the cause of the bug at first place) but the game code is very complex and bug like this is very hard to find and fix. That’s why I post here all my observations + some thoughts, to give PI Developers just another idea where to look for that bug if they decide to fix it.

For final I'll post another way I found during my tests to have (more) leaders on annex-release in the same game session:

1. Create a new leader file (a.csv) with only one CHI leader (ID 49999):
Code:
Name;ID;Country;Rank 3 Year;Rank 2 Year;Rank 1 Year;Rank 0 Year;Ideal Rank;Max Skill;Traits;Skill;Experience;Loyalty;Type;Picture;Start Year;End Year;x
TEST;49999;CHI;1930;1939;1941;1990;1;6;16;2;0;3;0;L50000;1930;1960;x
Don’t forget to add an empty line at the end of this file. Save this file to your Desktop.

2. Start HoI2
3. Start a new 1936 GC as Japan
4. Pause at start
5. Save the game
6. Go to Windows Explorer and copy our new file (a.csv) to Leaders\
7. Exit to HoI main menu (do not exit from the game) and reload that save-game as Japan
8. Open console (<F12>)
9. Type in “ event 3815 ”
10. Select option_a (Puppet China)
11. Save the game again
12. Exit to main menu and load that last save as Nat. China
13. Check Chinese leaders – nearly all of them are active. The 2 dormant aren’t.

EDIT:
Theory 2:
My first theory has one big weakness - I assume that there is a check which leaders to activate, based on their availabillity in the current game. Even if this was true for the first versions of HoI2 they for sure removed this feature when this bug was found (may be even during internal beta-testing before release of HoI2) to make the code more simple and easy for traking-down the bug.

When a country is annexed its leaders remain in game memory -may be in the list of all avilable leaders. I do not know are they changed at all during annexation (like a setting of a not_active_leader flag or delete of contry ID - CHI, GER, ITA...). What I know for sure is that after annexation they are still in memory and can be added to another country with add_corps command within the current game session.
I can sleep them too, but in this case slept leaders wouldn't be revived on release (if I sleep them before annexation they will be available after release), so there is difference in their record in game memory or sleepleader command gives strange results when sleeping a leader from inexistent country.
If we save the game after annexation all leaders of annexed country will be lost, because leaders are saved separately for every active country.

Let's sumarize these facts again:
1. On annexation leaders are not deleted from game memory, but there is some change in their record in that list (may be removed country identity?)
2. Leaders can be moved from one country to another (with add_corps command) and they are not deleted when their country of orgin ceases to exist.

So is it possible to activate a leader for the just released country if he is still in game memory? I don't think so. There is a check by leaders ID for every leader if this leader is currently in game and if he is, the code skips him. May be there is no check at all but anyway the game code skips active leaders. This is OK - we already have them, but why they are not available to us? I guess because their country ID is deleted from their record during annexation or because of a flag (do not use this leader) which isn't cleared on country recreation, so the game "didn't know" that these leaders belong to this new country.

Possible solutions:
1. Change flags (if any) so these leaders to be assigned to the "new" country after release. In this case they will keep all new traits, expirience and may be battle history gained so far in-game! :cool:
2. Clear all leaders assigned to annexed country after annexation from game memory - this will work as the proposed by Gormadoc work-around, but for every country and in every situation.
 
Last edited:

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
I can confirm that Chinese leaders sleept just before anneksation will be available after release of China as a Japanese puppet in China's surrender event chain.
MartinBG said:
4. Ultimate solution (just a dream). :p At scenario start create a list of all dormant leaders (even for not yet exist countries) and store it in save-game. Expand this list with all KIA and slept leaders during game play. On country release/creation use game logic like this:
Code:
For All_leaders DO
	IF leader_xx IS NOT in ([B]inactive_leaders[/B] list)
		THEN use_leader_xx
	END_IF
I not sure i understand this correctly. If it creates a inactive list of all dormant leaders including not yet existing countries leaders. Then when checking for leaders for a new released country would that not get no leaders since they are in the inactive list and it will only use leaders which are not on that list?
 

Primeagle

Second Lieutenant
10 Badges
Feb 3, 2006
171
0
  • Crusader Kings II
  • Europa Universalis IV
  • Pillars of Eternity
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
xtfoster said:
That's because you can't Leave an Alliance and declare war on it in the same event, Just like you can't end a war with an Alliance and join it during the same event.

So how do we fix this? Should there be an other event triggering after one week or something? By the way, is UK suppose to get those +10 dissent with the Iraqi coup event.
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
Gormadoc said:
I can confirm that Chinese leaders sleept just before anneksation will be available after release of China as a Japanese puppet in China's surrender event chain. I not sure i understand this correctly. If it creates a inactive list of all dormant leaders including not yet existing countries leaders. Then when checking for leaders for a new released country would that not get no leaders since they are in the inactive list and it will only use leaders which are not on that list?

You miss the "NOT" operand:

IF leader_xx IS NOT in (inactive_leaders list) THEN use_leader_xx

In this list would be added only dormant, KIA and slept leaders and not every ledares that are not active in the game just becouse their contry is not active (yet).


I have yet another theory why active leaders are not revived after annexation. It is a way simple then my previous and something tells me :rofl: that the case for the bug is not wrong game logic. I'll add it later today in my post.
 

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
MartinBG said:
You miss the "NOT" operand:

IF leader_xx IS NOT in (inactive_leaders list) THEN use_leader_xx

In this list would be added only dormant, KIA and slept leaders and not every ledares that are not active in the game just becouse their contry is not active (yet).
Iam convinced you edited that NOT in after my post above. ;) I would never miss a NOT operand...never. He he. :)


sorry my bad
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
Gormadoc said:
Iam convinced you edited that NOT in after my post above. ;) I would never miss a NOT operand...never. He he. :)


sorry my bad

hehe :)

Just added my second theory about the orgins of the bug.


May I suggest an improvement to your proposed workaround with sleepleader commands? :rolleyes:

Skip all sleepleader commands, because you'll lost gained so far skills and expirience. After annexation and release use add_corps commands to add all old leaders (they are still in game memory) back to the newly created country ;)
 

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
MartinBG said:
May I suggest an improvement to your proposed workaround with sleepleader commands? :rolleyes:
You may ;)

MartinBG said:
Skip all sleepleader commands, because you'll lost gained so far skills and expirience. After annexation and release use add_corps commands to add all old leaders (they are still in game memory) back to the newly created country ;)
Sounds promising, I think we should exclude some of the best Chinese leaders & very anti Japanese leaders then. We can assume the Japs either got rid of those, (diplomatic version of shooting them) to make sure they never bothered them again or that they simply refuse to work for the Japanese.
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
Gormadoc said:
Sounds promising, I think we should exclude some of the best Chinese leaders & very anti Japanese leaders then. We can assume the Japs either got rid of those, (diplomatic version of shooting them) to make sure they never bothered them again or that they simply refuse to work for the Japanese.

Yes. Better to sleep them after release (may be in the same event as add_corps commands?) because all previously slept, KIA and dormant leaders will reapear in this new country leaders roster.
 

Araanor

Myrran
44 Badges
May 2, 2002
1.332
3
  • Hearts of Iron IV: Death or Dishonor
  • Pillars of Eternity
  • Magicka 2
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV
  • 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
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Europa Universalis III
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
I think I've found a new bug.

Escort fighter wings - they have their own range that is supposed to inhibit the range of the squadrons they are attached to, right? Well, now in ARM 1.2 I don't see it happening. I have NAVs with 800 in range. The Esc fighters have 400. When I attach them to a NAV, they retain their 800 range, both in display and by the distance they can perform missions.

Last time I played HOI2 was back in DD 1.1 or 1.2. I remember the range being restricted properly back then. I'm now asking myself if I should make use of this (by getting Escs for all bombers) or if it would be too exploitative. The AI would make use of the extra range, but it wouldn't make more Escs...
 

blue emu

GroFAZ
Moderator
8 Badges
Mar 13, 2004
17.503
19.645
  • Crusader Kings II
  • Europa Universalis III
  • Hearts of Iron III
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis: Rome
  • 500k Club
  • Hearts of Iron II: Beta
The Escort Fighter range-cap was removed quite a while ago, because it wasn't working properly when the host Bombers got upgraded.
 

blue emu

GroFAZ
Moderator
8 Badges
Mar 13, 2004
17.503
19.645
  • Crusader Kings II
  • Europa Universalis III
  • Hearts of Iron III
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis: Rome
  • 500k Club
  • Hearts of Iron II: Beta
Araanor said:
Oh. Then there's no point in not having Escs at all, is it? Maybe some other malus should be given...
They cost Manpower, IC-days, Oil and Supplies... so they're not exactly free.

But yes... I put escorts on every Aircraft that will take them. CAS and Air Transports won't.
 

unmerged(55803)

Second Lieutenant
Apr 13, 2006
134
0
redrabbit2009 said:
I just DLed 1.2 for ARM a few days ago, and noticed that upgrading units do not have their upgrade percentages displayed in the the Statistics folder. This is a very important feature IMO, and needs a fix ASAP.

Also for 1.1, SSNs were not displayed under "nuclear subs" in the Stats folder, idk if this has been fixed in 1.2.

Anyone have thoughts on this?
bump for this
 

MartinBG

Darkest Hour Developer
2 Badges
Nov 16, 2007
5.634
257
  • Hearts of Iron II: Beta
  • Hearts of Iron IV Sign-up
redrabbit2009 said:
I just DLed 1.2 for ARM a few days ago, and noticed that upgrading units do not have their upgrade percentages displayed in the the Statistics folder. This is a very important feature IMO, and needs a fix ASAP.

Also for 1.1, SSNs were not displayed under "nuclear subs" in the Stats folder, idk if this has been fixed in 1.2.

1st bug is already in "cumulative bug list" under number 4:

4) division upgrade completion percents are not displayed in statistics subfolders (only brigades)-worked in 1.1 (CAN ONLY BE FIXED BY PI)

Unit type "Nuclear_submarine" is not used because of some old bug (AFAIK this type is recognized by the game as capital ship). Submarine level 6 is designated as Nuclear submarine so these submarines are displayed under Submarines in the "Status folder".
 

unmerged(55803)

Second Lieutenant
Apr 13, 2006
134
0
MartinBG said:
1st bug is already in "cumulative bug list" under number 4:



Unit type "Nuclear_submarine" is not used because of some old bug (AFAIK this type is recognized by the game as capital ship). Submarine level 6 is designated as Nuclear submarine so these submarines are displayed under Submarines in the "Status folder".
Can either of these be fixed?
 

Spruce

Straight Templar Monk
41 Badges
Jul 30, 2001
7.182
8
Visit site
  • Tyranny: Archon Edition
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Victoria 2: A House Divided
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Prison Architect
  • Crusader Kings III
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Arsenal of Democracy
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
concerning all the money I payed for this game I would have figured that this list would be a thing of the past.

Fix the game Paradox - we payed already enough money for it !

This is getting ridiculous ! I consider my diplomacy game also a waste of money the moment you guys stopped to support it.

What's wrong with you guys :confused:
 

blue emu

GroFAZ
Moderator
8 Badges
Mar 13, 2004
17.503
19.645
  • Crusader Kings II
  • Europa Universalis III
  • Hearts of Iron III
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis: Rome
  • 500k Club
  • Hearts of Iron II: Beta
redrabbit2009 said:
Can either of these be fixed?
The Nuclear Sub thing is not a bug... they just left the old data file in the folder. It isn't used by the game, since Nuclear Subs are now a model of Submarine rather than a seperate class.
 
Status
Not open for further replies.