In my attempt to learn Python/XML I'm doing a teeny mod to make Forts more useful/interesting.
My idea so far is:
a) simply modify the City Garrison promotions to also apply when stationed in a Fort (and drop "City" from the title). So:
b) give the fort improvement a natural +1 visibility bonus (just like when a unit is standing on a hill).Code:Garrison I +20% city/fort defense Garrison II +25% city/fort defense Garrison III +30% city/fort defense +10% vs melee
Sounds easy enough, right? Well, not quite. I did some digging into the XML and found all the places to make these modifications but have two problems:
a) Although Promotions have a convenient <iCityDefense></iCityDefense> element they do not have one for specifically for Forts.
There is, however, an element called FeatureDefense which allows giving a bonus based on specific "terrain" types. FOr example, Woodsman I gives +20% defense on Forest which looks like:
Only problem is there doesn't seem to be one for FORT.Code:<FeatureDefense> <FeatureType>FEATURE_FOREST</FeatureType> <iFeatureDefense>20</iFeatureDefense> </FeatureDefense>
b) AS for the Fort improvement itself, there doesn't seem to be any way to assign it a visibility bonus. I suppose I could add it to the promotion but that means the unit would have the bonus even when not in a fort. I guess we can pretend that at Garrison III they get a pair of binoculars. :roll:
Anyway, I'm hoping Soren is still around to point me in the right direction.


Reply With Quote