[Vanilla] Formula Thread

Discussion in 'Civ6 - Strategy & Tips' started by KrikkitTwo, Oct 21, 2016.

  1. KrikkitTwo

    KrikkitTwo Immortal

    Apr 3, 2004
    Placing a Thread here for all the Undocumented formulas/mechanics as people start looking into the XML and start figuring them out.
    DISCLAIMER: These are in process and have not all been confirmed

    District cost (production)
    =[60*(1+9*Larger of [100*(Number of Techs/67 OR Number of Civics/50)]/100] * 75% IF you have less of this district than the "average" (either average of each type of district you have OR the average of this type of district over all players... conflicting reports)...
    *50% if it is a UD
    [ ]..round down


    Settler/Builder/Trader cost (production)
    Setter=80+20* number of previous copies (not sure how settlers captured count, or if it counts ones that have been queued up)

    Builder =50+4* number of previous copies (not sure how builders captured count, or if it counts ones that have been queued up)
    ...apparently the Pyramid builder does not increase build cost, but it does increase buy cost.

    Tile cost (gold, culture)
    Apparently gold cost is tied into the same "tech advancement" as district cost, with apparent multipliers for second and third ring

    Culture cost (confirmed)
    where n is the number of tiles already claimed by culture..not sure if gold/gp/russian tiles count

    Great Person cost (points, gold, faith).... point cost uncertain... has been seen to decline from one GP to another?
    BASE =
    60 for generals, admirals, merchant, scientist, prophets, writers (Classical Era start)
    120 for engineers
    240 for artists
    420 for musician

    Costs per era, as well as the increased prices (if "world era" is lower than the GP era):
    • Classical Era: 60 (??)
    • Medieval Era: 120 (??)
    • Renaissance Era: 240 (310)
    • Industrial Era: 420 (545)
    • Modern Era: 660 (855)
    • Atomic Era: 960 (1245)
    • Information Era: 1320 (1715)

    The cost of rushing a great people with gold or faith is:
    For faith : 150+ 10*GP point remaining
    For gold : 200+ 15*GP point remaining.

    While the base GP cost scales with game speed, the rush bonus cost (150 faith, 200 gold) doesn't

    Unit Upgrade cost (gold)..from
    from the XML appears to be
    10+0.75*(gold cost difference)
    minimum 30

    Gold rush (gold)
    4*production cost
    apparently rounded down to the nearest 5

    Population growth (food)
    (n is current population-1)

    Policy Change (gold)

    Religious population in city (influence)

    Resource/Feature Harvest yield (food, gold, production)
    Basevalue..25fp/50gold for bonus ...20 for features
    =Base Value*(1+9*Larger of [100*(Number of Techs/67 OR Number of Civics/50)]/100)

    City Combat Strength

    Combat damage

    Random(24-36 hp)* e^(Strength difference * 0.04) * Wall factor
    e is 2.71828....
    Wall factor is 15% if melee attack on walls, 50% if nonseige ranged attack on walls... possibly 50% if ranged attack by walls on units

    Domestic/Foreign Tourists (culture, tourism) confirmed
    Total Foreign tourists cannot decline (even if you eliminate a civ that had tourists visiting you or lose a city tourists were visiting.)

    Domestic tourists are generated per 100 total lifetime culture. (this Includes culture from Eurekas)
    (confirmed by Victoria https://forums.civfanatics.com/threads/how-domestic-tourism-is-generated.605115/)

    Each civ applies its tourism to all other civs that it has contacted (with modifiers)
    When Civ A gets 150*(number of civs in game) lifetime Tourism on CivB, CivA gains 1 Foreign Tourist, and CivB loses 1 Domestic Tourist

    Different Government modifier effect is (from Victoria)
    (Gov1_factor + Gov2_factor) x Base Government tourist factor = Diff Gov tourism factor

    The Base tourism government factor is hard coded currently at 3
    Chieftan = 0
    Autocracy = -2
    Oligarchy = -2
    Classic republic = -1
    Monarchy = -3
    Theocracy = -4
    Merchant Republic = -2
    Facism = -5
    Communism = -6
    Democracy = -3

    Wonder Tourism (tourism)

    3+1 per era past when the wonder was available?built

    Project yields (GPP, other yields, etc.)..from Lord Yanaek and elitetroops

    Cost=25*(1+14*Larger of [100*(Number of Techs/67 OR Number of Civics/50)]/100)

    GPP yield=10 ....[5 for Theater+Carnival projects... they give multiple types of GPP]
    =10or5*(1+7*Larger of [100*(Number of Techs/67 OR Number of Civics/50)] /100)

    others are per turn yields 15% of production as
    Industrial, Harbor, Encampment=gold
    Holy site=Faith
    Carnival gives 1 Amenity
    Commercial Hub gives 30% gold as production

    Defense repair project.. cost unknown
    ..all other projects (space race, nukes) are fixed cost.

    Carnival Districts give an immediate 1 turn bonus to your accumulated GPP (all kinds)

    War weariness (amenities) from pascalis

    warmonger points(base 16 + era points(8-16-24-32)
    * 1 for combat in allied lands
    * 2 for combat in foreign lands
    * 3 for killed unit
    War weariness is applied to both parties in combat, attacker and defender, so it always goes up.

    One example: i attack and kill a unit in neutral territory(foreign lands for the calculation) so my war weariness is base 16 + era points 32=48 * 2 = 96
    the defender's war weariness is base 16+era points 32=48 *2(combat in foreign lands=96)48 *3(killed unit=144)=240

    Players lose 1 amenity every 400 war weariness points.
    Amenity loss occurs to your city with the highest population up to a certain point and then the next highest.
    Cities originally owned by the civs you are at war with go first (and suffer additional penalties)
    Cities founded by you go last

    -50 for every turn at war
    -2000 for declared peace
    -200 for every turn at peace

    Trade route yield (depends on districts in final city)..domestic yields confirmed..from rpgalon..***** reported fixed in 11/18/16 patch....district yield should be as in civilopedia

    Updates the turn a new district is built
    also bonuses for policies, with/from Egypt, from CS, and +1 gold for your trade posts in foreign cities along the way

    Trade route duration (turns)

    Number of trips = FLOOR((game_speed_multiplier / trade_route_path_length) * 0.1) + 1

    So the amount of turns is logically: Number of trips * trade_route_path_length * 2

    game speed multiplier is 100 for standard (50 for online, 67 for Quick, 150 Epic, 300 Marathon)

    Diplomacy value
    Happiness/Neutral/Unhappy.. is based on Total Diplomacy
    The +- modifiers displayed are the amount of change this turn

    Score..from https://forums.civfanatics.com/threads/formula-thread.600534/page-2#post-14644655
    +2 for each tech and civic
    +5 For each wonder
    +3 for each great person (awarded on recieving GP)
    +4 for a pantheon and +8 for a religion (not much value for using religion)
    +5 per city
    +1 per population
    +3 per district

    Output multipliers (added or multiplied, carried over?)
    currently they seem to be carried over (applied to overflow and not divided out)...

    ..for tourism seems to be in multiple levels (each level of bonuses added...different level of bonuses are multiplied)...the values displayed on tiles, cities, your output at the top, none are actually used in gameplay.(they only show a portion of the calculation)
    -Christo Resort bonus, Reliquary, Leakey, Theming, Heritage Tourism-applies to museum only, Printing Press, Satellite Broadcasts, French Wonder bonus (displayed on great works screen)
    -Computer (this level is displayed on tiles, city and top of screen)
    -Different Religion-applies to Holy site and relics only
    -Different Government, open borders, trade routes, Enlightenment, Film Studio
    Last edited: Feb 20, 2017
    Chefofrats, Infixo, polinices and 5 others like this.
  2. rpgalon

    rpgalon Warlord

    Aug 31, 2016
    Ok, just tested the trade route yield,
    -There is no relation between district adjacency bonus and trade yield.
    -There is no effect from population, at least not from population from 1 to 11 pop.
    -There is no effect from era/tech, at least not from ancient to renaissance.
    -Buildings on districts and in the City Center had no effect on the yield.
    -Specialists on districts had no effect on yield.

    But some districts give more than others:

    City Center: 1 food, 1 production
    Campus: 1 food
    Encampment: 1 production
    Commercial: 1 production
    Theater: 2 food
    Industrial: 2 production
    Holy Site: 2 food
    Harbor: 2 production
    Entertainment: 2 food

    Aqueduct: 0 yield

    Also, if you increase the trade route yield when the trader is still walking, you start to get the upgraded value.

    TL;DR yet another reason why campus district sucks in Civ 6.
    Last edited: Oct 25, 2016
  3. elitetroops

    elitetroops Deity

    Dec 23, 2012

    Did you test the spaceport as well?
  4. MadDjinn

    MadDjinn Deity

    Jan 28, 2011
    District costs have nothing to do with other players, just your own districts.

    For hex costs, yes it's tied to a core advancement of tech and civics. ... expect to see that way too often. Though, second ring and third ring are separately costed wrt a small multiple for the second ring and a third multiple for the third ring of the base price.

    Pretty sure unit upgrade cost is tied to difference of production values.
  5. rpgalon

    rpgalon Warlord

    Aug 31, 2016
    Did not test Spaceport, Aerodrome and Neighborhood. But I tested Aqueduct and it gives 0 yield, will edit on my other reply.
  6. Denkt

    Denkt Left Forever

    Jul 3, 2012
    Have you tested buildings and specialist?

    Have you tested if the district in the home city effect trade route yields?
  7. Qin Shi Hung

    Qin Shi Hung Chieftain

    Oct 24, 2016
    Is it the number of techs (ignoring cost), or the total cost of the techs?

    In other words, does nuclear fusion increase the cost the same amount as pottery?
  8. rpgalon

    rpgalon Warlord

    Aug 31, 2016
    yes, buildings and specialist had no effect
  9. KrikkitTwo

    KrikkitTwo Immortal

    Apr 3, 2004
    Not sure yet, I'm mostly trying to collect things into one place.
  10. Zenstrive

    Zenstrive Ocean King

    Sep 24, 2010
    so trade route yields , internally, are just influenced by districts then?
  11. dtfauss

    dtfauss Chieftain

    Oct 25, 2016
    Not sure what factors go into builder - I started a game on king (playing japan) it said base cost 50 - but the build cost for my first was 33 or 130 coins (due to quick speed)
    Once that was built, it said my next was going to cost 36 prod or 140 coins - I held off building/buying and built the pyramids to get the free builder.
    the free builder did increment my buy cost but oddly not my prod cost , for the next it was going to cost 36 prod or 150 coins
    I tested building two builders also, straight up, it went 33 or 130, then 36 or 140 ... with the next going to cost me 38 or 150
    didnt get a chance to capture one to test that for you - sorry for testing at quick speed

    standard - base 50 prod or 200 gold, next 54 or 215 gold, next 58 or 230 so 4 build or 15 gold per previous

    the test on pyramids is odd in that it incremented the gold cost, but didnt increment the prod cost (at least in my quick test)
  12. KrikkitTwo

    KrikkitTwo Immortal

    Apr 3, 2004
    And also some policies, but basically, yes
  13. Wr4ith

    Wr4ith Chieftain

    Feb 3, 2016
    I have no idea how you got these numbers, but civilopedia says every district give +1 food/cogs in domestic routes. Also increasing trade route yield isnt working after trade route was sent (i think it is a bug) here is my example. I sent trade route right before puting commercial hub (sorry for screenshot made a bit late):

    trade route is giving bonus equal to 3 districts in athens (+1/+1 for center, +1 for acropolis, campus and camp). even after hub was completed, game still doesnt give bonus for this. You must trust me, hub was built last. Camp was placed before sending trade route, and it benefited from it. So:

    Trade routes get benefits from not completed districts
    Last edited: Oct 27, 2016
  14. rpgalon

    rpgalon Warlord

    Aug 31, 2016
    Athens has 1 comercial hub (+1 production) and 1 acropolis (+2 food) so you get 1/1 from city center and 2/1 from districts = 3/2, that is what your trade is giving to you....

    In your screenshot the emcampment and campus are looking to be under construction.

    I can't see your trade yield before the trade route to confirm if you are not getting the updated yield from a new district...

    I think you got confused, the trade did not get + 1 food from the campus because you just placed it, you have to finish it, the trade had a +3 food because theater district gives +2, try to finish the campus and see it will go to 4 food 2 production.
  15. KrikkitTwo

    KrikkitTwo Immortal

    Apr 3, 2004
    Civilopedia is not to be trusted in terms of game mechanics.
    It Might be what the developers thought they intended to do at one point, but it often does not connect to the actual mechanics. (its fairly good with numbers usually)

    Now some districts giving 2 food/2 production may be a bug... but it is currently in the game. (maybe they will add more to the campus, etc.)
  16. Wr4ith

    Wr4ith Chieftain

    Feb 3, 2016
    I'm sorry you are right :crazyeye: These unfortunate numbers fitted to my (wrong) theory aswell
  17. KrikkitTwo

    KrikkitTwo Immortal

    Apr 3, 2004
  18. KrikkitTwo

    KrikkitTwo Immortal

    Apr 3, 2004
  19. Dilir

    Dilir Chieftain

    Nov 12, 2016

    Not looked into the xml, but i have the great people cost formula figured out (for normal speed)

    The cost of generating a great people is:
    BASE + n*60
    Where BASE is the cost of the first great people, n the number of great people of that type previously generated.
    BASE =
    60 for generals, admirals, merchant, scientist, prophets, writers
    120 for engineers
    240 for artists
    420 for musician

    The cost of rushing a great people with gold or faith is:
    For faith : 150+ 10*GP point remaining
    For gold : 200+ 15*GP point remaining.

    Odly enough, the cost of all great people scales with speed (online is /2). The faith/gold buying formula is the same though. So rushing gp is comparatively more expensive on online speed because of the non scaling 150 and 200 costs.
  20. Lord Yanaek

    Lord Yanaek Emperor

    Aug 15, 2003
    From the database i can tell you this.
    • District projects all have a base cost of 25, scaling with COST_PROGRESSION_GAME_PROGRESS*1500
    • They give yield based on a % of the city production. That yield is apparently added each turn and accounted for in the top bar, so you won't receive a bulk of science at the end of the project. The good news is, if you abandon a project in the middle, you won't loose those yields.
      • Encampment gives gold equal to 15% of the production
      • Harbor gives gold equal to 15% of the production
      • Industrial Zone gives gold equal to 15% of the production
      • Commercial Hub gives gold equal to 30% of the production
      • Holy Site gives faith equal to 15% of the production
      • Campus gives science equal to 15% of the production
      • Theater Square gives culture equal to 15% of the production
      • Carnival (Brazil unique) gives a single Amenity
    • Upon completion, projects gives a number of Great People points. You receive those all at once and loose them if you don't finish the project (though i guess you might finish it later to get them). Those points are wasted if no Great People are left (only relevant for Great Prophets really)
      • Encampment gives 10 Great General points
      • Harbor gives 10 Great Admiral points
      • Industrial Zone gives 10 Great Engineer points
      • Commercial Hub gives 10 Great Merchant points
      • Holy Site gives faith 10 Great Prophet points
      • Campus gives 10 Great Scientist points
      • Theater Square gives 5 of each Great Writer, Great Artist and Great Musician points
      • Carnival (Brazil unique) gives 5 of each Great Engineer, Great Merchant, Great Writer, Great Artist and Great Musician points
    • Great person points scale with COST_PROGRESSION_GAME_PROGRESS*800 so while the details of that progression are unknown, it probably means they scale roughly half as fast as the project cost itself.
    A number of other stuff fall under the "projects" part of the build panel but don't give you yields or GPP.
    • Space Race projects required for Science Victory. Cost is 1500 for the first (Satellite), 2500 for the second (Moon Landing) and 3000 for all 3 Mars projects. They don't scale.
    • Nuclear weapons. You first build a project to unlock them, and every device is a project on it's own. Cost is 1000 for both unlock projects, 800 to build a Nuclear Bomb and 1000 for Thermonuclear bomb. None scale.
    • Repair outer defenses. When your walls have been damaged, you need to repair them. Cost is 0 with no scaling but it seems like it actually scales with damage taken, probably hard-coded.

Share This Page