Results 1 to 7 of 7

Thread: Hordes (campaign_db.xml)

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

    Default Hordes (campaign_db.xml)

    Excerpt from my modified file

    Code:
       <hordes>
          <end_target_faction_bonus int="600"/>
          <start_target_faction_bonus int="300"/>
          <farming_level_bonus int="50"/>
          <shared_target_bonus int="10"/>
          <disbanding_horde_bonus int="-400"/>
          <starting_region_bonus int="950"/>
          <horde_target_resource_bonus int="1000"/>
       </hordes>
    In the context of M2TW, where hordes do not disband upon taking a settlement, I was trying to get the mongols to act intelligibly and made several changes to this piece of code during a running campaign to observe behavior.

    The maximum and minimum (working) bounds for all values seem to be -1000 to 1000. A value outside this (upper) range seems to make it do nothing (act similar to -1000)

    horde_target_resource_bonus seems to refer to how prioritized the horde_targets are in descr_regions. Higher values mean that the horde will move towards and attack those targets with higher priority.

    starting_region_bonus refers to how important it is to attack the region they spawn in and how much they want to attack it. Having this value higher than the horde_target_resource_bonus seems to make the horde inactive after taking the starting region and wander aimlessly around it (if they have raided rather than taken it)

    shared_target_bonus refers to targets shared by other hordes. As there is only 1 horde_target variable which cannot be further specified to my knowledge, this means that all targets shared by mongols and timurids incur this modifier to their priority. Note that if you set it to a negative value (as per default), ensure that their starting region bonus will stay below the horde_target_resource_bonus after modification.

    start_target_faction_bonus and end_target_faction_bonus seem to indicate the bonus added to continuing to attack the faction owning the starting region and the ones owning the other horde_targets.

    While not completely clear on all the variables, from my testing the above posted ones should ensure general reliability of hordes.
    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
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Hordes (campaign_db.xml)

    Interesting insights. Maybe the shared target bonus is only activated when the Mongols and Tims are actually both on the map as a horde at the same time?

  3. #3

    Default Re: Hordes (campaign_db.xml)

    This is excellent. We plan to make a lot of use from this in our mod!

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

    Default Re: Hordes (campaign_db.xml)

    I tweaked it a bit since and this is what I think has given the best results:

    <hordes>
    <end_target_faction_bonus int="500"/>
    <start_target_faction_bonus int="400"/>
    <farming_level_bonus int="50"/>
    <shared_target_bonus int="10"/>
    <disbanding_horde_bonus int="-300"/>
    <starting_region_bonus int="900"/>
    <horde_target_resource_bonus int="990"/>
    </hordes>

    Note that it heavily depends on your campaign_ai_db file as well and how you tell horde factions to act. The best way to to force them to ignore rebels until they have at least one actual enemy (good thing is that rebels don't count as enemies due to being at war via descr_strat). Then they'll attack a faction, raid their settlement and usually occupy it within the next 2 turns.

    Also, and this may just be due to my sloppy AI coding, for me when Mongols spawn at Sarkel rather than Baghdad, they are often circling around Sarkel doing nothing until Timurids spawn (either at Sarkel or elsewhere) upon which time both horde factions go all out aggressive. Not sure what's causing that (could have to do with the shared target variable), but I'm happy with how it is at present.

    I might have forgot to mention, but I also recoded the horde_targets to lead like a path from one end of the map to the other, i.e. Sarkel, Kiev, Krakow, Nuremburg, Rheims, Paris for instance.
    Last edited by FactionHeir; 05-24-2008 at 02:10.
    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)

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

    Default Re: Hordes (campaign_db.xml)

    Gah, the problem was quite simple actually. The code now works all the time and hordes are always active (with decent AI scripts - try the one in VM 0.93 for instance for that)

    <hordes>
    <end_target_faction_bonus int="500"/>
    <start_target_faction_bonus int="400"/>
    <farming_level_bonus int="50"/>
    <shared_target_bonus int="0"/>
    <disbanding_horde_bonus int="-300"/>
    <starting_region_bonus int="910"/>
    <horde_target_resource_bonus int="990"/>
    </hordes>

    basically moved 10 from shared_target_bonus to starting_region_bonus
    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 SamuraiofDoom's Avatar
    Join Date
    Nov 2008
    Location
    Australia, Victoria, Warragul
    Posts
    15

    Default Re: Hordes (campaign_db.xml)

    In Broken Crescent the Mongols spawned in 1219, they went over towards Samarqand and then did nothing, the Shah wont even kill them. How can I tweak at the programing to make them more aggressive rather than passive. The Mongols however successfully attacked everyone and my Abbasid caliphate easily dealt with them but my father is having the pussy Mongol problem in his Byzantine game.
    Was that your brother I killed, you all look alike to me.
    My Saka's shall run over you until our arrows are in your back, not even the great Selukid king could stand against us and now our great empire stretches from The great homelands to their precious Selukia.

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

    Default Re: Hordes (campaign_db.xml)

    Eh just use the excerpt I posted?
    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)

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