Now, forts can attack nearby enemy units

Here's a quite complete mod component, updated with BTS 3.17 patch.
There're all the needed files, and the triggering CvEventManager.py.
The "core" file (FortAttack.py) now is easily configurable with the values at the beginning of the file.
Let me know if there is any issue.
 

Attachments

I like this idea very much.

It reminds me of fortresses built in cities in the original Colonization automatically bombarding enemy naval units. This was would be so useful here in Civ4 because it would keep enemies from pillaging your valuable see bonuses without having to keep an actual naval nearby.

IIRC Civ2 or Civ3 had some coastal defense city improvement, but it simply added a defense bonus from naval bombardment.

So I've been missing this feature since the original colonization!
 
This looks really good but does the AI know how to use it effectively?
 
eheheh... that's a good question!!!
I've tried in several ways, but getting nowhere. I've always finished with AI units simply standing near to the fort and being bombarded.

However, a year has passed, and I've a bit more confident with SDK now. I could try to fix it.... Not for the moment, anyway, since I'm still working at my mod AleaIactaEst.
 
eheheh... that's a good question!!!
I've tried in several ways, but getting nowhere. I've always finished with AI units simply standing near to the fort and being bombarded.

However, a year has passed, and I've a bit more confident with SDK now. I could try to fix it.... Not for the moment, anyway, since I'm still working at my mod AleaIactaEst.

I would not prefer SDK, as the mod can be easily ported over to existing mods, if it remains in Python and XML. It may end up to be far better in SDK, but it will be compatible with far fewer people. So, my request is for you to tweak the existing Python and leave the SDK out.

Respectfully,

Orion Veteran :cool:
 
There is some (SDK) code in Dale's Combat Mod that allows opportunity fire, which I think is what you have done in this mod. You could take a peek at that.
 
This sounds pretty interesting to me, does an AI fort attack humans too though?

Actually, wasn't there a modcomp out there where when you build a fort it gives that tile your culture, and I think it can actually spread a little over time. I think that should be incorporated into this.
 
Well, it's actually units that do opportunity fire, not the actual forts. I think that as long as the unit is in a city or fort, and has Ranged bombardment, it will automatically do opportunity fire before your turn begins. The AI certainly does this too.
 
Well, it's actually units that do opportunity fire, not the actual forts. I think that as long as the unit is in a city or fort, and has Ranged bombardment, it will automatically do opportunity fire before your turn begins. The AI certainly does this too.

I know that, I was just lazy-typing. I just think it would be cool so you could block countries, heal faster, get cultural defense bonus, etc.
 
Back
Top Bottom