Darkest Hour - Dev Diary #3 - Spying System

  • Hearts of Iron IV Survey

    Help us make HoI IV better by sharing your experiences in this 5 minute survey


  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Fernando Torres

Darkest Hour Game Designer
48 Badges
Dec 2, 2006
10.183
31
rayan-nezzar.fr
  • Rome: Vae Victis
  • Penumbra - Black Plague
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Supreme Ruler 2020
  • Supreme Ruler: Cold War
  • Victoria 2
  • Victoria 2: A House Divided
  • Europa Universalis III Complete
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Elven Legacy Collection
  • Hearts of Iron II: Beta
  • Pride of Nations
  • Rise of Prussia
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Achtung Panzer
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • For The Glory
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Crusader Kings II
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • East India Company
  • East India Company Collection
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Iron Cross
  • Legio
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • March of the Eagles




‘Introduction: Some history’

Spying in DD/Arma 1.2 had many bugs: missions that do not work for the AI - including counter-intelligence, broken AI mission selection code, and incorrect messages to name just few. Once we fixed all known bugs in the code and ran some tests using advanced logging (logger is part of DH) we found that in a game AI countries do tens of thousands send and kill spy missions outperforming any player because of the micromanagement involved in the spying and very few real missions (about 10%). It was clear for us that the old system needed to be changed and after some brainstorming and few tries Martin and Chris came up with the spy system used in Arma 1.3.

Its main features are:
- Fixed spying AI - it can do any mission
- Send/kill spies missions removed and replaced with Spy network levels (0..20)
- increased game speed
- all modifiers exported to spy_cost.txt and AI files
- there are more here that are out of my mind after 2 years

These changes while to drastic for a patch and not welcomed by all modders at the time paved the road to the auto-spying system we implemented in DH.

Changes:
- merged AI and player auto-spying code
- cleared spy_cost.txt file and moved old and new spying modifiers to a new section in misc.txt


‘All warfare if based on deception’



That quote from Sun Tzu enlightens the prominent role played by intelligence operations in times of war. But while popular myths have been created around a few people like Mata Hari or Joseph Sorge, intelligence and counter-intelligence operations have truly been of a great importance in the events of two World Wars witnessed by the XXth century. Darkest Hour therefore intends to put a certain emphasis on this matter.

Darkest Hour spying system addresses two main issues which are the realism of the intelligence operations and their planning in the long-run as a Head of State.
The first thing that you need to know is that there two modes: manual and semi-automatic intelligence. While the manual mode has many similarities with Hearts of Iron II spying system, the semi-automatic is much more interesting. There you can allocate a certain part of the national income to intelligence operations. There are also others factors that you can play with such as spy activity or the minimum level of infiltration required prior to any foreign operation.

Furthermore, as the Head of your State, you can assign generic or specific priorities to your intelligence services. Playing the United Kingdom, you might for instance be willing to grab more informations about Nazi Germany. Specific country priorities can therefore be set in that regard.

But there are also missions specific priorities which allow you tell your intelligence services what specific mission to perform (either globally or in a certain country). You will for instance be able to perform only industry sabotage in one country or couple it with industrial espionage, provided that you need two times more sabotage missions.

That way, you have a relative control over the operations led by your intelligence agency. You are also encouraged to plan your spying strategy in the long run and check the reports on a regular basis when you used to be overwhelmed with micro management in Hearts of Iron II (where you had to send every spy and perform every operation manually). Hence Darkest Hour spying system is not a clicks contest but instead, a panel that lets you plan your policy in the long run.
This was also a matter of realism because as a Head of State, you obviously have a certain level of involvement, which sending all spies one by one should be excluded from.

Automation:
- Can be enabled or disabled
- Even when enable players still can do any mission to any country manually if they want
- auto-increase of spy levels to manually set Max level (0..20)
- set spy money threshold (use money above XXX)
- Min. spy level threshold before try to do any foreign missions (0..20)
- Spy activity
- Min chances for every spy mission - do no try a mission if chances are less
- Can add/remove countries from spying list
- Can set country priority for each country in the list
- Can set missions priority for each country in the list
- Can apply same priorities to all countries at once
- Can clear countries list at once

Spy reports, added:
- Transports/Escorts
- Resources
- Submarines, TPs


Moddability


We are also looking forward to making Darkest Hour as mod friendly as possible.
Thus, many parameters will be subject to changes in mods, such as:

AI priorities

Code:
    ###################################
    # Spying
    ###################################
    spyprefs =
    {
       percentage_on_spies       = 0.2
       percentage_foreign_mission    = 0.6

       # Used for Intell efficiency and for setting minimum chance to succeed for the AI to do that particular type of mission
       spyprefsdata =
       {
          NumberOfSpies = 10
          min_number_of_spies = 3
          steal_blueprint = 10
          minister_assassination = 5
          smear_campaign    = 10
          coup = 3
          sabotage_industry = 10
          nuclear_sabotage = 5
          found_partisans   = 10
          massmedia = 10
          disrupt_techteam = 10
          country = CHC
       }
       spyprefsdata = {
          country_priorities   = 4
          steal_blueprint    = 10
          minister_assassination          = 1
          smear_campaign       = 3
          coup             = 0
          sabotage_industry    = 5
          nuclear_sabotage    = 0
          found_partisans    = 2
          massmedia          = 1
          disrupt_techteam   = 5
          country          = CHI
       }
       spyprefsdata = {
          country_priorities   = 6
          steal_blueprint    = 10
          minister_assassination          = 1
          smear_campaign       = 3
          coup             = 0
          sabotage_industry    = 5
          nuclear_sabotage    = 0
          found_partisans    = 2
          massmedia          = 1
          disrupt_techteam   = 5
          country          = JAP
       }
    }

