Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 61

Thread: AI Personalities

  1. #41
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Personalities

    Quote Originally Posted by Jadli View Post
    BTW, it seems that "tzar knud" that you were recommending, is actuallly "balanced knud" as tzar is a recruitment personality, not a building one, right? (the game reverts to default if there is an incorrect one)
    Maybe you misremember or I did a typo but I said fortified knud, which I also used in EB2 and DaC from what I recall.

    Honestly, I think the real reason these personalities weren't really used is because they became obsolete when the recruitment priority parameter was implemented within the EDU. However they appear to have some effect, as was shown by the people who tested them in depth (Serious Potato?). Whoever it was, thanks.

    Can't remember if there was an increase in naval invasions or not but I am using fortified knud as the personalities.

    https://www.twcenter.net/forums/showthread.php?728591-AI-Personalities&p=15348877&viewfull=1#post15348877




    Also with respect to what bitterhowl mentioned, the economic personalities do affect the AI's military behaviour at least indirectly. We have an official CA post on the subject in the OP which mentions the economic personalities are grouped by type (Military etc).

    This means that military buildings are more likely to be selected when their personality is set for that economically.

    It follows as a corollary that aggression would also be further enabled in comparison to a more "friendly" personality type which focused mainly on building for trade.
    Military Group
    Fortified = Militaristic (offense & defense land)
    Sailor = Militaristic (offense & defense navel)

    Finance Group
    Trader = Economic (external revenue - surplus generation)
    Balanced = Economic (situation based spending) [dynamic]
    Comfortable = Economic (internal revenue - savings generation)

    Civil Group
    Bureaucrat = Law, education and subterfuge
    Religion = Happiness
    Last edited by z3n; March 07, 2021 at 12:53 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)

  2. #42
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: AI Personalities

    My bad, I actually confused you with bitterhowl

    Quote Originally Posted by bitterhowl View Post
    fortified knud for default factions and tzar knud for expansive factions seems to be pretty enough. With smart ai_label of course (such as Skynet or PeterAI or Beermugcarl).

  3. #43
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    Also wanted to ask - there "craftsman" and "craftsmen" existing in .exe. Are they the same?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  4. #44

    Default Re: AI Personalities

    Quote Originally Posted by bitterhowl View Post
    Also wanted to ask - there "craftsman" and "craftsmen" existing in .exe. Are they the same?
    Craftsman is the used in the descr_strat. (All of these word are just enum-values, so the game turns them into a number)
    Craftsmen is written by the game to a text file (so it gets created out of the number that earlier came from the Craftsman), it looks like its either a log function or part of the ingame campaign editor. Definitly looks like a bug from CA. (Which doesnt matter cause i dont think this is ever used)

  5. #45
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: AI Personalities

    Quote Originally Posted by bitterhowl View Post
    Well, new revealed tables data according to beermugcarl's conclusion that "knud" is the most optimized one for recruit profile.
    Had to find the link myself http://www.twcenter.net/forums/showt...is-weekend-%29

    Quote Originally Posted by beermugcarl View Post

    for the core buildings, I advise these lines

    construction_cost_bonus_stone bonus 100 requires event_counter is_the_ai 1
    construction_cost_bonus_wooden bonus 100 requires event_counter is_the_ai 1

    it bypasses the need for lengthy finance scripting, it means the ai will be constantly upgrading their infrastructure.

    on a similar note, the following hidden traits are amazing for boosting the ai and its level of competence.


    Level GeneralAI
    Description GeneralAI_desc
    EffectsDescription GeneralAI_effects_desc
    Threshold 1


    Effect Fertility 10
    Effect Command 4
    Effect LineOfSight 20
    Effect Loyalty 10
    Effect BattleSurgery 33
    Effect HitPoints 2
    Effect TroopMorale 10
    Effect MovementPoints +125
    Effect Combat_V_Faction_Slave 10
    Effect TaxCollection 50
    Effect Trading 50
    Effect Law 10
    Effect SiegeEngineering 60

    it's up to you how much of each is reasonable but all of those lines are perfect for the ai, I advise attack and not defence as it allows
    the ai aggressors an advantage. and we should be rewarding their proactivity.

    in the character file, the following is good.

    make the wage of generals nothing and captains high, makes the ai use generals more.
    same with every unit, but I only recommend doing this to generals, maybe also admirals 0
    also, lowering the wage of diplomats has a similar beneficial effect.

    in SM Factions, give everybody naval invasions, it helps a tonne.
    put all rebels on as low a spawn as possible, you don't have to but DEFINITELY, reduce the pirates chance of spawning as all they do is discourage
    naval invasions by the ai.

    in descr_strat make the faction fortified Knud instead of balanced Smith (or whatever is there) as that seems to be the best label for recruitment and war.
    For the descr_strat file, a few things can be done.
    firstly the necessary bit, put every single ai_label to default (except papal states unless you want them to be aggressive)

    In the units file, you can give units up to 7 'fake' hit points, please do so with your own scrutiny to help the auto odds in the way you wish. (i recommend 4hp for cavalry units)

    removing night battles is awesome, the ai screws itself too much with it and the human can abuse it super hard.

    as far as starting armies and infrastructure goes, I advise you give the bigger starting nations (ie Byzantines) a super centralised production to both
    hinder their expansion and also to make the centralised zone way more important.

    for very spread out factions (ie Cumans) I recommend giving them high amounts of recruitment slots or just, in general, a better military infrastructure.

    on that note, the final things I advise is removing all free upkeep from the game as the human player can abuse it and the ai doesn't realise it exists.
    I have high doubts about that setting wages of captains high and generals to zero make AI use generals more, because... why wouldnt everyone be using it? I assume that one is not true, right?
    Last edited by Jadli; March 08, 2021 at 02:49 PM.

  6. #46
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    I set wages as beermugcarl told, also removed 2 HP from generals - and got most of them in field, not as permanent governors, as it was previously in my campaigns.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  7. #47
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: AI Personalities

    Oh? I will test that then

    If the AI is able to determine financial outcome of things like this, perhaps it would have also helped if one made AI generals terrible governors (negative effects on trade, tax collection etc).. as perhaps in general they dont want them in field, because they are more profitable as governors... (with all the bonuses we give to AI, they dont really need governors anyway)


    Though, I have my doubts ... as I said in the other thread I tried lowering movement poins of captains to make AI use generals more, but the AI rather kept sending captains on dozens of turns long trips... but its not exactly the same things so lets see

    PS
    Imho, giving 2 HP to generals bodyguards' kills the whole purpose of recruitment, as your generals are the best units...
    Last edited by Jadli; March 09, 2021 at 03:02 AM.

  8. #48
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Personalities

    I have high doubts about that setting wages of captains high and generals to zero make AI use generals more, because... why wouldnt everyone be using it?
    Not everyone uses good ideas. Gigantus once mentioned that a mod he worked on had generals which used invisible ranged weapons which didn't do anything much to keep them at safe distances instead of engaging.

    I can imagine that working pretty decently but never implemented it myself.
    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)

  9. #49
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    Well, pretty much good ideas are unused just because of ignorance. Those stuff from beermugcarl was posted here about 2 years ago or even earlier, everyone could try it - did you know about that recomendations?

    I can tell you that SavageAI works different with those changes, much more smart and dangerous.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  10. #50

    Default Re: AI Personalities

    I will not elaborate too much and probably come across as rude, but I am tired of the amount of false "knowledge" that gets spread in the modding community and turns into irrefutable truths. It is harmful to the everyone and espeically future modders trying to learn from these threads. To clear things up:

    Increasing wages for captains does not make the AI use more generals. All it does is drain the economy. I have run tens of thousands of test turns and this is quite simply not the case.

    There is no universal best personality type, it has to be tailored to the faction with its buildings and roster.

    The attributes assigned to that GeneralAI trait are ridiculous (I guess that is personal choice though) and some of them even surpass the hardcoded limits:

    - LineOfSight is limited to 10, generals & captains have a base of 6, so anything above 4 is useless
    - BattleSurgery is limited to 10 and very powerful
    - MovementPoints is limited to 20, which is equal to a 100% increase in possible movement range

  11. #51
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    Well, yes, it looks a bit rude.

    Most of 15 years of modding M2TW have passed without reverse coding with mostly trial and error method. Errors and mistakes are unavoidable on this way. Everything that modders (and beermugcarl particulary - he wrote it in OP of his AI submod) trying to do is for making performance and M2TW experience better. I'm referring to previous modders with great respect. I don't think than somebody want to post desinformation here intentionnaly. It's good that now we have possibilities to verify things and reveal .exe mechanics.

    I can tell that I'm working on my Westeros submod AI for about 2,5 years. I'm testing it on "Hotseat Testing method", so I can have 3-4 400-turns campaign tests per day. Now I'm making AI for BellumCrucis local submod, it has much bigger map and more factions, so I have 1-2 tests per day. As for my Westeros submod I can definitely say that before beermugcarl's fixes my generals set in settlements and very rarely went in field. Now I have most of them in field.

    "LineOfSight 10" is anyway better than "LineOfSight 6", so as other parameters for AI generals. As for ruining economy - all modern mods have AI money scripts so I don't think it's a problem here.

    Quote Originally Posted by Serious Potato View Post
    We are also using an economy script that basically just prevents AI factions from going into the red, but without the AI-only construction cost decreases. Personally I see the bigger issue in the AI's defend and invade decisions. After analyzing some of the popular campaign AIs (descr_campaign_ai_db.xml that is) I noticed a common problem: They generally go along the lines of "we are weak -> retreat, we are strong -> attack". Depending on the conditions (especially settlement count!) this can lead to a situation where the losing AI never goes into attack mode again, regardless of how many stacks they stack up (heh).

    Been writing a new campaign AI from scratch the last couple of days and it works great so far. Details probably go beyond the topic of this thread. Though I would recommend using less defensive behaviour in emergency situations and avoiding defend_minimal and defend_deep.
    If we speak about revealing things - reverse coding method is a great possibility to clairify some things about descr_campaign_ai_db coding. In kingdoms campaign AI we have such code
    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>
    Is it possible to verify those "defaults"?
    Also this
    Code:
    <decision_entry>
                    <!--
                        Not interested in factions that are not our neighbour, use defaults, may be overridden by forced/naval attacks
                    -->
                    <max_entry    is_neighbour="false"/>
                </decision_entry>
    If code reading stops on this decision and .exe goes to next faction calculations - how does forced/naval rules apply?
    Last edited by bitterhowl; March 10, 2021 at 04:45 AM.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  12. #52
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Personalities

    @bitterhowl

    I believe the defaults are actually listed in the original descr_campaign_ai_db within the comments which this one has, just read any value like within the comments like

    frontline_balance="0.0" :: ratio of factions frontline military strength vs the target

    As the default for min entry frontline_balance


    https://github.com/tmodelsk/SSHIP-Tw...aign_ai_db.xml


    Forced and naval attacks probably refer to how force_invade and can_force_invade interact with the defaults or previous conditions.

    e.g. is_neighbour false like in your example is false in the max entry (which means both evaluate to false meaning defaults normally apply to factions which are not the neighbour).

    This means that is the default decision for any factions which are not "neighbours", and it will be applied like that to any of these factions immediately without further consideration.


    However, this decision might be overridden by another decision which has force_invade or can_force_invade, which subsequently overrides the defaults and that decision specifically.


    What's interesting is that this happens even without continue in that decision.
    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)

  13. #53
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    Thanks, the answer was just before my eyes as always. So defaults are those
    Code:
                                        defense="defend_normal"            
                                        defend_priority="0"                
                                        invade="invade_none"           
                                        invade_priority="0"                
                                        at_war="false"                    
                                        want_peace="false"                
                                        want_ally="false"                
                                        want_be_protect="false"            
                                        want_offer_protect="false"       
                                        force_invade="false"            
                                        alliance_against="0"            
                                        pts_desire="0"                    
                                        pts_alliance="0"                
                                        can_force_invade="true"            
                                        continue="false"/>
    So here is another question - if we have code like this
    Code:
                 <decision_entry>
                    <min_entry    stance="AtWar" num_enemies="2"/>
                    <max_entry    target_num_enemies="1"/>
                    <faction_attitude     alliance_against="20" continue="true"/>
                </decision_entry>
    all parameters that are not mentioned in faction_attitude line are set to default? Such as at_war - in this example we got stance="AtWar" but then attitude will be at_war="false" according to defaults. So maybe such incomplete decision blocks are harmful because of frequenly changes of such paraneters if they're not mentioned?

    Quote Originally Posted by z3n View Post
    However, this decision might be overridden by another decision which has force_invade or can_force_invade, which subsequently overrides the defaults and that decision specifically.


    What's interesting is that this happens even without continue in that decision.
    There is a question - how does that rules apply if calculations for current faction ended after continue="false" matching? All blocks below will not be read. And if naval/forced block is above - it will be executed normally and no need to overwrite anything.
    Last edited by bitterhowl; March 10, 2021 at 10:31 PM.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  14. #54
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: AI Personalities

    Quote Originally Posted by Serious Potato View Post
    I will not elaborate too much and probably come across as rude, but I am tired of the amount of false "knowledge" that gets spread in the modding community and turns into irrefutable truths. It is harmful to the everyone and espeically future modders trying to learn from these threads. To clear things up:
    Quote Originally Posted by bitterhowl View Post
    Well, yes, it looks a bit rude.

    Most of 15 years of modding M2TW have passed without reverse coding with mostly trial and error method. Errors and mistakes are unavoidable on this way. Everything that modders (and beermugcarl particulary - he wrote it in OP of his AI submod) trying to do is for making performance and M2TW experience better. I'm referring to previous modders with great respect. I don't think than somebody want to post desinformation here intentionnaly. It's good that now we have possibilities to verify things and reveal .exe mechanics.

    I can tell that I'm working on my Westeros submod AI for about 2,5 years. I'm testing it on "Hotseat Testing method", so I can have 3-4 400-turns campaign tests per day. Now I'm making AI for BellumCrucis local submod, it has much bigger map and more factions, so I have 1-2 tests per day. As for my Westeros submod I can definitely say that before beermugcarl's fixes my generals set in settlements and very rarely went in field. Now I have most of them in field.
    Well, seems to me it would have helped a lot, if the AI submods for various mods werent in sub forums for the mods, but here in the AI modding forum, so people could share the knowledge better (wasnt that the purpose of this forum?), with permanent redirects of course. Seems to me lot of AI modders are kinda doing their own AI thing in their subforum without feedback from other AI modders.... too late for that now


    Anyway, regarding why certain personalities looks more agressive, I think it might be largely due to the type of units they recruit. As you guys said in the other thread, for military_balance decisions (which are basically part of all invade decisions) and so on the unit value is likely used (which includes unit stats in some way) or simply based on unit stats (in other words, the expected battle odds I presume). In hotseats, we naturaly care about units stats and autoresolve greatly. And so if the hotseat uses only autoresolve battles, everyone knows its not worth recruiting archers and cavalry, as they suck in autoresolve, especially compared to their price, while heavy infantry is the best you could wish for in battles. Especially archers are literally useless (though depends on a mod), it seems in AR the missile attack has a very very low impact... it seems like that their secondary meele weapon is more relevant in AR than their missile weapon. Cav is good, but the unit count is small, hence bad in AR, as well as low unit value, and they are also expensive. Spearmen are also generally not as good as heavy infantry in AR, naturally due to their stas. And heavy infantry also of course has one of the highest total defence, which seems to matter more than attack in autoresolve.

    So I believe that likely explains why the "knud" seems more agressive, despite the fact it handles only unit priorities. It has large bias towards heavy infantry (more than "smith"), hence its much easier for him to have high military balance ratio (or similar stuff) over the enemy, and thus going for more invade decisions and faster. On other hand, it might be very hard for archer/cav focused faction to expand.
    Last edited by Jadli; March 11, 2021 at 12:21 PM.

  15. #55
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Personalities

    all parameters that are not mentioned in faction_attitude line are set to default? Such as at_war - in this example we got stance="AtWar" but then attitude will be at_war="false" according to defaults. So maybe such incomplete decision blocks are harmful because of frequenly changes of such paraneters if they're not mentioned?
    Well in that example AtWar is within the min entry, which means the max entry (whose default is AtWar) will also get matched.


    ___
    min entry default
    stance="Allied" :: diplomatic stance with the target (Allied, Neutral, AtWar)


    max entry default
    stance="AtWar"
    ___


    How it works I think, is that things are evaluated within a range, so it's like


    if (attitude < 0)
    {
    we don't like them
    }

    if (attitude > 0)
    {
    we like them
    }

    However, in the context of the AI what it means is that ANY faction between a faction rating of -1.0 and positive 1.0 will get matched (which is literally every faction in existence).

    The decision entry parameters simply specify which get matched, because defaults allow any to get matched unless a min entry (the threshold i.e. the minimum requirement for a faction to get matched to the decision), is met. So in the case of the defaults applying to a faction, the minimum requirement is that is_neighbour is false.


    And since the maximum requirement is that is_neighbour can be true, the max_entry is false. If the max_entry was true, then the defaults would apply to factions which are neighbours and factions which are not neighbours (because the min entry for is_neighbour is false and max entry is true).

    So it is an important consideration what the defaults are when writing decision entries.

    Code:
              <decision_entry>
                    <!--
                        Not interested in factions that are not our neighbour, use defaults, may be overridden by forced/naval attacks
                    -->
                    <max_entry    is_neighbour="true"/>
                </decision_entry>
    This is why they say the defaults apply to them (including the default invade="invade_none" decision, which is why they specifically stated force_invade and can_force_invade could override this default)

    There is a question - how does that rules apply if calculations for current faction ended after continue="false" matching? All blocks below will not be read. And if naval/forced block is above - it will be executed normally and no need to overwrite anything.
    The rules apply to each target faction, of the faction itself as stated by CA.


    So for faction A

    faction A evaluates defend decision vs Faction B
    faction A evaluates defend decision vs Faction C
    faction A evaluates defend decision vs Faction D
    faction A evaluates defend decision vs Faction E

    etc.

    faction A evaluates invasion decision vs Faction B
    faction A evaluates invasion decision vs Faction C
    faction A evaluates invasion decision vs Faction D
    faction A evaluates invasion decision vs Faction E


    Faction A finds the one decision (or multiple if continue true is used) to apply to that target faction (faction B). Then goes to the next faction to evaluate decisions against it.


    At the start of every factions turn (or when diplomacy changes), the LTGD is re-evaluated as follows:
    for every target faction (all other factions), evaluate the defend decisions
    for every target faction, evaluate the invasion decisions
    This is my understanding of the process and I believe it is correct to this day. Maybe I am wrong but the comments seem to clearly explain that is how it works.
    Last edited by z3n; March 11, 2021 at 02:17 PM. Reason: sneaky forum software transforming the quote in actual hidden comments!
    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)

  16. #56
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    Quote Originally Posted by Jadli View Post
    Well, seems to me it would have helped a lot, if the AI submods for various mods werent in sub forums for the mods, but here in the AI modding forum, so people could share the knowledge better (wasnt that the purpose of this forum?), with permanent redirects of course. Seems to me lot of AI modders are kinda doing their own AI thing in their subforum without feedback from other AI modders.... too late for that now
    Exactly. That's why most of my activity on AI on this forum located in this subforum, also I posted here links to interesting AI stuff across twc.

    Quote Originally Posted by Jadli View Post
    Anyway, regarding why certain personalities looks more agressive, I think it might be largely due to the type of units they recruit. As you guys said in the other thread, for military_balance decisions (which are basically part of all invade decisions) and so on the unit value is likely used (which includes unit stats in some way) or simply based on unit stats (in other words, the expected battle odds I presume). In hotseats, we naturaly care about units stats and autoresolve greatly. And so if the hotseat uses only autoresolve battles, everyone knows its not worth recruiting archers and cavalry, as they suck in autoresolve, especially compared to their price, while heavy infantry is the best you could wish for in battles. Especially archers are literally useless (though depends on a mod), it seems in AR the missile attack has a very very low impact... it seems like that their secondary meele weapon is more relevant in AR than their missile weapon. Cav is good, but the unit count is small, hence bad in AR, as well as low unit value, and they are also expensive. Spearmen are also generally not as good as heavy infantry in AR, naturally due to their stas. And heavy infantry also of course has one of the highest total defence, which seems to matter more than attack in autoresolve.

    So I believe that likely explains why the "knud" seems more agressive, despite the fact it handles only unit priorities. It has large bias towards heavy infantry (more than "smith"), hence its much easier for him to have high military balance ratio (or similar stuff) over the enemy, and thus going for more invade decisions and faster. On other hand, it might be very hard for archer/cav focused faction to expand.
    Absolutely agreed. My thoughts and explanations for myself of such collateral effects was the same.

    Quote Originally Posted by z3n View Post
    Well in that example AtWar is within the min entry, which means the max entry (whose default is AtWar) will also get matched.


    ___
    min entry default
    stance="Allied" :: diplomatic stance with the target (Allied, Neutral, AtWar)


    max entry default
    stance="AtWar"
    ___


    How it works I think, is that things are evaluated within a range, so it's like


    if (attitude < 0)
    {
    we don't like them
    }

    if (attitude > 0)
    {
    we like them
    }

    However, in the context of the AI what it means is that ANY faction between a faction rating of -1.0 and positive 1.0 will get matched (which is literally every faction in existence).
    It's my fault here, I wasn't clear enough. I understand basics about min/max and other things

    I mean that this decision block
    Code:
                 <decision_entry>
                    <min_entry    stance="AtWar" num_enemies="2"/>
                    <max_entry    target_num_enemies="1"/>
                    <faction_attitude     alliance_against="20" continue="true"/>
                </decision_entry>
    really looks like this
    Code:
                 <decision_entry>
                    <min_entry    stance="AtWar" num_enemies="2"/>
                    <max_entry    target_num_enemies="1"/>
                    <faction_attitude     invade="invade_none" invade_priority="0" at_war="false" want_ally="false" want_peace="false" want_be_protect="false" want_offer_protect="false" force_invade="false" pts_desire="0" pts_alliance="0" alliance_against="20" can_force_invade="true" continue="true"/>
                </decision_entry>
    because default settings always apply to faction_attitude line if values not changed.

    By meaning this block should just add points to alliance_against parameter against faction which is at war with current faction, if target faction is at war with only current faction and current faction has 2 or more enemies.

    But also as we can see it will change some vital parameters for warring - such as invade type (to invade_none) and at_war to "false".

    I understand that continue="true" will prolong decision calculations for current faction, and probably next block will change invasion_type and at_war back to good settings. But during one session for current faction those valuse will change many times, especially invade type to invade_none if anoter not specified.
    Last edited by bitterhowl; March 12, 2021 at 02:11 AM.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  17. #57
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: AI Personalities

    That attitude is interesting, it may very well be a big in CA's code. CavalryCmdrs research indicated that factions not at war can still consider each other "atwar", due to that. However the case for it not being a bug could be if a faction has many enemies and has more important targets military balance wise (it would rather focus on another superpower than an ex vassal rebelling against it).


    As for the other defaults that seems correct, attitude decisions should go before. I believe CA commented something to that effect since about decisions which have continue=true. Conversely it may be a good idea to set continue=false on obvious force_invade or invade_immediate entries.
    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)

  18. #58
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    All I wanted to say (for future modders of course) is to be very careful in compositing decision blocks and be shure what exactly you order to AI with your code.

    Because only now (thanks to this forum) I finally understood "defaults" issue after years of trials and errors.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  19. #59
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: AI Personalities

    Quote Originally Posted by Jadli View Post
    Well, seems to me it would have helped a lot, if the AI submods for various mods werent in sub forums for the mods, but here in the AI modding forum, so people could share the knowledge better (wasnt that the purpose of this forum?), with permanent redirects of course. Seems to me lot of AI modders are kinda doing their own AI thing in their subforum without feedback from other AI modders.... too late for that now
    Maybe it's still not late to place this thread into this subforum.

    https://www.twcenter.net/forums/show...-intelligence)

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  20. #60
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,075

    Default Re: AI Personalities

    Really, this new additional info should be gathered and written down in a tutorial explaining the logic behind things. I've used CavalryCmdr's tutorial before in order to tweak certain AI labels but I couldn't fully grasp what I was doing and what the logic was behind all this as a lot of things were left unexplained (or perhaps taken for granted).
    Last edited by Razor; May 09, 2021 at 06:25 PM.

Page 3 of 4 FirstFirst 1234 LastLast

Posting Permissions

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