Development Diary #26 - 1.02 Patch Development

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

Inner Circle

----Darkest Hour Team---- ✪ ☭ ✠
91 Badges
May 26, 2007
3.585
497
  • Penumbra - Black Plague
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Legio
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • March of the Eagles
  • Europa Universalis III Complete
  • For The Glory
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Victoria 2
  • Victoria 2: A House Divided
  • Stellaris: Federations
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • 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
  • Hearts of Iron Anthology
  • Darkest Hour
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations





Hello everyone and welcome to another Development Diary of Darkest Hour!

You may ask why we decided to write a new DD now, more than six months after the release of DH. Well, the answer is that we're always working on improving the game through Patches that add new triggers and commands, expand existing ones and in general add more Features/Bugfixes to the game. That's why this DD will focus on the new Features that you will see in the forthcoming patch 1.02, as there are quite a few of them.

It is now possible to change, to your own will, the upgrade between different models and even units! So for example, you can make militia 1936 upgrade to infantry 1936 instead of militia 1939, if so you wish. I think this can be useful especially for those mods that want to create a different world rather than focus on WWII (or WWI). And let's not forget that is also mean that ships can be upgradable too if you want.
Code:
  - Upgrade type and model can be specified in brigade/division files.
        For example to upgrade LArm-2 to ARM-2 add armor = 2 into the model = { } entry for L-Arm-2 in light_armor.txt:
        # 2 - Improved Light Tank
        model = {
            armor = 2 # Upgrade to ARM-2
            ……..
        }
    - This is optional and can be skipped. By default every unit/brigade is upgradeable to the next model of the same type with 2 exceptions:
        1. LArm-2 by default upgrades to ARM-2
        2. All ships by default do not upgrade
    - It is possible to specify upgrade to a model of the same type too.
        For example INT-4 can be set to upgrade to INT-7 directly and skip the two rocket interceptor models in interceptor.txt:
        model = { # Advanced Interceptor – 4
            interceptor = 7 # Upgrade to Basic Turbojet Interceptor – 7 directly
            ….
        }
    - It is also possible to forbid a specific model to be upgraded at all. To do that set its upgrade model to -2.
        For example INT-6 could be set as non-upgradeable event if there is INT-7 model:
        model = { # Improved Rocket Interceptor - 6
            interceptor = -2 # Forbid upgrading of that model
            …
        }
        model = { # Basic Turbojet Interceptor – 7
            ….
        }

One simple warning: upgrading to a different type of units (land/air/naval) can lead to problem, so beware and don't try to upgrade a garrison to a submarine! :D

But this is not the only change we made to the upgrading of units!

Code:
 Added new optional division/brigades models parameter: on_upgrade = yes/no(default). When set to “yes” current model’s upgrade_time_factor and upgrade_cost_factor modifiers will be used on upgrade to the next model instead of the default next model ones.

This is useful when combined with changes to the unit type (now allowed by the previous change). To expand the example we used above, if we decided to make Milita 1936 upgrade to Infantry 1936, the engine would normally calculate the cost based on the IC and time values of Infantry 1936. With on_upgrade = yes set on Militia 1936 model, you can make the IC and time of upgrade be based on the values written in the Miltia 1936 model. So for example you can set upgrade_cost_factor = 2, which means that upgrading Militia 1936 will take twice the IC necessary to build it.

Finally, units which are being reinforced (and that can be upgraded and are not set to not upgrade) now receive a little upgrade too during the reinforcement. There is a new modifier in misc.txt:
Code:
Reinforce to upgrade modifier. Values from 0.0 (divisions do not get extra upgrade progress on reinforcement) to 1.0 (1:1 ratio, 1% reinforce adds 1% to upgrade progress)

But that´s not all ;) We also added new division parameters which will affect units running out of Fuel and/or Supplies. Before we made those changes there was only a fixed -20% combat penalty to all units out of supply inside misc.txt. This was not enough for us so we implemented a better solution:

