m (Zevhual -- added to city mechanics category) Tag: Visual edit |
m (Protected "City Formulas" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))) |
||
(25 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
Formulas relation to cities. |
Formulas relation to cities. |
||
− | == |
+ | == '''New City Cost Formula''' == |
+ | [[File:Exponential.png|thumb|220x220px]] |
||
⚫ | |||
+ | This formula is cubic. |
||
⚫ | |||
+ | '''Next City Cost = 50000*(X-1)^3 + 150000*X + 75000''' |
||
− | and, as a result, the formula used for the cost of newly purchased Land is: |
||
+ | * Where '''X''' is the current number of cities. |
||
− | '''New_Land_Cost = Land_Unit_Cost*New_Land''' |
||
⚫ | |||
+ | == '''Infrastructure Cost Formula''' == |
||
⚫ | However, there is one limitation: the game identifies several levels of land, meaning that they are bought in steps. The levels are 500, 1k, 1.5k, 2k land, etc. and each step is 500 Land (except for the first step which is |
||
+ | This formula is exponential. |
||
+ | The formula for infrastructure cost is: |
||
− | Keeping all of the above in mind, the following table results:<center> |
||
+ | '''Infra Unit Cost = [((Current Infra-10)^2.2) / 710] + 300''' |
||
− | {| class="wikitable" style="width: 60%; border-top: none; text-align:center; border-collapse:collapse;" |
||
+ | Using the above formula to plug in the cost per unit results in the formula for infra cost. |
||
− | |- |
||
+ | '''Cost = Infra Unit Cost * Infra to buy''' |
||
− | ! style="background:#000000;font-variant: small-caps; width:20%; font-weight:bold; letter-spacing: 1pt; color:#FFFFFF;" | Step |
||
+ | =='''Land Cost Formula'''== |
||
− | ! style="background:#000000; font-variant: small-caps; width:20%; font-weight:bold; letter-spacing: 1pt; color:#FFFFFF;" | From |
||
+ | This formula is exponential. |
||
− | ! style="background:#000000;font-variant: small-caps; width:20%; font-weight:bold; letter-spacing: 1pt; color:#FFFFFF;" | To |
||
− | ! style="background:#000000; font-variant: small-caps; width:20%; font-weight:bold; letter-spacing: 1pt; color:#FFFFFF;" | Cost ($) |
||
− | ! style="background:#000000; font-variant: small-caps; width:20%; font-weight:bold; letter-spacing: 1pt; color:#FFFFFF;" | Total ($) |
||
− | |- style="background:#d3d3d3;" |
||
− | | 1 |
||
− | | 20 |
||
− | | 500 |
||
− | | 24,000 |
||
− | |24,000 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 2 |
||
− | | 500 |
||
− | | 1,000 |
||
− | | 255,400 |
||
− | |279,400 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 3 |
||
− | | 1,000 |
||
− | | 1,500 |
||
− | | 985,400 |
||
− | |1,264,800 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 4 |
||
− | | 1,500 |
||
− | | 2,000 |
||
− | | 2,215,400 |
||
− | |3,480,200 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 5 |
||
− | | 2,000 |
||
− | | 2,500 |
||
− | | 3,945,400 |
||
− | |7,425,600 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 6 |
||
− | | 2,500 |
||
− | | 3,000 |
||
− | | 6,175,400 |
||
− | |13,601,000 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 7 |
||
− | | 3,000 |
||
− | | 3,500 |
||
− | | 8,905,400 |
||
− | |22,506,400 |
||
− | |- style="background:#d3d3d3;" |
||
− | | 8 |
||
− | | 3,500 |
||
− | | 4,000 |
||
− | | 12,135,400 |
||
− | |34,641,800 |
||
− | |} |
||
− | </center> |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | Using the above formula to plug in the cost per unit results in the formula for land cost. |
||
+ | '''Cost = Land Unit Cost * Land to buy''' |
||
+ | |||
+ | == '''Population Formulas''' == |
||
+ | Before other factors are applied, the formula for population by infrastructure is: |
||
+ | '''Base Population = Infrastructure * 100''' |
||
+ | The formula after all everything's been factored in is: |
||
+ | '''Population = (Base Pop - ((Disease Rate * 100 * Infra)/10) - MAX((Crime Rate / 10) * (100*Infra) - 25, 0)) * (1 + '''ln(CityAgeInDays)/15''')''' |
||
+ | Or simplified |
||
+ | '''Population = (Base Pop - Disease Deaths - Crime Deaths) * Age Bonus''' |
||
+ | |||
+ | The age bonus is a function of decreasing returns to city age. The formula is: |
||
+ | '''Age Bonus = 1 + ln(CityAgeInDays)/15''' |
||
+ | |||
+ | === '''Population Density Formula''' === |
||
+ | * The formula used for population density when factoring '''Disease''' is different than the actual population density. The reason for this, is that Disease (based on Population Density) will kill a percentage of the Base Population, lowering the displayed Population Density. If there was no difference, the formula would feed back on each other. |
||
+ | '''Equation Specific Formula''' |
||
+ | '''Population Density = Base Population / Land Area''' |
||
+ | '''Displayed Population Formula''' |
||
+ | '''Population Density = Actual Population / Land Area''' |
||
+ | |||
+ | === '''Crime and Disease Rate Formulas''' === |
||
+ | '''Note:''' Both formulas are returned as a percent for use in the population lost formulas. |
||
+ | |||
+ | ==== '''Crime''' ==== |
||
+ | '''Note:''' 0≤ Crime Rate ≤100 |
||
+ | '''Crime (%) = ((103 - Commerce)^2 + ( Infrastructure * 100))/(11111111)''' '''- Police Modifier''' |
||
+ | Where Police Modifier is: |
||
+ | '''Police Modifier = (# of Police Stations)*(2.5)''' |
||
+ | |||
+ | ==== '''Disease ''' ==== |
||
+ | '''Disease Rate = ((((Population Density^2) * 0.01) - 25)/100) + (Base Population/100000) + Pollution Modifier - Hospital Modifier''' |
||
+ | * Pop density is based on base population not on displayed population |
||
+ | Pollution Modifier is the increase to disease, from increasing Pollution. |
||
+ | '''Pollution Modifier = Pollution Index * 0.05''' |
||
+ | Hospital Modifier is the amount of disease reduced by buying Hospitals. |
||
+ | '''Hospital Modifier = Hospital Count * 2.5''' |
||
+ | |||
+ | ==== '''Population Lost Formulas''' ==== |
||
+ | |||
+ | ==== '''Crime''' ==== |
||
+ | '''Crime Deaths = (Crime Rate/10)*(Infrastructure*100)-25''' |
||
+ | |||
+ | ==== '''Disease''' ==== |
||
+ | '''Disease Deaths = Disease Rate * Base Population''' |
||
+ | <nowiki/>'''''<nowiki/>''''' |
||
[[Category:Formulas]] |
[[Category:Formulas]] |
||
+ | |||
− | [[Category:City Mechanics]] |
||
+ | == '''Food Production Formula''' == |
||
+ | The basic formula for food production '''per turn''' in a city is: |
||
+ | '''Food Production = Farm Count * (Land Area / 500)''' |
||
+ | Modifiers to this basic formula include: |
||
+ | *If the Mass Irrigation Nation Project is built the formula is changed to Farms * (Land Area / 400) |
||
+ | |||
+ | *If the season is Summer the production is changed to Food * 1.2 |
||
+ | |||
+ | *If the season is Winter the production is changed to Food * .8 |
||
+ | |||
+ | === '''Radiation Formula Effect''' === |
||
+ | '''Final Food Prod =''' '''Food Production * (nation+continent+global rad index)/1000''' |
||
+ | |||
+ | == '''Misc''' == |
||
+ | NOTE: '''These are things to be moved out but I wanna use somewhere else and need somewhere to store it temporarily.''' |
||
+ | |||
+ | === '''Land''' === |
||
⚫ | |||
+ | |||
⚫ | However, there is one limitation: the game identifies several levels of land, meaning that they are bought in steps. The levels are 500, 1k, 1.5k, 2k land, etc. and each step is 500 Land (except for the first step which is 250, since your city gets 250 land when it is first built). This means that, if you decide to get for example from 250 to 1k land and buy that much land, the game will automatically calculate two transactions instead of one: one from 250 Land to 500 and one from 500 to 1,000. The game calculates the optimized cost for the land you decide to purchase. |
||
+ | |||
⚫ |
Revision as of 18:59, 6 November 2019
Formulas relation to cities.
New City Cost Formula
This formula is cubic.
Next City Cost = 50000*(X-1)^3 + 150000*X + 75000
- Where X is the current number of cities.
Infrastructure Cost Formula
This formula is exponential.
The formula for infrastructure cost is:
Infra Unit Cost = [((Current Infra-10)^2.2) / 710] + 300
Using the above formula to plug in the cost per unit results in the formula for infra cost.
Cost = Infra Unit Cost * Infra to buy
Land Cost Formula
This formula is exponential.
The formula for the cost of one unit of land is the following:
Land Unit Cost = 0.002*(Current Land-20)^2 + 50
Using the above formula to plug in the cost per unit results in the formula for land cost.
Cost = Land Unit Cost * Land to buy
Population Formulas
Before other factors are applied, the formula for population by infrastructure is:
Base Population = Infrastructure * 100
The formula after all everything's been factored in is:
Population = (Base Pop - ((Disease Rate * 100 * Infra)/10) - MAX((Crime Rate / 10) * (100*Infra) - 25, 0)) * (1 + ln(CityAgeInDays)/15)
Or simplified
Population = (Base Pop - Disease Deaths - Crime Deaths) * Age Bonus
The age bonus is a function of decreasing returns to city age. The formula is:
Age Bonus = 1 + ln(CityAgeInDays)/15
Population Density Formula
- The formula used for population density when factoring Disease is different than the actual population density. The reason for this, is that Disease (based on Population Density) will kill a percentage of the Base Population, lowering the displayed Population Density. If there was no difference, the formula would feed back on each other.
Equation Specific Formula
Population Density = Base Population / Land Area
Displayed Population Formula
Population Density = Actual Population / Land Area
Crime and Disease Rate Formulas
Note: Both formulas are returned as a percent for use in the population lost formulas.
Crime
Note: 0≤ Crime Rate ≤100
Crime (%) = ((103 - Commerce)^2 + ( Infrastructure * 100))/(11111111) - Police Modifier
Where Police Modifier is:
Police Modifier = (# of Police Stations)*(2.5)
Disease
Disease Rate = ((((Population Density^2) * 0.01) - 25)/100) + (Base Population/100000) + Pollution Modifier - Hospital Modifier
- Pop density is based on base population not on displayed population
Pollution Modifier is the increase to disease, from increasing Pollution.
Pollution Modifier = Pollution Index * 0.05
Hospital Modifier is the amount of disease reduced by buying Hospitals.
Hospital Modifier = Hospital Count * 2.5
Population Lost Formulas
Crime
Crime Deaths = (Crime Rate/10)*(Infrastructure*100)-25
Disease
Disease Deaths = Disease Rate * Base Population
Food Production Formula
The basic formula for food production per turn in a city is:
Food Production = Farm Count * (Land Area / 500)
Modifiers to this basic formula include:
- If the Mass Irrigation Nation Project is built the formula is changed to Farms * (Land Area / 400)
- If the season is Summer the production is changed to Food * 1.2
- If the season is Winter the production is changed to Food * .8
Radiation Formula Effect
Final Food Prod = Food Production * (nation+continent+global rad index)/1000
Misc
NOTE: These are things to be moved out but I wanna use somewhere else and need somewhere to store it temporarily.
Land
From the two above formulas, it is made evident that, since the price of new land depends on the level of your current land, it is more profitable to buy land in bulks. In other words, it is more profitable to get land from 500 to 1,000 than from 500 to 750 and then to 1,000.
However, there is one limitation: the game identifies several levels of land, meaning that they are bought in steps. The levels are 500, 1k, 1.5k, 2k land, etc. and each step is 500 Land (except for the first step which is 250, since your city gets 250 land when it is first built). This means that, if you decide to get for example from 250 to 1k land and buy that much land, the game will automatically calculate two transactions instead of one: one from 250 Land to 500 and one from 500 to 1,000. The game calculates the optimized cost for the land you decide to purchase.
Note that the Tutorial will make you buy 500 Land at your first city and as such, your first city will have 750 Land at some point. Going to the next step and buying 250 Land to reach 1,000 will set you back to course of the optimized land purchases.