Super Forts

Well, since you are at it... I've noticed that sometimes units stay "imprisoned" in the fort, they can't go out of it. Sometimes it happens immediately with the workers who have just built the fort and the only way out is to make them build an improvement over the fort.

I've also noticed strange behaviours with missionaries. On their itinerary they pass through a fort, have to exit by a different way, go back away and try again the same route for ever. Yes, it's very strange but sometimes units are stuck and there is only one way out. In the beginning, I was even wondering if there was a door on these forts :crazyeye:!

The problem is that it does not happen with all the forts. Some are doomed, maybe they transform themselves into evil dungeons :eek: !

Anybody else noticing something like that?

I haven't noticed that myself, but if it has to do with missionaries then that is definitely a problem with the BTS code and not mine. Shame on Firaxis for creating secret evil dungeons. :lol:
 
BTW, I have already fixed the bug with automated workboats, but I am going to do some more work before releasing a new version. The problem was that I misused the findCity() function. By default findCity() will only consider cities in the same area as the plot you pass in. Water is considered a different area than land, so no cities will be found because they are all on land. I just had to pass in a boolean value to tell the findCity() function to look in any area instead of just the same area.
 
Interesting mod. Is there a way to make it so that other tile improvements can also be captured like a fort?
 
Interesting mod. Is there a way to make it so that other tile improvements can also be captured like a fort?

Yes, any improvement with the XML tag <bActsAsCity> set to 1 can be captured. There is no way to do it without making the improvement act as a city (unless you make a lot of SDK changes).
 
Super Forts 1.10!

It's that time again! :bump: A new version is ready for download!

A while back I said I wasn't planning any more new stuff, but while I was fixing a bug I took the opportunity to add in some new features. Here's what's new:

  • Fix a bug with automated workboats

A bug in my code that caused automated workboats to do nothing has been fixed.

  • Make so two different players cannot have workers building a fort on the same plot

The computer annoyed me while I was playing Super Forts. I was building a fort and an AI player brought a couple of their workers in when I was about to finish and finished it themselves. Now that won't happen. :badcomp:

  • Add in <iUnique> tag to control how closely together the same improvement can be built

A new XML tag for improvements has been added. I set it to 1 for forts. Meaning another fort cannot be build within 1 space of another. You can disable it or add it to other improvements as you please.

  • Make some internal details accessible through GlobalDefines.xml

If you look in the XML folder you will see GlobalDefines is now in there. I added some new values at the bottom of that file. I wouldn't change the values in there unless you really know what you are doing, but here is a short description of them.

SUPER_FORTS_SAFE_BUILD - This is currently set to 1 and can be deactivated by setting it to 0. If you deactivate it then some of the things I added into the AI to help with building forts will be deactivated. These include the 2 players can't build a fort in the same plot at the same time rule, the no building over a fort if it will make you lose the plot rule, and some new code I added in to help the AI better determine the value of building an improvement.

AI_WORKER_MAX_DISTANCE_FROM_CITY_OUT_BORDERS - This might have a really long name, but at least it is descriptive. This value was previously hardcoded into the SDK. This limits AI workers from going to far out of your borders. If it is to high then workers will travel ridiculous distances to build forts. If it is to low then they won't build outside their borders.

  • Slightly improve efficiency by changing the culture range forts array to short instead of int

Just an internal detail most probably won't care about. I changed an array of ints that is used for Super Forts into an array of shorts to save some memory.

  • Make some adjustments so forts are not overused by the AI or humans

Pay attention to this one. The iUnique tag I added in partially addressed this problem, but I still felt it was to easy to build forts and claim large amounts of land. In the "Super Forts/Assets/XML/Units" folder I made a change to BuildInfos. Building a fort will now use up your worker. If you don't like this setting then you could just delete BuildInfos from here, or you could go in and change <bKill> back to 0 for BUILD_FORT.

Once again I hope this will be the final version of Super Forts. If you find a bug then please report it. I hope to merge Super Forts with Better AI sometime and make that available as a separate download.:cool:
 
When I start a game it open on an advisor screen... :confused:

