View Full Version : Forts


Kailric
Feb 17, 2010, 03:24 PM
Forts where definately big during the wild west and I know a lot of us would like to see them in the game so I was wondering just how forts should be implemented. So what are all the thoughts on forts?


I am uploading the first test version of Forts. Right now its a stand alone ModComp.

Forts V.06
DOWN LOAD HERE (http://forums.civfanatics.com/downloads.php?do=file&id=14482)

New Rules and Features Here (http://forums.civfanatics.com/showthread.php?t=357188)

Change Log: Version 0.5 4/12010

-Cannons have new functionality for Bombarding see below
- AI may attempt to guard forts in its territory
- SDK has been added


Previous:
1. I am moving the "Rule Book" and description to the Modcomp page mentioned above so I don't have to update two pages.
2. Just made a few minor tweaks you may or may not notice
3. Added the First Cheat Feature for testing purposes. If you have Cheats enambled just hold down Alt and Ctrl when you click to build any Improvement and it will auto build. I use this for testing Forts.

TC01
Feb 17, 2010, 03:56 PM
Well, my idea was that after a Fort was built, a unit could move onto the tile and "Claim Fort" (a new command) that would spread the unit's owner's culture around the fort. It would also create a Fort Commander unit on the plot, an immobile unit. As long as the Fort Commander remained on the plot, the culture would persist.

If the Commander is killed, the culture goes away and someone else can claim the fort to spread their culture in the same way.

Kailric
Feb 17, 2010, 04:32 PM
Well, my idea was that after a Fort was built, a unit could move onto the tile and "Claim Fort" (a new command) that would spread the unit's owner's culture around the fort. It would also create a Fort Commander unit on the plot, an immobile unit. As long as the Fort Commander remained on the plot, the culture would persist.

If the Commander is killed, the culture goes away and someone else can claim the fort to spread their culture in the same way.

Can any unit claim the fort or just military units?

TC01
Feb 17, 2010, 05:11 PM
I think it should only be military units.

KJ Jansson
Feb 18, 2010, 12:28 AM
"Forts" should be in the Civ4Colonization. I already collected some information about this interesting addition.

I guess:

1. Fort can be built outside the culture borders. Details here (http://forums.civfanatics.com/downloads.php?do=file&id=10067).

2. Forts can attack nearby enemy units. Details here (http://forums.civfanatics.com/showthread.php?t=273244).

I hope these links also would be useful, too:

[BtS] JImprovementLimit: Tighter Control (http://forums.civfanatics.com/downloads.php?do=file&id=10348)

This mod addes several new tags to the ImprovementInfos XML file, allowing much more control over where Improvements can be built. To demonstrate the use of these tags, I have added two new Improvements and modified Forts a bit. The two added Improvments, Castle and Citadel, are copied, in name atleast, from Fall from Heavon 2.

First, a new tag now allows you to set the minimum number of Tiles that must be between the same types of Improvements. This works similar to the way Cities must have atleast 2 Tiles between them.

Second, a new tag allows to limit Improvements from being built inside of Culture Borders. This is ment to be used inconjunction with the bOutsideBorders tag.

Third, a new tag allows you to set a Required Improvement for the building of another Improvement. For example, in the mod, you can only build a Castle Improvement on a Tile that already has a Fort Improvement built on it.

Requires: Civilization 4: Beyond the Sword v3.17
Thread: JImprovement Mod Discussion
Sources: http://forums.civfanatics.com/downlo...=file&id=10347
JFort v0.31 (http://forums.civfanatics.com/showthread.php?t=169009)

[BtS] JFortZoC v0.210: Forts Extending Borders (http://forums.civfanatics.com/downloads.php?do=file&id=7077) or here (http://forums.civfanatics.com/showthread.php?t=243427).

JZoC Mod: Simple Zone of Control (http://forums.civfanatics.com/showthread.php?t=181921)

TC01
Feb 18, 2010, 02:53 PM
If possible, ranged combat for the fort commander units as implemented in Orbis and all those other FFH 2 modmods would be nice. (Most of my ideas are coming from there).

I think that's better than the modcomp for Forts attacking units.

Kailric
Feb 18, 2010, 03:03 PM
If possible, ranged combat for the fort commander units as implemented in Orbis and all those other FFH 2 modmods would be nice. (Most of my ideas are coming from there).

I think that's better than the modcomp for Forts attacking units.

I never played Orbis so how exactly does ranged combat work?

"Forts" should be in the Civ4Colonization.

Actually, I plan on making Forts a modcomp so others can use it in their mods, then just porting it over to Westward Ho

TC01
Feb 18, 2010, 03:21 PM
It's regular air combat (like planes have in vanilla Civ)- all I meant was that Orbis gives Fort Commanders this ability.

But I bet air combat isn't in Colonization...

Kailric
Feb 21, 2010, 11:36 AM
Anyone know of some good unit art to use for the fort commander?

Kailric
Feb 21, 2010, 06:23 PM
K, I am thinking on fort requirements. Should forts just cost gold as all the other improvements? Sense forts extend a players borders, adds defense bonus to units in the square and allows the player to place defensive choke points or guard resources it would seem a little to simple just to be able to plop down forts all over. Or could we add a little extra to forts in requireing them to have extra building materials or you can only build one per city you own, say a City can only support one fort as some quick ideas.

Any more Ideas?

Also, I could add an upgrade system where you can upgrade your forts. Say take a wagon load of lumber and tools out to the fort and the wagon will have a command to "Upgrade Fort". When you upgrade a Fort its borders extend and defense bonus goes up.

Androrc the Orc
Feb 21, 2010, 11:18 PM
K, I am thinking on fort requirements. Should forts just cost gold as all the other improvements? Sense forts extend a players borders, adds defense bonus to units in the square and allows the player to place defensive choke points or guard resources it would seem a little to simple just to be able to plop down forts all over. Or could we add a little extra to forts in requireing them to have extra building materials or you can only build one per city you own, say a City can only support one fort as some quick ideas.

Any more Ideas?

Also, I could add an upgrade system where you can upgrade your forts. Say take a wagon load of lumber and tools out to the fort and the wagon will have a command to "Upgrade Fort". When you upgrade a Fort its borders extend and defense bonus goes up.

I like the idea of the forts requiring resources to build as well as gold.

TC01
Feb 22, 2010, 05:24 AM
I definitely like the upgradable forts idea.

As for limits, KJ Jansson linked to a Jeckel modcomp JImprovementLimits (http://forums.civfanatics.com/downloads.php?do=file&id=10348), which lets you specify a minimum distance between improvements. I think that would be the best way to have a limit on the number of Forts.

Androrc the Orc
Feb 22, 2010, 02:08 PM
I definitely like the upgradable forts idea.

As for limits, KJ Jansson linked to a Jeckel modcomp JImprovementLimits (http://forums.civfanatics.com/downloads.php?do=file&id=10348), which lets you specify a minimum distance between improvements. I think that would be the best way to have a limit on the number of Forts.

But what if certain areas would warrant a "cluster" of forts in real life?

KJ Jansson
Feb 22, 2010, 02:29 PM
Anyone know of some good unit art to use for the fort commander?
Here one of possible variants. I redraw Great General in colors of artillery officer. I guess this military speciality is most closed to the Fort Commander.

Icon:

243965

FullLenghtButton:

243966

Game screen:

http://img705.imageshack.us/img705/6757/fortcommander.th.jpg (http://img705.imageshack.us/img705/6757/fortcommander.jpg)

TC01
Feb 22, 2010, 05:40 PM
But what if certain areas would warrant a "cluster" of forts in real life?

Well then, what do you think the distance limit should be?

I'd say there should not be Forts allowed right next to each other, so at least a distance of 1. 2 or 3 I think is good (depending on how far culture is extended).

Perhaps we could make the Level 1 Fort ("Outpost"?) have a smaller limit than the Level 2 Fort ("Fort"), and you wouldn't be able to upgrade an Outpost to a Fort if the Outpost was within the range of other Forts?

Kailric
Feb 22, 2010, 07:28 PM
Ok, here is what I have coded so far and I have pictures to show:

Here is a newly built fort:http://forums.civfanatics.com/attachment.php?attachmentid=244002&stc=1&d=1266891760
Notice there is no Borders around the above fort. In order to get borders you must move a armed soldier into the fort and either Fortify or Sentry:http://forums.civfanatics.com/attachment.php?attachmentid=244003&stc=1&d=1266891843

Now, as long as at least one unit stays in the fort the borders around the fort will be claimed by that player.

To upgrade a Fort to the next level you must move a Wagon loaded with 100 lumber and 100 guns into the fort and select the Upgrade Fort command, Notice the borders increase to cover all squares touching the fort:http://forums.civfanatics.com/attachment.php?attachmentid=244004&stc=1&d=1266891843

Then the Fort will become a Fortress (or what ever we choose to call it):http://forums.civfanatics.com/attachment.php?attachmentid=244005&stc=1&d=1266891843

Now if you ever leave a fort undefended for One full turn you will loose the Borders around the fort:http://forums.civfanatics.com/attachment.php?attachmentid=244006&stc=1&d=1266891843

Thats how things work so far and it works well. I still have to add in Fort Commanders somehow.

Now here is an idea. Should forts be supported by cities in order to extend borders. Like the Fort has to be connected by roads to a City in order to extend borders?

Also, there really should be a way to limit the number of forts being built. Maybe they cost gold each turn, or only so many per city, but there needs be something or the player can just take over the whole map with just forts.

TC01
Feb 22, 2010, 07:37 PM
I still like the required "buffer" range around each Fort idea. I also like the city support idea.

As for costing gold a turn- perhaps Fort Commanders (once implemented) could have a support cost? So the more Fort Commanders you have on the map the faster you loose money (speaking of which, I need to find a better graphic for money in Westward Ho) and if you are broke your Fort Commanders will disband and you'll loose the culture around Forts.

Kailric
Feb 22, 2010, 08:04 PM
I still like the required "buffer" range around each Fort idea. I also like the city support idea.

As for costing gold a turn- perhaps Fort Commanders (once implemented) could have a support cost? So the more Fort Commanders you have on the map the faster you loose money (speaking of which, I need to find a better graphic for money in Westward Ho) and if you are broke your Fort Commanders will disband and you'll loose the culture around Forts.

Yeah, a "buffer" sounds good, much like cities are now. Also, lets say that each City can only support two forts that must be connected by roads and also maybe a minimum distance, that is you can't build forts more than 6 tiles away from supporting city.

I am still thinking on Fort Commanders (thanks KJ for the Commander Unit) and what would be the best and coolest way to implement them. I like to be original in concept instead of just copying someone else so still considering other ideas besides what we already know in other Mods.

Maybe Fort Commanders are similar to Great Generals and each turn you control forts increases your chance that a unit guarding a fort will be promoted to Fort Commander.. or something like that.

Also, Forts could work to gather Bonus Resources. Say in the pictures above the Fort would start to gather the bonus tobacco for the city it is connected too as long as the player owns the fort and its connected by roads. This would make Fort placement a lot more strategic.

Edit: Maybe cities can only support 2 Outpost and 1 Fort.

KJ Jansson
Feb 23, 2010, 12:26 AM
.... each City can only support two forts that must be connected by roads and also maybe a minimum distance, that is you can't build forts more than 6 tiles away from supporting city.
Edit: Maybe cities can only support 2 Outpost and 1 Fort.
Agree.

However, the road between the town and the fort should also on both land and water tiles. Otherwise it would be impossible to build Forts on the islands that protect the entrance to the harbor city. And such forts are very interesting at the time when you declare your independence.


Maybe Fort Commanders are similar to Great Generals and each turn you control forts increases your chance that a unit guarding a fort will be promoted to Fort Commander.. or something like that.
In such case Fort Commander should be fighting (battle) unit and have some defensive bonuses.
A colonist, long time located in the fort gets a specialty of Fort Soldier (low defence bonus), and then Fort Commander (additional defence bonus).
Moreover, the Fort Commander must be the only one in each fort.


Also, Forts could work to gather Bonus Resources. Say in the pictures above the Fort would start to gather the bonus tobacco for the city it is connected too as long as the player owns the fort and its connected by roads. This would make Fort placement a lot more strategic.
Agree. The сonstruction of the fort has two objectives: protection of the city and capture the resource. It makes no sense to seize the resource, if it is impossible to obtain.

Kailric
Feb 23, 2010, 03:15 PM
Ok, here is an idea. Forts could require support froms towns in that they must be connected by roads and the town must provide food for the fort. It would work much like adding a Colonist to the town. When you mouse over food in the city management screen it will display how many forts the town is supporting.

Edit: In order for a fort to gather a bonus resource the resource must be connected by road and also have the appropriate Improvement.. like Tobacco needs farm.


Edit: Well I think its going to be a lot of coding for me to add checks to see if plots are connected by roads as Colonization does not have the "Plot Grouping" system that Civ4 has. In Civ4 there where trade networks and such and a whole set of code just to keep track of all that stuff. I'll have to look into it more and see what I can do. I may have to come up with my own system which would take longer than expected.

Kailric
Feb 27, 2010, 10:18 AM
Here is an update... I believe I have got the PlotGroup functions working properly in the game now. So that makes it possible to make checks for if a Plot is connected to a city, or if a resource is connected to a Fort or City. :goodjob:

Kailric
Feb 28, 2010, 06:37 AM
Ok, lets run through some ideas on how to get the Bonus resources collected by forts gathered and into your cities...

1. The simplest way: It is automated and that each turn the amount collected is automaticly added to the city. You can mouse over a Good in the city management screen and if a Fort is supplying the city with a good it will be listed here.

Pros: Its Automated :)

Cons: The City that the fort delivers to would have to be assigned somehow if multiple cities are connected to the same fort. If not then the player has no control over where his goods go.

2. A Wagon train must be assigned to the fort. Once the Resource is being gathered it is added to the list of possible Trade Routes. Then a Wagon Train must be set to Fully Automate or set to Run that Trade Route. Or maybe a new Command called "Collect from Forts".

Pros: Allows more interaction with the game and more uses for Wagon Trains.

Cons: Goods not collected are lost.

3. A Goods Unit is created in the Fort. Wagon trains can be sent over to collect the Bonus. This can be all there is to it or it could be as number 2 above as well.

Pros: Allows more interaction with the game and even more uses for Wagon Trains. Goods not collected are added to the Unit to the max the unit can hold. Goods stored over the Max would just create a new unit so that no goods are lost.

Cons: The most complicated to code.

Androrc the Orc
Feb 28, 2010, 07:29 AM
Ok, lets run through some ideas on how to get the Bonus resources collected by forts gathered and into your cities...

1. The simplest way: It is automated and that each turn the amount collected is automaticly added to the city. You can mouse over a Good in the city management screen and if a Fort is supplying the city with a good it will be listed here.

Pros: Its Automated :)

Cons: The City that the fort delivers to would have to be assigned somehow if multiple cities are connected to the same fort. If not then the player has no control over where his goods go.

2. A Wagon train must be assigned to the fort. Once the Resource is being gathered it is added to the list of possible Trade Routes. Then a Wagon Train must be set to Fully Automate or set to Run that Trade Route. Or maybe a new Command called "Collect from Forts".

Pros: Allows more interaction with the game and more uses for Wagon Trains.

Cons: Goods not collected are lost.

3. A Goods Unit is created in the Fort. Wagon trains can be sent over to collect the Bonus. This can be all there is to it or it could be as number 2 above as well.

Pros: Allows more interaction with the game and even more uses for Wagon Trains. Goods not collected are added to the Unit to the max the unit can hold. Goods stored over the Max would just create a new unit so that no goods are lost.

Cons: The most complicated to code.

I like 2 the best, as it allows a more "organic" transportation system than 1. 1 seems to be too abstracted to me, and doesn't take into account transportation times and capacity. 3 is good too, but it doesn't have an auto-route feature, and is harder to code.

TC01
Feb 28, 2010, 08:29 AM
I like 2 as well.

One thing, though- if you do set the Wagon Trains (and Locomotives?) up using the Automated Trade Routes system, you'll need some way to distinguish Forts from each other. Like a name for each fort.

The easiest way would be to use Fort Commanders and give them UniqueNames and then maybe add a landmark to the plot with that name (so the unique names would be names of Forts).

Alternatively, you could give improvements a new UniqueNames array and then do the same thing with those names.

Kailric
Feb 28, 2010, 09:10 AM
I like 2 as well.

One thing, though- if you do set the Wagon Trains (and Locomotives?) up using the Automated Trade Routes system, you'll need some way to distinguish Forts from each other. Like a name for each fort.

The easiest way would be to use Fort Commanders and give them UniqueNames and then maybe add a landmark to the plot with that name (so the unique names would be names of Forts).

Alternatively, you could give improvements a new UniqueNames array and then do the same thing with those names.

Right, I thought about all of that. It would be neat to have fort names but that would take a lot more coding but mostly time trying to figure out how to do that.

Prolly the easiest way at the moment would just be to add a new command for wagon trains and doing suggestion 3. Where level 1 forts can hold up to 100 of each Good and it is created on the map and level 2 forts can hold up to 200 goods. That would give more insentive to upgrade as well.

Then say a new command for wagon trains:

Commisson for Fort Duty: Assigns the wagon train to work the fort transporting goods to selected City. Hold shift for multiple forts.

I am working on this idea atm but have encountered a problem. Units like tobcacco are set to delayed death if they are not placed in a transport when created and so the very next turn they get deleted. I have yet to discover exactly why. In the UnitInfos I figured out thats its the Units class that causes this. Only if you change a Tobaccos class to Colonist or something will it no be deleted and if you change a Colonist class to Tobacco it will get deleted, even if you change the default unit for Tobacco to Colonist.

So somewhere in the code there is a check for unitclass and deletes Cargo classed units if not in a transport. Maybe in Python? I could solve this with the Fort Commanders by giving them the ablity to transport cargo. But something I noticed when testing things if you create a Cargo unit under a ship in the water it will auto load that ship... if you create a Cargo unit under a Wagon Train it will not auto load the wagon train. So it prolly want auto load in a fort commander either... so I am stuck at the moment trying to figure this out.

Edit: Well the Fort Commanders will fix this problem actually.. I just have to set them as the Transport of the Good. So I am going to add them right now to the game for that reason instead of trying to figure out what is killing my units cause I am at a loss. Maybe it python it cycles through all a units classes and deletes units with no transport that are classed as Tobacco, Ore, and such?

Androrc the Orc
Feb 28, 2010, 10:41 AM
I have a question: would an unit to work on the fort plot for the commodities?

Kailric
Feb 28, 2010, 01:05 PM
I have a question: would an unit to work on the fort plot for the commodities?

Thats an interesting thought. In the Cities units are required to gather commodities so it would seem that they should be required to work out in the field as well. For now lets just assume that the Fort Commanders are coordinating the gathering of the goods. But requireing a unit to be working the plot could be added later.

I am looking into requireing forts to be supported by cities in that 2 food is consumed in the city to support the fort. So that would help to compensate for no units working the field.

Kailric
Mar 01, 2010, 04:21 PM
Ok, in keeping track of my ideas and concepts on this forum here is my latest thoughts:

This is how the Forts and Wagons will or could work...

1. A soldier Unit builds a Fort thus converting to a Fort Commander or a Pioneer builds a Fort and a Soldier unit uses a new command called "Command Fort", then converting to a Fort COmmander. Four borders N,S,E,W of the fort will be controlled.

2. Fort Commanders are required to control the borders surrounding fort and they must be supplied by a city. Fort Commanders will have a new command called "Select supporting City" in which you can select what city supports the fort. If the fort is connected by roads to the supporting city it will start controlling the borders around it. They will also have an "Abandon Fort" command to destroy the fort and convert back to a soldier.

3. To gather resources a the Fort must be supported by a City and connected by roads as well. The plot on which the Bonus resource must be connected by roads and have the appropriate Improvement built. Then the City will spend two food per turn to help gather resources and support the fort.

4. Each turn a resource is gathered it appears at the fort as being transported by the fort commander. The Fort commander can only hold 1 bonus good. Once it reaches 100no more will be gathered.

5. Wagon trains will have a new command called "Commision for Fort Duty". This command allows you to select which cities the wagon will gather from Forts for. If the selected city has a Fort assigned to it by a Fort Commander it will gather the goods from that fort and return them to the selected city.

6. Wagon trains can upgrade a fort to a level 2 fort with 100 lumber and 100 guns. The Fort Commander will get an increase in cargo space and all borders around the fort will be controlled.

7. Fort Commanders are the last to defend the fort. If the Fort Commander dies the fort is either destroyed or can be taken over.

TC01
Mar 01, 2010, 04:45 PM
Ok, in keeping track of my ideas and concepts on this forum here is my latest thoughts:

This is how the Forts and Wagons will or could work...

1. A soldier Unit builds a Fort thus converting to a Fort Commander or a Pioneer builds a Fort and a Soldier unit uses a new command called "Command Fort", then converting to a Fort COmmander. Four borders N,S,E,W of the fort will be controlled.

2. Fort Commanders are required to control the borders surrounding fort and they must be supplied by a city. Fort Commanders will have a new command called "Select supporting City" in which you can select what city supports the fort. If the fort is connected by roads to the supporting city it will start controlling the borders around it. They will also have an "Abandon Fort" command to destroy the fort and convert back to a soldier.

3. To gather resources a the Fort must be supported by a City and connected by roads as well. The plot on which the Bonus resource must be connected by roads and have the appropriate Improvement built. Then the City will spend two food per turn to help gather resources and support the fort.

4. Each turn a resource is gathered it appears at the fort as being transported by the fort commander. The Fort commander can only hold 1 bonus good. Once it reaches 100no more will be gathered.

5. Wagon trains will have a new command called "Commision for Fort Duty". This command allows you to select which cities the wagon will gather from Forts for. If the selected city has a Fort assigned to it by a Fort Commander it will gather the goods from that fort and return them to the selected city.

6. Wagon trains can upgrade a fort to a level 2 fort with 100 lumber and 100 guns. The Fort Commander will get an increase in cargo space and all borders around the fort will be controlled.

7. Fort Commanders are the last to defend the fort. If the Fort Commander dies the fort is either destroyed or can be taken over.

Sounds good! Although, perhaps "Assign to Fort Duty" would be a better name?

Did you stop the cargo units from being deleted at the end of each turn?

Kailric
Mar 01, 2010, 04:58 PM
Sounds good! Although, perhaps "Assign to Fort Duty" would be a better name?

Did you stop the cargo units from being deleted at the end of each turn?

Yeah, when I added Fort Commanders to carry them as cargo it stopped it but I haven't figured out yet what causes the goods to be deleted that way yet.

Kailric
Mar 04, 2010, 08:50 PM
Still making progress. This is actually a big mod for me as I want to add enough to it to make Forts a unique and fun experience.

Right now I have it so that the Soldier Profession can only build Forts sense Fort are military installations for the most part. I am trying to decide if Forts should be instantly built like founding cities or it takes several turns. The Unit is consumed in building the fort, but not really as it is converted to a Fort Commander Unit. I have it right now so it takes a few turns to build the fort and even made it so the Unit turns into a military worker while building as shown in the picture.

245135

Forts can not be built within one tile of another fort or city and cities can not be built within one tile of a Fort. I am thinking of allowing Cities to be built on or next to a Fort but the Fort gets consumed and the Unit is added to the City.

I am making this all Modder friendly and adding as my xml tags as possible.

Any thoughts on these ideas?

KJ Jansson
Mar 05, 2010, 05:46 AM
I am trying to decide if Forts should be instantly built like founding cities or it takes several turns.
No! Please don't do so, that the fort appears instantly. Construction of the fort should require a quite long time and of course some materials (wood, stone, maybe muskets or tools).


Forts can not be built within one tile of another fort or city and cities can not be built within one tile of a Fort. I am thinking of allowing Cities to be built on or next to a Fort but the Fort gets consumed and the Unit is added to the City.

I guess these distances between the Fort and the City could be possible to adjust for bigger city radius, too.


I am making this all Modder friendly and adding as my xml tags as possible.

This is a very useful feature of your mods. :)

Kailric
Mar 05, 2010, 06:28 AM
I guess these distances between the Fort and the City could be possible to adjust for bigger city radius, too.

Yes, this distance attribute is in the xml.

Androrc the Orc
Mar 05, 2010, 08:34 AM
Sounds good Kailric.

No! Please don't do so, that the fort appears instantly. Construction of the fort should require a quite long time and of course some materials (wood, stone, maybe muskets or tools).


I agree, it appearing instantly would not only make it too easy to make them, but also takes away the strategy of having to plan for the future. By the way KJ, how did you make the full length icon for the Fort Commander?

TC01
Mar 05, 2010, 08:35 AM
Another idea- perhaps Fort Commanders should be able to "Abandon Fort"? Which would give you a Veteran but you would loose control over the Fort. (Even if they weren't created by a Veteran, by serving as a Fort Commander you would think the military unit would become a Veteran).

I am trying to decide if Forts should be instantly built like founding cities or it takes several turns.

I agree it should take several turns- perhaps 4-6 turns. I'm not so sure about it requiring other materials as KJ Jansson suggested.

Because then in addition to the military unit you'd need to have a Wagon Train on the plot with the required materials, and that seems like a little too much micromanagement to construct a Fort, especially since you already need a Wagon Train on the plot with required materials to update the Fort.

Kailric
Mar 05, 2010, 10:56 AM
Another idea- perhaps Fort Commanders should be able to "Abandon Fort"? Which would give you a Veteran but you would loose control over the Fort. (Even if they weren't created by a Veteran, by serving as a Fort Commander you would think the military unit would become a Veteran).

I agree it should take several turns- perhaps 4-6 turns. I'm not so sure about it requiring other materials as KJ Jansson suggested.

Ok, I'll make the Forts take turns. And about the "Abandon Fort", yeah, if you delete a Fort Commander it will convert back to a normal Unit and remove the Fort.

One idea I have about Fort Commanders and Veterans is this.

Veterans become Fort Commanders, and regular Soldiers become Fort Sergents where Commanders have a few added benefits. We can add promotions that allow a unit to become a Commander of a Fort though.

KJ Jansson
Mar 05, 2010, 11:41 AM
By the way KJ, how did you make the full length icon for the Fort Commander?

There are at least two simplest techniques.

1. Copy screen from Civilopedia.

http://img198.imageshack.us/img198/1455/53627740.th.jpg (http://img198.imageshack.us/img198/1455/53627740.jpg)

Then crop from the image and edit in GIMP.

Here there are two negative effects:
- colored background -> difficult to remove
- size of cropped image is too large and therefore you have to change it significantly to get the final resolution (64x128); as result - big distortions of the final image.

2. From the game. You open WorldBuilder, insert a required unit (here Great General) in the game on any empty tile, then "PrintScreen" => paste in any graphic editor => crop as in the previous case. Time required for all operations is about 10-20 sec.

http://img198.imageshack.us/img198/3512/23160809.th.jpg (http://img198.imageshack.us/img198/3512/23160809.jpg)

Here there are two positive moments:
- black + uniform(!!!) background => very easy remove such background in GIMP
- smaller size after crop operation => smaller distortions of final image.

Last time I use only the second technique. There are other methods, but they are more complicated and time consuming.

I'm not so sure about it requiring other materials as KJ Jansson suggested.

KJ Jansson's stonecutter already prepared a lot of stones for Kailric's Fort. And winemaker is ready to open a bottle of good old wine. :)

One of Guilds of my city is ready to propose some goods (Ammo, Gunpowder and Provision) for your Fort.

245205245206245207

Kailric
Mar 05, 2010, 06:00 PM
KJ Jansson's stonecutter already prepared a lot of stones for Kailric's Fort. And winemaker is ready to open a bottle of good old wine. :)

One of Guilds of my city is ready to propose some goods (Ammo, Gunpowder and Provision) for your Fort.

Soon as I get the chance KJ I'll check out your mod. I just noticed it the other day. After I get this version of Forts complete maybe I'll get the chance to work with you for a Forts version for your mod.


I have one technique I use in making buttons and full length icons and such.

Open world builder and go to any spot with a lot of land then start adding Ocean terrain over a large area... you will soon see the effect that I have in the screen shot below... the area starts to turn black. Then just plop your unit down there in the middle of all the black then exit World Builder. Then if you install a mod that gives you full control of the camera you can zoom in and out and even make a unit pose like fortify and such.

http://forums.civfanatics.com/attachment.php?attachmentid=245244&stc=1&d=1267837091

http://forums.civfanatics.com/attachment.php?attachmentid=245245&stc=1&d=1267837091

Kailric
Mar 05, 2010, 07:43 PM
KJ Jansson got me to thinking sense I we now have the ability to determine if a plot is connected by roads to a city with PlotGroups it would be a simple thing really to add in requirements for things such as:

Example: To build a railroad you must have access by road to a City that has 20 Ore and 20 tools and they get consumed with each railroad built.

The below code is what checks for distance between the plots and wether there is enough extra food in the city to support a Fort. As you can see its pretty simple and any action in the game can have such a requirement added with little effort in coding sense the hard part is done already.

bool CvPlot::isRouteGroupConnectedToCity(PlayerTypes ePlayer, int MaxDistance, CvCity* pHomeCity) const
{
//int iPathTurns;
int iValue;
//int iBestValue = MAX_INT;
CvPlotGroup* pCityRouteGroup;
CvUnit* pFortCommander = getFortCommander();
//CvCity* pHomeCity;
if (pFortCommander != NULL && pHomeCity == NULL)
{
pHomeCity = pFortCommander->getHomeCity();
}

if (getPlotGroup(ePlayer) != NULL && pHomeCity != NULL)
{
pCityRouteGroup = pHomeCity->plot()->getPlotGroup(ePlayer);

if (pCityRouteGroup == getPlotGroup(ePlayer))
{
iValue = plotDistance(getX_INLINE(), getY_INLINE(), pHomeCity->getX_INLINE(), pHomeCity->getY_INLINE());
if (iValue <= MaxDistance)
{
if (pHomeCity->foodDifference() >= GC.getDefineINT("TK_FOOD_CONSUMED_FORTS"))
{
return true;
}
}

}

}
return false;
}

In the picture you can see the results of above code:
http://forums.civfanatics.com/attachment.php?attachmentid=245261&stc=1&d=1267843452

Androrc the Orc
Mar 05, 2010, 09:02 PM
There are at least two simplest techniques.

1. Copy screen from Civilopedia.

http://img198.imageshack.us/img198/1455/53627740.th.jpg (http://img198.imageshack.us/img198/1455/53627740.jpg)

Then crop from the image and edit in GIMP.

Here there are two negative effects:
- colored background -> difficult to remove
- size of cropped image is too large and therefore you have to change it significantly to get the final resolution (64x128); as result - big distortions of the final image.

2. From the game. You open WorldBuilder, insert a required unit (here Great General) in the game on any empty tile, then "PrintScreen" => paste in any graphic editor => crop as in the previous case. Time required for all operations is about 10-20 sec.

http://img198.imageshack.us/img198/3512/23160809.th.jpg (http://img198.imageshack.us/img198/3512/23160809.jpg)

Here there are two positive moments:
- black + uniform(!!!) background => very easy remove such background in GIMP
- smaller size after crop operation => smaller distortions of final image.

Last time I use only the second technique. There are other methods, but they are more complicated and time consuming.



KJ Jansson's stonecutter already prepared a lot of stones for Kailric's Fort. And winemaker is ready to open a bottle of good old wine. :)

One of Guilds of my city is ready to propose some goods (Ammo, Gunpowder and Provision) for your Fort.

245205245206245207

Thanks :)

One question: how do I eliminate the black background in GIMP?

Kailric
Mar 05, 2010, 11:01 PM
Thanks :)

One question: how do I eliminate the black background in GIMP?

Select the "Fuzzy Select Tool", make sure Threshold is set to 0, then click on the black and when its selected hit delete.

Threshold determines how close other colors have to be in order to be selected by the Fuzzy Select Tool, the higher the more colors that gets selected.

Androrc the Orc
Mar 06, 2010, 06:31 AM
Select the "Fuzzy Select Tool", make sure Threshold is set to 0, then click on the black and when its selected hit delete.

Threshold determines how close other colors have to be in order to be selected by the Fuzzy Select Tool, the higher the more colors that gets selected.

Thanks!

Kailric
Mar 07, 2010, 08:30 PM
Have another picture update. You just never know what you will end up having to do when you start a mod like this. I've had to add a lot of little extras to make Forts a fun, playable experience.

I am getting close to ready to upload a test version. In my play testing forts add a lot of extra strategy and coolness:). Forts are good for when there are bonus resources in bad locations or dangerous locations that you just would not want to start a settlement. They are also good for pre-settlement spots when you want to defend the spot for a colony later but don't have the resources to defend a colony.

Fort Officers will have two new commands:

Assign Home Settlement: After a fort is built you will get the chance to assign it a Home Settlement. This is the Settlement the fort gets is resources from in order to produce goods from its surrounding territory.
245551

Assign Resources to Produce: If a fort has several resources it can gather but not enough cargo space you can use this command to select which resouces to gather each turn. That way if you need more Furs than Lumber you can choose to collect Furs.
245552

Wagon trains can be assigned to any city that is supporting a Fort. It will then move from fort to fort gathering the goods that have the highest amount in total yield first.

Lumber and Furs: Forests and Light Forest both are considered to be Bonus resources. Furs where the hottest item back in the Pioneer days and most forts where built for that very reason, to gather furs. So with that in mind with a Lodge built in a forest you will be able to gather both lumber and furs.

KJ Jansson
Mar 08, 2010, 12:13 AM
Forts are good for when there are bonus resources in bad locations or dangerous locations that you just would not want to start a settlement. They are also good for pre-settlement spots when you want to defend the spot for a colony later but don't have the resources to defend a colony.
Exactly!

And what if to make a Fort screen similar to the City screen? Of course, without administrative buildings. Then in the Fort could be build a Barrack (training of soldiers) or Hospital (treatment of wounded), or here we could organize a number of simplies productions. For example, the animal hides processing by type:

http://img195.imageshack.us/img195/7803/variant2a.th.jpg (http://img195.imageshack.us/img195/7803/variant2a.jpg)

Kailric
Mar 08, 2010, 03:13 PM
Exactly!

And what if to make a Fort screen similar to the City screen? Of course, without administrative buildings. Then in the Fort could be build a Barrack (training of soldiers) or Hospital (treatment of wounded), or here we could organize a number of simplies productions. For example, the animal hides processing by type:

Yeah, I thought about the Fort Screen. That sounds cool but would take a lot of python coding and I don't know much about that atm. So much to code, so little time:)

Kailric
Mar 13, 2010, 05:53 PM
I posted an upload on the main page. Please check it out and test Forts for me. Thanks. :goodjob:

TC01
Mar 13, 2010, 06:21 PM
The first thing I notice is that there does not appear to be a way for my Veteran to claim the fort- I click on the Change Profession button but nothing happens. See attached screenshot for the situation.

Kailric
Mar 13, 2010, 09:02 PM
The first thing I notice is that there does not appear to be a way for my Veteran to claim the fort- I click on the Change Profession button but nothing happens. See attached screenshot for the situation.

Hmm, prolly cause of the indian village cutting off the route to the city. I'll check into that, but move the fort where the route path does not go through an indian village.

Edit: Yeah, I just tested that situation and it is the Indian Village thats causeing this. I think forts next to Indian villages is a good idea but it should strain the relationship with the indians.

Edit: Ok, I seemed to have fixed that. You can now build beside Indian Villages and the Fort will work, there was a couple bugs there that prevented that.

Kailric
Mar 14, 2010, 09:01 PM
Just uploaded version 0.03.

Fixed one bug where if your Fort's home city only had 2 food the Fort would act like it was unsupported the next turn.

Also, a Fort's culture rate is now based on the Home City's Culture rate.

TC01
Mar 15, 2010, 12:40 PM
A few things:

I would write two "can't support" messages- one that says "This fort cannot be supported because it is not linked by roads to any colony", and another that says "This fort cannot be supported because you are not producing enough food". I found it a little confusing at first because my fort was connected- but then I realized I wasn't producing enough food.

What does the "Assign Resources to Produce" button do? If I click on it I get a "Fort has no resources available to produce" message, but my Fort is producing resources.

EDIT: I just read the first post again. But then perhaps this button shouldn't even appear unless the fort is producing too many goods?

Invisible native borders are overriding Fort borders. Is this supposed to happen?

Kailric
Mar 15, 2010, 03:28 PM
A few things:

I would write two "can't support" messages- one that says "This fort cannot be supported because it is not linked by roads to any colony", and another that says "This fort cannot be supported because you are not producing enough food". I found it a little confusing at first because my fort was connected- but then I realized I wasn't producing enough food.

What does the "Assign Resources to Produce" button do? If I click on it I get a "Fort has no resources available to produce" message, but my Fort is producing resources.

EDIT: I just read the first post again. But then perhaps this button shouldn't even appear unless the fort is producing too many goods?

Invisible native borders are overriding Fort borders. Is this supposed to happen?

Yeah, I actually confused myself one time wondering why the Fort was not connected. I will add the second message next update.

Well there must be a bug in the Assign Resources to Produce command. I updated the first page with a screenshot of this command in action. It doesn't matter how many goods your spot is working this command should always work.

I just checked it out there is a bug in the code so I'll look into this, k thanks.

I am still tweaking Culture and borders. A city does not produce culture unless ther are workers in the town hall. So I made forts where they do not produce culture unless the Home Settlement is produceing culture, so If an indian village is produceing culture with the current code you will have to produce more culture than the Indians and get the plot to 100% yours in order to take over their land or defeat the indians :ar15: Any other suggestions?

EDIT: ok I found the bug on the Assign Resources to Produce command. I was still working on the code to that but forgot to finish it up so I'll do that this evening and post it in another update.

Kailric
Mar 15, 2010, 09:20 PM
K, I just uploaded the next version. I think I fixed the bug in the Assign Resources to Gather command. Also I added better text to the Select Home Settlement command for when there is no connections.

Also included is one more command for transports, "Return Home and Unload" as described on first post.

EDIT: I totally forgot about one other command:

Upgrade Fort: Your Transports (Ships or Wagons) can upgrade a fort to the next level. Simply deliver 100 lumber and 100 Muskets to the Fort and select this command. The Fort will become a Fortress with extra goods space in the Warehouse and doubleing the goods produced per turn.

Kailric
Mar 16, 2010, 05:40 AM
Some other ideas with this would be for other units to gain functionality when assigned to a fort. I want to do something with scouts cause after you have explored the whole map the scout proffession isn't of much use. So assigning them to forts could be an option but I am unsure of what exactly to do with them there. Maybe warn of impending Indian attacks?

Also, adding Cannons to forts could allow them to take shots at passing enemy Privateers or the like.

Androrc the Orc
Mar 16, 2010, 05:58 AM
Some other ideas with this would be for other units to gain functionality when assigned to a fort. I want to do something with scouts cause after you have explored the whole map the scout proffession isn't of much use. So assigning them to forts could be an option but I am unsure of what exactly to do with them there. Maybe warn of impending Indian attacks?

Also, adding Cannons to forts could allow them to take shots at passing enemy Privateers or the like.

How about a Scout in a fort giving a combat bonus to units inside the fort and/or units adjacent to the fort (representing that scouting the enemy forces, and therefore having more information about them, would give an advantage in battle)?

Kailric
Mar 16, 2010, 04:59 PM
How about a Scout in a fort giving a combat bonus to units inside the fort and/or units adjacent to the fort (representing that scouting the enemy forces, and therefore having more information about them, would give an advantage in battle)?

Yeah, thats a pretty neat Idea. They work with military formations on attack, defense, or while on the move. I am going to read up on some of the Colonial scouts like Daniel Boone, Davy Crockett, or Jim Bowie and see if I come up with any ideas.

Kailric
Mar 16, 2010, 07:51 PM
Well here is somethoughts I had while researching Scouts. They are Reconnaissance Units as we know, and they scout the terrain to find advantages, disadvantages, determine enemy size and movement and attempt to prevent suprise attacks and things of the like. The Game has defense Bonuses for Terrain so why not add a feature for Scouts in that they Reduce the defense bonus from Terrain that units are attacking into.

For instance if a Soldier in a Fort with a Scout also in the Fort attacks an enemy unit laying siege to the Fort the enemy unit does not gain his full Terrain defense bonus. This ability would also apply to Scouts anywhere on the map and in most combat situations while attacking.

This ability could be Automatic and applied during combat or it could be a new command for Scouts called "Recon" or simply "Scout" in which they attempt to scout the enemy Terrain (Not Cities or Forts though) if successful they reduce the Terrain Defense bonus if they fail they could be captured and possibly killed. This would work similar to the Cannon's ability to Siege a City.

Seasoned Scouts would reduce the Terrain defense bonus by a greater amount. If the "Scout" command is used they would also have a smaller chance of failing or being captured.

Multiple Scouts could decrease a Terrains bonus defense to zero and then or if attacking into the open such as Plains the Scout could give a small bonus to attack.

This ability or command would seemingly simulate what scouts do in actual military purposes.

Androrc the Orc
Mar 16, 2010, 09:50 PM
Well here is somethoughts I had while researching Scouts. They are Reconnaissance Units as we know, and they scout the terrain to find advantages, disadvantages, determine enemy size and movement and attempt to prevent suprise attacks and things of the like. The Game has defense Bonuses for Terrain so why not add a feature for Scouts in that they Reduce the defense bonus from Terrain that units are attacking into.

For instance if a Soldier in a Fort with a Scout also in the Fort attacks an enemy unit laying siege to the Fort the enemy unit does not gain his full Terrain defense bonus. This ability would also apply to Scouts anywhere on the map and in most combat situations while attacking.

This ability could be Automatic and applied during combat or it could be a new command for Scouts called "Recon" or simply "Scout" in which they attempt to scout the enemy Terrain (Not Cities or Forts though) if successful they reduce the Terrain Defense bonus if they fail they could be captured and possibly killed. This would work similar to the Cannon's ability to Siege a City.

Seasoned Scouts would reduce the Terrain defense bonus by a greater amount. If the "Scout" command is used they would also have a smaller chance of failing or being captured.

Multiple Scouts could decrease a Terrains bonus defense to zero and then or if attacking into the open such as Plains the Scout could give a small bonus to attack.

This ability or command would seemingly simulate what scouts do in actual military purposes.

I like that, though I think there should also be a bonus to defending units (increase the terrain defense bonus for them?).

Willi_Tell
Mar 17, 2010, 06:52 PM
For quite a while, I am following your discussions and feature development about Forts with great interest.

The ideas you have - and the progress you make - is amazing :worship: :crazyeye:

Will the "Fort Feature" just be part of Westward Ho or will you also release it as a ModComp? (that would be easier to implement it into other mods, I assume...?)
:)

Kailric
Mar 17, 2010, 07:07 PM
For quite a while, I am following your discussions and feature development about Forts with great interest.

The ideas you have - and the progress you make - is amazing :worship: :crazyeye:

Will the "Fort Feature" just be part of Westward Ho or will you also release it as a ModComp? (that would be easier to implement it into other mods, I assume...?)
:)

Poof ModComp (http://forums.civfanatics.com/showthread.php?t=357188http://forums.civfanatics.com/showthread.php?t=357188) Your wish is my command :)

Actually, I uploaded a version for testing a few days ago. Please feel free to test it out.

I like that, though I think there should also be a bonus to defending units (increase the terrain defense bonus for them?).

Yeah, that seems appropriate also. I guess if two armies have scouts they could very well just cancel each other out. :p

Kailric
Mar 17, 2010, 09:51 PM
Well right now I am working on adding the ability to use Cannons to Bombard forts like you can Colonies. And then I pretty much have to work out the AI to use Forts or the Player would have a great advantage over AI opponents, this would prolly take some time to do.

TC01 mentioned Fort Commanders having the ability to attack at range and so I was thinking maybe having a Fort Commander give your Cannons a new ability to like Autoattack passing enemys and damaging them. That way you could set up choke points that the enemy has to get through.

Also, maybe Fort Commanders can allow cannons to Bombard plots at range. This would either damage the Unit but not kill it or reduce the plots defense bonus.

Actually, I never liked how they implemented Cannons at all in the Vanilla game. I mean you can only bombard Cities. Then Cannons attack like Musket units. Cannons never charged the battlefield, they weakened enemy defences and provided cover fire.

Enemy units out in the open should recieve damage from Cannon Fire, especially when the terrain offeres no defence bonus. Any thoughts on this?

Kailric
Mar 18, 2010, 05:29 PM
I been play testing and brain storming and posted a new thread over in Creation & Customization about Forts vs Colonies check it out if you like and comment...

http://forums.civfanatics.com/showthread.php?p=9011068#post9011068

Kailric
Apr 01, 2010, 11:31 AM
K, just uploaded the lastest version 0.6 with the SDK