Results 1 to 6 of 6

Thread: CEASE HOSTILITIES MISSIONS - stop excommunications

  1. #1

    Default CEASE HOSTILITIES MISSIONS - stop excommunications

    I was looking for a solution for the problem that bothers me for a long time - whenever the AI is somehow aggressive, there are multiple excommunicated factions, and many times what follows are the crusades against Catholics instead of Muslims. I didn't find any solutions to this, maybe somebody can help?

    In the vanilla campaign ai I found an entry as following:


    <decision_entry>
    <!--
    If we have a cease hostilities mission against the target, 50% chance to use defaults
    (this will reduce chance of factions attacking some targets if it will cause excommunication)
    -->
    <min_entry has_ceasehostilities="true"/>
    <max_entry rand="0.5"/>
    </decision_entry>


    Do you know if it is working correctly? (in the mods I played, it never seemed to work, vanilla I honestly don't remember) I found also this entry in the z3n AI that we use in SSHIP:


    <decision_entry>
    <!-- IF CEASE HOSTILITIES MISSION, DON'T ATTACK. 5% CHANCE TO DISOBEY -->
    <min_entry has_ceasehostilities="true"/>
    <max_entry rand="0.95"/>
    <faction_attitude invade="invade_none" continue="false"/>
    </decision_entry>


    I changed the rand to 0.99 and still there are many factions that get excommunicated! Did anybody managed ever to stop the excommunications or to limit them keeping the catholic AI aggressive?

  2. #2

    Default Re: CEASE HOSTILITIES MISSIONS - stop excommunications

    I found a part of the answer in "force_invade" - it seems that it overrides any decision about ceasing hostilities.. I added at the end of the block can_force_invade="false" :

    <decision_entry>
    <!-- IF CEASE HOSTILITIES MISSION, DON'T ATTACK. 1% CHANCE TO DISOBEY -->
    <min_entry has_ceasehostilities="true"/>
    <max_entry rand="0.99"/>
    <faction_attitude invade="invade_none" continue="false" can_force_invade="false"/>
    </decision_entry>
    Right now I arrived to the point that when I look through the ltgd log every instance of:

    papal: excommunicated 0, enemy_excommunicated 0, has_ceasehostilities 1
    ends up like this:

    LTGD: (default) invade decision: invade = invade_none, invade_priority = -1, want_offer_protect = 0, alliance_against = 1440, can_force_invade = 0
    Which means the decision was NOT to invade, correct? But still some of the factions get excommunications.. Maybe other missions from the pope causes excommunications as well? (not participating in crusades for example..) Somebody please any ideas how to make AI avoiding excommunications?

  3. #3
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: CEASE HOSTILITIES MISSIONS - stop excommunications

    Ok so two things

    1) your min entry should specify that the faction the decision is considered against is catholic (currently it applies to all factions, but maybe that's what you want?)
    2) your max entry doesn't really need rand, I never really trusted their rand for anything super important


    Second, I don't really know how excommunication works (it's been a very long time) but I think defense decisions would actually still factor into the equation. Defensive actions like attacking an enemy army in their territory would still be considered an act of aggression (attacking besieging armies etc).

    According to this thread, this is what can happen, defensive actions can cause a hit because hostilities were ordered to be stopped. These papal hits eventually culminate in an excommunication.

    https://forums.totalwar.org/vb/showt...excommunicated



    Edit also full log would be interesting because I see odd "alliance against" numbers.



    You can only order a defend_minimal. I think this means actions of defense will still be taken, only minimally. I'm not really sure how minimal, because it's not defend_none.
    Last edited by z3n; January 20, 2022 at 07:06 PM.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  4. #4

    Default Re: CEASE HOSTILITIES MISSIONS - stop excommunications

    Thank you z3n for the answer! Regarding your points:
    1. I checked through the log and "has_ceasehostilities 1" already always concerns only catholic factions, so no need to add condition? Just so I have it clear - as I understood AI takes one faction and then goes through calculations deciding what to do (one by one ) with another factions?
    2. Ok
    So for example these entry would work?
    <decision_entry>
    <!-- IF CEASE HOSTILITIES MISSION, DEFEND MINIMAL -->
    <min_entry has_ceasehostilities="true"/>
    <faction_attitude defense="defend_minimal" continue="true" can_force_invade="false"/>
    </decision_entry>

    I removed the max_entry completely..

    Would defend_deep or defend_forified not be better, they would retrieve their armies to the cities, farther from the front?
    I noticed also that there is a chance of entering into ambush, which lead to uninteded battle, hence excommunications. Also I have no idea how to prevent this..

    EDIT: I changed the entries for invasion and defence to look like one above. I run the game for 100 turns and had few excommunications. All the entries in the log that contains "has_ceasehostilities 1" end up either with invad_none or defend_deep as I tried first "defend_deep". So at least the AI is obeying, making correct decisions for both invasion and defence. There are still some excommunications though.
    I will change it now to defend_minimal and see the results..
    Last edited by Macaras; January 21, 2022 at 11:30 AM.

  5. #5
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: CEASE HOSTILITIES MISSIONS - stop excommunications

    Glad to hear there only few excommunications. I don't know whether it is possible to ever completely get rid of all excommunications, but I hope you succeed. Thanks for reporting what you found, I imagine it could help somebody one day!

    1. Can you add your full ai ltgd log somewhere? I would like to examine it.
    2. Continue means the other defend decisions for that faction will continue to be considered (and a defend decision other than defend_minimal potentially could be selected). However, if you're ok with that, it seems fine


    You're right that defend_minimal or defend_deep could both work but I believe defend_minimal means absolute minimum of defence. I distinctly recall defend_minimal being used for non-neighbour factions in the original M2TW descr_campaign_ai_db.

    To me, defend_fortified makes me think of forts (therefore it is similar to defend_frontline -- however the "fort" spot on the frontline the AI would ideally pick is probably where the AI would generally go, with defend_fortified). Maybe they also go to towns too, but then you will have them both on the frontline + in the town.

    So defend_minimal or defend_deep seems best.
    Last edited by z3n; January 21, 2022 at 02:31 PM.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  6. #6

    Default Re: CEASE HOSTILITIES MISSIONS - stop excommunications

    Thank you for your help!
    Last test I made - 65 turns, many factions had "cease hostilities", and only one excommunicated!
    Here is the log:https://www.mediafire.com/file/glp0y.../full.zip/file

    For anybody that would be interested, in my last version (that works the best so far) I placed the CEASE HOSTILITIES MISSION entries in the begining of the sections -defend and invade with the condition continue="false" and defend_deep (I am using Piter AI, modified a little bit):
    <invasion_decisions>

    <decision_entry>
    <!-- IF CEASE HOSTILITIES MISSION, DON'T ATTACK. 1% CHANCE TO DISOBEY -->
    <min_entry has_ceasehostilities="true"/>
    <max_entry rand="0.99"/>
    <faction_attitude invade="invade_none" continue="false" can_force_invade="false"/>
    </decision_entry>

    .......


    <defend_decisions>




    <decision_entry>
    <!-- IF CEASE HOSTILITIES MISSION, "defend_deep" -->
    <min_entry has_ceasehostilities="true"/>
    <faction_attitude defense="defend_deep" continue="false" can_force_invade="false"/>
    </decision_entry>
    .....
    I left the 1% chance to disobey, maybe I will remove it completely, and I am not sure if can_force_invade="false" is needed for the defence..

Posting Permissions

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