-
June 06, 2017, 01:12 PM
#1
Libertus
Questions about modding AI diplomacy with player.
I would like to mod the following things but i am not sure how/where:
1. How often can an AI faction ask the player for a Peace Treaty - or how often can an AI faction initiate diplomacy with the player?
Specifically i want to greatly reduce the spam of diplomacy requests that the AI sometimes sends to the player, preferably something like "once every 15 turns".
2. Can i change the AI so that it will not Request a Peace Treaty with the player if they have -50 or more negative reputation with the player?
Again the point is to prevent the AI from spamming Peace Treaties (or any other diplomatic option) when they are losing vs a player.
If possbile it would be ideal if these tweaks would only change how the AI treats with the Player.
The AI to AI treaties and relationships should be unaffected if possible.
Thank you for reading and helping me out
-
June 07, 2017, 11:43 PM
#2
Libertus
Re: Questions about modding AI diplomacy with player.
Thanks to Gray Riders from Steam Workshop i was able to create the following "solution" as a mod:
Using the Pack File Manager i opened data.pack in TWW/data folder and then browsed to "db" and then inside it to "cai_personality_deal_evaluation_deal_component_values_tables".
That table defines how important each specific treaty is to an AI depending on "AI personality" and "relations to another faction".
So using Pack File Editor i made a new mod and imported the "cai_personality_deal_evaluation_deal_component_values_tables".
Now in my mod for EVERY "deal_component" called "NON_AGGRESSION_PACT" and "PEACE" i changed the "bitter_enemies_value" and the "unfriendly_value" and the "very_unfriendly_value" to "-999" (negative 999).
I deleted every other deal_component that was not related to non-aggression-pact and peace so my mod would not interfere with anything else.
In total there were 12 "peace" deal_components and 26 "non_aggression_pact" components - each one for a different AI personality and each has to be changed.
The end result was that no AI faction will ever request peace (non aggression pact) from a faction that it has a lower than Neutral standing (negative relationship).
The downside is that the AI will not accept an offered peace request with a faction that it has a negative relationship with.
So if an AI faction hates you (or any other AI faction) they will not accept a peace treaty even if you are much stronger than them.
For me this is not a problem since i do like the "fight to the death" attitude that the AI factions have got now, instead of spamming peace requests like wimps every turn.
If you wish to lessen this effect then make the penalty (-999) for "unfriendly" lower or even leave it at default, so that slightly negative relations will not prevent a peace treaty.
Since any newly made mod is not automatically placed on steam workshop the mod manager in the launcher for TWW will mark it as "outdated" which means you must enable the "enable outdated mods" checkbox in the launcher's mod manager.
I never made a mod before but just by following some basic guides on mod making for TW i put together this simple mod in 15 minutes.
If you find this mini-guide to making a "No Peace with Enemies" mod fun then please kill a few orcs for me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules