Results 1 to 23 of 23

Thread: campaign_db_ai

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: campaign_db_ai

    Hmmm I'm now evaluating all those numbers for the different balances. I understand them well enough (except for free_strength_balance) but I'm wondering whether its intentional CA has things always go up to 1.0 (i.e. max) and then 1.0 for min so all cases are covered.
    They also have the default which means do nothing if no condition if met.

    So if I were to change those balances and didn't have them coincide exactly, it would mean the AI would stay passive and go bash rebels instead, right?

    While there is a portion in the code which is commented out reading how there should be a condition to make the AI always attack the human if not at war, I wonder whether it is in another file, because the AI actually does do that (instead of reverting to staying passive).

    I can have an AI bordered in on all my regions, put full stacks in each settlement there and our of the blue they will tend to attack me with some puny besieging force or blockade one of my ports. I'm wondering how I can control that problem...
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  2. #2

    Default Re: campaign_db_ai

    While there is a portion in the code which is commented out reading how there should be a condition to make the AI always attack the human if not at war, I wonder whether it is in another file, because the AI actually does do that (instead of reverting to staying passive).

    For testing map changes I made a quick AI profile and set it in the strat file for all factions. It only allows for attacking rebs and that is all they do (apart from jihads/crusades), so i don't think there is hidden hardcode to make the AI attack the player.

    There *is* the thing in the faction standings file that makes the AI gradually dislike the human player on H and VH. Also the faction standing trigger for gradually diliking the top factions (which the human will be after a while) but in my testing with my attack_rebels_only profile i never get attacked (or asked for alliance).
    It's not a map.

  3. #3
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: campaign_db_ai

    Hmm but if that is true, what about naval invasions? They are 100% handled by the hardcode.

  4. #4
    Member Member Re Berengario I's Avatar
    Join Date
    Nov 2003
    Location
    Italy
    Posts
    336

    Default Re: campaign_db_ai

    Quote Originally Posted by FactionHeir
    I can have an AI bordered in on all my regions, put full stacks in each settlement there and our of the blue they will tend to attack me with some puny besieging force or blockade one of my ports. I'm wondering how I can control that problem...
    <faction_attitude (...) can_force_invade="false"/>

    This will stop the AI to follow the infamous missions (conquer settlement, block port) the council gives.

    You need to tune it though because otherway you'll have a very, and I mean very, passive AI.

    For example in AD I stopped all this stuff for catholics against catholics or when the relationship with and/or the global rep of the target faction weren't bad enough.

  5. #5
    Relentless Bughunter Senior Member FactionHeir's Avatar
    Join Date
    Dec 2006
    Location
    London, UK
    Posts
    8,115

    Default Re: campaign_db_ai

    Hmmm can_force_invade would only apply to if there was something forcing the AI to invade though? I don't see something in the code calling for that when not at war with a faction or being overwhelmed.
    At the same time, council missions are never aggressive towards nations at war (at least not for the player). But then maybe there is something in the hardcode we don't know about (random port blockading of an ally for a turn for example)
    Want gunpowder, mongols, and timurids to appear when YOU do?
    Playing on a different timescale and never get to see the new world or just wanting to change your timescale?
    Click here to read the solution
    Annoyed at laggy battles? Check this thread out for your performance needs
    Got low fps during siege battles in particular? This tutorial is for you
    Want to play M2TW as a Vanilla experience minus many annoying bugs? Get VanillaMod Visit the forum Readme
    Need improved and faster 2H animations? Download this! (included in VanillaMod 0.93)

  6. #6
    Member Member Re Berengario I's Avatar
    Join Date
    Nov 2003
    Location
    Italy
    Posts
    336

    Default Re: campaign_db_ai

    Quote Originally Posted by FactionHeir
    Hmmm can_force_invade would only apply to if there was something forcing the AI to invade though? I don't see something in the code calling for that when not at war with a faction or being overwhelmed.
    At the same time, council missions are never aggressive towards nations at war (at least not for the player). But then maybe there is something in the hardcode we don't know about (random port blockading of an ally for a turn for example)
    Mate, strip down the AI xml file and start playing with just one value at time and one setting at time and see how the AI behaves. It's the only way you can understand how the AI is influenced by the various settings.

  7. #7

    Default Re: campaign_db_ai

    Hmm but if that is true, what about naval invasions? They are 100% handled by the hardcode.
    I've got force_invade set to false too, maybe that stops that. They only attack rebs apart from crusades/jihads. profile is:

    Code:
    	<faction_ai_label name="active">
    	
    		<invasion_decisions>
    
    			<decision_entry>
    				<min_entry	target_faction="slave"/>
    				<max_entry	target_faction="slave"/>
    				<faction_attitude	at_war="true" invade="invade_immediate"/>
    			</decision_entry>
    
    			<decision_entry>
    				<faction_attitude	invade="invade_none" can_force_invade="false"/>
    			</decision_entry>
    
    		</invasion_decisions>
    		
    		
    		<defend_decisions>
    
    			<decision_entry>
    				<faction_attitude	defense="defend_normal"/>
    			</decision_entry>
    
    		</defend_decisions>
    
    	</faction_ai_label>
    edit: should mention i've only been testing map changes at medium difficulty. may have something to do with it.

    edit: forgot to say. i don't think naval invasions are 100% hardcode/missions. some naval invasions between certain pairs of regions happen on their own (due to map and path-finding working) most of the time the path-finding doesn't work over sea so that's why they use missions to compensate (as they seem to work independently e.g RTW romans with senate). that's my opinion anyway.

    edit2: another thing to remember is the AI is often stuck. an army may have been given orders to attack a city and got stuck on it's path along the way or after retreating. when another faction takes the city (including yours) then the stack becomes unstuck again but often it will then move next to the city it was supposed to have attacked. i think these cases may not follow the normal logic as set out in the AI file. same thing for ships ordered to attack and then a ceasefire is agreed. ship may not get it's orders cleared.
    Last edited by nikolai1962; 04-09-2007 at 07:49.
    It's not a map.

  8. #8
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: campaign_db_ai

    Well force_invade=false stops all invasions except those handled by the XML file I think, so yes, it'd stop them.
    Also, on medium you won't experience the forced invasions to any large extent anyways. Try very hard, you'll get stuff like Sicily attacking you in Spain with a tiny stack or some ally blockading your ports and being excommunicated because of it...

  9. #9

    Default Re: campaign_db_ai

    Yep, just saying you get some naval invasions between particular pairs of regions with force_invade set to false. scotland still lands near bruges for example..
    It's not a map.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO