How to make barbarians attack cities?

APLion

Chieftain
Joined
Nov 26, 2020
Messages
70
So I am trying to make a game with barbarians evolved mod, and the only problem i have is that barbarians in CBP just refuse to attack the cities. If barbarian_theft option is on, they steal, but do not actually do any damage. If it's off, they just stay around the city... Menacingly. Sometimes they attack cities from the water, but that's all. Also, the only ranged barb unit that was actually doing damage to the cities was a hand-axe, but not archers or crossbowmans.

I couldn't find any options in mod files to change that behaviour, so maybe someone can help me?
Civ5Screen0018.png
Civ5Screen0019.png
 
So I am trying to make a game with barbarians evolved mod, and the only problem i have is that barbarians in CBP just refuse to attack the cities. If barbarian_theft option is on, they steal, but do not actually do any damage. If it's off, they just stay around the city... Menacingly. Sometimes they attack cities from the water, but that's all. Also, the only ranged barb unit that was actually doing damage to the cities was a hand-axe, but not archers or crossbowmans.

I couldn't find any options in mod files to change that behaviour, so maybe someone can help me?View attachment 576529 View attachment 576530

It's controlled by CvTacticalAI.cpp in the DLL. Can't be edited from the database. You'd need to ask ilteroi to implement this, or do so yourself...menacingly. :)
 
So that was quite the ride, but now I know how to build my own dll file. Basically I changed two things:

1) added "ExecuteCaptureCityMoves();" to "PlotBarbarianAttacks()" function. Now barbarians actually can think about attacking the cities.

2) changed line 750 to "newTarget.SetAuxIntData(m_pPlayer->isBarbarian() ? 100 : 100);". It had the comment "//barbarians don't care about cities much compared to normal players". Jokes on you, they really do.

Now everything works quite nicely and white walkers are wrecking havoc on everyone.

If anyone wants to use it, just replace the dll file in Community Patch mod folder. This works with the last stable version (at least for the first 50 turns).
 

Attachments

  • CvGameCore_Expansion2.zip
    2.7 MB · Views: 34
Why Lancers though? They can OHKO a city that early.
 
So that was quite the ride, but now I know how to build my own dll file. Basically I changed two things:

1) added "ExecuteCaptureCityMoves();" to "PlotBarbarianAttacks()" function. Now barbarians actually can think about attacking the cities.

2) changed line 750 to "newTarget.SetAuxIntData(m_pPlayer->isBarbarian() ? 100 : 100);". It had the comment "//barbarians don't care about cities much compared to normal players". Jokes on you, they really do.

Now everything works quite nicely and white walkers are wrecking havoc on everyone.

If anyone wants to use it, just replace the dll file in Community Patch mod folder. This works with the last stable version (at least for the first 50 turns).

maybe this could become mainline ... they would attack if they cannot steal, ie if the city is garrisoned.

how about that?
 
maybe this could become mainline ... they would attack if they cannot steal, ie if the city is garrisoned.

how about that?

Or if MOD_BALANCE_CORE_BARBARIAN_THEFT is not defined.
 
Top Bottom