General parameters


Code:
    intelligence = {
    # Days between spy missions in a country. Do not use fractions
       20 #8
    # Days between increase intelligence levels. Do not use fractions
       180
    # Chance to detect the initiator of a spy mission; Values = [0 - 100]; 0 = never detected, Do not use fractions
       20 #50
    # Relationships hit for detected missions
       5 #10
    # Distance modifier: -1000 = No distance modifier; else: Higher value = Distance has smaller effect = Higher Chances
       20
    # Distance modifier for neighbours; Values = [0.0 - 1.0]; 0.0 = No neighbour distance bonus.
       0.25
    # Spy lvl bonus on Distance modifier: 0 = No bonus from Spy lvl's; else: Higher value = Higher bonus from spy lvl = Higher Chances.
       2
    # Distance modifier for Spy lvl's above 10: 0 = all levels use same distance bonus; else: X = bonus for levels 11-20th
       30
    # Spy information accuracy modifier. Values = [-10 - 10]; 10 = Full info
       0
    # IC modifier on Cost; 0: Cost = base cost; 1: cost = base cost * base IC in target; 2 or more: cost = base cost * ( 1 + base IC in target / this )
       1
    # Min IC on cost modifier; If base IC in target < this use this, else use base IC
       30
    # Max IC on cost modifier; If base IC in target > this use this, else use base IC
       80
    # Extra Basic Daily maintenance cost for Spy lvl's above 10th; 0 = no extra cost; X = extra cost for levels 11-20th
       0.5
    # Basic Cost for Increasing Spy lvl's above 10th; 0 = Normal Basic cost; else: Basic cost for each lvl = X
       500
    # Show 3rd country spy reports: 0 = no reports; 1 = only detected; 2 = detected + all successful; 3 = all reports
       1
    # percentage_on_spies to money modifier
       100.0
    }

And mission basic costs and chances

Code:
    intelligence = {


    #   _HOID_SPY_STEAL_TECH_,
    0.8
    #   _HOID_SPY_MINISTER_ASSASSINATION_,
    2.0
    #   _HOID_SPY_SMEAR_CAMPAIGN_,
    1.6
    #   _HOID_SPY_COUP_,
    12.0
    #   _HOID_SPY_SABOTAGE_INDUSTRY_,
    0.8
    #   _HOID_SPY_NUCLEAR_SABOTAGE_,
    2.0
    #   _HOID_SPY_FOUND_PARTISANS_,
    0.8
    #   _HOID_SPY_MASSMEDIA_,
    1.2
    #   _HOID_SPY_DISRUPT_TECHTEAM_,
    0.8
    #   -Base Cost for Increasing Spy lvl.
    0.5
    #   -Base Cost for decreasing Spy lvl.
    0
    #   -Base Daily maintenance cost per Spy lvl for 1-10th lvl. 11-20th levels may cost more.
    0.001


    #   _HOID_SPY_STEAL_TECH_CHANCE,
    35
    #   _HOID_SPY_MINISTER_ASSASSINATION_CHANCE,
    10
    #   _HOID_SPY_SMEAR_CAMPAIGN_CHANCE,
    35
    #   _HOID_SPY_COUP_CHANCE,
    2
    #   _HOID_SPY_SABOTAGE_INDUSTRY_CHANCE,
    35
    #   _HOID_SPY_NUCLEAR_SABOTAGE_CHANCE,
    8
    #   _HOID_SPY_FOUND_PARTISANS_CHANCE,
    50
    #   _HOID_SPY_MASSMEDIA_CHANCE,
    40
    #   _HOID_SPY_DISRUPT_TECHTEAM_CHANCE,
    30
    #   NOT USED
    100
    #   NOT USED
    100
    #   -Dissent modifier on base coup chance: 0 = No dissent modifier; else: Higher value = Higher dissent needed in target country.
    5
    }

And here are the two screen-shots of this week.





We have also posted exclusive screen-shots on our Facebook page and I am pretty sure you would be very interested.
See you next week for a new development diary.
Take care. :)
 
Last edited by a moderator:

LeeDub

Cynical, withered husk of a man
105 Badges
Oct 1, 2008
1.395
253
  • Semper Fi
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Arsenal of Democracy
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Knights of Pen and Paper +1 Edition
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Crusader Kings II: Monks and Mystics
  • Pillars of Eternity
  • Tyranny - Tales from the Tiers
  • Stellaris: Galaxy Edition
  • For the Motherland
  • Hearts of Iron II: Armageddon
  • 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
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III
  • Darkest Hour
  • Europa Universalis IV
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Battle for Bosporus
  • Victoria 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
