[Module + Modular Python]Fort Commanders

westamastaflash

Lord Commander
Joined
Nov 1, 2007
Messages
933
Modular Fort Commanders, version 1.1

View attachment FortCommanders.zip

I built this module based on the ideas & art found in JFortZoC, Orbis, FF+, and MaxAstro's similar mods.

It is entirely modular, using odalrick's modular python mod:
http://forums.civfanatics.com/showthread.php?t=332534

I used v4 but it should be forward compatible.

Install odalrick's modular python, then drop the FortCommanders folder into your Modules/NormalModules subdirectory and away you go!

How it works:

You build a fort or discover one in the wilderness. Your unit can then cast a spell "Claim Fort." This creates a fort commander on that tile, spreading your culture to that tile as well.

The longer the fort commander has run the fort, and the more experienced she becomes at governing the area (and the less wild the area becomes). Each turn that she occupies the fort, a small amount of your culture (based on her level and the distance from the fort) will be added to the land plots around the fort.

This is a good way to help fight off culture expansion from a neighbor, as a fort tile that is garrisoned can never be flipped to a different civilization.

Also, when you capture a fort in enemy territory, you can create a commander to garrison it, and he will start spreading your culture in that tile as well (giving you control of a tile in enemy territory. Should you make peace, the city's culture may completely surround you, though you will start applying your culture to that land.

5 turns after occupying the fort, your commander will receive a "Garrison Drilling I" promotion, which will allow him to command an additional unit, and the culture of a fort, castle, or citadel will grow to the surrounding tiles.

10 turns after first occupying the fort, your commander will receive a "Garrison Drilling II" promotion, which gives command of an additional unit, and the culture of a castle or citadel will grow to the size of a city's fat cross. It grants minion archers the "Garrisoned" promotion, which gives +20% defense and +2 first strikes. It grants minion Melee, Mounted, Recon, Disciple, and Arcane units the "Fort Patrol" promotion, which gives +2 first strikes.

30 turns after first occupying the fort, your commander will receive a "Garrison Drilling III" promotion, which gives command of an additional unit, and grants minion units the "defensive" promotion for free.

Forts expand culture based on your cultural value in a square (and the requisite level of commander). So 2 forts of 2 civs right next to each other will fight for control of the land much as cities do. Cultural expansion happens slower in the diagonals so as to allow forts to control the top and bottom (or left and right) squares when they face off against an opposing fort.

Technical:
I only stuck with the basics for now, but as this is modular, it should be easy to build another module with unique fort commander units, promotions, etc. Fort Commander is part of the Commander UnitCombat, so I had to disallow a bunch of the Great Commander promotions by giving the fort commander a special promotion. There might be a different and better way to do this in a future version.
 
Version 1.1 Changelog:
- Removed Free XP, changed borders to age-based borders. (5 turns to first pop, 10 to second pop assuming castle/citadel).
- Added "Garrisoned" and "Fort Patrol" promotions
 
I like it. But since you've got the basics working, could you possible keep going and add the UU fort commanders from valkrionn and maxAstro's versions ?

Would be ideal to have it all in one easy module.
 
I'll most likely be releasing an edited copy of the FFPlus dll when I release the new patch (Next week sometime), so you might want to grab that and assign culture to the improvements. ;)

I'll remove the game-option references, so they don't have to be added... The rest will work fine if you ignore it or not.
 
I'd rather keep this all python & compatible with base FF if possible.

But I am intrigued - do you assign ownership of a tile based on culture instead of BFC range? Or is there a new process in the DLL which changes how tile ownership is assigned?
 
Uh oh ... looks like I've got a new reason to play vanilla FF now. Sorry Valki!

I like the idea that a fort can never fully flip culture. Although five turns seems kind of fast for each ring of culture. I think in Orbis the fort commander had to be level 4 before they could even take the promotion that gave them another culture ring.

It seems to me rushing construction and dotting the wilderness with forts can be a very worthwhile strategy. Ten turns after you build the fort and you've got a fat cross of culture which can do wonders for keeping barbarians at bay and restricting the expansion of your neighbors.

I think I'll give this a whirl in my next game.
 
Improvements you assign the tags to will have ownership set on completion. Anytime they upgrade, their ownership is reset to that of the civ whose borders they are in, unless they have the bOutsideBorders tag in which case they remain under the original civ's borders. Ownership can be changed via python, which is how you claim forts.

Not only can you set an improvement to generate culture, you can set the strength it does so with, the range it affects, and the distance required between improvements when you build them... Pirate Coves are build orders now.

Improvement culture is distinct from that of city culture, and is clearly labeled when you mouse over it... Cultural Control, rather than Culture.

Edit: Also, the Fort Commander is completely out of the loop where culture is concerned; Everything is handled by improvements. So when the fort upgrades, it grants you a new ring... Goes from the plot it is on, to one ring, to two, automatically cross-shaped like a city. Another interesting thing, setting an improvement to generate culture but giving it a range of -1 causes it to show as 'YOUR CIV Town' on mouseover.... Applied that to all the town lines.
 
It seems to me rushing construction and dotting the wilderness with forts can be a very worthwhile strategy. Ten turns after you build the fort and you've got a fat cross of culture which can do wonders for keeping barbarians at bay and restricting the expansion of your neighbors.

I think I'll give this a whirl in my next game.

Wasnt that kinda the point of early 'forts' though? Advance warning of an invasion, keep surrounding area in some state of peace, spread your influence, restrict enemy movements kinda thing?

I do think the culture gain could be slowed a bit - ten for first, 20 for second sorta thing.


Alternate idea I just had, that wouldnt work due to compatibility but I'm gonna mention anyway:
Forts cant turn into castles by themselves. The counter only starts once a fort commander is there. the culture upgrades in between each fort upgrade (Except the first which would grant the squares up down left and right from the fort) just increase the rate culture is added to tiles (Not big boosts, but every little helps :D). Castle= full 1 range square around fort +second tile in four cardinal directions. Citadel=fat cross.
I need to stop writing out every idea that pops into my head :/
 
Okay, I just played 50 turns as Sidar. I was using Iceciro's Fall to Pieces collection which includes the Trackless unit to replace the Sidar scout. Trackless are just like scouts except they are hidden by stealth and they suffer no move penalties for terrain. I played a Small Standard game using the Erebus map.

The game is basically over as of turn 50. I have explored every square of the map not blocked off by ocean or mountains. I popped pretty much all of the tribal huts myself. I captured all the forts myself, completely isolating Malakim in his riverless desert, Arturus Thorne to his moderately sized mountain home and cut Dierdre off to all but a bunch of snowy hillsides. I also managed to pop Bradeline's well twice, sending a nasty stack towards Dierdre. The fort blocking Arturus withstood an attack by a Wraith, letting me promote the commander enough to have 6 defense. With a 90% terrain defense bonus and 50% fortification bonus I don't think he's getting out anytime soon.

This was all thanks to the Trackless though, who let me reach every square of the map. Also, since I didn't encounter any spiders, I could do so safely.

Gonna give this a try with another civ ... I kinda wanted to play with the new usurper trait though ... ah well.
 
I recently played another game as Sidar (Trackless module removed). A small, Erebus, eight civ, no-settler game. I settled next to the Chislev in an isolated valley. I was able to discover the other civs only because my scout started on the other end of the mountain range and met quite a few civs before being eaten by a lion. The use of forts to capture resources was a lot of fun.

I've had a change of heart. I think I like this implementation of the Fort Commanders better than the Orbis implementation. In fact, I really like it a lot. I've already written too much on how much I enjoyed this so I'll sum up all my points as I usually do, with little asterisks next to them.

* The culture borders may increase quickly, but the amount of culture that goes into each square is quite paltry. The only fort I had that actually withstood the Chislev culture borders was the first one I built that battled most of the barbarian agression. The commander was at least level eight I think. I could have waned him, but didn't. I wonder what that would have done. It seems you designed the culture spread of the forts to counter culture spreads of other forts but cities will still trump them. This was my biggest underestimation of this mod. Culture works exactly how it should. You get a fort up in a place for a period of time and you can keep a city from being build in a specific place. But unless you have a fort that has withstood countless attacks and is a legend in the eyes of the local people the lure of street art and meat on a stick is going to prove too much for the masses.

* FF barb stacks don't seem to care about these forts. The only time I almost lost a fort was when a newly created one had a stack of five hill giants appear next to it. Fortunately I had a bunch of reserve divided souls, most of which gave their lives defending it until the archers got in place. Given the power of a fort like this I'm not sure if I think this is a good or a bad thing yet.

* Goblin forts can be claimed. They are no longer nuisances but strategic locations that must be fought for and claimed. My next game I'm going to play will be with FF patch C, which should make those pesky archers a little easier to deal with. Me likey.

* Fort commanders start off weaker but rapidly become stronger. Given the speed at which the culture ring and the commander grows, is the strength of the commander maybe a little too high? Disregarding the massive defensive benefits, early on this makes their strength quite insurmountable. After five turns S4 defense. After 15 (or is it 30?) turns S6! The turns don't seem to be adjusted by game speed. I do recall a lonely fort commander in a castle on a hill dispatching five lizardmen that had appeared right next to him all by himself, without any apparent wounds. I like the fact that commanders don't have ranged attacks themselves. It makes sense to me that commanders (or even highly promoted commanders) shouldn't be good at defending forts but rather should make the units they command exceptional at that task. I might consider making the progression S3/4/5 and allowing for the (broken in patch B) +2 defense command promotion to take them up to S7. It also seems like the commander should have a promotion which ensures they never defend the stack unless they are the only unit in the tile.

* Do these forts count as cities? Does an archer on a hill in one of these forts get a +50% defense then? I am feeling like a noob now for not knowing these answers. But I do know that archers defending a fort are monsters.

* What exactly do you mean that a garrison'd fort can't be out-cultured? In the first game I played with this, just messing around, I rushed three workers and built a fort right next to Odio's Prison. A few turns after, before my borders could expand, Sabathiel built a city right next to the fort. The city borders bumped my units out of the fort and I lost it. I had a scout in the fort, although I am not sure if he was in the army of the fort commander. If he was in the army, and in the fort, would I kept control of it?

* FF+ UU fort commanders. Do it. Do it now! That is all.
 
Thanks for the comments, I'll have more another time as I'm headed to work, just wanted to answer one question -

* What exactly do you mean that a garrison'd fort can't be out-cultured? In the first game I played with this, just messing around, I rushed three workers and built a fort right next to Odio's Prison. A few turns after, before my borders could expand, Sabathiel built a city right next to the fort. The city borders bumped my units out of the fort and I lost it. I had a scout in the fort, although I am not sure if he was in the army of the fort commander. If he was in the army, and in the fort, would I kept control of it?

This is the only case where I can't figure out how to have the fort keep its culture. It seems that when you found a city it automatically assigns ownership of all the surrounding tiles to the civilization and bumps your units out of their borders. I think to make this work would probably require a DLL change.

Other than that, it should work fine when a city's borders expand - the tile with the fort itself should not flip.

Also, forts don't act as cities - but archers get a special "garrisoned" promotion from the fort commander after 10 turns so they get +20% def and +2 first strikes. On top of that, after 30 turns they get the "Defensive" promotion.

Forts should, however, provide the resource that they are sitting on top of. They also grant some commerce and hammers at the cost of food, but I'm considering reducing that somewhat as it seems a bit too powerful.

I might reduce the fort commander's strength a bit. And in order to make the barbarians more dangerous I need to teach the AI how to use forts first, then barb stacks can increase in size and power faster...

As for timing, promotions are done like the Age promotions for Jontar, so it *should* be scaling...
 
This is the only case where I can't figure out how to have the fort keep its culture. It seems that when you found a city it automatically assigns ownership of all the surrounding tiles to the civilization and bumps your units out of their borders. I think to make this work would probably require a DLL change.

You could add some code in CityBuilt that looks at the tiles surrounding the city for unmanned forts. If one is found look for Fort Commanders that don't stand on forts and move them back, reset the culture and whatever else needs to be done.

Won't be perfect, but it's something. I think Fall Further keeps track of the first tile a unit was spawned, which could be useful.
 
This is the only case where I can't figure out how to have the fort keep its culture. It seems that when you found a city it automatically assigns ownership of all the surrounding tiles to the civilization and bumps your units out of their borders. I think to make this work would probably require a DLL change.

Honestly this isn't that bad. All you really need to do is wait five turns until your border expands once, then you can't have a city plopped next to the fort. Five turns is a short time but might give someone a chanced to decide to counter your fort with a city.

Forts should, however, provide the resource that they are sitting on top of. They also grant some commerce and hammers at the cost of food, but I'm considering reducing that somewhat as it seems a bit too powerful.

It would make sense if they got rid of food in a tile. And adding hammers and commerce will only help the AI who likes putting forts in their fat crosses. Still, probably don't need any bonuses for it and penalties would just hurt the AI.

I might reduce the fort commander's strength a bit. And in order to make the barbarians more dangerous I need to teach the AI how to use forts first, then barb stacks can increase in size and power faster...

On the plus side, the AI does seem to be applying units to the commanders. Doing promotions properly and keeping units in range of the fort does sound hard though. Good luck with that! :)

As for timing, promotions are done like the Age promotions for Jontar, so it *should* be scaling...

I'll double check my next game, but I think I was getting the first promotion at five turns on both normal and quick speed games.
 
A bug: when I've upgraded a melee unit in a fort, it gained "Garrisoned" but didn't lose "fort partrol" promotion.

I believe this is due to a bug in how commanders work - for some reason minion promotions are kept as "real" promotions when upgraded...
 
Also it seems that barbarians can spawn around fort tiles even though I've assigned ownership via python....
 
Would this module work with base FfH?

Excuse my ignorance :D
 
Top Bottom