Surround and Destroy mod

dexy

Warlord
Joined
Sep 30, 2008
Messages
124
Location
Greece
Surround and Destroy mod
for Rise of Mankind

Version 1.0 (for RoM 2.8)

Requires Rise of Mankind 2.8, Civ IV BtS 3.19

This is a very simple, but effective mod. It increases combat odds of an attacker who has allied units surrounding the defender.

This enables strategic positioning of defensive forces (to trap the enemy). Forts can be more valuable now - no more simply bypassing them and heading for the cities - this will make you more vulnerable if the enemy uses good tactics to surround you in his territory.

Also, you can prepare more strategic attack, for instance city siege is much more effective if you can surround the city from all sides (realistic, ain't it?).

Modular loading
Not possible :sad:.
The download is a merge of my previous mod (Fixed Borders) and this one, since all the changes are in the dll (plus some XML config and text). You can easily turn off one or another in the XML.
I'll see with Afforess to include this mod in his modpack, it should be very easy.

Config

In GlobalDefinesAlt.xml, you can find properties that start with "SAD_". Changing them will change how much surrounding units affect the battle. Higher values add more power to attacker, lower add less (setting them to 0 will effectively turn off the mod).

- FACTOR_1..4 properties determine the level of involvement (in the battle) of surrounding units per "surrounding factor". Surrounding factor (1 - 4) is the distance from attacker to the allied unit helping in the attack (tiles adjacent to attacker have a value of 1, the total opposite tile of attacker (across the defender) has a value of 4.
- MAX_MODIFIER This is the max percentage an attacker can gain from having allied units surrounding the defender (for comparison, forest gives 50% to the defender, if attacker has 50% from the surrounding units, it nullifies the forest modifier for the defender)

Download (includes dll src)

http://forums.civfanatics.com/downloads.php?do=file&id=13609
 
Clarify "allied" please. You mean actual allied AIs of yours or do you mean yiour own forces that you just call allied because it is a cool term?

Either way, COOL mod!!! :D
 
First off, This was a rather easy merge, which was nice.

Secondly, I didn't see any AI code for this. Perchance, could you see if you could code the AI to take advantage of this too? It seems rather unfair that only humans should know about this, and I'm sure you'll receive more feedback on this once I release the next beta with this in it...
 
I didn't see any AI code for this. Perchance, could you see if you could code the AI to take advantage of this too? It seems rather unfair that only humans should know about this

I am aware of that problem, but for now it is almost impossible to code AI to consider this surrounding and tactical placement of units.

The problem lies in the original BtS AI code that treats all units as if they were completely unaware of other units - each unit has its own priorities (independent of other units) and based on them it decides its next move. There's no central command like "place those 5 units on that city attack, 3 of those as decoys over there, leave those 4 to defend...". Even worse, each decision is made based on the current situation on the field, no matter what the previous move (during the same turn!!!) was. That's why you can see headless AI ships going back and forth, finishing turn without ANY valuable move (why move them in the first place then?).

BetterBtS AI has tried to improve this. Those guys did a great work, but still not good enough for me to be able to use it for my specific mod. Basically, the whole AI unit code would have to be rewritten, which is a huge task.

You can think of this as another flaw of AI. Humans, btw, have much more other tactics that they apply, which are impossible for AI, so one more is not a big deal :king:. For instance, when I want to take some cities of an enemy, I'll try to cut the enemy in half making a part of their empire defenseless (without resources or fresh unit supply). Also, have you ever seen an AI attack your empire from several different sides? No. But I do that to AI all the time, very effective.
 
I am aware of that problem, but for now it is almost impossible to code AI to consider this surrounding and tactical placement of units.

The problem lies in the original BtS AI code that treats all units as if they were completely unaware of other units - each unit has its own priorities (independent of other units) and based on them it decides its next move. There's no central command like "place those 5 units on that city attack, 3 of those as decoys over there, leave those 4 to defend...". Even worse, each decision is made based on the current situation on the field, no matter what the previous move (during the same turn!!!) was. That's why you can see headless AI ships going back and forth, finishing turn without ANY valuable move (why move them in the first place then?).

BetterBtS AI has tried to improve this. Those guys did a great work, but still not good enough for me to be able to use it for my specific mod. Basically, the whole AI unit code would have to be rewritten, which is a huge task.

You can think of this as another flaw of AI. Humans, btw, have much more other tactics that they apply, which are impossible for AI, so one more is not a big deal :king:. For instance, when I want to take some cities of an enemy, I'll try to cut the enemy in half making a part of their empire defenseless (without resources or fresh unit supply). Also, have you ever seen an AI attack your empire from several different sides? No. But I do that to AI all the time, very effective.

I realize the way the AI was coded is suboptimal. There are a myriad of problems, and the way it was coded was pretty poor. However, I believe Jdog5000 thought about changing it to a centralized command structure, and realized that it would slow the game down considerably. I suppose we have to live with what we have.

However, perhaps you could make it "advantageous" to the AI to split it's attack forces up when it reaches a city, and approach from multiple sides. I know that the AI can force units into stacks, and then considers stacks as one entity. As of now, the AI will just keep the stack together, but with this mod, it is advantageous to split up.
 
However, perhaps you could make it "advantageous" to the AI to split it's attack forces up when it reaches a city, and approach from multiple sides. I know that the AI can force units into stacks, and then considers stacks as one entity. As of now, the AI will just keep the stack together, but with this mod, it is advantageous to split up.

Not so easy again. You must consider the defensive value of the stack. If you have mixed units in it, longbowmen and axemen for instance, they will be much more vulnerable separated than in a stack. And to take this into account and separate one of each into sub-stacks.....again, too complicated.

I've been thinking about AI in this mod a lot and I always end up giving up; it seems impossible to improve anything without ruining other AI aspects.
 
Not so easy again. You must consider the defensive value of the stack. If you have mixed units in it, longbowmen and axemen for instance, they will be much more vulnerable separated than in a stack. And to take this into account and separate one of each into sub-stacks.....again, too complicated.

I've been thinking about AI in this mod a lot and I always end up giving up; it seems impossible to improve anything without ruining other AI aspects.

Yeah, good point. That's why I've avoided doing anything involving units, with any of my SDK changes. Far too complex, too easy to botch.
 
- FACTOR_1..4 properties determine the level of involvement (in the battle) of surrounding units per "surrounding factor". Surrounding factor (1 - 4) is the distance from attacker to the allied unit helping in the attack (tiles adjacent to attacker have a value of 1, the total opposite tile of attacker (across the defender) has a value of 4.
- MAX_MODIFIER This is the max percentage an attacker can gain from having allied units surrounding the defender (for comparison, forest gives 50% to the defender, if attacker has 50% from the surrounding units, it nullifies the forest modifier for the defender)

Where are these values in AND? They aren't in GlobalDefinesAlt.xml...

Have these values been changed? I'm trying to understand how that works exactly, but I don't find the same values...
 
Back
Top Bottom