Announcement

Collapse
No announcement yet.

Calculating food and growth

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculating food and growth

    Hello,

    I'm trying to get a good game of CTP2 going, but I find myself lacking understanding of certain numbers and formulas without which I don't feel like I know what's going on.
    So how exactly is growth calculated? I understand how the city collects its resources. The first thing I don't understand is how the rations are calculated. Say I set them at 4 kg. So that's 4 kg per how much pop., i.e. how does it relate to the food units collected?
    I understand that after this the surplus is stored for growth. Yet how is the green number in the City Manager (e.g. Growth +550) calculated?
    My other question is how much pop. is there per population point. Is this 10 000?
    I'm wondering why CTP2 cannot show how many turns are needed for the next increasy in the city size number. In CTP 1 this number was shown (but on the other hand the actual rate wasn't shown which wasn't good either...)
    Thanks for any help.

    Ivan
    Ivan - ivanbuto2@yahoo.com

  • #2
    You may want to read the links in Q27 of the FAQ, they provide a lot of the answers you're looking for. Particularly the last link I added contains a lot of info on this issue (and I'm working on the unanswered questions, hopefully I'll be able to post an update during the holidays).

    So how exactly is growth calculated? I understand how the city collects its resources. The first thing I don't understand is how the rations are calculated. Say I set them at 4 kg. So that's 4 kg per how much pop., i.e. how does it relate to the food units collected?
    4 kg is a symbolic number, it doesn't really mean a lot for the in-game calculations, it's just there to add a little 'atmosphere' to the game. The values for rations as mentioned in the Empire Manager screen are 2, 4, 5, 7 and 10 kg. However, the actual numbers can be found in Const.txt and are quite different. I will copy the relevant part of the original (=unmodded) file here:
    Code:
    UNIT_WORKDAY 0.15 # slider to work
    BASE_WORKDAY 1.0 # work per person when slider is zero
    UNIT_WAGES 1.0 # what does 1 notch mean
    BASE_WAGES 4.0 # gold per person when slider is zero
    UNIT_RATIONS 3.0 # what does 1 notch mean
    BASE_RATIONS 12.0 # food per person time POP_HUNGER when slider is zero
    This means that the base value for rations (the middle value in the empire manager, i.e. 5 kg) is 12 food. For every notch you move the slider, the amount of food changes (increases or decreases, depending on the direction of the slider movement) with 3 food. So in you example, 4 kg means that every citizen gets 9 food per turn in rations.
    Yet how is the green number in the City Manager (e.g. Growth +550) calculated?
    See links above.
    My other question is how much pop. is there per population point. Is this 10 000?
    Yes, as I mentioned in one of the links above.
    I'm wondering why CTP2 cannot show how many turns are needed for the next increasy in the city size number.
    As you know this number is subject to change, depending on tile imps, governments, sliders, etc, etc but I agree an explicit growth number in the City Manager would have been nice.
    But if you want to calculate the growth, simply open the City Manager and compare the growth ('green number') with the current population. E.g. if the growth number of a city is +550 and a city has a population of 23,457, then it will grow in (30,000 - 23,457)/550 = 6,543 / 550 = 11.8 = 12 turns.
    Exactly calculating this number every other turn for every other city is probably not gonna make the gaming experience more fun (to put it mildly ), but if you still have ~6500 to go to the next growth and you're growing at a rate of +550, it won't take most people more than a split second to realize this means 10-15 turns, which should in 90% of the cases be accurate enough...
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #3
      Thanks. I'll do some studying of your detailed post in thread 49519 later today - it seems to be an excellent source of info.
      And maybe then I'll chime back in with more Qs if I have any...

      Ivan
      Ivan - ivanbuto2@yahoo.com

      Comment


      • #4
        Any time
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #5
          So I read your analysis in the mentioned threat, it is excellent indeed. There seem to have remained unclarities with respect to exactly how overcrowding, farmers, and difficulty levels factor in. I'm wondering if there has been any more information discovered.
          BTW, while I'm sure it must have been very rewarding to come up with your formula and see that it works, I am wondering why the creators of the game at Activison did not make this information available for everybody either in some kind of an advanced manual or online. I know they sort of made somehting available with the text files in the Data folder of the game, but why couldn't they create a complete discussion of the formulas for everything? in CIV 1 we knew all these formulas, also in CIV 2. Not in CTP. The manuals have gotten more and more general, sometimes too general to be of any help.
          I haven't tried CIV 3 yet, I'm wondering how it is there...
          Thanks.

          I.
          Ivan - ivanbuto2@yahoo.com

          Comment


          • #6
            The CTP series was never good with the manuals at all
            "Kill a man and you are a murder.
            Kill thousands and you are a conquer.
            Kill all and you are a God!"
            -Jean Rostand

            Comment


            • #7
              I guess they just wanted us to find this out for ourselves, and they were doing other things in the last days of development.

              Its a definate advantage to know this stuff while playing though.
              Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
              CtP2 AE Wiki & Modding Reference
              One way to compile the CtP2 Source Code.

              Comment


              • #8
                Some more food Qs

                So back to the food stuff...
                I understood Locutus's analysis in thread 49519, but now I found some more numbers in the text files and I'm not sure how this would factor in.
                In citysize?.txt, we know that the GrowthRate is what we multiply the surpus food by to get the growth number.
                (Q1) The MaxSurplusFood is I would guess the maximum allowed amount of surplus food, but what is the MinGrowthRate number?
                (Q2) What is the BaseOvercrowding number, and why is it 4 for all city sizes?

                Now, in Const.txt I found this:
                CITY_GROWTH_COEFFICIENT 175 # Amount of food per citizen required to grow a city

                And in DiffDB.txt I found this:
                GRANARY_COEF 10 # a city needs this number times the pop food to grow
                (this is the same number, i.e. 10 for all difficulty levels)

                So what sense does one make of these two numbers?


                And Locutus have you by any chance found out more about how exactly overcrowding factors into the equation?

                poof!
                Ivan - ivanbuto2@yahoo.com

                Comment


                • #9
                  Originally posted by ivanbuto
                  So I read your analysis in the mentioned threat, it is excellent indeed.
                  Thanks, I'm glad to hear you find it useful.

                  There seem to have remained unclarities with respect to exactly how overcrowding, farmers, and difficulty levels factor in. I'm wondering if there has been any more information discovered.
                  I've been doing some more experimenting and have found some interesting things, but most of it is gold/science related, not food related. I haven't had the time yet to properly organize my notes and post them here but hopefully I'll be able to do so during the holidays (and hopefully I'll have time for some more testing too).

                  BTW, while I'm sure it must have been very rewarding to come up with your formula and see that it works, I am wondering why the creators of the game at Activison did not make this information available for everybody either in some kind of an advanced manual or online. I know they sort of made somehting available with the text files in the Data folder of the game, but why couldn't they create a complete discussion of the formulas for everything? in CIV 1 we knew all these formulas, also in CIV 2. Not in CTP. The manuals have gotten more and more general, sometimes too general to be of any help.
                  I haven't tried CIV 3 yet, I'm wondering how it is there...
                  Thanks.
                  Unfortunately it's not commercially responsible anymore these days to add this sort of stuff to manuals, you have to put these sort of things in strategy guides and charge 20 bucks extra for them. This is not just a problem for CtP but for many other games as well (including Civ3). Unfortunately there's at the same time a trend to not put any kind of effort in making strategy guides (there's really only one company that makes these guides (BradyGames) and the lack of competition seems to make them completely indifferent about quality), so half the time these formulas are left out in the official strategy guide as well

                  (Q1) The MaxSurplusFood is I would guess the maximum allowed amount of surplus food, but what is the MinGrowthRate number?
                  I'm not sure if these numbers do anything at all. The maximum allowed amount of pop growth is +2500, as defined in Const.txt (and as anyone who's played the game a few times will have noticed). But I have never noticed any kind of limit on the food surplus and I have no clue as to what the MinGrowthRate might mean. There are plenty of values in the text files that aren't actually used in the game or don't work properly, so I don't trust any variables that I don't know until someone proves they're reliable...

                  (Q2) What is the BaseOvercrowding number, and why is it 4 for all city sizes?
                  It means that cities will start experiencing overcrowding from size 4 onwards, smaller cities won't have it.

                  As for why they're all the same: there are a lot more values in the text files that could change but are in fact the same under all circumstances. That's either because Activision didn't implement them properly or changed their mind about it, or because they figured that just because they saw no reason to change them doesn't mean that someone else (i.e. us) might not do so. They made the game as flexible as possible so we modmakers could do our work properly, which is one of the best things about this game

                  Now, in Const.txt I found this:
                  CITY_GROWTH_COEFFICIENT 175 # Amount of food per citizen required to grow a city

                  And in DiffDB.txt I found this:
                  GRANARY_COEF 10 # a city needs this number times the pop food to grow
                  (this is the same number, i.e. 10 for all difficulty levels)

                  So what sense does one make of these two numbers?
                  Const.txt and DiffDB.txt are leftovers of CtP1 and although a lot of the values in them still work, a lot of others don't do anything anymore (or never did anything in the first place ). I think you found 2 examples of things that don't do anything (anymore), although I can't prove that.

                  And Locutus have you by any chance found out more about how exactly overcrowding factors into the equation?
                  Nope, that's at this point probably the most important question that still remains unanswered Hopefully I'll be able to find out soon...
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    In CTP2, when two cities (one domestic, one foreign) overlap in terms of some of the tiles they work, since the AI city grew beyond 6 first and took those tiles, my city got cut short. I tried to place military units on those tiles, thinking that it would run out foreign workers, but it doesn't seem to work. So is there any way how to gain control ov overlapping tiles worked by the opponent's city? And if this happens with two of my own cities, is there any way how to manually assign overlapping tiles to a partiuclar city?
                    Thanks,

                    Ivan
                    Ivan - ivanbuto2@yahoo.com

                    Comment


                    • #11
                      Originally posted by ivanbuto
                      In CTP2, when two cities (one domestic, one foreign) overlap in terms of some of the tiles they work, since the AI city grew beyond 6 first and took those tiles, my city got cut short. I tried to place military units on those tiles, thinking that it would run out foreign workers, but it doesn't seem to work. So is there any way how to gain control ov overlapping tiles worked by the opponent's city? And if this happens with two of my own cities, is there any way how to manually assign overlapping tiles to a partiuclar city?
                      Thanks,

                      Ivan
                      Unlike in CTP1 I don't know a possibility to control which tile belongs to which city. The only way to get tiles from enemies back is to conquer the his city.

                      -Martin
                      Civ2 military advisor: "No complaints, Sir!"

                      Comment


                      • #12
                        It is possible. you could reduce food in a tile to 0 if a unit is over an enemy tile. This way you can bring this seiging feature back.

                        There is only one problems:

                        1) The way to reduce the food is through placing invisible TIs but you can only have a maximum of three TIs in a tile. So probably only food would be possible to be reduced to 0. Otherwise it would need a lot of TIs.
                        We could work on that together. if you want start a thread about this feature in the Creation Forum.
                        "Kill a man and you are a murder.
                        Kill thousands and you are a conquer.
                        Kill all and you are a God!"
                        -Jean Rostand

                        Comment

                        Working...
                        X