Guide to The C2C Alternative Improvement Upgrade Mechanism

Thunderbrd

C2C War Dog
Joined
Jan 2, 2010
Messages
29,801
Location
Las Vegas
The C2C Alternative Improvement Upgrade Mechanism

Some new dynamics to handle improvement upgrades have been officially introduced and awaiting xml development to support them. This thread is to explain these new dynamics, to discuss them, and to discuss the new xml adjustments they call for. So without further introduction, I'll get right into explaining the new dynamics and how they work. This description of the algorithms may be a bit dry and it infers what can be done more than flat out expressing it in many cases. It is drawn from a walkthrough of the code itself so should be 100% accurate to the function dynamic.


Here goes:

As normal, if any of your improvements have a primary upgrade setting that you've tech qualified for, if that improvement is worked (or if it is manned in the case of the fort improvements) the improvement will begin the upgrade process, accumulating points each round towards the upgrade threshold it requires to trigger the upgrade. (We have these amounts set very low by the way - so low that some of the leader trait abilities to reduce them is made moot.)

Once the upgrade threshold is triggered, the improvement enters into a new evaluation set that can have a few varied reactions. Previously it would've just upgraded the improvement to the primary upgrade. Now...

  • If the primary upgrade would be something the player could build there (this also now means that there must be an existing BUILD definition the player is ALSO qualifying for by tech!) it will capture that information and move on to further evaluations.
    The Qualifications it looks for are:
    • The plot is not a city (duh).
    • The plot is not impassable to the team in general.
    • The plot is a water plot if the improvement upgrade requires it.
    • If there is a feature requirement for the improvement upgrade TO UPGRADE, the feature exists.
    • If a Bonus type must exist to validate the improvement upgrade, the bonus exists on the plot.
    • If the improvement upgrade requires NO freshwater that freshwater access not exist.
    • If the improvement upgrade requires flatland it makes sure the plot is indeed flat.
    • If the improvement upgrade allows the movement of ships onto land that the land be coastal.
    • If there is an outright any feature requirement for the improvement upgrade, that there is an existing feature.
    • If the improvement upgrade requires it be placed on a hill that the plot is a hill.
    • If the improvement upgrade requires it be placed on a peak that the plot is a peak.
    • If the improvement upgrade requires access to freshwater and freshwater access does exist.
    • If the improvement upgrade requires being on a riverside and the plot is a riverside plot.
    • If the improvement upgrade requires a particular terrain and the plot is that terrain.
    • If the improvement upgrade requires it be on a particular feature type that feature type exists on the plot.
    • The normal complex evaluation for desert farms if the upgrade adheres to the same expecations as a built improvement.
    • That there exists in the xml somewhere a build definition that the player tech qualifies for that would allow the player to potentially build this improvement upgrade.

  • If any of the above noted qualification factors are disqualifying the primary improvement, it will then immediately check the <AlternativeImprovementUpgradeTypes> tag which is formatted as:
    Code:
    <AlternativeImprovementUpgradeTypes>
    	<ImprovementType>IMPROVEMENT_X</ImprovementType>
    	<ImprovementType>IMPROVEMENT_Y</ImprovementType>
    </AlternativeImprovementUpgradeTypes>
    and is to be properly placed just after the primary upgrade tag <ImprovementUpgrade> tag.

  • If it finds any alternative improvement upgrade definitions, it will check them all to find the first one that is fully qualified for upgrade according to all the qualifications it checked on the primary upgrade. If it does find a valid alternative that is fully qualified to upgrade, it will capture this information and move on to further evaluations.

  • If the primary and all alternatives fail to be found valid, the upgrade process on the plot will be automatically frozen. This frozen status can be repaired by deselecting the plot from being worked by the city and the reselecting the plot to be worked by the city at any time in the city screen. Obviously not valid for unworkable plots outside any city's reach, but the frozen status doesn't stop a plot from being re-improved by workers in the field.

    What this means is that, for example, a seed camp that can upgrade to a farm but doesn't require irrigation while the farm does can be placed on a plot that isn't irrigated then when will NOT upgrade to the farm right when farms are unlocked but will only be able to do so when the plot is finally given access to freshwater by irrigation technology allowing a nearby farm to channel water to the plot. If the city was working that non-freshwater accessed seed camp plot when farms became available, the upgrade process would countdown but then freeze when it finds it can't validate the farm for upgrade due to the lack of freshwater access and once canal tech is discovered the player can reset the plot by going into the city screen, deselecting the plot as worked then reselecting it as being worked. Often, with real farms around, that plot will probably be ignored and unworked after the farms are unlocked so it may never hit such a frozen status anyhow. This method to freeze/unfreeze can have a few applicabilities for strategic choices as well...

    The plot hoverover information will show this freeze status in place of the normal round to upgrade countdown or other message that indicates what the improvement will need to do to upgrade. Should be very visible.

  • If a valid improvement upgrade was found it will then check all builds that can create that improvement that the player has tech qualified for. If any of those will not destroy the feature on that plot then it will move on to go ahead and set the plot to have the new improvement upgrade and remove the old improvement.

    Note: THIS aspect of the adjustment allows us to automatically allow one improvement that's validated by a wide set of bonuses to properly select whichever improvement upgrade is appropriate to the type of bonus that it's on by which alternative is validated by that bonus if the primary improvement upgrade is not.

  • However, if it finds that all qualified builds will destroy the feature on the plot then it will select the build that would produce the most production in the process and define that as the production that would be derived from the upgrade. It will then, if an AI player, go ahead and upgrade to the new improvement, send the resulting production to the nearest city, and destroy the feature. Perhaps some AI improvements to futher evaluate this AS a decision with the options the player will be given will eventually be meaningful but for now we assume what Civ has always assumed, that the AI doesn't care about retaining it's features at all.

  • If it's a player, and not an AI, however, it will give you options. The camera will center on the upgrading plot, will shine a light down from the heavens to point out which plot is the subject of the options being given, and send a popup with the options the player has. The main option on that popup is to select, as the AI would default to, the identified improvement upgrade that will destroy the feature on that plot. In the information hoverover on this selection, it will show how much production will be generated based on tech, but not based on any modifiers the city it's heading to may bring to the equation, and will show the city the production would go towards.

  • It can also contain other options if other qualifying AlternativeImprovementUpgradeTypes exist. This means we can offer an alternative upgrade path for the player to take his improvements down if he's very feature conscious. If said alternative doesn't destroy the improvement it will let the player know in the information hover.

  • Then there's always the 'Don't Improve at this time' option (which would be useful if you're waiting for a more eco-friendly option to become valid some techs down the road for example!) This will immediately place an improvement upgrade freeze on the plot as discussed before with all the same mechanisms for unlocking that freeze. Once the player realizes he has more options he can always go in and unlock the freeze on that plot and the next time the popup comes up as the round is passed, he would then be able to select the newly valid improvement upgrade instead.

  • There's also an OK button there but until I get some more playtesting samples I wouldn't just hit that without selecting another option because my last test showed that doing so flat removed the improvement that was there and I've gotta figure out what's up with that.

And that pretty much covers it. This has just been optimized for much faster performance with some caching mechanisms that make the most common upfront evaluations be remembered until a tech that might have changed things has been learned. That should make things work a lot faster here in general.

The xml for improvements now has a lot of work to do to recreate the primary upgrade paths that should now behave in a more fair manner and to provide some alternatives if we want to take advantage of some of the new features of this mechanism. I'm REALLY hoping we can get this taken care of before the end of the freeze because the single most annoying thing in play right now are these broken upgrade chains.

This should solve all of our problems that have currently led to many improvements having no upgrade potentials and forcing workers to come back to selectively patch your lands.


Note: The basic portion of this was added to the SVN about a week ago to help find problems my extensive testing couldn't find and I've now debugged those found since and that's just about to hit the SVN now.


Any questions, comments, concerns? Are we leaving the rebuilding of the upgrade paths to 001 or can we do this as a team effort?
 
I think this should wait until after v35. If need be we can revert the improvements to an earlier version and include them and this for v36.

(We have these amounts set very low by the way - so low that some of the leader trait abilities to reduce them is made moot.)


This is a problem because it needs to upgrade in less time than it takes one worker to build.

In fact this is the big problem with improvements in C2C. Every other Civ IV version and mod has resources upgrade to improvements that can not be built. We don't. This causes problems for the definition of improvements, the ai and the help text.

For example the Cottage->Hamlet->Village->Town->Suburb. Originally you could only build cottages, currently you can build which ever you have the tech for. This completely breaks the purpose of those improvements. It also removes the value on the actions we wanted to give Great Merchants and Great Statesmen which would up grade a number of these.

Currently the ai and hover over look at the first improvement that provides a resource and say that is needed to provide the resource. If that improvement is obsolete then a fort is needed. neither look at the upgrades. This i probably the real reason for forts being built inside the work area of cities, not the culture from Super Forts.
 
I think this should wait until after v35. If need be we can revert the improvements to an earlier version and include them and this for v36.
If we don't address this before v35 then v35 is going to suck royally. It's already an extremely irritating factor that the improvements aren't upgrading, and I mean like not worth playing the game frustrating. IMO it would be worth an added month of freeze time to work on this so long as it GETS DONE. The current status is unacceptable.

I don't mean to bash anyone's work on our attempts to get around the problems that this feature can solve but it really would've been better off if we'd just allowed the rule-breaking upgrades instead of cutting off upgrades entirely.

I find it so necessary in fact that if you would really like for the worker automations to be taken a look at before we release I can take a look at the coding on that while the xml is taken care of on this project. This might buy me enough time to review those automation routines and solve some of the frustrations we're having there.


This is a problem because it needs to upgrade in less time than it takes one worker to build.
Yes, one of the checkpoints we'll need to address as we go through the improvement upgrade chains is definitely giving a bit more time required to upgrade! Any idea on how we should establish some standards for applying these?

In fact this is the big problem with improvements in C2C. Every other Civ IV version and mod has resources upgrade to improvements that can not be built. We don't. This causes problems for the definition of improvements, the ai and the help text.
Since resources don't upgrade I got lost in what you were trying to say here a little. Moving on though I think I get what you're trying to say overall.

For example the Cottage->Hamlet->Village->Town->Suburb. Originally you could only build cottages, currently you can build which ever you have the tech for. This completely breaks the purpose of those improvements. It also removes the value on the actions we wanted to give Great Merchants and Great Statesmen which would up grade a number of these.
The way the current mechanism would work, the best way to address this would be:
1) Give all workers ONLY the build for the Cottage.
2) DEFINE builds for hamlet, village, town, suburb BUT don't give them to any units unless...
3) We can give build definitions for Merchants and Statesmen (perhaps by auto-assigned or even earned promotions - is this something we'll need then? A promo tag to give a build option to a unit? This would be really useful for worker promos to become more meaningful!) that allow for levels over the cottage to be built directly (which could also thus be done to speed up the process.) Even if the build destroyed the unit to do so if you wanted to make sure it wasn't too powerful.

Having builds defined, even if not given to units to use, will be necessary to enable upgrades to take place at this point so that some of the build definitions will be adhered to by the upgrade as it takes place.


Currently the ai and hover over look at the first improvement that provides a resource and say that is needed to provide the resource. If that improvement is obsolete then a fort is needed. neither look at the upgrades. This i probably the real reason for forts being built inside the work area of cities, not the culture from Super Forts.
This is very much a different topic in that it does not involve upgrades but which build it thinks it should be requiring. This display doesn't limit the worker to only that build and it's a deficient display as it doesn't show the alternative(s) but without looking at the automation coding I couldn't say if this has anything to do with what the automated worker will build or not. I CAN say that it's inconsequential to the AI worker's choices which are very aware of all options and evaluating which ones it thinks is most useful at the time (which can change with situations such as an impending war and approaching or nearby massing enemy units etc...)

But again, that's a matter of the initial build choices rather than what upgrades then ensue from there which is what this mechanism works with in a far more advanced way to resolve the problems we've had in setting up improvement upgrade paths.
 
Sorry just a couple of thoughts, it is later than I thought and I am supposed to be having Sunday lunch with friends.

1) Upgrades that remove a feature after you have Mathematics should give you the :hammers: you would get from building the improvement from scratch.

