Results 1 to 9 of 9

Thread: Max Loyalty Generals Defecting

  1. #1

    Default Max Loyalty Generals Defecting

    One faction in the mod is suffering a plague of general defections. Just about every test I run, they drop one or two (out of only 3 starting generals) within the first few turns. I've tried giving these generals max loyalty using traits but this has no effect - the loyalty stat of the general has no impact on how likely the general is to defect, the defections are just as like for max loyalty generals and generals with 0 loyalty. This is only affecting one faction as far as I can tell.

    This particular faction has its leader and heir starting off the map. I've seen other threads saying that when the leader has low authority, it makes generals more likely to rebel and I can attest to this from my own experience. I suppose that if the leader is off the map entirely, then their authority stat is taken to be zero and since, apparently, this stat is the only thing keeping generals from defecting, they will start defecting at absurd rates. But... the leader of the Norway faction starts off the map in the Britannia campaign and yet there is no plague of defections. What gives? Is it possible that the heir's authority stat takes over and keeps the generals in line? Putting the heir on the map won't work in my case as both leader and heir absolutely must start off the map.

    TLDR: What did they do in Britannia to prevent Norway's generals from defecting left and right while their faction leader is off the map?
    Last edited by Callistonian; November 29, 2020 at 12:42 PM.

  2. #2
    Jadli's Avatar The Fallen God
    Citizen

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    6,972

    Default Re: Max Loyalty Generals Defecting

    Hm, perhaps you gotta edit values in descr_campaign_db.txt, to avoid it (the revolt part).

  3. #3

    Default Re: Max Loyalty Generals Defecting

    It looks like unpacked Britannia doesn't even have a descr_campaign_db file. I did check descr_strat though and the norway leader has a peculiar character attribute: off_map. Maybe this allows his authority stat to take effect even while he's off map.

    The problem with this attribute is that it appears to be first moving the characters by setting their x coordinates to 0 (which is water and hence invalid tile in my mod). When the leader and heir thus fail to spawn, the campaign doesn't start and kicks back to the main menu.

  4. #4
    Jadli's Avatar The Fallen God
    Citizen

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    6,972

    Default Re: Max Loyalty Generals Defecting

    Im not really familiar with this issue ... but there is the britannia file
    Attached Files Attached Files

  5. #5

    Default Re: Max Loyalty Generals Defecting

    For anyone else who finds this thread - I resolved the issue by giving the off-map leader 10 authority. It seems the authority stat of the leader 1) is the only thinking preventing the faction's named characters from revolting and 2) still works even if the leader is off-map. The pertinent parameters for adjusting the revolt probability can be found in descr_campaign_db, but the leader authority seems to be the only thing external to this that affects the probability - the loyalty stat of individual named characters has no effect.
    Last edited by Callistonian; December 17, 2020 at 10:41 PM.

  6. #6
    Jadli's Avatar The Fallen God
    Citizen

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    6,972

    Default Re: Max Loyalty Generals Defecting

    I doubt thats the only thing, you have there many parameters. Authority always matters, but so does loyalty. And below plenty other. Its also possible it migh depend on distance from a leader (such as corruption) so in case he is gone off map it could be the explanation as well.

    And as you see below, plenty others....if he is off map, also new_leader_modifer migth be in place... depends who owns the region they are in, or the neighboring ones.... depends if you are excomunicated... etc

    Code:
     <revolt>
          <end_turn_modifier float="2"/>
          <excommunicated_modifier float="15"/>
          <new_leader_modifier float="10"/>
          <max_effective_loyalty float="10.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"/>
          <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 leader authority -->		
          <num_units_modifier float="1.05"/>
          <captain_modifier float="-0.1"/>
          <min_revolt_chance float="0.0"/>
          <max_revolt_chance float="80.0"/>
          <ai_revolt_modifier float="0.25"/>
          <revolt_additional_armies bool="false"/>
          <revolt_crusading_armies bool="false"/>
       </revolt>

  7. #7
    Jadli's Avatar The Fallen God
    Citizen

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    6,972

    Default Re: Max Loyalty Generals Defecting

    Aslo, might be interesting test.... "slaves" are considered a shadow faction to every faction... we could if its truly the case by giving the slaves a leader with high authority, and see if the generals more often revolt

  8. #8

    Default Re: Max Loyalty Generals Defecting

    The reason I say the leader's authority is the "only" thing that affects chance of named characters revolting is that setting the leader's authority to zero (with vanilla values in descr_campaign_db) results in a spate of revolts while setting leader authority to 10 prevents all revolts. Meanwhile, as the title of this thread suggests, when the leader's authority is set to 0, named characters with 10 loyalty attribute will revolt with seemingly the same probability as named characters with 0 loyalty which leads me to believe that either loyalty does not affect the probability or it only affects the probability if the leader's authority is > 0 (i.e. it's a multiplier for the leader's authority but anything * 0 == 0).

    There are plenty of other parameters in descr_campaign_db which I wasn't changing previously. I've set max_revolt_chance to 0.000001 and, without changing any other parameters, seems to prevent revolts entirely even with the faction leader has 0 authority. The attributes shadow_authority_modifier and shadow_authority_modifier_sett must have come from kingdoms expansions as vanilla M2 only has shadow_border_modifier.

    Unless there's something hard coded about the faction name "slave", you should be able to test your theory simply by removing the slave_faction tag from descr_campaign_db. The game does not seem to need any faction to have the special_faction_type tags (slave_faction and papal_faction).

  9. #9
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,460
    Blog Entries
    26

    Default Re: Max Loyalty Generals Defecting

    Correct: the FL's authority is the base of any desertion calculation, followed by the character's loyalty. Zero multiplied by 10 simply is zero as you experienced. It's also the reason why you have a separate setting for captains in the descr_campaign_db file (no loyalty for them!)

    Given that you can still test for stuff like FactionLeaderTrait when the FL is off map I would think all his attributes work. Can't confirm that he first appears on the map if he is already set to off map in descr_strat but I highly doubt it.




Posting Permissions

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