Development Diary #27 - New and Improved Logs

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

^_AC_^

Field Marshal
86 Badges
Feb 24, 2009
5.721
349
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Victoria 2: Heart of Darkness
  • War of the Roses
  • Hearts of Iron IV Sign-up
  • Europa Universalis III Complete
  • The Showdown Effect
  • Warlock 2: The Exiled
  • Crusader Kings II: Conclave
  • 500k Club
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Imperator: Rome
  • Europa Universalis IV: Common Sense
  • Stellaris: Ancient Relics
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Stellaris Sign-up
  • Stellaris: Megacorp
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury




Hi everyone, it's good to be back. :)
This Development Diary is mostly dedicated to modders, as we want to explain some of changes that we made in patch 1.02 with regards to the Logging system.
The Improved Logs are an important part of Darkest Hour, as they make it easier for developers to find their mistakes and solve them (and therefore make good, working mods for the community). In patch 1.02, we expanded our logs even further with two objectives in mind:
1) expanding the already existing checks commands and trigger covered by the report: in the past, many commands and trigger were not properly checked and so invalid commands and triggers were simply discarded when executed. This will be very helpful for modders as now the'll be able to find the errors and correct them, making their events do what they always wanted them to do. To be clear: we didn't change how command and trigger works, if with patch 1.02 a trigger or a command is reported as invalid, then it was already invalid even before! Now we're simply showing you which triggers and commands were already invalid so that you can fix them! :)
2) give more informations about new features like for the maximum number of brigades and customizable upgrade paths or whole new areas like the reports on translations.

To make things easiers for modders, I'll recapitulate here what is reported for each debug level (higher levels obviously contain the reports of the lower levels). For those who still don't know it, the debug level is a parameter in file setting.cfg, which allows you to choose the level of the reports written in the file savedebug.txt:
Code:
0 # Extra debug logs (savedebug.txt): 0 = disabled, 1 = enabled, 2 = enabled + extra map statistics
Level 0 is the default level used by the players: not a lot written at this stage, so gameplay won't be affected in any way.
Level 1 on the other hand will write a comprehensive list of information, but not many regarding the map. A decrease in performance can be noticed, so you should use this setting only to found problems or check for possible mistakes.
Level 2 of the logs contains all the information of level 1 plus a lot more regarding the map and related to it, for example a report on the resources available to each country.

At level 0, you'll get the following informations:
Code:
Reading unit model files...{
infantry ('db\units\divisions\infantry.txt'): (max brigades set to 2) 18 model(s) loaded (0 to 17).
tactical_bomber ('db\units\divisions\tactical_bomber.txt'): 13 model(s) loaded (0 to 12).
submarine ('db\units\divisions\submarine.txt'): (max brigades set to 2) 13 model(s) loaded (0 to 12).
...
}
Reading brigade model files...{
artillery ('db\units\brigades\artillery.txt'): 14 model(s) loaded (0 to 13).
...
}
Loading minister personalities...
The generic minister personality is loaded and set.
Loading minister personalities DONE. 106 personalities loaded.
Calculating minister personality values...{
'Biased Intellectual' (ID 1): 42 
'Ideological Crusader' (ID 2): 61 
...
}
Reading distances from map\map_1\airdist.tbl... Done! (2769 provinces read in 20 ms)
Reading map\map_1\navaldist2.tbl... Done! (1489 naval provinces, Read distances = 2217121)
Scenario Validation (provinces)...Done. No errors found.
As you can see, this is very generic, there are only a few important information about units and brigades and the list of loaded minister personalities.



At debug level 1, you'll get the following informations:

Code:
UPGRADE PATHS
infantry (18 models)
	Can be upgraded to cavalry (0.6500 Cost, 0.9000 Time)
	Can be upgraded to motorized (1.7200 Cost, 0.6500 Time)
	Can be upgraded to mechanized (1.5700 Cost, 1.0000 Time)
	Can be upgraded to paratrooper (1.9700 Cost, 0.6200 Time)
	Can be upgraded to marine (1.8500 Cost, 0.6200 Time)
	Can be upgraded to bergsjaeger (1.2900 Cost, 0.6200 Time)
	Can be upgraded to garrison (0.4800 Cost, 0.4000 Time)
	infantry-0 upgrades to infantry-1
	infantry-1 upgrades to infantry-2
	infantry-2 upgrades to infantry-3
	infantry-3 upgrades to infantry-4
	infantry-4 upgrades to infantry-5
	infantry-5 upgrades to infantry-6
	infantry-6 upgrades to infantry-7
	infantry-7 upgrades to infantry-8
	infantry-8 upgrades to infantry-9
	infantry-9 upgrades to infantry-10
	infantry-10 upgrades to infantry-11
	infantry-11 upgrades to infantry-12
	infantry-12 upgrades to infantry-13
	infantry-13 upgrades to infantry-14
	infantry-14 upgrades to infantry-15
	infantry-15 upgrades to infantry-16
	infantry-16 upgrades to infantry-17
	infantry-17 does not upgrade
