Hearts of Iron IV Common Issues and Crashes

From Paradox Modding Cooperation
Jump to: navigation, search

Most Frequent Mistakes

  • Check that you have the same amount of opening brackets as close brackets. In a large file, simply Ctrl+F find both '{' and '}' and compare the results.
  • Make sure that your file's encoding matches that of the vanilla files. As a rule of thumb, .txt uses UTF-8 and .yml uses UTF-8 with BOM.
  • Misspelled code. (Use a HoI4 code plugin to detect misspellings; different versions available for Notepad++, Sublime, Atom and Visual Studio)
  • Wrong file location or code in the wrong file. Check and compare to vanilla that you are not coding in a file that does not load as you intend it to.

Common Syntax Errors

  • add_idea instead of add_ideas
  • swap_idea instead of swap_ideas
  • swap_ideas not having both a remove_idea and a add_idea.
  • Misspelled Variable names.

National Focus

  • Every National Focus requires a matching graphics definition for it's shine. The shine is used when the focus becomes available. When a national focus icon that lacks a shine becomes available, the familiar "Unknown Focus" icon is used.

Events

National Ideas

Game Crashes

There are a numerous amount of reasons for the game crashing. We will divide these types into 3 categories:

  • Crashes on launching the game (so before getting into the main menu) 
  • Crashes on loading a scenario/starting the game 
  • Crashes at seemingly random moments during the game.

Crashes on launching the game

  1. If you have worked on the province map, you might have saved it in a wrong format or with the wrong color settings.
  2. Having a gap in the ID's of states (so say 822 to 824)
  3. Having a state assigned to multiple supply zones

Crashes on loading a scenario/starting the game

  1. Having too much occupied territory set through history/states
  2. Having countries that are at war with eachother have OOB's that are in enemy territory
  3. Gaps in OOB division templates

Crashes at seemingly random moments during the game

  1. Crashes when declaring war on a certain nation. This can happen if you worked on the province map. You may have to regenerate the buildings. This usually has to do with Ports being in wrong places.
  2. Events that load OOB's can crash if they have gaps in the division templates.
  3. Having ships with unspecified/wrong class can crash the game when you hover over them.