How do I change troop retreating time?

正在查看此主题的用户

da24k

Recruit
Hi, I want to change the retreat timer of when the troops flee in battle is there a simple way to do this?  I tried using tweakMB but it doesn't work for the mod Customer Commander.  I think the default value is 45 seconds till troops retreat, where can I change this value?  Oh and this is for warband.  Thanks
 
da24k 说:
Hi, I want to change the retreat timer of when the troops flee in battle is there a simple way to do this?  I tried using tweakMB but it doesn't work for the mod Customer Commander.  I think the default value is 45 seconds till troops retreat, where can I change this value?  Oh and this is for warband.  Thanks
I did a grep for 45 and came up with this in the module scripts file

   
插入代码块:
     (ge, ":mission_time", 45), #first 45 seconds anyone does not run away whatever happens.

It was inside of this

插入代码块:
  # script_decide_run_away_or_not
  # Input: none
  # Output: none
  ("decide_run_away_or_not",
    [

Might be it....
 
Hi, thanks for your suggestion~ I gave this a shot but it it's still the same I tried with a loaded game and a new game but same results.  Any other suggestions?  Thank you^^
 
By the way, I edited the file module_scripts.py within the source folder was that the correct file?
 
da24k 说:
By the way, I edited the file module_scripts.py within the source folder was that the correct file?

What do you mean the source folder? That should be the only folder the source is in....

Did you compile and run the module it compiled to?
 
Custom Commander->Source->module_scripts.py that's the file I edited it it had the lines you mentioned above.  I just changed the value 45 using a text editor and then saved.  Do I need to recompile this or something?  How can I do that I have no python experience >.<
 
da24k 说:
Custom Commander->Source->module_scripts.py that's the file I edited it it had the lines you mentioned above.  I just changed the value 45 using a text editor and then saved.  Do I need to recompile this or something?  How can I do that I have no python experience >.<

The module system is very easy to pick up and use, every time you change something in one of the python files you will have to recompile to get the changes to take effect.

Here is a link to a bunch of documentation for the module system, it explains how it works and can be accomplished with it

http://forums.taleworlds.com/index.php/board,12.0.html

Start with part 1, it will explain how to install python, be aware that the version you will most likely download will be python27 so make sure your path is python27 not 26.
 
thanks for your quick replies, I am downloading python now... Hopefully it won't be too hard :smile: 
 
da24k 说:
thanks for your quick replies, I am downloading python now... Hopefully it won't be too hard :smile:

I'm sure you'll catch on quick, I would suggest you also download Notepad ++, it offers fantastic support for editing text files.
 
just reporting back...I followed the directions from the link you provided, recompiled the mod and now everything is working beautifully!  The suggestion you made above is correct for changing the retreat timer.  Thank you so much for you help! :smile:
 
da24k 说:
just reporting back...I followed the directions from the link you provided, recompiled the mod and now everything is working beautifully!  The suggestion you made above is correct for changing the retreat timer.  Thank you so much for you help! :smile:

Awesome! Glad I could help  :grin:
 
Also played around with notepad++ compare function and I found out where you can directly edit this both in Native and I'm guessing in other mods ^^
For anyone interested under scripts.txt search for these number 525 3 1224979098644774919 then the number to the left of 525 is the number of seconds(default 45) it takes until troops start retreating in battle =D  Hope this helps someone out there.
 
后退
顶部 底部