I hope I can clear up some things with this post on what happens with the terrainmodifiers. The reason why there are sometimes very different modifiers between two countries is because they don't always follow the same researchroute, some countries have a tech in their setup that already triggers a modifier and it seems that there is no particular sequence in the way unwanted terrainmodifiers are triggered.
I have taken John's example from the 1.06c comments thread because it shows clearly what it can lead to.
john heidle said:
blizzard_defense = 15 // blizzard_defense = -5
snow_defense = 15 // snow_defense = -5
frozen_defense = 15 // frozen_defense = -5
rain_defense = 5 // rain_defense = -15
storm_defense = 5 // storm_defense = -15
muddy_defense = 5 // muddy_defense = -15
night_defense = 5 // night_defense = -2
desert_defense = 30 // desert_defense = -15
mountain_defense = 15 // mountain_defense = 15
hill_defense = 5 // hill_defense = 5
forest_defense = 10 // forest_defense = 10
jungle_defense = 50 // jungle_defense = 30
swamp_defense = 10 // swamp_defense = 10
urban_defense = 10 // urban_defense = 10
We can already see a problem in he first line. German infantry has a blizzard defense of +15, while Soviet infantry with the same tech has -5. Germany starts the game with the modern flamethrower tech, which ads +5 to fortattack, while the Soviet Union does not. This is important because when a terrainmodifier is triggered it will pick the modifier inmediately above. In Germany's case it was the fortress_attackmodifier with a value of +5(not shown, but located directly above), while for the Soviets it most probably was the swamp_attackmodifier of -15. When both countries then actually developed Arctic Warfare Equipment, the german modifier was changed to (5+10) +15 while the soviet modifier was changed to (-15+10)+5. These two modifiers seem to have spread throughout the order untill they reached a modifier that was already present, namely mountain_defense.
The differences in between can thus be explained, in the case of desert_defense, germany picksup +5, then develops Desert Warfare Equipment and ends up with +30 while the Soviets are stuck with -15 until they develop this tech, at which point they still remain at a mere +10. Snow and frozen defense are activated by the same tech as blizzard defense.
The modifiers in between, with values of +5 for Germany and -15 for the Soviet Union, should not be there. I have several savefiles from 1936 and 1937 and none of them show them, they all pop up later in the game, with the same value as the modifier above.
I can't explain the night_defense values.
The Night_attack values seem rather odd because they recieve a modifier of +13 with the near infrared scope. it starts out at 0, then picked up -15 and the tech was developed afterwards, resulting in a value of -2.
.
On a different but related topic: I just noticed in this saved game that none of the German or Soviet mountain troops had ANY hill_attack or mountain_attack or forest_attack saved values. Since my four starting Soviet mountain troops have not fought yet I didn't notice whether there was a game effect. The other land divisions have those variables listed but neither German or Soviet mountain troops have it. I've never seen that before when I either cut and paste the terrain values into a spreadsheet or when I tried to edit a saved game to get the right values.
AFAIK mountaineers simply do not get a mountain_ / hill_ or forest_attack modifier,and what I have seen in my early savegames suggests the same, as opposed to other troops who receive a penalty between -40 and -80 in mountains, -10 or -20 in hills and -10 in forests. But with this problem it could easily pick up either frozen_attack, night_attack or desert attack, which may have been changed itself already.
I would like to add some general observations that may need further testing, perhaps they are helpful. The problem seems to appear either late in the game or after several saves. My savegames were distorted most after 1942 but since I saved them regularly every two years I am not sure if either one or both is more harmfull. The problem also seems to amplify itself. In an unmodded savegame, torpedobombers had no modifiers whereas other aircraft were heavily affected. Which is correct, since there are no combatmodifiers for Torpedoplanes. When I later included Torpedobombers in the mod, they also pickup a lot of modifiers.
With the help of Jdrou and Mithel I was able to get my tech going, so I'm hoping to have it available as a download sometime next week. If anybody is interested in the meantime I would be more than happy to mail it.