so if i understand that code snippet correctly, dark ones start in month 8 with 100% chance to find a base and 25% to actually strike it. Then on diff 4+ ninjas from month 12 to 36 with 75% chance to find and 25% chance to strike. Ninjas also on 24 months till game end with the same chances.

There's a 25% chance the mission will be triggered. If it is, it will always target a base.

So on diff 4 or higher

Difficulty starts at 0, so 4 = Jack Sparrow.

between 12 and 36 month mark you have 4 separate scripted retaliations per month,that i know of, in addition to any from shipping. Sheez im gona be busy with base defense. Not sure when/if rats and the ambulance stop so it may be as many as 6.

Actually, you have 1 Dark One, 2 Ninja, 1 Ratmen (change to trigger drops significantly after 23 months), 1 + difficulty level (start at 30, 24, 24, 20, 16 months respectively) regular faction ones. Unless I missed something.

The irregulars spawn an ufo with 300 HP, so even 2 Luxury Barracks are enough to shoot them down.

someone help, I've tanked to negative 2000 points without missing any missions or getting a notification for a Rival base

Do I have to scout enemy bases after the first one?

Whether or not an enemy base will be revealed is random with a chance for it every month. There are also multiple missions that cause negative score (Conversion, Peacekeeping, Mutant Progrom with contacted Mutant Alliance come to mind), so you might've just gotten an unlucky RNG result.