1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Formula Thread

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

  1. KrikkitTwo

    KrikkitTwo Immortal

    Joined:
    Apr 3, 2004
    Messages:
    12,296
    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

    https://www.reddit.com/r/civ/comments/5947kp/civ_vi_mechanics_how_district_production_cost/

    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)
    10+(6*n)^1.3
    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
    http://forums.civfanatics.com/threads/where-is-the-line-that-determine-the-unit-upgrade-cost.604888/
    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)
    15+8*n+n^1.5
    (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

    https://forums.civfanatics.com/threads/hans-lemurson-figures-out-the-combat-formula.606147/
    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.)
    http://forums.civfanatics.com/threa...chanics-and-culture-win.603983/#post-14547927

    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
    Gov_factors
    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

    Apparently
    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
    Theater=culture
    Holy site=Faith
    Campus=Science
    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

    http://forums.civfanatics.com/threads/how-to-deal-with-war-weariness.603115/
    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)
    http://forums.civfanatics.com/resources/trade-routes-guide.25529/

    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)
    Empire:
    +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
    Sun Tzu Wu, Ikael and TomKQT like this.
  2. rpgalon

    rpgalon Chieftain

    Joined:
    Aug 31, 2016
    Messages:
    149
    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 Chieftain

    Joined:
    Dec 23, 2012
    Messages:
    4,770
    Nice!

    Did you test the spaceport as well?
     
  4. MadDjinn

    MadDjinn Chieftain

    Joined:
    Jan 28, 2011
    Messages:
    4,510
    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 Chieftain

    Joined:
    Aug 31, 2016
    Messages:
    149
    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 Reader

    Joined:
    Jul 3, 2012
    Messages:
    2,456
    Location:
    Not in a Civilization City Atleast
    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

    Joined:
    Oct 24, 2016
    Messages:
    62
    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 Chieftain

    Joined:
    Aug 31, 2016
    Messages:
    149
    yes, buildings and specialist had no effect
     
  9. KrikkitTwo

    KrikkitTwo Immortal

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

    Zenstrive Arabian King

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

    dtfauss Chieftain

    Joined:
    Oct 25, 2016
    Messages:
    21
    Gender:
    Male
    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

    Joined:
    Apr 3, 2004
    Messages:
    12,296
    And also some policies, but basically, yes
     
  13. Wr4ith

    Wr4ith Chieftain

    Joined:
    Feb 3, 2016
    Messages:
    69
    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):

    1.jpg
    2.jpg
    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 Chieftain

    Joined:
    Aug 31, 2016
    Messages:
    149
    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

    Joined:
    Apr 3, 2004
    Messages:
    12,296
    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

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

    KrikkitTwo Immortal

    Joined:
    Apr 3, 2004
    Messages:
    12,296
  18. KrikkitTwo

    KrikkitTwo Immortal

    Joined:
    Apr 3, 2004
    Messages:
    12,296
  19. Dilir

    Dilir Chieftain

    Joined:
    Nov 12, 2016
    Messages:
    1
    EDITED

    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 Chieftain

    Joined:
    Aug 15, 2003
    Messages:
    1,388
    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