[MOD] (Alpha 3F) Determined Raiders (Raiders who fight to the last man)

Started by Justin C, May 11, 2014, 01:33:56 AM

Previous topic - Next topic

Justin C

Determined Raiders!
This mod was requested on the forums. In the thread someone mentioned that they were working on it but they got stuck, and it has been almost two weeks since anyone else has posted in the thread. I needed to figure out how to do this for a bigger mod I am working on, and when I got it working I remembered that thread and figured I would release it for whoever wanted it.

There are two mods in here. One adds Determined Raiders as an alternative raid type that is 1/4th as common as normal raids, and the other completely replaces the old enemy raids with Determined Raiders. You only need one of the mods active at a time.

Features:
- Determined raiding parties will not give up when the raid has gone on for too long.
- Determined raiding parties will not flee when they have lost too many raiders.

Source included, though much of the code is basically unchanged from the original classes.

Download:
http://bit.ly/DeterminedRaiders

*Disclaimer*
This mod is a hack. I couldn't write my own SquadBrain_FleeChecker because the functions I needed weren't set to be overridden, so I had to use the numPawnsEverGained to trick the brain into thinking the raiding party is bigger than it actually is so the brain would allow them to lose all of their members before trying to flee. So far it seems to work as intended without any unintended consequences.

iame6162013

now we have to kill raiders damn ...
or we could just use 5 layers of wall...+repairing=Win :P
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
Robert J. Hanlon: "Never attribute to malice that which is adequately explained by stupidity."

Evmeister

Oh this will be perfect, I no longer will have to chase them down to kill them!

MrDecay

I get killed by raiders enough as it is and now their determined  :'(
I have not failed. I've just found 10,000 ways that won't work.
-Thomas Edison