Results 1 to 13 of 13

Thread: Authority boost only for the AI

  1. #1

    Default Authority boost only for the AI

    Hi, I've made standard Authority much lower and harder to come by, and I've upped the likelihood of captains rebelling when not accompanied by generals. This has the intended effect of making it harder to move troops around without worrying whether they'll turn into brigands, BUT it also has the very stupid effect that the map is riddled with AI led captains who turn rebel every turn, as the AI usually just moves their troops around unaccompanied.
    I want to increase AI faction leaders' authority, and I'm assuming i could do this by campaign script. How would I go about achieving this?

  2. #2

    Default Re: Authority boost only for the AI

    Give the AI leaders more authority using traits which can be hidden if you like. The triggers can make use of the condition I_IsFactionAIControlled. If you set the likelihood of captains revolting too high this won't make a difference though.

    I've noticed that EBII has this problem as well - one of the reasons the AI doesn't start expanding until turn 150+ is that they're constantly losing their armies to revolts and then having to deal with stacks of rebel troops.

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Authority boost only for the AI

    Combining that approach with descr_campaign_db is more effective as it also concerns captains which obviously cannot get traits\attribute, eg have zero loyalty. Settings from 1648
    Code:
       <revolt>
          <end_turn_modifier float="2"/>
          <excommunicated_modifier float="15"/>
          <new_leader_modifier float="10"/>
          <max_effective_loyalty float="7.0"/>
          <rebel_region_modifier float="2.0"/>
          <shadow_region_modifier float="2.0"/>
          <rebel_border_modifier float="1.1"/>
          <shadow_border_modifier float="1.1"/>
          <num_units_modifier float="1.05"/>
          <captain_modifier float="12.4"/>  <set to low value to reduce revolt chance - Gig, intentionally high in 1648, counter acted by ai modifier>
          <min_revolt_chance float="0.0"/>
          <max_revolt_chance float="80.0"/>
          <ai_revolt_modifier float="0.05"/>
          <revolt_additional_armies bool="false"/>
          <revolt_crusading_armies bool="false"/>
          <shadow_authority_modifier float="5.0"/>             <!-- modifies chance of characters rebelling to shadow faction by shadow leaders authority -->
          <shadow_authority_modifier_sett float="10.0"/>     <!-- modifies chance of characters rebelling in settlement revolts to shadow faction by shadow leaders authority -->
       </revolt>
    If memory serves most of those brigands\revolting armies in EBII are scripted.
    Last edited by Gigantus; October 01, 2021 at 09:11 PM.










  4. #4

    Default Re: Authority boost only for the AI

    I concur that OP is probably asking for help with Y and that tuning these descr_campaign_db params is a better solution for simply preventing AI revolts. But, is the chance of captains revolting really unaffected by the leader's authority?

    I don't see how EBII could be scripting randomly named captains to revolt. Their descr_campaign_db modifiers seem quite low (0.01 captains, 0.25 AI) but I see their captains and generals revolting all the time, often with almost full stacks of units. My guess was that their leaders must have low authority.

    EBII does have a bunch of scripts that spawn rebel armies, cause unrest, and attempt to revive dead factions (always managing to get a region on the wrong side the map), but these only affect a handful of regions and I see AI armies revolt all the time all over the map.

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Authority boost only for the AI

    I am assuming that captain's are affected by FL authority like named characters, but most likely not as much as they lack the loyalty attribute - hence that setting in descr_campaign_db which basically is a global loyalty setting for captains.

    The captain modifier in EBII is set so low that it's basically impossible for a captain to revolt: 0.01 plus the brigand descr_strat setting is 999 which pretty much disables brigands - what I was referring to is the scripted spawning of rebel stacks, plus the rather high number of rebel stacks at the beginning.










  6. #6

    Default Re: Authority boost only for the AI

    This my campaign db section on revolts:

    Code:
       <revolt>      <end_turn_modifier float="2"/>
          <excommunicated_modifier float="0"/>
          <new_leader_modifier float="40"/>
          <max_effective_loyalty float="5.0"/>
          <rebel_region_modifier float="2.0"/>
          <shadow_region_modifier float="2.0"/>
          <rebel_border_modifier float="1.1"/>
          <shadow_border_modifier float="1.1"/>
          <num_units_modifier float="1.05"/>
          <captain_modifier float="1.2"/>
          <min_revolt_chance float="5.0"/>
          <max_revolt_chance float="85.0"/>
          <ai_revolt_modifier float="0.001"/>
          <revolt_additional_armies bool="false"/>
          <revolt_crusading_armies bool="false"/>
       </revolt>
    Seems so unlikely that the ai_revolt_modifier would affect anything if it's been like this but I've seen those armies rebel like it's nothing!

    I'll script the AI faction leaders +5 Authority. Problem is if I do it in the campaign script it's either gonna be a one-time thing or I'm gonna add 5 authority to AI Kings every single turn...
    Is it better to do through the character traits??

  7. #7

    Default Re: Authority boost only for the AI

    It's certainly better to use triggers in export_descr_character_traits (EDCT) for this. Here's an example:
    Code:
    Trigger ai_leader_authority_add
    WhenToTest CharacterTurnEnd
    Condition IsFactionLeader
       and IsFactionAIControlled
       and not Trait AILeaderAuth > 0
       Affects AILeaderAuth 1 Chance 100

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Authority boost only for the AI

    Trait plus captain modifier should be the way to go.










  9. #9

    Default Re: Authority boost only for the AI

    This post suggests it all comes down to leader authority and UrienRheged and I are both reporting AI captains continuing to revolt frequently despite low modifiers. I tried to test the modifiers but I simply can't get captains to revolt in my mod. I set max_revolt_chance to 100.0, captain_modifier to 100.0, and tried with a leader with low authority and leader with 10 authority and my captains aren't revolting. Maybe it's because they're just single unit stacks? Or there may be other params I used elsewhere to disable revolts and I don't remember what they are. At any rate, someone else should probably test to be sure the params in descr_campaign_db are actually working or if it all comes down to leader authority.

  10. #10

    Default Re: Authority boost only for the AI

    Hmmmmm, I now get a CTD on the second turn...

    Code:
    Trigger ai_leader_authority_addWhenToTest CharacterTurnEnd
    Condition IsFactionLeader
       and IsFactionAIControlled
       and not Trait authboost > 0
       Affects authboost 1 Chance 100
    This is what I added. Could this cause such ctds?

  11. #11

    Default Re: Authority boost only for the AI

    It looks like you deleted the line return \r after the trigger name and accidentally appended "WhenToTest" to the end of the first line. As a result, this trigger has no WhenToTest event line which will cause a crash.

    Such an error will certainly show up in your log.

  12. #12

    Default Re: Authority boost only for the AI

    Aaah, no, sorry, that was just a typo in copypasting it here, sorry. So that's definitely not it.

    One thing I've very obviously seen, is that the AI very very rarely loses its captains, now. Problem seems to be that it's also very rare for my own characters!
    Last edited by UrienRheged; October 04, 2021 at 08:54 AM.

  13. #13

    Default Re: Authority boost only for the AI

    Update: it's fully implemented now and it seems to be very effective. The difference between low-authority kings and authoritative ones is telling: I can leave units in enemy territory for years with the latter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •