If the developers of this mod, emphasis on IF, are planning on modifying the barbarian AI, i have some suggestions to correct some behavior i find incredibly frustrating and obnoxious. if you aren't planning on modding it, i wouldn't bother just for this. Ignore me.
I can't say the number of games i've lost or atleast been crippled by hordes of barbarians travelling from all over the map to attack my city, walking right past other cities, litterally skirting the city tile of rivals to attack me instead. as one player once put it, when observed through the editor, it looks like a giant conga line. it's quite ridiculous.
I enjoy barbarians, i enjoy raging barbarians, i just wish they would spread the love a little instead of ganging up on me solely.
i only glanced at the code rather breifly, and did a handful of tests, but i think all my observations are correct. Also, this is less a problem in the latest FFH2 version(where promos and increased strength reduce the impact of barbarians), then it is in previous versions, or vanilla BtS. So like i said, if you weren't going to anyway, i wouldn't touch it.
1) the logic which decides which city a barbarian will attack in non swarm mode doesn't take distance into account(the targetcity function does, but not the cityattack function, near as i can tell). It has a range, but the "juiciest" target within that range, no matter that a closer almost as juicy target exists, seems to be completely ignored from what i can tell. The iPathturns variable is already there, you just need to use it as weight against the ivalue variable before determining the best target.
2)judging by the only comment in the code, it seems that AREAAI_OFFENSIVE isn't actually ever suppose to happen. "Does this ever Occur". in actuality, it is the rule, not the exception. a small mod i made shows that almost as soon as humanoid barbarians(non animals) show up on the map where a player is, in BtS, the AREAAI for the barbarians in that area switches over from assault, to offensive, and this is when the conga line seems to trigger(more accurately, when they pick a target city i think). I propose changing the logic to make the switch to offensive more rare.
3) adjust the way the AI picks the best city to attack. I've looked over the code and haven't been able to figure out why(nothing jumps out at me anyway), but the barbarians almost always go after me(in either attack mode) regardless of how well i'm doing in respect to others. Its got to have something to do with the way i develope my cities, but with virtually no comments(and none useful) and such messy code, i'm afraid i don't have the patience to look any further.
Again, only if you were going to change it anyway, and i guess only if you see it as a problem. Since though they add flavor and fun when behaving fairly, i can always just turn them off to avoid the problem.
I can't say the number of games i've lost or atleast been crippled by hordes of barbarians travelling from all over the map to attack my city, walking right past other cities, litterally skirting the city tile of rivals to attack me instead. as one player once put it, when observed through the editor, it looks like a giant conga line. it's quite ridiculous.
I enjoy barbarians, i enjoy raging barbarians, i just wish they would spread the love a little instead of ganging up on me solely.
i only glanced at the code rather breifly, and did a handful of tests, but i think all my observations are correct. Also, this is less a problem in the latest FFH2 version(where promos and increased strength reduce the impact of barbarians), then it is in previous versions, or vanilla BtS. So like i said, if you weren't going to anyway, i wouldn't touch it.
1) the logic which decides which city a barbarian will attack in non swarm mode doesn't take distance into account(the targetcity function does, but not the cityattack function, near as i can tell). It has a range, but the "juiciest" target within that range, no matter that a closer almost as juicy target exists, seems to be completely ignored from what i can tell. The iPathturns variable is already there, you just need to use it as weight against the ivalue variable before determining the best target.
2)judging by the only comment in the code, it seems that AREAAI_OFFENSIVE isn't actually ever suppose to happen. "Does this ever Occur". in actuality, it is the rule, not the exception. a small mod i made shows that almost as soon as humanoid barbarians(non animals) show up on the map where a player is, in BtS, the AREAAI for the barbarians in that area switches over from assault, to offensive, and this is when the conga line seems to trigger(more accurately, when they pick a target city i think). I propose changing the logic to make the switch to offensive more rare.
3) adjust the way the AI picks the best city to attack. I've looked over the code and haven't been able to figure out why(nothing jumps out at me anyway), but the barbarians almost always go after me(in either attack mode) regardless of how well i'm doing in respect to others. Its got to have something to do with the way i develope my cities, but with virtually no comments(and none useful) and such messy code, i'm afraid i don't have the patience to look any further.
Again, only if you were going to change it anyway, and i guess only if you see it as a problem. Since though they add flavor and fun when behaving fairly, i can always just turn them off to avoid the problem.