2) The save I gave on the bug forum demonstrates what I mean about the AI not knowing what to build. On the plot there is an apple resource. The first improvement for the apple resource is the Fruit Picker but it is obsolete therefor the hover and the worker ai assume that you need a fort to get the resource. Which is normal since usually if you can see a resource but can't build its improvement it is because you don't have the tech for the improvement yet.

The correct improvement gives you the resource + food + commerce the fort gives you the resource + culture - what is being currently produced in this case by the lumber mill. There is no way it is better to have the fort.
 
Sorry just a couple of thoughts, it is later than I thought and I am supposed to be having Sunday lunch with friends.

1) Upgrades that remove a feature after you have Mathematics should give you the :hammers: you would get from building the improvement from scratch.

2) The save I gave on the bug forum demonstrates what I mean about the AI not knowing what to build. On the plot there is an apple resource. The first improvement for the apple resource is the Fruit Picker but it is obsolete therefor the hover and the worker ai assume that you need a fort to get the resource. Which is normal since usually if you can see a resource but can't build its improvement it is because you don't have the tech for the improvement yet.

The correct improvement gives you the resource + food + commerce the fort gives you the resource + culture - what is being currently produced in this case by the lumber mill. There is no way it is better to have the fort.
1) This advanced mechanism determines the amount of production you'd get from upgrading, in such a way that it will destroy the feature, based on all the same factors you have when you build the improvement. Techs and any city modifiers are taken into account so a clever player may be able to hold off on the upgrade until they have mathematics so as to get some production out of it whereas if they take it immediately they might not get any due to only having Slash n' Burn. Thankfully the hover text will let them know how much production they'll get with their current techs in mind(with only any city based modifiers not being included.)