I'm also :confused:. That hasn't happened for me. Anyone else seen this?

edit: If it keeps happening see if uninstalling Super Forts and then reinstalling fixes it. It still hasn't happened to me. Was there something special about the way you started a game? and what advisor screen did it open?
 
Ok, my bad. I clean my custonsassets folder. Now is working. :)

Would have an option to produce the fort culture only in their own plot and expand (one more plot in all directions) after? The Fort culture accepts fractional values&#8203;&#8203;?
 
Ok, my bad. I clean my custonsassets folder. Now is working. :)

Would have an option to produce the fort culture only in their own plot and expand (one more plot in all directions) after? The Fort culture accepts fractional values&#8203;&#8203;?

To make a fort that has only culture in their own plot and then expands to include more plots later you would have to create a new improvement that forts can upgrade to. For example, you could create a Stronghold improvement that has iCultureRange 1, and make so the regular fort has iCultureRange 0 and upgrades to a Stronghold. Remember Super Forts includes a bUpgradeRequiresFortify tag that you can set to make so things upgrade when units are fortifying them instead of a city working them. All of what I just described could be done in the XML.

As for fractional values... I don't think they would work. :sad:
 
About 1.10, I think the AI is much better, it seems to capture forts. Looks like that targetCity thing did the trick! I did make some adjustments to balance the number of AI defenders, based on a few characterics of my mod (e.g. lack of Eras, pre-placed forts), so these are just informational:

I've been still seeing some specific, empty forts early in the game, since the AI prioritizes min. city defenders over min. fort defenders. This is logical of course, but makes the AI recall all the units from forts to coastal cities (which need +1 defender), until it has more. Adjusted it to make that always return 1 early in the game.

Also I saw forts that have way too many defenders in the late game, sometimes more than cities nearby. This related to lack of Eras (normally the AI needs 1 city defender in Ancient Times, and 2 later) and the fact that AI_getPlotDefendersNeeded adds +1 per fort on top of its base value - I changed it to a minimum of 1 instead, to not overcrowd forts that guard bonuses.

And once again, thanks :goodjob:
 
If all goes well then I will release a new version in about a month with some of the AI adjustments suggested by embryodead. I am waiting that long so there will be more time for people to report bugs. If any bugs are reported then I will fix them too. That should then be the final version of Super Forts :rolleyes:.

In that final version I will also improve my code commenting, so that people who only want to merge portions of Super Forts will have an easier time. I will add keywords to help quickly identify the purpose of portions of my code. For example, I might add a word like BOMBARD to all portions of the code that deal with that, so if someone didn't want to merge my bombard code it would be easier to skip those parts.
 
Someone should do this for CiV, if possible ;)
 
I have an idea for Super Forts that I have been debating implementing. The idea is to make forts trade-able via diplomacy. I think it will take a lot of work, so I want to get some feedback before deciding to do it.

Would this be a worth while addition to Super Forts?

Someone should do this for CiV, if possible ;)

I don't have CiV myself, so someone else would have to look into it. Since my mod required SDK changes it might not be possible in CiV until they release the source code.
 
That would be an extremely worthwhile edition, since it could implement the idea of trading colonies on an even smaller scale, but it would be extremely difficult.

Plus, I only play CiV nowadays (with mods of course), so I wouldn't be trying it for myself.
 
I have an idea for Super Forts that I have been debating implementing. The idea is to make forts trade-able via diplomacy. I think it will take a lot of work, so I want to get some feedback before deciding to do it.

Would this be a worth while addition to Super Forts?

Yes, very interesting!
 
Tradeable forts seem a bit ackward, especially since they have no names to easily identify them.
 
Tradeable forts seem a bit ackward, especially since they have no names to easily identify them.

Yes, if I did decide to implement it then I would have to somehow add names to forts to identify them. I would also have to write code to make the AI properly trade them.

I'm beginning to think it would take to much work to be worth it. :sad:
 
Awesome mod :) has anyone merged this with any of the Revolutions/DCM mods? or is this easy to merge to an existing one preferably LOR?
 
Top Bottom