Routing / Lost Heros

正在查看此主题的用户

Khalim

Sergeant
Is there a possibility to disable this feature?

Tweak MB does not support this feature anymore..

I dont like the routing of enemies, because it makes battles take longer(unnessessary), easier(no need) and considerable imbalance mounted troops/heros



Edit.:

Is there also a possibility to keep your heros if you lose a battle?

I would like to play on "realistic" but losing all heros after defeat is bull****!



Please give me some tips how I can change this. Especially loosing all heros after defeat is very demotivating on playing "realistic".
 
There is some code in the module system that defines the chances on loosing your heros after a (lost) battle. I cant really recall where it is located, but if i had to guess it would be scripts.
 
(Routing) It's in scripts.txt, I've been fiddling with it for a couple of days now based on what I read in this ages old post:

SPD_Phoenix 说:
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). :smile:

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.

The change isn't working as far as I can tell when I've tried, but there is "more" stuff in the text now and multiple instances of the numbers.

That is the main tweak I use from tweakmb as well, routing is pretty much a quality of life issue and drives me nuts.  if someone else wants to jump in and see if they can figure out how to turn it off I'd be appreciative to say the least.

The lost heroes thing I don't have a clue on, I've never even considered changing that.

EDIT:  I've not tried the 3500-3700 tweaks for "toned down" routing, so I'll give that a try instead of the actual turn off tweak.
 
Thanks for the answer, i hope somebody else could help :smile:


Routing of enemies is nothing but annoying, because it disadvantages foot troops. Also if you have archers they might shoot at routing enemies while other enemies come closer. The worst thing is, that it increases the time a battle takes and it is very annoying if one single enemies climps up a mountain, is difficult to get and takes a long time to rout :wink:


Disabling heros disappearance would also be awesome!

I like to play "profimode" So i play on "realistic"(without saving) but in return I doubled the XP me and my heros get.
This makes much more fun. Progress is faster and you have to decide more carefully.
Playing realistic with increased XP gaining would be the ideal game mode IF you wont loose ALL heros after defeat..
Disabeling this "feature" would really be a big deal!
 
Khalim 说:
Routing of enemies is nothing but annoying, because it disadvantages foot troops. Also if you have archers they might shoot at routing enemies while other enemies come closer. The worst thing is, that it increases the time a battle takes and it is very annoying if one single enemies climps up a mountain, is difficult to get and takes a long time to rout :wink:

Have you turned on spear bracing and AI formations?
 
Have you turned on spear bracing and AI formations?

Yes, but it does not make much difference.

What exactly do this features influence? Spearbracing is extra damage to cavalery? AI Formation I have never seen...
 
Stop(basically) routing. Find the decide_run_away_or_not and then find the 45 that I bolded and replace with a rather high number, I used 1800. This is the number of seconds before they can decide to run, setting it to something like 1800 would mean they won't decide to run for about 30 mins, if the battle lasted that long it probably is time to run... for somebody anyways

decide_run_away_or_not -1
52 23 2 1224979098644774912 1 23 2 1224979098644774913 2 2133 2 1224979098644774914 0 1770 2 1224979098644774915 1224979098644774912 1773 2 1224979098644774916 1224979098644774912 4 0 2147483678 2 1224979098644774916 9 1785 3 1224979098644774917 1224979098644774915 1224979098644774916 31 2 1224979098644774917 14 2133 2 1224979098644774914 1 3 0 525 3 1224979098644774918 1224979098644774912 15 4 0 31 2 1224979098644774918 0 4 0 31 2 1224979098644774914 1 1735 1 1224979098644774912 1751 1 1224979098644774912 505 3 1224979098644774912 15 1 5 0 30 2 1224979098644774913 45 525 3 1224979098644774919 1224979098644774912 16 1720 2 1224979098644774920 1224979098644774912 2107 2 1224979098644774920 4 4 0 1706 1 1224979098644774912 2106 2 1224979098644774920 100 3 0 2107 2 1224979098644774920 10 2121 3 1224979098644774921 3500 1224979098644774920 2147483678 2 1224979098644774919 1224979098644774921 1718 2 1224979098644774922 1224979098644774912 2147485155 1 1224979098644774922 1735 1 1224979098644774912 1751 1 1224979098644774912 505 3 1224979098644774912 15 1 3 0 5 0 2147483679 2 1224979098644774914 1 525 3 1224979098644774919 1224979098644774912 16 1720 2 1224979098644774920 1224979098644774912 2107 2 1224979098644774920 4 4 0 1706 1 1224979098644774912 2106 2 1224979098644774920 100 3 0 2107 2 1224979098644774920 10 2121 3 1224979098644774923 3700 1224979098644774920 30 2 1224979098644774919 1224979098644774923 1752 1 1224979098644774912 505 3 1224979098644774912 15 0 3 0
 