Looks great, customisable AI preferences! This should be more widespread, not just in intelligence. ;)
 

LeeDub

Cynical, withered husk of a man
105 Badges
Oct 1, 2008
1.395
253
  • Semper Fi
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Arsenal of Democracy
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Knights of Pen and Paper +1 Edition
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Crusader Kings II: Monks and Mystics
  • Pillars of Eternity
  • Tyranny - Tales from the Tiers
  • Stellaris: Galaxy Edition
  • For the Motherland
  • Hearts of Iron II: Armageddon
  • 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
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Hearts of Iron III
  • For The Glory
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III
  • Darkest Hour
  • Europa Universalis IV
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Mount & Blade: Warband
  • Battle for Bosporus
  • Victoria 2
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
You can modify lots of things in DH mods.
There will be an entire DD about that. :)

Hehe, I doubt I'll be able to do what I have in mind here. Things like AI production control (strive for 10% ARM, 30% MOT etc) or Air/Naval control (cut off England/struggle for Air Superiority wherever we go etc). ;)

And no, HoI3 is not what I'm looking for here, there the AI was fully automatic, non-customisable (not in-game anyway).
 

Vaximillian

UNKNOWN STRING WANTED
30 Badges
May 17, 2008
6.625
3.143
  • Europa Universalis IV
  • 500k Club
  • 200k Club
  • Deus Vult

Davisx3m

-{Kaiserreich Team]-
90 Badges
Dec 16, 2006
6.930
2.113
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Legio
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Penumbra - Black Plague
  • Pirates of Black Cove
  • Hearts of Iron III
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sword of the Stars
  • The Showdown Effect
  • Victoria 2
  • Warlock 2: The Exiled
  • War of the Roses
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Europa Universalis 4: Emperor
  • Deus Vult
  • Arsenal of Democracy
  • Cities in Motion
  • 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
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Hearts of Iron Anthology
  • East India Company Collection
  • 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
  • Europa Universalis IV: Call to arms event
  • For The Glory
Looks nice! :D
 

Inner Circle

----Darkest Hour Team---- ✪ ☭ ✠
90 Badges
May 26, 2007
3.584
484
  • 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
  • Imperator: Rome Sign Up
  • 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
hm.. with the widescreen forum the image issue is fixed it seems :)
 

Vaximillian

UNKNOWN STRING WANTED
30 Badges
May 17, 2008
6.625
3.143
  • Europa Universalis IV
  • 500k Club
  • 200k Club
  • Deus Vult

tedescooo

Major
134 Badges
Apr 4, 2008
567
40
  • Supreme Ruler 2020
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Pillars of Eternity
  • Magicka 2
  • Cities: Skylines - After Dark
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Conclave
  • Stellaris: Megacorp
  • Achtung Panzer
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Surviving Mars: First Colony Edition
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Dharma
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Shadowrun: Dragonfall
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Stellaris: Necroids
  • Victoria 2
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Prison Architect
  • Crusader Kings II: Horse Lords
  • 200k Club
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Elven Legacy Collection
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Rise of Prussia
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
The new Intel system looks really nice.

Looking forward to play it!
 

Fernando Torres

Darkest Hour Game Designer
48 Badges
Dec 2, 2006
10.183
31
rayan-nezzar.fr
  • Rome: Vae Victis
  • Penumbra - Black Plague
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Supreme Ruler 2020
  • Supreme Ruler: Cold War
  • Victoria 2
  • Victoria 2: A House Divided
  • Europa Universalis III Complete
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Elven Legacy Collection
  • Hearts of Iron II: Beta
  • Pride of Nations
  • Rise of Prussia
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Achtung Panzer
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • For The Glory
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Crusader Kings II
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • East India Company
  • East India Company Collection
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Iron Cross
  • Legio
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • March of the Eagles
Hehe, I doubt I'll be able to do what I have in mind here. Things like AI production control (strive for 10% ARM, 30% MOT etc) or Air/Naval control (cut off England/struggle for Air Superiority wherever we go etc). ;)

And no, HoI3 is not what I'm looking for here, there the AI was fully automatic, non-customisable (not in-game anyway).

You can do these things. :)
 

ashandresash

Funk to funky
112 Badges
Jul 29, 2008
2.621
1.829
  • 200k Club
  • Stellaris: Necroids
  • 500k Club
  • Deus Vult
  • Hearts of Iron II: Armageddon
  • Victoria: Revolutions
  • Sengoku
  • March of the Eagles
  • Europa Universalis III: Chronicles
  • Hearts of Iron III: Their Finest Hour
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Holy Fury
  • Europa Universalis 4: Emperor
  • Stellaris: Federations
  • Battle for Bosporus
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
Perhaps it's time to get some bonus on detection (fog of war) related to intelligence relative level between two countries, modified by encryption/decryption. The way spionage it's actually working in HoI2s it's almost useless IMO (the only mission I use is steal of blueprints, and I don't know how it usually gets the worst one).