How I approached that problem was by checking the number of enemies the faction had at the time. If the faction had 1 enemy or more then rebels would be focused on less or not at all.
How I approached that problem was by checking the number of enemies the faction had at the time. If the faction had 1 enemy or more then rebels would be focused on less or not at all.
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)
Well, for myself I decided to make different AI for different religions (in my Westeros mod they have different gameplay) + 1 AI if faction is crusading/on jihad.
For historical projects with much greater map than my I see a decision to make AI profile for first 50-100 turns for expanding and less care with diplomacy, and then second AI profile for mid/late campaining with diplomacy and win_conditions orientation. Maybe even 2 variants - "chivalrous", which will keep trusted allies and no betrayals; another variant - "machiavellous", who will act only according it's own purposes. I even thought to set it according FL's Chivalry/Dread attributes.
This is very interesting, because manual with CA has a loose connection with reality.
You have to remember not to test on the slave. AI behaves completely different to other factions.
"invade_priority = 1199 Cumulative number, compare with invade_priority of other factions and invade faction with highest number"
In my opinion, this is the percentage of forces that AI is supposed to use in an attack. It may not exceed the maximum ceiling.
Perhaps he lists it differently before and after the declaration of war.
Maybe I'm wrong, I thought so recently and haven't tested it.
Last edited by Piterx93; July 19, 2020 at 02:05 PM.
Thanks for removing it here!
This thread deserves same fate I think -
https://www.twcenter.net/forums/show...e-Optimisation
@bitterhowl
Did you ever follow up with pts_desire from this thread?
Invasion_priority vs pts_desire in descr_campaign_ai_db (twcenter.net)
I've only done minimal work with pts_desire, I initially wanted to try using it to target specific factions with most_desireable, however in my experiments I couldn't reliably predict what faction was most_desireable no matter how much I put into pts_desire. I never thought about pts_desire doing anything in it's self, and it doesn't show up in the LTGD log, so it's hard to quantify with my particular AI format.
I was wondering if you had any additional insight into this.
First of all thanks for bringing this up again as a topic, I definitely need to test out @bitterhowls idea. I took a more contrarian approach to that one, I didnt get the impression (untested) that most_desirable relates to pts_desire despite the name. I always thought that was based on whether the target faction was human and according to other variables like number of viable invasion targets according to the ltgd.
Maybe I'm mistaken and they are connected but I'm pretty sure it's some odd ltgd related calculation that nobody but the original AI dev could explain. Perhaps it was meant for hordes? Since it didnt ever matter whether they're a neighbouring faction or not.
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)
Like I said, I have only done limited testing with this, but that certainly lines up with what findings I did get. I never did get any indication of how most_desirable was determined, though I did figure out some things that DIDN'T determine it. This is what I remember it's not, though I've lost my notes on it, so this is not a complete list:
pts_desire
resources in regions
invade priority, or really any value you can set in ai_db
faction to outlive
faction standings
strongest/weakest
ally/at war
The only consistent thing I could honestly find was it's almost always is_neighbour, but seeing how there are usually multiple neighbour factions, that doesn't really help narrow it down, and again only ALMOST always.
I came to the conclusion that it's a variety of factors that was too much work to try and unravel, since you couldn't control/influence it and using it doesn't seem to be a good idea because sometimes it's a faction they would not be wise to attack. Although, with the testing I'm doing now with a minimal AI came out with an interesting result, it is possible for a faction to attack their most_desirable even with invade_none and invade priority -1.
edit: I didn't disable forced invasion, so that explains them attacking with invade_none.
Last edited by CavalryCmdr; June 06, 2021 at 04:48 AM.
Well, thanks for attention! I'm using pts_desire and see that those factions whom I increased them in descr_campaign_ai_db became most_desirable in LTGD.
Since I'm testing in hotseat mode I can't see AI actions each turn. I hope I'll release my code on local forum and will get more detailed feedback from players.
I was trying along the lines of invade priority so like 1500 or so. Maybe the numbers I used were too high and was just ignored or something. I'll have to look at it again.
Do you know if it's cumulative like alliance_against? I imagine it must be guess work since it's not given in LTGD.
Thanks for the info, I will definitely take another look at it.
Edit:
I think I was working with pts_desire back before Kingdoms, maybe it wasn't even really implemented yet. There are a lot of differences from the version I did most of my learning on to the finished one. I sometimes forget that.
Last edited by CavalryCmdr; June 12, 2021 at 04:01 AM.
Got some promising feedback about my CAI drafts, using pts_desire, pts_invasion, pts_defend as a new method. I suppose I'll release it soon, I think it would be better to do it in this section, how do you think?
That would make sense, other such works like Skynet AI can be found here as well.
With great power, comes great chonky dragons to feed enemies of the state. --Targaryens?
Spoiler for wait what dragons?:
So here's a link to dedicated English speaking thread about my brand new CAI TrueGeneral CamP.A.I.N.
P.A.I.N. starts from right there
If community insists I can open a separate thread here on TWC ofc.
your link is not working.
getting older
Hi Bitterhowl,
I have a question to your AI, on the site where the link did lead me you say that there are 4 AI types pope, slave, default and mongols. As I just Implemented the AI into Roar of conquest I thought it would be good to set the factions to these AI´s instead of Catholic or Islamic. Was this assumption correct? Or would it also work with the other AI´s? Will give some feedback later on when I have played some campaigns, for the moment sicily has declared war on the papal states on turn 5 which I don´t feel very comfortable about but I will see how it goes. I just hope the pope can avoid conflicts just stay in rome, not conquer new territories and call a crusade here and there.