1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

City Types and their Buildings, Effects, Features

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Oct 3, 2014.

  1. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    The problem with using buildings is that if you say requires 10 people to get a building, you put those 10 inside, get the building and then you remove 8 people. The remaining two will use the high grade building. Next you add 2 people to the group, found a new city with 10 people and repeat. If the buildings downgrade, it will involve the same technical difficulties, meaning we gained nothing from using buildings. Also which building should you add to the construction queue?

    Also by replacing a single building with say 5, we gain a whole lot of buildings in xml. This makes it slower to loop all buildings, meaning it will likely be a slower overall approach. The "depends on population" approach would require more calculations at a certain point, but it would be virtually instant if the variables are stored next to each other in memory.
     
  2. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    "Also which building should you add to the construction queue?"

    I don't understand the specifics of this question?

    I accept your point about loop length increase. I don't know how much slower that would make things. Would the pop system not simply have 'stutters' of slow down every time it adjusts population. (If these levels of doings have any marked effect)

    If we do what I said with buildings, making them take time to construct, etc.

    Then the approach of your construction team of 10 pop would be a strategy to consider, but as I said before, it would also mean that any investment in buildings, unless you just built the one production building you wanted (Which can be prevented by having a Town need a selection of important 'village infrastructure' buildings before you can move up to a Town) you would have all of this investment in buildings just going unused while you start the process in a new time, but for who and what purpose?

    You may want to build a large wine industry across multiple towns, but unlike the current monastery system, where you can get 12 ideas with 2 pro monks instantly in every site, it would take a great deal of time to get to that level of productivity across multiple sites, and in the mean time lets say 4 of your ten people have nothing to do (Or are just collecting less important raw materials from the land) in your new village project as the carpenters have to build X buildings before your village can support a town level wine industry for 2 or 3 people.

    So you could have a wandering 10 people constructing towns all over the place, but it would certainly not be quick enough to be spammy, and from a productive stand point would be incredibly inefficient.
     
  3. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Say we have a library with 1-3 slots. That would be library1, library2 and library3. If you plan on building one, then which one is it? If you have 3 people when you start building, then it's library1, but what if you have 7 when you finish and it should be library2? If we first build library1, then library2, then we could do with the existing code, but that's not what the idea is about. The idea should downgrade the slots if you move people out, preventing them from being moved around and make 15 people provide 4 cities with a 10 pop building in each.

    The problem with performance is that sometimes you can say "solution A is slower than solution B". However once you enter the question of how much, it becomes guesswork unless you code both and start measuring. This mean nobody can tell for sure if you can tell the difference from using twice the amount of buildings as the game currently has. Even worse, I could say "ok, it's not much" and then the next day Kailric adds new code, which loops all buildings and suddenly the slowdown isn't ok anymore.

    Adding more tasks to the code, which change the population count is a completely different performance issue than adding lots of buildings as this will not affect performance in code elsewhere. This makes the result more predictable. Also the population counter is rarely changed compared to the amount of times the buildings are looped. This brings in the question of not just how fast the code is, but how many times is it executed every second? If it is once a second, a 10 ms calculation is ok. If it is 100 each second, then a 1 ms calculation time for each call could be unacceptable even if it is 10 times faster than the acceptable one.

    Besides according to my idea, the slots should be added or removed as population change. This mean the same comparisons should be performed when population change regardless of the number of slots changing or the buildings themselves.

    Speaking about performance, I just realized the sdk came out in 2006, but it wasn't until my makefile changes in 2013 that performance could be measured other than with a stopwatch. Now it can be measured quite accurately and tell how much time was spent on each line in the code. That might be the best example we have on what happens when a real engineer shows up around self taught modders :king:

    I started writing something about predicting performance, memory latency, compiler and CPU knowledge as well as math. However I deleted it because I feel like it would derail the thread.
     
  4. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Wow, it has been a long while since I played M:C. I am rediscovering new things I had added (New diplomacy options, Civic Upkeep costs, and etc, etc). We have been talking about slowing down the city sprawl but I believe it is already slowed down. With the new Civic Upkeeps it makes it so you have to concentrate efforts on building up your towns in order to support new Civics. I'll post some more in other appropriate threads.
     
  5. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I find the civic upkeep to be somewhat broken as it scales poorly. At some point we should consider how to set it up correctly. The actual upkeep should likely contain inputs like population, number of cities and number of plots. If we make it even more interesting, the upkeep is calculated for each city in CvCity::doTurn, taking into account distance to capital, plotgroup with capital, 100% ownership of plots etc. We can add concepts like crime and corruption to modify as well.

    What we need is something, which is fairly cheap early on, but becomes expensive as time passes and you can afford more. Right now we have something, which is expensive early on, but becomes cheap as time passes.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I replied in the Civic Screen thread. I think for next release I want worry about the Citytype issue as there is the tutorial that leads you through it just fine. The main thing is getting to the point we can merge the two branches and balancing out what we already have.
     
  7. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Agreed. We should not make anything new for the next release. Just fix and balance what we have and merge everything into one branch to include it all.
     
  8. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    I agree, I would be gutted to see the city types disappear overnight for the next release.

    I think upkeep and sprawl spam are actually not that big of a problem needing that big of a solution.

    We already have the seed of some good solutions, scaling upkeep with empire size would be a great addition to really get that cooking!

    Ok so my playthrough is stuck so I will type here instead! :D

    I think the big problem with city spamming right now is that:

    1. There isn't really any kind of expansion penalty. (Except the risk of over extended defences and angering natives till they attack.)

    2. You get 'Everything you need' free everytime you build a settlement. A production facility and resources to feed that production facility. A monastery gets a free research facility, etc. Add to that a few technologies that give buildings everywhere and why wouldn't you city spam, monastery or otherwise.

    3. Settlers and cities are free, so by converting a peasant to a settler (free) and founding a city (free) you get a new produced good source (free).

    4. Pop Limit. With the pop caps in place (not a bad system) you have to build buildings to expand your city, that take time and investment, where you could just build a new free city with free production slots. So you are given many reason to grow wide, but growing tall is not easy (shouldn't be) and there is not that much to gain by focussing people in a single place. (except ease of defence, which is a good reason, but not really enough).

    5. Limiting the free rewards. I think if we just reduced what you get for free when you build a city, or make deeper use of the 'prepared' of settler types, so you only get the free stuff if you use loads of wood and food and tools, etc. It would reduce some of the draw of spamming new settlements.
    Perhaps if starting buildings only have 1 worker slot and only produce 1-2 output, while the next level has 2 or 3 slots and produces 3 yield, that would make a town 3 or more times as effective/efficient as a village.
    So sending out a man to build a village will only give you 1 produced yield, where as working him in a town will produce 3. This makes villages far more 'rural' in nature, where the only decent work is working the land. This would reduce the desirability of spam, as you would only get raw materials (that don't bring much at market) and having to network and transport over a larger area.

    6. Monastic Spam/The City Type Ratio:
    Right now I think the monastery is the most obviously rewarding city type as it gives you a free research building, and a boost to livestock, ale, wine and crosses(with a shrine). I think the town and outpost just need some more identity maybe, or the monastery needs to be a bit lesss instantly awesome.
    Perhaps towns could start with a boost to raw materials, food and such, so that pairing a town and a monastery works nicely. Town feeds grapes or barley to a Monastery and a Monastery feeds those back to town and on to trade sites.
    We could take more buildings away from monasteries, such as anything but a basic dock, the ability to build ships, the ability to build warehouses(or large ones) so you have to move their products fast, to town sites for storage, most (if not all) high end production buildings.
    They could recieve negatives to many resources, so that they are only good for 6? Resources (Cattle, Sheep, Wine, Beer, Crosses, Candles.)
    We could change the plot group city type bonus to be much smaller on a per city basis, with a cap of say 25% with each producing 5% so that you want to make an even amount of each to get the full bonus, rather than just building say 1 out post to get the 25% fealty boost or whatever.
     

Share This Page