Bad Discipline (and temporary fix)
I've posted about this in the main mod forum, but I thought I'd post here as well. The problem is that PercentageRoutedOffField in triggers doesn't seem to be working properly - it seems to be counting the routed enemy forces as well. My generals ended up with worse and worse discipline traits as game went on through no fault of their own, so I decided to make a fix of some kind rather than keep fixing it through console.
This is a quick and dirty fix, until it's officially handled in some way. After a battle discipline has a 3 percent chance to be affected in a random way. I would rather have it depend on the personality of the general - stern, stoic types tending to go heavy on the discipline and easy-going, hedonistic types tending to be lax about it, with some amount of randomness. However, I'm not familiar enough with the EB2 traits system yet, and export_descr_character_traits is a big file, so I'm using this for now.
Anyway, backup export_descr_character_traits.txt, open the file with some kind of text editor and replace the Army discipline section with this:
Code:
;--------------------------------------------------------------------------------------------------------------------
;------------------------------------------
; Army discipline
;------------------------------------------
Trigger SomewhatGoodDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and Trait BadDisciplinarian < 1
Affects Disciplinarian 1 Chance 3
;------------------------------------------
Trigger SomewhatGoodDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and Trait BadDisciplinarian > 0
Affects BadDisciplinarian -1 Chance 3
;------------------------------------------
Trigger SomewhatBadDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and Trait Disciplinarian > 1
Affects Disciplinarian -1 Chance 3
;------------------------------------------
Trigger SomewhatBadDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and Trait Disciplinarian < 1
Affects BadDisciplinarian 1 Chance 3
;------------------------------------------
Trigger Disciplinarian_Selfperpetuating
WhenToTest CharacterTurnEnd
Condition IsGeneral
and Trait Disciplinarian > 1
Affects Disciplinarian 1 Chance 2
;------------------------------------------
Trigger BadDisciplinarian_Selfperpetuating
WhenToTest CharacterTurnEnd
Condition IsGeneral
and Trait BadDisciplinarian > 1
Affects BadDisciplinarian 1 Chance 2
;------------------------------------------
Re: Bad Discipline (and temporary fix)
Caused CTD for me.
Any progression on this? It's a very annoying thing, all my generals inevitably become pushovers.
Re: Bad Discipline (and temporary fix)
Just to say, I get this all the time as well. Every FM who spends time as a general gets Bad Disciplinarian. Those who fight a lot get Hesitant Attacker, as well, that's firing incorrectly too.
Re: Bad Discipline (and temporary fix)
Quote:
Originally Posted by
cmlax999
Caused CTD for me.
Not sure why it would do that. Did you replace the relevant section of the file?
If you can't get it work, just remove the whole section, starting with
;------------------------------------------
;------------------------------------------
; Army discipline
;------------------------------------------
and just before
;------------------------------------------
; Phase 1 - Reset Last Battle Results
;------------------------------------------
Re: Bad Discipline (and temporary fix)
Quote:
Originally Posted by
QuintusSertorius
Those who fight a lot get Hesitant Attacker, as well, that's firing incorrectly too.
I think main culprit for that is this one:
Code:
Trigger failed_to_attack
WhenToTest CharacterTurnEnd
Condition EndedInEnemyZOC
and RemainingMPPercentage > 10
Affects IndecisiveAttacker 2 Chance 40
Which I don't agree with. If I'm, say, holding a mountain passage or a bridge with my army and an army walks into my ZOC, why should I be required to attack? If he wants to get through, let him attack. I'm not always going to start a war over an instance of trespassing on the edges of my territory. I might just block the entry points and see if they want a fight or not.
It's not hesitation, it's strategy.
Re: Bad Discipline (and temporary fix)
Quote:
Originally Posted by
mmiki
Not sure why it would do that. Did you replace the relevant section of the file?
I probably did it wrong, will try again later.
Re: Bad Discipline (and temporary fix)
Quote:
Originally Posted by
cmlax999
Caused CTD for me.
Any progression on this? It's a very annoying thing, all my generals inevitably become pushovers.
Are you using Notepad or Notepad++ to make the edits? For some people the former corrupt the files.
Re: Bad Discipline (and temporary fix)
Quote:
Originally Posted by
QuintusSertorius
Are you using Notepad or Notepad++ to make the edits? For some people the former corrupt the files.
That did it. Thanks!
Re: Bad Discipline (and temporary fix)
Quote:
Originally Posted by
mmiki
I've posted about this in the main mod forum, but I thought I'd post here as well. The problem is that PercentageRoutedOffField in triggers doesn't seem to be working properly - it seems to be counting the routed enemy forces as well. My generals ended up with worse and worse discipline traits as game went on through no fault of their own, so I decided to make a fix of some kind rather than keep fixing it through console.
This is a quick and dirty fix, until it's officially handled in some way. After a battle discipline has a 3 percent chance to be affected in a random way. I would rather have it depend on the personality of the general - stern, stoic types tending to go heavy on the discipline and easy-going, hedonistic types tending to be lax about it, with some amount of randomness. However, I'm not familiar enough with the EB2 traits system yet, and export_descr_character_traits is a big file, so I'm using this for now.
Anyway, backup export_descr_character_traits.txt, open the file with some kind of text editor and replace the Army discipline section with this:
Code:
;--------------------------------------------------------------------------------------------------------------------
;------------------------------------------
; Army discipline
;------------------------------------------
Trigger SomewhatGoodDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and Trait BadDisciplinarian < 1
Affects Disciplinarian 1 Chance 3
;------------------------------------------
Trigger SomewhatGoodDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and Trait BadDisciplinarian > 0
Affects BadDisciplinarian -1 Chance 3
;------------------------------------------
Trigger SomewhatBadDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and Trait Disciplinarian > 1
Affects Disciplinarian -1 Chance 3
;------------------------------------------
Trigger SomewhatBadDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and Trait Disciplinarian < 1
Affects BadDisciplinarian 1 Chance 3
;------------------------------------------
Trigger Disciplinarian_Selfperpetuating
WhenToTest CharacterTurnEnd
Condition IsGeneral
and Trait Disciplinarian > 1
Affects Disciplinarian 1 Chance 2
;------------------------------------------
Trigger BadDisciplinarian_Selfperpetuating
WhenToTest CharacterTurnEnd
Condition IsGeneral
and Trait BadDisciplinarian > 1
Affects BadDisciplinarian 1 Chance 2
;------------------------------------------
You fix is functional, but it makes changes in Disciplinarian and BadDisciplinarian very rare.
I suggest doing a test, replacing the buggy PercentageRoutedOffField with something of the variety:
Code:
;------------------------------------------
Trigger SomewhatGoodDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and PercentageEnemyKilled > 12 ;the PercentageOfArmyKilled * BattleOdds
and PercentageOfArmyKilled < 10
and Trait BadDisciplinarian > 0
Affects BadDisciplinarian -1 Chance 20
;------------------------------------------
Specifically, here is the section redone, with comments illustrating how I generated the numbers. I'll put this in my game see how it goes:
Code:
;------------------------------------------
; Army discipline
;------------------------------------------
Trigger SomewhatGoodDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and PercentageEnemyKilled > 50
and PercentageOfArmyKilled < 40
and Trait BadDisciplinarian < 1
Affects Disciplinarian 1 Chance 10
;------------------------------------------
Trigger SomewhatGoodDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and PercentageEnemyKilled > 50
and PercentageOfArmyKilled < 40
and Trait BadDisciplinarian > 0
Affects BadDisciplinarian -1 Chance 10
;------------------------------------------
Trigger VeryGoodDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and PercentageEnemyKilled > 60
and PercentageOfArmyKilled < 30
and Trait BadDisciplinarian < 1
Affects Disciplinarian 1 Chance 20
;------------------------------------------
Trigger VeryGoodDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and BattleOdds < 1.2
and PercentageEnemyKilled > 60
and PercentageOfArmyKilled < 30
and Trait BadDisciplinarian > 0
Affects BadDisciplinarian -1 Chance 20
;------------------------------------------
Trigger SomewhatBadDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and PercentageEnemyKilled < 40
and PercentageOfArmyKilled > 60
and Trait Disciplinarian > 1
Affects Disciplinarian -1 Chance 30
Affects Disciplinarian -1 Chance 30
;------------------------------------------
Trigger SomewhatBadDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and PercentageEnemyKilled < 40
and PercentageOfArmyKilled > 60
and Trait Disciplinarian < 1
Affects BadDisciplinarian 1 Chance 30
Affects BadDisciplinarian 1 Chance 30
;------------------------------------------
Trigger VeryBadDiscipline_Disciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and PercentageEnemyKilled < 35
and PercentageOfArmyKilled > 70
and Trait Disciplinarian > 1
Affects Disciplinarian -1 Chance 50
Affects Disciplinarian -1 Chance 50
;------------------------------------------
Trigger VeryBadDiscipline_Undisciplined
WhenToTest PostBattle
Condition IsGeneral
and WonBattle
and BattleOdds > 0.7
and PercentageEnemyKilled < 35
and PercentageOfArmyKilled > 70
and Trait Disciplinarian < 1
Affects BadDisciplinarian 1 Chance 50
Affects BadDisciplinarian 1 Chance 50
;------------------------------------------
Trigger Disciplinarian_Selfperpetuating
WhenToTest CharacterTurnEnd
Condition IsGeneral
and Trait Disciplinarian > 1
Affects Disciplinarian 1 Chance 2
;------------------------------------------
Trigger BadDisciplinarian_Selfperpetuating
WhenToTest CharacterTurnEnd
Condition IsGeneral
and Trait BadDisciplinarian > 1
Affects BadDisciplinarian 1 Chance 2