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

Soldat_Qball

Recruit
3 Badges
Jan 26, 2017
4
0
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Death or Dishonor
I am having an issue with editing the German leader file. When I make changes to the file and then start the game I end up with "Metz as the first general when listed in alphabetical order. Then in 1938 I get a leader with no name or picture. I only made minor changes to the file such as to general traits or ideal ranks. Can anyone help me figure out why this is happening and what the fix for it might be?

I am using AOD 1.09 with CORE 0.70.7.
 
Mmh. Two guesses:
  • Did you use a "pretty text" editor such as Wordpad, OpenOffice, Word, etc.? That can mess up the file format.
  • Did you accidentally delete a semicolon?
You could try to diff your file against the original to spot accidental changes. You could try to open your file in Notepad++ and select Encoding/Convert to ANSI to ensure it is properly encoded.
 
I used Microsoft Excel to make the changes to the file. I double checked and I did not delete any semicolons. I did notice that all of the leaders that are causing issues have "x" at the end of their line instead of just an x like all of the other leaders.
 
Mmh. Using Excel, you need to take care to, when you open the file, always select all cells in the import dialog (which, I assume looks similar to that of OpenOffice Calc; if not, I'll have to check at my day job on friday) and choose the format "Text" explicitely (auto detect will corrupt some values for arbitrary leaders). For cell separators, only semicolon should be selected.

... At this point, I fear the only thing you can do is to start over with the original file and reapply your changes; if Excel corrupted values, it might have happened anywhere in the file.

Of course, diffing with a text-only tool (TortoiseDiff, Notepad++ Compare, DiffUtils, ...) is still an alternative, but you might end up with dozens of unwanted changes you'd have to revert manually. If too many things were changed, the tool might not even be able to correctly align the file versions and then your work would silently introduce further errors as you fix them. So, I cannot recommend this approach at this point.

As general advice for the future, I'd only use Excel or OpenOffice Calc or similar spreadsheet programs to view a csv file, and to never save with them. Changes can then safely be applied from a raw text editor or coding tool, such as Notepad++, Visual Studio Code, nano, vim, emacs, etc.
 
Thank you for the replies. I had assumed that since the leader file was an Excel document that I could make changes to it in Excel. I will start over and get Notepad++ to make the changes. I have limited time experience with this sort of thing so it is always nice to learn the right way to do it in the future.