Anyone want to test?
Save compatible.
This is in scripts.txt (same line a posted above. Back up the file).
Look for 2 numbers in the line:
3500 decrease this number to about 1 to 400.
Nobody runs troop will less likely to run if the calculation return negative number or very small number (smaller than courage score). 400 is about 10 hitpoints left (40 * hitpoints).
3700 decrease this number to about 1 to 400. Similar as above. Need to get a very small number to make troops stop/not running.
decide_run_away_or_not -1
36 23 2 1224979098644774912 1 23 2 1224979098644774913 2 525 3 1224979098644774914 1224979098644774912 15 4 0 31 2 1224979098644774914 0 4 0 30 2 1224979098644774913 30 525 3 1224979098644774915 1224979098644774912 16 1720 2 1224979098644774916 1224979098644774912 2107 2 1224979098644774916 4 4 0 1706 1 1224979098644774912 2106 2 1224979098644774916 100 3 0 2107 2 1224979098644774916 10 2121 3 1224979098644774917 3500 1224979098644774916 2147483678 2 1224979098644774915 1224979098644774917 1718 2 1224979098644774918 1224979098644774912 2147485155 1 1224979098644774918 1751 1 1224979098644774912 505 3 1224979098644774912 15 1 3 0 5 0 525 3 1224979098644774915 1224979098644774912 16 1720 2 1224979098644774916 1224979098644774912 2107 2 1224979098644774916 4 4 0 1706 1 1224979098644774912 2106 2 1224979098644774916 100 3 0 2107 2 1224979098644774916 10 2121 3 1224979098644774919 3700 1224979098644774916 30 2 1224979098644774915 1224979098644774919 1752 1 1224979098644774912 505 3 1224979098644774912 15 0 3 0
Edit: I did some quick test. The change did not stop troops from running even when I drop the numbers to 1. However, I saw a lot less routing. Other factors that effect rorale such as allies death have not been changed yet. So it might be possible for troops' morale to drop below zero.
Edit 2: I've been messing with the wrong number. if you want to completely trun off routing, change the purple number (1751) to 1752. Basically, you just change the command that tells troops to run (1751) to a command that tells troops to stop running (1752).
Just to be safe, change the second "1" after the number 1751 to zero (the yellow number I marked). That will set the troop to not running mode which might be used for another script calling later.
If you just simply want to tone down routing, adjust the red and blue numbers. I might use 1.