Code:
Added new optional unit model modifier - no_supplies_combat_mod. Combat penalty when out of supplies. Default value is set in misc.txt.
Added new optional unit model modifier - no_fuel_combat_mod. Combat penalty when out of fuel. Default value is set in misc.txt.
Added new optional unit model modifier - out_of_fuel_speed. Speed penalty when out of fuel. Default value is set in misc.txt.

New modifiers in misc.txt (“combat” section):
	- Combat Modifier: Default Supply Problems Mod – Air
	- Combat Modifier: Default Supply Problems Mod - Naval
	- Combat Modifier: Default Fuel Problems Mod - Land
	- Combat Modifier: Default Fuel Problems Mod - Air
	- Combat Modifier: Default Fuel Problems Mod – Naval

New combat modifier – Out of Fuel, definable in misc.txt (default per land/air/navy) and per model in unit files.

NOTE: These modifiers can be changed by event commands/techs too, as you can see:
Code:
Added commands to modify country specific unit modifiers:
- out_of_fuel_speed
- no_fuel_combat_mod
- no_supplies_combat_mod

The final changes we made with Divisions/Brigades are the already announced features of having up to 5 Brigades for Land/Air-Units enabled and the Custom Upgrade Paths (from the UI).
At the moment we are discussing whether we should give Infantry the possibility to carry 2 brigades in DH Full.

d09686f5.png

edfedb0a.png


The engine itself got some improvements too. During the last weeks, the Air AI got a major overhaul with many Bugs inside the Code fixed and the AI behaviour tweaked. As an example, the AI will now redeploy its wings away from airbases which are threatened by the enemy. Also, the AI will make a more efficient use of the Air Scramble Mission, so watch out ;).

As a side-effect of the changes in the Air AI, our Coder and Lead Developer Martin found and fixed a huge memory leak. Sometimes in long games, the engine used over 1.1GB of Ram for a single game. Now it´s usually between 300-350 Mb, which lead to an increase in the performance of the game! In addition to this, thanks to further optimizations the file size of savegames has been reduced a bit.

For the Modding Community, we expanded the Debug Logs with many checks for AI Files. They are activated as before from settings.cfg and will be stored inside the usual savedebug.txt:

