• 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.
Unfortunately no. From what I can tell, air defense for ground and naval units and surface defense for air units are not used at all. Didn't want to dig too deep, but It seems like defensiveness/air defense/sea defense are used instead. So, it's a deliberate design, it will require a lot of work to rework this.

Thank you anyway
 
IIRC, the nature of the bug is same than the defense/toughness old bug. If so, the fix should aim the .exe file too. Do you remember what values did you try to change? Maybe unit&tech statistics, or basics combat mechanics (LAND_COMBAT_STR_DICE_SIZE etc)? That wouldn't work IMO.
It was definitely not the combat variables (...DICE_SIZE), it had to do with the effect of the defensive and toughness techs, and was listed as a decimal fraction. As said, those SHOULD have been percentages, and are used as such by the combat system, so as a decimal fraction they only provided 1% of the effect that they SHOULD have had, which was often beneath the level of rounding errors. I eventually edited them upward by about 20X to bring them up to the "weak, but not useless" level (rather than 100x as originally intended), because any further caused differences in the way air versus air, air versus ground, and air versus sea combat worked. What was right for one was wrong for the others.

This bug and the discussion about it goes all the way back to the Semper Fi expansion where it was noticed, and fixed for ground combat in the final patch for that expansion. Unfortunately, it wasn't fixed for air combat. Any information on the topic has long since been buried deep in the forum archives.

I'm going to have to dig into the files again after all these years and see if I can piece together what I did (which was mostly based on other players' findings at the time), and how it affected the game. As said, it wasn't a "good enough" answer, although it seemed to be on the right track but with unwanted side effects.

As per Graf's comments about some values apparently not being used at all, if the program is expecting an integer value (percentage), but getting a decimal fraction instead, would it truncate the value? That would make even a 50% increase to the stat (0.50) irrelevant unless it happened to cross a whole number boundary. Rather than "not working at all", I suspect that the combat resolution algorithms may be "working", but are getting completely wrong input numbers that produce wrong results. The offense values were probably tweaked downward to balance the game for the near-total lack of defense. Unfortunately, they seem to have been tweaked DIFFERENTLY for air-air, air-ground, and air-surface combats.
 
Last edited:
It was definitely not the combat variables (...DICE_SIZE), it had to do with the effect of the defensive and toughness techs, and was listed as a decimal fraction. As said, those SHOULD have been percentages, and are used as such by the combat system, so as a decimal fraction they only provided 1% of the effect that they SHOULD have had, which was often beneath the level of rounding errors. I eventually edited them upward by about 20X to bring them up to the "weak, but not useless" level (rather than 100x as originally intended), because any further caused differences in the way air versus air, air versus ground, and air versus sea combat worked. What was right for one was wrong for the others.

This bug and the discussion about it goes all the way back to the Semper Fi expansion where it was noticed, and fixed for ground combat in the final patch for that expansion. Unfortunately, it wasn't fixed for air combat. Any information on the topic has long since been buried deep in the forum archives.

I'm going to have to dig into the files again after all these years and see if I can piece together what I did (which was mostly based on other players' findings at the time), and how it affected the game. As said, it wasn't a "good enough" answer, although it seemed to be on the right track but with unwanted side effects.

As per Graf's comments about some values apparently not being used at all, if the program is expecting an integer value (percentage), but getting a decimal fraction instead, would it truncate the value? That would make even a 50% increase to the stat (0.50) irrelevant unless it happened to cross a whole number boundary. Rather than "not working at all", I suspect that the combat resolution algorithms may be "working", but are getting completely wrong input numbers that produce wrong results. The offense values were probably tweaked downward to balance the game for the near-total lack of defense. Unfortunately, they seem to have been tweaked DIFFERENTLY for air-air, air-ground, and air-surface combats.


Whatever you can find, I'd have interest in it
I intend to take a deep look at this during my vacation in July
I will test this and see what can come out of it

So far, what I understand from my reading :

Tech bug
- For instance, for a given tech upgrade, instead of 5%, they should have put, lets say, a value of +5... so the error induces a change of defensive value of 0.0005 instead of 0.05

Air-to-Air
- The defensive values are used, but they don't change due to tech not doing their job

Air-to-surface
- The defensive values are used, but they don't change due to tech not doing their job


The case of port strike

This has been reviewd iin this thread among others (https://forum.paradoxplaza.com/foru...ace-defense-of-airplanes-bugged.572601/page-2)
I suspect this test was biased because the mission is a port strike, e.g., it attacks "ports" and does damages to both the port, and ships in it, as well as an attack on "air_base" would do damages to the airfield, and planes in it... In the latter, value of planes are not considered for the defense. So, why would it be taken into account for the port strike ? I could not assess if the author of the tests did it at sea... or in the air...

The thing that tells me port_strike obeys to a different system is that if you attack a fleet at sea, with air units, your ait units mai get shredded by a huge fleet... e.g. because there is a lot of AA available. So the air_defense at sea works as intended.
 
Last edited:
This gets stranger. I loaded up the "defines.lua" file into notepad last night to try to remember what was changed, and there is NOTHING in there even vaguely close to the variables I half-recall from the old Semper Fi expansion when those changes were originally made, and experimented on by the forumites. I've got a rough idea of what each of the air combat variables in the current file does, and none of them apply. There are still the AIR DAMAGE variables, which I recall had to be edged up slightly to compensate for the higher defenses, and I spotted one which relates to the effect of Doctrines on air combat, but nothing to affect how TECHS affect Defensiveness and Toughness, or how the base values of Defensiveness and Toughness affect air combat.

My suspicion is that the changes to Defensiveness and Toughness in land combat were implemented hastily for the final Semper Fi patch, and the air values were dabbled with by the community at that time because they seemed to have been overlooked in the final official SF patch. The FtM and TFH expansions may have been more extensively reworked, and the variables no longer available in defines.lua. The really hilariously bad situation would be if the decimal fraction to percentage change was corrected in the .exe file for FtM, but the affected variables in defines.lua were simply left out and never set.
 
This gets stranger. I loaded up the "defines.lua" file into notepad last night to try to remember what was changed, and there is NOTHING in there even vaguely close to the variables I half-recall from the old Semper Fi expansion when those changes were originally made, and experimented on by the forumites. I've got a rough idea of what each of the air combat variables in the current file does, and none of them apply. There are still the AIR DAMAGE variables, which I recall had to be edged up slightly to compensate for the higher defenses, and I spotted one which relates to the effect of Doctrines on air combat, but nothing to affect how TECHS affect Defensiveness and Toughness, or how the base values of Defensiveness and Toughness affect air combat.

My suspicion is that the changes to Defensiveness and Toughness in land combat were implemented hastily for the final Semper Fi patch, and the air values were dabbled with by the community at that time because they seemed to have been overlooked in the final official SF patch. The FtM and TFH expansions may have been more extensively reworked, and the variables no longer available in defines.lua. The really hilariously bad situation would be if the decimal fraction to percentage change was corrected in the .exe file for FtM, but the affected variables in defines.lua were simply left out and never set.


Arhg...

I read a couple of threads over the course of the last days from the "project-mayhem-beta-forum". I still have some reading to do.

Seems like Podcat admitted that some of the issues were still left unattended after TFH... mainly ground/naval defence vs air attacks... as the AA (ground/naval to air attack) was working as intended but the ability of a ground unit or a naval unit to evade a shot was not (e.g. ground/naval to air defence)... which would explain why a plane gets deorg/shredded when attacking units on the ground or at sea, but the tests showed no results when tweaking the defence values.

Old Podcat saying :

looking at the code surface defense and air defense both have the same problem for Air vs Ground/Naval. e.g dont affect hit chance. But I might have missed someplace non-obvious, I just did a quick investigation

The (shitty) solution is to increase air attack on the units you add to protect against air attack, so they shoot down planes basically.


This means that some techs are useless per se... all those that increase the air defence values

This also means that something can be done at least trough the AA side of the equation (ground/naval attack vs air)


--------------------

Variables still there that could be of interest

Code:
BASE_CHANCE_TO_AVOID_HIT = 70.0,      -- Base chance to avoid hit if defences left.
CHANCE_TO_AVOID_HIT_AT_NO_DEF = 48.0,     -- chance to avoid hit if no defences left.

AIR_COMBAT_ORG_DICE_SIZE = 9,                            -- this mechanic is similar to LAND. 1 air attack has a chance to land a hit. If the hit land, they get to roll a dice from 1-9 or 1-4.
AIR_COMBAT_STR_DICE_SIZE = 4,                            -- this mechanic is similar to LAND. 1 air attack has a chance to land a hit. If the hit land, they get to roll a dice from 1-9 or 1-4.

AIR_COMBAT_CRITICAL_HIT_DAMAGE_MUL = 10,                -- it's a 10% chance to land a 10x hit. Air combat really was that deadly and random.
AIR_COMBAT_CRITICAL_HIT_DAMAGE_CHANCE = 10,                -- it's a 10% chance to land a 10x hit. Air combat really was that deadly and random.

AIR_COMBAT_ORG_DAMAGE_MODIFIER = 12.5,                    -- This modifier functions similarly to the above ground modifiers, so a hit (1) can do a certain amount of damage (1-9) which is then modified by this (multiplied by 12.5).
AIR_COMBAT_STR_DAMAGE_MODIFIER = 10.0,                    -- This modifier functions similarly to the above ground modifiers, so a hit (1) can do a certain amount of damage (1-9) which is then modified by this (multiplied by 12.5).

AIR_COMBAT_NAV_SURPRISE_CHANCE = 25,                     -- Chance of attacking naval bombers getting a surprise bonus (%)
AIR_COMBAT_NAV_SURPRISE_BONUS = 0.75,                     -- Naval bomber surprise attack bonus
AIR_COMBAT_NAV_SURPRISE_ROUNDS = 3,                     -- Combat rounds that the naval bomber surprise chance lasts. Per each naval bomber to ship attack, check for surprise bonus. There is 1/4 chance of that at the beginning of bombing by naval airplane onto a naval ship target. It's a 75% bonus to damage per attack!

AIR_COMBAT_CAG_ORG_DAMAGE_MOD = 0.70,                     -- ORG damage to CAGs is multiplied by this Downfall 0.70 instead of 0.75 / this only controls the damage CAGs take from other air units. Ie, the total multiplied damage will take a 0.75 modifier just for cags. It does not affect naval air attack.
AIR_COMBAT_CAG_STR_DAMAGE_MOD = 0.70,                     -- STR damage to CAGs is multiplied by this Downfall 0.70 instead of 0.75 / this only controls the damage CAGs take from other air units. Ie, the total multiplied damage will take a 0.75 modifier just for cags. It does not affect naval air attack.

BOMB_REGIMENT_DAMAGE_MODIFIER = 1.85,                     -- bombing ground units (damage modifier > 1 makes the bomb attack stronger)
BOMB_SHIP_DAMAGE_MODIFIER = 1.05,                         -- bombing ships
BOMB_WING_DAMAGE_MODIFIER = 1.05,                         -- bombing airplanes (on ground)

AIR_COMBAT_ON_BOMBING = -0.3,                            -- DOWNFALL: was -0.1 / This is another scaled modifier (doesn't translate exactly in game) to bombers when intercepted. For example, CAGs in air combat will do ~-10% less damage. I have tested this before and for some reason it does not go 1:1 in the game. Our HPP MP mod has -0.4 and typically I see values of ~ -20-30% in the battle window instead of -40%.


Also this one, altough I'm not what it does... except maybe put a threshold on the min required org level to go for a cag_duty mission ?

Code:
CAG_DUTY_MINIMUM_ORG_LIMIT = 0.20,
 
Last edited:
Not to dredge this up, but @Paglia, did you ever happen to test the outcome of that fix for the Minister traits?
 
Not to dredge this up, but @Paglia, did you ever happen to test the outcome of that fix for the Minister traits?
The one to use a hex editor on the .exe? I did it myself and it does work to slow down the decay as intended. I think individually it has to be done unless Paglia is able to transmit that exe. I suppose it's not against the rules.
 
Well that's good--with the sudden changes in how the GDPR (or GPDR?) affects previous versions of Paradox games that could present an issue. I would love that to be made into a "final" version.

Speaking of, what hex editor do you use?
 
Well that's good--with the sudden changes in how the GDPR (or GPDR?) affects previous versions of Paradox games that could present an issue. I would love that to be made into a "final" version.

Speaking of, what hex editor do you use?
I can post late morning tomorrow when I can look into my computer.

It definitely makes the theory techs much more valuable. Having Hitler for artillery practical and building lots of provincial AA and outfitting your soldiers with howitzers makes all the best techs advance so much more quickly, the tank guns, and infantry light artillery. It takes a full 6 months less for '40 tank gun than any other light tank tech in my game.
 
Interesting!
 
This is interesting. 6 months is a lot. So far, I have always ignored theoreticals and practicals, never opted for ministers with such traits, because it is my understanding that the game is simply too short for that stuff to matter. I mean... when you play a minor, you can conquer the world by 1944 (I did it with Switzerland). If you're a major, I guess you could do it between 1941 (Germany or SU) and 1943 (Italy). That gives you 5 years as the top powers, slightly more as any other country.
 
I'm working on trying to see about how much effort a "Darkest Hour, HoI3 Edition" would take (aside from the obvious answer: a lot!) and this sort of thing is one of those fixes that I'd like to work on getting into the game.
 
This is interesting. 6 months is a lot. So far, I have always ignored theoreticals and practicals, never opted for ministers with such traits, because it is my understanding that the game is simply too short for that stuff to matter. I mean... when you play a minor, you can conquer the world by 1944 (I did it with Switzerland). If you're a major, I guess you could do it between 1941 (Germany or SU) and 1943 (Italy). That gives you 5 years as the top powers, slightly more as any other country.
Yep, getting 20 artillery practical is easy and cheap and Hitler keeps it all well oiled for years so you can focus on other stuff like tank practicals. I had about 5 tank practical with only a 6 serial Ltank brigade starting out until '39.

I'll try out Soviets as their infantry theory and practicals should rise massively. Prolly get '42s by '39 I bet.
 
Do practicals help with Research?!
Ye. The practicals are the blue icons under the tech bars. All those icons tell you which theories and practicals help speed up research. The max is twenty in a theory or practical. Look for the arty pracs, they pop up in a bunch of decent equipment.

Many military techs mostly rely on doctrines and combat experience though, and doctrines take forever to get up without the blood and the mud. That's another area where the Sovs have huge potential to get swag doctrine techs. It doesn't matter whose blood or even what tactics you get in battle, the blue "courage" icon goes up when men die and the Sovs can kill a lot of people and then get faster doctrines, even tank and mobility.

Oh, ye, and all the supplies movement techs, and combat casualty techs, are purely sped up by combat experience.
 
Last edited:
The one to use a hex editor on the .exe? I did it myself and it does work to slow down the decay as intended. I think individually it has to be done unless Paglia is able to transmit that exe. I suppose it's not against the rules.

I did the change but I can't assess if it does what it is supposed to do (e.g. I did not test it specifically)
 
I did the change but I can't assess if it does what it is supposed to do (e.g. I did not test it specifically)
I definitely works. Germany starts with 10 prac in small planes and two ministers can decrease the decay by -5 along with a -20 to aero theory and the other does -20 to small prac and +5 to air intercept. The decay is visibly slowed a lot. It works in your mod, and being an exe change, it will work with them all.
 
I definitely works. Germany starts with 10 prac in small planes and two ministers can decrease the decay by -5 along with a -20 to aero theory and the other does -20 to small prac and +5 to air intercept. The decay is visibly slowed a lot. It works in your mod, and being an exe change, it will work with them all.


Cool
Thanks for assessing that