PDA

View Full Version : Hordes (campaign_db.xml)



FactionHeir
04-05-2008, 06:34
Excerpt from my modified file



<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.

alpaca
04-05-2008, 12:14
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?

SigniferOne
05-07-2008, 21:47
This is excellent. We plan to make a lot of use from this in our mod!

FactionHeir
05-24-2008, 02:09
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.

FactionHeir
05-28-2008, 02:13
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

SamuraiofDoom
01-05-2009, 12:31
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.

FactionHeir
01-05-2009, 13:29
Eh just use the excerpt I posted?