Results 1 to 5 of 5

Thread: Army/General Defection chance?

  1. #1

    Icon5 Army/General Defection chance?

    I've come to a point in my campaign where I have way too many females of weak/non-existent lineage. The game for some reason insists that all my females should marry before any of the 15 or so generals of that generation. This works unfavourably against my desire to carry on lineage consisting only of the strongest legacies.

    My workaround for that was always to accept these unwanted proposals, then ruthlessly sabotage the husbands fertility traits to ensure no offspring, then have him suicide into an enemy. Well, this is having a seriously negative impact on my roleplaying experience. No matter how I try to justify it, I am left feeling even more miserable than I was before. From that I have concluded that I am equally discontent with killing generals as I am having no control over my family tree.


    It occurred to me that there might be another way, a way that doesn't lead to inner turmoil and self-loathing. What I'm currently experimenting with is sabotaging the generals loyalty way into the negative and positioning them in enemy territory so that they might defect/revolt. It seems plausible, given the rate at which the AI struggle with it, yet these guys just won't defect/revolt/mutiny whatever you call it.


    Would anyone know of a way to increase the chances of that happening?


    The only thing I have found that might be remotely relevant is this from the campaign_db file:

    <revolt>
    <end_turn_modifier float="1.5"/>
    <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="0.35"/>
    <min_revolt_chance float="0.02"/>
    <max_revolt_chance float="80.0"/>
    <ai_revolt_modifier float="0.7"/>
    <revolt_additional_armies bool="false"/>
    <revolt_crusading_armies bool="false"/>



    Are these the values I am looking for? And would someone be able to educate me on how those values work? Any help appreciated.
    Last edited by Ruprecht; August 04, 2022 at 01:08 PM.
    Signature by Lucarius.

  2. #2

    Default Re: Army/General Defection chance?

    It just occurred to me that I might have better chances by nullifying the FL's Authority level. My current FL has Authority coming out his ears. I didn't think it would be weighted so heavily on Authority.
    Signature by Lucarius.

  3. #3

    Default Re: Army/General Defection chance?

    After some more testing it seems fairly safe to assume the system is heavily weighted to the kings Authority level. I'm not entirely convinced that I'm modifying the correct values or even if my values are proportionately correct. I just know that the following values did not have enough influence.

    <revolt>
    <end_turn_modifier float="75.5"/>
    <excommunicated_modifier float="95"/>
    <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="0.35"/>
    <min_revolt_chance float="0.02"/>
    <max_revolt_chance float="100"/>
    <ai_revolt_modifier float="0.2"/>
    <revolt_additional_armies bool="false"/>
    <revolt_crusading_armies bool="false"/>


    I messed around with the Excommunication value to test whether it applies to a characters personal trait and/or FL trait, though results are inconclusive at this point. Also reduced the effect for AI to temporarily compensate for inflation in the overall equation. But ultimately, what was unknown to me was that my FL was somehow rocking 25 pips of Authority. I had to give him virtually every single anti-Authority trait in existence just to get him down to 3 pips, which coincidentally did the trick. I had defections/Desertions all over the place, none of which I can reliably attribute to what I changed.
    Last edited by Ruprecht; August 04, 2022 at 03:25 PM.
    Signature by Lucarius.

  4. #4

    Default Re: Army/General Defection chance?

    The exact revolt probability formula is unknown, but it probably looks something like this:

    Code:
    P = A * L * (S1 + S2 + S3...)
    
    where...
    P = probability of revolt per turn
    A = faction leader authority
    L = character loyalty (all character types have loyalty attribute, but only named characters and generals [captains] can revolt [iirc, captains can't revolt])
    S = sum of all settings in descr_campaign_db.xml, these most likely have unknown weighting coefficients
    If you set leader authority to 0, the product and resulting probability of revolt for all characters will be 0. This is why low leader authority is more impactful than any of the other terms in the equation (and why AI factions drop characters to revolt all the time in some mods... looking at you EBII). I have not tested these parameters, but these would be my guesses for what they do:

    Code:
            <end_turn_modifier float="0.0"/>                                    <!--base chance per turn-->
            <excommunicated_modifier float="0.0"/>                                <!--additional chance when faction is excommunicated-->
            <new_leader_modifier float="0.0"/>                                    <!--additional chance on the turn when a new leader comes to power-->
            <max_effective_loyalty float="10.0"/>                                <!--highest loyalty attribute value factored into the revolt chance equation-->
            <rebel_region_modifier float="0.0"/>                                <!--additional chance when in regions controlled by the slave_faction-->
            <shadow_region_modifier float="0.0"/>                                <!--additional chance when in regions controlled by a shadowing faction-->
            <rebel_border_modifier float="0.0"/>                                <!--additional chance when in a region bordering a slave_faction region-->
            <shadow_border_modifier float="0.0"/>                                <!--additional chance when in a region bordering a shadowing faction region-->
            <shadow_authority_modifier float="0.0"/>                            <!--additional chance based on shadowing faction leader's authority attribute-->
            <shadow_authority_modifier_sett float="0.0"/>                        <!--???-->
            <num_units_modifier float="0.0"/>                                    <!--additional chance based on number of units in the army-->
            <captain_modifier float="0.0"/>                                        <!--additional chance for captains-->
            <min_revolt_chance float="0.0"/>                                    <!--minimum revolt chance-->
            <max_revolt_chance float="0.0"/>                                    <!--maximum revolt chance-->
            <ai_revolt_modifier float="0.0"/>                                    <!--probably a post calculation multiplier for the AI still within min/max-->
            <revolt_additional_armies bool="false"/>                            <!--???-->
            <revolt_crusading_armies bool="false"/>                                <!--whether or not crusading armies can revolt-->
    One problem I see in your code is that you assigned max_revolt_chance the type 'float' but the value '100' which is an integer. The float value would be '100.0'. I'm not sure if that makes a difference though.

    If you're going to be modding stuff for a new campaign anyway, I think this approach with the revolt params is the wrong one. For 'trimming' your family tree, there are some better approaches but they require advanced scripting to address the problem of how to murder your own characters. Here is one method using conventional scripting. It involves spawning a fleet, moving any character you want (of unknown name/label) onto the fleet, and then killing the fleet and hence is occupants.

  5. #5

    Default Re: Army/General Defection chance?

    Thanks, Callistonian. Maybe you are onto something in regards to the value being incorrectly formatted. Yesterday I tried with 500 base chance and 70% min chance with no discernible difference. What you have outlined there would seem like the most intuitive explanation, though even in that context its not working like I had imagined. If I had to guess I would say we are still missing a large part of the puzzle. Those values used in the extreme did not produce any tangible results for me. The only thing that appears to do anything is the FL's Authority.



    I am aware of those scripting methods, not that one specifically but one covered by Gigantus. I never bothered with it as its functionally and ethically not that dissimilar to what I'm already doing. Killing generals is the easy part, dealing with the resulting moral degradation is another story. It would be much easier to justify them leaving of their own volition, at least that way I can roleplay them into an existence that doesn't involve me murdering them for no apparent reason.
    Signature by Lucarius.

Posting Permissions

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