2) Again, it's the separate issue of the worker automations and display texts which I'm quite happy to make my next project to sort out after I'm done with the promo text duplicates. It might take a bit and force a delay of the release but if we can be working on sorting out our improvement upgrade paths during this time we can make full use of the delay in release.
 
Here's a funny idea...

What if the forts check to see if they're in a city's work radius? And if so, upgrade themselves into the appropriate improvement?

This would effectively solve that Oooh, lets build forts inside the city thing, wouldn't it?

If the fort is outside the city work radius it would upgrade as per normal into the next version of the fort improvement.
 
Here's a funny idea...

What if the forts check to see if they're in a city's work radius? And if so, upgrade themselves into the appropriate improvement?

This would effectively solve that Oooh, lets build forts inside the city thing, wouldn't it?

If the fort is outside the city work radius it would upgrade as per normal into the next version of the fort improvement.

There's probably a bit too much complexity existing in the upgrade mechanism as it is to try to successfully integrate something like that. Besides, the AI sees a lot of value in building forts inside city radii so long as that city is under threat because the ZoCs can really force opponents into having to fight through layers of forts before they even get to the city.

For the player, again, the problem is lurking in the automation coding and I'll be taking a look into it. (Again though I shake my head wondering why anyone would automate their workers!)
 
Here's a funny idea...

What if the forts check to see if they're in a city's work radius? And if so, upgrade themselves into the appropriate improvement?

This would effectively solve that Oooh, lets build forts inside the city thing, wouldn't it?

If the fort is outside the city work radius it would upgrade as per normal into the next version of the fort improvement.

What if you want to have a fort inside the city area and are not automating your workers?
I'd just be irritated if I now and then got a popup asking me if I wanted to upgrade that fort to something else.
Now and then probably being after every time the city pops a population and the fort plot gets used/activated and the freeze removed, before removing the citizen from that plot again.

So I would vote against setting forts to upgrade into non-fort improvements.

Cheers
 
Would it be possible if, instead of techs making improvement upgrades possible, simply speeding them along into something reasonable? So workers can only build the basic ones, but without the necessary tech it would take hundreds of turns for the improvement to upgrade. Say you build a cottage, and it would take hundreds of turns to upgrade it to a hamlet without a certain tech, and then when you get the tech it goes something of the order of 20 times faster, but still you need another tech to get a similar bonus towards the next upgrade and so on.
 
Would it be possible if, instead of techs making improvement upgrades possible, simply speeding them along into something reasonable? So workers can only build the basic ones, but without the necessary tech it would take hundreds of turns for the improvement to upgrade. Say you build a cottage, and it would take hundreds of turns to upgrade it to a hamlet without a certain tech, and then when you get the tech it goes something of the order of 20 times faster, but still you need another tech to get a similar bonus towards the next upgrade and so on.

It think there's a tag on techs to speed up upgrades across the board but nothing for specific upgrades. I don't think it would be well worth the effort to develop though.
 
For the record I had asked a few times long before how the feature retention rule breaking vs. removal should be and got minimal feedback, and the new proposed changes was out ther for a while before actually getting implemented.

that being said, though I am in favor or more ways that give the player tools to make better decisions about improvements & worker builds, so going forward with TB suggestions here, followed up by a later improvements of worker automation AI is a good thing


I think this should wait until after v35. If need be we can revert the improvements to an earlier version and include them and this for v36.
That was a pretty broad set of changes overall, just don't do a direct rollback, it would be easier just to edit the xml of the offending improvements to reassign the upgrade tags. (and recreate the secondary scavenging camp)

In fact this is the big problem with improvements in C2C. Every other Civ IV version and mod has resources upgrade to improvements that can not be built. We don't. This causes problems for the definition of improvements, the AI and the help text.
I also am not sure what you mean by this.

For example the Cottage->Hamlet->Village->Town->Suburb. Originally you could only build cottages, currently you can build which ever you have the tech for. This completely breaks the purpose of those improvements. It also removes the value on the actions we wanted to give Great Merchants and Great Statesmen which would up grade a number of these.
Originally weren't these the ONLY thing that upgraded at all?

I want to point out that, it only breaks "the purpose of those improvements" if you agree that that is the purpose of those improvements. I don't agree with that purpose so I don't think it breaks their purpose. I believe their original purpose was nothing more than an improvement which focuses on providing commerce rather than food and production. the fact that they upgraded was just a weird thing they did that the other improvements didn't (breaking the general pattern of behavior) which kind of made them annoying.

What I wanted to do instead, was in fact I want to give them a completely new and expanded purpose. I want to tie the presences of the town chain improvements (by quantity in city radii) to the quantity of free specialists you get for the various village council like buildings. I want the purpose of town chain improvements to be to gain free specialists, culture and commerce at the expense of using those plots for production and food.

Note that tieing them to providing free specialists means adjusted and re-balancing all buildings which grant free specialists. This is something I wanted to do in a Phase II for general improvements changes but have yet to have the free time to start on.

As for Great Merchants and Great Statesmens, it can't break something that isn't in place yet. There is room to chance how those Great People function. If you notice one of the things I added was a monetary cost the final iCost value can be tweaked for balance, but one of the things those Great People could do is let you upgrade/build those improvements for free.

Part of adding an iCost to a larger number of improvements was to eat up some of the excessive gold gain and make the trade off for those more valuable improvements a more strategic decision. Note TB, this means yu need to add iCost evaluation to yuor generic CanIUpgradeIntoThis checks. (Does the player have enough gold to pay for the upgradde?)


Currently the ai and hover over look at the first improvement that provides a resource and say that is needed to provide the resource. If that improvement is obsolete then a fort is needed. neither look at the upgrades. This i probably the real reason for forts being built inside the work area of cities, not the culture from Super Forts.

Fruit Gatherer is the first stage improvement, not Fruit Picker, but I don't know if that matters. In any case, by the time Fruit Picker is obsolete, Orchard is available. Why is the AI skipping evaluating the Orchard build? Or is it just deciding a fort is more valuable than an Orchard? If "an improvement is obsolete" should not even be an evaluation that is being made, other than to tell the AI to skip it and evaluate the next non-obsolete improvement. The AI should not decide to build a fort because an improvement is obsolete, it should decide to build it based on entirely unrelated factors.
 
Part of adding an iCost to a larger number of improvements was to eat up some of the excessive gold gain and make the trade off for those more valuable improvements a more strategic decision. Note TB, this means yu need to add iCost evaluation to yuor generic CanIUpgradeIntoThis checks. (Does the player have enough gold to pay for the upgradde?)

Great soon I wont be able to play this mod at all. I almost never have enough money to spend on building improvements. Why this constant attempt to reduce the money when there is too little around already?

Fruit Gatherer is the first stage improvement, not Fruit Picker, but I don't know if that matters. In any case, by the time Fruit Picker is obsolete, Orchard is available. Why is the AI skipping evaluating the Orchard build? Or is it just deciding a fort is more valuable than an Orchard? If "an improvement is obsolete" should not even be an evaluation that is being made, other than to tell the AI to skip it and evaluate the next non-obsolete improvement. The AI should not decide to build a fort because an improvement is obsolete, it should decide to build it based on entirely unrelated factors.

Probably it asks "what improvement do I need for this resource?" finds the picker sees that it can't be built so builds the fort which is the default for providing a resource. IE it does not know about improvements that provide resources upgrading.
 
I really like the new Town-line idea.
also, I still think railroads/Highways and above should be MUCH more expensive to build. Having a railroad system is a huge benefit and normally costs quite a lot. In civ you can spam them without problems.
IIRC the strongest (and only) counter argument was that auto-workers build them a lot, causing the treasury to go down quickly. But we could have new missions for these workers:
Only connect cites
Build Paved Roads/Railroads/Highway/Maglev/Jumplane everywhere to connect cities/resources.
If each of these roads had it's one mission you could choose which type of road you want to spam and still semi-manually ("build road to...") connect important locations with better routes.
And Hydro, we also talked about adding new road types, right? Maybe Sparth could retexture them when missing graphic is the most problematic thing?
 
