+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 30

Thread: Threat Calculations

  1. #1
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559

    Threat Calculations

    Does anybody know where the calculation is done by country X to see how much threat it receives from actions of country Y? Is this hidden in the code or exposed in one of the LUA files?

  2. #2
    Major Piktoonis's Avatar
    Europa Universalis 3Divine WindHearts of Iron IIIHeir to the ThroneSword of the Stars

    Join Date
    Jan 2010
    Location
    Vilnius, Lithuania
    Posts
    688
    Look in defines.lua, cb_types.txt

  3. #3
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    The file `cb_types` looks to only deal with the processing of War Goals and nothing else. The file `defines.lua` has a couple of entries that deal with *sources* of threat, but they do not include the calculations on how much threat nations will actually *receive* from these sources, which is what I am after. As an example, it shows the base value of threat that the Spy mission `Increase Threat`, but if I use Spies to raise the threat of country X, country Y will not necessarily have its threat from X increased by this value based on a number of factors, such as faction membership, ruling party ideology, proximity, etc.

  4. #4
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    I've tried an experiment to see if I can get a feel for what exactly causes a nation to feel threatened and what doesn't. The results are in this spreadsheet made with Excel 2010.

    To perform the experiment, I played as Indonesia and granted myself enough Leadership that I could constantly maintain 10 Spies in each target regardless of the state of their Counterespionage. I then had 10 Spies doing `Increase Threat` in every country marked as a neighbor plus all the Major powers, and recorded the results at the end of 1936. Somebody comfortable with writing scripts could have 10 Spies running in every country in the game, and then do a mathematical analysis to approximate the function used to calculate threat based on whatever factors might contribute to this. Also, this game was run in FtM with the HPP mod, so if HPP alters threat calculations, please let me know (and I'd also like to know where these calculations are hiding)!

    When I first started playing HOI3, I naively assumed that countries generating threat had a local threat value which was viewed differently by other countries in the game based on numerous factors. Instead, when a country generates threat, it is not stored locally but sent as it were to every other country in the game. How much is actually received is then modified by unknown (by me anyway) factors and stored by these countries. So every country has a unique ledger of how threatened they are by everybody else. If you are making a mod you can edit the files so that countries start `pre-threatened` as it were by whomever you like.

    So in general, in order for your nation to feel maximally threatened by another nation, that nation should be a neighbor, a different ideology group, and a faction member. I'm still not entirely convinced that being a Major power doesn't count for as much or more as being in a faction. If you review my results, you will see that this generally holds true, except that there are a few anomalies:
    • The USSR essentially picked up similar levels of threat from all the Major powers, even though Italy and Japan were not Axis members, which gives some credence to my thoughts that being a Major power is threatening to some degree
    • The Netherlands and France both are neighbors of Germany, but the Netherlands only picked up half the threat from Germany that the French did. I thought that perhaps the base neutrality of the two countries might matter, but they are very similar. However, without knowing exactly how threat is calculated perhaps this minor difference is significant
    • Generally, if you are not a neighbor, the threat you pick up from a country is greatly reduced. However, France still picked up a decent level from the USSR despite this
    • As Indonesia, the most threat I picked up was from Malaysia, which meets all the major requirements: neighbor, different ideology, and faction membership. But the amount I received was far less than countries in similar circumstances, again leading me to conclude that Major power status (or sheer military size, which is related to such status) is important

  5. #5
    Major Piktoonis's Avatar
    Europa Universalis 3Divine WindHearts of Iron IIIHeir to the ThroneSword of the Stars

    Join Date
    Jan 2010
    Location
    Vilnius, Lithuania
    Posts
    688
    Like i wrote before: faction, different ideology and common land border generates more threat. Also building troops and placing them on the border makes a lot of threat. I am currently playing as Italy in HPP mod, where i put no troops in any border with France or UK (africa), so after 4 annexations, my threat was 4 to France and 5 to UK (bigger border). I tried looking in to files to discover if it is possible to modify threat parameters (resistance and susceptibility) , but couldn't find anything.

  6. #6
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    Quote Originally Posted by Piktoonis View Post
    I am currently playing as Italy in HPP mod, where i put no troops in any border with France or UK (africa), so after 4 annexations, my threat was 4 to France and 5 to UK (bigger border).
    I'm not sure of the length of the border as such matters, but the density of troops on the border might.

  7. #7
    First of all thank you for your analysis.

    I am not sure if troops at the border matter at all.

    Interestingly in one of my games I was increasing threat level as Germany in order to attack neighbours as early as March 1936. My threat/neutrality level remained the same regardless that I was increasing some countries threat and some not. Only France was getting more and Italy, Romania and Austria were getting less. I assume, ideology, faction and proximity caunt.

  8. #8
    Quote Originally Posted by eqqman View Post
    • Generally, if you are not a neighbor, the threat you pick up from a country is greatly reduced. However, France still picked up a decent level from the USSR despite this
    • As Indonesia, the most threat I picked up was from Malaysia, which meets all the major requirements: neighbor, different ideology, and faction membership. But the amount I received was far less than countries in similar circumstances, again leading me to conclude that Major power status (or sheer military size, which is related to such status) is important
    If the USSR built more troops then its threat was increased considerably. Besides, both countries are in opposite factions.

  9. #9
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    Quote Originally Posted by mnplastic View Post
    First of all thank you for your analysis.
    You're welcome! I'm hoping I can lure in more commentary from other folks like Piktoonis who are poking around trying to get hard answers. I did decide to try my grand experiment to threaten the entire world. The results are in this spreadsheet. In this game I played as Cuba with nearly infinite Leadership so I could maintain 10 Spies doing `Increase Threat` on every country in the world for one year. This data has a couple of notes- firstly, Japan joined the Axis at the start of December, so they and Manchukuo were faction members for 1/12th of the total time in the experiment. I don't think this skews the results however in any meaningful way. Also, the Spanish Civil War started very late, so Nationalist Spain was only in the game starting from June, so their results only reflect half a year of threat.

    You can use this data to find out who will threaten you the most if you are trying to get your neutrality down, or find out whom you should be threatening yourself in order to push a country into a faction (you can use the spreadsheet I have in the faction diplomacy thread as a companion piece to this). I would have loved to run multiple games and printed the average results of the data, but I need a scripting wonk to help out with that chore.

    Something I noticed was that you can get Hungary into the Axis by May 1937 if you raise the threat of Czechoslovakia. If you are the UK, by raising the threat of Germany, Mongolia, and Nationalist China, you should be able to proclaim a guarantee on Shanxi before the July Incident which will get the Allies into a limited war with Japan. Crush Japan just enough to save all the Chinese factions but keep them alive long enough so that you can get Shanxi, Communist China, and Nationalist China into the Allies, then finish the Japanese off by making them a puppet. The Asia war will then be over in 1938 and you can be fully prepared to hit Germany and Italy with no further distractions in the Pacific.

    Quote Originally Posted by mnplastic View Post
    If the USSR built more troops then its threat was increased considerably. Besides, both countries are in opposite factions.
    I'm still puzzled as to the best ways to increase threat without the use of Spies. Any event or decision that does something like `Gain X threat on All` seems to bypass the normal modifiers, so those are highly effective. The `defines.lua` file includes some entries on non-Spy sources of threat, but I am unclear on their efficacy. For example, mobilizing is supposed to generate threat in your neighbors (and the in-game text description says this). The LUA file has this `MOBILIZE_THREAT_IMPACT = 5.0` entry. To test it, I picked the nation with the largest army of reserves (USSR) and picked the neighbor that would be the most threatened by them (Manchukuo). I ran one month to confirm that Manchukuo wasn't already slowly accumulating threat on its own from the USSR and saw that it wasn't- after one month, it was still 0.00. After mobilizing as the USSR at the start of February and running to May, my threat on Manchukuo was still 0.00, so there are apparently some issues with this feature. But even if it worked, another question comes up- since you can click the button to mobilize/demobilize as much as you want, when would your ability to generate threat from this reset?

    There are also these entries:

    LAND_COMBAT_THREAT_IMPACT
    NAVAL_COMBAT_THREAT_IMPACT
    AIR_COMBAT_THREAT_IMPACT
    BOMBING_COMBAT_THREAT_IMPACT

    If these are the ones that relate to building units, then the names are oddly worded. Their values are also low enough that in terms of IC-days, you need to be churning out far too many troops to have this be even marginally as effective as using Spies. Basically, if Spies don't suffice to get threat raised for your intended victim, don't expect troops to make up the shortfall. I think the only time this makes any difference at all is if you are playing a nation like Germany and need to keep the UK's threat down as much as possible.

    The LUA also has this THREAT_FROM_CONVOYS_MODIFIER entry, but I'm not sure what this is supposed to modify. I don't know why building Convoys would generate threat on other nations, and Convoys usually only affect National Unity.

  10. #10
    I never used it as kind of test but from what I have noticed building brigades is the most effective way to increase threat even spies are not as good.

    I also have an assumption that more countries threaten you faster neutrality falls but this is just the six sense.

  11. #11
    With Germany right threat play you can start a war in March 1936, maybe earlier, and conquer the world by January 1938.

  12. #12
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    Quote Originally Posted by mnplastic View Post
    I never used it as kind of test but from what I have noticed building brigades is the most effective way to increase threat even spies are not as good.

    I also have an assumption that more countries threaten you faster neutrality falls but this is just the six sense.
    I'll try to run another test with brigade-building to see if I can replicate any effects. Your neutrality only drops based on the highest threat to you, so two threatening neighbors doesn't drop you any faster than only having one. However, I suspect you could make Germany for example twice as threatening if you had two different countries maintaining their own set of 10 Spies each running `Increase Threat`, but that requires a test in multi-player.

    Quote Originally Posted by mnplastic View Post
    With Germany right threat play you can start a war in March 1936, maybe earlier, and conquer the world by January 1938.
    March seems a little too soon, but maybe you can with building troops + Spies. You only need to get 35 threat from France; if you use Spies that should happen by July. However, making troops is going to make the French feel threatened by Germany, which does nothing to increase the German threat from France.

  13. #13
    Major Piktoonis's Avatar
    Europa Universalis 3Divine WindHearts of Iron IIIHeir to the ThroneSword of the Stars

    Join Date
    Jan 2010
    Location
    Vilnius, Lithuania
    Posts
    688
    I am pretty much convinced that building troops + placing them near border generates a lot of threat. As France i built huge army and deployed 1 full army near Italy's border. By the start of ww2, my threat to Italy was 15, although i did no aggressive movements.

  14. #14
    Quote Originally Posted by eqqman View Post
    March seems a little too soon, but maybe you can with building troops + Spies. You only need to get 35 threat from France; if you use Spies that should happen by July. However, making troops is going to make the French feel threatened by Germany, which does nothing to increase the German threat from France.
    You build 4 MIL brigades on "no experience" training (forgot the name - opposite "specialist") while at the same time increase threat to Lithuania and Poland (both have German cores), France, the UK and the USSR. Leave mixed economy. On 26 February 1936, Militia is completed. Place it in Rhineland, run "Rhineland" decision and start the war against Poland or Lithuania, then the Soviet Union, etc. The World is yours

  15. #15
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    Quote Originally Posted by mnplastic View Post
    You build 4 MIL brigades on "no experience" training (forgot the name - opposite "specialist") while at the same time increase threat to Lithuania and Poland (both have German cores), France, the UK and the USSR. Leave mixed economy. On 26 February 1936, Militia is completed. Place it in Rhineland, run "Rhineland" decision and start the war against Poland or Lithuania, then the Soviet Union, etc. The World is yours
    Ah... well, raising threat on countries other than France doesn't make you less neutral, but having threat on them will mean your effective neutrality doesn't need to be quite so low to declare war on those countries. In that situation I would also start raising threat on Switzerland from Jan '36 so that you can safely take out your other neighbors while having a local source of threat to keep yourself neutral.

    I did a brigade-building experiment. I saw in my notes that Paraguay was effectively a country unable to generate any threat on anybody at all. I ran up a test game where I was able to build 120 divisions of 4x INF in 1936 (it goes without saying, I had to provide help). This generated 2.1 threat on Paraguay's neighbors Brazil, Bolivia, and Argentina. In this example the military expansion was better than Spies, but not by that much. Then I fired up the Soviet Union and built 99 4x INF divisions. This produced the following threat on the USSR's neighbors:

    19.8 Afghanistan
    19.8 Estonia
    17.8 Finland
    39.6 Japan
    19.8 Latvia
    39.6 Manchukuo
    1.98 Mongolia
    19.8 Persia
    19.8 Poland
    19.8 Romania
    1.98 Sinkiang
    1.98 Tannu Tuva
    19.8 Turkey

    These numbers prompt me to guess that having a matching government type reduces your threat from other nations by 90%. Now the question arises as to why does Japan take twice the threat from these brigades as Latvia? At this point Japan is still faction-less. The only thing I see correlating is that all the countries that took ~20 threat from Russia have 90/100 base neutrality while Japan and Manchukuo took ~40 and have 60 & 70 base neutrality each.

    While somewhat effective, I still wouldn't say that troops are as good or better than Spies. They only seem to be effective in cases where you were already having an easy time generating threat due to other circumstances. If you were having a problem making threat, more troops aren't going to help you any. One thing I've been noticing is that there is very little of a `happy medium` in making threat; you can either get all you want in a year or less or you can run to 1947 without getting enough.

  16. #16
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    Quote Originally Posted by Piktoonis View Post
    I am pretty much convinced that building troops + placing them near border generates a lot of threat. As France i built huge army and deployed 1 full army near Italy's border. By the start of ww2, my threat to Italy was 15, although i did no aggressive movements.
    I've done enough tests now to see that presence near the border does nothing at all. As long as the troops exist, they generate threat no matter where you place them in your country.

    EDIT: Just redid my USSR experiment. In the first run-through, I let the AI auto-deploy the divisions. In this game, I placed all 99 divisions in Murmansk. I generated the exact same threat numbers in all the USSR's neighbors and having those troops created no extra threat in Finland over the next couple of months I watched them.

  17. #17
    I wish my research assistants had as much devotion to statistics as HOI3 players do.

  18. #18
    This is that I thought, eqqman. Placing troops on the border only attracts opposing army to be stationed there, I think.

    There is another thing which I noticed. I watched France and the UK and their threat was like a horse race - sometimes brits were leading, sometimes french, distance was shorter, longer, shorter, longer. I have feeling that there is some ramdomness in the threat increase.

  19. #19
    Quote Originally Posted by eqqman View Post
    I ran up a test game where I was able to build 120 divisions of 4x INF in 1936 (it goes without saying, I had to provide help). This generated 2.1 threat on Paraguay's neighbors Brazil, Bolivia, and Argentina. In this example the military expansion was better than Spies, but not by that much. Then I fired up the Soviet Union and built 99 4x INF divisions. This produced the following threat on the USSR's neighbors:
    It means 20 brigades create 1 threat or 0.1 threat if government is the same. To be honest I do not think if government is the same neighbour would ignore a sudden militarisation. In Paraguay's case 120 division build up would definetely mean war intentions against Brasil and Argentina IRL.

    You could run test if any other brigade type make any difference. If it doesn't then spamming MIL will increase threat significantly at little expense.

  20. #20
    Lt. General eqqman's Avatar
    EU3 CompleteFor the MotherlandHearts of Iron IIIEuropa Universalis: RomeSemper Fi

    Join Date
    Mar 2001
    Location
    The Sea of Green
    Posts
    1,559
    Quote Originally Posted by mnplastic View Post
    You could run test if any other brigade type make any difference. If it doesn't then spamming MIL will increase threat significantly at little expense.
    I've now done 99 divisions of 4x MIL, MIL + 3x ART, and 4x LARM; the threat result was the same in all cases, which would make sense if the LAND_COMBAT_THREAT_IMPACT entry from `defines.lua` is the only base value available for ground units.

    I'm still puzzled as to why Japan and Manchukuo take twice the threat as the other unaligned Asian nations which also have the paternal_autocrat gov't ideology. Neither side has cores on each other (odd, since I would expect Sakhalin island to have Soviet and Japanese cores), so aside from the base neutrality issue I don't see what is different.

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts