Specializing cities

A good solution would be to increase the price of each specialization depending on how many you already have, though I'm not sure if that's easily doable in xml?

Some units costs more for each same unit already in-game.
 
The consumables mod/idea means that for some bonuses you generate an amount and then use it. Initially they can only be used in the city they are made and any not used are lost or maybe stored in a warehouse of some sort. Later your cities get to share around these consumables with any left over being available for trade.

It is fairly easy to set up a prototype of such a system. Platyping has a version which works at the nation level. The AI would need to be taught/coded to handle trade between nations.

Platyping's version is more aimed at requiring for example enough copper ingots to make the arms and armour for a unit than internal use eg hats or shoes.
 
The consumables mod/idea means that for some bonuses you generate an amount and then use it. Initially they can only be used in the city they are made and any not used are lost or maybe stored in a warehouse of some sort. Later your cities get to share around these consumables with any left over being available for trade.

It is fairly easy to set up a prototype of such a system. Platyping has a version which works at the nation level. The AI would need to be taught/coded to handle trade between nations.

Platyping's version is more aimed at requiring for example enough copper ingots to make the arms and armour for a unit than internal use eg hats or shoes.

I think that making all resources like shoes consumables is horrible horrible micromanagement with no improvements to fun or strategy whatsoever. The game is already long enough as it is.
 
I never understood why "Shoes" or "Clothes" were resources in the first place. Just build a dressmaker (or what-have-you), get some commerce or culture out of it and be done with it.

Otherwise, I agree with Noriad.
 
I never understood why "Shoes" or "Clothes" were resources in the first place. Just build a dressmaker (or what-have-you), get some commerce or culture out of it and be done with it.

Otherwise, I agree with Noriad.


We have indeed lots of ressources that for me are completely useless. Clothes, Shoes, Pencils, Synthetic Chloroplasts.... As you said, you build the manufacturer once and then you can ignore them for the rest of your game. Resources that depend on something special (IE Terrains, Features or map resources) are quite fun, as well as resources in the earlier game. But in the modern era, it is sooooo unlikely to have a city which is not connected to your trade network, and most resources are manufactured and can be manufactured by everyone in almost every city.

I think the reason they are in is because of the game series Anno. There you have lots of resources and production chains. It works great there because most of the game is managing production, consumption and shipping of various goods. In C2C however... it's kinda boring. If the resource volume is to far away, we could use some new corporations to give them some more value.

Unless I misunderstood you, you can change your specialization: sell your specialization (ctrl-A) and build another. Of course the penalty is that all the buildings unlocked by the deleted specialty are deactivated (unless you switch again later).

Ah yeah ok. But selling a specialization is kinda... odd. Also, MANY people don't even know that you can sell buildings with ctrl-A.


The objective on the opposite is to make early trading more relevant - in my experience I was able to manufacture everything and only raw material/resources were relevant to trade.
I don't know about the "resource volume" mod, but it looks like it'd be able to achieve something close to what I wanted in a better way - if it's going to be implemented at some point it would probably work better.

Ok than I misunderstood something. How can it make trading more relevant if you don't allow your resources to be traded on a national / international level?

If we'd add more prereqs for certain production buildings on the other hand, they could be rarer and therefore you had to trade. I'd limit salt to the map resource only for example.
 
Ah yeah ok. But selling a specialization is kinda... odd. Also, MANY people don't even know that you can sell buildings with ctrl-A.

The AI doesn't do it, so it's essentially a cheat.
 
We have indeed lots of ressources that for me are completely useless.
Unless we can give a resource a well defined purpose it should imo be removed; I agree that it's a bit overkill at the moment.

Ah yeah ok. But selling a specialization is kinda... odd. Also, MANY people don't even know that you can sell buildings with ctrl-A.

I don't think the AI even know how to use this function, if we can't teach them to use it and add a button for it in the city screen, then perhaps the judge unit can be given the ability (mission) to remove certain building groups with a specific negative impact through different "reforms". If an "actual" consequence calculation could be done for this mission perhaps the AI can easily be thought (or already knows) how to use them.

I think it would be hard to teach the AI that one building excludes the possibility to build other ones. I would rather see more complex building requirements, and some rethinking of building, terrain and improvements stats to enhance city uniqueness.
 
Really? The AI sells off buildings and suchlike it doesn't need or that are obsolete? That's the first I've heard of it.
 
I have no idea if it still does in BtS3.19 but it did in earlier versions. Which is why the mod was made and why Zappara and I included it in RoM.

It may have only do it when it conquered cities but buildings with 100% chance of capture would no longer be there when you retook the city.
 
we could use some new corporations to give them some more value.
That was always my feeling on resolving the usefulness of those. But all attempts to restructure corps have ended in apparent exhaustion of the effort apparently.
 
Ok than I misunderstood something. How can it make trading more relevant if you don't allow your resources to be traded on a national / international level?

If we'd add more prereqs for certain production buildings on the other hand, they could be rarer and therefore you had to trade. I'd limit salt to the map resource only for example.

In the Prehistorical/early Ancient era you can't trade anything anyway; crafting buildings would not provide resources but give local bonuses. Ideally there would be a way to remove those bonuses once you have a given resource in your trade network that gives the same/more benefits.

Later on, the crafting buildings would be quite expensive and/or constrained by specializations/terrain/local resources so that you can't build each one of them. But a given crafting building might produce, say, 2 resources, so you have one to trade with other civs in exchange for another resource. Or it could only produce 1 resource but building another would be at a reduced cost so you'd better do that and trade rather than trying to build each different crafting building.

Then, much later on, the crafting buildings are replaced by (even more expensive) factories that give, say, 6 resources so you can trade them with about anybody.

Of course, this would work well only if the main purpose of the crafting/manufacturing buildings is to provide resources and are not really interesting to build otherwise. An idea I have would be that all those buildings would no longer provide :gold: or anything (though they might have :sick: or :mad: effects), but the resources would - for example by giving bonuses to the houses autobuilt.

But that's a long way to go and not something I'd do right now ;)




Now, for a first feedback on a game with Specialized cities (along with the "Early Tweaks" modmod, which among others increases building cost).

Overall it works as intended, though a few buildings should be a bit reallocated for balance.
AI does readily build Specializations. However, there's not much variation in what it chooses. Until now every AI civ chose Gathering for their main city, except two that chose Farming, none selected Military. New cities seem to also strongly favor Gathering.
For their second specialization, every city chose Trading. Putting Education later is probably one of the reason, though I don't know why it never chose Craftsmanship - maybe because it has no inherent bonus? But then some civs took Farming which was in the same case...
I'll probably have to see how it goes further into the game with more cities, but I fear that the AI will too often chose the same specializations...


A few questions to the experienced modders around here:

- Regarding AI behavior, how does it chose its constructions in each city? Would it be possible to tweak the specializations so that it tries to diversify its choices? Or at the very least make it random so that it has different mix of specializations?

- Another way to implement the specializations that I'd find better than the current one would be to allow cities to build (or chose) any specialization at pop level 1, 3, 6, 10, 15, etc.
Of course some specializations would require a minimum pop level, but let's say you have a city with Gathering, you'd still be able to pick Farming at level 3 - but not earlier and it would prevent you from chosing another "level 3 or higher" specialization at that level. This would make the whole system more dynamic and less constraining while still acheving the objectives I had (diversify cities and limit building clutter).

I only see a very cumbersome way to implement this mechanism - duplicate every specialization for each pop level and have the building require the specialization from either pop level. I'm sure there's a better way to do it - for example, every time your city reaches a new specialization threshold, you get a popup similar to the one with the traits from developing leaders allowing you to chose the specialization you want. Do you have directions on how to do that? Would it include some python? I'd be interested to know how it was done for developing leaders if some code can be recycled from there. And of course, if you see another way to implement that (with some combination of prereq/prereqnot involving both buildings and pop?), I'm all ears ;)
 
In the Prehistorical/early Ancient era you can't trade anything anyway; crafting buildings would not provide resources but give local bonuses.

Your statement is historically incorrect. Tools and certain raw materials were transported by primitive people over large distances.

For example, in Castel-Merle (France) there was a large beads industry 33,000 years ago.
Raw materials were moved there from various parts of Europe (e.g. mammoth ivory from Germany, seashells from the atlantic and mediterranian coast, and soapstone from the Pyrenees)

Also, there was a division of labour; on some sites in Castel-Merle, the raw materials were turned into beads, on other sites, a hole was drilled in the beads, and on other sites these beads were sown into clothes.

https://www.youtube.com/watch?v=drCzWw14qOA&feature=youtu.be&t=20m30s

Also the nomadic nature of pre-sedentary lifestyle people clashes a bit with the notion of localized settlements. People would move from place to place, sometimes due to seasonal changes, and would of course take their stuff with them.
 
A few questions to the experienced modders around here:

- Regarding AI behavior, how does it chose its constructions in each city? Would it be possible to tweak the specializations so that it tries to diversify its choices? Or at the very least make it random so that it has different mix of specializations?

As far as I know it looks at the building and considers
  • what is it's immediate effect
  • what units does it give access to
  • what buildings does it give access to
    • what are their effects
    • what units then become available
    • what buildings become available
      • and so on

The traits of the nation affects the choice.

AIWeight could but should not be used as a sledgehammer to influence the AI.

FLAVOR influences the choice but I don't understand how.

This means that most likely the same specialization will be chosen by a given nation for all its cities.
 
I think that making all resources like shoes consumables is horrible horrible micromanagement with no improvements to fun or strategy whatsoever. The game is already long enough as it is.

I think you need a heart to heart talk with Hydromancerx, "The Modder" of Buildings and Building chains. Among other things. I'm sensing tunnelvision here.

JosEPh :D
 
I think you need a heart to heart talk with Hydromancerx, "The Modder" of Buildings and Building chains. Among other things. I'm sensing tunnelvision here.

I'm rather getting the impression that Hydro's oeuvre has become a sacred cow in C2C circles, so any shortcomings it may have end up directing disproportionately more time than they should, compared to other flaws that may need fixing instead.
 
So, after some pondering, tweaking and bug-fixing (thanks alberts2!), here's a brand new, better and hopefully more fun version of SpecializedCities!

(sorry about the lack of :gold:, :hammers: etc. icons, there's a limit per message :( )

How does it work?

There are now 26 specializations grouped into 4 "tiers" (see below for the full list). Each specialization (called "Focus" because it's shorter ;) ) brings a few bonuses/penalties but more importantly unlocks a wide range of buildings that formerly had no prerequisite. Think of "focus" as specialized districts in/around the city - a mining district, a craftsmen district, a farming district, etc.
Some buildings require several different focuses to be present in the city. This is true for many wonders (especially religious wonders, which usually require 3 different focuses), so that the civ leading in tech won't be as easily able to build them all.
Unlike in the previous version, any city is able to build any number of specializations. So, what's the catch?

* The first catch is the opportunity loss.
You simply have to invest some hammers to "build" a focus, which could have been otherwise invested into something else.

* The second catch is the increased cost of expansion.
Think of it as, if you build new districts, you'll start filling easy spots, then each additional one will be more difficult and require more work.
In game terms, you suffer a significant hammers penalty to every focus in a tier for each focus you've already built in the city.
Note that Tier 1 focuses are very cheap so even with the penalty you'll be able to easily build 3 of them, and the 4th shouldn't be too difficult to reach. Focuses in higher tiers are more costly, so with the penalty it'll be very costly to try to build them all.
Remember that building focuses has no effect on the cost of focuses from other tiers (though this may change in the future).

* The third catch is that a jack of all trades is master of none.
Each focus gives a slightly worse bonus than the associated penalty, so if you build too many focuses, the net result will be a net penalty everywhere.
Let's consider first tier focuses. One gives +10% food, -10% hammers and -10% commerce. Another gives -10% food, -10% hammers and +10% commerce. This means that if you build both, the bonuses will cancel each other and you'll end up with a net -20% hammers penalty.

* Finally, the fourth catch is the spread of skill in your empire.
Each focus you build in a given city will grant a hammers penalty to every other city trying to build the same focus. Think of it as spreading your most skilled citizens everywhere instead of keeping them together in a few places.
The penalty is relatively minor, but as you have more and more cities building the same focuses, it'll start to matter. Incidentally, it'll be a limit to over-expansion since at some point new cities just won't be able to build focuses at all. At least until you get new sources of hammers.

(note: it'd probably have been better to increase the cost of buildings instead of reducing hammers output for them, but it does not seem possible with the current tags)


Can I still have generalist, "good-at-everything" cities?

Yes you can. The downside is that if you do that, building focuses in new cities will be very expensive, so you'll end up with some very good cities and some bad cities.

On the other hand, if your spread your focuses among your cities, you won't get (or less) extremely good cities, but many average cities that are good in one or two fields. In theory, both strategies should be viable (and I intend to keep it that way).

One interesting detail: your capital has a +50% to the construction of any focus. It'll thus be very possible to build many focuses there even with the multi-focus hammers penalty, including in the early game where you don't have that many cities to play with. Ultimately it'll probably turn out as a generalist "super-city". I'm considering adding the same bonus to pseudo-capital (Forbidden Palace, Versailles...).


What are the different focuses and their effects?

Tier 1
* Production
Fields |Basic production, building construction
Direct effect |-10%food, +10%hammers, -10%commerce, -20%hammers for military units (cumulative with the +10%hammers for a net -10%hammers) Unlocks |Basic +hammers early buildings as well as +hammers% later buildings (pulley, etc.)

* Commerce
Fields |Commerce, communication, early traditions
Direct effect |-10%food, -10%hammers, +10%commerce[/I]
Unlocks |Some basic commerce buildings (roads...) and importantly for the early game the science and tradition buildings (myths, sand paintings, etc.)

* Food
Fields |Food scavenging, gathering and preparation
Direct effect |+10%food, -10%hammers, -10%commerce[/I]
Unlocks |Some basic +food early buildings, granaries

* Military
Fields |Military units production
Direct effect |-10%food, -10%hammers, -10%commerce, +20%hammers for military units (cumulative with the -10%hammers for a net +10%hammers) Unlocks |Early military buildings, later used together with other focuses for many buildings (stables...)


Tier 2
Tier 2 focuses require that the city is level 3 as well as a specific tier 1 focus.

* Raw materials
Requires |Focus tier 1 Production
Fields |Resource gathering (excluding food and plant products)
Direct effect |-10%food, +5%hammers, +5%commerce, +2:sick:, +2unhappy[/I]
Unlocks |Mines and other raw resources gatherers (bamboo, bark, salt...)

* Intermediate products
Requires |Focus tier 1 Production
Fields |Production of intermediate products
Direct effect |-10%food, +5%hammers, +5%commerce, +2:sick:, +2unhappy[/I]
Unlocks |Buildings crafting "unfinished" goods such as gems, leather, ingots...

* Craftsmanship
Requires |Focus tier 1 Production
Fields |Production of finished goods
Direct effect |-10%food, +5%hammers, +5%commerce, +2:sick:, +2unhappy[/I]
Unlocks |Manufactured resources such as toys, scrolls, metal wares...

* Agriculture
Requires |Focus tier 1 Food
Fields |Growth and harvest of plant
Direct effect |+10%food, -5%hammers, -5%commerce, +2:sick:, +2unhappy[/I]
Unlocks |Farms, orchards, plantations, groves... (the buildings, not the improvements!)

* Hunting and Fishing
Requires |Focus tier 1 Food
Fields |Hunting, fishing
Direct effect |+10%food, -5%hammers, -5%commerce, +2:sick:, +2unhappy[/I]
Unlocks |Animal camps, fish nets, harbor...

* Herding
Requires |Focus tier 1 Food
Fields |Breeding animals, herding
Direct effect |+10%food, -5%hammers, -5%commerce, +2:sick:, +2unhappy[/I]
Unlocks |Animal farms, animal breeders, megafauna trainers (with Military focus)...

* Education
Requires |Focus tier 1 Commerce
Fields |Basic research, education
Direct effect |-5%gold, +10%science, -5%culture, -5%espionage
Unlocks |Basic +science and +Education buildings (library, grammaticus, stargazer's hut...)

* Business and Trading
Requires |Focus tier 1 Commerce
Fields |Trade, business, shops
Direct effect |+10%gold, -5%science, -5%culture, -5%espionage
Unlocks |Non-crafting +gold or +commerce buildings (bridges, bazaar...)

* Arts and Culture
Requires |Focus tier 1 Commerce
Fields |Culture, arts
Direct effect |-5%gold, -5%science, +10%culture, -5%espionage
Unlocks |Most buildings related to culture or arts (music/dance hut, fresco...)

* Units training
Requires |Focus tier 1 Military
Fields |Military and non-military units training
Direct effect |+1XP to every unit created there, -5% great general emergence, -10% city defense
Unlocks |Most buildings providing XP bonuses or free promotions to units

* Defensive doctrine
Requires |Focus tier 1 Military
Fields |Offensive units
Direct effect |-5% great general emergence, +20% city defense
Unlocks |Defensive buildings (traps, walls...)

* Offensive doctrine
Requires |Focus tier 1 Military
Fields |Offensive units
Direct effect |+10% great general emergence, -20% city defense, +10% military units production
Unlocks |Few buildings unlocking specific units (siege workshop, knight's stable...)


Tier 3
Tier 2 focuses require that the city is level 6. There are no additional focus prerequistes.

* Port
Fields |Sea
Direct effect |+20 crime (I'll probably add more things here later)
Unlocks |Coastal buildings (except the small ones related to fishing)

* Religion
Requires |Any religion in the city (not necessarily state religion)
Fields |Religion
Direct effect |-10%gold, -10%science, +10%culture
Unlocks |Religious buildings (except basic temples which don't require anything)

* Health
Fields |Health, medicine, cleaning
Direct effect |+4 :health:, +20% city maintenance, -10% food
Unlocks |Many buildings providing +:health: or -Disease

* Leisure
Fields |Entertainment, happiness
Direct effect |+4 :happiness:, +20% city maintenance, -10% hammers
Unlocks |Festivals, buildings providing +:happiness: (theater...)

* Police
Fields |Law-enforcement
Direct effect |+20% city maintenance, -20 Crime, -10% commerce
Unlocks |Crime-fighting buildings


Tier 4
Tier 4 focuses require that the city is level 13. Some have additional focus prerequistes.

* Manufacturing
Requires |Focus Tier 2 Intermediate products or Craftsmanship
Fields |Standardized production, power generation
Direct effect |+10%gold, -5%science, -10%culture
Unlocks |Not yet implemented - factories, power plants...

* Finance
Requires |Focus Tier 2 Business and Trading
Fields |Advanced finance
Direct effect |+10%gold, -10%science (I'll probably add more)
Unlocks |Not yet implemented - banks, insurance office...

* Research
Requires |Focus Tier 2 Education
Fields |Science, technology
Direct effect |-10%gold, +10%science (I'll probably add more)
Unlocks |Not yet implemented - labs, universities...

* Airport
Fields |Air
Direct effect |(TBD)
Unlocks |Not yet implemented - airports, space buildings...

* Diplomacy
Fields |Spying
Direct effect |-5%gold, -5%science, -5%culture, +10%espionage
Unlocks |Not yet implemented - espionage buildings


Does it already work?

Sure! Just extract the attached file into My_Mods/SpecializedCities.

From my playtest, the AI seems to handle it well and different civs choose different specializations (though Production appears more often and in time their capital city tend to develop every focus). Most rivals civs are ahead of me in my game...

I've sorted out about every building for the first three eras (further buildings just don't require any focus); if you want to try it, I'm very interested to get feedback!

View attachment SpecializedCities v2.7z
 
Overall it sounds great and I will be interested to try it.

One concern is that the Tier 1 penalties sound hefty to me. I would be surprised if many of the buildings they unlock provide any benefit at all after that malus.

Just looked further and all the penalties seem too high. Only the most currently OP buildings will be worthwhile, and they need fixing. Then when they are fixed, you will have virtually no beneficial buildings to build.

Still that's just first glance so if your testing indicates otherwise it may be fine. I just hope it gets tested for a range of playstyles and difficulties. It is a good idea, which would make it more of a shame if it could only be used on a very limited range of settings.
 
Back
Top Bottom