I'm tickled pink to see you join the conversation 010! I was hoping you hadn't given up on us in frustration.
For the record I had asked a few times long before how the feature retention rule breaking vs. removal should be and got minimal feedback, and the new proposed changes was out ther for a while before actually getting implemented.
I realize this fully and in fact, I'm thankful we TRIED the method you implemented. Sometimes even an epically annoying modification can still be extremely helpful to the long term evolution of the mod. I mean, if it hadn't been for experiencing how frustrating it is and needing a solution that would work for both players that automate and those that don't, this mechanism wouldn't have come to fruition (and tbh I think it's not only very cool but will lead to some neat new things we can do as well. - of course, I'm biased a bit ;) ) Anyhow, my point is you at least tried to solve problems we'd all had for a long time and even though it was done in a manner that wasn't very fun to play it still gave impetus for forward progress in that region which had long lay dormant. So I'm not feeling any sense of criticism for your efforts, just the results which I think none of us could've predicted were as frustrating as they ended up being.

You really, in this, highlighted what needed to be considered for coding mechanism adjustments - gave a perfect list of 'issues to resolve'.

that being said, though I am in favor or more ways that give the player tools to make better decisions about improvements & worker builds, so going forward with TB suggestions here, followed up by a later improvements of worker automation AI is a good thing
I'm glad to hear you're onboard with this because I think you're probably the most qualified, currently, to work the xml and plan out how to interact with the new mechanisms. I may understand the mechanism but you have the clearest understanding of the current (and recent) upgrade structures. If we're to get this in, even in a rudimentary fashion, before the release I figured we'd need your help!

AND, I'm pleased to inform that you should take a look at what went onto the SVN yesterday:
I said:
  • Sorted out the display routine for unworked bonuses on the plot hoverover
  • Reduced AI willingness to build forts on bonuses within borders by half
  • Removed the first attempts to build improvements on unworked bonuses by automated workers
  • Added a BUG option under the Automation Page to make workers using the infrastructure build automation refuse to build improvements at all and limit them to only roads
This pretty much should cover our needs in the automation department. I found that the AI routines actually do define what workers will want to do (with some small differences) when they are automated - there's a lot of shared coding there anyhow. So at this point workers should be much more reluctant to build forts inside a city working radius. When workers are automated for infrastructure they'll also have much more focus on roads until all cities are connected and roads lead to all bonuses, THEN they'll work bonuses but only if the BUG option is off that limits infrastructure automated workers to roads ONLY. (This defaults to off and is located on the automation page of the bug options screen.)

I'm open to suggestions on further adjustments having just reviewed that coding. Workers MAY still consider building forts within city radii but only if the city is under SEVERE threat.




That was a pretty broad set of changes overall, just don't do a direct rollback, it would be easier just to edit the xml of the offending improvements to reassign the upgrade tags. (and recreate the secondary scavenging camp)
Can you help with this then? You're probably the only one here who has a bead on what needs to be done. If I did this I'd need to research this significantly to get a list drawn up of the adjustments you just summarized in this paragraph.



Originally weren't these the ONLY thing that upgraded at all?
Yes...


I want to point out that, it only breaks "the purpose of those improvements" if you agree that that is the purpose of those improvements. I don't agree with that purpose so I don't think it breaks their purpose. I believe their original purpose was nothing more than an improvement which focuses on providing commerce rather than food and production. the fact that they upgraded was just a weird thing they did that the other improvements didn't (breaking the general pattern of behavior) which kind of made them annoying.
I've gotta clarify what I see as the intent behind this from Firaxis's point of view.
1) The town line was supposed to be lucrative and powerful but requiring investment of time to pay off. At first they were quite poor in comparison to other improvements you could build there but once they finally got 'up to speed' they were very strong, particularly if you had a financial leader and could get bonus commerce on each plot because they got over the 5 you needed to reach to get that... the only other way was either on special naval plots, strong commerce providing resources, or windmills on the right terrain. Of course, later with BtS a financial leader of the Portuguese with a colossus could get a totally sick amount of gold with every coastal plot by this added commerce per plot with enough base commerce being produced factor but that's somewhat off topic...

The thing about that investment was that if you found out later you had to get rid of the town to get a resource underneath it was supposed to be a significant frustration (like when oil would popup under your town that just got it's 5th commerce!) And if a nuke or earthquake wiped out the town it would be time to think of putting something else there unless you were really desperate for that city to produce as much commerce as it could.

Our towns are a bit too weak in the C2C scheme of value per commerce but the concept should probably still be captured on these. (Maybe 2 Commerce per level would be better, or even more levels.)

2)Towns grew as they did in part to represent the growth of the non-tracked population in that area. They're supposed to represent population areas of a sort and as a result are very much supposed to grow rather slowly.

3)Eventual plans with traits do slate a line of traits to assist the player in improvement upgrade speeds so if we make them upgrade too quickly it will remove the value of this almost entirely.


Anyhow... point being they weren't just weird behaviors but very strategically considered from a number of angles and unfortunately C2C has pretty much obsoleted them due to the power of farms and mines being so much greater. It would be nice to see them returned to some of their original glory and strategy.


What I wanted to do instead, was in fact I want to give them a completely new and expanded purpose. I want to tie the presences of the town chain improvements (by quantity in city radii) to the quantity of free specialists you get for the various village council like buildings. I want the purpose of town chain improvements to be to gain free specialists, culture and commerce at the expense of using those plots for production and food.
Culture IS commerce or a part of what commerce can obtain, so I'm not sure I'm in agreement with giving them direct commerce. But I do like the idea of free specialists from them... I'm just wondering how you see it working to tie the administration buildings to them? And would it not be possible to include both the original Vanilla Civ4 behaviors of gradually upgrading villages in with this concept you're proposing? Let's talk this out and I may be able to help with some new tags to let this work (if needbe - there's sometimes some surprising agility with the tags we have if we think outside the box some.)


Note that tieing them to providing free specialists means adjusted and re-balancing all buildings which grant free specialists. This is something I wanted to do in a Phase II for general improvements changes but have yet to have the free time to start on.
Well again... please discuss the concept in greater depth if you would.


