Code to get rid of forts

mo123567

Worst modder ever!
Joined
Sep 4, 2005
Messages
279
I posted a thread about getting rid of forts in FFH. I never found out if there is an easy way for a non-modder like my self to get forts out of the game or simply take the ability away from workers. If anyone could post a way to do this I would really appreciate it.
 
I don't know for sure, but the first thing I'd try is searching CIV4UnitInfos.xml for "Fort" and delete every one of these:

Code:
<Build>
	<BuildType>BUILD_FORT</BuildType>
	<bBuild>1</bBuild>
</Build>

That should leave no worker capable of building forts. They'll still be in the game but no one can make a new one during play. (Unless it's via a spell or scripted event, say - probably want to leave those alone anyway.)
 
I just went into CIV4BuildInfos.xml and changed the prereq for forts to TECH_NONE (not NONE) which means the required tech to build the things is unattainable.
 
Right, right. TECH_NEVER. I had it right in my xml, just wrong in my post :D
 
I just went into CIV4BuildInfos.xml and changed the prereq for forts to TECH_NONE (not NONE) which means the required tech to build the things is unattainable.

That sounds easier than what I proposed. I'm surprised it works with the new techs-give-built-time-discounts system.
 
Hmmm. I don't know, I removed that because I wanted to see if the AI would get any smarter with the 10%/90% stuff gone and raw techs - just haven't gotten a chance to test it since I removed it. It should work like I proposed above, though cosmetically whatever tech gave forts the build speed increase may still say it does - but the things should still be un-constructable due to lack of prereq tech.
 
The build time discounts only apply if you can already build the thing. And you can have multiple different techs grant the discount if you want to. So you can still make Farms require Agriculture to build at all, and then get even quicker to build at Construction and Exploration if you were so inclined.

Rather interested to see how your testing goes Iceciro, I hadn't noticd the AI do worse when I first implemented the 90/10 system, but plenty of gameplay feedback has informed me otherwise. Haven't had time in my schedule yet to kick the AI into shape in that regard, so I am curious if it was something else which broke them (kael modified the improvement selection routine a bit and I blind-merged it because nothing SEEMED to contradict with FF mechanics, but it could have...).
 
A better alternative to scrapping Forts might be to give Castles +1 Gold and Citadels +2 Gold. This can increase by +1 Gold at Feudalism. At least this way if the AI does build too many forts it's not a complete loss.
 
RE: Improvement selection:

I haven't dug around in the XML code for that (and I'm not sure where to look to be honest) but Fall From Heaven's moved Lumbermills to Archery, which is what I did when I modded Fall Further, and the AI really seem to like Lumbermills. (I can't blame them, they're pretty good that early.)

I'm against giving castles any sort of buff, as opposed to just finding some way to make the AI use them correctly. Since I don't think that can be done, I think despite being a Vanilla Civ IV improvement we should use the scale we do for our own things - does it do more damage than it adds for good? Nobody I know ever builds the forts themselves, and I think the stupidity of the AI makes it a better idea to just avoid having them in the mod outright.
 
In my current FF game, it appears that the AI builds its land intelligently enough. I am on turn 450+ in a standart time game, Monarch diff, and there are forts only near significantly large cities containing desert, and again, just one fort, not on usefull tiles...Not bad, really. The only difference beteween the AI and myself is that I don't build forts at all :lol:
 
Nobody I know ever builds the forts themselves, and I think the stupidity of the AI makes it a better idea to just avoid having them in the mod outright.

Forts are narrow but they do have their uses. Forts are good when you are fortifying a vital pass. They are also meant to give a bonus to any cities within a 3 squares. I can't recall whether or not the "Canal" ability of forts has been maintained in FfH, but if it has that's a third use for them.

As for the AI, I've found that when I get bored and start to automate my workers, I get unnecessary forts too. Sure, unlike the AI, I can knock em down and build something more practical, but it still cuts both ways.

I agree that the ideal solution would be for the AI to understand how best to use forts, but if that's not possible a few XML hacks should put the AI at less of a disadvantage and still maintain the tactical options offered by forts.
 
My comments about Forts not having uses for the player is incorrect if you're on the Erebus maptype.

Most other maptypes, however, rarely have the proper chokepoints. In my experience AIs will just go around Forts a lot of the time.
 
The non-Erebus use for forts is to have only 1 road leading between your cities and place a fort ON that road. This restricts movement by units with Commando trait by forcing them off the road, and makes it possible to defend your roads from pillaging to cut off resources from your outlying cities.
 
The non-Erebus use for forts is to have only 1 road leading between your cities and place a fort ON that road. This restricts movement by units with Commando trait by forcing them off the road, and makes it possible to defend your roads from pillaging to cut off resources from your outlying cities.

It is a sort of use, but hinders your own troops movement also, since the enemy can very easilly deny you the use of the road by placing a stack in the way.I prefer having all my territory paved, so that I get move my troops quickly in case of an attack, without fear of the enemy blocking critical routs to the front line, or quick ways to reinforce a city...
 
Back
Top Bottom