This feature is known and already exists in some mods. As for myself I'm planning to link ai_label to faction leader's attributes and fire it on CeasedFactionLeader, when previous leader dies.
This feature is known and already exists in some mods. As for myself I'm planning to link ai_label to faction leader's attributes and fire it on CeasedFactionLeader, when previous leader dies.
Hehe, I had literally the same idea!
How many you intend to make?
I was thinking something like:
Expansionist vs peacemaker
Chivalrous (keep alliances and help allies) vs backstabber (attacks allies if useful)
Pious (focuses at enemies of other religion, avoid fighting the same religion) vs ungodly (doesnt care)
Smart (attacks only when he has sufficient troops etc) vs dumb (attacks ill prepared, with small forces etc)
Well, same ideas except Pious/ungod.
And thought about combining Expancionist with Backstabber and Chivalrous with Peacemaker.
Also think it's notable that such idea appeared only now after 15 years of modding. When it's common known that "AI is dumb and blah-blah-blah".
Yea, I was surprised to find out that there are several interesting features that seem to have been kinda ignored for a long time, shame people werent willing to look into such things during the height of M2TW popularity... Though some mods definitely used some of the "unknown" areas, but just didnt share what they found I suppose.
Anyway, yea, I of course intended to combine it all to some variations. So there is a chivalrous/backstabbing/pious/smart/dumb expansionist, and one or two defensive one I suppose. It really depens how deep one intends to go and also mainly whether all your factions already use a joint AI label, or various ones, which would add a lot of work. Though I suppose if one makes a proper system for this, it might be just a matter of adjusting one or two value for each variation based on new FLs.
Also thought that change ai_label should be only once for one FL, because frequent changes of global
faction's behavior will be bad for performance. At least two changes - when new leader becomes a leader and maybe at senile age if he will live long enough.
Maybe moderator should remove those posts somewhere in a separate thread because of offtopic here.
If we'll return to main theme - our local forum tests shows that most important improvements for AI performance are become after beermugcarl's recommendations for starting_action_points, line of sight and movement_points tweaks. Even old AIs, even vanilla AI shows much more smart and dangerous behavior.
By tweaks you mean increasing them? Well, one could easily handle lineofsight and movement_points traits/ancs to AI via triggers, if it helps them
Yea, I meant to do it only once a faction has a new leader. I assume if he ruled for really long time, then for example after 20 years it could be checked again.
The tweaks are in the OP
https://www.twcenter.net/forums/show...ed-AI-errr-3-0
That is a really good question, I thought it was directly related to the same algorithm for faction rankings of military. I think unit strength depends on unit numbers + stats however it is heavily weighted on unit numbers to start unless another stat "makes up" for that e.g. hitpoints which effectively double their unit numbers.
One way of testing this is implementing a mirror unit with almost equivalent stats, then increasing unit count and seeing whether there is an equivalent increase when attacking another army on the map with 1 unit of the mirror.
So
1) Place 2 armies on the map right next to each other via descr strat
2) Each army has 1 mirror unit (everything the same except 1 thing different)
3) Make the difference the amount of soldiers in the unit at first, then attack the other army and see the "strength balance"
4) Try stat changes, significant or not
I believe from my own observations in the past that unit numbers are very heavily weighted. More than the stats.
Sadly even if I had time to write this up, I wasn't able to test it. Such is life
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)
Got another important question about .xml coding - does the order of conditions in min/max lines matter for engine?
I mean - are this codeand this oneCode:<min_entry stance="AtWar" strongest_neighbour="true" is_target_faction_to_outlive="true" military_balance="1.001" free_strength_balance="1.001" frontline_balance="1.001"/>
equal for reading by .exe?Code:<min_entry military_balance="1.001" free_strength_balance="1.001" frontline_balance="1.001" strongest_neighbour="true" is_target_faction_to_outlive="true" stance="AtWar"/>
Or in incorrect order some conditions could be missed because they should go first to read, for example stance="AtWar" in my example will be read only in first variant because it comes first as it should, and in second variant it will be ignored because .exe doesn't expect this condition after military_balance etc.?
It shouldn't matter, because each token gets matched or if it's a series of if statements within a while loop e.g.Got another important question about .xml coding - does the order of conditions in min/max lines matter for engine?
While (parsing)
{
if min entry
{
// for AtWar testing
if AtWar
{
Do stuff
}
if Military balance > Other Military Balance
{
Do stuff
}
} // end of min entry checks
__________________________________________________________________
if max entry
{
if AtWar
{
Do stuff
}
if Military balance > Other Military Balance
{
Do stuff
}
} // end of max entry checks
} // end of the entire while loop
At some point within a loop like that, the values would still be matched and actions taken.
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)
bitterhowl discovered concrete evidence in the ltgd logs that vassals don't use any invasion decisions. (meaning they wont actually invade places normally)
https://www.twcenter.net/forums/show...1#post15997091
https://www.twcenter.net/forums/show...1#post15997361
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)
Might be the hidden "unit value" the game calculates from the EDU entries. Both stats and especially numbers influence the total value. Here are some examples of vanilla units (read as: unit, value/solder, unit value):And a question - military_balance counts only unit numbers or unit numbers + their stats?
Feudal Knights, 18,78, 601
Hobilars, 6,00, 192
Peasant Archers, 2,88, 138
Longbowmen, 6,33, 304
Viking Raiders, 6,03, 362
Dismounted Feudal Knights, 21,02, 1009
Elephant Rocketeer, 131,25, 1575 (highest unit value)
ME Peasants, 0,47, 28 (lowest unit value)
vanilla_unit_values.txt
Want to join to your revelations of modding secrets with small showdown.
I discovered that target_faction in descr_campaign_ai_db also has min/max entry. In vanilla it's england as min and slave as max.
Seems that I already mentioned it somewhere else but didn't find that post.
All factions in ltgd.log has their number according to descr_sm_factions order. So for vanilla england is 0 and next faction is 1 and so on.
Why it can be useful? In this example
wich is described as very useful (it force faction to ignore not neighboring factions and don't plan invasion to far countries). But in this case for example for Scotland - France and Egypt are equal non-neighboring factions, wich leading Scotland to be isolated and minimises interactions between factions in near neighborhood.Code:<decision_entry> <!-- if not our neighbour, and we have any settlements, use defaults --> <min_entry num_settlements="1"/> <max_entry is_neighbour="false"/> </decision_entry>
If we'll set interval for each faction or culture type - wich factions not to interact at all if they're not neighboring and wich to interact - campaign could be much more interesting.
I dont get it, please explain
What bitterhowl may be implying is that since sm_factions is sorted from faction 1 - 10 (for example)
The minimum entry could be faction number 1, and the max entry faction number 5. This may end up allowing region groups to focus on each other (e.g. regional factions from minimum 1 to maximum 5)
I wonder if it actually works that way. It certainly sounds possible...
From what I recall however, culture groups can focus on each other too. Or you can simply manually add a separate decision for each (more work but just copy and paste)
edit:
Actually not culture, it was target_religion which exists.
Last edited by z3n; March 14, 2021 at 05:13 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)
That's it. I think it's definitely works that way because it written in min/max conditions explanation
And ltgd.log shows nubers of factions according to their order in descr_sm_factions.txtCode:min_section target_faction="england" :: target faction label (see descr_sm_factions.txt) max_section target_faction="slave"
Once again - this block does not make difference how far this non-neighboring faction is
So for Scotland - France and Mongols and Russia will be equally executed and ignored. For far eastern factions (in case of Scotland) it's good to do. But if we'll include France in Scotland's area of activity, even they're not neighbours for engine, we can coordinate their activities against England using alliance_against, trusted_ally_enemy and so on.Code:<decision_entry> <!-- if not our neighbour, and we have any settlements, use defaults --> <min_entry num_settlements="1"/> <max_entry is_neighbour="false"/> </decision_entry>
If we'll speak in terms of Westeros - Lannisters may not be neighbours of Martells, as well as Boltons and Nights Watch. But if igniration of far nothern factions is useful, ignoration of nearst non neighboring faction make gameplay more strait. Maybe this is one of the explanations of allies passivness and weak interactions between factions.
Making difference between non-neighboring factions we can focus faction's attention to next target more directly and make behavior more diversive and interesting. All we need is to regroup their list in descr_sm_factions in geographical order
Some more important links here.
This is twc old thread about LTGD logging by GED. https://www.twcenter.net/forums/show...ign-AI-Project
Maybe it should be replaced into this section.
This is another good research of Nikolai1962 on Totalwar.org https://forums.totalwar.org/vb/showt...nding-problems