As for Great Merchants and Great Statesmens, it can't break something that isn't in place yet. There is room to chance how those Great People function. If you notice one of the things I added was a monetary cost the final iCost value can be tweaked for balance, but one of the things those Great People could do is let you upgrade/build those improvements for free.

Part of adding an iCost to a larger number of improvements was to eat up some of the excessive gold gain and make the trade off for those more valuable improvements a more strategic decision. Note TB, this means yu need to add iCost evaluation to yuor generic CanIUpgradeIntoThis checks. (Does the player have enough gold to pay for the upgradde?)
At the moment, when it upgrades it doesn't charge that iCost. (It never has on upgrading.) I can certainly change that and yes, adjust it so that not having enough gold can become a reason to 'freeze' the upgrade. Such a check would be very early and would stop the upgrade process rather than prompt it to look for other valid upgrades that you COULD afford because it would be a little unfair to default to a less valuable upgrade just because you can't afford the primary one.



Fruit Gatherer is the first stage improvement, not Fruit Picker, but I don't know if that matters. In any case, by the time Fruit Picker is obsolete, Orchard is available. Why is the AI skipping evaluating the Orchard build? Or is it just deciding a fort is more valuable than an Orchard? If "an improvement is obsolete" should not even be an evaluation that is being made, other than to tell the AI to skip it and evaluate the next non-obsolete improvement. The AI should not decide to build a fort because an improvement is obsolete, it should decide to build it based on entirely unrelated factors.
I'm a little lost here in what you're saying. Are you pointing out that the tech seams between Gatherer, Picker and Orchard need to be better positioned? (Which they should be IMO)

Or are you just expressing frustration with AI build selections? The fort could've been perceived as more valuable due to the value of the fort being more productive in a sense (for its own values) than it is for the Orchard - over time and due to tech based improvements to their form, forts do seem to gain more in their evaluation values than most improvements as time goes on.

However, the halving of Fort valuations in comparison to yield enhancements on the plot from the more standard improvements that I just did should really put forts back in their place when the plot can be worked by a city and ONLY when the city is REALLY threatened would it consider the fort more valuable.

Obviously if this continues to be problematic then we'll take another look at the eval process and the values on the improvements to see if it can be brought into something more balanced to the intention of the AI.

But in halving it I took a broadsword to the problem that may have only needed a flyswatter since the last time I evaluated the valuation comparisons they were nearly neck and neck between fort and standard improvements and the goal was to get the threat level to tip the balance.

I think though that later in the game the fort gained more value at a rate than the standard improvements did and since I'd not evaluated more than one game at various tech stages we had some deeply problematic spots where forts started to be more valuable despite being under no threat. At the moment, I've made it so that threat should not just 'tip' a balance but have to push quite hard to get a very undervalued fort to outweigh the value of a standard improvement.





Anyhow... I'd be very interested to see the upgrade chains expressed in their proper orders such as:
Fruit Gatherer->Fruit Picker->Orchard->?
etc...
 
Great soon I wont be able to play this mod at all. I almost never have enough money to spend on building improvements. Why this constant attempt to reduce the money when there is too little around already?
Hmm... I haven't been having money problems... been finding the balance about right but only a little weighted towards easy perhaps. Civic choices have a LOT to do with that of course, as does capturing religious capitals and their shrines etc...

Probably it asks "what improvement do I need for this resource?" finds the picker sees that it can't be built so builds the fort which is the default for providing a resource. IE it does not know about improvements that provide resources upgrading.
It will be able to determine this properly now.

If Improvement A gives access to X, Y and Z bonuses and upgrades primarily to Improvement B which only gives access to X but has an AlternativeImprovementUpgradeType as Improvement C which gives access to Y and Z, when Improvement A on bonus Z upgrades it will upgrade to Improvement B as opposed to Improvement A.

That's part of what the new dynamic has introduced is the ability to provide this kind of upgrade pathing.

I really like the new Town-line idea.
also, I still think railroads/Highways and above should be MUCH more expensive to build. Having a railroad system is a huge benefit and normally costs quite a lot. In civ you can spam them without problems.
I suppose this is because it's expected that rails should go everywhere a road would go. I'd like to eventually make rails work more like air transport giving access to quick transport between cities (and possibly forts) that are rail-linked. Then give them a separate route layer and make them not modify movement otherwise except perhaps for some special units that move specifically ON rails only. Another 'eventual' project.

Overall I've enjoyed the increased costs to build them they already have - no idea if we should increase them or not because its been a while since I've played that stage of the game.

IIRC the strongest (and only) counter argument was that auto-workers build them a lot, causing the treasury to go down quickly. But we could have new missions for these workers:
Only connect cites
Build Paved Roads/Railroads/Highway/Maglev/Jumplane everywhere to connect cities/resources.
If each of these roads had it's one mission you could choose which type of road you want to spam and still semi-manually ("build road to...") connect important locations with better routes.
And Hydro, we also talked about adding new road types, right? Maybe Sparth could retexture them when missing graphic is the most problematic thing?
Interesting... new bug options could be introduced to further tweak the infrastructure build routine quite easily. At the moment, the infrastructure automation will:
1) Build connecting routes to all bonuses

2) Then connect routes between all cities

3) Then if any bonuses don't have the most optimal improvements or any improvement, they'll go for them provided that the new bug option to turn off the non-route building improvements is still defaulted to the off position

4) Then fill in all the gaps with roads

And then stop there and return to cities to await the potential for any of the above needs to re-emerge.
 
