Results 1 to 7 of 7

Thread: Situations for descr_campaign_ai_db

  1. #1
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Situations for descr_campaign_ai_db

    Okay this is a little list im working on where im trying to come up with all the different situations based on the variables at the top of the descr_campaign_ai_db.xml file. This is a work in progress, and once i've worked out them all, or a good amount, ill try to work out how the ai should behave in each situation, and code it all into the file.

    Here are the variables(its a long list):
    Code:
    				<min_entry											:: The minimum threshold for decision comparison
    							frontline_balance="0.0"					:: ratio of factions frontline military strength vs the target
    							military_balance="0.0"					:: ratio of factions overall military strength vs the target
    							production_balance="0.0"				:: ratio of factions overall production strength vs the target
    							target_num_enemies="0"					:: the number of enemies the target has
    							num_enemies="0"							:: the number of enemies the faction has
    							has_alliance_against="false"			:: is the faction part of an alliance against target
    							military_balance_plus_enemies="0.0"		:: ratio of factions overall military strength vs the target (plus all of its enemies)
    							alliance_military_balance="0.0"			:: ratio of factions (plus its allies) overall military strength vs the target
    							strongest_neighbour="false"				:: is the target the factions strongest neighbour
    							most_desirable="false"					:: is the traget the factions most desirable target
    							faction_standing="-1.0"					:: how much does the faction like the target
    							target_global_standing="-1.0"			:: how trustworthy is the target to the rest of the world
    							target_faction_standing="-1.0"			:: how much does the target faction like this faction
    							global_standing="-1.0"					:: how trustworthy is this faction to the rest of the world
    							target_religion="catholic"				:: the religion of the target (see descr_religions.txt)
    							enemy_excommunicated="false"			:: is the target excommunicated
    							num_turns_allied="0"					:: the number of turns since the faction agreed to an alliance with the target
    							num_turns_ceasfire="0"					:: the number of turns since the faction has agreed to a ceasefire with the target (-1 for no agreement)
    							stance="Allied"							:: diplomatic stance with the target (Allied, Neutral, AtWar)
    							target_faction="england"				:: target faction label (see descr_sm_factions.txt)
    							target_human="false"					:: is the target a human player
    							target_is_shadow="false"/>				:: is the target this factions shadow faction
    							turn_number="0"							:: the game turn number (starting at 0)
    							is_protectorate="false"					:: is the target our protectorate
    							is_protectorate_of_catholic="false"		:: is the target a protectorate of a non-excommunicated catholic faction
    							free_strength_balance="0.0"				:: ratio of factions free military strength vs the target
    							borders_all_our_regions="false"			:: does the target border on all the factions region groups
    							target_weakest_neighbour="false"		:: is the faction the targets weakest neighbour
    							has_ceasehostilities="false"			:: does the faction have a cease hostilities mission against the target from the papal faction
    							is_neighbour="false"					:: does the target neighbour on any of the factions regions
    							trusted_ally="false"					:: is the target a trusted ally (they like us more than fs_thresh, and their global standing > gs_thresh, and they are allied)
    							trusted_ally_enemy="false"				:: is the target an enemy of a trusted ally
    							trusted_ally_protectorate="false"		:: is the target a protectorate of a trusted ally
    							num_settlements="0"						:: how many settlements does the faction own
    							
    				<max_entry											:: The maximum threshold for decision comparison
    							frontline_balance="999.0"
    							military_balance="999.0"
    							production_balance="999.0"
    							target_num_enemies="999"
    							num_enemies="999"
    							has_alliance_against="true"
    							military_balance_plus_enemies="999.0"
    							alliance_military_balance="999.0"
    							strongest_neighbour="true"
    							most_desirable="true"
    							faction_standing="1.0"
    							target_global_standing="1.0"
    							target_faction_standing="1.0"
    							global_standing="1.0"
    							target_religion="heretic"
    							enemy_excommunicated="true"
    							num_turns_allied="999"
    							num_turns_ceasfire="999"
    							stance="AtWar"
    							target_faction="slave"
    							target_human="true"
    							target_is_shadow="true"/>
    							is_protectorate="true"
    							is_protectorate_of_catholic="true"
    							free_strength_balance="999.0"
    							borders_all_our_regions="true"
    							target_weakest_neighbour="true"
    							has_ceasehostilities="true"
    							is_neighbour="true"
    							trusted_ally="true"
    							trusted_ally_enemy="true"
    							trusted_ally_protectorate="true"
    							num_settlements="999"
    							
    				<faction_attitude									:: A list of modifiers to apply if min and max entries above are successful
    									defense="defend_normal"			:: The long term defense type (defend_minimal, defend_normal, defend_raid, defend_frontline, defend_fortified, defend_deep)
    									defend_priority="0"				:: The defensive priority of achieving stance against this faction (NOT USED AT PRESENT)
    									invade="invade_none"			:: The long term invade type (invade_buildup, invade_immediate, invade_raids, invade_opportunistic, invade_start, invade_none)
    									invade_priority="0"				:: priority of achieving invasion against this faction
    									at_war="false"					:: are we at war with this enemy
    									want_peace="false"				:: do we want to be at peace with this faction
    									want_ally="false"				:: do we want to ally with this faction
    									want_be_protect="false"			:: do we want to be a protectorate of this faction
    									want_offer_protect="false"		:: do we want to offer protectorate status to this nation
    									force_invade="false"			:: must we invade now
    									alliance_against="0"			:: how much do we want to have an alliance against this nation
    									pts_desire="0"					:: points total for measuring our desire for this faction's territory
    									pts_alliance="0"				:: points total for measuring how much we want to be allies with these people
    									can_force_invade="true"			:: can naval or forced invasion settings overwrite invade parameters
    			</decision_entry>
    So as you can see im going to have my work cut out working out all the different possible variations for situations, and then to code it all in. Any help would be most appreicated.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  2. #2

    Default Re: Situations for descr_campaign_ai_db

    While I'm at work I don't have time (or approval to be at this site either.. hehe) to look at it, but it definitely looks promising and I'd like to try ironing out a few scenarios myself (seems pretty intuitive IMO)

  3. #3
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Situations for descr_campaign_ai_db

    It is pretty intuitive, the problem is there are a huge amount of different possible situations there could be, and working them all out will be a long process. Then im going to try and work out the best way for the ai to act in each situation, and then im going to code it.

    An example of a situation would be(turning the above variables into psuedocode):

    At War and Superior Miltiary Strength and Allied Against Target.

    Once i've worked out all the possible situations like that(including special ones if target faction is papal states, and for papal states, and for catholics dealing with excommunicated and non-excommunicated targets).
    Last edited by Lusted; December 06, 2006 at 12:20 PM.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  4. #4

    Default Re: Situations for descr_campaign_ai_db

    Lusted (sorry if this the wrong thread to post in),

    I have been experimenting with descr_campaign_ai_db. as follows..

    I copied the xml for the slave faction and pasted it over the default, catholic and papal bits. I then played 20 turns on vh and nobody attacked, no land grabs, nothing, just peace all over the world.

    Then i created a new section for the orthodox factions like this.. <faction_ai_label name="orthodox"> and copied the original default ai code into it. Then, in the descr_strat file, i changed russia's ai_label to orthodox. I started a new campaign on vh and only the russians attacked.

    So - if you keep up the good work on the situations & pseudocode it should be a no-brainer to write the required xml.
    God save the Queen.

  5. #5

    Default Re: Situations for descr_campaign_ai_db

    Different params for the different religions. So much to do.

  6. #6
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Situations for descr_campaign_ai_db

    Different params for the different religions. So much to do.
    Definitely. Im first using the default decision entries in the file to make a list of all the different situations, and then im going to add more from then.

    Then ill make different version of these situations for the Papal states.

    Then for catholic faction interaction, and for catholic faction interaction with excommunicated factions.

    Ill likely leave both the Orthodox factions and Muslim factions as the new default i make as im not sure if they should differ at all, unlike the catholics who should have their own set.

    So - if you keep up the good work on the situations & pseudocode it should be a no-brainer to write the required xml.
    Oh its going to be very easy to write, i just need to work all the situations first. Any help i can get on this would be very appreciated.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  7. #7

    Default Re: Situations for descr_campaign_ai_db

    Hope this helps - it's the comments stripped out from descr_campaign_ai_db
    <decision_entry> tags making it easier to see the ai's thinking

    As you know, the first <decision_entry> that evaluates as true is considered by the ai as an appropriate response towards another faction (whether acted upon or not).

    here they are...

    default

    <!-- If trusted ally, use defaults

    <!-- If we are allied and have only been allied for a short duration, no invasion set up, cannot force invade -->

    <!-- If we have agreed to a ceasefire only a short time ago, no invasion set up, cannot force invade -->

    <!-- If they are our protectorate, use defaults -->

    <!-- If they are a protectorate of a trusted ally, use defaults -->

    <!-- Not interested in factions that are not our neighbour, use defaults, may be overridden by forced/naval attacks -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves if we've more than twice his frontline strength, then >>> invade immediate -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves if we're superior on the frontline, then >>> invade buildup -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if we're not at war and it is very early in the game, do not invade (grabbing rebel regions instead) -->

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him, && IS NOT OUR SHADOW FACTION >>> propose he become vassal, invade immediate. If not our shadow, also want to offer protectorate --

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him >>> propose he become vassal, invade immediate. If our shadow, do not want to offer protectorate -->

    <!-- if we're at war && we've more than twice his frontline strength && he outproduces us && he is at war with more than one faction, then >>> invade immediate -->

    <!-- if we're at war && we've more than twice his frontline strength && we outproduce him && alliance against this faction, then >>> invade immediate -->

    <!-- if we're at war && we're superior on the frontline && we outproduce him, then >>> invade buildup -->

    <!-- if we're at war && we're superior on the frontline && he outproduces us, then >>> invade raids -->

    <!-- if we're at war, then >>> invade opportunistic -->

    <!-- if we're not at war with anyone else && our frontline strength is more than thrice his && overall superior >>> invade immediate -->

    <!-- if we're not at war && we are at war with someone else && our frontline strength is more than thrice his && we're 2:1 superior overall against these factions >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && alliance against this faction && alliance is overall superior >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than 1.5 times his && we outproduce him >>> invade buildup -->

    <!-- if we're not at war && we're not at war with anyone else && frontline superiority && alliance against this faction && alliance is superior overall && he is strongest neighbour >>> invade opportunistic -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && he outproduces us && he is our strongest neighbour >>> invade raids -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is our strongest neighbour, then >>> plan future invasion -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is most desireable, then >>> plan future invasion -->

    <!-- DEFAULT: invade_none -->

    <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING ATTACK ON HUMAN IF AT PEACE WITH EVERYONE FOR TOO LONG (hard = 4 turns, normal = 10 turns, easy = 20 turns)

    --> </invasion_decisions> <defend_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING want_peace WITH A FACTION UNDER CERTAIN CONDITIONS. CONTINUES CHECKS FOR SUBSEQUENT DECISIONS

    --> <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if we have any settlements, and we are at the very start of the game, and target is not human (cannot trust humans) >>> minimal defense -->

    <!-- if not our neighbour, and we have any settlements, and we are at the start of the game >>> minimal defense -->

    <!-- if not our neighbour, and we have any settlements, and we are at war, and they are not a trusted allies enemy, use defaults + want peace -->

    <!-- if not our neighbour, and we have any settlements, use defaults -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours, AND IS NOT OUR SHADOW FACTION >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours >>> -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours, && IS NOT OUR SHADOW FACTION >>> deep defense, sue for peace -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours >>> deep defense, sue for peace -->

    <!-- if we're at war && his frontline strength is more than twice ours && our free strength is greater than his then >>> deep defense -->

    <!-- if we're at war && his frontline strength is less than ours && his free strength is greater than ours, then >>> conduct raids -->

    <!-- if we're at war, and none of the previous rules apply, then >>> frontline defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is greater than his, then >>> deep defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is less than his, then >>> fortified defense -->

    <!-- if we're not at war && we are not his weakest neighbour && we are allied to him, then >>> minimal defense -->

    <!-- if we're not at war && we are his weakest neighbour && he is not at war elsewhere && we are not at war elsewhere, then >>> frontline defense -->

    <!-- if we're not at war && we are not his weakest neighbour && he is not at war elsewhere, then >>> normal defense -->

    <!-- DEFAULT: defend minimal -->





    papal_faction


    </defend_decisions> <invasion_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR 'CAN_ATTACK_FACTION', NO INVASION IF SO

    --> <!-- If trusted ally, use defaults -->

    <!-- if target is a non-excommunicated catholic faction, no invasion set up, cannot force invade -->

    <!-- If we are allied and have only been allied for a short duration, no invasion set up, cannot force invade -->

    <!-- If we have agreed to a ceasefire only a short time ago, no invasion set up, cannot force invade -->

    <!-- If they are our protectorate, use defaults -->

    <!-- If they are a protectorate of a trusted ally, use defaults -->

    <!-- If they are a protectorate of a catholic faction, use defaults -->

    <!-- Not interested in factions that are not our neighbour, use defaults, may be overridden by forced/naval attacks -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves if we've more than twice his frontline strength, then >>> invade immediate -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves if we're superior on the frontline, then >>> invade buildup -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if we're not at war and it is very early in the game, do not invade (grabbing rebel regions instead) -->

    <!-- if target is catholic faction we are not at war with, no invasion set up -->

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him, && IS NOT OUR SHADOW FACTION >>> propose he become vassal, invade immediate. If not our shadow, also want to offer protectorate --

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him >>> propose he become vassal, invade immediate. If our shadow, do not want to offer protectorate -->

    <!-- if we're at war && we've more than twice his frontline strength && he outproduces us && he is at war with more than one faction, then >>> invade immediate -->

    <!-- if we're at war && we've more than twice his frontline strength && we outproduce him && alliance against this faction, then >>> invade immediate -->

    <!-- if we're at war && we're superior on the frontline && we outproduce him, then >>> invade buildup -->

    <!-- if we're at war && we're superior on the frontline && he outproduces us, then >>> invade raids -->

    <!-- if we're at war, then >>> invade opportunistic -->

    <!-- if we're not at war with anyone else && our frontline strength is more than thrice his && overall superior >>> invade immediate -->

    <!-- if we're not at war && we are at war with someone else && our frontline strength is more than thrice his && we're 2:1 superior overall against these factions >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && alliance against this faction && alliance is overall superior >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than 1.5 times his && we outproduce him >>> invade buildup -->

    <!-- if we're not at war && we're not at war with anyone else && frontline superiority && alliance against this faction && alliance is superior overall && he is strongest neighbour >>> invade opportunistic -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && he outproduces us && he is our strongest neighbour >>> invade raids -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is our strongest neighbour, then >>> plan future invasion -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is most desireable, then >>> plan future invasion -->

    <!-- DEFAULT: invade_none -->

    <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING ATTACK ON HUMAN IF AT PEACE WITH EVERYONE FOR TOO LONG (hard = 4 turns, normal = 10 turns, easy = 20 turns)

    --> </invasion_decisions> <defend_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING want_peace WITH A FACTION UNDER CERTAIN CONDITIONS. CONTINUES CHECKS FOR SUBSEQUENT DECISIONS

    --> <!-- if we have any settlements, and we are at the very start of the game, and target is not human (cannot trust humans) >>> minimal defense -->

    <!-- if not our neighbour, and we have any settlements, and we are at the start of the game >>> minimal defense -->

    <!-- if target is non-excommunicated catholic faction, and they don't mind us much, and they are not obviously untrustworthy, minimal defense required -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if not our neighbour, and we have any settlements, and we are at war, and they are not a trusted allies enemy, use defaults + want peace -->

    <!-- if not our neighbour, and we have any settlements, use defaults -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours, AND IS NOT OUR SHADOW FACTION >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours, && IS NOT OUR SHADOW FACTION >>> deep defense, sue for peace -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours >>> deep defense, sue for peace -->

    <!-- if we're at war && his frontline strength is more than twice ours && our free strength is greater than his then >>> deep defense -->

    <!-- if we're at war && his frontline strength is less than ours && his free strength is greater than ours, then >>> conduct raids -->

    <!-- if we're at war, and none of the previous rules apply, then >>> frontline defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is greater than his, then >>> deep defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is less than his, then >>> fortified defense -->

    <!-- if we're not at war && we are not his weakest neighbour && we are allied to him, then >>> minimal defense -->

    <!-- if we're not at war && we are his weakest neighbour && he is not at war elsewhere && we are not at war elsewhere, then >>> frontline defense -->

    <!-- if we're not at war && we are not his weakest neighbour && he is not at war elsewhere, then >>> normal defense -->

    <!-- DEFAULT: defend minimal -->





    catholic


    </defend_decisions> <invasion_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR 'CAN_ATTACK_FACTION', NO INVASION IF SO

    --> <!-- If trusted ally, use defaults -->

    <!-- If we are allied and have only been allied for a short duration, no invasion set up, cannot force invade -->

    <!-- If we have agreed to a ceasefire only a short time ago, no invasion set up, cannot force invade -->

    <!-- If they are our protectorate, use defaults -->

    <!-- If they are a protectorate of a trusted ally, use defaults -->

    <!-- If they are the papal states and they like us, use defaults (using their FS instead of ours, else it may not fire since papal states does not try to upset catholics) -->

    <!-- If we have a cease hostilities mission against the target, and we like them above a threshold, and our global standing is reasonable, use defaults (this will stop factions from attacking some targets if it will cause excommunication) -->

    <!-- Not interested in factions that are not our neighbour, use defaults, may be overridden by forced/naval attacks -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves if we've more than twice his frontline strength, then >>> invade immediate -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves if we're superior on the frontline, then >>> invade buildup -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if we're not at war and it is very early in the game, do not invade (grabbing rebel regions instead) -->

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him, && IS NOT OUR SHADOW FACTION >>> propose he become vassal, invade immediate. If not our shadow, also want to offer protectorate --

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him >>> propose he become vassal, invade immediate. If our shadow, do not want to offer protectorate -->

    <!-- if we're at war && we've more than twice his frontline strength && he outproduces us && he is at war with more than one faction, then >>> invade immediate -->

    <!-- if we're at war && we've more than twice his frontline strength && we outproduce him && alliance against this faction, then >>> invade immediate -->

    <!-- if we're at war && we're superior on the frontline && we outproduce him, then >>> invade buildup -->

    <!-- if we're at war && we're superior on the frontline && he outproduces us, then >>> invade raids -->

    <!-- if we're at war, then >>> invade opportunistic -->

    <!-- if we're not at war with anyone else && our frontline strength is more than thrice his && overall superior >>> invade immediate -->

    <!-- if we're not at war && we are at war with someone else && our frontline strength is more than thrice his && we're 2:1 superior overall against these factions >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && alliance against this faction && alliance is overall superior >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than 1.5 times his && we outproduce him >>> invade buildup -->

    <!-- if we're not at war && we're not at war with anyone else && frontline superiority && alliance against this faction && alliance is superior overall && he is strongest neighbour >>> invade opportunistic -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && he outproduces us && he is our strongest neighbour >>> invade raids -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is our strongest neighbour, then >>> plan future invasion -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is most desireable, then >>> plan future invasion -->

    <!-- DEFAULT: invade_none -->

    <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING ATTACK ON HUMAN IF AT PEACE WITH EVERYONE FOR TOO LONG (hard = 4 turns, normal = 10 turns, easy = 20 turns)

    --> </invasion_decisions> <defend_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING want_peace WITH A FACTION UNDER CERTAIN CONDITIONS. CONTINUES CHECKS FOR SUBSEQUENT DECISIONS

    --> <!-- if we have any settlements, and we are at the very start of the game, and target is not human (cannot trust humans) >>> minimal defense -->

    <!-- if not our neighbour, and we have any settlements, and we are at the start of the game >>> minimal defense -->

    <!-- if target is non-excommunicated catholic faction, and they don't mind us much, and they are not obviously untrustworthy, minimal defense required -->

    <!-- otherwise if target is non-excommunicated catholic faction, normal defense required -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if not our neighbour, and we have any settlements, and we are at war, and they are not a trusted allies enemy, use defaults + want peace -->

    <!-- if not our neighbour, and we have any settlements, use defaults -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours, AND IS NOT OUR SHADOW FACTION >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours, && IS NOT OUR SHADOW FACTION >>> deep defense, sue for peace -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours >>> deep defense, sue for peace -->

    <!-- if we're at war && his frontline strength is more than twice ours && our free strength is greater than his then >>> deep defense -->

    <!-- if we're at war && his frontline strength is less than ours && his free strength is greater than ours, then >>> conduct raids -->

    <!-- if we're at war, and none of the previous rules apply, then >>> frontline defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is greater than his, then >>> deep defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is less than his, then >>> fortified defense -->

    <!-- if we're not at war && we are not his weakest neighbour && we are allied to him, then >>> minimal defense -->

    <!-- if we're not at war && we are his weakest neighbour && he is not at war elsewhere && we are not at war elsewhere, then >>> frontline defense -->

    <!-- if we're not at war && we are not his weakest neighbour && he is not at war elsewhere, then >>> normal defense -->

    <!-- DEFAULT: defend minimal -->





    slave_faction


    </defend_decisions> <invasion_decisions> <!-- Just use defaults -->

    </invasion_decisions> <defend_decisions> <!-- Always try and defend the settlements -->





    rome


    </defend_decisions> <invasion_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR TRUSTED ALLIES, NO INVASION IF SO

    --> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR 'CAN_ATTACK_FACTION', NO INVASION IF SO

    --> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR PROTECTORATES, NO INVASION IF SO

    --> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR PROTECTORATES OF TRUSTED ALLIES, NO INVASION IF SO

    --> <!-- Not interested in factions that are not our neighbour, use defaults, may be overridden by forced attacks -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him, && IS NOT OUR SHADOW FACTION >>> propose he become vassal, invade immediate. If not our shadow, also want to offer protectorate --

    <!-- if we're at war && we've more than five times his frontline strength && we're superior overall && we outproduce him >>> propose he become vassal, invade immediate. If our shadow, do not want to offer protectorate -->

    <!-- if we're at war && we've more than twice his frontline strength && he outproduces us && he is at war with more than one faction, then >>> invade immediate -->

    <!-- if we're at war && we've more than twice his frontline strength && we outproduce him && alliance against this faction, then >>> invade immediate -->

    <!-- if we're at war && we're superior on the frontline && we outproduce him, then >>> invade buildup -->

    <!-- if we're at war && we're superior on the frontline && he outproduces us, then >>> invade raids -->

    <!-- if we're at war, then >>> invade opportunistic -->

    <!-- if we're not at war with anyone else && our frontline strength is more than thrice his && overall superior >>> invade immediate -->

    <!-- if we're not at war && we are at war with someone else && our frontline strength is more than thrice his && we're 2:1 superior overall against these factions >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && alliance against this faction && alliance is overall superior >>> invade immediate -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than 1.5 times his && we outproduce him >>> invade buildup -->

    <!-- if we're not at war && we're not at war with anyone else && frontline superiority && alliance against this faction && alliance is superior overall && he is strongest neighbour >>> invade opportunistic -->

    <!-- if we're not at war && we're not at war with anyone else && our frontline strength is more than twice his && he outproduces us && he is our strongest neighbour >>> invade raids -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is our strongest neighbour, then >>> plan future invasion -->

    <!-- if we're not at war && we're not at war with anyone else && we outproduce him && he is most desireable, then >>> plan future invasion -->

    <!-- THIS ONE PROBABLY WON'T GET FIRED SINCE IT USES THE SAME CHECK AS THE ONE TWO ENTRIES ABOVE!!!! if we're not at war && we're not at war with anyone else && we outproduce him && he has highest invasion pts, then >>> plan future invasion -->

    <!-- DEFAULT: invade_none -->

    <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING ATTACK ON HUMAN IF AT PEACE WITH EVERYONE FOR TOO LONG (hard = 4 turns, normal = 10 turns, easy = 20 turns)

    --> </invasion_decisions> <defend_decisions> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR SETTING at_war AND want_peace FOR FACTIONS THAT ARE NOT OUR NEIGHBOURS

    --> <!-- SPECIAL CASE EXISTS HERE IN CODE FOR FORCING want_peace WITH A FACTION UNDER CERTAIN CONDITIONS. CONTINUES CHECKS FOR SUBSEQUENT DECISIONS

    --> <!-- special case the slaves faction - there are all sorts of things we don't want to do with the slaves -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours, AND IS NOT OUR SHADOW FACTION >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than thrice as large as ours && his free strength is more than four times as large as ours >>> propose become protectorate -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours, && IS NOT OUR SHADOW FACTION >>> deep defense, sue for peace -->

    <!-- if we're at war && he borders all our groups && his frontline strength is more than twice as large as ours && his free strength is greater than twice ours >>> deep defense, sue for peace -->

    <!-- if we're at war && his frontline strength is more than twice ours && our free strength is greater than his then >>> deep defense -->

    <!-- if we're at war && his frontline strength is less than ours && his free strength is greater than ours, then >>> conduct raids -->

    <!-- if we're at war, and none of the previous rules apply, then >>> frontline defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is greater than his, then >>> deep defense -->

    <!-- if we're not at war && his frontline strength is more than twice ours && our free strength is less than his, then >>> fortified defense -->

    <!-- if we're not at war && we are not his weakest neighbour && we are allied to him, then >>> minimal defense -->

    <!-- if we're not at war && we are his weakest neighbour && he is not at war elsewhere && we are not at war elsewhere, then >>> frontline defense -->

    <!-- if we're not at war && we are not his weakest neighbour && he is not at war elsewhere, then >>> normal defense -->

    <!-- DEFAULT: defend minimal -->
    God save the Queen.

Posting Permissions

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