artillery (14 models)
	artillery-0 upgrades to artillery-1
	artillery-1 upgrades to artillery-2
	artillery-2 upgrades to artillery-3
	artillery-3 upgrades to artillery-4
	artillery-4 upgrades to artillery-5
	artillery-5 upgrades to artillery-6
	artillery-6 upgrades to artillery-7
	artillery-7 upgrades to artillery-8
	artillery-8 upgrades to artillery-9
	artillery-9 upgrades to artillery-10
	artillery-10 upgrades to artillery-11
	artillery-11 upgrades to artillery-12
	artillery-12 upgrades to artillery-13
	artillery-13 does not upgrade

Loading Ministers (Mods\Darkest Hour Full\db\ministers.txt)
{
Mods\Darkest Hour Full\db\ministers\ministers_afg.csv
...
}
Loading Leaders (Mods\Darkest Hour Full\db\leaders.txt)
{
Mods\Darkest Hour Full\db\leaders\afghanistan.csv
...
}
Loading Tech Teams (Mods\Darkest Hour Full\db\teams.txt)
{
Mods\Darkest Hour Full\db\tech\teams\teams_afg.csv
...
}
AI File Load [ Afghanistan ] -> [ Mods\Darkest Hour Full/ai\AFG_1936.ai ]
AI File Load [ Albania ] -> [ Mods\Darkest Hour Full/ai\ALB_1936.ai ]
...

	
Parse events file: Mods\Darkest Hour Full\db\events\AI\AI_GER.txt...{
Loading event #3003001...
Loading event #3003002...
...
}
**** Cleaning Events Queue ****{
	Queue = 0 event(s)
	Heap  = 11562 event(s)

	Valid Events = 4813

	Queue = 0 event(s)
	Heap  = 4813 event(s)
**** Cleaning Events Queue END ****
}

{Used MP
Country;Dep. Land;Dep. Navy;Dep. Air;Dep. Total;Prod. Land;Prod. Navy;Prod Air;Prod. Total;MP Assigned Total;MP Pool;MP Total;
United Kingdom;173.38;100.85;3.88;278.10;0.00;11.55;0.00;11.55;289.65;20.00;309.65;
France;646.80;33.05;12.60;692.45;0.00;5.30;0.00;5.30;697.75;28.00;725.75;
Germany;355.45;12.70;19.15;387.30;195.00;7.90;0.00;202.90;590.20;124.50;714.70;
...
}
{Mobilization Slider and Flags
Country;TAG;Slider;Flags
United Kingdom;ENG;2;MOB1 MOB2 ;
France;FRA;5;MOB1 MOB2 MOB3 MOB4 MOB5 ;
Germany;GER;4;MOB1 MOB2 MOB3 MOB4 ;
...}	
{Setting up Abyssinia
Setting Capital Abyssinia
Goverment Abyssinia
Military Scores - Total(Army/Air/Naval): 92.80(90.47/2.33/0.00) , Total IC: 4.00, Ratio = 23.27
units done
Setting up Abyssinia DONE
}
We'ved added a detailed report of the possibile upgrade paths, because, as you well know, they are now customizable. :)
After that, as in the past, the ministers, leaders and tech teams of each nations is checked for potential problems. A new report on the loaded AI file follows them. This is useful to get a clear idea of which AI file is loaded on scenario start. The parsing of event files follows, with the new and improved checks on syntax, triggers and commands.
After that there is a report on the manpower used by every department of every nation and the new report for mobilization. Since our mobilization system has a complex system of flags that are used to grant or reduce manpower when you mobilize or demobilize, this report is very useful for the mods that use our mobilization system to check if the flags are set correctly as scenario start.
Lastly, as in the past, there is a summary of each nation with its IC and military score.



