Hello everyone

Actually, I'm playing a great mod where the auto retreat is ON and it really spoils my entertainment.
I wonder: does someone know how to turn auto retreat OFF in any mod?
I mean: when you are knocked out in a fight, some mods automatically retreat your entire army...I'd like to disable that script.
If someone could explain me how to turn this auto-retreat script off, I'd be eternally thankfull.
Thanks a lot for your answers.
PS: I'm not looking for a mod where the feature is already implemented, I'm searching for a way to add it in a mod.