I did not have a chance to reply to this thread last night as I was away from my computer although I could read the discussion on my phone. There was a lot of misinformation happening and it was frustrating to not be able to respond sooner.
Pretty much the latest post by xelnia does a nice job of summarizing what is going on with the internal difficulty. In addition, I will try to correct and add a few points.
There are 2 kinds of "difficulty" in DK: the base internal difficulty (BD) of which there are 5 flavors, and the modified difficulty (MD) which comes in 3 flavors. These two different scales are used in different ways for different things.
I STRONGLY recommend moving away from this terminology which was pretty much just invented during this thread and serves no purpose other than to add confusion.
The way that the software works is that there are FIVE different internal difficulties (reference to something additional such as difficulty 0 might refer to the attract mode or it might just be sloppy code that was not cleaned up but is never executed, etc). These align with the Level number (maxed out at 5) to begin each screen and then increment after some time has passed if the player has not yet completed the screen as described by xelnia. His chart at the bottom of his latest post does a nice job of showing what happens within each internal difficulty.
Do NOT refer to "modified internal difficulty". There is no such thing. You guys are seeing a couple of lines of code within the barrel steering routine and drawing incorrect conclusions. This is simply the algorithm chosen by the programmers to implement the portion of xelnia's chart which shows barrel steering frequencies at various internal difficulties. They could have written it out like "if internal difficulty == 1, then frequency = 25%. Else if internal difficulty == 2, then frequency = 50% . . . " and so on. But they did it in sort of a complex way presumably to save some code space and perhaps to improve efficiency or whatever. This calculation is created, used, and then erased from memory in a small fraction of a second. "Modified internal difficulty" really does not exist as a game state in the same manner as "internal difficulty". "Internal difficulty" was a term coined by Don Hodges a long time ago before anyone else knew that any of this stuff was happening in the game and I believe the term is a good one and I am happy to see it used widely today.
Use "Level" for the current level (example, "L = 3" would be "Level 3").
Use "Screen" for individual boards within the Level. (The first Pie Factory Screen is on Level 3, on Screen 3-2. The "Kill Screen" occurs on the 117th Screen of the game, which is on Level 22.)
Use "Difficulty" or "internal difficulty" to refer to one of the five game states as described in xelnia's post above.
Internal difficulty 3 is required for freezers to exist.
Wild Barrels:
However, unlike fireball speeds, the code only points to 3 different types of wild barrels.
This is true, and imo, for clarity, the keyword here is "types". The type of wild barrel is tied to the current internal difficulty, with new types of wild barrels appearing at internal difficulties 1, 3, and 5. Because of this, very early on folks such as Don Hodges described these barrels as:
Type 1 wild barrel: During internal difficulties 1 and 2.
Type 2 wild barrel: During internal difficulties 3 and 4.
Type 3 wild barrel: During internal difficulty 5.
I think this naming convention works well, but it only works if everyone is aware and is not confused by the differences in the numbers between the Type number and the internal difficulty number where it first appears.
Because of this potential confusion, during my streams I will often verbally refer to the three types of wild barrels as:
"Level 1 wild barrel": During internal difficulties 1 and 2.
"Level 3 wild barrel": During internal difficulties 3 and 4.
"Level 5 wild barrel": During internal difficulty 5.
You can see that strictly speaking this mixture of terminology creates inconsistency although when speaking verbally and informally about this subject I have found that viewers are most likely to know what I am talking about when I use these phrases.
Note that "bombs" are also wild barrels and are beyond the scope of this post except to mention that there is nothing about internal difficulties which directly impact bombs.
Note: Fireball spawn intervals on rivets are fixed on each board, regardless of changing internal difficulty during the board. Fireball spawn intervals on conveyors are a little more complicated, but also don't rely on the shifting internal difficulty during the actual board.
The exception to this, as far as I know, is that the 4th and 5th fireballs on the Level 3 Pie Factory and the 5th fireball on the Level 4 Pie Factory ARE spawned due to the change in the internal difficulty during those screens.
A few more details:
The frequency and timing of how Kong releases barrels onto the screen IS affected by internal difficulty.
I believe (not 100% confirmed) that the average smash value of a fireball or firefox IS affected "indirectly" by internal difficulty. This is WAY beyond the scope of this post, but if this is true it would be because of the changes to their animation patterns and frequencies which has been proven to be one of the factors which determine their smash values.
I hope that helps!