They SHOULD do but they don't. Remember the addicting Future Timeline Page I posted? Every now and then, there are things like "CHina builds a Rail Network to XX", "Rail network of XY expanded to...", "Afrika begins construction of XYZ Rail Network".
Railroads (and later Maglev or Supersonic / Hypersonic Rails) are really important yet very expensive.
C2C doesn't reflect this very good because there are quite a lot roads. In vanilla, going from routes to railroads was a BIG step. Now going from Paved to Railroads is still quite big. But Railroads to Electric Railroads and even Maglev is not a very big step so (especially electric railroads) are barely worth building them. And Jumplanes need a complete rework since 40 MP isn't that much if you'd actually teleport your units...

Maybe routes can not only increase movement of units, but also manipulate traderoutes income?


Ah good to know! So you could tell them with a simple code that they still should do this, use the best route only for city-city connections and else only use roads?
 
They SHOULD do but they don't. Remember the addicting Future Timeline Page I posted? Every now and then, there are things like "CHina builds a Rail Network to XX", "Rail network of XY expanded to...", "Afrika begins construction of XYZ Rail Network".
Railroads (and later Maglev or Supersonic / Hypersonic Rails) are really important yet very expensive.
C2C doesn't reflect this very good because there are quite a lot roads. In vanilla, going from routes to railroads was a BIG step. Now going from Paved to Railroads is still quite big. But Railroads to Electric Railroads and even Maglev is not a very big step so (especially electric railroads) are barely worth building them. And Jumplanes need a complete rework since 40 MP isn't that much if you'd actually teleport your units...
Yeah, agreed on most points. But again it'll take a lot more devel.

Maybe routes can not only increase movement of units, but also manipulate traderoutes income?
AIAndy was working on something that could probably achieve this but that's certainly not a simple thing and we've got it pretty much covered by the route style buildings for cities though that's not the perfect solution you're looking for I know.




Ah good to know! So you could tell them with a simple code that they still should do this, use the best route only for city-city connections and else only use roads?
I wouldn't say SIMPLE code at all actually. That'd be a little tough as right now it only considers one route, the best route, worth using and would have to somehow evaluate costs into the factor - the math would certainly be interesting to get right. There might be an easier way to achieve this but I can't promise an easy fix to this any time immediately.
 
Can you help with this then? You're probably the only one here who has a bead on what needs to be done. If I did this I'd need to research this significantly to get a list drawn up of the adjustments you just summarized in this paragraph.

See the improvement changes table here that I made when this was all put in. I believe it is still accurate.

You would need to to the following to restore broken upgrade changes:
(this is assuming your changes are NOT going in, if they are then it will be something different)
Alter the Scavenging Camp to exclude livestock (nomadic herd/pasture) bonuses. Make this improvement upgrade into hunting camp.

Re-create the duplicate SCAVENGING_CAMP2, and set its bonuses as the livestock ones, and make it upgrade into nomadic herd.

Alter the grape picking camp to upgrade into the winery. (this chain was severed because winery removes features) Restoring will restore the upgrade and also the 'keeps the feature on upgrade' bug for wineries.

Alter the plant picking camp to upgrade into the plantation. (this chain was severed because plantation removes features) Restoring will restore the upgrade and also the 'keeps the feature on upgrade' bug for plantations.

Alter the special stone workshop to upgrade into the quarry. (this chain was severed because quarries removes features) Restoring will restore the upgrade and also the 'keeps the feature on upgrade' bug for quarries.

Alter the stone tools workshop to upgrade into the mine. (this chain was severed because mines (at the time) removes features (do they still?)) Restoring will restore the upgrade and also the 'keeps the feature on upgrade' bug for mines.

Previously, I do not believe that shaft mines ever upgraded into modern mines, or perhaps it was modern mines that never upgrade into core mines. I can't recall which but I know there was a break in the upgrade change already in existence past shafts mines.

At present modern mines upgrade into core mines. Shaft mines currently don't upgrade because, if a shaft mine it is not on a mountain, upgrading to a modern mine is (intended to be) a better choice. If it on a mountain, mountain mine is (intended to be) a better choice. (Modern mines and core mines look really awful graphically balanced precariously on top of the summit of a peak defying gravity.)

For quick upgrade functionality though, one could just alter shaft mines to upgrade into modern mines.

And that's it. Those were the only broken upgrade chains from my changes. If there are other ones, then they were probably broken previously or I didn't notice them.


I've gotta clarify what I see as the intent behind this from Firaxis's point of view.
1) The town line was supposed to be lucrative and powerful but requiring investment of time to pay off. At first they were quite poor in comparison to other improvements you could build there but once they finally got 'up to speed' they were very strong, particularly if you had a financial leader and could get bonus commerce on each plot because they got over the 5 you needed to reach to get that... the only other way was either on special naval plots, strong commerce providing resources, or windmills on the right terrain. Of course, later with BtS a financial leader of the Portuguese with a colossus could get a totally sick amount of gold with every coastal plot by this added commerce per plot with enough base commerce being produced factor but that's somewhat off topic...

The thing about that investment was that if you found out later you had to get rid of the town to get a resource underneath it was supposed to be a significant frustration (like when oil would popup under your town that just got it's 5th commerce!) And if a nuke or earthquake wiped out the town it would be time to think of putting something else there unless you were really desperate for that city to produce as much commerce as it could.

Our towns are a bit too weak in the C2C scheme of value per commerce but the concept should probably still be captured on these. (Maybe 2 Commerce per level would be better, or even more levels.)

2)Towns grew as they did in part to represent the growth of the non-tracked population in that area. They're supposed to represent population areas of a sort and as a result are very much supposed to grow rather slowly.

3)Eventual plans with traits do slate a line of traits to assist the player in improvement upgrade speeds so if we make them upgrade too quickly it will remove the value of this almost entirely.


