jeffery clark said:
...Also I suggested to Gormadoc and Martin BG that they write as concisely as possible what would be the best PI fix for the leaderless Nat China and Warlord China faction puppet"" bug. I wonder if a generalized (sleep and wake/activate leader?) fix woudn't be better/easier than cherry picking which leaders would and wouldn't fight for the japs. I also wonder if this may have something to do with "wake leader" bug (probably unrelated)?...
All we can do to help Paradox in fixing this (or any other) bug is to give them as detailed as possible description of the bug, so they can reproduce it. I even go further with presenting to them (at least I hope that they reach them) 2 possible theories for the cause of this bug and some possible solutions (since I have no look at the source code or game's "white paper" all I can do is to analyze that bug in all its nuances). The third thing I can do if they decide to fix it is beta-testing (if they need such help).
Back on topic and to my "theories". From my observations of this bug behaivior I'm nearly sure that the cause of it is that after annexing the leaders of annexed country are not removed from game memory, so they can not be assigned to the new country during standard release procedure (Add all_leaders for that country to it after release unless they are active at the moment but in other country; the game code didn't make difference between leader in a country and a leader just left in game memory). There are 2 solutions to this:
1)Remove all leaders of just annexed country from the game memory (this is very similar to what
Gormadoc do in his work-around by sleeping all leaders
before annexation). That way on release all leaders will be assigned to the new country with their basic parameters (get from leaders files).
2)Reassign leaders left in memory to the new(old) country after release. In this case all such leaders will preserve their new traits, expirience and battle history. This is very close to what I do in my work-around. I give them to other country before annexation and return them back to China after release. I also tried to skip first part of this, but when I give them all back directly from game memory the game CTD (no problem with up to 3 leaders).
The main disadvantage of our work-arounds is that we can apply them only over countries that are annexed and released with events.
About
wakeleader command. This command is lifeless since the release of HoI2. IMO there is some distant relation between this and "No leaders" bug, but there is no real workaround for it. There is no way for Wakeleader to work, because the leader to be waken is not in game/game memory, but in leaders files. The game reads this files only at new Scenario start and on countries release. I made some tests to see if wakeleader can be used to (re)activate a leader from game memory, but didn't succeed completely. If we run wakeleader command for leader not in memory the game will skip that command (or the whole event if this is its only command), but if I run it after annexation for a leader of just annexed country, then the command is executed and even I can see the leader's name in event window, but again he is not activated. I do not think that this bug will be ever fixed - it's to complicated and with very small impact on the game play.
But "No leaders after release" should be fixed by Paradox, because this bug is game breaking and there is no real work-around for it.