At the higher debug level, that is level 2, you'll get the following informations:
Code:
{Strings format check for all languages
	ERROR : Language (4) got a String mismatch at tag THEYCOUPUSF_4 (190 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag THEYCOUPUSF_4 (190 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag THEYCOUPUSF_6 (192 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag THEYCOUPUSF_6 (192 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag TECHFINISHED_2 (309 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag TECHFINISHED_2 (309 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag TECHFINISHED_5 (312 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag TECHFINISHED_5 (312 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag DECLWAROTHER_3 (904 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag DECLWAROTHER_3 (904 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag NBWINOTHER_2 (1461 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag NBWINOTHER_2 (1461 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag NBWINOTHER_3 (1462 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag NBWINOTHER_3 (1462 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag PSINVALID_2 (2564 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag PSINVALID_2 (2564 - config\messages.csv)
	ERROR : Language (4) got a String mismatch at tag PSINVALID_3 (2565 - config\messages.csv)
	ERROR : Language (4) has mismatch in entries compatred to English at tag PSINVALID_3 (2565 - config\messages.csv)
} [18] Possible errors found.
This is a new report that helped us found possible problems in translations. However, it's not a perfect tool, because it can give some false positive reports, as it is not easy to find if there are problem with translations in different languages.
So, don't get desperate if you find some errors and take your time to analyze them (which is not always easy, trust me). :)

After that, there are the long and esternsive reports about the map. They start with a report on adjacent provinces, followed by the list of provinces by continents, regions and areas. A list of active country (with their capitals) follows and after that two reports on resources. The first one shows the resources available in each province and the second the resources available for each country; both reports can be copy-pasted as .csv file so that they can be better viewed using programs like Excel or Open Office.
Code:
####### ADJACENT PROVINCES REPORT #######
{
	#0 ((Embarked)) - 0:
	#1 (Reykjavik) - 2:
		;3;Akureyri
		;2664;The Westman Islands
	#2 (Torshavn) - 1:
		;2676;Faroe Islands
	#3 (Akureyri) - 3:
		;1;Reykjavik
		;2664;The Westman Islands
		;2665;Grimsey Island
	...
}
####### ADJACENT PROVINCES REPORT END #######
####### LIST PROVINCES BY CONTINENTS #######
{
	#- (0) - 610:
		;0;(Embarked)
		;290;Store Belt
		;397;Sea of Marmara
		;508;Lake Erie
		;509;Lake Michigan
	...
}
####### LIST PROVINCES BY CONTINENTS END #######
####### LIST PROVINCES BY REGIONS #######
{
	#Afghanistan (1) - 6:
		;2168;Kondoz
		;2169;Kandahar
	...
}
####### LIST PROVINCES BY REGIONS END #######
####### LIST PROVINCES BY AREAS #######
{
	#Adelaide (1) - 3:
		;1711;Port Lincoln
		;1712;Adelaide
		;1713;Robe
	...
}
####### LIST PROVINCES BY AREAS END #######
####### Active countries and capitals #######
{
	United Kingdom - London (#29)
	France - Paris (#55)
	Germany - Berlin (#163)
}
####### Active countries and capitals END #######

####### WORLD RESOURCES #######
{
	Copy and paste to a new file and change its extension to CSV. Open in Excel and sort by columns.
	;ID;Name;Area;Region;Continent;Controler;Owner;IC;MP;Oil;Metal;Energy;Rares;Infra;AirF;Port;LF;CF;AA;Radar;Rocket;Nuclear;
	;1;Reykjavik;Iceland;Iceland;Europe;Denmark;Denmark;0.00;0;0.00;0.00;0.00;0.00;0.40;4.00;4.00;0.0;0.0;1.0;0.0;0.0;0.0;
	;2;Torshavn;Iceland;Iceland;Europe;Denmark;Denmark;0.00;0;0.00;0.00;0.00;0.00;0.20;0.00;0.00;0.0;0.0;0.0;0.0;0.0;0.0;
...
}
####### WORLD RESOURCES END #######
####### COUNTRY RESOURCES #######
{
	Copy and paste to a new file and change its extension to CSV. Open in Excel and sort by columns.
	Name;Provinces;IC;MP;Rares;Metal;Energy;Oil;AirF;Port;LF;CF;AA;Radar;Rocket;Nuclear;
	United Kingdom;171;134.00;126;267.00;251.00;1277.00;15.00;156.00;156.00;6.0;12.0;75.0;0.0;0.0;0.0;
	France;181;124.00;89;73.00;512.00;251.00;2.00;109.00;82.00;43.0;0.0;56.0;0.0;0.0;0.0;
	Germany;59;150.00;67;37.00;100.00;1061.00;2.00;74.00;50.00;7.0;0.0;31.0;0.0;0.0;0.0;
####### COUNTRY RESOURCES END #######

After this, a more detailed analysis of the map follows, with many information. The first part analyzes various coordinates and reports possible problems (ufortunately with many false positives, especially for small provinces). After those, there is list of provinces by number of connections and a list of land provinces with 6 to 8 connections (to check the Holy Rule, as we stated back in Dev Diary 2!). After that there are some reports on Distances to Neighbouring Provinces, divided by distance
Code:
####### MAP AND PROVINCES ANALYZING #######
{
Sea Zone Validation (ERRORS)
{ }
Provinces with beach, bit without a sea zone (ERRORS)
{ }
Wrong City position coordinates (ERRORS)
{ }
Wrong AA position coordinates (ERRORS)
{ }
Wrong Fort position coordinates (ERRORS)
{ }
Possible Wrong Port position coordinates (WARNINGS)
{ }
Possible Wrong Beach position coordinates (WARNINGS)
{ }
Wrong Army (Sprite) position coordinates (ERRORS)
{ }
Wrong Counter position coordinates (ERRORS)
{ }
Sea Zone distances check (INFORMATION)
{ }
Coastal provinces without Sea zone (INFORMATION)
{ }
Provinces without any connections (WARNING)
{ }
Provinces with 1 connection (INFORMATION)
{
	#2 (Torshavn)
}
Provinces with 2 connections (INFORMATION)
{
	#1 (Reykjavik)
}
Provinces with 3 connections (INFORMATION)
{
	#3 (Akureyri)
}
Provinces with 4 connections (INFORMATION)
{
	#11 (Glasgow)
}
Provinces with 5 connections (INFORMATION)
{
	#7 (Aberdeen)
}
Provinces with 6 connections (INFORMATION)
{
	#6 (Inverness)
}
Provinces with 7 connections (INFORMATION)
{
	#8 (Fort William)
}
Provinces with 8 connections (INFORMATION)
{
	#160 (Frankfurt/Oder)
}
Provinces with more then 8 connections (INFORMATION)
{
	#240 (Tarnopol) - 9
}
Land provinces with 6 to 8 connections (WARNING)
{
	#6 (Inverness) - 6
}
Distances to neighbouring provinces: NAVAL ONLY < 100km (INFORMATION)
{ }
Distances to neighbouring provinces: NAVAL ONLY from 100km to 500km (INFORMATION)
{ }
Distances to neighbouring provinces: NAVAL ONLY from 500km to 1000km (INFORMATION)
{ }
Distances to neighbouring provinces: NAVAL ONLY from 1000km to 2000km (INFORMATION)
{ }
Distances to neighbouring provinces: NAVAL ONLY from 2000km to 3000km (INFORMATION)
{ }
Distances to neighbouring provinces: NAVAL ONLY from 3000km to 5000km (INFORMATION)
{ }
Distances to neighbouring provinces: NAVAL ONLY > 5000km (INFORMATION)
{ }
Distances to neighbouring provinces: LAND ONLY < 100km (INFORMATION)
{ }
Distances to neighbouring provinces: LAND ONLY 100km to 300km (INFORMATION)
{ }
Distances to neighbouring provinces: LAND ONLY 300km to 500km (INFORMATION)
{ }
Distances to neighbouring provinces: LAND ONLY 500km to 800km (INFORMATION)
{ }
Distances to neighbouring provinces: LAND ONLY 800km to 1000km (INFORMATION)
{ }
Distances to neighbouring provinces: LAND ONLY > 1000km (WARNING)
{ }
Distances to neighbouring provinces: ANY < 10km (WARNING)
{ }
Distances to neighbouring provinces: ANY 10km to 50km (WARNING)
{ }
Distances to neighbouring provinces: ANY 50km to 100km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 100km to 300km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 300km to 500km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 500km to 800km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 800km to 1000km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 1000km to 1500km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 1500km to 2500km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY 2500km to 4000km (INFORMATION)
{ }
Distances to neighbouring provinces: ANY > 4000km (INFORMATION)
{ }
Distances to all neighbouring provinces (INFORMATION)
{
	#1 (Reykjavik) - 2:
		252 km - #3 (Akureyri)
		46 km - #2664 (The Westman Islands)
	#2 (Torshavn) - 1:
		114 km - #2676 (Faroe Islands)
	...
}

This is not over yet, there is even Provinces Climate Analyzing report, that checks and suggest climates for each province! This is followed by a detailed list of provinces with coasts, with beaches, with ports and with air bases, finally ending the analysis of the map.
Code:
Provinces climate analyzing (INFORMATION)
{
	Land Provinces:
	{
		#3 (Akureyri): set (Subarctic), suggested (Arctic)!
		#4 (Stornoway): set (Temperate), suggested (Subarctic)!
		...
	}
	Sea and Lake Provinces:
	{
		#290 (Store Belt): set (Temperate), suggested (Subarctic)!
		#1012 (free): set (Temperate), suggested (Subtropical)!
		...
	}
}
Provinces atributes analyzing (INFORMATION)
{
	Provinces with coasts
	{
		Prov ID;Province;Island;Area;Region;Continent;Controller;Owner;
		1;Reykjavik;No;Iceland;Iceland;Europe;DEN;DEN;
		2;Torshavn;Yes;Iceland;Iceland;Europe;DEN;DEN;
	}
	Provinces with beaches
	{
		Prov ID;Province;Island;Area;Region;Continent;Controller;Owner;
		1;Reykjavik;No;Iceland;Iceland;Europe;DEN;DEN;
		2;Torshavn;Yes;Iceland;Iceland;Europe;DEN;DEN;
	}
	Provinces with ports
	{
		Prov ID;Province;Naval Base Size;Island;Area;Region;Continent;Controller;Owner;
		1;Reykjavik;4;No;Iceland;Iceland;Europe;DEN;DEN;
		2;Torshavn;0;Yes;Iceland;Iceland;Europe;DEN;DEN;
	}
	Provinces with Air Bases
	{
		Prov ID;Province;Air Base Size;Island;Area;Region;Continent;Controller;Owner;
		1;Reykjavik;4;No;Iceland;Iceland;Europe;DEN;DEN;
		5;Scapa Flow;4;No;North Scotland;Scotland;Europe;ENG;ENG;
	}
}
####### MAP AND PROVINCES ANALYZING END #######}

And again, this is not over yet! We've added a new report on AI files. Similarly to level 1 where the syntax of events is checked, here on level 2 even AI files are checked and problems with syntax or commands are reported. This is very important because no such report existed before and this is crucial in finding mistakes in AI files. We have to admit there were hundreds of errors in our files before reading this report... but they're all solved in patch 1.02! :)
Code:
####### AI FILES ANALYZING #######
{
Check files in: Mods\Darkest Hour Full/\ai
{
	Parsing Mods\Darkest Hour Full/ai\AFG_1914.ai...
	Parsing Mods\Darkest Hour Full/ai\afg_1936.ai...
}
}
####### AI FILES ANALYZING END #######}
Actually, AI errors checker is enabled always (even on logs set to 0) when a new AI files is loaded. The difference is that on level 2 all AI files in ai and ai\switch folders are checked on game start.

To give you a better idea of what is checked on savedebug.txt, here are a few of the checks that we added:
Code:
 - check for already loaded leaders – useful for duplicated IDs
 - check if start year is lesser then end year for leaders
 - check if province has port and beach while no sea zone is specified
 - check land units location on scenario start – error if it is sea province without a fleet.
 - added error message and log when invalid tech ID is defined in techapps = { } list in INC file. Checked on new scenario start (for level 1 of debug logs)
 - check for invalid tech IDs in endgoal, preference and ignore sub-sections of technology section in AI files
 - check for duplicated tech IDs in the same section in endgoal, preference and ignore sub-sections of technology section in AI files
 - check for duplicated or invalid province IDs in invasion 'target' section
 - check if all provinces in invasion 'target' section have beaches
 - log error if there is unknown string in military section
 - log error if there is unknown string in upgrade section
 - check for invalid country TAGs in spyprefs 'spyprefsdata' section
 - Improved checking algorithm for errors in the usage of % in strings (for level 2 of debug logs):
 * enabled this check for all languages (only languages up to Spanish have been checked before);
 * do not report \% as invalid combination;
 * report possible issues in translation – invalid number of % combinations compared to English etc. Note that there could be false reports!
 - report possible missing translation for a language.
 - check and log ID conflicts on ID creation to savedebug.txt (only reported on a pop-up message before).
 - check ID conflicts on loading ministers
and many more! Hopefully you'll never find out about them! :D




And finally this long summary of what you can find on savedebug.txt has come to an end. Now let's talk about the other log files! :D
Yes, there are more and you can enable them from misc.txt. Here they are:
Code:
# AI spy (LogSpyAI.csv) and diplomatic (LogDiploAI.csv) mission loggers: 0 - Disabled, 1 - Enabled.
	0 #0
# Country logger (LogCountry.csv): 0 = Disabled, >0 = Enabled, days between logs, -1 = log only player's country.
	0 #0
# Switched AI files logger (SwitchAI.txt): 0 - Disabled, 1 - Enabled.
	0 #0

LogSpyAI.csv
This file logs the spying activities of all countries. Here's an example
Code:
1936-01-02;Increase Intelligence Funding;S: Guangxi Clique;Home;;;;Level: 2;;Cost: 12.60;Money: 50.85;Spy $: 30.85;
1936-01-02;Increase Intelligence Funding;S: Communist China;Home;;;;Level: 3;;Cost: 5.28;Money: 50.34;Spy $: 30.34;
1936-01-02;Increase Intelligence Funding;S: Egypt;Home;;;;Level: 3;;Cost: 13.44;Money: 50.30;Spy $: 30.30;
1936-01-03;Increase Intelligence Funding;S: Abyssinia;Home;;;;Level: 2;;Cost: 7.56;Money: 500.35;Spy $: 480.35;
1936-01-03;Increase Intelligence Funding;S: Shanxi;Home;;;;Level: 2;;Cost: 2.70;Money: 50.50;Spy $: 30.50;
1936-01-03;Industrial espionage;S: Shanxi;T: Communist China;Chance: 13;Failed;Undetected;A. level: 3;D. level: 4;Cost: 21.60;Money: 47.80;Spy $: 27.80;
1936-01-03;Increase Intelligence Funding;S: Yunnan;Home;;;;Level: 2;;Cost: 6.75;Money: 51.21;Spy $: 31.21;
1936-01-03;Industrial espionage;S: Yunnan;T: Guangxi Clique;Chance: 10;Failed;Undetected;A. level: 3;D. level: 3;Cost: 21.60;Money: 44.46;Spy $: 24.46;
1936-01-03;Increase Intelligence Funding;S: Italy;Home;;;;Level: 9;;Cost: 146.40;Money: 504.77;Spy $: 484.77;
1936-01-03;Smear campaign;S: Italy;T: United Kingdom;Chance: 10;Failed;Undetected;A. level: 10;D. level: 12;Cost: 61.44;Money: 358.37;Spy $: 338.37;
As you can see all spying activities are logged, increases in intelligence funding included. In case of missions against other countries, the result, the chance and the espionage level of the respective countries are reported. This is an useful tool to find out how many successful missions are carried out during a game and can be used to tune the chance of each mission (in file db\spy_costs.txt).

LogDiploAI.csv
This file logs the diplomatic activites during a game:
Code:
1936-01-02;S: Canada;Open Negotiations;T: Australia;Score: 190;Money: 23.97;Cost: 0.00;
1936-01-02;S: Guangxi Clique;Open Negotiations;T: China;Score: 94;Money: 38.25;Cost: 0.00;
1936-01-02;S: Estonia;Open Negotiations;T: Latvia;Score: 136;Money: 10.33;Cost: 0.00;
1936-01-02;S: Japan;Open Negotiations;T: Manchukuo;Score: 200;Money: 106.91;Cost: 0.00;
1936-01-02;S: Mongolia;Open Negotiations;T: Tannu Tuva;Score: 86;Money: 10.35;Cost: 0.00;
Not much to say about this, it's pretty straightforward. :)

LogCountry.csv
This is a quite extensive report of a country. It can be enabled in two different modes:
  • it can save informations on all countries every X days (setting it to X in misc.txt, with X > 0)
  • it can save informations only on the player's country every day (setting it to -1 in misc.txt)
Code:
1936-01-02;Germany;IC: 162;Trade: Yes;Help Allies: No;Trade Panic: Yes;Dissent: 0.00;
IC Distribution;CG: 0.22;Prod: 0.70;Sup.: 0.08;Reinf.: 0.00;Upgr.: 0.00;;
Resource;Energy;Metal;Rares;Oil;Supplies;Money;
Import;Yes;Yes;Yes;Yes;Yes;Yes;
Export;Yes;Yes;Yes;Yes;Yes;Yes;
Stockpile;No;No;No;No;No;No;
Value;1.00;2.20;4.40;3.00;8.00;24.00;
Current Stockpile;9520.60;4408.07;2169.63;1001.62;735.17;81.68;
Desired Stockpile;29160.00;14580.00;7290.00;5434.20;2847.30;1.00;
Critical Stockpile;9720.00;4860.00;2430.00;1811.40;1423.65;0.00;
Max Stockpile;64152.00;32076.00;16038.00;23910.48;12528.12;;
Current Income;+585.40;-91.93;-80.37;-14.57;+234.83;+11.68;
Desired Correction;-341.04;+43.59;+56.20;-7.69;-306.85;-3.53;
Total Produced;1175.67;110.81;41.00;2.05;;;
Home Produced;1175.67;110.81;41.00;2.05;318.82;12.83;
Free Resource;+0.00;+0.00;+0.00;+0.00;+0.00;+0.00;
Convoyed In;0.00;0.00;0.00;0.00;0.00;;
Converted;-64.80;0.00;0.00;16.20;0.00;0.00;
Traded For;0.00;40.00;0.00;0.00;4.00;0.00;
From Puppet;0.00;0.00;0.00;0.00;0.00;0.00;
To depots from Puppet;0.00;0.00;0.00;0.00;0.00;0.00;
Conv. from Puppet;0.00;0.00;0.00;0.00;0.00;0.00;
To Master;+0.00;+0.00;+0.00;+0.00;+0.00;+0.00;
Traded Away;-40.00;0.00;0.00;0.00;-8.00;0.00;
Over stockpile loss;+0.00;+0.00;+0.00;+0.00;+0.00;;
Convoyed Out;0.00;0.00;0.00;31.00;31.00;;
Usage;485.47;242.74;121.37;1.91;52.18;1.16;
Daily IC Need;324.00;162.00;81.00;;;;
Max Daily Need;;;;60.38;94.91;;
Home Usage;;;;1.82;48.99;;
Allied Usage;;;;0.00;0.00;;
Research;;;;;;+0.00;
Intelligence;;;;;;+1.16;
UsedByOwnTroops;;;;1.91;52.18;;
UsedByAlliedTroops;;;;0.00;0.00;;
UsedFromHome;;;;1.82;48.99;;
UsedFromDepots;;;;0.09;3.19;;
TotalUsed1;;;;1.91;52.18;;
TotalUsed2;;;;1.91;52.18;;
Trade Panic;No;Yes;Yes;No;No;No;
1936-01-02;Units;
Land Units;Arm/L.Arm/Mech;Mot/Cav;Mil/Gar;Mtn/Par/Mar;Inf/HQ;TOTAL;
Ready(In prod.);0(0)/3(0)/0(0);0(4)/0(0);0(0)/0(0);0(0)/0(0)/0(0);78(11)/1(0);82(15);
AirUnits;Int/Ftr;CAS/Tac;Nav/Str;TRA;FB/FR;TOTAL;
Ready(In prod.);3(0)/0(0);1(0)/7(0);0(0)/0(0);0(0);0(0)/0(0);11(0);
NavalUnits;BB;CV/CVL;BC/CA;CL/DD;TP/SS/SSN;TOTAL;
Ready(In prod.);2(0);0(0)/0(0);0(2)/2(5);6(0)/4(6);3(0)/3(0)/0(0);20(13);
ManPower: 124.50;ConvoyT.: 450;ConvoyE: 23;Total TC: 374;Used TC: 41;;
Reinf IC N.: 93.36;Reinf MP N.: 676.20;Reinf MP Used: 0.00;Upgr. IC N.: 246.58;Upgr. Divs.: 61;Upgr. Brig.: 1;
It's an extensive log, so it can slow the pace of the game. Use it with care! :)
Moreover, it can be used even when disabled in misc.txt. How? Thanks to a new console command:
Added new console command “dumpinfo TAG” (only in SP games) that saves detailed country information to LogCountry.csv. “dumpinfo world” saves detailed information about all existing countries to LogCountry.csv.
So even if disabled in misc.txt, you can choose in-game to obtain informations on a specific country (or on all countries!). It's very useful for AI check in-game! ;)

SwitchAI.txt
This is pretty simple but very useful, every AI file loaded by every country is logged. It's really useful to find out if an AI switch is working. Here's an example:
Code:
1936-01-01 : [ Abyssinia ] -> [ Mods\Darkest Hour Full/ai\ETH_1936.ai ]
1936-01-01 : [ Afghanistan ] -> [ Mods\Darkest Hour Full/ai\AFG_1936.ai ]
1936-01-01 : [ Albania ] -> [ Mods\Darkest Hour Full/ai\ALB_1936.ai ]
...

1936-01-02 : [ Italy ] -> [ Mods\Darkest Hour Full/ai\switch/ITA_Naval_Ethiopia.ai ]
...
1936-01-04 : [ USA ] -> [ Mods\Darkest Hour Full/ai\Air_Strategic.ai ]
A note about this four files: they're write in append, so each new game adds the informations to the end of file, after the informations from the previous games. So be careful and be sure to read the information from the game you want to analyze.

This is really the end. :)
Thank you for reading this, I know that it's very boring for the casual player but it's very useful for modders. And thanks to this new and improved reports, modders will be able to make better mods and everybody will benefit from this! So, good work to the modders!
 
This is timely and very useful

In the last couple of days I've started work on porting WIF to DH1.02, rather than where I had it before on 1.02b1. Immediately I found I had many more errors in files that had been in use for years(?) in presumably AOD+WIF?... and seemed to work ok in dh1.02b1, but obviously not...

So whether these error prone files ever did what they were supposed to, or maybe just that part of the file, we will never know.

But THANKS to the Devs again for putting these error checks into the base game.

And please continue to publish more and more information about modding dh.
 
In the process of porting WIF, all going well. The game loads, all looks ok.......I turn on the extra logs, just to see.. and a picture tells a thousand words...

 
As I said above:
This is a new report that helped us found possible problems in translations. However, it's not a perfect tool, because it can give some false positive reports, as it is not easy to find if there are problem with translations in different languages.
Those are probably false reports. Just click ignore and go ahead.
 
As I said above:

Those are probably false reports. Just click ignore and go ahead.

I don't know? I've just tried to open up the savedebug file and it's HUGE... 141MB, so I didn't bother... But I need the doomsday.txt file, in the mod... Has the file changed for DH?

IT MIGHT BE a good idea to refine whatever coding you have done, and maybe add an ability to ignore a whole file... I suppose I can remove the error-prone file, substitute another, and take it from there?

 
Last edited:
I don't know what you're talking about.

It's ok AC, I'll work-around whatever is in my path, as always.. Thanks

What I meant was this: WIF file caused many errors, but game still loads, they may be positive-errors like you say.
But I need to see the errors for the other files... so... I remove that error file, substitute a DH file of the same name, no errors... Now I can see the other errors, and don't have to wade through 14209 errors to get to the errors I want to see. Yeah?
 
I just wanted to say THANKS to the Devs for doing this.

I have WIF up and running in the full DH map. I still have a few issues to sort out. I thought I had a fairly-fully-functioning game... until I turned on the logs, set at 1, and OMG:eek::eek: there's a list a mile long.. of what is working... and more importantly.. what is not working... Very Useful... :ninja::ninja:
 
I just wanted to say THANKS to the Devs for doing this.

I have WIF up and running in the full DH map. I still have a few issues to sort out. I thought I had a fairly-fully-functioning game... until I turned on the logs, set at 1, and OMG:eek::eek: there's a list a mile long.. of what is working... and more importantly.. what is not working... Very Useful... :ninja::ninja:
Don't feel to bad, you do have it fully playable up to Oct 1939. I am sure you will get it fully functional soon.