Anyhow... point being they weren't just weird behaviors but very strategically considered from a number of angles and unfortunately C2C has pretty much obsoleted them due to the power of farms and mines being so much greater. It would be nice to see them returned to some of their original glory and strategy.

Overall point is, the Vanilla Town strategy doesn't apply any more, too much has changed in the mod. Don't rely on what they used to do as a limitation, instead lets decide how they best should fit the mod in its current form.

Culture IS commerce or a part of what commerce can obtain, so I'm not sure I'm in agreement with giving them direct commerce. But I do like the idea of free specialists from them... I'm just wondering how you see it working to tie the administration buildings to them? And would it not be possible to include both the original Vanilla Civ4 behaviors of gradually upgrading villages in with this concept you're proposing? Let's talk this out and I may be able to help with some new tags to let this work (if needbe - there's sometimes some surprising agility with the tags we have if we think outside the box some.)

Culture gain was meant to represent the fact that there are people there and thus such a population will natural produce and extend your own culture. Furthermore it reduces the likely hood of losing valuable town plots in a plot culture war.

The town chain commerce was boosted I believe, they are not as weak as they were before. Providing free specialists makes them stronger and even more valuable.

Well again... please discuss the concept in greater depth if you would.

IMO free specialists should be a bit rarer to obtain. I would need to total up all the buildings and/or wonders that give them to see how many can accumulate. At present the main council type buildings provide a fixed number of specialists. I would want to change these to require the right town chain improvement in the CV (subject to debate) to be built AND to receive a variable number of free specialist based on the number of town plots in the CV.

Overall, I'd like to see town plots as the primary provider of free specialists to a city. This makes them important, and make more of a strategic decision in choosing what kind of plots to improve with what. Do you want that extra couple specialist for an eventual suburb or all the food produced by a vertical farm? (and so on)

This doesn't mean other buildings wont still grant specialists, but to offset the gain from town plots, they will inevitably need to be reduced, or possible converted from free specialists into specific specialist slots.

Another idea, in line with the free specialists, was perhaps a free engineer with the factory plots and/or making some factory-type buildings require factory chain plots in the CV.

I'm a little lost here in what you're saying. Are you pointing out that the tech seams between Gatherer, Picker and Orchard need to be better positioned? (Which they should be IMO)

Or are you just expressing frustration with AI build selections? The fort could've been perceived as more valuable due to the value of the fort being more productive in a sense (for its own values) than it is for the Orchard - over time and due to tech based improvements to their form, forts do seem to gain more in their evaluation values than most improvements as time goes on.

However, the halving of Fort valuations in comparison to yield enhancements on the plot from the more standard improvements that I just did should really put forts back in their place when the plot can be worked by a city and ONLY when the city is REALLY threatened would it consider the fort more valuable.

Obviously if this continues to be problematic then we'll take another look at the eval process and the values on the improvements to see if it can be brought into something more balanced to the intention of the AI.

But in halving it I took a broadsword to the problem that may have only needed a flyswatter since the last time I evaluated the valuation comparisons they were nearly neck and neck between fort and standard improvements and the goal was to get the threat level to tip the balance.

I think though that later in the game the fort gained more value at a rate than the standard improvements did and since I'd not evaluated more than one game at various tech stages we had some deeply problematic spots where forts started to be more valuable despite being under no threat. At the moment, I've made it so that threat should not just 'tip' a balance but have to push quite hard to get a very undervalued fort to outweigh the value of a standard improvement.

I wasn't really expressing an opinion so much as asking how it works currently. Prior phrasing from you or DH made it sound like finding an obsolete improvement that it could not build was a deciding factor in building a fort, which didn't make any sense to me.

Anyhow... I'd be very interested to see the upgrade chains expressed in their proper orders such as:
Fruit Gatherer->Fruit Picker->Orchard->?
etc...

As four your new tags assuming we have primary and secondaries

Refer back to the table link earlier as needed

I am only citing thing which would have a need for both a primary and secondary improvement using your proposed new tags

Scavenging Camp->Hunting Camp (primary), Nomadic Herd (secondary)
Primary based on "wild" resource bonuses, and secondary based on "domesticated" resource bonuses.

Hunting Preserve->NONE (primary), Wildlife Sanctuary (secondary)
Secondary If and only if the bonus it is sitting on has gone obsolete.

Eliminate Grape Gatherer and Grape Picking Camp, add Grapes to Fruit Gather and Fruit Picking Camp.
Fruit Picking Camp->Orchard (primary), Winery (secondary)
Choose Winery if and only if the bonus it is sitting on are grapes.

Eliminate Special Stone Workshop, add 'stone' (quarry) resources to Stone Tools Workshop and just call it a 'Stone Workshop'
Stone Workshop->Quarry (primary), Mine (secondary)
Quarry only if it is sitting on the 'quarry' resources, otherwise choose Mine.

Explicitly prevent Mines and Quarries from being built on Peaks, even if the peak contains a bonus that makes building them there valid. Thus you can only gain resources off peaks via the mountain mine at mountaineering. (which coincidentally is the first time a worker should be able to move onto a peak to build anything anyway)
 
I'll have to really take some time to review everything you've stated here of course but it should be very helpful so thanks!

So you understand, the first post of this thread is not a proposition - it's in play. Just isn't doing much since we've worked our way around the problems in the xml still. So your second portion of suggested tweaks will be very beneficial. So far as I glanced through it all it's a very good plan.


Thing about the old way of towns upgrading... I really LIKED that stuff! Didn't find it weird or awkward... found it meaningful and deeply strategic. I certainly don't mind blending in some free specialists this way though. At the moment, free specialists represent the best reason to enhance your education property though that property needs a little counterbalancing still I think.
 
Top Bottom