Results 1 to 9 of 9

Thread: Bad Discipline (and temporary fix)

  1. #1

    Default 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
    ;------------------------------------------
    Nihil tam munitum quod non expugnari pecunia possit.
    Nothing is so strongly fortified that it cannot be taken by money.
    Marcus Tullius Cicero

  2. #2
    (cmlax999) Member adishee's Avatar
    Join Date
    Jul 2006
    Location
    currently homeless
    Posts
    200

    Default 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.
    Last edited by adishee; 09-07-2014 at 22:50.

  3. #3
    EBII Hod Carrier Member QuintusSertorius's Avatar
    Join Date
    Apr 2008
    Location
    UK
    Posts
    23,141

    Default 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.
    It began on seven hills - an EB 1.1 Romani AAR with historical house-rules (now ceased)
    Heirs to Lysimachos - an EB 1.1 Epeiros-as-Pergamon AAR with semi-historical houserules (now ceased)
    Philetairos' Gift - a second EB 1.1 Epeiros-as-Pergamon AAR

    Member thankful for this post:



  4. #4

    Default Re: Bad Discipline (and temporary fix)

    Quote Originally Posted by cmlax999 View Post
    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
    ;------------------------------------------
    Nihil tam munitum quod non expugnari pecunia possit.
    Nothing is so strongly fortified that it cannot be taken by money.
    Marcus Tullius Cicero

  5. #5

    Default Re: Bad Discipline (and temporary fix)

    Quote Originally Posted by QuintusSertorius View Post
    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.
    Last edited by mmiki; 09-08-2014 at 12:42.
    Nihil tam munitum quod non expugnari pecunia possit.
    Nothing is so strongly fortified that it cannot be taken by money.
    Marcus Tullius Cicero

  6. #6
    (cmlax999) Member adishee's Avatar
    Join Date
    Jul 2006
    Location
    currently homeless
    Posts
    200

    Default Re: Bad Discipline (and temporary fix)

    Quote Originally Posted by mmiki View Post
    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.

  7. #7
    EBII Hod Carrier Member QuintusSertorius's Avatar
    Join Date
    Apr 2008
    Location
    UK
    Posts
    23,141

    Default Re: Bad Discipline (and temporary fix)

    Quote Originally Posted by cmlax999 View Post
    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.
    It began on seven hills - an EB 1.1 Romani AAR with historical house-rules (now ceased)
    Heirs to Lysimachos - an EB 1.1 Epeiros-as-Pergamon AAR with semi-historical houserules (now ceased)
    Philetairos' Gift - a second EB 1.1 Epeiros-as-Pergamon AAR

    Member thankful for this post:



  8. #8
    (cmlax999) Member adishee's Avatar
    Join Date
    Jul 2006
    Location
    currently homeless
    Posts
    200

    Default Re: Bad Discipline (and temporary fix)

    Quote Originally Posted by QuintusSertorius View Post
    Are you using Notepad or Notepad++ to make the edits? For some people the former corrupt the files.
    That did it. Thanks!
    Last edited by adishee; 09-15-2014 at 22:04.

  9. #9

    Default Re: Bad Discipline (and temporary fix)

    Quote Originally Posted by mmiki View Post
    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
    Last edited by Twigvest; 09-16-2014 at 11:28. Reason: Chaging percentages so they are more possible to occur ingame
    Vlad is your Impaler.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO