Sometimes, I'm inclined to listen to others, in this case, to this idea.
The idea of this feature is that with Arulco blowing up in open warfare, opportunistic forces decide to benefit from the overall confusion and attack our weakspots. Small forces seemingly pop up from nowhere and attack cities/SAM sites we do not (sufficiently) defend. While they don't permanently hold territory (they vanish after each attack), their tendency to kill civilians makes it imperative we stop them.
There are three types of attacks we face:
bloodcats
zombies (if that feature is active that is)
bandits
Every day, these forces get reinforcements according to their ini settings, and then decide on possible raids against player-controlled sectors. Note that bloodcats and bandits aren't entirely stupid, they will only attack sectors if the defense forces aren't too strong (as seen in the video, they do not take into account militia reinforcements from other sectors, which bites the bloodcats in the ass in the above video). Zombies don't care about that
Once an attack happens, the forces attack the sector from the direction of an adjacent accessible non-city sector. Due to coding reasons, even bandits belong to the 'creature' team, which means they will attack everyone, including civilians (if that sounds odd, mentally replace 'bandits' with 'deniable death squads'). If they kill a civilian, that results in a loyalty penalty. If they defeat us in autoresolve (or we didn't even defend the sector), that still happens.
Bandits are on the same stat & trait level as green militia/enemy admins, and draw their equipment from the enemy admin tables. Unlike other creatures, they can be captured and will be treated as ADMIN prisoners.
Bloodcats only attack at night, which allows them to get closer to your forces without immediately being gunned down (not in the video though, for... educational reasons).
As we might want to control where these raids are allowed to happen, we can do that via Map/SectorNames.xml:
Note that in stock this is only set in town/SAM site sectors. It would work everywhere, but this is kinda pointless in the wilderness - an attack would only happen if player forces happen to be there at the time the raid is scheduled.
I omitted some sectors - west of Grumm, southern parts of Meduna, maps that are just tedious to defend - because there is no proper territory these forces could attack them from. If we ever implement mermaid attacks, that might change.
[Raid Settings]
;******************************************************************************************************************************
; These settings control whether randomized raids occur in player-controlled sectors
;******************************************************************************************************************************
;------------------------------------------------------------------------------------------------------------------------------
; If the player doesn't defend his city sectors/SAM sites enough, opportunistic forces can attack them at night.
; These attacks occur if these sectors have only very few mercenaries or militia present.
; Raids can be done by
; - bloodcats
; - zombies (requires zombie feature to be active)
; - bandits
; These forces will attack anyone in a sector and can also fight in autoresolve. If your forces are defeated, this will result
; in a severe morale loss.
;
; Whether a raid can happen in a sector at all is set in TableData\Maps\SectorNames.xml with the
; <bloodcatraidpossible>/<zombieraidpossible>/<banditraidpossible>-tags.
;
; NOTE: THIS WILL MAKE THE GAME HARDER!!!
;------------------------------------------------------------------------------------------------------------------------------
; set to TRUE to enable raids
RAID_BLOODCATS = FALSE
RAID_ZOMBIES = FALSE
RAID_BANDITS = FALSE
; base value determining how fast the forces are replenished daily. Higher means more forces.
; Values from 1 to 100, default 3.
RAID_REPLENISH_BASEVALUE = 3
; how many troops are allowed in a raid at maximum?
; If the size of a bloodcat or bandit raid is lower than the defensive force' size, they will not attack.
; Zombies have no such inclination and will attack regardless.
RAID_MAXSIZE_BLOODCATS = 8
RAID_MAXSIZE_ZOMBIES = 12
RAID_MAXSIZE_BANDITS = 6
; How many attacks can happen potentially in a single night? Note that if player forces are strong enough, no attack will occur.
RAID_MAXATTACKSPERNIGHT_BLOODCATS = 3
RAID_MAXATTACKSPERNIGHT_ZOMBIES = 3
RAID_MAXATTACKSPERNIGHT_BANDITS = 3
Whenever we kill a bloodcat/zombie/bandit during such a raid, they will not be able to attack again - it is thus possible to completely drain their forces, though they do get daily reinforcements.
Note that bandit reinforcements are are somewhat depending on game progress (more bandits later on), while bloodcat get a lot less once their lair has been destroyed. Zombies are just... a lot.
The intent of this feature isn't to directly rival enemy attacks - though you can achieve that by turning the settings up enough - but to force the player to defend his territory better, or experience sudden ambushes in the hinterland.
I am well aware that the fact that these attacks happen so suddenly and feel a bit unfair. In that regard, I am planning a little something that should give the player a chance to knwo when attacks will happen, but for now. this will suffice.
This feature is savegame compatible.
This has been added to the trunk in r8454 and GameDir r2420. Using the new exe without the new GameDir poses a significant drain on your mana pool.
[Updated on: Sun, 15 April 2018 20:59]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Messages:344
Registered:July 2006 Location: France
Very nice feature, one again. A nice addition for the existing game and for mods too !
I didn't get why it would be pointless in the wilderness exactly. Regarding bloodcats it would be redundant with the existing ambushes, but bandit ambushes could be interesting. Do i miss something ?
Messages:384
Registered:December 2017 Location: here
RunAwayScientist wrote on Mon, 16 April 2018 18:27
Huh, so this is how I can kill off all of Kingpin's troops without engaging them myself.
Bravo. I will exploit this to its full potential.
Why prevent the even bigger exploit(which btw aready existed in vanilla, at least partially)
to get >20 commandos incl ammo and armour by stealing them from kingpins goons?
On min item progress setting it has much higher impact as effect is not limited to fewer bandits in San Mona.
Besides, regarding smFaces.sti:
Saw the 2 traffic signs and wonder whether they are intended to take e.g. a bloodcat skull if one is present?
Also the bandits portraits may need to be replaced in long term
as the auto resolve bandit portraits will "collide" with sets for N/R/E-PC based on Wiz8 portraits like e.g. this one 1st & 2nd variation
@grim: Wilderness is rather pointless, because:
Every day at 7:00 we run a little function. All raid teams get their daily reinforcements and roll which sectors they will attack for today, and at what time (thus as a sideeffect, any sectors we take after that are safe from raids for today). While it would be possible to decide on what sector to attack later, I coded this for a reason - with a soon-ish update to intel, the player will be able to learn of these attacks beforehand, which wouldn't be possible if the locations are changed on the fly. As a result, a wilderness attack would only ever occur if the player forces happen to be present at the right sector at the right time, and are small enough for the raid to happen. It's possible, but... rare I guess.
@RunAwayScientist: Yes and no. In stock, San Mona gets no raids (any lowly bandit or hungry cat would think twice about attacking a city armed to the teeth). If no player forces are present, nothing would happen - you get the message that civs have been killed, but without loyalty, that doesn't do anything.
However, if the player is prestnt and combat happens in tactical, this becomes a lot more devastating than you might have thought. Civilians (which include all of Kingpin's men) only become hostile to anyone if the player attacks them. Otherwise they simply won't fight back. A single bandit can defeat them by shooting at them until his gun runs dry, then beat the entire sector to death. They simply don't fight back. Unless we 'awaken' them by attacking them, then they'll kill creatures (and us).
So... yeah.
@townltu: The traffic signs are simply placeholders, in case I add new faces and forget to commit the file. I wanted to add pink unicorns in the beginning, but the palette has no pink :-(
As to the faces... yep. All in time, I guess.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
I rather doubt Ms. Merkel is proactive enough to pose a legitimate zombie threat. And those bandits look way too unsettling.
[Updated on: Thu, 19 April 2018 22:54]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.