Code:
Added more debug logs when extra logs are enabled (settings.cfg). Checked on file load 
When extra logs are set to 2 in settings.cfg, all *.ai files in ai and ai\switch folders for the current mod are logged on game start :

	- 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
	- Check for invalid province IDs in invasion 'staging_province' section
	- Check if all provinces in invasion 'staging_province' section are land provinces
	- Check for duplicated or invalid province IDs in admiral 'target' section
	- Check if all provinces in admiral 'target' section are naval
	- Check if all area names in admiral 'ignore' section are valid
	- Check for invalid province IDs in admiral 'core' section
	- Check if all provinces in admiral 'core' section are naval
	- Check for invalid province IDs in admiral 'base' section
	- Check if all provinces in admiral 'base' section have ports
	- Check if a country TAG is used more then once in a section
	- Check if invalid country TAG is used in a section
	- Check if a country TAG is used more then once in trade pref. 'favored' section
	- Check for invalid country TAGs in trade pref. 'favored' section
	- Check if a country TAG is used more then once in tech share pref. 'favored' section
	- Check for invalid country TAGs in tech share pref. 'favored' section
	- Check if a tech ID is used more then once in tech share pref. 'prioritized' section
	- Check for invalid tech IDs in tech share pref. 'prioritized' section
	- Check for invalid country TAGs in tech share pref. 'embargo' section
	- Check for invalid tech IDs in tech share pref. 'not' section
	- Check for duplicated country TAGs in 'max_front_ratios' section
	- Check for invalid country TAGs in 'max_front_ratios' section
	- Check for duplicated country TAGs in 'exp_force_ratios' section
	- Check for invalid country TAGs in 'exp_force_ratios' section
	- Check for invalid country TAGs in 'combat' section
	- Check for invalid country TAGs in 'resistance' section
	- Check for invalid country TAGs in 'protect' section
	- Check for invalid country TAGs in 'befriend' section
	- Check for invalid country TAGs in 'liberate' section
	- Check for invalid country TAGs in 'liberate_nation' section
	- Check for invalid country TAGs in 'no_exp_forces_to' section
	- Check for duplicated or invalid province IDs in 'target' section
	- Check if all provinces in 'target' section are land provinces
	- Check if a country TAG is used more then once in garrison 'country_priorities' section
	- Check for invalid country TAGs in garrison 'country_priorities' section
	- Check for duplicated or invalid province IDs in garrison 'province_priorities' section
	- Check if all provinces in garrison 'province_priorities' section are land provinces
	- Check for duplicated or invalid province IDs in garrison 'ignore' section
	- Check if all provinces in garrison 'ignore' section are land provinces
	- Check for duplicated or invalid province IDs in garrison 'area_multiplier' section
	- Check if all provinces in garrison 'area_multiplier' section are land provinces
	- Check for duplicated country TAGs in front 'enemy_handicap' section
	- Check for invalid country TAGs in front 'enemy_handicap' section
	- Check for duplicated country TAGs in front 'passivity' section
	- Check for invalid country TAGs in front 'passivity' section
	- Check for duplicated or invalid province IDs in front 'province_priorities' section
	- Check if all provinces in front 'province_priorities' section are land provinces
	- Check for invalid province IDs in construction 'AA_provs' section
	- Check if all provinces in construction 'AA_provs' section are land provinces
	- Check for invalid province IDs in construction 'coastal_fort_provs' section
	- Check if all provinces in construction 'coastal_fort_provs' section are land provinces with coasts
	- Check for invalid province IDs in construction 'radar_provs' section
	- Check if all provinces in construction 'radar_provs' section are land provinces
	- Check for invalid province IDs in construction 'air_base_provs' section
	- Check if all provinces in construction 'air_base_provs' section are land provinces
	- Check for invalid province IDs in construction 'naval_base_provs' section
	- Check if all provinces in construction 'naval_base_provs' section are land provinces with ports
	- Check for invalid province ID for construction 'nuclear_reactor_prov'
	- Check if province ID for construction 'nuclear_reactor_prov' is land province
	- Check for invalid province ID for construction 'rocket_test_prov'
	- Check if province ID for construction 'rocket_test_prov' is land province
	- Check for invalid province IDs in construction 'fort _provs' section
	- Check if all provinces in construction 'fort_provs' section are land provinces with ports
	- Check for invalid country TAGs in construction 'fort_borders' section
	- Check for invalid province IDs in construction 'IC_provs' section
	- Check if all provinces in construction 'IC_provs' section are land provinces
	- 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

And here some additional Logs which were added:

Code:
   - Report for wrong command syntax (Missing = in statement.)
   - Report for invalid event picture – only when extra debug logs are enabled in settings.cfg
   - Seazones.txt - only when extra debug logs are set to 2 in settings.cfg
   - Report on missing tech year or tech picture - only when extra debug logs are enabled in settings.cfg
   - Report on incorrect format of text strings (missing or extra %) - only when extra debug logs are enabled in settings.cfg

We hope that this will greatly help all Modders out there. With those logs, we were able to track down many unseen Bugs inside the AI files and fixed them.

To coclude this Dev Diary, we are happy to announce, that there will be new 1933, 1940 and 1941 scenarios for DH Full in 1.02.
 
I hope for you that evrything will work as planed. I like all your ideas, let´s hope that you can give us an running patch soon.
thanks lads and gents, great work.
 
This is great news. I like the idea of limiting land divisions to just 2 brigades.
 
Three new scenarios. Great!
 
Those divisions with 5 brigades look scary as hell. Possible to restrict this ability to events / certain countries?
 
Is the dh team planing on relesing all the old scenarios from hoi2 and then relesing new dh only scenarios after?