haha no problem, as I too find it annoying when the enemy suddenly decides to break ranks and run. bunch of cowards lol
 
Very cool!

This makes battles on foot more fun! :smile:


It would be an overkill if I can disable companions speading over the world, then I can play on realistic.
 
Any resolution on this? Anyone come up with a definite answer for what works? I've been trying to test it but recently every single battle has caused CTD (started before I tried this tweak, trying to work it out via FAQ and Support threads but  :cry: )
 
Ogrecorps 说:
Any resolution on this? Anyone come up with a definite answer for what works? I've been trying to test it but recently every single battle has caused CTD (started before I tried this tweak, trying to work it out via FAQ and Support threads but  :cry: )
On the routing bit? Quarz's text tweak is correct. The number he has bolded is the value, in seconds, before which bots cannot rout. Increasing that number increases how long into the battle it must be before routing begins.
 
Caba`drin 说:
Ogrecorps 说:
Any resolution on this? Anyone come up with a definite answer for what works? I've been trying to test it but recently every single battle has caused CTD (started before I tried this tweak, trying to work it out via FAQ and Support threads but  :cry: )
On the routing bit? Quarz's text tweak is correct. The number he has bolded is the value, in seconds, before which bots cannot rout. Increasing that number increases how long into the battle it must be before routing begins.
Oh, sorry, I wasn't specific enough. I've been trying to reduce the likelihood of routing (per Fattyfat's contribution), not increase the amount of time - unless that is a separate value for each man? I just don't want to set it to something and at that mark from the beginning of the battle have the flood of runners I've been dealing with. If it's a separate counter then I'll use it but I'm still curious about decreasing their inclination to run.
 
Wasn't my tweak, and in fact it was literally years old unfortunately.  I think it is still possible to do, but would require someone who knows what they are messing with to re-figure out.  It DID work back in the day but everything is changed through patches so much that i can't make heads or tails of it.

When I used the "other" tweak, I didn't get any crashes but it also did not reduce routing.

Someone made the suggestion to make a "courage" slider though in the suggestions thread, which would do exactly what that old tweak did I think.
 
Fattyfat 说:
Wasn't my tweak, and in fact it was literally years old unfortunately.  I think it is still possible to do, but would require someone who knows what they are messing with to re-figure out.  It DID work back in the day but everything is changed through patches so much that i can't make heads or tails of it.

When I used the "other" tweak, I didn't get any crashes but it also did not reduce routing.

Someone made the suggestion to make a "courage" slider though in the suggestions thread, which would do exactly what that old tweak did I think.
lol that suggestion was made by me  :grin: after reading through some of this and another related thread.
As for the aforementioned CTDs I tried many steps and finally just reinstalled 2.4 (and the no loot fix, and the sound fix cause one of the horse whinnies drives me up the wall) and haven't had a CTD since though I've only played a little. I found a 3500 and 3700 in the section indicated and changed them to 1 as instructed per that old, old thread but have yet to see a change (not enough field battles yet).
 
Well I used that tweak to basically eliminate routing altogether, setting it to 30 mins before they can even think about running away but I'll look at the source and see what I can understand about the script.

I can tell you that the time is individual to each WAVE not necessarily to each troop, or perhaps to be more specific that timer starts once they've been spawned so depending on how you set the time the stragglers of wave one might finally be able and decide to run while the next wave has entered combat. But unfortunately there's no way to stop your troops from attacking that one guy that is running away and there no way to stop that one guy from running away into a mountain making him hard to catch.

Hence why I would suggest again to make the number ridiculously high and do away with routing, after all "we hang deserters in this company" but I'll look

Edit:
decide_run_away_or_not -1
52 23 2 1224979098644774912 1 23 2 1224979098644774913 2 2133 2 1224979098644774914 0 1770 2 1224979098644774915 1224979098644774912 1773 2 1224979098644774916 1224979098644774912 4 0 2147483678 2 1224979098644774916 9 1785 3 1224979098644774917 1224979098644774915 1224979098644774916 31 2 1224979098644774917 14 2133 2 1224979098644774914 1 3 0 525 3 1224979098644774918 1224979098644774912 15 4 0 31 2 1224979098644774918 0 4 0 31 2 1224979098644774914 1 1735 1 1224979098644774912 1751 1 1224979098644774912 505 3 1224979098644774912 15 1 5 0 30 2 1224979098644774913 45 525 3 1224979098644774919 1224979098644774912 16 1720 2 1224979098644774920 1224979098644774912 2107 2 1224979098644774920 4 4 0 1706 1 1224979098644774912 2106 2 1224979098644774920 100 3 0 2107 2 1224979098644774920 10 2121 3 1224979098644774921 3500 1224979098644774920 2147483678 2 1224979098644774919 1224979098644774921 1718 2 1224979098644774922 1224979098644774912 2147485155 1 1224979098644774922 1735 1 1224979098644774912 1751 1 1224979098644774912 505 3 1224979098644774912 15 1 3 0 5 0 2147483679 2 1224979098644774914 1 525 3 1224979098644774919 1224979098644774912 16 1720 2 1224979098644774920 1224979098644774912 2107 2 1224979098644774920 4 4 0 1706 1 1224979098644774912 2106 2 1224979098644774920 100 3 0 2107 2 1224979098644774920 10 2121 3 1224979098644774923 3700 1224979098644774920 30 2 1224979098644774919 1224979098644774923 1752 1 1224979098644774912 505 3 1224979098644774912 15 0 3 0

Added some new bold numbers, I think you'll recognize these bold numbers from the other tweak. from what I understand in the comments the AI can decide to run away if their courage score is < 3500 or 3700 - (their health*40). If you reduce those numbers you decrease their chance to run I think reduce the values by 1000 or so should decrease their chance to run quite a bit, I would know more if I knew how the courage score is calculated which I don't presently.

On to some numbers: As is if a troop has 50 health if their courage drops below 1500 they can/will run:
courage< 3500-(50*40)= courage<3500-(2000)=courage<1500

So reducing that to 2500 you'd instead get a runner from a guy with 50 health if their courage drops below 500
courage<2500-(50*40)=courage<2500-(2000)=courage<500

that already seems like a more reasonable number for someone who has 50 health, almost everybody starts with heath values around there hence why people with full health would run away so reducing those numbers will indeed result in less running. How much? Don't know until I find out more on the courage calculator

(maybe someone else who's done more scripting with M&B what all the ifs and variables are talking about as I can only tell that they are variables of some sort...)
 
The second, 3700 value, is for a unit to STOP running away.

The calculation for running away multiplies hitpoints by 4 AND an additional 10, 15 or 20 depending on easy/medium/hard campaign AI setting*. So a unit with 50 HP on hard campaign AI will run away if courage is below -500.

A unit with 20 HP left otoh would run away if courage < 1900.


*Does not happen for ally units, instead we take (hp * 4 - 100) * 10


I tried looking up how courage is calculated, but it's too difficult for me to bother. Distance from other units, units dying, etc affect it. An example: a friendly unit 1 meter from our unit dies. Our unit has no other friendly units near it. It will lose 2250 courage (an extreme case, usually you have friendly units nearby which reduce the loss and the distance to the friendly unit is larger).

How much courage a unit start with is calculated like this:
5000+level*35+rand(0,3000)+(partymorale-70)*30

So a level 10 unit start with on average 4750-7750 courage, depending on party morale. Doesn't seem like much to me.

If you wish to change how much courage a unit start with, instead of changing when they run away, you need to edit mission_templates.txt
Find lead_charge
You should see a few lines, then a couple lines beginning with -25. In the first of these find the value 5000 and change it to your liking. This is the base value.
Then find entrenched_encounter and do the same change there, again on the first line starting with -25.
I've not tested the change so can't guarantee it'll work but can't see why it wouldn't.
 
...processing processing.... Uh, OKAY! I'M ON IT!

Edit: So Snarko, you're telling me there already IS a courage setting for the game and it's integral to the campaign AI difficulty?
 
Ogrecorps 说:
Edit: So Snarko, you're telling me there already IS a courage setting for the game and it's integral to the campaign AI difficulty?
Yes, that's what routing is already based on. Each bot has their own courage score and it gets updated based primarily on two things: how the battle is going for their side, in general; and their proximity to their allies getting killed.

...which is why I said implementing your suggestion wouldn't be particularly difficult. :wink:
 
Caba`drin 说:
Ogrecorps 说:
Edit: So Snarko, you're telling me there already IS a courage setting for the game and it's integral to the campaign AI difficulty?
Yes, that's what routing is already based on. Each bot has their own courage score and it gets updated based primarily on two things: how the battle is going for their side, in general; and their proximity to their allies getting killed.

...which is why I said implementing your suggestion wouldn't be particularly difficult. :wink:
Seems like it already is implemented in Native - unless I'm missing something.
 
后退
顶部 底部